Example #1
0
        private DepthStencilState(GraphicsDevice device, DepthStencilStateDescription depthStencilStateDescription)
            : base(device)
        {
            Description = depthStencilStateDescription;

            depthFunction = Description.DepthBufferFunction.ToOpenGLDepthFunction();
        }
Example #2
0
 public override void Reset()
 {
     Enabled  = true;
     Function = DepthFunction.Less;
     Near     = 0.0f;
     Far      = 1.0f;
 }
Example #3
0
        internal static OpenGLBindings.DepthFunc ToOpenGL(this DepthFunction depthFunction)
        {
            switch (depthFunction)
            {
            case DepthFunction.Never:
                return(OpenGLBindings.DepthFunc.Never);

            case DepthFunction.Less:
                return(OpenGLBindings.DepthFunc.Less);

            case DepthFunction.Equal:
                return(OpenGLBindings.DepthFunc.Equal);

            case DepthFunction.LessEqual:
                return(OpenGLBindings.DepthFunc.LessEqual);

            case DepthFunction.Greater:
                return(OpenGLBindings.DepthFunc.Greater);

            case DepthFunction.NotEqual:
                return(OpenGLBindings.DepthFunc.NotEqual);

            case DepthFunction.GreaterEqual:
                return(OpenGLBindings.DepthFunc.GreaterEqual);

            case DepthFunction.Always:
                return(OpenGLBindings.DepthFunc.Always);

            default:
                throw new IllegalValueException(typeof(DepthFunction), depthFunction);
            }
        }
Example #4
0
        internal static double ToWebGL(this DepthFunction depthFunction)
        {
            switch (depthFunction)
            {
            case DepthFunction.Never:
                return(GL.NEVER);

            case DepthFunction.Less:
                return(GL.LESS);

            case DepthFunction.Equal:
                return(GL.EQUAL);

            case DepthFunction.LessEqual:
                return(GL.LEQUAL);

            case DepthFunction.Greater:
                return(GL.GREATER);

            case DepthFunction.NotEqual:
                return(GL.NOTEQUAL);

            case DepthFunction.GreaterEqual:
                return(GL.GEQUAL);

            case DepthFunction.Always:
                return(GL.ALWAYS);

            default:
                throw new IllegalValueException(typeof(DepthFunction), depthFunction);
            }
        }
Example #5
0
        public void setDepthTest(DepthFunction depthFunction, float depthRangeNear, float depthRangeFar)
        {
            bool wasEnabled = depthFunc != 0;
            bool enabled    = depthFunction != 0;

            if (depthFunc != depthFunction)
            {
                depthFunc = depthFunction;
                if (enabled)
                {
                    GL.Enable(EnableCap.DepthTest);
                    GL.DepthFunc(depthFunction);
                }
                else
                {
                    GL.Disable(EnableCap.DepthTest);
                }
            }
            if (enabled)
            {
                if (!wasEnabled || depthFunc != depthFunction)
                {
                    GL.DepthFunc(depthFunc = depthFunction);
                }
                if (!wasEnabled || this.depthRangeNear != depthRangeNear || this.depthRangeFar != depthRangeFar)
                {
                    GL.DepthRange(this.depthRangeNear = depthRangeNear, this.depthRangeFar = depthRangeFar);
                }
            }
        }
        private DepthStencilState(GraphicsDevice device, DepthStencilStateDescription depthStencilStateDescription)
            : base(device)
        {
            Description = depthStencilStateDescription;

            depthFunction = Description.DepthBufferFunction.ToOpenGLDepthFunction();
        }
