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

Re: [Public WebGL] Demos and spec updated for new viewport resizing behavior



Hmm, I just realized the full impact of this change -- the initial viewport behaviour change wasn't really clear in that bug. Any reason to not specify that the initial GL viewport is (0, 0, width, height), where width and height are the canvas dimensions? (That is, not the CSS dimensions, but the dimensions specified in width and height attributes.) I can't think of any reason why this would be bad or confusing if it was done only at initial getContext() time, and avoids a common "black screen" (or, in our case, transparent screen) problem. Basically, the spec should say something like "When the webgl context is first created, the initial viewport is set to 0,0 for the top and left, and the dimensions of the canvas for width and height. It is up to the application to manage the viewport from that point on."

    - Vlad

On 2/10/2010 3:39 PM, Kenneth Russell wrote:
All,

Following on to the thread "WebGL back buffer contents", the WebGL
demos linked from http://khronos.org/webgl/wiki/Demo_Repository have
been updated to set the OpenGL viewport manually. A new subsection 2.3
has been added to the WebGL specification explicitly stating that the
OpenGL viewport is not changed when the canvas's size changes, and
that the initial viewport's origin is (0, 0) with size (0, 0). The
tests under sdk/tests/fast have been updated as necessary and new
expected.txt files created for the new tests. The associated Khronos
bug (http://www.khronos.org/bugzilla/show_bug.cgi?id=245) has been
marked fixed.

The WebKit WebGL implementation has been updated to take these new
rules into account. The changes should show up in the WebKit nightly
builds and Chromium continuous builds soon.

Please post any comments to the list.

-Ken
-----------------------------------------------------------
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:


----------------------------------------------------------- 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: