X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcore%2Fdeviceinfo.cpp;h=37a04f8a86a4fe058611cb886f1d32954bc2acd9;hb=e6077f9f25b794c174e1017c2c0763e77a6fddda;hp=93297a790974b23479c165b9b576d6fdf6220576;hpb=6353307898cd397e2bcde13e2448a8a678a60004;p=libs%2Fgl.git diff --git a/source/core/deviceinfo.cpp b/source/core/deviceinfo.cpp index 93297a79..37a04f8a 100644 --- a/source/core/deviceinfo.cpp +++ b/source/core/deviceinfo.cpp @@ -1,3 +1,15 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include "deviceinfo.h" #include "gl.h" @@ -15,10 +27,27 @@ Limits::Limits() glGetIntegerv(GL_MAX_COLOR_ATTACHMENTS, reinterpret_cast(&max_color_attachments)); } -const Limits &Limits::get_global() + +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; +} + +const DeviceInfo &DeviceInfo::get_global() { - static Limits limits; - return limits; + static DeviceInfo info; + return info; } } // namespace GL