19,468
社区成员
发帖
与我相关
我的任务
分享
LOGFONT font;
GLuint iFontList;
。。。。。
//font各个成员设置好
iFontList=glGenLists(6768);
DWORD sect;
for(int i=0;i<72;i++)
{
sect= (176+i)*256+161;//0xB0 =176,0xA1=161
wglUseFontBitmaps(hdc,sect,94,iFontList+94*i);
}
void PutText(const char* name)
{
glListBase(iFontList);
int i= strlen(name);
glCallLists(i,GL_UNSIGNED_SHORT,name);
}
iFontList=glGenLists(40960);
wglUseFontBitmaps(hdc,0,40960,iFontList);
void PutText(const TCHAR* name)
{
glListBase(iFontList);
int i= wcslen(name);
glCallLists(i,GL_UNSIGNED_SHORT,name);
}