|
@@ -4633,13 +4633,14 @@ module BABYLON {
|
|
|
* @param invertY defines if data must be stored with Y axis inverted
|
|
|
* @param premulAlpha defines if alpha is stored as premultiplied
|
|
|
* @param format defines the format of the data
|
|
|
+ * @param forceBindTexture if the texture should be forced to be bound eg. after a graphics context loss (Default: false)
|
|
|
*/
|
|
|
- public updateDynamicTexture(texture: Nullable<InternalTexture>, canvas: HTMLCanvasElement, invertY: boolean, premulAlpha: boolean = false, format?: number): void {
|
|
|
+ public updateDynamicTexture(texture: Nullable<InternalTexture>, canvas: HTMLCanvasElement, invertY: boolean, premulAlpha: boolean = false, format?: number, forceBindTexture: boolean = false): void {
|
|
|
if (!texture) {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- this._bindTextureDirectly(this._gl.TEXTURE_2D, texture, true);
|
|
|
+ this._bindTextureDirectly(this._gl.TEXTURE_2D, texture, true, forceBindTexture);
|
|
|
this._unpackFlipY(invertY);
|
|
|
if (premulAlpha) {
|
|
|
this._gl.pixelStorei(this._gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, 1);
|