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

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

On May 18, 2010, at 2:53 PM, Kenneth Russell wrote:

> On Tue, May 18, 2010 at 2:39 PM, Chris Marrin <cmarrin@apple.com> wrote:
>> On May 18, 2010, at 2:33 PM, Cedric Vivier wrote:
>>> On Wed, May 19, 2010 at 05:20, Chris Marrin <cmarrin@apple.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.

I agree that it's reasonable to use the existing internalformat enums. But I would prefer allocating the block to avoid the hackery of interpreting "NONE" as meaning "DONT_CONVERT". But we should just gather opinions and go one way or the other. I can live with either.


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: