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:
co-authored by
Daniel Imms
parent
c62e6dd765
commit
c06c3025f2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user