updateRenderTargetMipmap method
Implementation
void updateRenderTargetMipmap(RenderTarget renderTarget) {
final supportsMips = isPowerOfTwo(renderTarget) || isWebGL2;
final textures = renderTarget.isWebGLMultipleRenderTargets == true ? renderTarget.texture : [renderTarget.texture];
if(textures is GroupTexture){
for (int i = 0, il = textures.children.length; i < il; i++) {
final texture = textures.children[i];
if (textureNeedsGenerateMipmaps(texture, supportsMips)) {
final target = renderTarget.isWebGLCubeRenderTarget ? WebGL.TEXTURE_CUBE_MAP : WebGL.TEXTURE_2D;
final webglTexture = properties.get(texture)["__webglTexture"];
state.bindTexture(target, webglTexture);
generateMipmap(target);
state.bindTexture(target, null);
}
}
}
}