Open discussions on programming specifically for the PS Vita.
Forum rules: Forum rule Nº 15 is strictly enforced in this subforum.
#418488 by NoOne
Fri May 26, 2017 7:10 pm
I am trying to make an empty image and fill it with a color. Here's my code and it's not working. It throws error on Lua Player Plus. What do I need to add/fix to make it run?


white = Color.new(255,255,255)
while true do
Graphics.initBlend()
img = Graphics.createImage(10, 10)
img.clear(white)

Graphics.drawImage(10, 10, img)

Graphics.termBlend()

if Controls.check(Controls.read(), SCE_CTRL_TRIANGLE) then
System.exit()
end
Screen.flip()

end
Advertising
#418510 by thesuicidalrobot
Sat May 27, 2017 10:15 pm
Code: Select allwhite = Color.new(255,255,255)
while true do
Graphics.initBlend()
Screen.clear()
img = Graphics.fillRect(10, 20, 10, 20,white)

Screen.flip()
Graphics.termBlend()
   
if Controls.check(Controls.read(), SCE_CTRL_TRIANGLE) then
System.exit()
end

end


I simplified things a bit. I used the rectangle drawing function call. Also, you will need to clear the screen every frame, which is why I added Screen.Clear(), along with calling Screen.flip() before you call Graphics.termBlend().
Advertising

Who is online

Users browsing this forum: No registered users and 2 guests