Skip to content

Commit

Permalink
graphics: MRT render passes fix
Browse files Browse the repository at this point in the history
It looked like a typo, glDrawBuffers receive amount of attachements. It should be the actual amount, not 2
  • Loading branch information
not-fl3 committed Aug 25, 2024
1 parent 668d02b commit 6eee711
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/graphics/gl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -983,7 +983,7 @@ impl RenderingBackend for GlContext {
for i in 0..color_img.len() {
attachments.push(GL_COLOR_ATTACHMENT0 + i as u32);
}
glDrawBuffers(2, attachments.as_ptr() as _);
glDrawBuffers(color_img.len() as _, attachments.as_ptr() as _);
}

glBindFramebuffer(GL_FRAMEBUFFER, self.default_framebuffer);
Expand Down

0 comments on commit 6eee711

Please sign in to comment.