PDA

View Full Version : Printing (on a printer) OpenGL scene with text... Text doesnot appear



Fastian
11-15-2002, 01:58 AM
Hi,

I have an OpenGL scene that uses display list text based on wglUseFontBitmaps(...). Now while creating the text I use

font = CreateFont( Size, // Height Of Font
0, // Width Of Font
0, // Angle Of Escapement
0, // Orientation Angle
fontAttrib, // Font Weight
FALSE, // Italic
FALSE, // Underline
FALSE, // Strikeout
ANSI_CHARSET, // Character Set Identifier
OUT_TT_PRECIS, // Output Precision
CLIP_DEFAULT_PRECIS, // Clipping Precision
ANTIALIASED_QUALITY, // Output Quality
FF_DONTCARE|DEFAULT_PITCH, // Family And Pitch
Font); // Font Name

SelectObject(hDC, font); // Selects The Font We Want

wglUseFontBitmaps(hDC, 32, 96, m_FontList); // Builds 96 Characters Starting At Character 32

Now for displaying it in the scene I use THE CDC fof my rendering window and everything works fine. But for printing, my rendering CDC is a bitmap so I recreate this font with that bitmaps CDC and when I finally render my opengl scene (including the text) into the bitmaps CDC, the scene is rendered but my text is not. Hence the printout only has the OpenGL scene correctly rendered but not the text. Can anyone help me out here. What am I doing wrong.

Regards,

Fastian

[This message has been edited by Fastian (edited 11-15-2002).]