[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Public WebGL] Adding internalformat param to all texImage2d variants
On Tue, May 18, 2010 at 2:39 PM, Chris Marrin <firstname.lastname@example.org> wrote:
> On May 18, 2010, at 2:33 PM, Cedric Vivier wrote:
>> On Wed, May 19, 2010 at 05:20, Chris Marrin <email@example.com> wrote:
>>> This makes me think that maybe we don't want to reuse "internalformat" or any of its enums at all. Perhaps we should instead call the param "convertTo" or something like that and have a unique set of enums (including NO_CONVERSION) to better distinguish the operation from simply describing the internalformat, as is done in the raw form of texImage2D.
>> I don't think this is a good idea, this unnecessarily diverge from
>> both ES (from which the most appropriate pair internalformat/format
>> can be set through "helpers" like libpng directly ;) ) and GL.
>> This would also block extensions or future revisions that provide new
>> formats (issue discussed in the thread "generic texture compression").
> But these function already diverge. They are a bridge between HTML and WebGL. They also support y flipping and alpha premultiplying, which are divergent. We need to make them useful to the HTML author, not matching OpenGL.
Specifying entirely new enums for this argument seems like a bad
design decision. Doing so will require duplicating all of the format
enums, as well as any which are supported by future OpenGL ES specs.
Look at the internalformat enums supported by
http://www.opengl.org/sdk/docs/man/xhtml/glTexImage2D.xml for an
indication of how many enums might need to be duplicated at some point
in the future.
I still favor reusing an existing OpenGL enum for the "no conversion"
/ "don't care" case to avoid having to allocate a block of
WebGL-specific enum values.
You are currently subscribe to firstname.lastname@example.org.
To unsubscribe, send an email to email@example.com with
the following command in the body of your email: