Changeset 145 for osgVisual/src/distortion
- Timestamp:
- Nov 1, 2010, 7:23:10 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
osgVisual/src/distortion/visual_distortion.cpp
r88 r145 19 19 using namespace osgVisual; 20 20 21 visual_distortion::visual_distortion(osgViewer::Viewer* viewer_, osg::ArgumentParser& arguments_ ) : viewer(viewer_), arguments(arguments_)21 visual_distortion::visual_distortion(osgViewer::Viewer* viewer_, osg::ArgumentParser& arguments_, std::string configFileName) : viewer(viewer_), arguments(arguments_) 22 22 { 23 23 OSG_NOTIFY (osg::ALWAYS ) << "visual_distortion instantiated." << std::endl; … … 41 41 bool visual_distortion::processCommandlineparameters() 42 42 { 43 // Distortion files. 43 44 arguments.getApplicationUsage()->addCommandLineOption("-C <channelname>","Setup the channel name, this is the preset for blendmap, distortionmap and camera configuration file."); 45 arguments.getApplicationUsage()->addCommandLineOption("--distortionmap","Set a distortion map file name."); 46 arguments.getApplicationUsage()->addCommandLineOption("--blendmap","Set a blend map file name."); 47 48 // Render implementation. 49 arguments.getApplicationUsage()->addCommandLineOption("--shaderDistortion","Use OpenGL shader for distortion and blending."); 44 50 arguments.getApplicationUsage()->addCommandLineOption("--fbo","Use Frame Buffer Object for render to texture, where supported."); 45 51 arguments.getApplicationUsage()->addCommandLineOption("--fb","Use FrameBuffer for render to texture."); 46 52 arguments.getApplicationUsage()->addCommandLineOption("--pbuffer","Use Pixel Buffer for render to texture, where supported."); 47 53 arguments.getApplicationUsage()->addCommandLineOption("--window","Use a seperate Window for render to texture."); 48 arguments.getApplicationUsage()->addCommandLineOption("--width","Set the width of the render to texture."); 49 arguments.getApplicationUsage()->addCommandLineOption("--height","Set the height of the render to texture."); 54 55 // Texture 56 arguments.getApplicationUsage()->addCommandLineOption("--width","Set the width of the render to texture."); // used for all render implementations 57 arguments.getApplicationUsage()->addCommandLineOption("--height","Set the height of the render to texture."); // used for all render implementations 58 59 // Texture Rectangle? 50 60 arguments.getApplicationUsage()->addCommandLineOption("--texture-rectangle","Use osg::TextureRectangle for doing the render to texure to."); 51 arguments.getApplicationUsage()->addCommandLineOption("--distortionmap","Set a distortion map file name."); 52 arguments.getApplicationUsage()->addCommandLineOption("--blendmap","Set a blend map file name."); 53 arguments.getApplicationUsage()->addCommandLineOption("--shaderDistortion","Use OpenGL shader for distortion and blending."); 61 62 // HDR? 63 arguments.getApplicationUsage()->addCommandLineOption("--hdr","Render distortion as HDR."); 64 54 65 arguments.getApplicationUsage()->addKeyboardMouseBinding("d", "Toggle Distortion."); 55 66 … … 162 173 { 163 174 // Copy Main Camera's matrixes to the PRE_RENDER Camera. 164 std::cout << "distortion updatecallback" << std::endl;175 //std::cout << "distortion updatecallback" << std::endl; 165 176 sceneCamera->setViewMatrix( viewer->getCamera()->getViewMatrix() ); 166 177 sceneCamera->setProjectionMatrix( viewer->getCamera()->getProjectionMatrix() ); … … 345 356 camera->setReferenceFrame(osg::Transform::ABSOLUTE_RF); 346 357 camera->setViewMatrix(osg::Matrix::identity()); 347 // camera->setProjectionMatrixAsOrtho2D(0,viewer->getCamera()->getViewport()->width(),0,viewer->getCamera()->getViewport()->height());358 //sceneCamera->setProjectionMatrixAsOrtho2D(0,viewer->getCamera()->getViewport()->width(),0,viewer->getCamera()->getViewport()->height()); 348 359 camera->setProjectionMatrixAsOrtho2D(0,1280,0,1024); 360 /** \todo: use screen size dynamically */ 349 361 350 362 // set the camera to render before the main camera.
Note: See TracChangeset
for help on using the changeset viewer.