Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix textures are not uploaded to Context when reused by a disposed RenderTarget #154

Merged
merged 1 commit into from
Aug 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix textures are not uploaded to Context when reused by a disposed Re…
…nderTarget
happynxy423 committed Aug 5, 2024
commit 0d6c401c8b674a5f327505982ba985d88248ff9a
2 changes: 2 additions & 0 deletions src/renderers/webgl/WebGLTextures.js
Original file line number Diff line number Diff line change
@@ -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 );

@@ -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 --;