Skip to content

Commit

Permalink
fix unprepare
Browse files Browse the repository at this point in the history
  • Loading branch information
alxart committed Jun 10, 2021
1 parent 8b9d219 commit 0014c98
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/RenderTarget.js
Expand Up @@ -114,13 +114,14 @@ class RenderTarget {
* @ignore
*/
_unprepare() {
const gl = this._glContext;
this._texture.remove(gl);
this._texture = null;
if (this._texture) {
this._texture.remove(this._glContext);
this._texture = null;
}

if (this._frameBuffer) {
gl.deleteFramebuffer(this._frameBuffer);
gl.deleteRenderbuffer(this._renderBuffer);
this._glContext.deleteFramebuffer(this._frameBuffer);
this._glContext.deleteRenderbuffer(this._renderBuffer);
this._frameBuffer = null;
this._renderBuffer = null;
}
Expand Down

0 comments on commit 0014c98

Please sign in to comment.