|
楼主 |
发表于 2012-9-27 12:30:31
|
显示全部楼层
array 发表于 2012-9-27 09:27
您没有给命令行参数吧?如果是osgmovie的话,要给出播放的文件名啊
大哥 可找到你了 我看那书是你翻译的 在哪添加播放的文件名呢 我把代码贴上 大哥你有时间帮忙看下 谢谢啊osg::ArgumentParser arguments(&argc,argv);
// set up the usage document, in case we need to print out how to use this program.
//setApplicationName("d:\OpenSceneGraph\OpenSceneGraph-3.0.0\bin\osgmovied.exe");
arguments.getApplicationUsage()->setApplicationName(arguments.getApplicationName());
arguments.getApplicationUsage()->setDescription(arguments.getApplicationName()+" example demonstrates the use of ImageStream for rendering movies as textures.");
arguments.getApplicationUsage()->setCommandLineUsage(arguments.getApplicationName()+" [options] filename ...");
arguments.getApplicationUsage()->addCommandLineOption("-h or --help","Display this information");
arguments.getApplicationUsage()->addCommandLineOption("--texture2D","Use Texture2D rather than TextureRectangle.");
arguments.getApplicationUsage()->addCommandLineOption("--shader","Use shaders to post process the video.");
arguments.getApplicationUsage()->addCommandLineOption("--interactive","Use camera manipulator to allow movement around movie.");
arguments.getApplicationUsage()->addCommandLineOption("--flip","Flip the movie so top becomes bottom.");
#if defined(WIN32) || defined(__APPLE__)
arguments.getApplicationUsage()->addCommandLineOption("--devices","rint the Video input capability via QuickTime and exit.");
#endif
bool useTextureRectangle = true;
//着色器
bool useShader = false;
// construct the viewer.
osgViewer::Viewer viewer(arguments);
if (arguments.argc()<=1)
{
arguments.getApplicationUsage()->write(std::cout,osg::ApplicationUsage::COMMAND_LINE_OPTION);
return 1;
}
#if defined(WIN32) || defined(__APPLE__)
// if user requests devices video capability.
if (arguments.read("-devices") || arguments.read("--devices"))
{
//Force load QuickTime plugin, probe video capability, exit
osgDB::readImageFile(/*"8002.AVI"*/"devices.live");
return 1;
}
#endif
不能运行到readImageFile这里啊
|
|