1 #include <msp/gl/extensions/arb_enhanced_layouts.h>
2 #include <msp/gl/extensions/arb_explicit_attrib_location.h>
3 #include <msp/gl/extensions/arb_explicit_uniform_location.h>
4 #include <msp/gl/extensions/arb_gpu_shader5.h>
5 #include <msp/gl/extensions/arb_separate_shader_objects.h>
6 #include <msp/gl/extensions/arb_uniform_buffer_object.h>
7 #include <msp/gl/extensions/arb_vertex_shader.h>
8 #include <msp/gl/extensions/ext_framebuffer_multisample.h>
9 #include <msp/gl/extensions/ext_gpu_shader4.h>
10 #include <msp/gl/extensions/ext_texture_array.h>
11 #include <msp/gl/extensions/msp_clipping.h>
12 #include <msp/gl/extensions/nv_fbo_color_attachments.h>
13 #include "deviceinfo.h"
21 glGetIntegerv(GL_MAX_VERTEX_ATTRIBS, reinterpret_cast<int *>(&max_vertex_attributes));
22 glGetIntegerv(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, reinterpret_cast<int *>(&max_texture_bindings));
23 glGetIntegerv(GL_MAX_UNIFORM_BUFFER_BINDINGS, reinterpret_cast<int *>(&max_uniform_bindings));
24 glGetIntegerv(GL_MAX_CLIP_PLANES, reinterpret_cast<int *>(&max_clip_planes));
25 glGetIntegerv(GL_MAX_SAMPLES, reinterpret_cast<int *>(&max_samples));
26 glGetIntegerv(GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT, reinterpret_cast<int *>(&uniform_buffer_alignment));
27 glGetIntegerv(GL_MAX_COLOR_ATTACHMENTS, reinterpret_cast<int *>(&max_color_attachments));
31 DeviceInfo::DeviceInfo()
33 glsl_features.target_api = get_backend_api();
34 glsl_features.glsl_version = get_glsl_version();
35 glsl_features.arb_enhanced_layouts = ARB_enhanced_layouts;
36 glsl_features.arb_explicit_attrib_location = ARB_explicit_attrib_location;
37 glsl_features.arb_explicit_uniform_location = ARB_explicit_uniform_location;
38 glsl_features.arb_gpu_shader5 = ARB_gpu_shader5;
39 glsl_features.arb_separate_shader_objects = ARB_separate_shader_objects;
40 glsl_features.arb_uniform_buffer_object = ARB_uniform_buffer_object;
41 glsl_features.ext_gpu_shader4 = EXT_gpu_shader4;
42 glsl_features.ext_texture_array = EXT_texture_array;
43 glsl_features.uniform_binding_range = limits.max_uniform_bindings;
44 glsl_features.texture_binding_range = limits.max_texture_bindings;