aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.OpenGL/Renderer.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Ryujinx.Graphics.OpenGL/Renderer.cs')
-rw-r--r--Ryujinx.Graphics.OpenGL/Renderer.cs20
1 files changed, 18 insertions, 2 deletions
diff --git a/Ryujinx.Graphics.OpenGL/Renderer.cs b/Ryujinx.Graphics.OpenGL/Renderer.cs
index b3ae8c33..15b223f5 100644
--- a/Ryujinx.Graphics.OpenGL/Renderer.cs
+++ b/Ryujinx.Graphics.OpenGL/Renderer.cs
@@ -1,6 +1,7 @@
using OpenTK.Graphics.OpenGL;
using Ryujinx.Common.Logging;
using Ryujinx.Graphics.GAL;
+using Ryujinx.Graphics.OpenGL.Image;
using Ryujinx.Graphics.OpenGL.Queries;
using Ryujinx.Graphics.Shader;
using System;
@@ -38,9 +39,9 @@ namespace Ryujinx.Graphics.OpenGL
return new Shader(shader);
}
- public IBuffer CreateBuffer(int size)
+ public BufferHandle CreateBuffer(int size)
{
- return new Buffer(size);
+ return Buffer.Create(size);
}
public IProgram CreateProgram(IShader[] shaders)
@@ -58,6 +59,16 @@ namespace Ryujinx.Graphics.OpenGL
return info.Target == Target.TextureBuffer ? new TextureBuffer(info) : new TextureStorage(this, info).CreateDefaultView();
}
+ public void DeleteBuffer(BufferHandle buffer)
+ {
+ Buffer.Delete(buffer);
+ }
+
+ public byte[] GetBufferData(BufferHandle buffer, int offset, int size)
+ {
+ return Buffer.GetData(buffer, offset, size);
+ }
+
public Capabilities GetCapabilities()
{
return new Capabilities(
@@ -68,6 +79,11 @@ namespace Ryujinx.Graphics.OpenGL
HwCapabilities.MaxSupportedAnisotropy);
}
+ public void SetBufferData(BufferHandle buffer, int offset, ReadOnlySpan<byte> data)
+ {
+ Buffer.SetData(buffer, offset, data);
+ }
+
public void UpdateCounters()
{
_counters.Update();