Changeset 7
- Timestamp:
- 10/04/07 16:38:15
- Files:
-
- trunk/Makefile (modified) (6 diffs)
- trunk/src/present3D.cpp (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/Makefile
r1 r7 1 1 # CMAKE generated file: DO NOT EDIT! 2 # Generated by "Unix Makefiles" Generator, CMake Version 2. 52 # Generated by "Unix Makefiles" Generator, CMake Version 2.4 3 3 4 4 # Default target executed when no arguments are given to make. … … 26 26 27 27 # The CMake executable. 28 CMAKE_COMMAND = /usr/ local/bin/cmake28 CMAKE_COMMAND = /usr/bin/cmake 29 29 30 30 # The command to remove a file. 31 RM = /usr/ local/bin/cmake -E remove -f31 RM = /usr/bin/cmake -E remove -f 32 32 33 33 # The program to use to edit the cache. 34 CMAKE_EDIT_COMMAND = /usr/ local/bin/ccmake34 CMAKE_EDIT_COMMAND = /usr/bin/ccmake 35 35 36 36 # The top-level source directory on which CMake was run. … … 49 49 edit_cache: 50 50 @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake cache editor..." 51 /usr/ local/bin/ccmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)51 /usr/bin/ccmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) 52 52 53 53 # Special rule for the target edit_cache … … 57 57 install: preinstall 58 58 @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." 59 /usr/ local/bin/cmake -P cmake_install.cmake59 /usr/bin/cmake -P cmake_install.cmake 60 60 61 61 # Special rule for the target install 62 62 install/fast: preinstall/fast 63 63 @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." 64 /usr/ local/bin/cmake -P cmake_install.cmake64 /usr/bin/cmake -P cmake_install.cmake 65 65 66 66 # Special rule for the target install/local 67 67 install/local: preinstall 68 68 @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..." 69 /usr/ local/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake69 /usr/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake 70 70 71 71 # Special rule for the target install/local 72 72 install/local/fast: install/local 73 74 # Special rule for the target install/strip75 install/strip: preinstall76 @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..."77 /usr/local/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake78 79 # Special rule for the target install/strip80 install/strip/fast: install/strip81 73 82 74 # Special rule for the target list_install_components … … 90 82 rebuild_cache: 91 83 @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..." 92 /usr/ local/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)84 /usr/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) 93 85 94 86 # Special rule for the target rebuild_cache … … 151 143 @echo "... install" 152 144 @echo "... install/local" 153 @echo "... install/strip"154 145 @echo "... list_install_components" 155 146 @echo "... rebuild_cache" trunk/src/present3D.cpp
r6 r7 56 56 void setViewer(osgViewer::Viewer& viewer, float width, float height, float distance) 57 57 { 58 unsigned int numCameras = viewer.getNumSlaves();59 if (numCameras==2)60 {61 // hardwire dual screen horizontal split screen up.62 63 osg::DisplaySettings* ds = osg::DisplaySettings::instance();64 if (ds->getStereoMode()==osg::DisplaySettings::HORIZONTAL_SPLIT && ds->getStereo())65 {66 osg::Matrix identity;67 68 osg::ref_ptr<osg::DisplaySettings> ds_left = new osg::DisplaySettings(*ds);69 ds_left->setStereoMode(osg::DisplaySettings::LEFT_EYE);70 71 osg::ref_ptr<osg::DisplaySettings> ds_right = new osg::DisplaySettings(*ds);72 ds_right->setStereoMode(osg::DisplaySettings::RIGHT_EYE);73 74 unsigned int leftCameraNum = (ds->getSplitStereoHorizontalEyeMapping()==osg::DisplaySettings::LEFT_EYE_LEFT_VIEWPORT) ? 0 : 1;75 unsigned int rightCameraNum = (ds->getSplitStereoHorizontalEyeMapping()==osg::DisplaySettings::LEFT_EYE_LEFT_VIEWPORT) ? 1 : 0;76 77 viewer.getSlave(leftCameraNum)._projectionOffset.makeIdentity();78 viewer.getSlave(leftCameraNum)._viewOffset.makeIdentity();79 // left to do.80 //osgUtil::SceneView* sv_left = viewer.getSceneHandlerList()[leftCameraNum]->getSceneView();81 //sv_left->setDisplaySettings(ds_left);82 83 viewer.getSlave(rightCameraNum)._projectionOffset.makeIdentity();84 viewer.getSlave(rightCameraNum)._viewOffset.makeIdentity();85 // left to do.86 //osgUtil::SceneView* sv_right = viewer.getSceneHandlerList()[rightCameraNum]->getSceneView();87 //sv_right->setDisplaySettings(ds_right);88 }89 }90 91 58 double vfov = osg::RadiansToDegrees(atan2(height/2.0f,distance)*2.0); 92 59 double hfov = osg::RadiansToDegrees(atan2(width/2.0f,distance)*2.0); … … 95 62 viewer.getCamera()->setCullMask(0xffffffff); 96 63 viewer.getCamera()->setCullMaskLeft(0x00000001); 97 viewer.getCamera()->setCullMaskRight(0x00000002); 98 64 viewer.getCamera()->setCullMaskRight(0x00000002); 99 65 } 100 66 … … 231 197 #endif 232 198 199 bool doSetViewer = true; 200 std::string configurationFile; 201 202 // check env vars for configuration file 203 const char* str = getenv("PRESENT3D_CONFIG_FILE"); 204 if (!str) str = getenv("OSG_CONFIG_FILE"); 205 if (str) configurationFile = str; 206 207 // check command line parameters for configuration file. 208 while (arguments.read("-c",configurationFile)) {} 209 233 210 // construct the viewer. 234 211 osgViewer::Viewer viewer(arguments); 212 213 if (!configurationFile.empty()) 214 { 215 viewer.readConfiguration(configurationFile); 216 doSetViewer = false; 217 } 218 235 219 236 220 // set up the camera manipulators. … … 274 258 275 259 276 bool doSetViewer = true;277 260 while (arguments.read("--set-viewer")) { doSetViewer = true; } 278 261 … … 375 358 ApplicationType applicationType = VIEWER; 376 359 377 char*str = getenv("PRESENT3D_TYPE");360 str = getenv("PRESENT3D_TYPE"); 378 361 if (str) 379 362 {
