Commit cf1ec7d9 authored by Andreas Neu's avatar Andreas Neu

-Added the case that no FrameBufferObject is used by a State.

parent 13a23dc2
...@@ -21,14 +21,24 @@ class StateControl : public Resource::BasicCreateController<State> ...@@ -21,14 +21,24 @@ class StateControl : public Resource::BasicCreateController<State>
// ============================================================================================ CONSTRUCTORS \/ // ============================================================================================ CONSTRUCTORS \/
// ========================================================================================================= \/ // ========================================================================================================= \/
public: public:
StateControl(
const ConstSharedShaderProgramObject& _shaderProgramObject,
const ConstSharedVertexBufferObject& _vertexBufferObject,
const ConstSharedViewport& _viewport)
: mpVertexBufferObject(_vertexBufferObject),
mpShaderProgramObject(_shaderProgramObject),
mpFrameBufferObject(),
mpViewport(_viewport)
{}
StateControl( StateControl(
const ConstSharedVertexBufferObject& _vertexBufferObject, const ConstSharedVertexBufferObject& _vertexBufferObject,
const ConstSharedFrameBufferObject& _frameBufferObject,
const ConstSharedShaderProgramObject& _shaderProgramObject, const ConstSharedShaderProgramObject& _shaderProgramObject,
const ConstSharedFrameBufferObject& _frameBufferObject,
const ConstSharedViewport& _viewport) const ConstSharedViewport& _viewport)
: mpVertexBufferObject(_vertexBufferObject), : mpVertexBufferObject(_vertexBufferObject),
mpFrameBufferObject(_frameBufferObject),
mpShaderProgramObject(_shaderProgramObject), mpShaderProgramObject(_shaderProgramObject),
mpFrameBufferObject(_frameBufferObject),
mpViewport(_viewport) mpViewport(_viewport)
{} {}
virtual ~StateControl(void) {} virtual ~StateControl(void) {}
...@@ -58,8 +68,8 @@ public: ...@@ -58,8 +68,8 @@ public:
// =================================================================================================== \/ // =================================================================================================== \/
protected: protected:
ConstSharedVertexBufferObject mpVertexBufferObject; ConstSharedVertexBufferObject mpVertexBufferObject;
ConstSharedFrameBufferObject mpFrameBufferObject;
ConstSharedShaderProgramObject mpShaderProgramObject; ConstSharedShaderProgramObject mpShaderProgramObject;
ConstSharedFrameBufferObject mpFrameBufferObject;
ConstSharedViewport mpViewport; ConstSharedViewport mpViewport;
}; };
......
...@@ -55,12 +55,26 @@ private: ...@@ -55,12 +55,26 @@ private:
// ========================================================================================================= \/ // ========================================================================================================= \/
public: public:
State(ConstSharedVertexBufferObject _vertexBufferObject, State(ConstSharedVertexBufferObject _vertexBufferObject,
ConstSharedFrameBufferObject _frameBufferObject,
ConstSharedShaderProgramObject _shaderProgram, ConstSharedShaderProgramObject _shaderProgram,
ConstSharedFrameBufferObject _frameBufferObject,
ConstSharedViewport _viewport) ConstSharedViewport _viewport)
: mpVertexBufferObject(_vertexBufferObject), : mpVertexBufferObject(_vertexBufferObject),
mpShaderProgramObject(_shaderProgram),
mpFrameBufferObject(_frameBufferObject), mpFrameBufferObject(_frameBufferObject),
mpViewport(_viewport),
mAttributeMappings(),
mFragmentDataMappings(),
mpBuffers(NULL)
{
updateMappings();
}
State(ConstSharedVertexBufferObject _vertexBufferObject,
ConstSharedShaderProgramObject _shaderProgram,
ConstSharedViewport _viewport)
: mpVertexBufferObject(_vertexBufferObject),
mpShaderProgramObject(_shaderProgram), mpShaderProgramObject(_shaderProgram),
mpFrameBufferObject(),
mpViewport(_viewport), mpViewport(_viewport),
mAttributeMappings(), mAttributeMappings(),
mFragmentDataMappings(), mFragmentDataMappings(),
...@@ -122,8 +136,8 @@ public: ...@@ -122,8 +136,8 @@ public:
// =================================================================================================== \/ // =================================================================================================== \/
protected: protected:
ConstSharedVertexBufferObject mpVertexBufferObject; ConstSharedVertexBufferObject mpVertexBufferObject;
ConstSharedFrameBufferObject mpFrameBufferObject;
ConstSharedShaderProgramObject mpShaderProgramObject; ConstSharedShaderProgramObject mpShaderProgramObject;
ConstSharedFrameBufferObject mpFrameBufferObject;
ConstSharedViewport mpViewport; ConstSharedViewport mpViewport;
AttributeMappingVec mAttributeMappings; AttributeMappingVec mAttributeMappings;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment