Texture.dispose(); called but scene still rendered

Yes. If you immediately call dispose() right after creating a material, geometry, texture etc. nothing will happen. The entities have to be used for rendering at least once so the respective WebGL entities have been created (buffers, shader programs, texture objects).

In other words, dispose() controls allocated memory on WebGL/GPU side. If you don’t allow the engine to allocate this memory first, freeing it will obviously have no effect.

1 Like