Skip to content

Commit 4ff594b

Browse files
authored
Sampler: Don't set _texture to null. (#31874)
1 parent 2cd878d commit 4ff594b

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/renderers/common/Sampler.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ class Sampler extends Binding {
3434
*/
3535
this._onTextureDispose = () => {
3636

37-
this.texture = null;
37+
this.generation = null;
38+
this.version = 0;
3839

3940
};
4041

@@ -70,7 +71,8 @@ class Sampler extends Binding {
7071

7172
/**
7273
* Sets the texture of this sampler.
73-
* @param {?Texture} value - The texture to set.
74+
*
75+
* @param {Texture} value - The texture to set.
7476
*/
7577
set texture( value ) {
7678

@@ -139,7 +141,8 @@ class Sampler extends Binding {
139141

140142
clonedSampler._onTextureDispose = () => {
141143

142-
clonedSampler.texture = null;
144+
clonedSampler.generation = null;
145+
clonedSampler.version = 0;
143146

144147
};
145148

0 commit comments

Comments
 (0)