X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fbackends%2Fopengl%2Fextension.cpp;h=84f8bd0a32d0789eb7dd340411b4b92ec73e701a;hp=a55da9bac1c7b30ab965b6ce70e20390eafda6d1;hb=d16d28d2ccf7c6255204f02975834f713ff1df08;hpb=fb04f4ef9162f58f494cf4323cf3dc66b2f3d4ac diff --git a/source/backends/opengl/extension.cpp b/source/backends/opengl/extension.cpp index a55da9ba..84f8bd0a 100644 --- a/source/backends/opengl/extension.cpp +++ b/source/backends/opengl/extension.cpp @@ -10,6 +10,7 @@ #endif #include #include +#include "device.h" #include "error.h" #include "extension.h" #include "gl.h" @@ -64,7 +65,8 @@ bool is_supported(const string &ext) if(!init_done) { - if(get_backend_api()==OPENGL && get_backend_version()>=Version(3, 0)) + const DeviceInfo &dev_info = Device::get_current().get_info(); + if(dev_info.api==OPENGL && dev_info.api_version>=Version(3, 0)) { typedef GLubyte *(APIENTRY *FPtr_glGetStringi)(GLenum, GLuint); FPtr_glGetStringi glGetStringi = reinterpret_cast(get_proc_address("glGetStringi")); @@ -90,7 +92,7 @@ bool is_supported(const string &ext) bool is_supported(const Version &core_version, const Version &deprecated_version) { - const Version &version = get_backend_version(); + const Version &version = Device::get_current().get_info().api_version; if(deprecated_version && version>=deprecated_version && get_gl_profile()==CORE_PROFILE) return false; return (version>=core_version); @@ -119,7 +121,7 @@ bool is_disabled(const string &ext) /* AMD's uniform buffer objects only work with the core version of shaders. */ - if(get_backend_version()=Version(3, 0)) + const DeviceInfo &dev_info = Device::get_current().get_info(); + if(dev_info.api==OPENGL && dev_info.api_version>=Version(3, 0)) { int mask; glGetIntegerv(GL_CONTEXT_PROFILE_MASK, &mask);