opengl: buffers

This commit is contained in:
Mitchell Hashimoto
2022-04-01 17:44:54 -07:00
parent 10369f5643
commit f1cffea944
4 changed files with 68 additions and 12 deletions

View File

@@ -11,6 +11,11 @@ pub inline fn create() !VertexArray {
return VertexArray{ .id = vao };
}
// Unbind any active vertex array.
pub inline fn unbind() !void {
c.glBindVertexArray(0);
}
/// glBindVertexArray
pub inline fn bind(v: VertexArray) !void {
c.glBindVertexArray(v.id);