I need to play a video in the 3d game that I'm developing. What I have is a .mesh with a material attached to it. I tried to load that mesh into a RenderBox, but I need to update it every frame. It didn't wanna run, the game crashed and didn't want to load the video in.
Is there any other way to play a video through MyGUI widgets? If not, it would be very useful to add such functionality to the RenderBox widget
I was thinking to develop this kind of widget on my own, and release it to the MyGUI community, by the moment i don't have time, but yeah, this is a GREAT functionality ...
I was thinking to add this widget with an apart plugin for the theora codec, and the possibility to add more codecs through a plugin fashioned way ..
Anyways, I can't help you now, I'm on my best friends house, so, this Isn't my computer
Cheers, Alex =D
Aw, such a pity!
Thanks anyway. Yeah, if you could find time and develop a video-playing widget, it would be absolutely awesome. I'm sure someone will be in a need of that in the future...
You can set viewport to RenderBox widget. So everything that you can render in ogre you can show in it.
@Altren : At expenses of this :
mPointer = mMouseRotation ? mPointerKeeper : "";
// Ã±Ã®Ã§Ã¤Ã Ã¥Ã¬ ÃÃ®Ã¢Ã»Ã© Ã±Ã¶Ã¥Ã Ã¬Ã¥ÃÃ¥Ã¤Ã¦Ã¥Ã°
mScene = Ogre::Root::getSingleton().createSceneManager(Ogre::ST_GENERIC, utility::toString(this, "_SceneManagerRenderBox"));
// Ã±Ã®Ã§Ã¤Ã Ã¥Ã¬ ÃÃ®Ã¤ Ãª ÃªÃ®Ã²Ã®Ã°Ã³Ã¬Ã³ Ã¡Ã³Ã¤Ã¥Ã¬ Ã¢Ã±Ã¿ÃªÃ³Ã¾ Ã¤Ã°Ã¿ÃÃ¼ Ã Ã²Ã Ã·Ã¨Ã²Ã¼
mNode = mScene->getRootSceneNode()->createChildSceneNode();
mScene->setAmbientLight(Ogre::ColourValue(0.8, 0.8, 0.8));
// Ã£Ã«Ã Ã¢ÃÃ»Ã© Ã¨Ã±Ã²Ã®Ã·ÃÃ¨Ãª Ã±Ã¢Ã¥Ã²Ã
// ÃªÃ®Ã°Ã°Ã¥ÃªÃ¶Ã¨Ã¿ Ã¯Ã®Ã¤ Ã«Ã¥Ã¢Ã®Ã±Ã²Ã®Ã°Ã®ÃÃ¾Ã¾ Ã±Ã¨Ã±Ã²Ã¥Ã¬Ã³ ÃªÃ®Ã®Ã°Ã¤Ã¨ÃÃ Ã² Ã± Ã®Ã±Ã¼Ã¾ Z ÃÃ Ã¯Ã°Ã Ã¢Ã«Ã¥ÃÃÃ³Ã¾ Ã¢Ã¢Ã¥Ã°Ãµ
Ogre::Vector3 dir(10, 10, -10);
Ogre::Vector3 dir(-1, -1, 0.5);
Ogre::Light * light = mScene->createLight(utility::toString(this, "_LightRenderBox"));
std::string texture(utility::toString(this, "_TextureRenderBox"));
Ogre::TextureManager & manager = Ogre::TextureManager::getSingleton();
mTexture = manager.createManual(texture, Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME,
Ogre::TEX_TYPE_2D, TEXTURE_SIZE, TEXTURE_SIZE, 0, Ogre::PF_B8G8R8A8, Ogre::TU_RENDERTARGET)
std::string camera(utility::toString(this, "_CameraRenderBox"));
mRttCam = mScene->createCamera(camera);
mCamNode = mScene->getRootSceneNode()->createChildSceneNode(camera);
if (getHeight() == 0) mRttCam->setAspectRatio(1);
Ogre::Viewport *v = mTexture->addViewport( mRttCam );
v->setClearEveryFrame( true );
a video stream doesn't require such a thing ...
oh, besides, you have to fight with theora and other codecs, of course ....
If I could have some free time ... T_T