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

Re: [Public WebGL] Should WebGLContextAttributes be a callback interface?

On 3/31/12 11:10 AM, Glenn Maynard wrote:
I forgot, I talked with Cameron on IRC a while back about the dictionary
vs. callback thing:


Ah, thank you. That discussion is actually a good argument in some ways for having separate types in the getContext() call (where values can be left out, etc) and the getContextAttributes() return value (where values are guaranteed to be present)...

Honestly, I'm not sure I'm a fan of the "single getContext method"
approach in the first place.

I'm not sure of that either, but we seem to be somewhat stuck with it...

You *can* return a dictionary type from functions, so it could, in fact,
just define a dictionary used by both getContext and
getContextAttributes.  It'd lose the interface, but I can't think of any
use cases for an interface there anyway.  But I guess there's otherwise
no real difference between doing that and just making the attributes

Oh, there are plenty of differences in terms of actual behavior. They might not matter, though.


You are currently subscribed to public_webgl@khronos.org.
To unsubscribe, send an email to majordomo@khronos.org with
the following command in the body of your email:
unsubscribe public_webgl