Kamina
10-11-2009, 11:22 PM
hi.
I try to write font of unicode. so I use the wglUseFontBitmapsW.
but has got display-lists is wrong.
Additional, it is wrong at specification location code.
example )
GLuint* g_pNotice = NULL;
GLuint* g_pTerrain = NULL;
GLuint* g_pUI = NULL;
void InitNotice(std::wstring wstrText)
{
g_pNotice = new GLuint[wstrText.size()];
GLuint nBase = glGenLists((GLsizei)wstrText.size());
for( int i = 0; i < wstrText.size(); ++i) {
g_pNotice[i] = nBase + i;
wglUseFontBitmapW(.....);
}
}
void RednerNotice()
{
.....;//render display-list(has got wglUseFontBitmapsW)
}
void InitTerrain()
{
.....;
}
void RenderTerrain()
{
.....;//render display-list(has got wglUseFontBitmapsW)
}
void InitUI()
{
...;
}
void RenderUI()
{
.....;//render display-list(has got wglUseFontBitmapsW)
}
void Render()
{
InitTerrain("&#51648;&#54805;");
RenderTerrain();//OK
DoSomething;
RenderUI("&#50976;&#50500;&#51060;");//OK
DoSomething;
RenderNotice("&#44277;&#51648;");//Wrong value
}
output :
"&#51648;&#54805;"
"&#50976;&#50500;&#51060;"
"hf"//is not same "&#44277;&#51648;"
So, I wonder how to initialize glCallLists when use wglUseFontBitmapsW's lists.
please, give a some advice to me.
I try to write font of unicode. so I use the wglUseFontBitmapsW.
but has got display-lists is wrong.
Additional, it is wrong at specification location code.
example )
GLuint* g_pNotice = NULL;
GLuint* g_pTerrain = NULL;
GLuint* g_pUI = NULL;
void InitNotice(std::wstring wstrText)
{
g_pNotice = new GLuint[wstrText.size()];
GLuint nBase = glGenLists((GLsizei)wstrText.size());
for( int i = 0; i < wstrText.size(); ++i) {
g_pNotice[i] = nBase + i;
wglUseFontBitmapW(.....);
}
}
void RednerNotice()
{
.....;//render display-list(has got wglUseFontBitmapsW)
}
void InitTerrain()
{
.....;
}
void RenderTerrain()
{
.....;//render display-list(has got wglUseFontBitmapsW)
}
void InitUI()
{
...;
}
void RenderUI()
{
.....;//render display-list(has got wglUseFontBitmapsW)
}
void Render()
{
InitTerrain("&#51648;&#54805;");
RenderTerrain();//OK
DoSomething;
RenderUI("&#50976;&#50500;&#51060;");//OK
DoSomething;
RenderNotice("&#44277;&#51648;");//Wrong value
}
output :
"&#51648;&#54805;"
"&#50976;&#50500;&#51060;"
"hf"//is not same "&#44277;&#51648;"
So, I wonder how to initialize glCallLists when use wglUseFontBitmapsW's lists.
please, give a some advice to me.