Game Development Reference
In-Depth Information
Figure 17.3 The effect of altering the deviation parameter in function call
In this function call to create a GL font we pass the device context and
the listbase value, and the function creates a set of display lists.
BOOL CGLText::CreateGLFont(HDC hdc, int listbase)
HFONT hfont, sfont;
Hfont = CreateFontIndirect(&m_logfont);
if (!hfont){
AfxMessageBox(”Problem creating logical font”);
return FALSE;
sfont = (HFONT)SelectObject(hdc,hfont);
m_listinit = wglUseFontOutlines(hdc, 32, 95, listbase, 0.0f, 0.1f,
if (!m_listinit){
AfxMessageBox(”Problem creating font display list”);
m_listbase = listbase;
SelectObject(hdc, sfont);
return m_listinit;
Search Nedrilad ::

Custom Search