From 300ad09822db1013d9f28c4bca3680f865533ab6 Mon Sep 17 00:00:00 2001 From: Andrew Hsieh Date: Tue, 6 Nov 2012 13:42:48 -0800 Subject: Fix return type of glGetAttribLocation and glGetUniformLocation from int to GLint. See: http://www.khronos.org/opengles/sdk/docs/man/xhtml/glGetAttribLocation.xml http://www.khronos.org/opengles/sdk/docs/man/xhtml/glGetUniformLocation.xml Change-Id: I4a9f8e9e34b8c3cca239ae84bfe8f3cdfd94802a --- opengl/tests/gl_perf/fill_common.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'opengl/tests') diff --git a/opengl/tests/gl_perf/fill_common.cpp b/opengl/tests/gl_perf/fill_common.cpp index 389381f..fefedc0 100644 --- a/opengl/tests/gl_perf/fill_common.cpp +++ b/opengl/tests/gl_perf/fill_common.cpp @@ -189,7 +189,7 @@ static void setupVA() { } static void randUniform(int pgm, const char *var) { - int loc = glGetUniformLocation(pgm, var); + GLint loc = glGetUniformLocation(pgm, var); if (loc >= 0) { float x = ((float)rand()) / RAND_MAX; float y = ((float)rand()) / RAND_MAX; @@ -211,7 +211,7 @@ static void doLoop(bool warmup, int pgm, uint32_t passCount) { startTimer(); glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT); for (uint32_t ct=0; ct < passCount; ct++) { - int loc = glGetUniformLocation(pgm, "u_texOff"); + GLint loc = glGetUniformLocation(pgm, "u_texOff"); glUniform2f(loc, ((float)ct) / passCount, ((float)ct) / 2.f / passCount); randUniform(pgm, "u_color"); @@ -271,7 +271,7 @@ static void doSingleTest(uint32_t pgmNum, int tex) { printf("error running test\n"); return; } - int loc = glGetUniformLocation(pgm, "u_tex0"); + GLint loc = glGetUniformLocation(pgm, "u_tex0"); if (loc >= 0) glUniform1i(loc, 0); loc = glGetUniformLocation(pgm, "u_tex1"); if (loc >= 0) glUniform1i(loc, 1); -- cgit v1.1