Removed setting binding to 0 since order of operations may cause issues.

This commit is contained in:
Harrison Deng 2020-02-20 14:50:00 -05:00
parent 4f7c7dccb1
commit b9105e7179
2 changed files with 0 additions and 9 deletions

View File

@ -12,9 +12,6 @@ namespace RecrownedGTK.Graphics {
public void Bind() {
GL.BindVertexArray(handle);
}
public void End() {
GL.BindVertexArray(0);
}
/// <summary>
/// Creates a basic vertex attributes object handle that takes in vertices, texture coordinates, and a color.
@ -46,7 +43,6 @@ namespace RecrownedGTK.Graphics {
if (disposing) {
}
GL.BindVertexArray(0);
GL.DeleteVertexArray(handle);
disposed = true;
}

View File

@ -10,10 +10,6 @@ namespace RecrownedGTK.Graphics {
public void Bind() {
GL.BindBuffer(BufferTarget.ArrayBuffer, handle);
}
public void Unbind() {
GL.BindBuffer(BufferTarget.ArrayBuffer, 0);
}
public void Flush(float[] vertices, BufferUsageHint hint = BufferUsageHint.StaticDraw) {
GL.BufferData(BufferTarget.ArrayBuffer, vertices.Length * sizeof(float), vertices, hint);
}
@ -26,7 +22,6 @@ namespace RecrownedGTK.Graphics {
if (disposing) {
}
Unbind();
GL.DeleteBuffer(handle);
disposed = true;
}