From edf2e4b3c91cd50d96a89849da14abcc406061c2 Mon Sep 17 00:00:00 2001 From: Noah Metz Date: Tue, 29 Oct 2024 13:11:15 -0600 Subject: [PATCH] Changed animation --- client/src/main.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/client/src/main.c b/client/src/main.c index 9a6d892..2ed5772 100644 --- a/client/src/main.c +++ b/client/src/main.c @@ -189,11 +189,13 @@ VkResult main_thread(ClientContext* context) { // double last_draw = 0; - double draw_interval = 1; + double draw_interval = 0.5; double frame_count = 0; uint32_t* mapped_codes = context->ui.containers[0].layers[0].codes_buffer; GPUString* mapped_string = context->ui.containers[0].layers[0].strings_buffer; - char str[11]; + char str[11] = "1234567890"; + map_string(str, mapped_codes, 0, 0, &context->ui); + int test = 0; // @@ -203,14 +205,8 @@ VkResult main_thread(ClientContext* context) { // if(frame_time - last_draw > draw_interval) { - test = (test + 1) % 2; - snprintf(str, 11, "%3.2f", frame_count/(frame_time-last_draw)); - map_string(str, mapped_codes, 0, 0, &context->ui); - if(test) { - mapped_string->length = strlen(str); - } else { - mapped_string->length = 0; - } + test = (test + 1) % 7; + mapped_string->length = test; last_draw = frame_time; frame_count = 0; @@ -227,6 +223,7 @@ VkResult main_thread(ClientContext* context) { offsetof(GPUString, length), sizeof(uint32_t), &context->render)); + fprintf(stdout, "Added transfers for size %d on frame %d\n", mapped_string->length, context->render.current_frame); } //