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