aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics/Gal/OpenGL/OGLStreamBuffer.cs
diff options
context:
space:
mode:
authorAlex Barney <thealexbarney@gmail.com>2019-03-03 19:45:25 -0600
committerjduncanator <1518948+jduncanator@users.noreply.github.com>2019-03-04 12:45:25 +1100
commit1f554c1093dde6a4d3ed80fae2675abfb6c12fac (patch)
treebbbdfb87999168288777ac404081f3e49c7440ae /Ryujinx.Graphics/Gal/OpenGL/OGLStreamBuffer.cs
parent8e71ea0812f6b56ff819dbda951b463bcb5eb8dc (diff)
Do naming refactoring on Ryujinx.Graphics (#611)
* Renaming part 1 * Renaming part 2 * Renaming part 3 * Renaming part 4 * Renaming part 5 * Renaming part 6 * Renaming part 7 * Renaming part 8 * Renaming part 9 * Renaming part 10 * General cleanup * Thought I got all of these * Apply #595 * Additional renaming * Tweaks from feedback * Rename files
Diffstat (limited to 'Ryujinx.Graphics/Gal/OpenGL/OGLStreamBuffer.cs')
-rw-r--r--Ryujinx.Graphics/Gal/OpenGL/OGLStreamBuffer.cs55
1 files changed, 0 insertions, 55 deletions
diff --git a/Ryujinx.Graphics/Gal/OpenGL/OGLStreamBuffer.cs b/Ryujinx.Graphics/Gal/OpenGL/OGLStreamBuffer.cs
deleted file mode 100644
index 411d33aa..00000000
--- a/Ryujinx.Graphics/Gal/OpenGL/OGLStreamBuffer.cs
+++ /dev/null
@@ -1,55 +0,0 @@
-using OpenTK.Graphics.OpenGL;
-using System;
-
-namespace Ryujinx.Graphics.Gal.OpenGL
-{
- class OGLStreamBuffer : IDisposable
- {
- public int Handle { get; protected set; }
-
- public long Size { get; protected set; }
-
- protected BufferTarget Target { get; private set; }
-
- public OGLStreamBuffer(BufferTarget Target, long Size)
- {
- this.Target = Target;
- this.Size = Size;
-
- Handle = GL.GenBuffer();
-
- GL.BindBuffer(Target, Handle);
-
- GL.BufferData(Target, (IntPtr)Size, IntPtr.Zero, BufferUsageHint.StreamDraw);
- }
-
- public void SetData(long Size, IntPtr HostAddress)
- {
- GL.BindBuffer(Target, Handle);
-
- GL.BufferSubData(Target, IntPtr.Zero, (IntPtr)Size, HostAddress);
- }
-
- public void SetData(byte[] Data)
- {
- GL.BindBuffer(Target, Handle);
-
- GL.BufferSubData(Target, IntPtr.Zero, (IntPtr)Data.Length, Data);
- }
-
- public void Dispose()
- {
- Dispose(true);
- }
-
- protected virtual void Dispose(bool Disposing)
- {
- if (Disposing && Handle != 0)
- {
- GL.DeleteBuffer(Handle);
-
- Handle = 0;
- }
- }
- }
-}