In my opinion the fault here lies with the GL specification which incorrectly applies a physical orientation to an abstract coordinate space.
In reality TexImage2D accepts pixel data in “origin-first, S-major (S-increasing, T-increasing)” order. The first pixel passed, at the memory address given, is taken to be at (or near) the texture space origin. Each row of pixels form a line along the positive S axis, and subsequent rows are located at increasing T.
Physical orientation has no meaning in an abstract coordinate space such as texture space. Positive T direction is neither “up” nor “down” (or left-right, front-back, north-south, you get the idea).
If you take the description above, i.e. “origin-first” it immediately becomes clear that if you want to preserve the origin location, HTML elements with their origin in the top-left corner should be passed to TexImage2D top-left corner first.
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:
注意：この電子メールには、株式会社エイチアイの機密情報が含まれている場合が有ります。正式なメール受信者では無い場合はメール複製、 再配信または情報の使用を固く禁じております。エラー、手違いでこのメールを受け取られましたら削除を行い配信者にご連絡をお願いいたし ます.
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.