Page 1 of 1

How to use cegui to render to a texture?

Posted: Thu Jul 13, 2006 03:13
by iversion
I want to show Chinese on the texture in the OGRE render window. I knew that CEGUI support showing Chinese.
But my question is how to use cegui to write Chinese to a texture (the ones it normally then puts up 2d on the screen)?Should I just load the font and write it to the texture, and that is so? I can show Chinese on the GUI panel by using the configure font file --OGRE_HOME\media\gui\simhei-12.font. When I show Chinese, I just convert the String to utf8 format then job is done. But what should I do when I want write Chinese to a texture?
I am very new to CEGUI. Could anybody give me a solution?
Thank you!

Posted: Thu Jul 13, 2006 03:46
by jacmoe
I think I saw a Chinese CEGUI text renderer somewhere at the Ogre Forum, quite recently. :wink:

((search for chinese and cegui))

Posted: Thu Jul 13, 2006 09:00
by iversion
Yes, I did that. But the people there just mentioned a few words, with little details. So I have to come here ask for help.
And now I use CEGUIFont object to draw some Chinese text by using the drawText function. But I can't still draw the text to the texture.
All I want is that I can draw a Text in the scene which like MovableText's effect. Unfortunately, MovableText doesnot support Chinese.
By the way, is there any difference between CEGUI::Texture and Ogre::Texture? Which one should I use to draw Chinese text on?

Posted: Thu Jul 13, 2006 15:34
by jacmoe
If you have issues, it would be a good idea to post what you posted @ Ogre Forum.
Ogre does not support unicode, yet. Hopefully Eihort does, but let's see.
Since CEGUI supports unicode ...
Show us the code you've got. :wink:

Posted: Fri Jul 14, 2006 05:04
by iversion
My idea about how to realize that is as follows:
CEGui creat a font texture with all the characters on it. I hope that I am able to find some utility methods to pull texture coords out of CEGui for unicode characters (But i find none can achieve my goal at the temporary ), and if I found, I could use it in conjunction with Dagon's per-billboard texture coordinates.
Can anybody fimiliar to CEGUI tell me what API can I pull texture coords out of CEGui for unicode characters?

Posted: Tue Nov 14, 2006 17:20
by silenttree
iversion wrote:My idea about how to realize that is as follows:
CEGui creat a font texture with all the characters on it. I hope that I am able to find some utility methods to pull texture coords out of CEGui for unicode characters (But i find none can achieve my goal at the temporary ), and if I found, I could use it in conjunction with Dagon's per-billboard texture coordinates.
Can anybody fimiliar to CEGUI tell me what API can I pull texture coords out of CEGui for unicode characters?



i have same problem like you are. if some solution founded, pls let me know!

thx!