I\'ve got a problem in that I\'m trying to draw a solar system using textures (one texture for each planet) and as I draw my textures, only the 1st one appears. None of the
gluOrtho2D()
doesn't issue a glLoadIdentity()
like you seem to expect.
Generally you only set your projection matrix once per frame.
Try something like this:
void DrawFrame()
{
...
glMatrixMode( GL_PROJECTION );
glLoadIdentity();
gluOrtho2D(0, this.Width, 0, this.Height);
glMatrixMode( GL_MODELVIEW );
glLoadIdentity();
// "camera" transform(s)
foreach object
{
glPushMatrix();
// per-object matrix transform(s)
// draw object
glPopMatrix();
}
}