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

Re: [Public WebGL] TexImage2D with no WebGLArray



On Thu, Jan 7, 2010 at 1:05 PM, Gregg Tavares <gman@google.com> wrote:
> TexImage2D currently has 4 overloads. I was wondering if it should have 1
> more
>
> 3 of them take various HTML tags as input (img, canvas, video)
>
> The fourth one is taken from the original GL
>
> void texImage2D(in GLenum target, in GLint level, in GLenum internalformat,
>                     in GLsizei width, in GLsizei height, in GLint border, in
> GLenum format,
>                     in GLenum type, in WebGLArray pixels)
> raises(DOMException);
>
>
> The last argument, pixels is allowed to be null but in the case where it's
> null the 2 arguments before that, format and type, are irrelevant since they
> define the format for the WebGLArray and yet you still have to pass them and
> supposedly they still have to be valid enums.
>
> Instead of allowing pixels to be null, how about always requiring it and
> then adding one more overload that doesn't have the last 3 arguments
>
> void texImage2D(in GLenum target, in GLint level, in GLenum internalformat,
>
>                     in GLsizei width, in GLsizei height, in GLint border)
> raises(DOMException);
>
> It's pretty minor but I just thought I'd ask.

This sounds reasonable. The format and type arguments are useless when
null is passed for the data.

-Ken
-----------------------------------------------------------
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: