Przeglądaj źródła

Fix _bindTexture on cube map

sebavan 5 lat temu
rodzic
commit
0a99c63c31
1 zmienionych plików z 2 dodań i 1 usunięć
  1. 2 1
      src/Engines/thinEngine.ts

+ 2 - 1
src/Engines/thinEngine.ts

@@ -3471,7 +3471,8 @@ export class ThinEngine {
         }
 
         this._activeChannel = channel;
-        this._bindTextureDirectly(this._gl.TEXTURE_2D, texture);
+        const target = texture ? this._getTextureTarget(texture) : this._gl.TEXTURE_2D;
+        this._bindTextureDirectly(target, texture);
     }
 
     /**