[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 Wed, Jun 13, 2012 at 10:47 AM, Ian Hickson <ian@hixie.ch> wrote:
On Tue, 12 Jun 2012, Gregg Tavares (社ç~T¨) wrote:
> canvas.width = convertCSSUnitsToDeviceUnits(widthInCSSUnits);
> canvas.height =convertCSSUnitsToDeviceUnits(widthInCSSUnits);

canvas.width and canvas.height are defined to be in CSS units, not device units.

this is problematic for webgl because webgl has other things like framebuffers and copyTexImage2d which need to have consistent behavior with the canvas for equal widths and heights.

Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'