X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fcore%2Fdeviceinfo.cpp;h=8400ffdf0d344c448d3ed69eb132dc5f17c2f97e;hp=93297a790974b23479c165b9b576d6fdf6220576;hb=fb04f4ef9162f58f494cf4323cf3dc66b2f3d4ac;hpb=6353307898cd397e2bcde13e2448a8a678a60004 diff --git a/source/core/deviceinfo.cpp b/source/core/deviceinfo.cpp index 93297a79..8400ffdf 100644 --- a/source/core/deviceinfo.cpp +++ b/source/core/deviceinfo.cpp @@ -1,24 +1,12 @@ #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