Example #7
0
        internal static OpenTK.Graphics.OpenGL.DepthFunction ToDepthFunctions(DepthFunction function)
        {
            switch (function)
            {
            case DepthFunction.Always:
                return(OpenTK.Graphics.OpenGL.DepthFunction.Always);

            case DepthFunction.Equal:
                return(OpenTK.Graphics.OpenGL.DepthFunction.Equal);

            case DepthFunction.Gequal:
                return(OpenTK.Graphics.OpenGL.DepthFunction.Gequal);

            case DepthFunction.Greater:
                return(OpenTK.Graphics.OpenGL.DepthFunction.Greater);

            case DepthFunction.Lequal:
                return(OpenTK.Graphics.OpenGL.DepthFunction.Lequal);

            case DepthFunction.Less:
                return(OpenTK.Graphics.OpenGL.DepthFunction.Less);

            case DepthFunction.Never:
                return(OpenTK.Graphics.OpenGL.DepthFunction.Never);

            case DepthFunction.Notequal:
                return(OpenTK.Graphics.OpenGL.DepthFunction.Notequal);

            default:
                throw new ArgumentException();
            }
        }
Example #8
0
 public static void DepthFunc(DepthFunction func)
 {
     if (func != depthFunc)
     {
         depthFunc = func;
         GL.DepthFunc(func);
     }
 }
Example #9
0
        public void DepthFunction(DepthFunction function)
        {
            int f = (int)function;

            //RegisteredFunction.InvokeUnmarshalled<int, int, object>(MethodPrefix + "InvokeUnmarshalled", 3, f);
            InvokeCanvasMethodUnmarshalled <object>(UnmarshalledCanvasMethod.DepthFunction, f);
            //InvokeCanvasMethod("depthFunc", new object[] { (int)function });
        }
Example #10
0
        public static void DepthFunc(DepthFunction func)
        {
#if USE_OPENGL
            OpenTK.Graphics.OpenGL.GL.DepthFunc((OpenTK.Graphics.OpenGL.DepthFunction)func);
#else
            OpenTK.Graphics.ES11.GL.DepthFunc((OpenTK.Graphics.ES11.All)func);
#endif
        }
Example #11
0
        internal static Comparison Convert(DepthFunction comparison)
        {
            if (!comparisons.ContainsValue(comparison))
            {
                throw new NotSupportedException("comparison are not supported");
            }

            return(comparisons.First((f) => f.Value == comparison).Key);
        }
Example #12
0
 public DepthState()
 {
     _depthFunction     = OpenTK.Graphics.OpenGL.DepthFunction.Lequal;
     _depthOffsetFactor = 0;
     _depthOffsetUnits  = 0;
     _depthWrite        = true;
     _depthEnabled      = true;
     _dirty             = true;
 }
Example #13
0
        public static void DepthFunc(DepthFunction depth)
        {
            GL.DepthFunc(depth);

            if (enableErrorCheck)
            {
                LogErrors();
            }
        }
        public void DepthFunc(DepthFunction depthFunc)
        {
            if (mDepthFunc == depthFunc)
            {
                return;
            }

            GL.DepthFunc(mDepthFunc = depthFunc);
        }
 public DepthTestAttribute(long type, DepthFunction depthFunc, float depthRangeNear, float depthRangeFar, bool depthMask) : base(type)
 {
     if (!@is(type))
     {
         throw new Exception("Invalid type specified");
     }
     this.depthFunc      = depthFunc;
     this.depthRangeNear = depthRangeNear;
     this.depthRangeFar  = depthRangeFar;
     this.depthMask      = depthMask;
 }
