Fix bgra swap for textures tab - export

This commit is contained in:
luboslenco
2025-10-17 18:22:22 +02:00
parent b92ba86560
commit 4ff02d3a7f
+8 -1
View File
@@ -150,7 +150,14 @@ function tab_textures_draw(htab: ui_handle_t) {
if (!ends_with(f, ".png")) { if (!ends_with(f, ".png")) {
f += ".png"; f += ".png";
} }
iron_write_png(path + path_sep + f, gpu_get_texture_pixels(target), target.width, target.height, 0);
/// if IRON_BGRA
let buf: buffer_t = export_arm_bgra_swap(gpu_get_texture_pixels(target));
/// else
let buf: buffer_t = gpu_get_texture_pixels(target);
/// end
iron_write_png(path + path_sep + f, buf, target.width, target.height, 0);
gpu_delete_texture(target); gpu_delete_texture(target);
}, target); }, target);
}); });