diff options
author | Jose Fonseca <jfonseca@vmware.com> | 2016-04-04 16:18:11 +0100 |
---|---|---|
committer | Jose Fonseca <jfonseca@vmware.com> | 2016-04-04 16:18:11 +0100 |
commit | 1f9e61da66b89bdb2abe1882ea3b246a4e46c830 (patch) | |
tree | 85af97867e32f120055ac85df4285593f069c75d /helpers | |
parent | 8d6653ac387e5fd1a2eae549239099a05e9cac03 (diff) |
gltrace: Use glfeature to decide when PBOs are supported.
Diffstat (limited to 'helpers')
-rw-r--r-- | helpers/glfeatures.cpp | 9 | ||||
-rw-r--r-- | helpers/glfeatures.hpp | 2 |
2 files changed, 11 insertions, 0 deletions
diff --git a/helpers/glfeatures.cpp b/helpers/glfeatures.cpp index 69d93325..39531e71 100644 --- a/helpers/glfeatures.cpp +++ b/helpers/glfeatures.cpp @@ -347,6 +347,15 @@ Features::load(const Profile & profile, const Extensions & ext) ARB_program_interface_query = ext.has("GL_ARB_program_interface_query"); NV_read_depth_stencil = ES && ext.has("GL_NV_read_depth_stencil"); + + if (profile.es()) { + pixel_buffer_object = profile.versionGreaterOrEqual(3, 1) || + ext.has("GL_NV_pixel_buffer_object"); + } else { + pixel_buffer_object = profile.versionGreaterOrEqual(2, 1) || + ext.has("GL_ARB_pixel_buffer_object") || + ext.has("GL_EXT_pixel_buffer_object"); + } } diff --git a/helpers/glfeatures.hpp b/helpers/glfeatures.hpp index a85a5927..916004c8 100644 --- a/helpers/glfeatures.hpp +++ b/helpers/glfeatures.hpp @@ -155,6 +155,8 @@ struct Features unsigned ARB_shader_storage_buffer_object:1; unsigned ARB_program_interface_query:1; + unsigned pixel_buffer_object:1; + Features(void); void |