Front face change - any help appreciated!

Started by chisser98, March 15, 2008, 18:06:18

Previous topic - Next topic

chisser98

Hi again!

I'm having a really weird problem with my call to glOrtho(), in that when I call it as GL11.glOrtho(0, Display.getDisplayMode().getWidth(), 0, Display.getDisplayMode().getHeight(), -1, 1); and then draw my quad, the quad displays as I would expect. I draw my quad while my Front Face is Counter-Clockwise (call glFrontFace(GL_CCW); when I init the OpenGL stuff).

However, my problem arises when I try calling glOrtho() as GL11.glOrtho(0, Display.getDisplayMode().getWidth(), Display.getDisplayMode().getHeight(), 0, -1, 1);. Here, my quad doesn't display anywhere! After some fiddling around, I found that if I changed the ordering of my vertices on my quad to make them Clockwise, it drew fine!

So my question is, does anyone know why this is so? It seems like the Front Face changes unexpectedly when I change my coordinate system using the glOrtho call. I'm guessing there is some concept I'm missing when you change coordinate systems, but I'm really at a loss.

Thanks for any help! I appreciate it!

Cheers

Jarrett

chisser98