[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Public WebGL] WebGL context resize / canvas redraw
- To: Kenneth Russell <email@example.com>
- Subject: Re: [Public WebGL] WebGL context resize / canvas redraw
- From: Philip Taylor <firstname.lastname@example.org>
- Date: Thu, 25 Feb 2010 19:06:13 +0000
- Cc: public webgl <email@example.com>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=rC+vNxHFkpDRLvz/xNI09+chw6f/cg1kM176hLE1Xuc=; b=LTb+y2dr5AczBBBpI3aidSW8HYFFqh0nVqqwc+pMHnD/lIF87rjnMbUBDS4AEIsNnW fYMvZZVz9AVTNqwvymZ9Iot9mcmB+wuMMIKXHX8RcOQ47NoWCeNurr+/C0bnFKlZCRM1 MDj8CxDH0XzZ5107cnSajKcuDePd6GEx4FuDg=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=xL2ZhPpEMtY8ufVj4qJPff8T+4seUlJflV8jOKQbMtlck+htYZLOpAt6LcgNCI90Qt OaOeF5IwcbfE5H1HI+HEsUuQqS//syqY9BwbNeV6CYs57sYYm7t3Ilud//geReIbh26o kvz0toI1qXHgJlOi0znZ1zHXD3nEvJWoGq32Y=
- In-reply-to: <firstname.lastname@example.org>
- References: <B968E528-E938-4D17-A918-29F9D97A69DD@microcan.nl> <email@example.com>
- Sender: firstname.lastname@example.org
On Thu, Feb 25, 2010 at 6:17 PM, Kenneth Russell <email@example.com> wrote:
> On Thu, Feb 25, 2010 at 6:04 AM, Carl van Heezik <firstname.lastname@example.org> wrote:
>> context resize
>> I noticed some differences in the WebGL implementations in Webkit and
>> When you resize the canvas the following instructions are enough to resize
>> rendering context in Webkit.
>> canvas.width = canvas.clientWidth;
>> canvas.height = canvas.clientHeight;
>> I think in Minefield you lose the shaders and other buffers because it only
>> when I recreate the shader program and buffers. What behavior is supposed to
>> happen when you change the canvas size?
> This is a bug in Minefield. Resizing the canvas should not destroy the
> context, only reallocate the back buffer for the canvas.
"When the canvas element is created, and subsequently whenever the
width and height attributes are set (whether to a new value or to the
previous value), the bitmap and any associated contexts must be
cleared back to their initial state and reinitialized with the newly
specified coordinate space dimensions."
so the WebGL context ought to be reset to its initial state (the same
as if you replaced the <canvas> element with an entirely new one).
Resources that are generated by the context but are not part of the
context (in the 2d case these are CanvasGradient, CanvasPattern,
ImageData, etc - you can create them from one context, and then draw
them on a totally different canvas's context, since they have an
independent existence) won't get reset, though.
Is WebGL compatible with this definition? (I've not looked carefully
but it seems it may not be). If not, and if there's good reasons to be
incompatible, then it'd be good to get HTML5 updated so it allows this
resetting behaviour to be specified by each context.
You are currently subscribe to email@example.com.
To unsubscribe, send an email to firstname.lastname@example.org with
the following command in the body of your email: