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 0be1a33
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(), attachments.as_ptr() as _);

Check failure on line 986 in src/graphics/gl.rs

View workflow job for this annotation

GitHub Actions / Build (macos-latest, x86_64-apple-ios)

mismatched types

Check failure on line 986 in src/graphics/gl.rs

View workflow job for this annotation

GitHub Actions / Build (macos-latest, aarch64-apple-ios)

mismatched types

Check failure on line 986 in src/graphics/gl.rs

View workflow job for this annotation

GitHub Actions / Build (macos-latest, x86_64-apple-darwin)

mismatched types

Check failure on line 986 in src/graphics/gl.rs

View workflow job for this annotation

GitHub Actions / Build (ubuntu-latest, wasm32-unknown-unknown)

mismatched types

Check failure on line 986 in src/graphics/gl.rs

View workflow job for this annotation

GitHub Actions / Build (ubuntu-latest, aarch64-unknown-linux-gnu)

mismatched types

Check failure on line 986 in src/graphics/gl.rs

View workflow job for this annotation

GitHub Actions / Build (windows-latest, x86_64-pc-windows-msvc)

mismatched types

Check failure on line 986 in src/graphics/gl.rs

View workflow job for this annotation

GitHub Actions / Build (ubuntu-latest, x86_64-unknown-linux-gnu)

mismatched types

Check failure on line 986 in src/graphics/gl.rs

View workflow job for this annotation

GitHub Actions / Build (ubuntu-latest, x86_64-pc-windows-gnu)

mismatched types

Check failure on line 986 in src/graphics/gl.rs

View workflow job for this annotation

GitHub Actions / Build (ubuntu-latest, armv7-unknown-linux-gnueabihf)

mismatched types
}

glBindFramebuffer(GL_FRAMEBUFFER, self.default_framebuffer);
Expand Down

0 comments on commit 0be1a33

Please sign in to comment.