Correct GLboolean handling for glColorMask and glSampleCoverage

TRAC #11597 Signed-off-by: Shannon Woods Signed-off-bY: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@294 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent a5d7623d
......@@ -78,7 +78,7 @@ Context::Context(const egl::Config *config)
mState.sampleAlphaToCoverage = false;
mState.sampleCoverage = false;
mState.sampleCoverageValue = 1.0f;
mState.sampleCoverageInvert = GL_FALSE;
mState.sampleCoverageInvert = false;
mState.scissorTest = false;
mState.dither = true;
mState.generateMipmapHint = GL_DONT_CARE;
......@@ -571,7 +571,7 @@ bool Context::isSampleCoverageEnabled() const
return mState.sampleCoverage;
}
void Context::setSampleCoverageParams(GLclampf value, GLboolean invert)
void Context::setSampleCoverageParams(GLclampf value, bool invert)
{
if (mState.sampleCoverageValue != value ||
mState.sampleCoverageInvert != invert)
......
......@@ -153,7 +153,7 @@ struct State
bool sampleAlphaToCoverage;
bool sampleCoverage;
GLclampf sampleCoverageValue;
GLboolean sampleCoverageInvert;
bool sampleCoverageInvert;
bool scissorTest;
bool dither;
......@@ -255,7 +255,7 @@ class Context
void setSampleCoverage(bool enabled);
bool isSampleCoverageEnabled() const;
void setSampleCoverageParams(GLclampf value, GLboolean invert);
void setSampleCoverageParams(GLclampf value, bool invert);
void setScissorTest(bool enabled);
bool isScissorTestEnabled() const;
......
......@@ -669,7 +669,7 @@ void __stdcall glColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboo
if (context)
{
context->setColorMask(red != GL_FALSE, green != GL_FALSE, blue != GL_FALSE, alpha != GL_FALSE);
context->setColorMask(red == GL_TRUE, green == GL_TRUE, blue == GL_TRUE, alpha == GL_TRUE);
}
}
catch(std::bad_alloc&)
......@@ -3596,7 +3596,7 @@ void __stdcall glSampleCoverage(GLclampf value, GLboolean invert)
if (context)
{
context->setSampleCoverageParams(gl::clamp01(value), invert);
context->setSampleCoverageParams(gl::clamp01(value), invert == GL_TRUE);
}
}
catch(std::bad_alloc&)
......
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