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

glCallLists positioning problem

This topic is 5176 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi everyone! I have a problem regarding OpenGL and MFC. I use bitmap fonts to draw text in a OpenGL view (MFC doc/view interface). The following code creates the display lists: m_pDC->SelectObject( GetStockObject(SYSTEM_FONT) ); wglUseFontBitmaps (m_pDC->GetSafeHdc(), 0, 255, 0); The following code draws the text: glLoadIdentity(); glTranslatef( 0.0f, 0.0f, 0.0f ); glCallLists( string.GetLength(), GL_UNSIGNED_BYTE, (LPCTSTR)string ); Thing is, neither the glLoadIdentity() statement nor the glTranslatef() call has any effect; the text is initially drawn always at the same point of the view. If the text changes, the new string begins at the point where the old string ended. If you have any idea how to solve this problem, please tell me! Many thanks in advance Timor

Share this post

Link to post
Share on other sites