On 19/06/2012 05:30, Kenneth Russell
wrote:
{Open,Web}GL are resolution independent APIs. The behavior described above is not "just work(ing)". It is broken. It is going to make many WebGL programs look like shit.Because the canvas's intrinsic dimensions are its width and height interpreted as CSS pixels, WebGL applications not specifically written for high-DPI displays will just work. They'll render at a lower resolution and be scaled up. The canvas's relative size on the web page, and how it participates in layout, will be unchanged on high-DPI displays. The majority of WebGL programs only need to know the pixel size of the drawing buffer in order to set the viewport. If the viewport was set automatically from the canvas size (with css pixels converted to device pixels by the implementation) then that majority of apps would truly "just work". The remaining apps, those doing computations with gl_fragCoord, using point size, line width or scissor would need to query the size of the drawing buffer in order to get their computations correct. They need to do that today. Any that don't are broken and we should not try to magically make them work. I think we need to do the following:
-Mark |