- Timestamp:
- 12/10/07 18:30:18 (6 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/examples/osgprerender/osgprerender.cpp
r7006 r7648 44 44 #include <iostream> 45 45 46 // call back which cre tes a deformation field to oscilate the model.46 // call back which creates a deformation field to oscillate the model. 47 47 class MyGeometryCallback : 48 48 public osg::Drawable::UpdateCallback, … … 324 324 float zfar = 3.0f*bs.radius(); 325 325 326 // 2:1 aspect ratio as per flag geom try below.326 // 2:1 aspect ratio as per flag geometry below. 327 327 float proj_top = 0.25f*znear; 328 328 float proj_right = 0.5f*znear; … … 361 361 // Rather than attach the texture directly to illustrate the texture's ability to 362 362 // detect an image update and to subload the image onto the texture. You needn't 363 // do this when using an Image for copying to, as a sep erate camera->attach(..)364 // would suffice as well, but we'll do it the long way round here just for demonst ation363 // do this when using an Image for copying to, as a separate camera->attach(..) 364 // would suffice as well, but we'll do it the long way round here just for demonstration 365 365 // purposes (long way round meaning we'll need to copy image to main memory, then 366 366 // copy it back to the graphics card to the texture in one frame). 367 // The long way round allows us to man nually modify the copied image via the callback367 // The long way round allows us to manually modify the copied image via the callback 368 368 // and then let this modified image by reloaded back. 369 369 texture->setImage(0, image); … … 398 398 arguments.getApplicationUsage()->addCommandLineOption("--fb","Use FrameBuffer for render to texture."); 399 399 arguments.getApplicationUsage()->addCommandLineOption("--pbuffer","Use Pixel Buffer for render to texture, where supported."); 400 arguments.getApplicationUsage()->addCommandLineOption("--window","Use a sep erate Window for render to texture.");400 arguments.getApplicationUsage()->addCommandLineOption("--window","Use a separate Window for render to texture."); 401 401 arguments.getApplicationUsage()->addCommandLineOption("--width","Set the width of the render to texture."); 402 402 arguments.getApplicationUsage()->addCommandLineOption("--height","Set the height of the render to texture."); 403 403 arguments.getApplicationUsage()->addCommandLineOption("--image","Render to an image, then apply a post draw callback to it, and use this image to update a texture."); 404 arguments.getApplicationUsage()->addCommandLineOption("--texture-rectangle","Use osg::TextureRectangle for doing the render to tex ure to.");404 arguments.getApplicationUsage()->addCommandLineOption("--texture-rectangle","Use osg::TextureRectangle for doing the render to texture to."); 405 405 406 406 // construct the viewer.
