Merge "Use GLint from client state parameters in glGetBooleanv"
diff --git a/system/GLESv2_enc/GL2Encoder.cpp b/system/GLESv2_enc/GL2Encoder.cpp
index f4947bb..ecc0495 100755
--- a/system/GLESv2_enc/GL2Encoder.cpp
+++ b/system/GLESv2_enc/GL2Encoder.cpp
@@ -1109,10 +1109,14 @@
default:
if (!state) return;
- if (!state->getClientStateParameter<GLboolean>(param, ptr)) {
- ctx->safe_glGetBooleanv(param, ptr);
+ {
+ GLint intVal;
+ if (!state->getClientStateParameter<GLint>(param, &intVal)) {
+ ctx->safe_glGetBooleanv(param, ptr);
+ } else {
+ *ptr = (intVal != 0) ? GL_TRUE : GL_FALSE;
+ }
}
- *ptr = (*ptr != 0) ? GL_TRUE : GL_FALSE;
break;
}
}