2014-05-07 14:14 GMT-04:00 Boris Zbarsky <bzbar...@mit.edu>: > On 5/7/14, 2:00 PM, Benoit Jacob wrote: > >> The idea is that if getContext("webgl", {version : N}) returns non-null, >> then the resulting context is guaranteed to be WebGL version N, so that >> no other versioning mechanism is needed. >> > > Sure, but say some code calls getContext("webgl", { version: 1 }) and then > passes the context to other code (from a library, say). > > How is that other code supposed to know whether it can use the webgl2 > bits? The methods are there no matter what, so it can't detect based on > that. >
Right, so there is a mechanism for that. The second parameter to getContext is called "context creation parameters". After creation, you can still query context attributes, and that has to return the "actual context parameters", which are not necessarily the same as what you requested at getContext time. For example, that's how you do today if you want to query whether your WebGL context actually has antialiasing (the antialias attribute defaults to true, but actual antialiasing support is non-mandatory). See: http://www.khronos.org/registry/webgl/specs/latest/1.0/#2.1 Benoit > > -Boris > _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform