bindTexture method
void
bindTexture(
- dynamic webglType,
- dynamic webglTexture
Implementation
void bindTexture(webglType, webglTexture) {
if (currentTextureSlot == null) {
activeTexture(null);
}
BoundTexture? boundTexture = currentBoundTextures[currentTextureSlot];
if (boundTexture == null) {
boundTexture = BoundTexture();
currentBoundTextures[currentTextureSlot!] = boundTexture;
}
//if (boundTexture.type != webglType || boundTexture.texture != webglTexture) {
gl.bindTexture(webglType, webglTexture ?? emptyTextures[webglType]);
boundTexture.type = webglType;
boundTexture.texture = webglTexture;
//}
}