How to use cegui to render to a texture?

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

iversion
Just popping in
Just popping in
Posts: 18
Joined: Sat Jun 24, 2006 05:03

How to use cegui to render to a texture?

Postby iversion » Thu Jul 13, 2006 03:13

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!

User avatar
jacmoe
Just can't stay away
Just can't stay away
Posts: 136
Joined: Sun Apr 03, 2005 14:18
Location: Holbaek, Denmark
Contact:

Postby jacmoe » Thu Jul 13, 2006 03:46

I think I saw a Chinese CEGUI text renderer somewhere at the Ogre Forum, quite recently. :wink:

((search for chinese and cegui))

iversion
Just popping in
Just popping in
Posts: 18
Joined: Sat Jun 24, 2006 05:03

Postby iversion » Thu Jul 13, 2006 09:00

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?

User avatar
jacmoe
Just can't stay away
Just can't stay away
Posts: 136
Joined: Sun Apr 03, 2005 14:18
Location: Holbaek, Denmark
Contact:

Postby jacmoe » Thu Jul 13, 2006 15:34

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:

iversion
Just popping in
Just popping in
Posts: 18
Joined: Sat Jun 24, 2006 05:03

Postby iversion » Fri Jul 14, 2006 05:04

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?

silenttree
Not too shy to talk
Not too shy to talk
Posts: 30
Joined: Wed Nov 01, 2006 05:59
Contact:

Postby silenttree » Tue Nov 14, 2006 17:20

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!


Return to “Help”

Who is online

Users browsing this forum: No registered users and 3 guests