RESOLVED INVALID81340
Setting WebGL canvas width/height does not reset context state
https://bugs.webkit.org/show_bug.cgi?id=81340
Summary Setting WebGL canvas width/height does not reset context state
Sami Kyostila
Reported 2012-03-16 05:32:44 PDT
From http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html: "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." Currently this is only done for 2D contexts and not for WebGL. Also, the fast path for clearing the canvas when its size remains constant (https://bugs.webkit.org/show_bug.cgi?id=80871) is not applied to WebGL.
Attachments
Gregg Tavares
Comment 1 2019-05-04 02:08:02 PDT
This is not relevant for WebGL. State is not lost in WebGL. That is part of the WebGL spec. You can close this issue. Open on one with WhatWG to fix their spec if this is still wrong there.
Note You need to log in before you can comment on or make changes to this bug.