From: Carl Worth Date: Wed, 12 Jun 2013 00:18:12 +0000 (-0700) Subject: Switch from glGetQueryObjectiv to glGetQueryObjectuiv X-Git-Url: https://git.cworth.org/git?p=fips;a=commitdiff_plain;h=22aa573de2860ddfe9092167525e2917e3a03cb8 Switch from glGetQueryObjectiv to glGetQueryObjectuiv 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. --- diff --git a/metrics.c b/metrics.c index 8d2d644..b6dbbd0 100644 --- 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;