Fonts and MFC/OpenGL

Fonts and MFC/OpenGL

Post by David Higginbotha » Sat, 30 May 1998 04:00:00



I've used the sample code provided with Visual C++ 5.0 showing
how to use wglUseFontBitmaps(), etc., but I get no fonts to
appear. I've tried the MS OpenGL and the SGI OpenGL libs, but
to no avail. Everything else I've tried using OpenGL works, except
for fonts.

I'm double-buffering and I've heard that prevents the native
WIN32 fonts from working - they work with minor flickering if
you render them after swapping buffers - but I expect the wgl
font stuff to work regardless of double-buffering.

Can anyone Help?!   ...thanks in advance...

-Dave

 
 
 

Fonts and MFC/OpenGL

Post by Ted L. Che » Sat, 30 May 1998 04:00:00


Hi, the wglFont functions have been problematic for me too.  For one thing,
I'm running the 3Dfx opengl beta 2 which unfortunately doesn't support it.
Then again, I could do the same calls that the wgl function does but that
merely uses glBitmap which causes the flickering on some systems.  The final
solution was to use textured quads to display each character.  If you have
hardware acceleration, this might even be faster.  Anyway, if you're
interested in getting fonts, regardless of using the wgl functions, then
take a look at the font sample on my site

http://pc-8621.bc.rogers.wave.ca/opengl

It's under past projects and contains a class file and editor.

Ted

Quote:>I've used the sample code provided with Visual C++ 5.0 showing
>how to use wglUseFontBitmaps(), etc., but I get no fonts to
>appear. I've tried the MS OpenGL and the SGI OpenGL libs, but
>to no avail. Everything else I've tried using OpenGL works, except
>for fonts.

>I'm double-buffering and I've heard that prevents the native
>WIN32 fonts from working - they work with minor flickering if
>you render them after swapping buffers - but I expect the wgl
>font stuff to work regardless of double-buffering.

>Can anyone Help?!   ...thanks in advance...

>-Dave