View Full Version : glutBitmapCharacter
How do i display a time string in a window. I am trying glutBitmapCharacter, and it is giving me an error. I know it is probably simple. Is there an opengl function which will allow my to display strings in a window?
01-30-2001, 03:13 AM
If under Windows try wglUseFontBitmaps() Here is the sample from the MS help:
// create a rendering context
hglrc = wglCreateContext (hdc);
// make it the calling thread's current rendering context
wglMakeCurrent (hdc, hglrc);
// now we can call OpenGL API
// make the system font the device context's selected font
SelectObject (hdc, GetStockObject (SYSTEM_FONT));
// create the bitmap display lists
// we're making images of glyphs 0 thru 255
// the display list numbering starts at 1000, an arbitrary choice
wglUseFontBitmaps (hdc, 0, 255, 1000);
// display a string:
// indicate start of glyph display lists
// now draw the characters in a string
glCallLists (24, GL_UNSIGNED_BYTE, "Hello Win32 OpenGL World");
Well, perhaps this doesn't fit well into a GLUT environment.
[This message has been edited by Relic (edited 01-30-2001).]
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.