]> git.cworth.org Git - fips/commitdiff
Switch from glGetQueryObjectiv to glGetQueryObjectuiv
authorCarl Worth <cworth@cworth.org>
Wed, 12 Jun 2013 00:18:12 +0000 (17:18 -0700)
committerCarl Worth <cworth@cworth.org>
Wed, 12 Jun 2013 00:18:12 +0000 (17:18 -0700)
The latter is available in OpenGL ES 3 while the former is not.

We don't really care about the signedness either way, (we're fetching
a Boolean), so sticking consistently to the unsigned version provides
better portability with no downside.

metrics.c

index 8d2d6444beae601b9de93eea5d503a91729321c0..b6dbbd098b38672bdebb887ac58abf159baa1db6 100644 (file)
--- a/metrics.c
+++ b/metrics.c
@@ -147,11 +147,10 @@ metrics_end_frame (void)
        counter_t *counter = current_context.counter_head;
 
        while (counter) {
-               GLint available;
-               GLuint elapsed;
+               GLuint available, elapsed;
 
-               glGetQueryObjectiv (counter->id, GL_QUERY_RESULT_AVAILABLE,
-                                   &available);
+               glGetQueryObjectuiv (counter->id, GL_QUERY_RESULT_AVAILABLE,
+                                    &available);
                if (! available)
                        break;