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>
// ============================================================================================ CONSTRUCTORS \/
// ========================================================================================================= \/
public:
StateControl(
const ConstSharedShaderProgramObject& _shaderProgramObject,
const ConstSharedVertexBufferObject& _vertexBufferObject,
const ConstSharedViewport& _viewport)
: mpVertexBufferObject(_vertexBufferObject),
mpShaderProgramObject(_shaderProgramObject),
mpFrameBufferObject(),
mpViewport(_viewport)
{}
StateControl(
const ConstSharedVertexBufferObject& _vertexBufferObject,
const ConstSharedFrameBufferObject& _frameBufferObject,
const ConstSharedShaderProgramObject& _shaderProgramObject,
const ConstSharedFrameBufferObject& _frameBufferObject,
const ConstSharedViewport& _viewport)
: mpVertexBufferObject(_vertexBufferObject),
mpFrameBufferObject(_frameBufferObject),
mpShaderProgramObject(_shaderProgramObject),
mpFrameBufferObject(_frameBufferObject),
mpViewport(_viewport)
{}
virtual ~StateControl(void) {}
......@@ -58,8 +68,8 @@ public:
// =================================================================================================== \/
protected:
ConstSharedVertexBufferObject mpVertexBufferObject;
ConstSharedFrameBufferObject mpFrameBufferObject;
ConstSharedShaderProgramObject mpShaderProgramObject;
ConstSharedFrameBufferObject mpFrameBufferObject;
ConstSharedViewport mpViewport;
};
......
......@@ -55,12 +55,26 @@ private:
// ========================================================================================================= \/
public:
State(ConstSharedVertexBufferObject _vertexBufferObject,
ConstSharedFrameBufferObject _frameBufferObject,
ConstSharedShaderProgramObject _shaderProgram,
ConstSharedFrameBufferObject _frameBufferObject,
ConstSharedViewport _viewport)
: mpVertexBufferObject(_vertexBufferObject),
mpShaderProgramObject(_shaderProgram),
mpFrameBufferObject(_frameBufferObject),
mpViewport(_viewport),
mAttributeMappings(),
mFragmentDataMappings(),
mpBuffers(NULL)
{
updateMappings();
}
State(ConstSharedVertexBufferObject _vertexBufferObject,
ConstSharedShaderProgramObject _shaderProgram,
ConstSharedViewport _viewport)
: mpVertexBufferObject(_vertexBufferObject),
mpShaderProgramObject(_shaderProgram),
mpFrameBufferObject(),
mpViewport(_viewport),
mAttributeMappings(),
mFragmentDataMappings(),
......@@ -122,8 +136,8 @@ public:
// =================================================================================================== \/
protected:
ConstSharedVertexBufferObject mpVertexBufferObject;
ConstSharedFrameBufferObject mpFrameBufferObject;
ConstSharedShaderProgramObject mpShaderProgramObject;
ConstSharedFrameBufferObject mpFrameBufferObject;
ConstSharedViewport mpViewport;
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