From 540d99924ef0a5fdfea2e070fa0d505c6d7374d9 Mon Sep 17 00:00:00 2001 From: Alug Date: Wed, 2 Oct 2024 13:34:41 +0200 Subject: [PATCH] why did we calc all of this in ogl? --- src/r_main.c | 56 +++++++++++++++++++++++++++++----------------------- 1 file changed, 31 insertions(+), 25 deletions(-) diff --git a/src/r_main.c b/src/r_main.c index 40e58a8e6..1254e780c 100644 --- a/src/r_main.c +++ b/src/r_main.c @@ -949,6 +949,21 @@ void R_ExecuteSetViewSize(void) // status bar overlay st_overlay = cv_showhud.value; + // why did we calc all the software crap? +#ifdef HWRENDER + if (rendermode == render_opengl) + { + fov = FixedAngle(cv_fov.value/2) + ANGLE_90; + fovtan = FixedMul(FINETANGENT(fov >> ANGLETOFINESHIFT), FRACUNIT); + if (splitscreen == 1) // Splitscreen FOV should be adjusted to maintain expected vertical view + fovtan = 17*fovtan/10; + + HWR_SetViewSize(); + am_recalc = true; + return; + } +#endif + scaledviewwidth = vid.width; viewheight = vid.height; @@ -987,27 +1002,24 @@ void R_ExecuteSetViewSize(void) R_SetSkyScale(); // planes - if (rendermode == render_soft) + // this is only used for planes rendering in software mode + j = viewheight*16; + for (i = 0; i < j; i++) { - // this is only used for planes rendering in software mode - j = viewheight*16; - for (i = 0; i < j; i++) - { - dy = (i - viewheight*8)<