[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Public WebGL] Adding internalformat param to all texImage2d variants
On 2010/05/17 16:10, Cedric Vivier wrote:
> On Mon, May 17, 2010 at 20:55, Mark Callow <email@example.com> wrote:
> 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.
The parameter you are specifying is the internal format so gl.NONE
doesn't make logical sense to me. If people really don't want to create
a new token, gl.DONT_CARE makes more logical sense as a way of telling
the implementation to select the most appropriate format. However a new
token gl.SOURCE_FORMAT_WEBGL is much more clear and has the added
advantage of making it clear that this parameter value cannot be used in
org:HI Corporation;Middleware Development
adr:Higashiyama 1-4-4, Meguro-ku;;Meguro Higashiyama Bldg 5F;Tokyo;;153-0043;Japan
tel;work:+81 3 3710 9367
tel;fax:+81 3 5773 8660