fix(addon-webgl): delete VAOs on renderer dispose

Register vertex array objects for disposal in GlyphRenderer and
RectangleRenderer, matching existing buffer and program cleanup.

Fixes #5918

Co-authored-by: Daniel Imms <Tyriar@users.noreply.github.com>
This commit is contained in:
Cursor Agent
2026-05-27 15:35:04 +00:00
co-authored by Daniel Imms
parent c62e6dd765
commit c06c3025f2
3 changed files with 4 additions and 1 deletions
@@ -103,6 +103,7 @@ export class RectangleRenderer extends Disposable {
// Create and set the vertex array object
this._vertexArrayObject = gl.createVertexArray();
this._register(toDisposable(() => gl.deleteVertexArray(this._vertexArrayObject)));
gl.bindVertexArray(this._vertexArrayObject);
// Setup a_unitquad, this defines the 4 vertices of a rectangle