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

Re: [Public WebGL] How to set a canvas backing store to display units?



Agreed. Not ensuring good behavior now when the spec is still so young is just going to end leading to slide decks full of 'the things we did wrong 10 years ago when we specced WebGL'. A few broken demo pages today is a small price to pay for the success of all future apps.

Q: is everyone still behind experimental-webgl? If so, revise the spec going forward and for conformance make it so browsers aren't allowed to ship 'webgl' without the proper scaling. Old apps that are using canvas.width/height will use 'experimental-webgl' and can continue to work, new apps using 'webgl' will get the desirable automatic scaling behavior. If current apps are doing a search through ['webgl', 'experimental-webgl'] (which they *should not be*), they're broken anyway.

On Sun, Jun 17, 2012 at 7:05 PM, Mark Callow <callow_mark@hicorp.co.jp> wrote:

On 17/06/2012 05:30, Gregg Tavares (çç) wrote:

You already know the backbuffer resolution. It's the same values you put on the canvas. All I'm suggesting is that specific requirement needs to get added to the WebGL spec. ÂIf you'd like to know what resolution that will be scaled to when displayed you multiple them by window.devicePixelRatio

To be setting up a world where WebGL applications render to small drawing buffers and get zoomed up is so so so wrong. GL is all about transforms. App's should be written to draw at any size. It's not difficult.

Regards

ÂÂÂ -Mark