Hi,
I've just noticed some strange behaviors when disposing a spritemanager using dynamic texture :
- when you remove a spritemanger, there is still a texture in the 'stack' -> http://www.babylonjs-playground.com/#1GWIGC#13
Maybe we can fix this by testing imgUrl in spriteManager.ts. It seems to solve the problem.
if (imgUrl) {
this._spriteTexture = new BABYLON.Texture(imgUrl, scene, true, false, samplingMode);
this._spriteTexture.wrapU = BABYLON.Texture.CLAMP_ADDRESSMODE;
this._spriteTexture.wrapV = BABYLON.Texture.CLAMP_ADDRESSMODE;
}
One other thing when using a bitmap texture, how correctly remove sprite and spriteMananger.
You can see here a 'no texture bound to GL_TEXTURE_2D error' -> http://www.babylonjs-playground.com/#2IPMDX#7 [edit was a wrong playground]
The first spriteManager.dispose() no throw error, the second does. Any idea ?