コード例 #1
0
        private DepthStencilState(GraphicsDevice device, DepthStencilStateDescription depthStencilStateDescription)
            : base(device)
        {
            Description = depthStencilStateDescription;

            depthFunction = Description.DepthBufferFunction.ToOpenGLDepthFunction();
        }
コード例 #2
0
 public override void Reset()
 {
     Enabled  = true;
     Function = DepthFunction.Less;
     Near     = 0.0f;
     Far      = 1.0f;
 }
コード例 #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);
            }
        }
コード例 #4
0
ファイル: WebGLCKGLConversions.cs プロジェクト: turric4n/CKGL
        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);
            }
        }
コード例 #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);
                }
            }
        }
コード例 #6
0
        private DepthStencilState(GraphicsDevice device, DepthStencilStateDescription depthStencilStateDescription)
            : base(device)
        {
            Description = depthStencilStateDescription;

            depthFunction = Description.DepthBufferFunction.ToOpenGLDepthFunction();
        }
コード例 #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();
            }
        }
コード例 #8
0
 public static void DepthFunc(DepthFunction func)
 {
     if (func != depthFunc)
     {
         depthFunc = func;
         GL.DepthFunc(func);
     }
 }
コード例 #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 });
        }
コード例 #10
0
ファイル: GL.cs プロジェクト: asmboom/PixelFarm
        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
        }
コード例 #11
0
ファイル: EnumConverter.cs プロジェクト: K0bin/DotGame
        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);
        }
コード例 #12
0
ファイル: DepthState.cs プロジェクト: mlunnay/minotaur
 public DepthState()
 {
     _depthFunction     = OpenTK.Graphics.OpenGL.DepthFunction.Lequal;
     _depthOffsetFactor = 0;
     _depthOffsetUnits  = 0;
     _depthWrite        = true;
     _depthEnabled      = true;
     _dirty             = true;
 }
コード例 #13
0
        public static void DepthFunc(DepthFunction depth)
        {
            GL.DepthFunc(depth);

            if (enableErrorCheck)
            {
                LogErrors();
            }
        }
コード例 #14
0
        public void DepthFunc(DepthFunction depthFunc)
        {
            if (mDepthFunc == depthFunc)
            {
                return;
            }

            GL.DepthFunc(mDepthFunc = depthFunc);
        }
コード例 #15
0
 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;
 }
コード例 #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
        }
コード例 #17
0
        public void PrepareRender()
        {
            df = (DepthFunction)GL.GetInteger(GetPName.DepthFunc);

            if (outlinematerial != null)
            {
                Globals.ShaderOverride = outlinematerial.shader;
                Globals.ShaderOverride.Bind();
            }
            // Render the object
        }
コード例 #18
0
ファイル: GL.cs プロジェクト: sanyaade-3dprinting/agg-sharp
        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
        }
コード例 #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()) + "}";
 }
コード例 #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();
 }
コード例 #21
0
ファイル: DepthTestState.cs プロジェクト: vazgriz/OpenGL.Net
        /// <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;
        }
コード例 #22
0
        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;
        }
コード例 #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;
        }
コード例 #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
        }
コード例 #25
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 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
        }
コード例 #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;
		}
コード例 #27
0
ファイル: OpenGLState.cs プロジェクト: treytomes/ASCIIWorld2
		public static void SetDepthMode(DepthFunction depth)
		{
			GL.Enable(EnableCap.DepthTest);
			GL.DepthFunc(depth);
		}
コード例 #28
0
ファイル: SamplerState.OpenGL.cs プロジェクト: Aggror/Stride
        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
        }
コード例 #29
0
 public void setDepthTest(DepthFunction depthFunction)
 {
     setDepthTest(depthFunction, 0f, 1f);
 }
コード例 #30
0
ファイル: GLCore.cs プロジェクト: whztt07/DeltaEngine
		public static void DepthFunc(DepthFunction func)
		{
			glDepthFunc deleg = BaseGraphicsContext.Current.Loader.Get<glDepthFunc>();
			if (deleg != null)
				deleg(func);
		}
コード例 #31
0
		public static void PathCoverDepthFuncNV(DepthFunction func)
		{
			Debug.Assert(Delegates.pglPathCoverDepthFuncNV != null, "pglPathCoverDepthFuncNV not implemented");
			Delegates.pglPathCoverDepthFuncNV((Int32)func);
			LogFunction("glPathCoverDepthFuncNV({0})", func);
			DebugCheckErrors(null);
		}
コード例 #32
0
ファイル: Backend.cs プロジェクト: johang88/triton
 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);
 }
コード例 #33
0
ファイル: GL.cs プロジェクト: Wiladams/NewTOAPIA
 public static void DepthFunc(DepthFunction func)
 {
     gl.glDepthFunc((int)func);
 }
コード例 #34
0
 public static Reaction <T> DepthTest <T> (this Reaction <T> render,
                                           DepthFunction depthFunction = DepthFunction.Less)
 {
     return(render.DepthTest(i => depthFunction));
 }
コード例 #35
0
 public DepthInfo(bool depthTest = true, bool writeDepth = true, DepthFunction function = DepthFunction.Less)
 {
     DepthTest  = depthTest;
     WriteDepth = writeDepth;
     Function   = function;
 }
コード例 #36
0
 public static void glDepthFunc(DepthFunction func)
 {
     i_OpenGL1_0.glDepthFunc(func);
 }
コード例 #37
0
ファイル: GLCore.cs プロジェクト: nagyist/Pencil.Gaming
		internal static extern void glDepthFunc(DepthFunction func);
コード例 #38
0
 public void TexParameter(TextureParameterName TPN, DepthFunction Param)
 {
     TexParameter(TPN, (int)Param);
 }
コード例 #39
0
 internal static extern void glDepthFunc(DepthFunction func);
コード例 #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;
		}
コード例 #41
0
 public static extern void DepthFunc( DepthFunction func );
コード例 #42
0
ファイル: GL.cs プロジェクト: CNCBrasil/agg-sharp
		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
		}
コード例 #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);
 }
コード例 #44
0
ファイル: Gl.VERSION_1_0.cs プロジェクト: MagmaiKH/OpenGL.Net
		public static void DepthFunc(DepthFunction func)
		{
			Debug.Assert(Delegates.pglDepthFunc != null, "pglDepthFunc not implemented");
			Delegates.pglDepthFunc((Int32)func);
			CallLog("glDepthFunc({0})", func);
			DebugCheckErrors();
		}
コード例 #45
0
 public static extern void glDepthFunc(DepthFunction function);
コード例 #46
0
 public static void DepthFunc(DepthFunction func)
 {
     Instance?.DepthFunc(func);
 }
コード例 #47
0
 public void DepthFunc(DepthFunction func)
 {
     gl.glDepthFunc((int)func);
     CheckException();
 }