X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcore%2Fdeviceinfo.cpp;h=8400ffdf0d344c448d3ed69eb132dc5f17c2f97e;hb=6cee6c490ded0981c4da3f9f4ec74a41555e1a4e;hp=acbd0a73e7eeb1e44831860729af262fca065987;hpb=acaefb4c669f01855252818ef0a2958cbdababc3;p=libs%2Fgl.git diff --git a/source/core/deviceinfo.cpp b/source/core/deviceinfo.cpp index acbd0a73..8400ffdf 100644 --- a/source/core/deviceinfo.cpp +++ b/source/core/deviceinfo.cpp @@ -1,29 +1,12 @@ -#include -#include -#include -#include -#include #include "deviceinfo.h" -#include "gl.h" namespace Msp { namespace GL { -Limits::Limits() +const DeviceInfo &DeviceInfo::get_global() { - glGetIntegerv(GL_MAX_VERTEX_ATTRIBS, reinterpret_cast(&max_vertex_attributes)); - glGetIntegerv(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, reinterpret_cast(&max_texture_bindings)); - glGetIntegerv(GL_MAX_UNIFORM_BUFFER_BINDINGS, reinterpret_cast(&max_uniform_bindings)); - glGetIntegerv(GL_MAX_CLIP_PLANES, reinterpret_cast(&max_clip_planes)); - glGetIntegerv(GL_MAX_SAMPLES, reinterpret_cast(&max_samples)); - glGetIntegerv(GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT, reinterpret_cast(&uniform_buffer_alignment)); - glGetIntegerv(GL_MAX_COLOR_ATTACHMENTS, reinterpret_cast(&max_color_attachments)); -} - -const Limits &Limits::get_global() -{ - static Limits limits; - return limits; + static DeviceInfo info; + return info; } } // namespace GL