summaryrefslogtreecommitdiff
path: root/helpers
diff options
context:
space:
mode:
authorJose Fonseca <jfonseca@vmware.com>2016-04-10 23:06:15 +0100
committerJose Fonseca <jfonseca@vmware.com>2016-04-10 23:06:15 +0100
commit4cff7bd83502963a8072b4d9e27c9f766af3d36a (patch)
tree19742955c9be59808030e1df3720a6cabc288329 /helpers
parent467e2100c11c29763cc9aec91a14e6c6964061b4 (diff)
glstate: More accurately check for PBO / 3D tex support before using it.
This allows to use glretrace with Microsoft GDI OpenGL 1.1 implementation, just for sanity testing purposes.
Diffstat (limited to 'helpers')
-rw-r--r--helpers/glfeatures.cpp5
-rw-r--r--helpers/glfeatures.hpp1
2 files changed, 6 insertions, 0 deletions
diff --git a/helpers/glfeatures.cpp b/helpers/glfeatures.cpp
index 2a5b1aae..b361d3e1 100644
--- a/helpers/glfeatures.cpp
+++ b/helpers/glfeatures.cpp
@@ -349,6 +349,9 @@ Features::load(const Profile & profile, const Extensions & ext)
NV_read_depth_stencil = ES && ext.has("GL_NV_read_depth_stencil");
if (profile.desktop()) {
+ texture_3d = profile.versionGreaterOrEqual(1, 2) ||
+ ext.has("GL_EXT_texture3D");
+
pixel_buffer_object = profile.versionGreaterOrEqual(2, 1) ||
ext.has("GL_ARB_pixel_buffer_object") ||
ext.has("GL_EXT_pixel_buffer_object");
@@ -364,6 +367,8 @@ Features::load(const Profile & profile, const Extensions & ext)
ext.has("GL_ARB_query_buffer_object") ||
ext.has("GL_AMD_query_buffer_object");
} else {
+ texture_3d = 1;
+
pixel_buffer_object = profile.versionGreaterOrEqual(3, 1) ||
ext.has("GL_NV_pixel_buffer_object");
diff --git a/helpers/glfeatures.hpp b/helpers/glfeatures.hpp
index 5c7bb193..c9fc796e 100644
--- a/helpers/glfeatures.hpp
+++ b/helpers/glfeatures.hpp
@@ -155,6 +155,7 @@ struct Features
unsigned ARB_shader_storage_buffer_object:1;
unsigned ARB_program_interface_query:1;
+ unsigned texture_3d:1;
unsigned pixel_buffer_object:1;
unsigned read_buffer:1;
unsigned framebuffer_object:1;