StencilOp() private method

private StencilOp ( UInt32 fail, UInt32 zfail, UInt32 zpass ) : void
fail System.UInt32
zfail System.UInt32
zpass System.UInt32
return void
示例#1
0
        public void Enable()
        {
            if (desc.depthReadEnable)
            {
                GL.Enable(GL.DEPTH_TEST);
                GL.DepthFunc(desc.depthFunc);
            }
            else
            {
                GL.Disable(GL.DEPTH_TEST);
            }

            if (desc.depthWriteEnable)
            {
                GL.DepthMask(true);
            }
            else
            {
                GL.DepthMask(false);
            }

            if (desc.stencilEnable)
            {
                GL.Enable(GL.STENCIL_TEST);
                GL.StencilFunc(desc.stencilFunc, 0, 0xFFFFFFFF);
                //GL.StencilFuncSeparate(depthStencilDesc.StencilFunc, 0, 0xFFFFFFFF);
                GL.StencilOp(desc.stencilFailOp, desc.stencilDepthFailOp, desc.stencilPassOp);
                //GL.StencilOpSeparate(depthStencilDesc.StencilFailOp, depthStencilDesc.StencilDepthFailOp, depthStencilDesc.StencilPassOp);
            }
            else
            {
                GL.Disable(GL.STENCIL_TEST);
            }

                        #if DEBUG
            Video.checkForError();
                        #endif
        }