I get a WebGL Error 1286=”Invalid Framebuffer Operation” not on any WebGL operation but apparently when changing canvas dimensions. According to the spec the 1286 can/must occur after specific erroneous WebGL calls but it does not explain what this error means on resizing the canvas.
This happens on my pages http://www.taccgl.org/blog/popup.html (after clicking on one of the buttons to run an animation and scrolling) only on mobile safari.
I use the following code to resize the canvas
var wpr=Math.round(w*pr), hpr=Math.round(h*pr);
cv.width=wpr; cv.style.width=w+"px"; cv.height=hpr; cv.style.height=h+"px";
whereby cv denotes the 3D canvas. Gl.getError returns 0 before this snipplet and 1286 afterwards.
I did not find anything in the spec regarding this error on resizing the canvas, what could possibly be wrong?
--
You received this message because you are subscribed to the Google Groups "WebGL Dev List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to webgl-dev-list+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Have you tried this on any of the iOS 10 betas? This sounds like something I fixed in the last year, and I am unable to reproduce the issue on a device running the iOS 10 GM.
Dean
Thanks for the quick answer. Unfortunately I do not own the device myself, so I can´t test with another OS. The problem occurred on a (iPhone; CPU iPhone OS 9_3_4 like Mac OS X). I will try to create a simpler test case that could fit in the test suite.
Meanwhile here is a more detailed description on how to reproduce the problem: Open http://www.taccgl.org/blog/popup.html?dbg=t and click on a red RUN button to start a WebGL animation. Then perform various scroll operations (for me it took up to 30 sec), even after the animation stopped. Then again click on one of the red run buttons which will show a yellow 2D sign on top of the page (instead of the usual green 3D sign) indicating that the WebGL crashed (and further animations are limited using canvas 2D). The dbg=t parameter loads uncompressed versions of the js libs.
The page uses a full screen 3D canvas that is positioned and possibly resized in an onscroll event handler to always cover the visible part of the document. After several scroll operations with successful move and resize of the canvas, suddenly a canvas resize operation delivers the 1286 error. In my tests this happened at a time, when the WebGL animation itself had already stopped (no requestAnimation frame call back and no drawing taking place, canvas invisible, but the onscroll handler still active). To the user the problem only becomes apparent when clicking on a Run button again.
Out of curiosity, does this conformance test pass or fail on your device?
@ Ken : I tried to reproduce the problem in the test suite by modifying the rapid-resizing.html test. I replaced the automatic resizing in the test by position and size adjustment of the canvas during onscroll. This modified test, however, works fine, so it is probably not helpful.
http://www.taccgl.org/blog/popup.html still has the problem (up to now, I could only test on OS 9_3_4 ) that, however, becomes apparent only after pressing a RUN button twice and doing 30 seconds of manual scrolling in between (just as described in my previous post). ?dbg=t can be appended as URL parameter for debugging output on the console and non-minimized libs, tested on Chrome, FF, IE only.
I meanwhile tested on OS 10.0 and there the problem is gone, just as Dean wrote. I also programmed around the problem in http://www.taccgl.org/blog/popup.html and a new version of my taccgl library eliminating many unnecessary canvas resize operations, so that I no longer can reproduce the problem with this page. I will send a small test program to Ken to keep it reproducible.
Helmut