From 0b0067cb0a8db5ea5178501a12aacdef436a9845 Mon Sep 17 00:00:00 2001 From: skal Date: Mon, 2 Feb 2026 09:19:17 +0100 Subject: feat(platform): Fix high-DPI scaling and add resolution option - Fixed a 'squished' viewport bug on high-DPI (Retina) displays by querying the framebuffer size in pixels instead of using the window size in points. - Centralized window dimension management within the platform layer. - Added a '--resolution WxH' command-line option to allow specifying a custom window size at startup. This option is stripped in STRIP_ALL builds. - Updated all test and tool executables to use the new platform API. --- src/tests/test_3d_render.cc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/tests/test_3d_render.cc') diff --git a/src/tests/test_3d_render.cc b/src/tests/test_3d_render.cc index e4477a0..0a809c4 100644 --- a/src/tests/test_3d_render.cc +++ b/src/tests/test_3d_render.cc @@ -174,8 +174,13 @@ void gen_periodic_noise(uint8_t* buffer, int w, int h, const float* params, } int main() { - platform_init_window(false); - init_wgpu(); + printf("Running 3D Renderer Test...\n"); + + platform_init_window(false, nullptr, nullptr); + gpu_init(platform_get_window(), platform_get_width(), platform_get_height()); + + // Create Renderer and Scene + Renderer3D renderer; g_renderer.init(g_device, g_queue, g_format); g_renderer.resize(g_width, g_height); -- cgit v1.2.3