Removed setting binding to 0 since order of operations may cause issues.
This commit is contained in:
parent
4f7c7dccb1
commit
b9105e7179
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user