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

Re: [Public WebGL] canvas resizing in firefox

At 10:08 AM +0300 3/10/11, Evgeny Demidov wrote:
>To resize canvas I use the function
>var canvas; ...
>  canvas.resize = function (){
>    var size = Math.min(window.innerWidth, window.innerHeight) - 10;
>    canvas.width =  size;   canvas.height = size;
>    gl.viewport(0, 0, size, size);
>    drawScene();
>  } ...
><body onload="webGLStart();" onresize="canvas.resize();">
>all works fine in Chrome and Opera. Unfortunately in Firefox 4b12 or rc1 (WindowsXP sp3, Radeon 4***, Catalyst 11.1) large models are damaged under resizing
>http://www.ibiblio.org/e-notes/webgl/deflate/ship1.html 1.2Mb
>http://www.ibiblio.org/e-notes/webgl/deflate/cathedral1.html 2.5 Mb
>(grasshoper.html, beetle.html, enterprise.html are fine).
>1. Is this method accurate for canvas resizing?
>My old one is wrong too as since it starts many "webGLStart" examples simultaneousely
><body onload="webGLStart();" onresize="webGLStart();">
>2. can I use blacklisted ATI OpenGL drivers for testing?

FYI: on my Mac resizing works fine in FF 4.0 (as well a Chrome and WebKit nightly)
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