Commit c5f8dea4 by enne@chromium.org

Allow multisampling without enabling GL_SAMPLE_COVERAGE.

This setting is only used when an application wants to control which samples are written to. If it is disabled, multisampling should just write to all samples. BUG=38 Review URL: http://codereview.appspot.com/2194043 git-svn-id: https://angleproject.googlecode.com/svn/trunk@431 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent 0fa74639
...@@ -1896,16 +1896,18 @@ void Context::applyState(GLenum drawMode) ...@@ -1896,16 +1896,18 @@ void Context::applyState(GLenum drawMode)
mPolygonOffsetStateDirty = false; mPolygonOffsetStateDirty = false;
} }
if (framebufferObject->isMultisample() && mSampleStateDirty) if (mSampleStateDirty)
{
if (framebufferObject->isMultisample())
{ {
if (mState.sampleAlphaToCoverage) if (mState.sampleAlphaToCoverage)
{ {
FIXME("Sample alpha to coverage is unimplemented."); FIXME("Sample alpha to coverage is unimplemented.");
} }
device->SetRenderState(D3DRS_MULTISAMPLEANTIALIAS, TRUE);
if (mState.sampleCoverage) if (mState.sampleCoverage)
{ {
device->SetRenderState(D3DRS_MULTISAMPLEANTIALIAS, TRUE);
unsigned int mask = 0; unsigned int mask = 0;
if (mState.sampleCoverageValue != 0) if (mState.sampleCoverageValue != 0)
{ {
...@@ -1932,6 +1934,11 @@ void Context::applyState(GLenum drawMode) ...@@ -1932,6 +1934,11 @@ void Context::applyState(GLenum drawMode)
} }
else else
{ {
device->SetRenderState(D3DRS_MULTISAMPLEMASK, 0xFFFFFFFF);
}
}
else
{
device->SetRenderState(D3DRS_MULTISAMPLEANTIALIAS, FALSE); device->SetRenderState(D3DRS_MULTISAMPLEANTIALIAS, FALSE);
} }
......
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