bgra flip fixes
This commit is contained in:
@@ -86,7 +86,8 @@ type context_t = {
|
||||
node_preview_map?: map_t<i32, gpu_texture_t>;
|
||||
node_preview_name?: string;
|
||||
node_previews?: map_t<string, gpu_texture_t>;
|
||||
node_previews_used?: string[]; selected_node_preview : bool;
|
||||
node_previews_used?: string[];
|
||||
selected_node_preview?: bool;
|
||||
mask_preview_rgba32?: gpu_texture_t;
|
||||
mask_preview_last?: slot_layer_t;
|
||||
colorid_picked?: bool;
|
||||
|
||||
@@ -158,16 +158,6 @@ function export_arm_run_project() {
|
||||
for (let i: i32 = 0; i < 256 * 256 * 4; ++i) {
|
||||
u8a[i] = math_floor(math_pow(u8a[i] / 255, 1.0 / 2.2) * 255);
|
||||
}
|
||||
/// if IRON_BGRA
|
||||
export_arm_bgra_swap(mesh_icon_pixels);
|
||||
/// end
|
||||
|
||||
// raw.mesh_icons =
|
||||
// ///if IRON_BGRA
|
||||
// [encode(bgra_swap(mesh_icon_pixels)];
|
||||
// ///else
|
||||
// [encode(mesh_icon_pixels)];
|
||||
// ///end
|
||||
|
||||
iron_write_png(substring(project_filepath, 0, project_filepath.length - 4) + "_icon.png", mesh_icon_pixels, 256, 256, 0);
|
||||
gpu_delete_texture(mesh_icon);
|
||||
|
||||
@@ -143,12 +143,7 @@ function tab_textures_draw(htab: ui_handle_t) {
|
||||
f += ".png";
|
||||
}
|
||||
|
||||
/// 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);
|
||||
}, target);
|
||||
|
||||
Reference in New Issue
Block a user