aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2018-07-08 13:14:35 -0300
committergdkchan <gab.dark.100@gmail.com>2018-07-08 13:14:35 -0300
commit6479c3e48479259bca79bee6f1016e8108cc33a8 (patch)
tree2ed7e5460ff1d8b24600e748c2c101754a93c799 /Ryujinx.Graphics
parentdc04b5465fe57231e88411c4771f2d63c9b342c1 (diff)
Implement GPU primitive restart (#221)
Diffstat (limited to 'Ryujinx.Graphics')
-rw-r--r--Ryujinx.Graphics/Gal/IGalRasterizer.cs6
-rw-r--r--Ryujinx.Graphics/Gal/OpenGL/OGLRasterizer.cs15
2 files changed, 21 insertions, 0 deletions
diff --git a/Ryujinx.Graphics/Gal/IGalRasterizer.cs b/Ryujinx.Graphics/Gal/IGalRasterizer.cs
index 586eae6b..2598efb6 100644
--- a/Ryujinx.Graphics/Gal/IGalRasterizer.cs
+++ b/Ryujinx.Graphics/Gal/IGalRasterizer.cs
@@ -36,6 +36,12 @@ namespace Ryujinx.Graphics.Gal
void SetClearStencil(int Stencil);
+ void EnablePrimitiveRestart();
+
+ void DisablePrimitiveRestart();
+
+ void SetPrimitiveRestartIndex(uint Index);
+
void CreateVbo(long Key, byte[] Buffer);
void CreateIbo(long Key, byte[] Buffer);
diff --git a/Ryujinx.Graphics/Gal/OpenGL/OGLRasterizer.cs b/Ryujinx.Graphics/Gal/OpenGL/OGLRasterizer.cs
index b9885711..a4ec7f87 100644
--- a/Ryujinx.Graphics/Gal/OpenGL/OGLRasterizer.cs
+++ b/Ryujinx.Graphics/Gal/OpenGL/OGLRasterizer.cs
@@ -184,6 +184,21 @@ namespace Ryujinx.Graphics.Gal.OpenGL
GL.ClearStencil(Stencil);
}
+ public void EnablePrimitiveRestart()
+ {
+ GL.Enable(EnableCap.PrimitiveRestart);
+ }
+
+ public void DisablePrimitiveRestart()
+ {
+ GL.Disable(EnableCap.PrimitiveRestart);
+ }
+
+ public void SetPrimitiveRestartIndex(uint Index)
+ {
+ GL.PrimitiveRestartIndex(Index);
+ }
+
public void CreateVbo(long Key, byte[] Buffer)
{
int Handle = GL.GenBuffer();