Original Post
Hi. I played a bit with OpenGL today - and I have the following problem : - First I draw a rotating triangle with the following code :
glRotatef( 0.5f, 1.0f, 1.0f , 1.0f );
glBegin( GL_TRIANGLES );
glColor3f( 1.0f, 0.0f, 0.0f );
glVertex3f( 0.0f, -1.0f, 0.0f );
glColor3f( 0.0f, 1.0f, 0.0f );
glVertex3f( 1.0f, 1.0f, 0.0f );
glColor3f( 0.0f, 0.0f, 1.0f );
glVertex3f( -1.0f, 1.0f, 0.0f );
glEnd();
- Then I wanted a text to be appeared over it at a fixed position.
glRasterPos3f( 0.2,0.0,0.0 );
glPushAttrib(GL_LIST_BIT);
glListBase(m_iFontBase);
glCallLists(strlen(pText), GL_UNSIGNED_BYTE, pText);
glPopAttrib();
The problem is, due to the glRotatef( 0.5f, 1.0f, 1.0f , 1.0f ) the text now also rotates/moves. Does anybody has a idea how to solve this ? Any help appreciated!