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

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



On Feb 13, 2010, at 9:17 PM, Vladimir Vukicevic wrote:

> 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."


I don't believe native OpenGL does such a thing. I'm not sure what black screen problem you're talking about, but the drawing buffer should be cleared to transparent black on startup, so there shouldn't be any rendering artifacts before the first render, should there?

-----
~Chris
cmarrin@apple.com




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