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

Re: [Public WebGL] Explicit unboxing for object identifiers

> ? That seems really unexpected and very likely to cause hard to untable confusion and bugs. Hashtable (object property) storage especially using uniform locations as keys doesn't seem that unexpected, for example to store the current value or somesuch for optimization purpose.

This is an ordinary pattern for APIs, returning an object containing the results of the operation. It doesn't have to be that way, but it's simpler to implement (from what I understand) and spec and since it's predictable, I don't think it's confusing.

An example of another web API that does this is http://www.whatwg.org/specs/web-apps/current-work/multipage/dnd.html#dom-datatransferitem-getasfile.

On Sun, Jan 8, 2012 at 9:19 PM, Benoit Jacob <bjacob@mozilla.com> wrote:
> Good points, so we can consider adding the same-uniformlocation-object requirement to the spec after 1.0.1 (it seems too late for 1.0.1)?

Note that if you have a uniform, you probably have the program too, and you can put the data on the program object if you want.

prog.data = "">prog.data[uniformName] = {}

(I don't suppose you can reset your font size? You're still sending giganto mail.)

Glenn Maynard