X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fbackends%2Fopengl%2Fdeviceinfo_backend.cpp;h=df085dc76e91a00e62c3111c24fc2e4f2c9cc162;hp=7e1f3f48390d2f603d3896d3733ddbee12a93acc;hb=fb04f4ef9162f58f494cf4323cf3dc66b2f3d4ac;hpb=160e9eea29bd10034733d59507fa1bcca36be401 diff --git a/source/backends/opengl/deviceinfo_backend.cpp b/source/backends/opengl/deviceinfo_backend.cpp index 7e1f3f48..df085dc7 100644 --- a/source/backends/opengl/deviceinfo_backend.cpp +++ b/source/backends/opengl/deviceinfo_backend.cpp @@ -6,8 +6,10 @@ #include #include #include +#include #include #include +#include #include #include #include "deviceinfo.h" @@ -18,13 +20,23 @@ namespace GL { Limits::Limits() { - 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)); + if(ARB_vertex_shader) + { + glGetIntegerv(GL_MAX_VERTEX_ATTRIBS, reinterpret_cast(&max_vertex_attributes)); + glGetIntegerv(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, reinterpret_cast(&max_texture_bindings)); + } + if(EXT_framebuffer_object) + glGetIntegerv(GL_MAX_COLOR_ATTACHMENTS, reinterpret_cast(&max_color_attachments)); + if(EXT_framebuffer_multisample) + glGetIntegerv(GL_MAX_SAMPLES, reinterpret_cast(&max_samples)); + if(ARB_uniform_buffer_object) + { + glGetIntegerv(GL_MAX_UNIFORM_BUFFER_BINDINGS, reinterpret_cast(&max_uniform_bindings)); + glGetIntegerv(GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT, reinterpret_cast(&uniform_buffer_alignment)); + } + if(EXT_texture_filter_anisotropic) + glGetFloatv(GL_MAX_TEXTURE_MAX_ANISOTROPY, &max_anisotropy); }