Skip to content
GitLab
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
13a23dc2
Commit
13a23dc2
authored
Aug 19, 2011
by
Lars Krecklau
Browse files
Merge branch 'master' of
file:///data/git-repository/acgl/libraries/acgl
parents
0545b116
d9597799
Changes
4
Hide whitespace changes
Inline
Side-by-side
include/ACGL/OpenGL/Controller.hh
View file @
13a23dc2
...
...
@@ -31,5 +31,6 @@
#include
<ACGL/OpenGL/Controller/UniformControl.hh>
#include
<ACGL/OpenGL/Controller/VertexBufferObjectControl.hh>
#include
<ACGL/OpenGL/Controller/VertexBufferObjectControlFileOBJ.hh>
#include
<ACGL/OpenGL/Controller/ViewportControl.hh>
#endif // ACGL_OPENGL_CONTROLLER_HH
include/ACGL/OpenGL/Controller/ViewportControl.hh
0 → 100644
View file @
13a23dc2
////////////////////////////////////////////////////////////////////////////////
// Copyright (c) 2011, Computer Graphics Group RWTH Aachen University //
// All rights reserved. //
////////////////////////////////////////////////////////////////////////////////
#ifndef ACGL_OPENGL_CONTROLLER_VIEWPORTCONTROL_HH
#define ACGL_OPENGL_CONTROLLER_VIEWPORTCONTROL_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
ViewportControl
:
public
Resource
::
BasicCreateController
<
Viewport
>
{
// ========================================================================================================= \/
// ============================================================================================ CONSTRUCTORS \/
// ========================================================================================================= \/
public:
ViewportControl
()
:
mOffsetX
(
0
),
mOffsetY
(
0
),
mWidth
(
0
),
mHeight
(
0
)
{}
virtual
~
ViewportControl
(
void
)
{}
// ==================================================================================================== \/
// ============================================================================================ GETTERS \/
// ==================================================================================================== \/
public:
inline
ViewportControl
&
offset
(
GLint
_offsetX
,
GLint
_offsetY
)
{
mOffsetX
=
_offsetX
;
mOffsetY
=
_offsetY
;
return
*
this
;
}
inline
ViewportControl
&
size
(
GLsizei
_width
,
GLsizei
_height
)
{
mOffsetX
=
_width
;
mOffsetY
=
_height
;
return
*
this
;
}
// ===================================================================================================== \/
// ============================================================================================ OVERRIDE \/
// ===================================================================================================== \/
public:
virtual
SharedViewport
create
(
void
)
{
SharedViewport
viewport
(
new
Viewport
(
mOffsetX
,
mOffsetY
,
mWidth
,
mHeight
));
return
viewport
;
}
// =================================================================================================== \/
// ============================================================================================ FIELDS \/
// =================================================================================================== \/
protected:
GLint
mOffsetX
;
GLint
mOffsetY
;
GLsizei
mWidth
;
GLsizei
mHeight
;
};
}
// OpenGL
}
// ACGL
#endif // ACGL_OPENGL_CONTROLLER_TEXTURECONTROL_HH
include/ACGL/OpenGL/Managers.hh
View file @
13a23dc2
...
...
@@ -45,6 +45,7 @@ typedef Resource::FileManager<Texture> TextureFileManager;
typedef
Resource
::
NameManager
<
VertexBufferObject
>
VertexBufferObjectNameManager
;
typedef
Resource
::
FileManager
<
VertexBufferObject
>
VertexBufferObjectFileManager
;
typedef
Resource
::
NameManager
<
Viewport
>
ViewportNameManager
;
}
// OpenGL
}
// ACGL
...
...
include/ACGL/OpenGL/Objects/Viewport.hh
View file @
13a23dc2
...
...
@@ -27,10 +27,10 @@ class Viewport
// ============================================================================================ CONSTRUCTORS \/
// ========================================================================================================= \/
public:
Viewport
(
int
_offsetX
,
int
_offsetY
,
int
_width
,
int
_height
)
Viewport
(
GL
int
_offsetX
,
GL
int
_offsetY
,
GLsizei
_width
,
GLsizei
_height
)
:
mOffsetX
(
_offsetX
),
mOffsetY
(
_offsetY
),
mWidth
(
_width
),
...
...
@@ -43,10 +43,10 @@ public:
// ============================================================================================ GETTERS \/
// ==================================================================================================== \/
public:
inline
int
getOffsetX
(
void
)
const
{
return
mOffsetX
;
}
inline
int
getOffsetY
(
void
)
const
{
return
mOffsetY
;
}
inline
int
getWidth
(
void
)
const
{
return
mWidth
;
}
inline
int
getHeight
(
void
)
const
{
return
mHeight
;
}
inline
GL
int
getOffsetX
(
void
)
const
{
return
mOffsetX
;
}
inline
GL
int
getOffsetY
(
void
)
const
{
return
mOffsetY
;
}
inline
GLsizei
getWidth
(
void
)
const
{
return
mWidth
;
}
inline
GLsizei
getHeight
(
void
)
const
{
return
mHeight
;
}
// ==================================================================================================== \/
// ============================================================================================ METHODS \/
...
...
@@ -61,10 +61,10 @@ public:
// ============================================================================================ FIELDS \/
// =================================================================================================== \/
protected:
int
mOffsetX
;
int
mOffsetY
;
int
mWidth
;
int
mHeight
;
GL
int
mOffsetX
;
GL
int
mOffsetY
;
GLsizei
mWidth
;
GLsizei
mHeight
;
};
ACGL_SHARED_TYPEDEF
(
Viewport
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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