summaryrefslogtreecommitdiff
path: root/graphics.c
diff options
context:
space:
mode:
Diffstat (limited to 'graphics.c')
-rwxr-xr-xgraphics.c65
1 files changed, 1 insertions, 64 deletions
diff --git a/graphics.c b/graphics.c
index 287b248..2b4aa2c 100755
--- a/graphics.c
+++ b/graphics.c
@@ -2259,74 +2259,11 @@ static Pixel_Buffer _test_pixels = {
.pixels = (vec4_f32[1280 * 720]) {0},
};
-static vec4_f32 _test_color = { 1., 1., 1., 1., };
-
-BENCHMARK("fill rectangle") {
- BENCHMARK_BEGIN;
- {
- fill_rectangle_to_buffer(_test_pixels, _test_color, (Box) { .x = 100, .y = 100, .width = 300, .height = 200, });
- }
- BENCHMARK_END;
-}
-
-BENCHMARK("fill triangle") {
- BENCHMARK_BEGIN;
- {
- fill_triangle_to_buffer(_test_pixels, _test_color, (vec2[3]) {
- { 100, 100 },
- { 300, 100 },
- { 200, 250 },
- });
- }
- BENCHMARK_END;
-}
-
-BENCHMARK("fill quad") {
- BENCHMARK_BEGIN;
- {
- fill_quad_to_buffer(_test_pixels, _test_color, (vec2[4]) {
- { 100, 100 },
- { 300, 100 },
- { 300, 200 },
- { 100, 200 },
- });
- }
- BENCHMARK_END;
-}
-
-BENCHMARK("fill ellipse") {
- BENCHMARK_BEGIN;
- {
- fill_ellipse_to_buffer(_test_pixels, _test_color, (Box) { .x = 80, .y = 80, .width = 340, .height = 240, });
- }
- BENCHMARK_END;
-}
-
-BENCHMARK("fill line") {
- BENCHMARK_BEGIN;
- {
- fill_line_to_buffer(_test_pixels, _test_color, (vec2[2]) {
- { 100, 100 },
- { 300, 200 },
- }, 40);
- }
- BENCHMARK_END;
-}
-
-BENCHMARK("draw text area") {
- BENCHMARK_BEGIN;
- {
- c32 text[] = { 'H', 'e', 'l', 'l', 'o', ',', ' ', 'S', 'a', 'i', 'l', 'o', 'r', '!', };
- draw_text_area_to_buffer(_test_pixels, 0, _test_color, (Box) { .x = 100, .y = 100, .width = 300, .height = 200, }, (vec2) { 100, 200 }, sizeof text / sizeof *text, text);
- }
- BENCHMARK_END;
-}
-
#ifndef EVERY_TEST_SUITE
void update_and_render_frame(void) {}
i32 main(i32 argc, c8 **argv) {
- return run_tests_and_benchmarks(argc, argv);
+ return run_tests(argc, argv);
}
#endif