浏览代码

Fix _bindTexture on cube map

sebavan 5 年之前
父节点
当前提交
0a99c63c31
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      src/Engines/thinEngine.ts

+ 2 - 1
src/Engines/thinEngine.ts

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