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

Re: [Public WebGL] Typed WebGLArray sequence parameter types



On Tue, Dec 22, 2009 at 3:35 PM, Vladimir Vukicevic
<vladimir@mozilla.com> wrote:
> On 12/21/2009 8:38 PM, Shiki Okasaka wrote:
>>
>> Is this possible to modify typed WebGLArray sequence parameter types
>> in the IDL definitions as below?
>>
>> * WebGLByteArray:
>> Â Âsequence<long> Â-> Âsequence<octet>
>> * WebGLUnsignedByteArray:
>> Â Âsequence<unsigned long> Â-> Âsequence<octet>
>> * WebGLShortArray:
>> Â Âsequence<long> Â-> Âsequence<short>
>> * WebGLUnsignedShortArray:
>> Â Âsequence<unsigned long> Â-> Âsequence<unsigned short>
>>
>> This change would make the generated interfaces for statically typed
>> languages (e.g. Java) more useful.
>>
>> Note currently Web IDL does not have a primitive type for 8-bit signed
>> integer values. If it is useful for WebGL, maybe we can propose an
>> addition of it to Web IDL as Geolocation WG requested to add 'double'
>> in addition to 'float' [0].
>>
>
> Yep, that's the main reason why long/unsigned long are used instead of octet
> -- if octet was used, then it becomes impossible to actually specify signed
> 8-bit integers. ÂFor short, we decided to follow the same convention.
> ÂHowever, maybe a workaround would be to add a typedef somewhere for our own
> signed_octet type, by default typedef'd to unsigned long, but with a
> statement in the spec saying that this should be a signed 8 bit type if the
> language supports it?

It would be very practical. How about moving typedef names to the top
level from WebGLRenderingContext, which are not allowed in Web IDL
grammar anyway, and adding typedef names GLbyte, GLubyte, GLshort, and
GLushort to use these entirely in the WebGL spec?

 - Shiki


>
> Â Â- Vlad
>
> -----------------------------------------------------------
> You are currently subscribe to public_webgl@khronos.org.
> To unsubscribe, send an email to majordomo@khronos.org with
> the following command in the body of your email:
>
>

-----------------------------------------------------------
You are currently subscribe to public_webgl@khronos.org.
To unsubscribe, send an email to majordomo@khronos.org with
the following command in the body of your email: