Show
Ignore:
Timestamp:
10/23/09 15:19:57 (5 years ago)
Author:
robert
Message:

Added CMake support for specifying what OpenGL target and features that the OpenSceneGraph build should use.

Added use of the new Cmake generated #define's for optionally compiling parts of the OpenSceneGraph's OpenGL support for the various OpenGL targets

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/src/osg/GLObjects.cpp

    r10601 r10686  
    2424void osg::flushDeletedGLObjects(unsigned int contextID, double currentTime, double& availableTime) 
    2525{ 
     26#ifdef OSG_GL_DISPLAYLISTS_AVAILABLE 
     27    osg::Drawable::flushDeletedDisplayLists(contextID,availableTime); 
     28#endif 
     29 
     30#ifdef OSG_GL_FIXED_FUNCTION_AVAILABLE 
     31    osg::FragmentProgram::flushDeletedFragmentProgramObjects(contextID,currentTime,availableTime); 
     32    osg::VertexProgram::flushDeletedVertexProgramObjects(contextID,currentTime,availableTime); 
     33#endif 
     34 
    2635    osg::GLBufferObject::flushDeletedBufferObjects(contextID,currentTime,availableTime); 
    27     osg::Drawable::flushDeletedDisplayLists(contextID,availableTime); 
    28     osg::FragmentProgram::flushDeletedFragmentProgramObjects(contextID,currentTime,availableTime); 
    2936    osg::FrameBufferObject::flushDeletedFrameBufferObjects(contextID,currentTime,availableTime); 
    3037    osg::Program::flushDeletedGlPrograms(contextID,currentTime,availableTime); 
     
    3239    osg::Shader::flushDeletedGlShaders(contextID,currentTime,availableTime); 
    3340    osg::Texture::flushDeletedTextureObjects(contextID,currentTime,availableTime); 
    34     osg::VertexProgram::flushDeletedVertexProgramObjects(contextID,currentTime,availableTime); 
    3541    osg::OcclusionQueryNode::flushDeletedQueryObjects(contextID,currentTime,availableTime); 
    3642} 
     
    4046    double currentTime = DBL_MAX; 
    4147    double availableTime = DBL_MAX; 
     48 
     49#ifdef OSG_GL_DISPLAYLISTS_AVAILABLE 
     50    osg::Drawable::flushAllDeletedDisplayLists(contextID); 
     51#endif 
     52 
     53#ifdef OSG_GL_FIXED_FUNCTION_AVAILABLE 
     54    osg::FragmentProgram::flushDeletedFragmentProgramObjects(contextID,currentTime,availableTime); 
     55    osg::VertexProgram::flushDeletedVertexProgramObjects(contextID,currentTime,availableTime); 
     56#endif 
     57 
    4258    osg::GLBufferObject::flushDeletedBufferObjects(contextID,currentTime,availableTime); 
    43     osg::Drawable::flushAllDeletedDisplayLists(contextID); 
    44     osg::FragmentProgram::flushDeletedFragmentProgramObjects(contextID,currentTime,availableTime); 
    4559    osg::FrameBufferObject::flushDeletedFrameBufferObjects(contextID,currentTime,availableTime); 
    4660    osg::Program::flushDeletedGlPrograms(contextID,currentTime,availableTime); 
     
    4862    osg::Shader::flushDeletedGlShaders(contextID,currentTime,availableTime); 
    4963    osg::Texture::flushAllDeletedTextureObjects(contextID); 
    50     osg::VertexProgram::flushDeletedVertexProgramObjects(contextID,currentTime,availableTime); 
    5164    osg::OcclusionQueryNode::flushDeletedQueryObjects(contextID,currentTime,availableTime); 
    5265} 
     
    5467void osg::discardAllDeletedGLObjects(unsigned int contextID) 
    5568{ 
     69#ifdef OSG_GL_DISPLAYLISTS_AVAILABLE 
     70    osg::Drawable::discardAllDeletedDisplayLists(contextID); 
     71#endif 
     72 
     73#ifdef OSG_GL_FIXED_FUNCTION_AVAILABLE 
     74    osg::FragmentProgram::discardDeletedFragmentProgramObjects(contextID); 
     75    osg::VertexProgram::discardDeletedVertexProgramObjects(contextID); 
     76#endif 
     77 
    5678    osg::GLBufferObject::discardAllDeletedBufferObjects(contextID); 
    57     osg::Drawable::discardAllDeletedDisplayLists(contextID); 
    58     osg::FragmentProgram::discardDeletedFragmentProgramObjects(contextID); 
    5979    osg::FrameBufferObject::discardDeletedFrameBufferObjects(contextID); 
    6080    osg::Program::discardDeletedGlPrograms(contextID); 
     
    6282    osg::Shader::discardDeletedGlShaders(contextID); 
    6383    osg::Texture::discardAllDeletedTextureObjects(contextID); 
    64     osg::VertexProgram::discardDeletedVertexProgramObjects(contextID); 
    6584    osg::OcclusionQueryNode::discardDeletedQueryObjects(contextID); 
    6685}