Example #16
0
        private SamplerState(GraphicsDevice device, SamplerStateDescription samplerStateDescription) : base(device)
        {
            Description = samplerStateDescription;

            textureWrapS = samplerStateDescription.AddressU.ToOpenGL();
            textureWrapT = samplerStateDescription.AddressV.ToOpenGL();
#if !SILICONSTUDIO_PARADOX_GRAPHICS_API_OPENGLES
            textureWrapR = samplerStateDescription.AddressW.ToOpenGL();
#endif
            compareFunc = samplerStateDescription.CompareFunction.ToOpenGLDepthFunction();
            borderColor = samplerStateDescription.BorderColor.ToArray();
            // TODO: How to do MipLinear vs MipPoint?
            switch (samplerStateDescription.Filter)
            {
            case TextureFilter.ComparisonMinMagLinearMipPoint:
            case TextureFilter.MinMagLinearMipPoint:
                minFilter = TextureMinFilter.Linear;
                magFilter = TextureMagFilter.Linear;
                break;

            case TextureFilter.Anisotropic:
            case TextureFilter.Linear:
                minFilter = TextureMinFilter.LinearMipmapLinear;
                magFilter = TextureMagFilter.Linear;
                break;

            case TextureFilter.MinPointMagMipLinear:
            case TextureFilter.ComparisonMinPointMagMipLinear:
                minFilter = TextureMinFilter.NearestMipmapLinear;
                magFilter = TextureMagFilter.Linear;
                break;

            case TextureFilter.Point:
                minFilter = TextureMinFilter.Nearest;
                magFilter = TextureMagFilter.Nearest;
                break;

            default:
                throw new NotImplementedException();
            }

#if SILICONSTUDIO_PARADOX_GRAPHICS_API_OPENGLES
            // On OpenGL ES, we need to choose the appropriate min filter ourself if the texture doesn't contain mipmaps (done at PreDraw)
            minFilterNoMipmap = minFilter;
            if (minFilterNoMipmap == TextureMinFilter.LinearMipmapLinear)
            {
                minFilterNoMipmap = TextureMinFilter.Linear;
            }
            else if (minFilterNoMipmap == TextureMinFilter.NearestMipmapLinear)
            {
                minFilterNoMipmap = TextureMinFilter.Nearest;
            }
#endif
        }
Example #17
0
        public void PrepareRender()
        {
            df = (DepthFunction)GL.GetInteger(GetPName.DepthFunc);

            if (outlinematerial != null)
            {
                Globals.ShaderOverride = outlinematerial.shader;
                Globals.ShaderOverride.Bind();
            }
            // Render the object
        }
Example #18
0
        public static void DepthFunc(DepthFunction func)
        {
#if USE_OPENGL
            if (HardwareAvailable)
            {
                OpenTK.Graphics.OpenGL.GL.DepthFunc((OpenTK.Graphics.OpenGL.DepthFunction)func);
            }
#else
            OpenTK.Graphics.ES11.GL.DepthFunc((OpenTK.Graphics.ES11.All)func);
#endif
        }
Example #19
0
 public GLState(CullFaceMode cullFaceMode, DepthFunction depthFunction, BlendingFactorSrc blendingFactorSrc,
                BlendingFactorDest blendingFactorDest, params EnableCap[] enableCaps)
 {
     CullFaceMode       = cullFaceMode;
     DepthFunction      = depthFunction;
     BlendingFactorSrc  = blendingFactorSrc;
     BlendingFactorDest = blendingFactorDest;
     EnableCaps         = enableCaps;
     _fullHash          = "{" + CullFaceMode + "}{" + DepthFunction + "}{" + BlendingFactorSrc + "}{" + BlendingFactorDest +
                          "}{" + EnableCaps.Aggregate("", (left, cap) => left + cap.ToString()) + "}";
 }
Example #20
0
 public void begin()
 {
     GL.Disable(EnableCap.DepthTest);
     depthFunc = 0;
     GL.DepthMask(true);
     depthMask = true;
     GL.Disable(EnableCap.Blend);
     blending = false;
     GL.Disable(EnableCap.CullFace);
     blendSFactor = blendDFactor = BlendingFactor.Zero;
     // todo: cullface = 0 ?
     textureBinder.begin();
 }
