Can i draw in CEGUI ?
Moderators: CEGUI MVP, CEGUI Team
Can i draw in CEGUI ?
I want to draw a simple graph with CEGUI , Can i draw it ? how to ?
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Thank you verymuch !
And i have two Problems :
* I want to load a clock image , this problem can solve by use imageset .
* I want to create a needle of clock can move around Origin . Now , i have no idea for This problem . Can you help me ??
thanks again !
And i have two Problems :
* I want to load a clock image , this problem can solve by use imageset .
* I want to create a needle of clock can move around Origin . Now , i have no idea for This problem . Can you help me ??
thanks again !
Last edited by maitvn on Mon Aug 11, 2008 03:48, edited 1 time in total.
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Basically you'll use some other drawing library, or maybe the graphics API directly to perhaps draw a line or polygon into a texture.
You then use that texture as the basis for another Imageset, define an Image for the area that you drew into, and use this Imageset / Image combo as normal. One thing to consider about this is that you only need to do the Imageset creation part once - you can update the content of the underlying texture as you require and the updated content will show next time CEGUI redraws.
Note that in regard to creating the Imageset from the texture, you usually would create a CEGUI::Texture from the underlying engine / API texture for use by the Imageset, however if you're using OpenGL, we are missing a means of doing this directly, so you'd create the CEGUI::Texture first, extract the OpenGL texture name from this and then either the data into it (or use it when setting up a frame buffer, or whatever).
CE.
You then use that texture as the basis for another Imageset, define an Image for the area that you drew into, and use this Imageset / Image combo as normal. One thing to consider about this is that you only need to do the Imageset creation part once - you can update the content of the underlying texture as you require and the updated content will show next time CEGUI redraws.
Note that in regard to creating the Imageset from the texture, you usually would create a CEGUI::Texture from the underlying engine / API texture for use by the Imageset, however if you're using OpenGL, we are missing a means of doing this directly, so you'd create the CEGUI::Texture first, extract the OpenGL texture name from this and then either the data into it (or use it when setting up a frame buffer, or whatever).
CE.
Return to “Offtopic Discussion”
Who is online
Users browsing this forum: No registered users and 8 guests