Implements separate stencil support to proposed WebGL limitations

TRAC #11450 Author: Shannon Woods Signed-off-by: Andrew Lewycky Signed-off-by: Daniel Koch git-svn-id: https://angleproject.googlecode.com/svn/trunk@32 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent f67f82ec
......@@ -908,9 +908,11 @@ void Context::applyState()
const D3DRENDERSTATETYPE D3DRS_CCW_STENCILREF = D3DRS_STENCILREF;
const D3DRENDERSTATETYPE D3DRS_CCW_STENCILMASK = D3DRS_STENCILMASK;
const D3DRENDERSTATETYPE D3DRS_CCW_STENCILWRITEMASK = D3DRS_STENCILWRITEMASK;
ASSERT(stencilRef == stencilBackRef);
ASSERT(stencilMask == stencilBackMask);
ASSERT(stencilWritemask == stencilBackWritemask);
if(stencilWritemask != stencilBackWritemask || stencilRef != stencilBackRef || stencilMask != stencilBackMask)
{
ERR("Separate front/back stencil writemasks, reference values, or stencil mask values are invalid under WebGL.");
return error(GL_INVALID_OPERATION);
}
device->SetRenderState(frontFace == GL_CCW ? D3DRS_STENCILWRITEMASK : D3DRS_CCW_STENCILWRITEMASK, stencilWritemask);
device->SetRenderState(frontFace == GL_CCW ? D3DRS_STENCILFUNC : D3DRS_CCW_STENCILFUNC, es2dx::ConvertComparison(stencilFunc));
......
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