From 86b57bd3a12c45e3af2f7c12c82d447f6aa7f27e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Madar=C3=A1sz?= Date: Thu, 29 Sep 2022 15:02:40 +0200 Subject: [PATCH] drop vsync for desktop + TEXTURE_WRAP_CLAMP for chunks --- code/foundation/src/platform/arch.h | 2 +- code/foundation/src/world/blocks.c | 1 + code/games/minimal/src/platform.c | 2 ++ code/games/minimal/src/renderer.c | 1 - 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/code/foundation/src/platform/arch.h b/code/foundation/src/platform/arch.h index eab7457..7fe5552 100644 --- a/code/foundation/src/platform/arch.h +++ b/code/foundation/src/platform/arch.h @@ -67,7 +67,7 @@ void platform_create_window(const char *title) { #endif InitWindow(screenWidth, screenHeight, title); - SetWindowState(/*FLAG_WINDOW_UNDECORATED|*/FLAG_WINDOW_MAXIMIZED|FLAG_WINDOW_RESIZABLE|FLAG_MSAA_4X_HINT|FLAG_VSYNC_HINT); + SetWindowState(/*FLAG_WINDOW_UNDECORATED|*/FLAG_WINDOW_MAXIMIZED|FLAG_WINDOW_RESIZABLE|FLAG_MSAA_4X_HINT/* |FLAG_VSYNC_HINT */); #if !defined(PLATFORM_WEB) screenWidth = (uint16_t)GetScreenWidth(); diff --git a/code/foundation/src/world/blocks.c b/code/foundation/src/world/blocks.c index c3aef45..c60ef50 100644 --- a/code/foundation/src/world/blocks.c +++ b/code/foundation/src/world/blocks.c @@ -112,6 +112,7 @@ void blocks_build_chunk_tex(uint64_t id, block_id *chunk_blocks, void *raw_view) } } EndTextureMode(); + SetTextureWrap(canvas.texture, TEXTURE_WRAP_CLAMP); blocks__chunk_tbl_set(&baked_chunks, id, canvas); } diff --git a/code/games/minimal/src/platform.c b/code/games/minimal/src/platform.c index dd8ea55..fc9b4fa 100644 --- a/code/games/minimal/src/platform.c +++ b/code/games/minimal/src/platform.c @@ -93,6 +93,8 @@ void platform_render() { profile (PROF_RENDER) { renderer_draw(); } + + debug_draw(); } EndDrawing(); diff --git a/code/games/minimal/src/renderer.c b/code/games/minimal/src/renderer.c index 0a9b9e0..7f9002a 100644 --- a/code/games/minimal/src/renderer.c +++ b/code/games/minimal/src/renderer.c @@ -44,7 +44,6 @@ void DEBUG_draw_entities(uint64_t key, entity_view * data) { case EKIND_PLAYER: { float x = data->x; float y = data->y; - float health = (data->hp / data->max_hp); DrawCircleEco(x, y, size, ColorAlpha(YELLOW, data->tran_time)); }break; default:break;