diff --git a/examples/osgfpdepth/osgfpdepth.cpp b/examples/osgfpdepth/osgfpdepth.cpp index 2c32adc39..1bf22b9c6 100644 --- a/examples/osgfpdepth/osgfpdepth.cpp +++ b/examples/osgfpdepth/osgfpdepth.cpp @@ -917,11 +917,10 @@ int main(int argc, char **argv) { // use an ArgumentParser object to manage the program arguments. ArgumentParser arguments(&argc,argv); - arguments.getApplicationUsage() - ->setDescription(arguments.getApplicationName() + arguments.getApplicationUsage()->setDescription(arguments.getApplicationName() + " demonstrates using a floating point depth buffer.\nThe user can invert the depth buffer range and choose among available multi-sample configurations."); - arguments.getApplicationUsage() - ->addCommandLineOption("--far ", "Set far plane value"); + arguments.getApplicationUsage()->setCommandLineUsage(arguments.getApplicationName()+" [options] filename ..."); + arguments.getApplicationUsage()->addCommandLineOption("--far ", "Set far plane value"); // if user request help write it out to cout. if (arguments.read("-h") || arguments.read("--help")) { @@ -948,6 +947,11 @@ int main(int argc, char **argv) const GraphicsContext::Traits* traits = gc->getTraits(); width = traits->width; height = traits->height; + if (arguments.argc()<=1) + { + arguments.getApplicationUsage()->write(std::cout,osg::ApplicationUsage::COMMAND_LINE_OPTION); + return 1; + } ref_ptr loadedModel = osgDB::readNodeFiles(arguments); if (!loadedModel) { cerr << "couldn't load " << argv[1] << "\n"; diff --git a/include/osg/FrameBufferObject b/include/osg/FrameBufferObject index cab0112fe..4843b78d2 100644 --- a/include/osg/FrameBufferObject +++ b/include/osg/FrameBufferObject @@ -118,6 +118,14 @@ #define GL_DEPTH_COMPONENT32 0x81A7 #endif +#ifndef GL_DEPTH_COMPONENT32F +#define GL_DEPTH_COMPONENT32F 0x8CAC +#endif + +#ifndef GL_DEPTH_COMPONENT32F_NV +#define GL_DEPTH_COMPONENT32F_NV 0x8DAB +#endif + #ifndef GL_EXT_packed_depth_stencil #define GL_EXT_packed_depth_stencil 1 #define GL_DEPTH_STENCIL_EXT 0x84F9