Do not batch for now

This commit is contained in:
luboslenco
2025-04-20 23:29:05 +02:00
parent 3ad58d5925
commit 24c08bff6b
20 changed files with 337 additions and 708 deletions
+2 -2
View File
@@ -221,7 +221,7 @@ declare function gpu_delete_vertex_buffer(buffer: any): void;
declare function gpu_lock_vertex_buffer(buffer: any): buffer_t;
declare function iron_gpu_vertex_buffer_unlock_all(buffer: any): void;
declare function gpu_set_vertex_buffer(buffer: any): void;
declare function gpu_draw_indexed_vertices(start: i32 = 0, count: i32 = -1): void;
declare function gpu_draw_indexed_vertices(): void;
declare function gpu_create_shader(data: buffer_t, type: i32): iron_gpu_shader_t;
declare function gpu_create_shader_from_source(source: string, shader_type: shader_type_t): iron_gpu_shader_t;
declare function iron_gpu_shader_destroy(shader: iron_gpu_shader_t): void;
@@ -294,7 +294,7 @@ declare function iron_get_arg(index: i32): string;
declare function iron_get_files_location(): string;
declare function _iron_http_request(url: string, size: i32, callback: (url: string, _: buffer_t)=>void): void;
declare function draw_init(image_vert: buffer_t, image_frag: buffer_t, colored_vert: buffer_t, colored_frag: buffer_t, text_vert: buffer_t, text_frag: buffer_t): void;
declare function draw_init(image_vert: buffer_t, image_frag: buffer_t, rect_vert: buffer_t, rect_frag: buffer_t, tris_vert: buffer_t, tris_frag: buffer_t, text_vert: buffer_t, text_frag: buffer_t): void;
declare function draw_begin(render_target: iron_gpu_texture_t = null): void;
declare function draw_end(): void;
declare function draw_scaled_sub_image(image: iron_gpu_texture_t, sx: f32, sy: f32, sw: f32, sh: f32, dx: f32, dy: f32, dw: f32, dh: f32): void;
+4 -2
View File
@@ -50,8 +50,10 @@ function sys_start(ops: iron_window_options_t) {
draw_init(
iron_load_blob(data_path() + "draw_image.vert" + sys_shader_ext()),
iron_load_blob(data_path() + "draw_image.frag" + sys_shader_ext()),
iron_load_blob(data_path() + "draw_colored.vert" + sys_shader_ext()),
iron_load_blob(data_path() + "draw_colored.frag" + sys_shader_ext()),
iron_load_blob(data_path() + "draw_rect.vert" + sys_shader_ext()),
iron_load_blob(data_path() + "draw_rect.frag" + sys_shader_ext()),
iron_load_blob(data_path() + "draw_tris.vert" + sys_shader_ext()),
iron_load_blob(data_path() + "draw_tris.frag" + sys_shader_ext()),
iron_load_blob(data_path() + "draw_text.vert" + sys_shader_ext()),
iron_load_blob(data_path() + "draw_text.frag" + sys_shader_ext())
);
+3 -1
View File
@@ -243,7 +243,9 @@ function line_draw_end(overlay: bool = false) {
color_get_gb(line_draw_color) / 255,
color_get_bb(line_draw_color) / 255
);
gpu_draw_indexed_vertices(0, line_draw_lines * 6);
////
// gpu_draw_indexed_vertices(0, line_draw_lines * 6);
////
}
let _shape_draw_sphere_vb: iron_gpu_buffer_t = null;