|
|
我查阅了TheoraVideoPlugin,下载了最新的libogg-1.1.3 libvorbis-1.2.0 libtheora-1.0 ptypes-2.1.1和ogrevideo在ogreSDK1.4.8按照说明编译生成了Plugin_TheoraVideoSystem.lib和Plugin_TheoraVideoSystem.dll,并且在Plugins.cfg添加了Plugin=Plugin_TheoraVideoSystem路径,在resources.cfg里添加FileSystem=../../media/oggs路径,随后在media创建了oggs文件夹,将clip.ogg资源放了进去,也将SimpleVideo.material放进相关的文件夹,编译TheoraVideoPlugin里CEGUISample例子,运行到frameStarted()里
TheoraVideoManager* c = (TheoraVideoManager*) ExternalTextureSourceManager::getSingleton().getExternalTextureSource("ogg_video");
TheoraVideoClip* clip=c->getMaterialNameClip("SimpleVideo");
if( !clip )
OGRE_EXCEPT( Exception::ERR_ITEM_NOT_FOUND, "Clip not found", "clip" );
clip->registerMessageHandler(&mMovieListener);
弹出没有找到Clip.ogg资源,日志报告
OGRE EXCEPTION(6:FileNotFoundException): Cannot locate resource clip.og in resource group General or any other group. in ResourceGroupManager: penResource at e:\projects\ogrecvs\branches\eihort_clean_vc8\ogre\ogremain\src\ogreresourcegroupmanager.cpp (line 604)
TheoraVideoPlugin: error creating texture
但是我添加了相关路径的啊!只不过用getSingleton().getExternalTextureSource("ogg_video")获取1个新的纹理资源,为什么在=../../media/oggs路径就加载不了clip.ogg了啊?谁能告诉这是为什么??
播放ogg的材质:
material SimpleVideo
{
technique
{
pass
{
cull_software none
cull_hardware none
lighting off
texture_unit
{
texture_source ogg_video
{
filename clip.ogg
precache 16
// output grey
play_mode play
}
}
}
}
} |
|