inverting text possible with wglUseFontBitmap?

Started by
0 comments, last by V-man 15 years, 5 months ago
Right now I'm using wglUseFontBitmap() to generate displaylists that I can use to render text on screen. The problem is that I'm using a third-party gui system that renders textures in window coords (as opposed to cartesian); it's heavily based on textured mapped images so in order to perform my own drawing I have to use RTT to render a scene inside one of the widgets. The probably is that my scene is rendered upside down. Well, if I invert the projection matrix (glOrtho(0,w,h,0,-1,1)) when rendering my scene it is correctly inverted but none of my text is. I also tried using glPixelZoom() and glScalef() to invert the y-axis but it had absolutely no affect on the text/displaylists. Am I missing something or is it impossible to invert text/displaylists generated via wglUseFontBitmaps? I may just go ahead and move to using FreeType2 where I believe you can setup your own displaylists for character rendering? Thanks.
Advertisement
No
Sig: http://glhlib.sourceforge.net
an open source GLU replacement library. Much more modern than GLU.
float matrix[16], inverse_matrix[16];
glhLoadIdentityf2(matrix);
glhTranslatef2(matrix, 0.0, 0.0, 5.0);
glhRotateAboutXf2(matrix, angleInRadians);
glhScalef2(matrix, 1.0, 1.0, -1.0);
glhQuickInvertMatrixf2(matrix, inverse_matrix);
glUniformMatrix4fv(uniformLocation1, 1, FALSE, matrix);
glUniformMatrix4fv(uniformLocation2, 1, FALSE, inverse_matrix);

This topic is closed to new replies.

Advertisement