Advertisement

Textures wont show up in Ortho mode....

Started by April 24, 2003 10:13 PM
11 comments, last by titan2782 21 years, 10 months ago
Glad you got it working!

But there seems to be some other strange things you''re doing...

If you''re trying to render things in perspective mode as well, I don''t think it will work... You''re not changing back from ortho mode, in case you didn''t know...

//Setup 2d ortho mode
glPushMatrix();
glDisable(GL_DEPTH_TEST);
glMatrixMode(GL_PROJECTION);


should probably be:


//Setup 2d ortho mode
glDisable(GL_DEPTH_TEST);
glMatrixMode(GL_PROJECTION);
glPushMatrix();


And:

//Return from ortho view
glMatrixMode(GL_MODELVIEW);
glPopMatrix();
glEnable(GL_DEPTH_TEST);
glFlush();


should probably be:

//Return from ortho view
glMatrixMode(GL_PROJECTION);
glPopMatrix();
glMatrixMode(GL_MODELVIEW);
glEnable(GL_DEPTH_TEST);
glFlush();


In case it matters... Hope this helps!
LOL! Ok, i made your changes, but still cant get back to 3d mode now. i cant seem to render anything ;( Thanks for the help.

Dustin Davis
Owner / CEO
Programmers Unlimited
www.Programmers-Unlimited.com
Dustin DavisOwner / CEOProgrammers Unlimitedwww.Programmers-Unlimited.com
Advertisement
Nevermind, seems I had texture_2d turned on and not applying textures. Thanks anyways.

Dustin Davis
Owner / CEO
Programmers Unlimited
www.Programmers-Unlimited.com
Dustin DavisOwner / CEOProgrammers Unlimitedwww.Programmers-Unlimited.com

This topic is closed to new replies.

Advertisement