Implement alpha test using legacy functions (#1426)
This commit is contained in:
@ -157,7 +157,6 @@ namespace Ryujinx.Graphics.OpenGL
|
||||
if (!_program.IsLinked)
|
||||
{
|
||||
Logger.PrintDebug(LogClass.Gpu, "Dispatch error, shader not linked.");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@ -171,7 +170,6 @@ namespace Ryujinx.Graphics.OpenGL
|
||||
if (!_program.IsLinked)
|
||||
{
|
||||
Logger.PrintDebug(LogClass.Gpu, "Draw error, shader not linked.");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@ -290,7 +288,6 @@ namespace Ryujinx.Graphics.OpenGL
|
||||
if (!_program.IsLinked)
|
||||
{
|
||||
Logger.PrintDebug(LogClass.Gpu, "Draw error, shader not linked.");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@ -527,12 +524,23 @@ namespace Ryujinx.Graphics.OpenGL
|
||||
_tfEnabled = false;
|
||||
}
|
||||
|
||||
public void SetAlphaTest(bool enable, float reference, CompareOp op)
|
||||
{
|
||||
if (!enable)
|
||||
{
|
||||
GL.Disable(EnableCap.AlphaTest);
|
||||
return;
|
||||
}
|
||||
|
||||
GL.AlphaFunc((AlphaFunction)op.Convert(), reference);
|
||||
GL.Enable(EnableCap.AlphaTest);
|
||||
}
|
||||
|
||||
public void SetBlendState(int index, BlendDescriptor blend)
|
||||
{
|
||||
if (!blend.Enable)
|
||||
{
|
||||
GL.Disable(IndexedEnableCap.Blend, index);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@ -658,7 +666,6 @@ namespace Ryujinx.Graphics.OpenGL
|
||||
if (!enable)
|
||||
{
|
||||
GL.Disable(EnableCap.CullFace);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@ -742,7 +749,6 @@ namespace Ryujinx.Graphics.OpenGL
|
||||
if (!enable)
|
||||
{
|
||||
GL.Disable(EnableCap.PrimitiveRestart);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@ -874,7 +880,6 @@ namespace Ryujinx.Graphics.OpenGL
|
||||
if (!stencilTest.TestEnable)
|
||||
{
|
||||
GL.Disable(EnableCap.StencilTest);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1077,7 +1082,6 @@ namespace Ryujinx.Graphics.OpenGL
|
||||
if (buffer.Handle == null)
|
||||
{
|
||||
GL.BindBufferRange(target, bindingPoint, 0, IntPtr.Zero, 0);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user