- 封存
WebGL2.0 doesn't allow flipping frame with blitFramebuffer()
Hi. So in desktop OpenGL it is totally valid to write the following in order to flip the frame vertically into dst buffer: glBlitFramebuffer(0, h, w, 0, 0, 0, w, h, GL_… (閱讀更多)
Hi. So in desktop OpenGL it is totally valid to write the following in order to flip the frame vertically into dst buffer:
glBlitFramebuffer(0, h, w, 0, 0, 0, w, h, GL_COLOR_BUFFER_BIT, GL_NEAREST));
In WebGL if I do this:
gl.blitFramebuffer(0, h,w,0 , 0, 0, w, h, gl.COLOR_BUFFER_BIT, gl.NEAREST);
I am getting WebGL warning: blitFramebuffer: If the source is multisampled, then the source and dest regions must match exactly.
Similar error is reported in Chrome.
When I am looking into the related C++ code I can see this:
if (dstX0 != srcX0 || dstX1 != srcX1 || dstY0 != srcY0 || dstY1 != srcY1) { webgl->ErrorInvalidOperation("%s: If the source is multisampled, then the" " source and dest regions must match exactly.", funcName); return; }
I am not sure why this restriction has been imposed. GLES2/3 support this kind of dimensions setup with no errors. Can someone explain the reason behind this? And if it is a bug/missed functionality, where should it be reported?