commit | 239cd0e95ecef436850a335405969015e7189c10 | [log] [tgz] |
---|---|---|
author | Lizhe Liu <lizhe.liu@intel.com> | Wed May 20 15:04:50 2015 +0800 |
committer | Lizhe Liu <lizhe.liu@intel.com> | Wed May 20 16:34:40 2015 +0800 |
tree | 96a33228f188285447b58ec494e4868049c2a9a7 | |
parent | f1b328188c12dd11437db5bbb0d178d2e1a6091f [diff] |
Fix glActiveTexture incorrect return value glActiveTexture return value defined by khronos as follow: GL_INVALID_ENUM is generated if texture is not one of GL_TEXTUREi. Function must return GL_INVALID_ENUM not GL_INVALID_OPERATION. See http://www.khronos.org/opengles/sdk/docs/man/xhtml/glActiveTexture.xml Change-Id: I50e61bb12043b7bb4c7f9795c4e0d46d6cd98dc2 Signed-off-by: Lizhe Liu <lizhe.liu@intel.com>
diff --git a/opengl/shared/OpenglCodecCommon/GLClientState.cpp b/opengl/shared/OpenglCodecCommon/GLClientState.cpp index 0826a14..241fea9 100644 --- a/opengl/shared/OpenglCodecCommon/GLClientState.cpp +++ b/opengl/shared/OpenglCodecCommon/GLClientState.cpp
@@ -247,7 +247,7 @@ { GLuint unit = texture - GL_TEXTURE0; if (unit >= MAX_TEXTURE_UNITS) { - return GL_INVALID_OPERATION; + return GL_INVALID_ENUM; } m_tex.activeUnit = &m_tex.unit[unit]; return GL_NO_ERROR;