PDA

View Full Version : GL_LINE_LOOP and glDrawArrays doesnt work!



Michalek366
01-14-2002, 03:57 AM
Hi everyone.

Check out this code:




void Rectangle (float x1, float y1,
float x2, float y2,
bool fill = true)
{
float verts[] = {
x1, y1, x1, y2, x2, y2, x2, y1
};
glVertexPointer (GL_FLOAT, 2, 0, verts);
glDrawArrays (fill ? GL_QUADS : GL_LINE_LOOP,
0, 4);
}


And what is so funny?
For fill == true everything's OK, but...
for fill == false nothing is drawn!

What is going on?

// Runned on TNT2 card