[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. Â `._.-(,_..'--(,_..'`-.;.'