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

Re: [Public WebGL] Retrieving number of texture channels

On Feb 23, 2010, at 5:59 PM, Mark Callow wrote:

> Hi Chris,
> On 24/02/2010 07:25, Chris Marrin wrote:
>> On Feb 22, 2010, at 6:21 PM, Mark Callow wrote:
>>> ...
>>> I agree with Ken that adding support to WebGL for deciphering HTMLImages
>>> that are PNG files to automatically determine the format to use for
>>> TexImage2D is an enhancement. A query will clearly need to be part of
>>> this enhancement.
>> We don't need queries for this. We simply need to know what the resultant internal format is for each type of image loaded. As I mentioned in other responses, adding a format param would provide this.
> "Query will clearly (be) need(ed)" was predicated on "automatically
> determine the format". If you add a format specifier to the TexImage2D
> that accepts an HTMLImage then I completely agree a query is not needed.
> We had the same problem vis-a-vis one-channel luminance vs. alpha when
> loading PNG files in M3G. We added a format parameter there too.
> When writing the spec. for this format parameter bear in mind that OGL
> ES does not support internal format conversions. Therefore perhaps you
> should throw an exception if, e.g. the app. tries to load a one-channel
> PNG image as RGB. In other words require that the specified format match
> the HTMLImage contents.

Right, anything we do would have to be done with client side conversion. For instance, we could specify a format of RGB and pass in a 1 channel PNG as long as we convert it to RGB on the client and then send it in. We just have to have a table showing the conversions.


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: