DrawPoint issue on Desktop (GLFW) on Windows
Monkey Forums/Monkey Bug Reports/DrawPoint issue on Desktop (GLFW) on Windows
| ||
I have an issue with DrawPoint on the Desktop target. To demonstrate the issue I have written the following small program: Strict Import mojo Function Main:Int() New TestApp() Return 0 End Class TestApp Extends App Method OnCreate:Int() SetUpdateRate(60) Return 0 End Method OnRender:Int() Cls(0, 0, 0) SetColor(255, 0, 0) For Local x:Int = 0 Until 640 For Local y:Int = 0 Until 480 DrawPoint(x, y) Next Next Return 0 End End On all targets that I've tried, except Desktop, you get a rectangular red block on the screen, as expected. On the Desktop target the left third of the window is fine, but on the right two-thirds you get irregular vertical banding showing the background colour. |
| ||
What Host OS? It works fine here, on my Windows 7 GTX 460 setup. |
| ||
@Powelly To Fix it... Change DrawPoint(x, y) to DrawPoint(x+0.5, y+0.5) @mark Here's an image of the problem I wrote a bug report nearly a year ago talking about the inconsistency of DrawPoint and DrawLine. |
| ||
What OS? Graphics card? |
| ||
Windows 7 and my signature has all of the information you could ever want about my computer and its video card. |
| ||
> my signature has all of the information you could ever want about my computer and its video card. ...and, with sigs turn on, I can even see it! This is not happening to me on either PC or Mac though. I'll have a play around and try to see what's going on. |
| ||
Ok, give experimental v79a a whirl. I wasn't able to reproduce the above, but the code below caused problems. It now does what it should on all tested targets (haven't got round to PSM yet), although I've just noticed that html5 exhibits a minor flicker, meaning point/line code is not identical. Will investigate this later. Import mojo Function Main() New TestApp End Class TestApp Extends App Method OnCreate() SetUpdateRate 60 End Field t:Bool Method OnRender() Cls 0,0,255 SetColor 255,0,0 Local w:=DeviceWidth-1 Local h:=DeviceHeight-1 t=Not t If t For Local x:=0 To w DrawPoint x,0 DrawPoint x,h Next For Local y:=0 To h DrawPoint 0,y DrawPoint w,y Next Else DrawLine 0,0,w,0 DrawLine 0,0,0,h DrawLine w,0,w,h DrawLine 0,h,w,h Endif SetColor 0,0,0 DrawRect 1,1,w-1,h-1 End End |
| ||
I had the issue on a Desktop with Windows 7 64bit with an AMD Radeon R9 270, and also on a laptop with Windows 7 64bit with an AMD A10-5750M APU containing a Radeon HD 8650G GPU. I've not tested on a machine with an nVidia GPU, but I can do if it helps. |
| ||
I've checked v79a and everything looks good. Thanks :-) |