glPolygonMode(GL_BACK,GL_FILL) problem ?

BlitzMax Forums/BlitzMax Beginners Area/glPolygonMode(GL_BACK,GL_FILL) problem ?

McFox(Posted 2005) [#1]
I just noticed a little bug (not sure)

Strict
SetGraphicsDriver GLMax2DDriver()
Graphics 200,200,0
glpolygonmode(GL_BACK,GL_FILL)
DrawRect 100,100,50,50
glpolygonmode(GL_BACK,GL_LINE)
DrawRect 50,50,50,50
Flip
WaitMouse


I dunno if it's me but the top-right pixel corner is missing on the fill mode :



ImaginaryHuman(Posted 2005) [#2]
I dunno if it's supposed to do that but what I imagine is that four lines are drawn, from x1,y1 to x2,y2 to x3,y3 to x4,y4 and back to x1,y1 again, and when the last pixel of the last line is meant to be drawn, it overlaps the first pixel which was drawn, cancelling it out??


boomboommax(Posted 2005) [#3]
there is a "draw last pixel" flag somewhere


Sarge(Posted 2005) [#4]
Strange this doesnt happen to me



ImaginaryHuman(Posted 2005) [#5]
Maybe it's gfx card/driver specific. The outline mode is handles by OpenGL, not by Blitz toggling a flag. If you use Max2D and DrawLine, you can use that flag, but if you do it by setting the OpenGL rendering state for the backbuffer, OpenGL manages it


tonyg(Posted 2005) [#6]
Mentioned here