Skip to content

Commit

Permalink
move the empty VAO bind into full_screen_draw
Browse files Browse the repository at this point in the history
  • Loading branch information
swiftcoder committed May 29, 2024
1 parent f1f2c78 commit 7ce9b3d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
1 change: 1 addition & 0 deletions src/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ pub(crate) fn full_screen_draw(
render_states: RenderStates,
viewport: Viewport,
) {
unsafe { context.bind_vertex_array(Some(context.vao)) };
program.draw_arrays(render_states, viewport, 3);
}

Expand Down
1 change: 0 additions & 1 deletion src/core/program.rs
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,6 @@ impl Program {
self.context.set_render_states(render_states);
self.use_program();
unsafe {
self.context.bind_vertex_array(Some(self.context.vao));
self.context
.draw_arrays(crate::context::TRIANGLES, 0, count as i32);
for location in self.attributes.values() {
Expand Down

0 comments on commit 7ce9b3d

Please sign in to comment.