PDA

View Full Version : choosing multiple fonts using VC++ win32 API in openGL



kashif saeed
04-24-2003, 06:41 AM
hello sir
i am some what stuck in a problem. i have created an opengl application in which 2D fonts are dispalyed they can be changed on the fly . i have created a font using createfont its size style etc, then used opengl wglusebitmapfont function to select the font using dispaly list. but i am now in the need of displaying diffrent fonts that is 2 different fonts of different sizes. can u help me out how can we perform this perticular tasks that is to switch between different fonts
kashif

ppinter1
04-24-2003, 09:55 AM
Unless I've misunderstood, simply repeat the process for the second font, which uses a different display list, and spit out the text using code such as:




glListBase (2nd_Font_DL);// Set Display List base
glCallLists ((GLsizei) Text.GetLength(), GL_UNSIGNED_BYTE, (const GLvoid *) Text); // Convert string to graphics