Hi again,
right now I try to find a nice way to create a curve editor widget.
The basic operations I need to do on the drawing area are limited to drawing lines of differing colour.
CrazyEddie, can you give me a hint where to look for an easy solution? I'm still not casual enough with CEGUI
I could use an CEGUI::Texture and render manually into it (and copying the buffer) but I don't see how bit-depth etc can be selected generically. Or I could render degenerated quads, or ...
Any ideas?
-psy
Curve Edit Widget
Moderators: CEGUI MVP, CEGUI Team
- psyclonist
- Just popping in
- Posts: 9
- Joined: Wed Jan 12, 2005 12:06
- Contact:
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Curve Edit Widget
Hmmmm. I presume this is with Ogre?
Probably the best way is to render what you need to a texture. You should be able to use any Ogre::Texture you like, and use that as the basis for a CEGUI::Texture (there are new methods for creating a CEGUI::Texture from an existing Ogre::Texture). You then use this CEGUI::Texture as the basis for an Imageset, which you define an image on and use that Image to place whatever you drew into the Ogre::Texture into a UI element.
I'm aware that what I just described sounds a bit long winded; but it's not really all that bad when you do it (pjcast uses as similar technique for the Ogg Theora player).
If you need control points (which I assume you will), you'll need to code these as a new widget type. Certainly possible, though maybe not easy as a first widget
I'm not sure if I was much help or not
CE.
Probably the best way is to render what you need to a texture. You should be able to use any Ogre::Texture you like, and use that as the basis for a CEGUI::Texture (there are new methods for creating a CEGUI::Texture from an existing Ogre::Texture). You then use this CEGUI::Texture as the basis for an Imageset, which you define an image on and use that Image to place whatever you drew into the Ogre::Texture into a UI element.
I'm aware that what I just described sounds a bit long winded; but it's not really all that bad when you do it (pjcast uses as similar technique for the Ogg Theora player).
If you need control points (which I assume you will), you'll need to code these as a new widget type. Certainly possible, though maybe not easy as a first widget
I'm not sure if I was much help or not
CE.
- psyclonist
- Just popping in
- Posts: 9
- Joined: Wed Jan 12, 2005 12:06
- Contact:
Curve Edit Widget
Longwinded, yes! But still clarifying
Regarding the control points... I think, there should be a way to do this without coding a new widget because I can easily convert from screen space into image space into curve space, and back again. It may not be that elegant, though.
-psy
Regarding the control points... I think, there should be a way to do this without coding a new widget because I can easily convert from screen space into image space into curve space, and back again. It may not be that elegant, though.
-psy
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Curve Edit Widget
Longwinded, yes! But still clarifying
Okay, I admit it; I tend to ramble on a little
CE.
- psyclonist
- Just popping in
- Posts: 9
- Joined: Wed Jan 12, 2005 12:06
- Contact:
Curve Edit Widget
Don't worry I'm grateful for your help!
-psy
-psy
Return to “CEGUI Library Development Discussion”
Who is online
Users browsing this forum: No registered users and 4 guests