Archived

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

Schaschlik

glCallLists positioning problem

Recommended Posts

Schaschlik    122
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