Merge pull request #14 from Live2D/feature/fix_texture_release

Fix texture release.
translate
Takuya Ito 2018-10-26 18:06:07 +09:00 committed by GitHub
commit cbc4e22e54
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 2 deletions

View File

@ -283,7 +283,8 @@ export namespace Live2DCubismFramework
this._channelColors = null;
// テクスチャ解放
this.gl.deleteTexture(this._channelColors);
this.gl.deleteTexture(this._colorBuffer);
this._colorBuffer = null;
}
/**
@ -1478,8 +1479,14 @@ export namespace Live2DCubismFramework
this._bufferData.uv = null;
this.gl.deleteBuffer(this._bufferData.index);
this._bufferData.index = null;
this._bufferData = null;
for (const ite: csmmap.iterator<number, WebGLTexture> = this._textures.begin(); ite.notEqual(this._textures.end()); ite.preIncrement())
{
this.gl.deleteTexture(ite.ptr().second);
}
this._textures.clear();
this._textures = null;
}
/**