nickG
09-06-2012 13:15:21
Hi
I'm successful loading video,but it not working.
Please say me,what is problem
And test(creating mesh and setting material)
I'm successful loading video,but it not working.
Please say me,what is problem
class TheoraVideoClip* vid;
class TheoraVideoManager* tMgr;
Ogre::ManualObject* model = engine.mGSceneMgr->createManualObject("video_quad");
model->begin("video_material");
model->position(1,1,0); model->textureCoord(1,1);
model->position(1,1,0); model->textureCoord(1,0);
model->position(1,1,0); model->textureCoord(0,0);
model->position(1,1,0); model->textureCoord(0,0);
model->position(1,1,0); model->textureCoord(1,1);
model->position(1,1,0); model->textureCoord(0,1);
model->end();
// make the model 2D
model->setUseIdentityProjection(true);
model->setUseIdentityView(true);
// and atach it to the root node
Ogre::SceneNode* node = engine.mGSceneMgr->getRootSceneNode()->createChildSceneNode();
node->attachObject(model);
Ogre::OgreVideoManager* mgr=NULL;
mgr=(Ogre::OgreVideoManager*) Ogre::OgreVideoManager::getSingletonPtr();
mgr->setInputName("konqi.ogg");
mgr->createDefinedTexture("video_material");
tMgr = TheoraVideoManager::getSingletonPtr();
vid = tMgr->getVideoClipByName("konqi.ogg");
vid->setAutoRestart(1);
And test(creating mesh and setting material)
ActorMesh* mesh=new ActorMesh("knot.mesh","video_material");