Must I use DrawPoly to draw a non-filled rect?

BlitzMax Forums/BlitzMax Beginners Area/Must I use DrawPoly to draw a non-filled rect?

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Just draw 4 lines.

or...In OpenGL ... this might not be entirely accurate...untested

glBegin(GL_LINES)
    glvertex2i(x+1,y)
    glvertex2i(x+width-1,y) 'first line
    glvertex2i(x+width-1,y+1)
    glvertex2i(x+width-1,y+height-2) 'second line
    glvertex2i(x+1,y+height-2)
    glvertex2i(x+width-1,y+height-1) 'third line
    glvertex2i(x,y)
    glvertex2i(x,y+height-1) 'fourth line
glEnd()