display callback drawing behind 3d

Discussions concerning plugins for SOFTIMAGE©
Post Reply
angel
Posts: 1
Joined: 11 Apr 2013, 11:07

display callback drawing behind 3d

Post by angel » 11 Apr 2013, 11:43

Hi,

I have a problem with my display callback. It's currently drawing behind the 3d models.
From my understanding of opengl, the steps are:

Code: Select all

-----render 3d objects--------- 

glMatrixMode (GL_PROJECTION);
glPushMatrix();
glLoadIdentity ();
glOrtho (-480, 480, -270, 270, -1, 1);
	 
glMatrixMode (GL_MODELVIEW);
glPushMatrix();
glLoadIdentity();

glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);

------------ draw 2d hud-----------------------
glMatrixMode( GL_MODELVIEW );
glPopMatrix();

glMatrixMode( GL_PROJECTION );
glPopMatrix();
thanks

Post Reply

Who is online

Users browsing this forum: No registered users and 27 guests