summaryrefslogtreecommitdiff
path: root/helpers
diff options
context:
space:
mode:
authorJose Fonseca <jfonseca@vmware.com>2016-05-08 22:48:43 +0100
committerJose Fonseca <jfonseca@vmware.com>2016-05-10 03:25:25 -0700
commit898d6e6da517052271a3f9828ee966b56075efe3 (patch)
tree04abc3bfa36659a8e3c057f33ca1ca30dd3f8d0a /helpers
parentdddc5b8534d68b5315d9b9aaafd45d8a79e36198 (diff)
gltrace: Only check primitive restart index if supported.
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 eef92089..033d823e 100644
--- a/helpers/glfeatures.cpp
+++ b/helpers/glfeatures.cpp
@@ -367,6 +367,9 @@ Features::load(const Profile & profile, const Extensions & ext)
query_buffer_object = profile.versionGreaterOrEqual(4, 4) ||
ext.has("GL_ARB_query_buffer_object") ||
ext.has("GL_AMD_query_buffer_object");
+
+ primitive_restart = profile.versionGreaterOrEqual(3, 1) ||
+ ext.has("GL_NV_primitive_restart");
} else {
texture_3d = 1;
@@ -386,6 +389,8 @@ Features::load(const Profile & profile, const Extensions & ext)
read_framebuffer_object = 0;
query_buffer_object = 0;
+
+ primitive_restart = 0;
}
}
diff --git a/helpers/glfeatures.hpp b/helpers/glfeatures.hpp
index c9fc796e..8aa0c921 100644
--- a/helpers/glfeatures.hpp
+++ b/helpers/glfeatures.hpp
@@ -161,6 +161,7 @@ struct Features
unsigned framebuffer_object:1;
unsigned read_framebuffer_object:1;
unsigned query_buffer_object:1;
+ unsigned primitive_restart:1;
Features(void);