diff options
Diffstat (limited to 'examples')
-rw-r--r-- | examples/graph.c | 8 | ||||
-rw-r--r-- | examples/screenshot.c | 2 | ||||
-rw-r--r-- | examples/ui.c | 8 |
3 files changed, 9 insertions, 9 deletions
diff --git a/examples/graph.c b/examples/graph.c index 75f83fa..7d36ca8 100644 --- a/examples/graph.c +++ b/examples/graph.c @@ -60,7 +60,7 @@ void draw_node(i64 node_index) { if (n.hover) color = (vec4_f32) { 0.f, .5f, 0.f, 1.f }; // green color - fill_ellipse( + fill_ellipse_cached( color, (Box) { n.x - n.radius, @@ -86,7 +86,7 @@ void draw_edge(i64 edge_index) { if (e.hover) color = (vec4_f32) { 0.f, .5f, 0.f, 1.f }; // green color - fill_line( + fill_line_cached( color, (vec2[2]) { { n0.x, n0.y }, @@ -504,7 +504,7 @@ void update_and_render_frame(void) { // Render - fill_rectangle_quick((vec4_f32) { .7f, .8f, .9f, 1.f }, (Box) { 0, 0, g_platform.real_width, g_platform.real_height }); + fill_rectangle((vec4_f32) { .7f, .8f, .9f, 1.f }, (Box) { 0, 0, g_platform.real_width, g_platform.real_height }); if (adding_edge) { f64 x0 = world.nodes[adding_src].x; @@ -517,7 +517,7 @@ void update_and_render_frame(void) { y1 = world.nodes[adding_dst].y; } - fill_line((vec4_f32) { .5f, 0.f, .5f, 1.f }, (vec2[2]) { { x0, y0 }, { x1, y1 } }, 30); + fill_line_cached((vec4_f32) { .5f, 0.f, .5f, 1.f }, (vec2[2]) { { x0, y0 }, { x1, y1 } }, 30); } draw_graph(); diff --git a/examples/screenshot.c b/examples/screenshot.c index 11b2385..9f10983 100644 --- a/examples/screenshot.c +++ b/examples/screenshot.c @@ -17,7 +17,7 @@ void update_and_render_frame(void) { handle_main_window_events(); - draw_pixels_quick( + draw_pixels( (Box) { .width = g_platform.real_width, .height = g_platform.real_height, diff --git a/examples/ui.c b/examples/ui.c index af9b89d..a7877dc 100644 --- a/examples/ui.c +++ b/examples/ui.c @@ -23,7 +23,7 @@ void update_and_render_frame(void) { vec4_f32 light_red = { 1.f, .5f, .5f, 1.f }; vec4_f32 light_green = { .5f, 1.f, .5f, 1.f }; - fill_rectangle_quick(background, (Box) { 0, 0, g_platform.real_width, g_platform.real_height }); + fill_rectangle(background, (Box) { 0, 0, g_platform.real_width, g_platform.real_height }); if (g_platform.cursor_x >= 40 && g_platform.cursor_x < 100 && g_platform.cursor_y >= 40 && g_platform.cursor_y < 100) { button_0_down = g_platform.key_down[BUTTON_LEFT]; @@ -221,9 +221,9 @@ void update_and_render_frame(void) { text[i] = g_platform.drop_files[0].data[i]; } - draw_text_cursor((vec4_f32) { 1.f, 1.f, 1.f, 1.f }, (Box) { x0, y0, w, h }, (vec2) { 10., 10. }, text_len, text, cursor, selection); - draw_text_area((vec4_f32) { 0.f, 0.f, 0.f, 1.f }, (Box) { x0 + 8, y0 - 8, w, h }, (vec2) { 10., 10. }, text_len, text); - draw_text_area(color, (Box) { x0, y0, w, h }, (vec2) { 10., 10. }, text_len, text); + draw_text_cursor_cached((vec4_f32) { 1.f, 1.f, 1.f, 1.f }, (Box) { x0, y0, w, h }, (vec2) { 10., 10. }, text_len, text, cursor, selection); + draw_text_area_cached((vec4_f32) { 0.f, 0.f, 0.f, 1.f }, (Box) { x0 + 8, y0 - 8, w, h }, (vec2) { 10., 10. }, text_len, text); + draw_text_area_cached(color, (Box) { x0, y0, w, h }, (vec2) { 10., 10. }, text_len, text); render_main_window_frame(); } |