PDA

View Full Version : Bitmap font problem in fullscreen and when resizing screen



miguel
11-30-2000, 02:09 AM
Hi,

Another problem.

I have used code similar to that in NeHe's tutorial for bitmap fonts.

The problem is when I run fullscreen the text becomes garbled and the program hangs.
When I resize the screen at certain screen ratios the text disapears?

anybody know whats going on http://www.opengl.org/discussion_boards/ubb/confused.gif

Deiussum
11-30-2000, 04:37 AM
I'm not sure about the fullscreen problem offhand, but the resizing problem might be becuase you are not properly resetting the projection matrix. I usually do something like this in my resize function..

glViewport(0,0,width,height);
glMatrixMode(GL_PROJECTION);
// Don't forget to reset the matrix or
// subsequent calls to glFrustum/glOrtho
// will be multiplied by the previous
// projection matrix.
glLoadIdentity();
glFrustum(left,right,top,bottom,front,back);
glMatrixMode(GL_MODELVIEW);