From 26a05857d01e27a7532d865a7b7b859ac27a3d78 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 5 Mar 2016 12:46:47 +0100 Subject: [PATCH] - fixed: Camera textures should not intercept and clear the NoInterpolateView flag. Thanks to some really bad use of a global variable this was causing problems with the inverted order in which GZDoom needs to draw this stuff. --- src/gl/scene/gl_scene.cpp | 7 ++++++- src/r_utility.cpp | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/gl/scene/gl_scene.cpp b/src/gl/scene/gl_scene.cpp index 22911a21b..3d8d72aba 100644 --- a/src/gl/scene/gl_scene.cpp +++ b/src/gl/scene/gl_scene.cpp @@ -95,7 +95,8 @@ EXTERN_CVAR (Bool, r_deathcamera) extern int viewpitch; - +extern bool NoInterpolateView; + DWORD gl_fixedcolormap; area_t in_area; TArray currentmapsection; @@ -872,8 +873,12 @@ void FGLRenderer::RenderView (player_t* player) GLRenderer->mLights->Clear(); + // NoInterpolateView should have no bearing on camera textures, but needs to be preserved for the main view below. + bool saved_niv = NoInterpolateView; + NoInterpolateView = false; // prepare all camera textures that have been used in the last frame FCanvasTextureInfo::UpdateAll(); + NoInterpolateView = true; // I stopped using BaseRatioSizes here because the information there wasn't well presented. diff --git a/src/r_utility.cpp b/src/r_utility.cpp index d301b45fc..7be6e0f82 100644 --- a/src/r_utility.cpp +++ b/src/r_utility.cpp @@ -80,7 +80,7 @@ struct InterpolationViewer static TArray PastViewers; static FRandom pr_torchflicker ("TorchFlicker"); static FRandom pr_hom; -static bool NoInterpolateView; +bool NoInterpolateView; // GL needs access to this. static TArray InterpolationPath; // PUBLIC DATA DEFINITIONS -------------------------------------------------