Example #21
0
        /// <summary>
        /// Merge this state with another one.
        /// </summary>
        /// <param name="state">
        /// A <see cref="IGraphicsState"/> having the same <see cref="StateIdentifier"/> of this state.
        /// </param>
        public override void Merge(IGraphicsState state)
        {
            if (state == null)
            {
                throw new ArgumentNullException("state");
            }

            DepthTestState otherState = state as DepthTestState;

            if (otherState == null)
            {
                throw new ArgumentException("not a DepthTestState", "state");
            }

            _Function = otherState._Function;
        }
        public State()
        {
            GL.Disable(EnableCap.Blend);
            GL.Enable(EnableCap.CullFace);
            GL.Enable(EnableCap.DepthTest);
            GL.DepthMask(true);
            GL.DepthFunc(DepthFunction.Less);
            GL.FrontFace(FrontFaceDirection.Ccw);
            GL.Enable(EnableCap.PrimitiveRestart);
            GL.PrimitiveRestartIndex(-1);

            mBlend     = false;
            mCullFace  = true;
            mDepthTest = true;
            mDepthMask = true;
            mDepthFunc = DepthFunction.Less;
        }
Example #23
0
        public static void DepthTest(bool enable = true, DepthFunction depthFunction = DepthFunction.Less)
        {
            if (enable)
            {
                if (!_depthTestEnabled)
                {
                    GL.Enable(EnableCap.DepthTest);
                }
                GL.DepthFunc(depthFunction);
            }
            else if (_depthTestEnabled)
            {
                GL.Disable(EnableCap.DepthTest);
            }

            _depthTestEnabled = enable;
        }
