Skip to content

Commit

Permalink
fix textures are not uploaded to Context when reused by a disposed Re…
Browse files Browse the repository at this point in the history
…nderTarget (#154)

Co-authored-by: nianxingyan <[email protected]>
  • Loading branch information
nianxy and happynxy423 authored Aug 5, 2024
1 parent 17139f4 commit ab0e8e4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/renderers/webgl/WebGLTextures.js
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,7 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
if ( textureProperties.__webglInit === undefined ) return;

_gl.deleteTexture( textureProperties.__webglTexture );
delete textureProperties.__webglTexture;

properties.remove( texture );

Expand All @@ -279,6 +280,7 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
if ( textureProperties.__webglTexture !== undefined ) {

_gl.deleteTexture( textureProperties.__webglTexture );
delete textureProperties.__webglTexture;

info.memory.textures --;

Expand Down

0 comments on commit ab0e8e4

Please sign in to comment.