diff options
Diffstat (limited to 'src/fw/renderer.odin')
| -rw-r--r-- | src/fw/renderer.odin | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/fw/renderer.odin b/src/fw/renderer.odin index e8b34fe..149eff6 100644 --- a/src/fw/renderer.odin +++ b/src/fw/renderer.odin @@ -220,6 +220,9 @@ draw_line :: proc( start_idx := Index(len(renderer.draw_call.vertices)) + start := linalg.round(start) + end := linalg.round(end) + _add_vertex(Vertex{{start.x, start.y, depth}, {0.5, 0.5}, color}) _add_vertex(Vertex{{end.x, end.y, depth}, {0.5, 0.5}, color}) @@ -251,6 +254,7 @@ draw_rect_gradient :: proc( } pos := linalg.round(pos) + size := linalg.round(size) tl := Vertex{{pos.x, pos.y, depth}, {0, 0}, tl_color} tr := Vertex{{pos.x + size.x, pos.y, depth}, {1, 0}, tr_color} @@ -384,6 +388,10 @@ draw_tile :: proc( color := Color{1, 1, 1, 1} ) { pos := linalg.round(pos) + rect := Rect{ + start = linalg.round(rect.start), + size = linalg.round(rect.size), + } tex_size := Vec2{f32(tex.size.x), f32(tex.size.y)} |
