WebGLRenderer.deleteTexture will now run resetTextures(true) first, incase the requested texture to be deleted is currently bound. Previously, it would delete the texture and then reset them.

This commit is contained in:
Richard Davey 2021-02-17 13:10:10 +00:00
parent 7e40c7c08e
commit a95c34ce92

View file

@ -2173,16 +2173,16 @@ var WebGLRenderer = new Class({
*/
deleteTexture: function (texture, reset)
{
if (reset)
{
this.resetTextures(true);
}
if (texture)
{
this.gl.deleteTexture(texture);
}
if (reset)
{
this.resetTextures();
}
return this;
},