[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Public WebGL] Shared resources between contexts
On Sun, Dec 25, 2011 at 7:02 PM, Rehno Lindeque <firstname.lastname@example.org>
One other thing that I've come across, more or less in the same vein.
Functions such as these...
GLboolean isBuffer(WebGLBuffer buffer);
GLboolean isFramebuffer(WebGLFramebuffer framebuffer);
GLboolean isProgram(WebGLProgram program);
GLboolean isRenderbuffer(WebGLRenderbuffer renderbuffer);
GLboolean isShader(WebGLShader shader);
GLboolean isTexture(WebGLTexture texture);
...that need to be used with a webgl context, seem to be a little bit
awkward to me.
These are specific to a context, because they return true only if the object is valid in that context. They return false if you pass an object from one context to another (as well as if the object has been invalidated, etc).
This isn't entirely clear from the specs, since the underlying ES spec for these functions doesn't have any notion of multiple contexts being accessible at once with resources from both being addressable simultaneously, but it's logical and it's how implementations behave.
Gregg, etc: it might help to say "... is valid in this context", to make this detail clear.