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

Re: [Public WebGL] bindAttribLocation on _?webgl_ attribs

If the WebGL spec is not clear it should be updated. It's trying to match the OpenGL ES spec but add a prefix. Everywhere "gl_" is disallowed WebGL also wants to disallow "webgl_"

On Tue, Feb 26, 2013 at 1:11 PM, Jeff Gilbert <jgilbert@mozilla.com> wrote:

The test suite has this:
gl.bindAttribLocation(program, 0, 'webgl_a') expected: INVALID_OPERATION
gl.bindAttribLocation(program, 0, '_webgl_a') expected: INVALID_OPERATION

I don't see where this is in the spec. The GLES2 spec has this behavior for attribs starting with 'gl_', but I can't find the language in the WebGL spec which amends this. It seems like this shouldn't be strictly necessary anyways, since we already have this language in the spec:

"In addition to the reserved identifiers in the aforementioned specification, identifiers starting with "webgl_" and "_webgl_" are reserved for use by WebGL. A shader which declares a function, variable, structure name, or structure field starting with these prefixes must not be allowed to load."

With this restriction, it seems that the user couldn't declare an attrib with such a name anyways, so bindAttribLocation with these prefixes would always do nothing to a shader which meets this restriction, while refusing to 'load' (link? use? This should probably be clarified as well.) shaders which conflict with this passage.

It seems like we don't need this restriction, so it should be removed. Is there something I'm missing?


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