Commits

Anonymous committed 843f5f8

OgreVideoCanvas::resetVideo()

Comments (0)

Files changed (4)

OgreVideoCanvas/include/OgreVideoCanvas.h

 
     void buildCanvas(SceneNode*);
     void nextFrame();
-    void pauseVideo();
+    void resetVideo();
     void setVideoTexture(OgreVideoTexture*);
     void unsetVideoTexture();
 

OgreVideoCanvas/src/OgreVideoCanvas.cpp

         mVideoTexture->nextFrame();
 }
 //------------------------------------------------------------------------------
+void OgreVideoCanvas::resetVideo()
+{
+    if (mVideoTexture)
+        mVideoTexture->resetVideo();
+}
+//------------------------------------------------------------------------------
 void OgreVideoCanvas::setVideoTexture(OgreVideoTexture *_videoTexture)
 {
     if (_videoTexture && _videoTexture != mVideoTexture)

OgreVideoCanvas/src/OgreVideoTexture.cpp

 void OgreVideoTexture::_destroyTexture()
 {
     //TODO
+    /*Ogre::MaterialManager::getSingleton().remove(mVideoTexture);
+    Ogre::MaterialManager::getSingleton().remove(mVideoMaterial);*/
 }
 //------------------------------------------------------------------------------
 void OgreVideoTexture::_initTexture(Ogre::TexturePtr _texture)

ogre-testscene/ogre-testscene.cpp

 		if(mKeyboard->isKeyDown(OIS::KC_ESCAPE))
 			return false;
 
+        if(mKeyboard->isKeyDown(OIS::KC_P))
+        {
+            mVideoCanvas->resetVideo();
+            mVideoCanvas2->resetVideo();
+        }
+
 		return true;
 
 	}