Hi,
Today I tried to use the ARB_window_pos extension, for placing a texture font on the screen ("2D mode"), but that didnīt work.
Could one explain how to use that extension or canīt I use it here (thought it could be used for "2d overlays" / HUDs)???
OK, this is how I do it at the moment:
// enable 2D mode
glMatrixMode(GL_MODELVIEW);
glPushMatrix();
glLoadIdentity();
glMatrixMode(GL_PROJECTION);
glPushMatrix();
glLoadIdentity();
gluOrtho2D(0, ScrWidth, 0, ScrHeight);
// disable Z-testing and Z-writes
glDisable(GL_DEPTH_TEST);
glDepthMask(GL_FALSE);
// set letter position and draw it
glPushMatrix();
glTranslated(iXPos, iYPos, 0);
Draw_a_letter();
glPopMatrix();
// re-enable z-testing and z-writes
glEnable(GL_DEPTH_TEST);
glDepthMask(GL_TRUE);
// disable 2D mode
glMatrixMode(GL_PROJECTION);
glPopMatrix();
glMatrixMode(GL_MODELVIEW);
glPopMatrix();
The above code is not exactly like I have it in my app, but Iīm sure it can be optimized and I guess I can use glWindowPos2iARB somehow ... any hints?
Diapolo
[This message has been edited by Diapolo (edited 12-06-2002).]



