aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorjuj <jujjyl@gmail.com>2013-11-13 14:49:58 -0800
committerjuj <jujjyl@gmail.com>2013-11-13 14:49:58 -0800
commit2e227ca660def7703684093a26b813c468efacc3 (patch)
treefab794cd734b5cb56fc90f3f4faaf897344cb158 /tests
parent795842d274666ca1af42823ab0735e09b70a7036 (diff)
parent9cc9d74caff9b37edc6b137227a28aa05d477509 (diff)
Merge pull request #1798 from juj/gles2_max_program_lengths
GLES2 max program identifier lengths.
Diffstat (limited to 'tests')
-rw-r--r--tests/gles2_uniform_arrays.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/gles2_uniform_arrays.cpp b/tests/gles2_uniform_arrays.cpp
index 84e394dc..7293f9a9 100644
--- a/tests/gles2_uniform_arrays.cpp
+++ b/tests/gles2_uniform_arrays.cpp
@@ -35,6 +35,15 @@ void RunTest(int testVariant)
glBindAttribLocation(program, 0, "pos");
glLinkProgram(program);
+ // Also test that GL_ACTIVE_ATTRIBUTE_MAX_LENGTH and GL_ACTIVE_UNIFORM_MAX_LENGTH work. See https://github.com/kripken/emscripten/issues/1796.
+ GLint param;
+ glGetProgramiv(program, GL_ACTIVE_ATTRIBUTE_MAX_LENGTH, &param);
+ printf("active attrib max length: %d\n", param);
+ assert(param == 4); // "pos"+null terminator
+ glGetProgramiv(program, GL_ACTIVE_UNIFORM_MAX_LENGTH, &param);
+ printf("active uniform max length: %d\n", param);
+ assert(param == 10); // "colors[0]"+null terminator
+
int color_loc = glGetUniformLocation(program, "color");
assert(color_loc != -1);