зеркало из https://github.com/AvaloniaUI/angle.git
Blend conformance bugfixes.
Trac #11327 Fixes a bug where color conversion swapped blue and green values. Fixes a bug where CONSTANT_COLOR/CONSTANT_ALPHA conflict guard failed to check for ONE_MINUS variants. Author: Shannon Woods Signed-off-by: Nicolas Capens Signed-off-by: Daniel Koch git-svn-id: https://angleproject.googlecode.com/svn/trunk@27 736b8ea6-26fd-11df-bfd4-992fa37f6226
This commit is contained in:
Родитель
12d5407ec2
Коммит
fe453651c4
|
@ -390,10 +390,16 @@ void __stdcall glBlendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha
|
|||
return error(GL_INVALID_ENUM);
|
||||
}
|
||||
|
||||
if ((srcRGB == GL_CONSTANT_COLOR && dstRGB == GL_CONSTANT_ALPHA) ||
|
||||
(srcRGB == GL_CONSTANT_ALPHA && dstRGB == GL_CONSTANT_COLOR))
|
||||
bool constantColorUsed = (srcRGB == GL_CONSTANT_COLOR || srcRGB == GL_ONE_MINUS_CONSTANT_COLOR ||
|
||||
dstRGB == GL_CONSTANT_COLOR || dstRGB == GL_ONE_MINUS_CONSTANT_COLOR);
|
||||
|
||||
bool constantAlphaUsed = (srcRGB == GL_CONSTANT_ALPHA || srcRGB == GL_ONE_MINUS_CONSTANT_ALPHA ||
|
||||
dstRGB == GL_CONSTANT_ALPHA || dstRGB == GL_ONE_MINUS_CONSTANT_ALPHA);
|
||||
|
||||
if (constantColorUsed && constantAlphaUsed)
|
||||
{
|
||||
UNIMPLEMENTED();
|
||||
ERR("Simultaneous use of GL_CONSTANT_ALPHA/GL_ONE_MINUS_CONSTANT_ALPHA and GL_CONSTANT_COLOR/GL_ONE_MINUS_CONSTANT_COLOR invalid under WebGL");
|
||||
return error(GL_INVALID_OPERATION);
|
||||
}
|
||||
|
||||
gl::Context *context = gl::getContext();
|
||||
|
|
|
@ -37,8 +37,8 @@ D3DCMPFUNC ConvertComparison(GLenum comparison)
|
|||
D3DCOLOR ConvertColor(gl::Color color)
|
||||
{
|
||||
return D3DCOLOR_RGBA(gl::unorm<8>(color.red),
|
||||
gl::unorm<8>(color.blue),
|
||||
gl::unorm<8>(color.green),
|
||||
gl::unorm<8>(color.blue),
|
||||
gl::unorm<8>(color.alpha));
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче