We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
glDrawBuffer
1 parent 983dd84 commit 60ba9afCopy full SHA for 60ba9af
librashader-runtime-gl/src/gl/gl3/framebuffer.rs
@@ -131,6 +131,10 @@ impl FramebufferInterface for Gl3Framebuffer {
131
);
132
133
fb.ctx.read_buffer(glow::COLOR_ATTACHMENT0);
134
+
135
+ // GLES 3.0 does not support `glDrawBuffer`, only `glDrawBuffers`.
136
+ // GLES requires that `GL_DRAW_BUFFERi` points to `GL_COLOR_ATTACHMENTi` or `GL_NONE`.
137
+ // So we must use `glDrawBuffers` and pad the first entry with `GL_NONE` to write to `GL_COLOR_ATTACHMENT1`.
138
fb.ctx.draw_buffers(&[glow::NONE, glow::COLOR_ATTACHMENT1]);
139
140
fb.ctx.blit_framebuffer(
0 commit comments