dvm
04-28-2004, 07:52 AM
Hello to everyone,
I'm trying to write text to my application using the bitmap font method provided in OpenGL game programming book. For the ones that don't have the book the method is:
unsigned int listBase;
HFONT hFont;
char *theString = "Hello! I'm the String.";
...
listBase = glGenLists(96);
hFont = CreateFont(...);
SelectObject(g_HDC, hFont);
wglUseFontBitmaps(g_HDC, 32, 96, listBase);
...
glRasterPos2i(0,0);
glPushAttrib(GL_LIST_BIT);
glListBase(base - 32);
glCallLists(strlen(str), GL_UNSIGNED_BYTE, str);
glPopAttrib();
...
glDeleteLists(base, 96);My problem right now is two-fold.
First I use VC++ 6.0. The editor (or more correctly the font?) does not seem to support French (I'm a Greek student having his placement in France, so whether I like it or not I need to output French, the program is for kids). Also I remember a year ago when I tried to output Greek with the aforementioned method I failed. So I think that even if I manage to write a french string in the editor the text will not show up on the screen.
Do any of you have a similar experience? How did you solve your problem? Thank you for your time.
I'm trying to write text to my application using the bitmap font method provided in OpenGL game programming book. For the ones that don't have the book the method is:
unsigned int listBase;
HFONT hFont;
char *theString = "Hello! I'm the String.";
...
listBase = glGenLists(96);
hFont = CreateFont(...);
SelectObject(g_HDC, hFont);
wglUseFontBitmaps(g_HDC, 32, 96, listBase);
...
glRasterPos2i(0,0);
glPushAttrib(GL_LIST_BIT);
glListBase(base - 32);
glCallLists(strlen(str), GL_UNSIGNED_BYTE, str);
glPopAttrib();
...
glDeleteLists(base, 96);My problem right now is two-fold.
First I use VC++ 6.0. The editor (or more correctly the font?) does not seem to support French (I'm a Greek student having his placement in France, so whether I like it or not I need to output French, the program is for kids). Also I remember a year ago when I tried to output Greek with the aforementioned method I failed. So I think that even if I manage to write a french string in the editor the text will not show up on the screen.
Do any of you have a similar experience? How did you solve your problem? Thank you for your time.