Example #24
0
        private SamplerState(GraphicsDevice device, SamplerStateDescription samplerStateDescription) : base(device)
        {
            Description = samplerStateDescription;

            textureWrapS = samplerStateDescription.AddressU.ToOpenGL();
            textureWrapT = samplerStateDescription.AddressV.ToOpenGL();
            textureWrapR = samplerStateDescription.AddressW.ToOpenGL();
      
            compareFunc = samplerStateDescription.CompareFunction.ToOpenGLDepthFunction();
            borderColor = samplerStateDescription.BorderColor.ToArray();
            // TODO: How to do MipLinear vs MipPoint?
            switch (samplerStateDescription.Filter)
            {
                case TextureFilter.ComparisonMinMagLinearMipPoint:
                case TextureFilter.MinMagLinearMipPoint:
                    minFilter = TextureMinFilter.Linear;
                    magFilter = TextureMagFilter.Linear;
                    break;
                case TextureFilter.Anisotropic:
                case TextureFilter.Linear:
                    minFilter = TextureMinFilter.LinearMipmapLinear;
                    magFilter = TextureMagFilter.Linear;
                    break;
                case TextureFilter.MinPointMagMipLinear:
                case TextureFilter.ComparisonMinPointMagMipLinear:
                    minFilter = TextureMinFilter.NearestMipmapLinear;
                    magFilter = TextureMagFilter.Linear;
                    break;
                case TextureFilter.Point:
                    minFilter = TextureMinFilter.Nearest;
                    magFilter = TextureMagFilter.Nearest;
                    break;
                default:
                    throw new NotImplementedException();
            }

#if SILICONSTUDIO_PARADOX_GRAPHICS_API_OPENGLES
            // On OpenGL ES, we need to choose the appropriate min filter ourself if the texture doesn't contain mipmaps (done at PreDraw)
            minFilterNoMipmap = minFilter;
            if (minFilterNoMipmap == TextureMinFilter.LinearMipmapLinear)
                minFilterNoMipmap = TextureMinFilter.Linear;
            else if (minFilterNoMipmap == TextureMinFilter.NearestMipmapLinear)
                minFilterNoMipmap = TextureMinFilter.Nearest;
#endif
        }
        private SamplerState(GraphicsDevice device, SamplerStateDescription samplerStateDescription) : base(device)
        {
            Description = samplerStateDescription;

            textureWrapS = samplerStateDescription.AddressU.ToOpenGL();
            textureWrapT = samplerStateDescription.AddressV.ToOpenGL();
            textureWrapR = samplerStateDescription.AddressW.ToOpenGL();

            compareMode = TextureCompareMode.None;

            // ComparisonPoint can act as a mask for Comparison filters (0x80)
            if ((samplerStateDescription.Filter & ComparisonMask) != 0)
                compareMode = TextureCompareMode.CompareRefToTexture;

            compareFunc = samplerStateDescription.CompareFunction.ToOpenGLDepthFunction();
            borderColor = samplerStateDescription.BorderColor.ToArray();
            // TODO: How to do MipLinear vs MipPoint?
            switch (samplerStateDescription.Filter & ~(ComparisonMask | AnisotropicMask)) // Ignore comparison (128) and anisotropic (64) part
            {
                case TextureFilter.MinMagLinearMipPoint:
                    minFilter = TextureMinFilter.LinearMipmapNearest;
                    magFilter = TextureMagFilter.Linear;
                    break;
                case TextureFilter.Linear:
                    minFilter = TextureMinFilter.LinearMipmapLinear;
                    magFilter = TextureMagFilter.Linear;
                    break;
                case TextureFilter.MinPointMagMipLinear:
                    minFilter = TextureMinFilter.NearestMipmapLinear;
                    magFilter = TextureMagFilter.Linear;
                    break;
                case TextureFilter.Point:
                    minFilter = TextureMinFilter.NearestMipmapNearest;
                    magFilter = TextureMagFilter.Nearest;
                    break;
                case TextureFilter.MinPointMagLinearMipPoint:
                    minFilter = TextureMinFilter.NearestMipmapNearest;
                    magFilter = TextureMagFilter.Linear;
                    break;
                case TextureFilter.MinLinearMagMipPoint:
                    minFilter = TextureMinFilter.LinearMipmapNearest;
                    magFilter = TextureMagFilter.Nearest;
                    break;
                case TextureFilter.MinMagPointMipLinear:
                    minFilter = TextureMinFilter.NearestMipmapLinear;
                    magFilter = TextureMagFilter.Nearest;
                    break;
                case TextureFilter.MinLinearMagPointMipLinear:
                    minFilter = TextureMinFilter.LinearMipmapLinear;
                    magFilter = TextureMagFilter.Nearest;
                    break;
                default:
                    throw new NotImplementedException();
            }

            maxAnisotropy = ((samplerStateDescription.Filter & AnisotropicMask) != 0) ? Description.MaxAnisotropy : 1;

#if SILICONSTUDIO_XENKO_GRAPHICS_API_OPENGLES
            // On OpenGL ES, we need to choose the appropriate min filter ourself if the texture doesn't contain mipmaps (done at PreDraw)
            minFilterNoMipmap = minFilter;
            if (minFilterNoMipmap == TextureMinFilter.LinearMipmapLinear)
                minFilterNoMipmap = TextureMinFilter.Linear;
            else if (minFilterNoMipmap == TextureMinFilter.NearestMipmapLinear)
                minFilterNoMipmap = TextureMinFilter.Nearest;
#endif
        }
Example #26
0
		/// <summary>
		/// Merge this state with another one.
		/// </summary>
		/// <param name="state">
		/// A <see cref="IGraphicsState"/> having the same <see cref="StateIdentifier"/> of this state.
		/// </param>
		public override void Merge(IGraphicsState state)
		{
			if (state == null)
				throw new ArgumentNullException("state");

			DepthTestState otherState = state as DepthTestState;

			if (otherState == null)
				throw new ArgumentException("not a DepthTestState", "state");

			_Function = otherState._Function;
		}
Example #27
0
		public static void SetDepthMode(DepthFunction depth)
		{
			GL.Enable(EnableCap.DepthTest);
			GL.DepthFunc(depth);
		}
