Skip to content

Commit

Permalink
Fix index buffer state not being reset in reset_state
Browse files Browse the repository at this point in the history
  • Loading branch information
rparrett authored and kvark committed Jan 13, 2022
1 parent 99b3a6e commit 5b2b6f5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion wgpu-hal/src/gles/queue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ impl super::Queue {
}
}

unsafe fn reset_state(&self, gl: &glow::Context) {
unsafe fn reset_state(&mut self, gl: &glow::Context) {
gl.use_program(None);
gl.bind_framebuffer(glow::FRAMEBUFFER, None);
gl.disable(glow::DEPTH_TEST);
Expand All @@ -71,6 +71,9 @@ impl super::Queue {
if self.features.contains(wgt::Features::DEPTH_CLIP_CONTROL) {
gl.disable(glow::DEPTH_CLAMP);
}

gl.bind_buffer(glow::ELEMENT_ARRAY_BUFFER, None);
self.current_index_buffer = None;
}

unsafe fn set_attachment(
Expand Down

0 comments on commit 5b2b6f5

Please sign in to comment.