[Public WebGL] y-orientation for texImage2D from HTML elements
Thu Dec 6 19:32:30 PST 2012
On 2012/12/07 12:07, Jeff Gilbert wrote:
> At the absolute minimum, we need wording in the spec that spells this out:
> "We send decoded image data top-row-first into texImage2D, which, per spec, expects bottom-row-first data. This means that textures uploaded this way will be upside down compared to textures uploaded via other methods. You can force HTML element uploads to upload bottom-row-first by using UNPACK_FLIP_Y_WEBGL=true, but this also flips the order that TypedArray rows are uploaded."
I have no objection to adding a note to the spec. I would prefer
something along the lines of:
The default texture coordinate system in OpenGL is such that the
first row of data loaded by texImage2D will appear at bottom of the
texture. However the first row of data in HTML elements is the
logical top of the image therefore textures uploaded from HTML
elements will appear upside down. One way of adjusting for this is
to set UNPACK_FLIP_Y_WEBGL=true. Then texImage2D will flip the rows
of data as it uploads them. UNPACK_FLIP_Y_WEBGL affects the
operation of texImage2D for /all/ data sources.
NOTE: This electronic mail message may contain confidential and
privileged information from HI Corporation. If you are not the intended
recipient, any disclosure, photocopying, distribution or use of the
contents of the received information is prohibited. If you have received
this e-mail in error, please notify the sender immediately and
permanently delete this message and all related copies.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the public_webgl