Просмотр исходного кода

Sampler: Don't set `_texture` to `null`. (#31874)

Michael Herzog 8 месяцев назад
Родитель
Сommit
4ff594b870
1 измененных файлов с 6 добавлено и 3 удалено
  1. 6 3
      src/renderers/common/Sampler.js

+ 6 - 3
src/renderers/common/Sampler.js

@@ -34,7 +34,8 @@ class Sampler extends Binding {
 		 */
 		this._onTextureDispose = () => {
 
-			this.texture = null;
+			this.generation = null;
+			this.version = 0;
 
 		};
 
@@ -70,7 +71,8 @@ class Sampler extends Binding {
 
 	/**
 	 * Sets the texture of this sampler.
-	 * @param {?Texture} value - The texture to set.
+	 *
+	 * @param {Texture} value - The texture to set.
 	 */
 	set texture( value ) {
 
@@ -139,7 +141,8 @@ class Sampler extends Binding {
 
 		clonedSampler._onTextureDispose = () => {
 
-			clonedSampler.texture = null;
+			clonedSampler.generation = null;
+			clonedSampler.version = 0;
 
 		};
 

粤ICP备19079148号