Эх сурвалжийг харах

[ts][webgl] Added . When it will disable the corresponding WebGL pixel store behaviour.

badlogic 5 жил өмнө
parent
commit
4e96ebcda2

+ 1 - 0
spine-ts/build/spine-all.d.ts

@@ -1392,6 +1392,7 @@ declare module spine.webgl {
 		private texture;
 		private boundUnit;
 		private useMipMaps;
+		static DISABLE_UNPACK_PREMULTIPLIED_ALPHA_WEBGL: boolean;
 		constructor(context: ManagedWebGLRenderingContext | WebGLRenderingContext, image: HTMLImageElement, useMipMaps?: boolean);
 		setFilters(minFilter: TextureFilter, magFilter: TextureFilter): void;
 		static validateMagFilter(magFilter: TextureFilter): TextureFilter.Nearest | TextureFilter.Linear | TextureFilter.Linear;

+ 3 - 0
spine-ts/build/spine-all.js

@@ -8521,6 +8521,8 @@ var spine;
 					this.texture = this.context.gl.createTexture();
 				}
 				this.bind();
+				if (GLTexture.DISABLE_UNPACK_PREMULTIPLIED_ALPHA_WEBGL)
+					gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);
 				gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, this._image);
 				gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
 				gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, useMipMaps ? gl.LINEAR_MIPMAP_LINEAR : gl.LINEAR);
@@ -8550,6 +8552,7 @@ var spine;
 				var gl = this.context.gl;
 				gl.deleteTexture(this.texture);
 			};
+			GLTexture.DISABLE_UNPACK_PREMULTIPLIED_ALPHA_WEBGL = false;
 			return GLTexture;
 		}(spine.Texture));
 		webgl.GLTexture = GLTexture;

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
spine-ts/build/spine-all.js.map


+ 1 - 0
spine-ts/build/spine-player.d.ts

@@ -1361,6 +1361,7 @@ declare module spine.webgl {
 		private texture;
 		private boundUnit;
 		private useMipMaps;
+		static DISABLE_UNPACK_PREMULTIPLIED_ALPHA_WEBGL: boolean;
 		constructor(context: ManagedWebGLRenderingContext | WebGLRenderingContext, image: HTMLImageElement, useMipMaps?: boolean);
 		setFilters(minFilter: TextureFilter, magFilter: TextureFilter): void;
 		static validateMagFilter(magFilter: TextureFilter): TextureFilter.Nearest | TextureFilter.Linear | TextureFilter.Linear;

+ 3 - 0
spine-ts/build/spine-player.js

@@ -8253,6 +8253,8 @@ var spine;
 					this.texture = this.context.gl.createTexture();
 				}
 				this.bind();
+				if (GLTexture.DISABLE_UNPACK_PREMULTIPLIED_ALPHA_WEBGL)
+					gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);
 				gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, this._image);
 				gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
 				gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, useMipMaps ? gl.LINEAR_MIPMAP_LINEAR : gl.LINEAR);
@@ -8282,6 +8284,7 @@ var spine;
 				var gl = this.context.gl;
 				gl.deleteTexture(this.texture);
 			};
+			GLTexture.DISABLE_UNPACK_PREMULTIPLIED_ALPHA_WEBGL = false;
 			return GLTexture;
 		}(spine.Texture));
 		webgl.GLTexture = GLTexture;

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
spine-ts/build/spine-player.js.map


+ 1 - 0
spine-ts/build/spine-webgl.d.ts

@@ -1361,6 +1361,7 @@ declare module spine.webgl {
 		private texture;
 		private boundUnit;
 		private useMipMaps;
+		static DISABLE_UNPACK_PREMULTIPLIED_ALPHA_WEBGL: boolean;
 		constructor(context: ManagedWebGLRenderingContext | WebGLRenderingContext, image: HTMLImageElement, useMipMaps?: boolean);
 		setFilters(minFilter: TextureFilter, magFilter: TextureFilter): void;
 		static validateMagFilter(magFilter: TextureFilter): TextureFilter.Nearest | TextureFilter.Linear | TextureFilter.Linear;

+ 3 - 0
spine-ts/build/spine-webgl.js

@@ -8253,6 +8253,8 @@ var spine;
 					this.texture = this.context.gl.createTexture();
 				}
 				this.bind();
+				if (GLTexture.DISABLE_UNPACK_PREMULTIPLIED_ALPHA_WEBGL)
+					gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);
 				gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, this._image);
 				gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
 				gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, useMipMaps ? gl.LINEAR_MIPMAP_LINEAR : gl.LINEAR);
@@ -8282,6 +8284,7 @@ var spine;
 				var gl = this.context.gl;
 				gl.deleteTexture(this.texture);
 			};
+			GLTexture.DISABLE_UNPACK_PREMULTIPLIED_ALPHA_WEBGL = false;
 			return GLTexture;
 		}(spine.Texture));
 		webgl.GLTexture = GLTexture;

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
spine-ts/build/spine-webgl.js.map


+ 3 - 0
spine-ts/webgl/src/GLTexture.ts

@@ -34,6 +34,8 @@ module spine.webgl {
 		private boundUnit = 0;
 		private useMipMaps = false;
 
+		public static DISABLE_UNPACK_PREMULTIPLIED_ALPHA_WEBGL = false;
+
 		constructor (context: ManagedWebGLRenderingContext | WebGLRenderingContext, image: HTMLImageElement, useMipMaps: boolean = false) {
 			super(image);
 			this.context = context instanceof ManagedWebGLRenderingContext? context : new ManagedWebGLRenderingContext(context);
@@ -75,6 +77,7 @@ module spine.webgl {
 				this.texture = this.context.gl.createTexture();
 			}
 			this.bind();
+			if (GLTexture.DISABLE_UNPACK_PREMULTIPLIED_ALPHA_WEBGL) gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);
 			gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, this._image);
 			gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
 			gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, useMipMaps ? gl.LINEAR_MIPMAP_LINEAR : gl.LINEAR);

Энэ ялгаанд хэт олон файл өөрчлөгдсөн тул зарим файлыг харуулаагүй болно