Changeset 10664

Show
Ignore:
Timestamp:
10/21/09 23:45:55 (4 years ago)
Author:
paulmartz
Message:

Add CMake-controllable option to avoid doing a glBlitFramebuffer into depth to resolve multisampling. This works arouns a hang on OS X with NVIDIA GeForce? 8800 and v1.5.49 drivers.

Location:
OpenSceneGraph/branches/OpenSceneGraph-2.8.2/src/osgUtil
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/branches/OpenSceneGraph-2.8.2/src/osgUtil/CMakeLists.txt

    r8211 r10664  
    66    ADD_DEFINITIONS(-DOSG_LIBRARY_STATIC) 
    77ENDIF(DYNAMIC_OPENSCENEGRAPH) 
     8 
     9 
     10# 
     11# MSFBO resolve blit to depth buffer control. 
     12# 
     13OPTION(OSG_MULTISAMPLE_FBO_RESOLVE_IGNORES_DEPTH "Set to ON to ignore depth when resolving multisampled FBO rendering. This is a workaround for a crash on OS X with NVIDIA driver 1.5.49." OFF) 
     14IF(OSG_MULTISAMPLE_FBO_RESOLVE_IGNORES_DEPTH) 
     15    ADD_DEFINITIONS(-DOSG_MULTISAMPLE_FBO_RESOLVE_IGNORES_DEPTH) 
     16ENDIF(OSG_MULTISAMPLE_FBO_RESOLVE_IGNORES_DEPTH) 
     17 
    818 
    919SET(LIB_NAME osgUtil) 
  • OpenSceneGraph/branches/OpenSceneGraph-2.8.2/src/osgUtil/RenderStage.cpp

    r10277 r10664  
    880880            { 
    881881            case Camera::DEPTH_BUFFER: 
     882#ifndef OSG_MULTISAMPLE_FBO_RESOLVE_IGNORES_DEPTH 
     883                // This #define is a workaround for an OS X NVIDIA driver bug 
     884                // confirmed on GeForce 8800 with driver v1.5.49. 
     885                // If the glBlitFramebuffer mask includes depth, the OS X desktop 
     886                // will hang. The #define is controlled from CMake and should be 
     887                // set to ON to enable the workaround and avoid blitting depth. 
    882888                blitMask |= GL_DEPTH_BUFFER_BIT; 
     889#endif 
    883890                break; 
    884891            case Camera::STENCIL_BUFFER: