[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Public WebGL] Comments on Dec 20th draft

On 2011-12-21, at 11:18 AM, Glenn Maynard wrote:
I think "fire a WebGL context creation error" can also be removed, folding the step into the place it's used, like other events.

That seems more different than real OpenGL. In real opengl there are no errors and all GL functions are no-ops and don't generate any errors. The intent is that losing the context clears all un-gotten errors and generates one more, CONTEXT_LOST_WEBGL. After that just like real GL all functions are no-ops 

Does the ES spec actually allow implementations to return from functions both without any side-effects and without generating an error?  (If so, where?  I couldn't find anything in the spec searching for a few obvious keywords.)  I've always assumed the whole context loss thing is to allow eg. Direct3D implementations, since I've never even seen an OpenGL implementation that can lose the context.

Desktop GL with the ARB_robustness extension and reset notifications enabled can result in a lost context.   Unfortunately that extension doesn't specify what happens if you make GL calls when the extension is lost.  

We've implemented an ES version of this extension in ANGLE (EXT_robustness) and we generate GL_OUT_OF_MEMORY on all GL calls that happen after a lost context.  We'd considered making all the calls NOPs as suggested above, but any GL call that has a return parameter will have un-defined contents and that is only allowable by the spec if you have an OOM error.


                        Daniel Koch -+- daniel@transgaming.com
Senior Graphics Architect -+- TransGaming Inc.  -+- www.transgaming.com