Example #28
0
        private SamplerState(GraphicsDevice device, SamplerStateDescription samplerStateDescription) : base(device)
        {
            Description = samplerStateDescription;

            textureWrapS = samplerStateDescription.AddressU.ToOpenGL();
            textureWrapT = samplerStateDescription.AddressV.ToOpenGL();
            textureWrapR = samplerStateDescription.AddressW.ToOpenGL();

            compareMode = TextureCompareMode.None;

            // ComparisonPoint can act as a mask for Comparison filters (0x80)
            if ((samplerStateDescription.Filter & ComparisonMask) != 0)
            {
                compareMode = TextureCompareMode.CompareRefToTexture;
            }

            compareFunc = samplerStateDescription.CompareFunction.ToOpenGLDepthFunction();
            borderColor = samplerStateDescription.BorderColor.ToArray();
            // TODO: How to do MipLinear vs MipPoint?
            switch (samplerStateDescription.Filter & ~(ComparisonMask | AnisotropicMask)) // Ignore comparison (128) and anisotropic (64) part
            {
            case TextureFilter.MinMagLinearMipPoint:
                minFilter = TextureMinFilter.LinearMipmapNearest;
                magFilter = TextureMagFilter.Linear;
                break;

            case TextureFilter.Linear:
                minFilter = TextureMinFilter.LinearMipmapLinear;
                magFilter = TextureMagFilter.Linear;
                break;

            case TextureFilter.MinPointMagMipLinear:
                minFilter = TextureMinFilter.NearestMipmapLinear;
                magFilter = TextureMagFilter.Linear;
                break;

            case TextureFilter.Point:
                minFilter = TextureMinFilter.NearestMipmapNearest;
                magFilter = TextureMagFilter.Nearest;
                break;

            case TextureFilter.MinPointMagLinearMipPoint:
                minFilter = TextureMinFilter.NearestMipmapNearest;
                magFilter = TextureMagFilter.Linear;
                break;

            case TextureFilter.MinLinearMagMipPoint:
                minFilter = TextureMinFilter.LinearMipmapNearest;
                magFilter = TextureMagFilter.Nearest;
                break;

            case TextureFilter.MinMagPointMipLinear:
                minFilter = TextureMinFilter.NearestMipmapLinear;
                magFilter = TextureMagFilter.Nearest;
                break;

            case TextureFilter.MinLinearMagPointMipLinear:
                minFilter = TextureMinFilter.LinearMipmapLinear;
                magFilter = TextureMagFilter.Nearest;
                break;

            default:
                throw new NotImplementedException();
            }

            maxAnisotropy = ((samplerStateDescription.Filter & AnisotropicMask) != 0) ? Description.MaxAnisotropy : 1;

#if STRIDE_GRAPHICS_API_OPENGLES
            // On OpenGL ES, we need to choose the appropriate min filter ourself if the texture doesn't contain mipmaps (done at PreDraw)
            minFilterNoMipmap = minFilter;
            if (minFilterNoMipmap == TextureMinFilter.LinearMipmapLinear)
            {
                minFilterNoMipmap = TextureMinFilter.Linear;
            }
            else if (minFilterNoMipmap == TextureMinFilter.NearestMipmapLinear)
            {
                minFilterNoMipmap = TextureMinFilter.Nearest;
            }
#endif
        }
Example #29
0
 public void setDepthTest(DepthFunction depthFunction)
 {
     setDepthTest(depthFunction, 0f, 1f);
 }
Example #30
0
		public static void DepthFunc(DepthFunction func)
		{
			glDepthFunc deleg = BaseGraphicsContext.Current.Loader.Get<glDepthFunc>();
			if (deleg != null)
				deleg(func);
		}
		public static void PathCoverDepthFuncNV(DepthFunction func)
		{
			Debug.Assert(Delegates.pglPathCoverDepthFuncNV != null, "pglPathCoverDepthFuncNV not implemented");
			Delegates.pglPathCoverDepthFuncNV((Int32)func);
			LogFunction("glPathCoverDepthFuncNV({0})", func);
			DebugCheckErrors(null);
		}
