View Full Version : Wire box not closed

10-19-2003, 09:17 PM
I seem to be having a little problem drawing a simple wire box(code below). For some reason one of the corners of the box is not finished, the top left. Imagine the corner pixel removed.

I have tried recoding this as GL_LINES but the result was exactly the same. Is this me or a buggy driver?

glVertex2f(a_X, a_Y);
glVertex2f(a_X + a_Width, a_Y);
glVertex2f(a_X + a_Width, a_Y + a_Height);
glVertex2f(a_X, a_Y + a_Height);
glVertex2f(a_X, a_Y);

[This message has been edited by gimp (edited 10-19-2003).]

[This message has been edited by gimp (edited 10-19-2003).]

10-20-2003, 06:22 AM
Well GL_LINES you need a start and end for each segment, so with GL_LINES you would need eight points to form a box.

The code look's ok, you have five points needed to define a box with GL_LINE_STRIP.

Could it be something else in your code that is causing the one side not to show up?

What drawing mode are you using, ortho perspective?

Maybe post more of your drawing routine.