Fix texture release.

translate
cubism-dev 2018-10-26 17:55:30 +09:00
parent 5cb53800d4
commit f6d93874a6
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;
}
/**