Displaying Unicode, Japanese text

  • Follow


Hello,


I would like to display japanese text in opengl.

Basically I m using the same code as found on the web using:
wglUseFontBitmaps(hDC, 0, 255, nBaseList);

and

glCallList(myText.GetLength(), GL_UNSIGNED_BYTE, (const 
char*)myText.GetString());


and I try to display japanese text directly.

But on the screen I only have grabage character.

I looked for more information on this in the archive but I haven t found 
any solution.

Any hints on what to look for ?

Thanks a lot,

Dlp
0
Reply DLPnet 3/28/2006 1:21:55 PM

Ok Stop !

I found the jtext.c example from microsoft and this seems to work 
correctly (but I m no more using wglUseFontBitmap ... why this is not 
working ?)

Thanks !

Dlp

DLPnet wrote:

> Hello,
> 
> 
> I would like to display japanese text in opengl.
> 
> Basically I m using the same code as found on the web using:
> wglUseFontBitmaps(hDC, 0, 255, nBaseList);
> 
> and
> 
> glCallList(myText.GetLength(), GL_UNSIGNED_BYTE, (const 
> char*)myText.GetString());
> 
> 
> and I try to display japanese text directly.
> 
> But on the screen I only have grabage character.
> 
> I looked for more information on this in the archive but I haven t found 
> any solution.
> 
> Any hints on what to look for ?
> 
> Thanks a lot,
> 
> Dlp
0
Reply DLPnet 3/28/2006 2:04:10 PM


DLPnet <dlpnet-@-free.fr> wrote in
news:44294251$0$12874$626a54ce@news.free.fr: 
>> 
>> glCallList(myText.GetLength(), GL_UNSIGNED_BYTE, (const 
>> char*)myText.GetString());

If you are using unicode, then you shouldn't be casting the string to 
char*, but wchar_t* instead.
In fact, use TCHAR's instead through your program, so you don't need to 
worry about unicode/non-unicode versioning.

-- 
David Lewis
0
Reply David 4/7/2006 8:23:15 AM

2 Replies
364 Views

(page loaded in 0.048 seconds)

Similiar Articles:









7/29/2012 10:17:17 AM


Reply: