+ for(size_t i=0; i<images.size(); i++) {
+ int w = images[i].w;
+ int h = images[i].h;
+
+ unsigned char *pixels = images[i].pixels;
+ unsigned int t = is_cubemap() ? faces[i] : GL_TEXTURE_2D;
+ glTexImage2D(t, 0, GL_SRGB_ALPHA, w, h, 0, GL_RGBA, GL_UNSIGNED_BYTE, pixels);
+ }
+
+ glGenerateMipmap(target);
+}