[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Public WebGL] Purpose of WebGLObjectArray ?
On Fri, Jun 4, 2010 at 9:07 AM, Cedric Vivier <firstname.lastname@example.org> wrote:
> On Fri, Jun 4, 2010 at 22:10, Chris Marrin <email@example.com> wrote:
>> The semantics needs to be that a new array is created, filled and
> Yes that's what I assumed too, afaik this semantic is the one defined by T[
> ] not sequence<T>.
>> Seems like whether this is literally returned by value or by a reference
>> to a newly created object is a detail of the language binding.
> According to the WebIDL spec sequence<T> is always passed by value,
> consequences (at least in other languages) because it involves unnecessary
> In performance-sensitive methods like uniform*() it could be quite expensive
> to do so, e.g uniformMatrix4fv would copy 16 floats on the stack instead of
> just passing reference.
> Performance aside, sequence<T> is not allowed to be null (since by-value)
> whereas T is allowed to be null (since by-reference ), in WebGL we need
> the value returned to possibly be null when a GL error has been generated
> (or context is lost).
>  : "The T type is a parameterized type whose values are (possibly
> zero-length) arrays of values of type T or the special value null."
Agreed, WebGLShader should be used here. The next (large) round of
specification changes will remove WebGLObjectArray and return
WebGLShader from getAttachedShaders.
You are currently subscribed to firstname.lastname@example.org.
To unsubscribe, send an email to email@example.com with
the following command in the body of your email: