Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
ACGL
acgl
Commits
7fad840b
Commit
7fad840b
authored
Aug 19, 2011
by
Lars Krecklau
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
-Added setters to the viewport to change the size and the offset
parent
824793c2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
5 deletions
+17
-5
include/ACGL/OpenGL/Objects/State.hh
include/ACGL/OpenGL/Objects/State.hh
+1
-1
include/ACGL/OpenGL/Objects/Viewport.hh
include/ACGL/OpenGL/Objects/Viewport.hh
+16
-4
No files found.
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
Markdown
is supported
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