adrien
06-07-2005, 01:17 AM
Hello,
i have a problem when writing text when my app is using several windows (ie cview in my case).
It works well with a single windows (using wglUseFontBitmaps and display list).
But when there are several windows, text is written only for one window. It doesn't work for other windows. And i don't get any opengl errors.
any idea ?
Adrien
ps : i'm not used to context and multi opengl windows in one app. But I feel it could come from the function to create text display lists, that is :
m2DFont = ::CreateFont(15, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, ANSI_CHARSET, OUT_TT_PRECIS, CLIP_DEFAULT_PRECIS, ANTIALIASED_QUALITY, FF_DONTCARE|DEFAULT_PITCH, _T("Courier New") );
mPrevious2DObject = ::SelectObject(getNormalDC(), m2DFont);
m2DFontBase = glGenLists(256);
BOOL res = wglUseFontBitmaps(getNormalDC(), 0, 255, m2DFontBase);
i have a problem when writing text when my app is using several windows (ie cview in my case).
It works well with a single windows (using wglUseFontBitmaps and display list).
But when there are several windows, text is written only for one window. It doesn't work for other windows. And i don't get any opengl errors.
any idea ?
Adrien
ps : i'm not used to context and multi opengl windows in one app. But I feel it could come from the function to create text display lists, that is :
m2DFont = ::CreateFont(15, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, ANSI_CHARSET, OUT_TT_PRECIS, CLIP_DEFAULT_PRECIS, ANTIALIASED_QUALITY, FF_DONTCARE|DEFAULT_PITCH, _T("Courier New") );
mPrevious2DObject = ::SelectObject(getNormalDC(), m2DFont);
m2DFontBase = glGenLists(256);
BOOL res = wglUseFontBitmaps(getNormalDC(), 0, 255, m2DFontBase);