Add new cases for GLES3 SRC_ALPHA_SATURATE blend modes.

TRAC #23125 Signed-off-by: Geoff Lang Signed-off-by: Nicolas Capens Author: Jamie Madill git-svn-id: https://angleproject.googlecode.com/svn/branches/es3proto@2351 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent 568c82e7
...@@ -1106,6 +1106,8 @@ void __stdcall glBlendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha ...@@ -1106,6 +1106,8 @@ void __stdcall glBlendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha
try try
{ {
gl::Context *context = gl::getNonLostContext();
switch (srcRGB) switch (srcRGB)
{ {
case GL_ZERO: case GL_ZERO:
...@@ -1145,6 +1147,14 @@ void __stdcall glBlendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha ...@@ -1145,6 +1147,14 @@ void __stdcall glBlendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha
case GL_CONSTANT_ALPHA: case GL_CONSTANT_ALPHA:
case GL_ONE_MINUS_CONSTANT_ALPHA: case GL_ONE_MINUS_CONSTANT_ALPHA:
break; break;
case GL_SRC_ALPHA_SATURATE:
if (!context || context->getClientVersion() < 3)
{
return gl::error(GL_INVALID_ENUM);
}
break;
default: default:
return gl::error(GL_INVALID_ENUM); return gl::error(GL_INVALID_ENUM);
} }
...@@ -1188,6 +1198,14 @@ void __stdcall glBlendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha ...@@ -1188,6 +1198,14 @@ void __stdcall glBlendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha
case GL_CONSTANT_ALPHA: case GL_CONSTANT_ALPHA:
case GL_ONE_MINUS_CONSTANT_ALPHA: case GL_ONE_MINUS_CONSTANT_ALPHA:
break; break;
case GL_SRC_ALPHA_SATURATE:
if (!context || context->getClientVersion() < 3)
{
return gl::error(GL_INVALID_ENUM);
}
break;
default: default:
return gl::error(GL_INVALID_ENUM); return gl::error(GL_INVALID_ENUM);
} }
...@@ -1204,8 +1222,6 @@ void __stdcall glBlendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha ...@@ -1204,8 +1222,6 @@ void __stdcall glBlendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha
return gl::error(GL_INVALID_OPERATION); return gl::error(GL_INVALID_OPERATION);
} }
gl::Context *context = gl::getNonLostContext();
if (context) if (context)
{ {
context->setBlendFactors(srcRGB, dstRGB, srcAlpha, dstAlpha); context->setBlendFactors(srcRGB, dstRGB, srcAlpha, dstAlpha);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment