diff --git a/engine/joint/v4k.h b/engine/joint/v4k.h index b60a343..917c392 100644 --- a/engine/joint/v4k.h +++ b/engine/joint/v4k.h @@ -367703,14 +367703,6 @@ static bool win_debug_visible = true; static void ui_render() { - // skip UI rendering if capture test is enabled - static uint64_t capture_target; do_once capture_target = optioni("--capture", 0); - if( capture_target ) { - glViewport(0,0,window_width(),window_height()); //@fixme: viewport is incorrect when we bail here - nk_clear(&nk_glfw.ctx); - return; - } - // draw queued menus ui_notify_render(); ui_menu_render(); @@ -392618,6 +392610,11 @@ bool window_create_from_handle(void *handle, float scale, unsigned flags) { int winWidth = window_canvas().w * scale; int winHeight = window_canvas().h * scale; + if (optioni("--capture", 0)) { + winWidth = 1280; + winHeight = 720; + } + window_hints(flags); GLFWmonitor* monitor = NULL; diff --git a/engine/split/v4k_ui.c b/engine/split/v4k_ui.c index 0da681d..5f56aa1 100644 --- a/engine/split/v4k_ui.c +++ b/engine/split/v4k_ui.c @@ -1035,14 +1035,6 @@ static bool win_debug_visible = true; static void ui_render() { - // skip UI rendering if capture test is enabled - static uint64_t capture_target; do_once capture_target = optioni("--capture", 0); - if( capture_target ) { - glViewport(0,0,window_width(),window_height()); //@fixme: viewport is incorrect when we bail here - nk_clear(&nk_glfw.ctx); - return; - } - // draw queued menus ui_notify_render(); ui_menu_render(); diff --git a/engine/split/v4k_window.c b/engine/split/v4k_window.c index bc585ee..9a1cc7d 100644 --- a/engine/split/v4k_window.c +++ b/engine/split/v4k_window.c @@ -288,6 +288,11 @@ bool window_create_from_handle(void *handle, float scale, unsigned flags) { int winWidth = window_canvas().w * scale; int winHeight = window_canvas().h * scale; + if (optioni("--capture", 0)) { + winWidth = 1280; + winHeight = 720; + } + window_hints(flags); GLFWmonitor* monitor = NULL; diff --git a/engine/v4k.c b/engine/v4k.c index 0e739b5..b3dcf00 100644 --- a/engine/v4k.c +++ b/engine/v4k.c @@ -2243,14 +2243,6 @@ static bool win_debug_visible = true; static void ui_render() { - // skip UI rendering if capture test is enabled - static uint64_t capture_target; do_once capture_target = optioni("--capture", 0); - if( capture_target ) { - glViewport(0,0,window_width(),window_height()); //@fixme: viewport is incorrect when we bail here - nk_clear(&nk_glfw.ctx); - return; - } - // draw queued menus ui_notify_render(); ui_menu_render(); @@ -27158,6 +27150,11 @@ bool window_create_from_handle(void *handle, float scale, unsigned flags) { int winWidth = window_canvas().w * scale; int winHeight = window_canvas().h * scale; + if (optioni("--capture", 0)) { + winWidth = 1280; + winHeight = 720; + } + window_hints(flags); GLFWmonitor* monitor = NULL; diff --git a/tests/ref/00-loop.png b/tests/ref/00-loop.png index a02fb95..b44d39f 100644 Binary files a/tests/ref/00-loop.png and b/tests/ref/00-loop.png differ diff --git a/tests/ref/00-script.png b/tests/ref/00-script.png index c8518d5..15f17b5 100644 Binary files a/tests/ref/00-script.png and b/tests/ref/00-script.png differ diff --git a/tests/ref/01-demo2d.png b/tests/ref/01-demo2d.png index 93c74f3..18bc8c5 100644 Binary files a/tests/ref/01-demo2d.png and b/tests/ref/01-demo2d.png differ diff --git a/tests/ref/01-easing.png b/tests/ref/01-easing.png index 4e370d6..5595332 100644 Binary files a/tests/ref/01-easing.png and b/tests/ref/01-easing.png differ diff --git a/tests/ref/01-font.png b/tests/ref/01-font.png index ae0be0d..0948d9c 100644 Binary files a/tests/ref/01-font.png and b/tests/ref/01-font.png differ diff --git a/tests/ref/01-ui.png b/tests/ref/01-ui.png index a02fb95..4c60ffb 100644 Binary files a/tests/ref/01-ui.png and b/tests/ref/01-ui.png differ diff --git a/tests/ref/02-ddraw.png b/tests/ref/02-ddraw.png index 97cfc04..02c6227 100644 Binary files a/tests/ref/02-ddraw.png and b/tests/ref/02-ddraw.png differ diff --git a/tests/ref/02-frustum.png b/tests/ref/02-frustum.png index f997aec..b1d98b4 100644 Binary files a/tests/ref/02-frustum.png and b/tests/ref/02-frustum.png differ diff --git a/tests/ref/03-anims.png b/tests/ref/03-anims.png index 119b13b..94b04fd 100644 Binary files a/tests/ref/03-anims.png and b/tests/ref/03-anims.png differ diff --git a/tests/ref/04-actor.png b/tests/ref/04-actor.png index 41bb1d0..d9a080a 100644 Binary files a/tests/ref/04-actor.png and b/tests/ref/04-actor.png differ diff --git a/tests/ref/06-material.png b/tests/ref/06-material.png index ff7adeb..d363ba9 100644 Binary files a/tests/ref/06-material.png and b/tests/ref/06-material.png differ diff --git a/tests/ref/06-scene.png b/tests/ref/06-scene.png index aad352f..ffec23e 100644 Binary files a/tests/ref/06-scene.png and b/tests/ref/06-scene.png differ diff --git a/tests/ref/07-netsync.png b/tests/ref/07-netsync.png index 16697ac..daf443a 100644 Binary files a/tests/ref/07-netsync.png and b/tests/ref/07-netsync.png differ diff --git a/tests/ref/07-network.png b/tests/ref/07-network.png index 9c44a1e..c7bfd6e 100644 Binary files a/tests/ref/07-network.png and b/tests/ref/07-network.png differ diff --git a/tests/ref/08-audio.png b/tests/ref/08-audio.png index d5a4bb5..ad5a67d 100644 Binary files a/tests/ref/08-audio.png and b/tests/ref/08-audio.png differ diff --git a/tests/ref/08-video.png b/tests/ref/08-video.png index 97d3de0..639cbb3 100644 Binary files a/tests/ref/08-video.png and b/tests/ref/08-video.png differ diff --git a/tests/ref/09-cubemap.png b/tests/ref/09-cubemap.png index 8650d79..a169992 100644 Binary files a/tests/ref/09-cubemap.png and b/tests/ref/09-cubemap.png differ diff --git a/tests/ref/09-shadertoy.png b/tests/ref/09-shadertoy.png index e0c70bf..baca245 100644 Binary files a/tests/ref/09-shadertoy.png and b/tests/ref/09-shadertoy.png differ