OGLplus
(0.59.0)
a C++ wrapper for rendering APIs
Main Page
Modules
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
Functions
a
b
c
d
e
f
g
i
k
l
m
n
o
p
r
s
t
u
Variables
Typedefs
a
b
c
d
e
g
h
i
k
l
m
n
o
p
r
s
t
u
v
Enumerations
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Typedefs
a
b
c
d
e
f
g
h
i
k
m
n
o
p
r
s
t
u
v
Related Functions
o
Files
File List
File Members
All
Macros
Examples
eagine
interop
glx
version.hpp
Go to the documentation of this file.
1
9
#ifndef EAGINE_INTEROP_GLX_VERSION_HPP
10
#define EAGINE_INTEROP_GLX_VERSION_HPP
11
12
#include "../x11/display.hpp"
13
14
#include <GL/glx.h>
15
#include <stdexcept>
16
17
namespace
eagine::glx
{
18
19
class
version {
20
private
:
21
int
_major{0};
22
int
_minor{0};
23
24
public
:
25
version(
const
x11::display& dpy) {
26
if
(!::glXQueryVersion(dpy, &_major, &_minor)) {
27
throw
std::runtime_error(
"Error querying GLX version"
);
28
}
29
}
30
31
void
assert_at_least(
int
major,
int
minor)
const
{
32
if
((_major < major) || ((_major == major) && (_minor < minor))) {
33
throw
std::runtime_error(
"Invalid GLX version"
);
34
}
35
}
36
37
auto
major() const noexcept {
38
return
_major;
39
}
40
41
auto
minor() const noexcept {
42
return
_minor;
43
}
44
};
45
46
}
// namespace eagine::glx
47
48
#endif
eagine::glx
GLX wrapper code is placed in this namespace.
Definition:
x11.hpp:14
Copyright © 2015-2021
Matúš Chochlík
.
<
chochlik -at -gmail.com
>
Documentation generated on Tue Apr 13 2021 by
Doxygen
(version 1.8.17).