Implement user-defined clipping on GL state pipeline (#1118)

This commit is contained in:
mageven 2020-05-04 07:34:49 +05:30 committed by GitHub
parent 12399b8aea
commit 53369e79bd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 38 additions and 0 deletions

View file

@ -811,6 +811,17 @@ namespace Ryujinx.Graphics.OpenGL
SetBuffer(index, stage, buffer, isStorage: false);
}
public void SetUserClipDistance(int index, bool enableClip)
{
if (!enableClip)
{
GL.Disable(EnableCap.ClipDistance0 + index);
return;
}
GL.Enable(EnableCap.ClipDistance0 + index);
}
public void SetVertexAttribs(VertexAttribDescriptor[] vertexAttribs)
{
EnsureVertexArray();