alrite..now i've added this tid bit of code
TheoraVideoController* mVideoControl;
TheoraMovieClip* mClip;
Rectangle2D* rect;
mVideoControl = static_cast<TheoraVideoController*>
(Ogre::ExternalTextureSourceManager::getSingleton().getExternalTextureSource("ogg_video"));
if( !mVideoControl )
OGRE_EXCEPT(Exception::ERR_ITEM_NOT_FOUND,
"Error grabbing Plugin_TheoraVideoSystem. Added in plugins.cfg file?",
"MovieLogic::initialise");
mVideoControl->setInputName( "..\\Screens\\Screen1\\apple.ogg" );
mVideoControl->setPlayMode( TextureEffectPlay_ASAP );
mVideoControl->setTextureTecPassStateLevel( 0, 0, 0 );
// Grab Our material, then add a new texture unit
MaterialPtr material = MaterialManager::getSingleton().getByName("Examples/TheoraVideoPlayer/Play");
//Create the material the first time through this method
if( material.isNull() ){
material = MaterialManager::getSingleton().create("Examples/TheoraVideoPlayer/Play", "General");
}
material->getTechnique(0)->getPass(0)->createTextureUnitState();
mVideoControl->createDefinedTexture( "Examples/TheoraVideoPlayer/Play", "General" );
mClip = mVideoControl->getMaterialNameClip( "Examples/TheoraVideoPlayer/Play" );
if( mClip )
{
//mClip->setAudioDriver( pSoundClass->getAudioClip() );
//mClip->changePlayMode( TextureEffectPlay_ASAP );
}
if( !mClip )
//OGRE_EXCEPT( Exception::ERR_ITEM_NOT_FOUND, "Clip not found", "MovieLogic::playMovie" );
//******************************************************************************
// ADD VIDEO MATERIAL TO 2D RECTANGLE
// Create background rectangle covering the whole screen
rect = new Rectangle2D(true);
rect->setCorners(-1.0, 1.0, 1.0, -1.0);
rect->setMaterial("Examples/TheoraVideoPlayer/Play");
// Render the background before everything else
rect->setRenderQueueGroup(RENDER_QUEUE_BACKGROUND);
// Use infinite AAB to always stay visible
AxisAlignedBox aabInf;
aabInf.setInfinite();
rect->setBoundingBox(aabInf);
// Attach background to the scene
pCubeSceneNode->attachObject(rect);
//******************************************************************************
But I'm getting a runtime error.
It stops at the line :-
mVideoControl->createDefinedTexture( "Examples/TheoraVideoPlayer/Play", "General" );
Unhandled exception at 0x01d8d8c6 in Game_Debug.exe: 0xC0000005: Access violation reading location 0xcccccccc.
This was the last line of debug.
And I've checked my material file is fine, also the video is at the proper place.
Does this error relate to the VideoPlugin or my code?
What could be wrong?