summaryrefslogtreecommitdiffstats
path: root/opengl/tests
diff options
context:
space:
mode:
authorAndrew Hsieh <andrewhsieh@google.com>2012-11-06 13:42:48 -0800
committerAndrew Hsieh <andrewhsieh@google.com>2012-11-06 14:39:08 -0800
commit300ad09822db1013d9f28c4bca3680f865533ab6 (patch)
treeb8375a9ed175fc6625d85c9c586980292d3f0ab4 /opengl/tests
parent7abbbc680d03dd8e50a709f89b78ace6b81154b0 (diff)
downloadframeworks_native-300ad09822db1013d9f28c4bca3680f865533ab6.zip
frameworks_native-300ad09822db1013d9f28c4bca3680f865533ab6.tar.gz
frameworks_native-300ad09822db1013d9f28c4bca3680f865533ab6.tar.bz2
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
Diffstat (limited to 'opengl/tests')
-rw-r--r--opengl/tests/gl_perf/fill_common.cpp6
1 files changed, 3 insertions, 3 deletions
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);