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
Glow
glow
Commits
ba509353
Commit
ba509353
authored
Oct 16, 2019
by
Philip Trettner
Browse files
added viewport variants
parent
7d5dc5c7
Changes
1
Show whitespace changes
Inline
Side-by-side
src/glow/common/scoped_gl.hh
View file @
ba509353
...
...
@@ -8,6 +8,9 @@
#include
<glow/gl.hh>
#include
<typed-geometry/types/color.hh>
#include
<typed-geometry/types/objects/aabb.hh>
#include
<typed-geometry/types/pos.hh>
#include
<typed-geometry/types/size.hh>
#include
<initializer_list>
...
...
@@ -384,6 +387,14 @@ struct viewport
GLint
prevView
[
4
];
viewport
(
tg
::
iaabb2
bounds_inclusive
)
:
viewport
(
bounds_inclusive
.
min
.
x
,
bounds_inclusive
.
min
.
y
,
bounds_inclusive
.
max
.
x
-
bounds_inclusive
.
min
.
x
+
1
,
bounds_inclusive
.
max
.
y
-
bounds_inclusive
.
min
.
y
+
1
)
{
}
viewport
(
tg
::
ipos2
offset
,
tg
::
isize2
size
)
:
viewport
(
offset
.
x
,
offset
.
y
,
size
.
width
,
size
.
height
)
{}
viewport
(
int
x
,
int
y
,
int
w
,
int
h
)
{
glGetIntegerv
(
GL_VIEWPORT
,
prevView
);
...
...
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