Bug 1083447 - texParameter and getTexParameter should accept the TEXTURE_3D target in WebGL2 mode - r=jgilbert

This commit is contained in:
Benoit Jacob 2014-10-15 17:20:17 -04:00
parent 7fd93729db
commit ebcac1cb7b

View File

@ -219,6 +219,13 @@ bool WebGLContext::ValidateTextureTargetEnum(GLenum target, const char *info)
case LOCAL_GL_TEXTURE_2D:
case LOCAL_GL_TEXTURE_CUBE_MAP:
return true;
case LOCAL_GL_TEXTURE_3D: {
const bool isValid = IsWebGL2();
if (!isValid) {
ErrorInvalidEnumInfo(info, target);
}
return isValid;
}
default:
ErrorInvalidEnumInfo(info, target);
return false;