Page 1 of 1
Dynamic texture and custom widget
Posted: Wed Jun 11, 2008 02:51
by sonic20000
Hi, is it possible to put in a dynamic texture (eg my webcam video input) ?
Also, if it's possible, can i make a widget that draws audio spectrum, i know i can take in the audio buffer, but i don't know how cegui rendering works.
Posted: Wed Jun 11, 2008 08:45
by CrazyEddie
Hi, and welcome.
CEGUI rendering is currently based on the concept of the CEGUI::Image - everything that CEGUI draws at the moment has to be an Image, which in turn has to be defined as part of a CEGUI::Imageset (which has a texture of some kind at its heart).
Once the Imageset and Image are defined, you can change the content of the underlying texture at any time. The change should automatically be reflected upon the next call to System::renderGUI.
So basically you take your CEGUI::Texture (that accesses a texture of the underlying API), create a CEGUI::Imageset from the CEGUI::Texture, define a CEGUI::Image on the CEGUI::Imageset, and finally use the defined Imageset/Image combination as you would any other.
How you specifically go about this, and how easy it is, will depend upon the underlying Renderer in use.
HTH
CE.
Posted: Fri Jun 13, 2008 08:03
by sonic20000
thx for replying.. will try it out