From 189eac273ba14c8ca0d22b31182b030ccc4c7756 Mon Sep 17 00:00:00 2001 From: Vito Caputo Date: Sat, 25 Dec 2021 22:01:57 -0800 Subject: *: introduce a projection matrix and winmodes The bulk of this is mechanical wiring up of a projection_x to all the nodes. But this also introduces maintenance of the projection_x, with aspect-ratio preservation in two of the modes: WINDOWED and FULLSCREEN, with the previously default stretched-to-fill fullscreen mode now relegated to a third FILLSCREEN winmode. The default at startup is now an aspect ratio-preserving windowed mode. Simply press the 'f' key at any time to cycle through them. This was mostly done in sars to provide a source-available test for reproducing a fullscreen SDL2 bug I filed @ https://github.com/libsdl-org/SDL/issues/5139 Otherwise it's pretty silly to bother with doing anything on sars... but it is a handy little mule for such things. --- src/tv-node.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/tv-node.c') diff --git a/src/tv-node.c b/src/tv-node.c index 267e2e2..0ca999f 100644 --- a/src/tv-node.c +++ b/src/tv-node.c @@ -23,10 +23,10 @@ static tex_t *tv_tex; -stage_t * tv_node_new(stage_conf_t *conf, m4f_t *model_x) +stage_t * tv_node_new(stage_conf_t *conf, m4f_t *projection_x, m4f_t *model_x) { if (!tv_tex) tv_tex = tex_new(gfx_tv.width, gfx_tv.height, gfx_tv.pixel_data); - return tex_node_new_tex(conf, tv_tex, model_x); + return tex_node_new_tex(conf, tv_tex, projection_x, model_x); } -- cgit v1.2.3