View Full Version : Chinese Characters display in OpenGl
01-07-2002, 05:57 AM
i ask as a beginer,but no help.
yes,I know OpenGl can do it,but how?I really see the OpenGl 3D screen Saver(build in windows)display some 3D cool chinese charaters...
but i really donot know how to use these chinese characters in my opengl app.
only 26 letters in english,but there are more than 10000 characters in chinese.dare you use display lists?
please,donot tell me it is impossible,please tell me the way.
01-07-2002, 06:18 AM
Hi.. The first easier way that comes up to me is: use a texture with the words/text that you would like to show in you virtual environment....§:0).
01-07-2002, 07:55 AM
If the screen saver you speak of is the standard OpenGL 3D Text screen saver, you can get the source code of it in the Windows Platform SDK.
01-07-2002, 02:17 PM
The Platform SDK..Maybe you are right,yes,it is right!
I will go and find it,thank you!
in fact,i am on a game,how can i use texture...there are so many dial...
01-07-2002, 11:28 PM
Have a look at http://homepages.paradise.net.nz/henryj/code/index.html
This lib renders chinese (or any font) quite well http://www.opengl.org/discussion_boards/ubb/smile.gif
01-08-2002, 05:46 AM
Either pre-render, so render to a bitmap and bind the dib as an OpenGL texture. Your font will be drawn with GDI and hence characters will be mapped correctly. You can do this at run-time with a simple routine "CreateStringTexture....".
If all of your text is static and you ONLY want to use it in Chinese then of course, pre-drawing in a paint package is the way to go but by run-time drawing to DIB, you don't have to pre-define a set of different textures for each language you wish to support.
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.