Changed animation

main
noah metz 2024-10-29 13:11:15 -06:00
parent 4aa18d4aae
commit edf2e4b3c9
1 changed files with 7 additions and 10 deletions

@ -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);
}
//