]> git.tdb.fi Git - libs/gl.git/blobdiff - source/backends/opengl/deviceinfo_backend.cpp
Move backend information into Device
[libs/gl.git] / source / backends / opengl / deviceinfo_backend.cpp
diff --git a/source/backends/opengl/deviceinfo_backend.cpp b/source/backends/opengl/deviceinfo_backend.cpp
deleted file mode 100644 (file)
index df085dc..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-#include <msp/gl/extensions/arb_enhanced_layouts.h>
-#include <msp/gl/extensions/arb_explicit_attrib_location.h>
-#include <msp/gl/extensions/arb_explicit_uniform_location.h>
-#include <msp/gl/extensions/arb_gpu_shader5.h>
-#include <msp/gl/extensions/arb_separate_shader_objects.h>
-#include <msp/gl/extensions/arb_uniform_buffer_object.h>
-#include <msp/gl/extensions/arb_vertex_shader.h>
-#include <msp/gl/extensions/ext_framebuffer_multisample.h>
-#include <msp/gl/extensions/ext_framebuffer_object.h>
-#include <msp/gl/extensions/ext_gpu_shader4.h>
-#include <msp/gl/extensions/ext_texture_array.h>
-#include <msp/gl/extensions/ext_texture_filter_anisotropic.h>
-#include <msp/gl/extensions/msp_clipping.h>
-#include <msp/gl/extensions/nv_fbo_color_attachments.h>
-#include "deviceinfo.h"
-#include "gl.h"
-
-namespace Msp {
-namespace GL {
-
-Limits::Limits()
-{
-       glGetIntegerv(GL_MAX_CLIP_PLANES, reinterpret_cast<int *>(&max_clip_planes));
-       if(ARB_vertex_shader)
-       {
-               glGetIntegerv(GL_MAX_VERTEX_ATTRIBS, reinterpret_cast<int *>(&max_vertex_attributes));
-               glGetIntegerv(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, reinterpret_cast<int *>(&max_texture_bindings));
-       }
-       if(EXT_framebuffer_object)
-               glGetIntegerv(GL_MAX_COLOR_ATTACHMENTS, reinterpret_cast<int *>(&max_color_attachments));
-       if(EXT_framebuffer_multisample)
-               glGetIntegerv(GL_MAX_SAMPLES, reinterpret_cast<int *>(&max_samples));
-       if(ARB_uniform_buffer_object)
-       {
-               glGetIntegerv(GL_MAX_UNIFORM_BUFFER_BINDINGS, reinterpret_cast<int *>(&max_uniform_bindings));
-               glGetIntegerv(GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT, reinterpret_cast<int *>(&uniform_buffer_alignment));
-       }
-       if(EXT_texture_filter_anisotropic)
-               glGetFloatv(GL_MAX_TEXTURE_MAX_ANISOTROPY, &max_anisotropy);
-}
-
-
-DeviceInfo::DeviceInfo()
-{
-       glsl_features.target_api = get_backend_api();
-       glsl_features.glsl_version = get_glsl_version();
-       glsl_features.arb_enhanced_layouts = ARB_enhanced_layouts;
-       glsl_features.arb_explicit_attrib_location = ARB_explicit_attrib_location;
-       glsl_features.arb_explicit_uniform_location = ARB_explicit_uniform_location;
-       glsl_features.arb_gpu_shader5 = ARB_gpu_shader5;
-       glsl_features.arb_separate_shader_objects = ARB_separate_shader_objects;
-       glsl_features.arb_uniform_buffer_object = ARB_uniform_buffer_object;
-       glsl_features.ext_gpu_shader4 = EXT_gpu_shader4;
-       glsl_features.ext_texture_array = EXT_texture_array;
-       glsl_features.uniform_binding_range = limits.max_uniform_bindings;
-       glsl_features.texture_binding_range = limits.max_texture_bindings;
-}
-
-} // namespace Msp
-} // namespace GL