Archived

This topic is now archived and is closed to further replies.

Sigmatikal

Quick Question

Recommended Posts

For some reason when i try and render text the text just zooms from the left side of my screen to the right side.. ive tried just about everything to find out whats wrong.. I got rid of translates and such and it does nothing.. The triangle i drew doesn't move but the text does?? im guessing it has something to do with glCallLists.. any ideas? glMatrixMode(GL_PROJECTION); glPushMatrix(); glLoadIdentity(); glOrtho(0, m_nScreenWidth, 0, m_nScreenHeight,-100,100); glMatrixMode(GL_MODELVIEW); glPushMatrix(); glLoadIdentity(); glTranslated(nXpos,nYpos,0); glBegin(GL_TRIANGLES); glVertex3i( 100,100, 0); glVertex3i( -10,0 , 0); glVertex3i( 200,0 , 0); glEnd(); glColor3f(1.0f,0.0f,0.0f); glPushAttrib(GL_LIST_BIT); glListBase(m_base); glCallLists(strlen(text),GL_UNSIGNED_BYTE,text); glPopAttrib(); glMatrixMode(GL_PROJECTION); glPopMatrix(); glMatrixMode(GL_MODELVIEW); glPopMatrix(); glEnable(GL_DEPTH_TEST); if (bBlend) glEnable(GL_BLEND); } All the variables are working right. Lemme know if you can help - Sigmatikal Edited by - Sigmatikal on July 23, 2001 8:01:02 PM

Share this post


Link to post
Share on other sites
Well the triangle should move as well, as long as nxpos and nypos are not 0...

When you call a display list it draws using the vertex positions you gave it wen you created it, so you can translate/rotate the list, how are you creating your display lists?

And change your glOrtho call to have ... -1, 1); you don''t need a big frustum there , that may be causing the problem, I''m not to sure

FatalXC

Share this post


Link to post
Share on other sites