From b9105e7179055b7d71afb601b7c15471964163b5 Mon Sep 17 00:00:00 2001 From: Harrison Date: Thu, 20 Feb 2020 14:50:00 -0500 Subject: [PATCH] Removed setting binding to 0 since order of operations may cause issues. --- RecrownedGTK/Graphics/VertexAttributesHandle.cs | 4 ---- RecrownedGTK/Graphics/VertexBufferHandle.cs | 5 ----- 2 files changed, 9 deletions(-) diff --git a/RecrownedGTK/Graphics/VertexAttributesHandle.cs b/RecrownedGTK/Graphics/VertexAttributesHandle.cs index a93c3c2..ac24328 100644 --- a/RecrownedGTK/Graphics/VertexAttributesHandle.cs +++ b/RecrownedGTK/Graphics/VertexAttributesHandle.cs @@ -12,9 +12,6 @@ namespace RecrownedGTK.Graphics { public void Bind() { GL.BindVertexArray(handle); } - public void End() { - GL.BindVertexArray(0); - } /// /// 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; } diff --git a/RecrownedGTK/Graphics/VertexBufferHandle.cs b/RecrownedGTK/Graphics/VertexBufferHandle.cs index 7680250..75a220e 100644 --- a/RecrownedGTK/Graphics/VertexBufferHandle.cs +++ b/RecrownedGTK/Graphics/VertexBufferHandle.cs @@ -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; }