diff --git a/include/osg/State b/include/osg/State index f80968425..efa79bb9f 100644 --- a/include/osg/State +++ b/include/osg/State @@ -1508,54 +1508,7 @@ class OSG_EXPORT State : public Referenced, public Observer /** called by the GraphicsContext just before GraphicsContext::swapBuffersImplementation().*/ virtual void frameCompleted(); - protected: - virtual ~State(); - - GraphicsContext* _graphicsContext; - unsigned int _contextID; - - bool _shaderCompositionEnabled; - bool _shaderCompositionDirty; - osg::ref_ptr _shaderComposer; - osg::Program* _currentShaderCompositionProgram; - StateSet::UniformList _currentShaderCompositionUniformList; - - ref_ptr _frameStamp; - - ref_ptr _identity; - ref_ptr _initialViewMatrix; - ref_ptr _projection; - ref_ptr _modelView; - ref_ptr _modelViewCache; - - bool _useModelViewAndProjectionUniforms; - ref_ptr _modelViewMatrixUniform; - ref_ptr _projectionMatrixUniform; - ref_ptr _modelViewProjectionMatrixUniform; - ref_ptr _normalMatrixUniform; - - Matrix _initialInverseViewMatrix; - - ref_ptr _displaySettings; - - bool* _abortRenderingPtr; - CheckForGLErrors _checkGLErrors; - - - bool _useVertexAttributeAliasing; - VertexAttribAlias _vertexAlias; - VertexAttribAlias _normalAlias; - VertexAttribAlias _colorAlias; - VertexAttribAlias _secondaryColorAlias; - VertexAttribAlias _fogCoordAlias; - VertexAttribAliasList _texCoordAliasList; - - Program::AttribBindingList _attributeBindingList; - - void setUpVertexAttribAlias(VertexAttribAlias& alias, GLuint location, const std::string glName, const std::string osgName, const std::string& declaration); - - public: struct ModeStack { typedef std::vector ValueVec; @@ -1611,8 +1564,70 @@ class OSG_EXPORT State : public Referenced, public Observer UniformVec uniformVec; }; + typedef std::map ModeMap; + typedef std::vector TextureModeMapList; + + typedef std::map AttributeMap; + typedef std::vector TextureAttributeMapList; + + typedef std::map UniformMap; + + typedef std::vector > MatrixStack; + + typedef std::set AppliedProgramObjectSet; + + inline const ModeMap& getModeMap() const {return _modeMap;}; + inline const AttributeMap& getAttributeMap() const {return _attributeMap;}; + inline const UniformMap& getUniformMap() const {return _uniformMap;}; + inline const TextureModeMapList& getTextureModeMapList() const {return _textureModeMapList;}; + inline const TextureAttributeMapList& getTextureAttributeMapList() const {return _textureAttributeMapList;}; protected: + + virtual ~State(); + + GraphicsContext* _graphicsContext; + unsigned int _contextID; + + bool _shaderCompositionEnabled; + bool _shaderCompositionDirty; + osg::ref_ptr _shaderComposer; + osg::Program* _currentShaderCompositionProgram; + StateSet::UniformList _currentShaderCompositionUniformList; + + ref_ptr _frameStamp; + + ref_ptr _identity; + ref_ptr _initialViewMatrix; + ref_ptr _projection; + ref_ptr _modelView; + ref_ptr _modelViewCache; + + bool _useModelViewAndProjectionUniforms; + ref_ptr _modelViewMatrixUniform; + ref_ptr _projectionMatrixUniform; + ref_ptr _modelViewProjectionMatrixUniform; + ref_ptr _normalMatrixUniform; + + Matrix _initialInverseViewMatrix; + + ref_ptr _displaySettings; + + bool* _abortRenderingPtr; + CheckForGLErrors _checkGLErrors; + + + bool _useVertexAttributeAliasing; + VertexAttribAlias _vertexAlias; + VertexAttribAlias _normalAlias; + VertexAttribAlias _colorAlias; + VertexAttribAlias _secondaryColorAlias; + VertexAttribAlias _fogCoordAlias; + VertexAttribAliasList _texCoordAliasList; + + Program::AttribBindingList _attributeBindingList; + + void setUpVertexAttribAlias(VertexAttribAlias& alias, GLuint location, const std::string glName, const std::string osgName, const std::string& declaration); /** Apply an OpenGL mode if required, passing in mode, enable flag and * appropriate mode stack. This is a wrapper around \c glEnable() and * \c glDisable(), that just actually calls these functions if the @@ -1766,26 +1781,6 @@ class OSG_EXPORT State : public Referenced, public Observer return false; } - public: - typedef std::map ModeMap; - typedef std::vector TextureModeMapList; - - typedef std::map AttributeMap; - typedef std::vector TextureAttributeMapList; - - typedef std::map UniformMap; - - typedef std::vector > MatrixStack; - - typedef std::set AppliedProgramObjectSet; - - inline const ModeMap& getModeMap() const {return _modeMap;}; - inline const AttributeMap& getAttributeMap() const {return _attributeMap;}; - inline const UniformMap& getUniformMap() const {return _uniformMap;}; - inline const TextureModeMapList& getTextureModeMapList() const {return _textureModeMapList;}; - inline const TextureAttributeMapList& getTextureAttributeMapList() const {return _textureAttributeMapList;}; - - protected: ModeMap _modeMap; AttributeMap _attributeMap; UniformMap _uniformMap;