Merge "1.1 translator: glGet(GL_MAX_CLIP_PLANES) returns max 6"

This commit is contained in:
David Turner
2011-08-04 07:09:06 -07:00
committed by Android Code Review

View File

@@ -886,6 +886,16 @@ GL_API void GL_APIENTRY glGetIntegerv( GLenum pname, GLint *params) {
case GL_COMPRESSED_TEXTURE_FORMATS: case GL_COMPRESSED_TEXTURE_FORMATS:
getCompressedFormats(params); getCompressedFormats(params);
break; break;
case GL_MAX_CLIP_PLANES:
ctx->dispatcher().glGetIntegerv(pname,params);
if(*params > 6)
{
// GLES spec requires only 6, and the ATI driver erronously
// returns 8 (although it supports only 6). This WAR is simple,
// compliant and good enough for developers.
*params = 6;
}
break;
default: default:
ctx->dispatcher().glGetIntegerv(pname,params); ctx->dispatcher().glGetIntegerv(pname,params);
} }