Actually bind VAO instead of relying on luck

This commit is contained in:
Pieter-Jan Briers
2019-01-27 12:12:45 +01:00
parent 23305e53a7
commit 0683202ce4
2 changed files with 6 additions and 0 deletions

View File

@@ -419,6 +419,7 @@ namespace SS14.Client.Graphics
}
}
GL.BindVertexArray(BatchVAO.Handle);
GL.BufferSubData(BufferTarget.ArrayBuffer, IntPtr.Zero, quadIndex * 4 * Vertex2D.SizeOf, BatchVertexData);
GL.BufferSubData(BufferTarget.ElementArrayBuffer, IntPtr.Zero, quadIndex * sizeof(ushort) * 5,
BatchIndexData);

View File

@@ -409,6 +409,11 @@ namespace SS14.Client.Graphics
: this(position, new Vector2(u, v))
{
}
public override string ToString()
{
return $"Vertex2D: {Position}, {TextureCoordinates}";
}
}
// Go through the commit log if you wanna find why this struct exists.