]> git.tdb.fi Git - libs/gl.git/blob - source/core/deviceinfo.cpp
Add support for integer vertex attributes
[libs/gl.git] / source / core / deviceinfo.cpp
1 #include "deviceinfo.h"
2 #include "gl.h"
3
4 namespace Msp {
5 namespace GL {
6
7 Limits::Limits()
8 {
9         glGetIntegerv(GL_MAX_VERTEX_ATTRIBS, reinterpret_cast<int *>(&max_vertex_attributes));
10         glGetIntegerv(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, reinterpret_cast<int *>(&max_texture_bindings));
11         glGetIntegerv(GL_MAX_UNIFORM_BUFFER_BINDINGS, reinterpret_cast<int *>(&max_uniform_bindings));
12         glGetIntegerv(GL_MAX_CLIP_PLANES, reinterpret_cast<int *>(&max_clip_planes));
13         glGetIntegerv(GL_MAX_SAMPLES, reinterpret_cast<int *>(&max_samples));
14         glGetIntegerv(GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT, reinterpret_cast<int *>(&uniform_buffer_alignment));
15         glGetIntegerv(GL_MAX_COLOR_ATTACHMENTS, reinterpret_cast<int *>(&max_color_attachments));
16 }
17
18 const Limits &Limits::get_global()
19 {
20         static Limits limits;
21         return limits;
22 }
23
24 } // namespace GL
25 } // namespace Msp