- sub_image(face, level, 0, 0, s, s, fmt, type, data);
- else
- glTexImage2D(face, level, ifmt, s, s, 0, fmt, type, data);
+ return sub_image(face, level, 0, 0, s, s, fmt, type, data);
+
+ BindRestore _bind(this);
+ glTexImage2D(face, level, ifmt, s, s, 0, get_upload_format(fmt), type, data);