Changeset 9386 for OpenSceneGraph/trunk/examples/osgmultiplerendertargets/osgmultiplerendertargets.cpp
- Timestamp:
- 12/17/08 18:23:17 (4 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/examples/osgmultiplerendertargets/osgmultiplerendertargets.cpp
r8883 r9386 37 37 38 38 // 39 // Below is relatively straight forward example of us e OpenGL multiple render targetsextension39 // Below is relatively straight forward example of using the OpenGL multiple render targets (MRT) extension 40 40 // to FrameBufferObjects/GLSL shaders. 41 41 // … … 214 214 if (useHDR) 215 215 { 216 textureRect[i]->setInternalFormat(GL_FLOAT_RGBA32_NV); 217 //textureRect[i]->setInternalFormat(GL_FLOAT_RGBA16_NV); 216 // Default HDR format 217 textureRect[i]->setInternalFormat(GL_RGBA32F_ARB); 218 219 // GL_FLOAT_RGBA32_NV might be supported on pre 8-series GPUs 220 //textureRect[i]->setInternalFormat(GL_FLOAT_RGBA32_NV); 221 222 // GL_RGBA16F_ARB can be used with this example, 223 // but modify e-12 and e12 in the shaders accordingly 224 //textureRect[i]->setInternalFormat(GL_RGBA16F_ARB); 225 218 226 textureRect[i]->setSourceFormat(GL_RGBA); 219 227 textureRect[i]->setSourceType(GL_FLOAT); … … 380 388 381 389 // set up the usage document, in case we need to print out how to use this program. 382 arguments.getApplicationUsage()->setDescription(arguments.getApplicationName() + " demonstrates the use of multiple render targets (MRT) using frame buffer objects. A render to texturecamera is used to render to four textures using a single shader. The four textures are then combined to texture the viewed geometry.");390 arguments.getApplicationUsage()->setDescription(arguments.getApplicationName() + " demonstrates the use of multiple render targets (MRT) with frame buffer objects (FBOs). A render to texture (RTT) camera is used to render to four textures using a single shader. The four textures are then combined to texture the viewed geometry."); 383 391 arguments.getApplicationUsage()->setCommandLineUsage(arguments.getApplicationName()+" [options] ..."); 384 392 arguments.getApplicationUsage()->addCommandLineOption("-h or --help","Display this information."); 385 393 arguments.getApplicationUsage()->addCommandLineOption("--width","Set the width of the render to texture."); 386 394 arguments.getApplicationUsage()->addCommandLineOption("--height","Set the height of the render to texture."); 387 arguments.getApplicationUsage()->addCommandLineOption("--image","Render one of the targets to an image, then apply a post draw callback to modify it , and use this image to update a texture.");388 arguments.getApplicationUsage()->addCommandLineOption("--hdr","Use high dynamic range . Create floating point textures to render to.");395 arguments.getApplicationUsage()->addCommandLineOption("--image","Render one of the targets to an image, then apply a post draw callback to modify it and use this image to update the final texture. Print some texture values when using HDR."); 396 arguments.getApplicationUsage()->addCommandLineOption("--hdr","Use high dynamic range (HDR). Create floating point textures to render to."); 389 397 390 398 // construct the viewer.
