[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?
On Fri, Jun 15, 2012 at 11:38 PM, James Robinson <email@example.com> wrote:
Canvas 2d is (mostly) a vector API, so you can write canvas 2d code that does not care how many pixels are in the backing store and it will Just Work.
That is definitely not true for OpenGL or WebGL - in general it is not possible to write code that works correctly that does not care about how many pixels are actually in the backing store. I think this is the fundamental difference between 2d canvas and WebGL and not something we can gloss over with an option or attribute.
I think what Glenn tries to make sure with that attribute is to avoid 99% of webgl samples breaking on high dpi devices because they're not using drawingBufferWidth/Height, but make it possible to "opt-in" to high-dpi devices true resolution, right? So that attribute wouldn't "gloss over" the difference, but retain the semantic that most people have coded against so far, while letting them gradually ease into doing things right.