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

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



On Thu, May 20, 2010 at 23:24, Tim Johansson <timj@opera.com> wrote:
>> In 6.2 :
>>
>> """
>> A call to framebufferTexture2D with a texture which has been loaded
>> with 0/NONE/DONT_CARE internalformat will generate an
>> INVALID_OPERATION error and leave the framebuffer's attachments
>> untouched.
>> Additionally, a call to copyTexImage2D or copyTexSubImage2D when
>> currently bound texture has been loaded with 0/NONE/DONT_CARE
>> internalformat will generate an INVALID_OPERATION error and leave the
>> target texture untouched.
>> """
>>
>> How would that sound?
>
> That would fix the issue, but I don't think there is a need to limit calls
> to copyTexImage2D as stated above, only limiting copyTexSubImage2D should be
> enough.

According to ES doc for copyTexImage2D :
"""
internalformat must be chosen such that color buffer components can be
dropped during conversion to the internal format, but new components
cannot be added. For example, an RGB color buffer can be used to
create LUMINANCE or RGB textures, but not ALPHA, LUMINANCE_ALPHA or
RGBA textures.
"""

I think the case you pointed out with copyTexSubImage2D can also
happen here, if copyTexImage2D's target texture is "automatic" it
could be RGBA whereas RGB was necessary (and intended), no?


Regards,
-----------------------------------------------------------
You are currently subscribed to public_webgl@khronos.org.
To unsubscribe, send an email to majordomo@khronos.org with
the following command in the body of your email: