Nothing drawn in OpenGL

Hi!

Ok, I have no clue why this happens, but when I draw something, doesn’t matter
what, it doesn’t get drawn … Unless: I use glPushMatrix() with an
glPopMatrix() to get it right. A few examples:

void draw()
{
glLoadIdentity();
glBegin(GL_QUADS);
glVertex3f(…); // and some more points
glEnd();
}

This draws nothing. Place a glPushMatrix() before glBegin() or before
glLoadIdentity() and a glPopMatrix() after glEnd(), the quad will get drawn!
Something other real stupid:
plce the push and pop before the begin, nothing is drawn. Place the push and
pop both after glEnd(), and the quad gets drawn!

I had no problems with glut in this way, btw.

John.

blade_ <blade_ at dds.nl> schrieb am 14 Sep 2000:

void draw()
{
glLoadIdentity();
glBegin(GL_QUADS);
glVertex3f(…); // and some more points
glEnd();
}

This draws nothing. Place a glPushMatrix() before glBegin() or before
glLoadIdentity() and a glPopMatrix() after glEnd(), the quad will get drawn!
Something other real stupid:
plce the push and pop before the begin, nothing is drawn. Place the push and
pop both after glEnd(), and the quad gets drawn!

This has nothing to do with glut or SDL. You’ve messed up your
transformations somewhere. If you mail me your code, I’ll have a look at it.–
Check out my 3D lightcycle game: http://www.gltron.org
More than 90’000 Downloads of the latest version (0.59)

I handed my paper in! I’m DONE! Graduation ceremony is next :slight_smile: