Skip to content

Commit

Permalink
line_draw fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
luboslenco committed Jan 19, 2025
1 parent b0a1f3b commit 90b88d8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions base/sources/line_draw.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,19 +171,19 @@ function line_draw_line(x1: f32, y1: f32, z1: f32, x2: f32, y2: f32, z2: f32) {
line_draw_corner4 = vec4_add(line_draw_corner4, line_width);

let i: i32 = line_draw_lines * 24; // 4 * 6 (structure len)
let data: f32[] = [line_draw_corner1.x, line_draw_corner1.y, line_draw_corner1.z, color_get_rb(line_draw_color) / 255, color_get_gb(line_draw_color) / 255, color_get_ab(line_draw_color) / 255];
let data: f32[] = [line_draw_corner1.x, line_draw_corner1.y, line_draw_corner1.z, color_get_rb(line_draw_color) / 255, color_get_gb(line_draw_color) / 255, color_get_bb(line_draw_color) / 255];
line_draw_add_vb_data(i, data);

i += 6;
data = [line_draw_corner2.x, line_draw_corner2.y, line_draw_corner2.z, color_get_rb(line_draw_color) / 255, color_get_gb(line_draw_color) / 255, color_get_ab(line_draw_color) / 255];
data = [line_draw_corner2.x, line_draw_corner2.y, line_draw_corner2.z, color_get_rb(line_draw_color) / 255, color_get_gb(line_draw_color) / 255, color_get_bb(line_draw_color) / 255];
line_draw_add_vb_data(i, data);

i += 6;
data = [line_draw_corner3.x, line_draw_corner3.y, line_draw_corner3.z, color_get_rb(line_draw_color) / 255, color_get_gb(line_draw_color) / 255, color_get_ab(line_draw_color) / 255];
data = [line_draw_corner3.x, line_draw_corner3.y, line_draw_corner3.z, color_get_rb(line_draw_color) / 255, color_get_gb(line_draw_color) / 255, color_get_bb(line_draw_color) / 255];
line_draw_add_vb_data(i, data);

i += 6;
data = [line_draw_corner4.x, line_draw_corner4.y, line_draw_corner4.z, color_get_rb(line_draw_color) / 255, color_get_gb(line_draw_color) / 255, color_get_ab(line_draw_color) / 255];
data = [line_draw_corner4.x, line_draw_corner4.y, line_draw_corner4.z, color_get_rb(line_draw_color) / 255, color_get_gb(line_draw_color) / 255, color_get_bb(line_draw_color) / 255];
line_draw_add_vb_data(i, data);

i = line_draw_lines * 6;
Expand Down

0 comments on commit 90b88d8

Please sign in to comment.