GetBooleanv() private method

private GetBooleanv ( UInt32 pname, [ @params ) : void
pname System.UInt32
@params [
return void
示例#1
0
        public unsafe void ClearDepthStencil()
        {
            bool depthWrite = true;

            GL.GetBooleanv(GL.DEPTH_WRITEMASK, &depthWrite);
            if (depthWrite != true)
            {
                GL.DepthMask(true);
            }

            GL.Clear(GL.DEPTH_BUFFER_BIT | GL.STENCIL_BUFFER_BIT);

            if (depthWrite != true)
            {
                GL.DepthMask(false);
            }
        }
示例#2
0
        public unsafe void ClearColorDepth(float r, float g, float b, float a)
        {
            bool depthWrite = true;

            GL.GetBooleanv(GL.DEPTH_WRITEMASK, &depthWrite);
            if (depthWrite != true)
            {
                GL.DepthMask(true);
            }

            GL.ClearColor(r, g, b, a);
            GL.Clear(GL.COLOR_BUFFER_BIT | GL.DEPTH_BUFFER_BIT);

            if (depthWrite != true)
            {
                GL.DepthMask(false);
            }
        }