Render video to cegui window
Posted: Fri Apr 08, 2011 18:00
Hey guys,
I'm using delta3d 2.5.0 and trying to render a video to a CEGUI::StaticImage window. I've got an osg::texture2d that contains the video and I can successfully render to objects in the scene, but when I try to render to the cegui window, the render surface just turns white.
I'm using the following code :
Any ideas as to why this wouldn't work? I've tried the Delta3d forums and they pointed me here.
Thanks,
Alex
PS I think the trouble lies in my casting osg::texture2D as a CEGUI::Texture, but I'm not sure how to get around it?
I'm using delta3d 2.5.0 and trying to render a video to a CEGUI::StaticImage window. I've got an osg::texture2d that contains the video and I can successfully render to objects in the scene, but when I try to render to the cegui window, the render surface just turns white.
I'm using the following code :
Code: Select all
CEGUI::Texture *Ctex = (CEGUI::Texture*)m_TextureTarget;
CEGUI::ImagesetManager::getSingletonPtr()->create("Test_Movie",*Ctex);
CEGUI::ImagesetManager::getSingletonPtr()->get("Test_Movie").defineImage("newImg",CEGUI::Point(1.f,1.f),CEGUI::Size(20.f,20.f),CEGUI::Point(1.f,1.f));
CEGUI::Window* actionAreaIntroImage = _gui->GetWidget("DemoWindow");
actionAreaIntroImage->setProperty("Image","set:Test_Movie image:newImg");
Any ideas as to why this wouldn't work? I've tried the Delta3d forums and they pointed me here.
Thanks,
Alex
PS I think the trouble lies in my casting osg::texture2D as a CEGUI::Texture, but I'm not sure how to get around it?