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

Re: [Public WebGL] Purpose of WebGLObjectArray ?

On Jun 3, 2010, at 5:12 PM, Kenneth Russell wrote:

> On Thu, Jun 3, 2010 at 12:10 PM, Cedric Vivier <cedricv@neonux.com> wrote:
>> Hi,
>> I'm not sure to grasp the need and benefits of WebGLObjectArray ?
>> The only place it's used is getAttachedShaders() and even for this
>> function it would be probably simpler and more useful to return a
>> standard array (ie. WebGLObject[ ] in the IDL) so that all array
>> functions are available as usual to developers, e.g checking a shader
>> has been attached correctly would be intuitively enough :
>> if (!gl.getAttachedShaders(program).indexOf(coolShader)) {
>>   // coolShader is not yet attached to this program, let's attach it now...
>> }
>> Thoughts ?
> I believe we specified WebGLObjectArray before Web IDL supported
> sequence<T>. Note that as far as I know none of the WebGL
> implementations currently support getAttachedShaders(), so this issue
> hasn't been explored in depth yet. We could plausibly eliminate it in
> favor of sequence<WebGLShader>.

It's true, this was done before we felt we could use sequence<>. In fact I thought we had decided to get rid of it a while back in favor of sequence<WebGLShader>.


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: