opengl: unbind programs

This commit is contained in:
Mitchell Hashimoto
2022-04-06 08:42:39 -07:00
parent a9e887315a
commit 263c9e4aac
2 changed files with 12 additions and 3 deletions

View File

@@ -92,7 +92,8 @@ pub fn setScreenSize(self: *TextRenderer, w: i32, h: i32) !void {
@intToFloat(f32, h),
);
try self.program.use();
const bind = try self.program.use();
defer bind.unbind();
try self.program.setUniform("projection", self.projection);
}
@@ -153,7 +154,8 @@ pub fn render(
}
}
try self.program.use();
const pbind = try self.program.use();
defer pbind.unbind();
// Bind our texture and set our data
try gl.Texture.active(gl.c.GL_TEXTURE0);