How about your idea that after every call to glGenXXX, glCreateXXX, glBufferData, glTexImage2D, glCopyImage2D, and glRenderbufferStorage the browser would check for GL_OUT_OF_MEMORY, then if so do a GC and then try the call again?
Implementations are free to do this if they want, but it's a separate issue. ÂI don't know if other JS APIs do this sort of thing under memory pressure.
By the way, remember that GPUs aren't limited to GPU memory: when low on memory, textures are swapped out to main memory (speaking roughly), and you can allocate far more texture memory than you have GPU space. ÂThis means that if you're hitting GL_OOM, you're probably running out of main memory, not just GPU memory.
On Wed, Jun 29, 2011 at 12:15 PM, Gregg Tavares (wrk)Â<firstname.lastname@example.org>
> 2) Freeing the texture managed by WebGLTexture object.
The underlying GPU texture should always be deleted when the WebGLTexture object is collected, if it wasn't already deleted by the user. ÂI'd be surprised if there's disagreement about that much.