Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ACGL
acgl
Commits
ca9267e7
Commit
ca9267e7
authored
Aug 19, 2011
by
Andreas Neu
Browse files
Added Controller StateControl for the OpenGL Object State.
parent
3aff0add
Changes
1
Hide whitespace changes
Inline
Side-by-side
include/ACGL/OpenGL/Controller/StateControl.hh
0 → 100644
View file @
ca9267e7
////////////////////////////////////////////////////////////////////////////////
// Copyright (c) 2011, Computer Graphics Group RWTH Aachen University //
// All rights reserved. //
////////////////////////////////////////////////////////////////////////////////
#ifndef ACGL_OPENGL_CONTROLLER_STATECONTROL_HH
#define ACGL_OPENGL_CONTROLLER_STATECONTROL_HH
#include <ACGL/ACGL.hh>
#include <ACGL/Resource/BasicCreateController.hh>
#include <ACGL/OpenGL/Objects/State.hh>
#include <ACGL/OpenGL/GL.hh>
namespace
ACGL
{
namespace
OpenGL
{
class
StateeControl
:
public
Resource
::
BasicCreateController
<
Texture
>
{
// ========================================================================================================= \/
// ============================================================================================ CONSTRUCTORS \/
// ========================================================================================================= \/
public:
StateControl
(
void
)
:
mpVertexBuffer
(
NULL
),
mpFrameBuffer
(
NULL
),
mpShaderProgram
(
NULL
)
{}
virtual
~
StateControl
(
void
)
{}
// ==================================================================================================== \/
// ============================================================================================ METHODS \/
// ==================================================================================================== \/
public:
inline
StateControl
&
vertexBuffer
(
ConstSharedVertexBuffer
_vertexBuffer
)
{
mpVertexBuffer
=
_vertexBuffer
;
return
*
this
;
}
inline
StateControl
&
frameBuffer
(
ConstSharedFrameBuffer
_frameBuffer
)
{
mpFrameBuffer
=
_frameBuffer
;
return
*
this
;
}
inline
StateControl
&
shaderProgram
(
ConstSharedShaderProgram
_shaderProgram
)
{
mpShaderProgram
=
_shaderProgram
;
return
*
this
;
}
// ===================================================================================================== \/
// ============================================================================================ OVERRIDE \/
// ===================================================================================================== \/
public:
virtual
SharedState
create
(
void
)
{
SharedState
state
(
new
State
(
mpVertexBuffer
,
mpFrameBuffer
,
mpShaderProgram
));
return
state
;
}
// =================================================================================================== \/
// ============================================================================================ FIELDS \/
// =================================================================================================== \/
protected:
ConstSharedVertexBuffer
mpVertexBuffer
;
ConstSharedFrameBuffer
mpFrameBuffer
;
ConstSharedShaderProgram
mpShaderProgram
;
};
}
// OpenGL
}
// ACGL
#endif // ACGL_OPENGL_CONTROLLER_TEXTURECONTROL_HH
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment