setTextureCube method
void
setTextureCube(
- Texture texture,
- int slot
)
Implementation
void setTextureCube(Texture texture, int slot) {
final textureProperties = properties.get(texture);
if (texture.version > 0 && textureProperties["__version"] != texture.version) {
uploadCubeTexture(textureProperties, texture, slot);
return;
}
if(kIsWeb){
state.bindTexture(WebGL.TEXTURE_CUBE_MAP, textureProperties["__webglTexture"], WebGL.TEXTURE0 + slot);
}
else{
state.activeTexture(WebGL.TEXTURE0 + slot);
state.bindTexture(WebGL.TEXTURE_CUBE_MAP, textureProperties["__webglTexture"]);
}
}