Example #1
0
 public void ApplyAlphaCompareBlendMode()
 {
     if (AlphaTest != null)
     {
         AlphaTest.Apply();
     }
     else
     {
         Gl.glEnable(Gl.GL_ALPHA_TEST);
         Gl.glAlphaFunc(Gl.GL_ALWAYS, 0);
         Gl.glEnable(Gl.GL_ALPHA_TEST);
     }
     if (ColorBlendMode != null)
     {
         ColorBlendMode.Apply();
     }
     else
     {
         Gl.glEnable(Gl.GL_BLEND);
         Gl.glBlendEquation(Gl.GL_FUNC_ADD);
         Gl.glBlendFunc(Gl.GL_SRC_ALPHA, Gl.GL_ONE_MINUS_SRC_ALPHA);
         Gl.glEnable(Gl.GL_BLEND);
     }
 }
Example #2
0
 public void ApplyAlphaCompareBlendMode()
 {
     if (AlphaTest != null)
     {
         AlphaTest.Apply();
     }
     else
     {
         GL.Enable(EnableCap.AlphaTest);
         GL.AlphaFunc(AlphaFunction.Always, 0);
         GL.Enable(EnableCap.AlphaTest);
     }
     if (ColorBlendMode != null)
     {
         ColorBlendMode.Apply();
     }
     else
     {
         GL.Enable(EnableCap.Blend);
         GL.BlendEquation(BlendEquationMode.FuncAdd);
         GL.BlendFunc(BlendingFactor.SrcAlpha, BlendingFactor.OneMinusSrcAlpha);
         GL.Enable(EnableCap.Blend);
     }
 }