We have DrawRect and DrawLine - but don't seem to have the flag for drawing an unfilled rectangle - or have I missed it?
DrawRect without fill?
BlitzMax Forums/BlitzMax Beginners Area/DrawRect without fill? I don't /think/ it's there yet. It should be simple enough to do. I think actually perhaps they intend that you use drawline for a series of lines to make a box.
Yes I've been drawing 4 lines - just thought there might be a rectangle flag - or Mark might add it seeing this post. ;)
Just use one of these:
glPolygonMode(GL_BACK, GL_LINE) 'Draw outline only glPolygonMode(GL_BACK, GL_POINT) 'Draw dotted outline glPolygonMode(GL_BACK, GL_FILL) 'Draw filledP.S. This will apply to all Draw commands.
Thanks - and I see you need GL_BACK (not GL_FRONT) to write to the backbuffer before flipping.
Oops, missed that :)
glPolygonMode(GL_BACK, GL_LINE) ' outlined
DrawRect 10,10,10,10
glPolygonMode(GL_BACK, GL_FILL) ' solid filled (back to normal)
DrawRect 10,10,10,10
glPolygonMode(GL_BACK, GL_FILL) ' solid filled (back to normal)
Why isn't this in the help files for rect?
Because it's a workaround not an official function.
It's mentioned in the wiki.
It's mentioned in the wiki.
Does anybody else get a missing pixel in the top right corner of the rectangle?
I would be tempted to put this in the bug report section but it's not an official function.
I would be tempted to put this in the bug report section but it's not an official function.
Does this maybe have something to do with the DrawRect command not drawing the last pixel? After the recent 1.03 update mark has added a "draw_last_pixel" flag to DrawLine.
I'm sure it is - I guess Mark needs to add another flag. ;-)
I tried the following but it didn't work.
glObscureDrawMode(GL_BACK, GL_DRAWEVERYSINGLEPIXELINARECTANGLEPLEASE)
glObscureDrawMode(GL_BACK, GL_DRAWEVERYSINGLEPIXELINARECTANGLEPLEASE)
LOL - not too much to ask is it? ;-)
How to generate an unfilled circle? The glPolygonMode command doesn't seem to work for that.
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE)
Why isn't this in the help files for rect?
Sadly the docs are still the weakest link in the BMax chain...