From a1e99ea940198b63dd360e8fce8bd5adb44b7f6c Mon Sep 17 00:00:00 2001 From: Doug Binks Date: Tue, 18 Feb 2014 13:32:55 +0100 Subject: [PATCH] Bug fix for index into queries. --- example/example_gl3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/example/example_gl3.c b/example/example_gl3.c index f1f69e4..a69679a 100644 --- a/example/example_gl3.c +++ b/example/example_gl3.c @@ -175,7 +175,7 @@ int main() glEndQuery(GL_TIME_ELAPSED); while( available && retquery <= currquery ) { // check for results if there are any - glGetQueryObjectiv(timerqueryid[retquery], GL_QUERY_RESULT_AVAILABLE, &available); + glGetQueryObjectiv(timerqueryid[retquery % NUM_QUERIES], GL_QUERY_RESULT_AVAILABLE, &available); if( available ) { GLuint64 timeElapsed = 0; double gpuTime;