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

Re: [Public WebGL] HI-DPI displays and WebGL issues

On Wed, Jun 13, 2012 at 9:14 AM, Gregg Tavares (社用) <gman@google.com> wrote:
> The canvas tag is currently defined to be resolution independent.  The
> browser gets to pick the backing store size.
> This seems unacceptable for WebGL specifically because gl.viewport and
> gl.scissor require device pixels, not virtual pixels.
> Basically if some browser decides to start making the backing store be 2x
> the resolution for WebGL canvases they'll break any WebGL page that uses
> gl.viewport or gl.scissor.

Afaik we currently explicitly allow a WebGL implementation to use any
backing store size as it sees fit (cf. 5.14.1).

I believe this problem is already "solved" in the spec, since a
developer should use context.drawingBufferWidth/drawingBufferHeight
rather than the canvas's width/height to manipulate viewport/scissor
and such on the default framebuffer, isn't it?

Of course, some evangelization and better documentation/tooling might
be needed though to make sure more developers are aware of this
(fixing a few of the popular frameworks such as threejs if necessary
would help a long way for general content compatibility).


You are currently subscribed to public_webgl@khronos.org.
To unsubscribe, send an email to majordomo@khronos.org with
the following command in the body of your email:
unsubscribe public_webgl