Example #32
0
 public int CreateRenderState(bool enableAlphaBlend = false, bool enableDepthWrite = true, bool enableDepthTest = true, BlendingFactorSrc src = BlendingFactorSrc.Zero, BlendingFactorDest dest = BlendingFactorDest.One, CullFaceMode cullFaceMode = CullFaceMode.Back, bool enableCullFace = true, DepthFunction depthFunction = DepthFunction.Less)
 {
     return RenderSystem.CreateRenderState(enableAlphaBlend, enableDepthWrite, enableDepthTest, src, dest, cullFaceMode, enableCullFace, depthFunction);
 }
Example #33
0
 public static void DepthFunc(DepthFunction func)
 {
     gl.glDepthFunc((int)func);
 }
Example #34
0
 public static Reaction <T> DepthTest <T> (this Reaction <T> render,
                                           DepthFunction depthFunction = DepthFunction.Less)
 {
     return(render.DepthTest(i => depthFunction));
 }
Example #35
0
 public DepthInfo(bool depthTest = true, bool writeDepth = true, DepthFunction function = DepthFunction.Less)
 {
     DepthTest  = depthTest;
     WriteDepth = writeDepth;
     Function   = function;
 }
Example #36
0
 public static void glDepthFunc(DepthFunction func)
 {
     i_OpenGL1_0.glDepthFunc(func);
 }
Example #37
0
		internal static extern void glDepthFunc(DepthFunction func);
Example #38
0
 public void TexParameter(TextureParameterName TPN, DepthFunction Param)
 {
     TexParameter(TPN, (int)Param);
 }
Example #39
0
 internal static extern void glDepthFunc(DepthFunction func);
Example #40
0
		/// <summary>
		/// Construct a DepthTestState.
		/// </summary>
		/// <param name="depthFunction">
		/// A <see cref="DepthFunction"/> that specify the test function to apply.
		/// </param>
		public DepthTestState(DepthFunction depthFunction)
		{
			_Function = depthFunction;
		}
 public static extern void DepthFunc( DepthFunction func );
Example #42
0
		public static void DepthFunc(DepthFunction func)
		{
#if USE_OPENGL
			if (openGlHardwareAvailable)
			{
				OpenTK.Graphics.OpenGL.GL.DepthFunc((OpenTK.Graphics.OpenGL.DepthFunction)func);
			}
#else
			OpenTK.Graphics.ES11.GL.DepthFunc((OpenTK.Graphics.ES11.All)func);
#endif
		}
Example #43
0
 /// <summary>
 /// specify the value used for depth buffer comparisons
 /// </summary>
 /// <param name="function">Specifies the depth comparison function. Symbolic constants GL_NEVER, GL_LESS, GL_EQUAL, GL_LEQUAL, GL_GREATER, GL_NOTEQUAL, GL_GEQUAL, and GL_ALWAYS are accepted. The initial value is GL_LESS.</param>
 /// <remarks>glDepthFunc specifies the function used to compare each incoming pixel depth value with the depth value present in the depth buffer. The comparison is performed only if depth testing is enabled. (See glEnable and glDisable of GL_DEPTH_TEST.)</remarks>
 public static void DepthFunc(DepthFunction function)
 {
     Delegates.glDepthFunc(function);
 }
Example #44
0
		public static void DepthFunc(DepthFunction func)
		{
			Debug.Assert(Delegates.pglDepthFunc != null, "pglDepthFunc not implemented");
			Delegates.pglDepthFunc((Int32)func);
			CallLog("glDepthFunc({0})", func);
			DebugCheckErrors();
		}
Example #45
0
 public static extern void glDepthFunc(DepthFunction function);
Example #46
0
 public static void DepthFunc(DepthFunction func)
 {
     Instance?.DepthFunc(func);
 }
Example #47
0
 public void DepthFunc(DepthFunction func)
 {
     gl.glDepthFunc((int)func);
     CheckException();
 }