Show
Ignore:
Timestamp:
11/11/09 16:25:42 (5 years ago)
Author:
robert
Message:

Added glContexVersion, glContextFlags and glContextProfileMask members to osg::GraphicsContext::Traits to support GL3 graphics context creation.

Moved the handling of DisplaySettings? into Traits constructor.

Added support for s/getGLContextVersion(), s/getGLContextFlags() and s/getGLContextProfileMask() to osg::DisplaySettings?.

Added command line and env var support for setting the GLContextVersion, GLContextFlags and GLContextProfileMask to osg::DisplaySettings?.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/include/osg/DisplaySettings

    r10601 r10740  
    206206        void setMaxBufferObjectPoolSize(unsigned int size) { _maxBufferObjectPoolSize = size; } 
    207207        unsigned int getMaxBufferObjectPoolSize() const { return _maxBufferObjectPoolSize; } 
     208 
     209        /** Set the hint of which OpenGL version to attempt to create a graphics context for.*/ 
     210        void setGLContextVersion(const std::string& version) { _glContextVersion = version; } 
     211 
     212        /** Get the hint of which OpenGL version to attempt to create a graphics context for.*/ 
     213        const std::string getGLContextVersion() const { return _glContextVersion; } 
     214 
     215        /** Set the hint of the flags to use in when creating graphic contexts.*/ 
     216        void setGLContextFlags(unsigned int flags) { _glContextFlags = flags; } 
     217 
     218        /** Get the hint of the flags to use in when creating graphic contexts.*/ 
     219        unsigned int getGLContextFlags() const { return _glContextFlags; } 
     220         
     221        /** Set the hint of the profile mask to use in when creating graphic contexts.*/ 
     222        void setGLContextProfileMask(unsigned int mask) { _glContextProfileMask = mask; } 
     223 
     224        /** Get the hint of the profile mask to use in when creating graphic contexts.*/ 
     225        unsigned int getGLContextProfileMask() const { return _glContextProfileMask; } 
    208226 
    209227    protected: 
     
    250268        unsigned int                    _maxTexturePoolSize; 
    251269        unsigned int                    _maxBufferObjectPoolSize; 
     270         
     271        std::string                     _glContextVersion; 
     272        unsigned int                    _glContextFlags; 
     273        unsigned int                    _glContextProfileMask; 
    252274}; 
    253275