Rinnegatamante / lpp-vita

Lua Player Plus for PSVITA. Documentation on: http://rinnegatamante.github.io/lpp-vita/
GNU General Public License v3.0
179 stars 27 forks source link

Graphics.drawPixel not working #15

Closed ramersonw closed 7 years ago

ramersonw commented 7 years ago

in this sample below, drawPixel() does nothing:

while true do
  Graphics.initBlend()
  Screen.clear()  
  Graphics.drawLine(10, 25, 100, 250, Color.new(25, 200, 120))
  Graphics.fillRect(260, 275, 350, 500, Color.new(25, 200, 120))
  Graphics.drawPixel(5, 5, Color.new(25, 200, 120))
  Graphics.termBlend()
  Screen.flip()  
  if Controls.check(Controls.read(), SCE_CTRL_TRIANGLE) then
    System.exit()
  end
end
Rinnegatamante commented 7 years ago

The drawn pixel is really small (Vita screen has an high pixel density), are you sure it doesn't work?

ramersonw commented 7 years ago

Here some screenshots of above code: 2017-08-05-232832 and here, after I put Graphics.debugPrint(). The dot appears, but very large 2017-08-05-233102

Tests was made with R6

Rinnegatamante commented 7 years ago

Seems like a bug in vita2d. Will be addressed soon but in the meantime, you can use a Graphics.fillRect with width and height of 1 to reproduce the same behaviour of drawPixel.

ramersonw commented 7 years ago

Ok. I'll use Graphics.fillRect for now. Thanks.

Rinnegatamante commented 7 years ago

Solved with https://github.com/Rinnegatamante/lpp-vita/commit/7d4999cd4620fe0b88f13c7ef8dbde8aa4390d3d . Will be available in next nightly.