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
7fad840b
Commit
7fad840b
authored
Aug 19, 2011
by
Lars Krecklau
Browse files
-Added setters to the viewport to change the size and the offset
parent
824793c2
Changes
2
Hide whitespace changes
Inline
Side-by-side
include/ACGL/OpenGL/Objects/State.hh
View file @
7fad840b
...
...
@@ -88,7 +88,7 @@ public:
// ============================================================================================ METHODS \/
// ==================================================================================================== \/
public:
void
updateMappings
(
void
);
void
updateMappings
(
void
);
void
useViewport
(
void
)
const
;
void
useShaderProgramObject
(
void
)
const
;
...
...
include/ACGL/OpenGL/Objects/Viewport.hh
View file @
7fad840b
...
...
@@ -27,10 +27,10 @@ class Viewport
// ============================================================================================ CONSTRUCTORS \/
// ========================================================================================================= \/
public:
Viewport
(
GLint
_offsetX
,
GLint
_offsetY
,
GLsizei
_width
,
GLsizei
_height
)
Viewport
(
GLint
_offsetX
=
0
,
GLint
_offsetY
=
0
,
GLsizei
_width
=
0
,
GLsizei
_height
=
0
)
:
mOffsetX
(
_offsetX
),
mOffsetY
(
_offsetY
),
mWidth
(
_width
),
...
...
@@ -57,6 +57,18 @@ public:
glViewport
(
mOffsetX
,
mOffsetY
,
mWidth
,
mHeight
);
}
inline
void
setOffset
(
GLint
_offsetX
,
GLint
_offsetY
)
{
mOffsetX
=
_offsetX
;
mOffsetY
=
_offsetY
;
}
inline
void
setSize
(
GLsizei
_width
,
GLsizei
_height
)
{
mWidth
=
_width
;
mHeight
=
_height
;
}
// =================================================================================================== \/
// ============================================================================================ FIELDS \/
// =================================================================================================== \/
...
...
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