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

Re: [Public WebGL] Last-minute comments/questions for 1.0.1 spec/tests

On Mon, Nov 28, 2011 at 2:32 PM, Glenn Maynard <glenn@zewt.org> wrote:
On Mon, Nov 28, 2011 at 4:02 PM, Gregg Tavares (wrk) <gman@google.com> wrote:
On Sat, Nov 26, 2011 at 2:08 PM, Benoit Jacob <bjacob@mozilla.com> wrote:
3. Firefox happens to ensure that identical calls to getUniformLocation return the _same_ WebGLUniformLocation object, but I don't remember if/where this is mandated by the spec? And if there is a test for that?
I don't think there is a test for that nor do I think it's in the spec. Should it be?

This should definitely be explicit, one way or the other; not specifying it will lead to interop problems.

It almost seems like WebGLUniformLocation should inherit from WebGLObject, since it's used in the same way: a "dummy" object representing an underlying resource.  It's not quite the same, though, since the user isn't responsible for their resource management (you don't delete them directly, as they're tied to their WebGLProgram).

(As an aside, I wish there were no "deleteTexture", etc. functions, and only a single deleteObject(WebGLObject) function...)

You're free to write one :-)

gl.deleteObject = (function(obj) {
  if (obj instanceof WebGLTexture) {

There are LOTS of things I would change about the WebGL API if I could but the #1 mandate that most of the committee has followed is the API should stay the same as OpenGL as much as possible. WebGLUniformLocation is a change but while technically the API is different, functionally it's not. Off the top of my head there is no correct code you would write differently if getUniformLocation returned an int that changes because it's now a WebGLUniformLocation. It just prevents incorrect math on locations.


Glenn Maynard