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

Re: [Public WebGL] Adding internalformat param to all texImage2d variants

On Mon, May 17, 2010 at 20:55, Mark Callow <callow_mark@hicorp.co.jp> wrote:
> On 2010/05/14 21:03, Kenneth Russell wrote:
>> 0 represents a default value or binding in many other places in the API.

> I can:t think of anywhere that 0 represents a default enum value. 0 is
> always the name of the default object but object names are already
> integers so it is a natural choice. In this case I think a SOURCE_FORMAT
> enum is a much better choice.

This matters only if using literal 0 in code (as with any other
literal used in place of an enum value).
As Chris pointed out, 0 is appropriately enough the enum value of
gl.NONE as well.

It makes sense to define that if none internal format is specified the
WebGL implementation will use the most appropriate internal format
(e.g the most compatible format for given DOM element, RGB or RGBA
depending if an alpha-channel is present).

I would think 0/gl.NONE is a more appropriate shorthand to use as
parameter of a convenience/helper method.

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: