GL Problem

I’ve just started coding with SDL after bangin my head against DirectX for a while. I’m trying to follow NeHe’s GL tutorials and I have run into a slight problem. On the 4th one (where you rotate a triangle and a quad) the quad doesn’t show up. I can get it to show up by commenting out glLoadIdentity() but then the quad is attached to the triangle. I’ve attached the code.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed…
Name: code.txt
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20010811/583746a6/attachment.txt

Hi,

I just look over your code,

After you do the second glLoadIdentity(), you do not translate on the
z-axis !!

try:
glTranslatef(1.5f, 0.0f, -6.0f);
instead of:
glTranslatef(3.0f, 0.0f, 0.0f);

Hope that helps !

Arne

www.dragongame.de