Fix memory leak in opengl integration example
This commit is contained in:
parent
5466d6a11d
commit
bc26b52044
2 changed files with 4 additions and 1 deletions
|
|
@ -86,6 +86,8 @@ impl Scene {
|
|||
|
||||
pub fn draw(&self, gl: &glow::Context) {
|
||||
unsafe {
|
||||
gl.bind_vertex_array(Some(self.vertex_array));
|
||||
gl.use_program(Some(self.program));
|
||||
gl.draw_arrays(glow::TRIANGLES, 0, 3);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue