diff --git a/src/gl/scene/gl_scene.cpp b/src/gl/scene/gl_scene.cpp index a99423e5e6..d2a24812e7 100644 --- a/src/gl/scene/gl_scene.cpp +++ b/src/gl/scene/gl_scene.cpp @@ -897,17 +897,8 @@ sector_t * FGLRenderer::RenderViewpoint (AActor * camera, GL_IRECT * bounds, flo void FGLRenderer::RenderView (player_t* player) { - OpenGLFrameBuffer* GLTarget = static_cast(screen); - AActor *&LastCamera = GLTarget->LastCamera; checkBenchActive(); - if (player->camera != LastCamera) - { - // If the camera changed don't interpolate - // Otherwise there will be some not so nice effects. - R_ResetViewInterpolation(); - LastCamera=player->camera; - } gl_RenderState.SetVertexBuffer(mVBO); GLRenderer->mVBO->Reset(); diff --git a/src/gl/system/gl_framebuffer.cpp b/src/gl/system/gl_framebuffer.cpp index e6f2833f8a..4aedd176ad 100644 --- a/src/gl/system/gl_framebuffer.cpp +++ b/src/gl/system/gl_framebuffer.cpp @@ -93,7 +93,6 @@ OpenGLFrameBuffer::OpenGLFrameBuffer(void *hMonitor, int width, int height, int memcpy (SourcePalette, GPalette.BaseColors, sizeof(PalEntry)*256); UpdatePalette (); ScreenshotBuffer = NULL; - LastCamera = NULL; InitializeState(); mDebug = std::make_shared(); @@ -101,8 +100,6 @@ OpenGLFrameBuffer::OpenGLFrameBuffer(void *hMonitor, int width, int height, int gl_SetupMenu(); gl_GenerateGlobalBrightmapFromColormap(); DoSetGamma(); - needsetgamma = true; - swapped = false; Accel2D = true; } @@ -178,7 +175,6 @@ void OpenGLFrameBuffer::Update() GLRenderer->Flush(); Swap(); - swapped = false; Unlock(); CheckBench(); @@ -215,15 +211,9 @@ void OpenGLFrameBuffer::Swap() Finish.Reset(); Finish.Clock(); if (swapbefore) glFinish(); - if (needsetgamma) - { - //DoSetGamma(); - needsetgamma = false; - } SwapBuffers(); if (!swapbefore) glFinish(); Finish.Unclock(); - swapped = true; camtexcount = 0; FHardwareTexture::UnbindAll(); mDebug->Update(); @@ -565,7 +555,6 @@ void OpenGLFrameBuffer::GameRestart() memcpy (SourcePalette, GPalette.BaseColors, sizeof(PalEntry)*256); UpdatePalette (); ScreenshotBuffer = NULL; - LastCamera = NULL; gl_GenerateGlobalBrightmapFromColormap(); } diff --git a/src/gl/system/gl_framebuffer.h b/src/gl/system/gl_framebuffer.h index 8819b80698..cdf96775ec 100644 --- a/src/gl/system/gl_framebuffer.h +++ b/src/gl/system/gl_framebuffer.h @@ -85,18 +85,13 @@ public: void SetVSync(bool vsync); + int palette_brightness; // brightness of the active palette - this is used for screen blends + bool HWGammaActive = false; // Are we using hardware or software gamma? + std::shared_ptr mDebug; // Debug API private: - PalEntry Flash; - - // Texture creation info - int cm; - int translation; - bool iscomplex; - bool needsetgamma; - bool swapped; - - PalEntry SourcePalette[256]; - uint8_t *ScreenshotBuffer; + PalEntry Flash; // Only needed to support some cruft in the interface that only makes sense for the software renderer + PalEntry SourcePalette[256]; // This is where unpaletted textures get their palette from + uint8_t *ScreenshotBuffer; // What the name says. This must be maintained because the software renderer can return a locked canvas surface which the caller cannot release. class Wiper { @@ -120,13 +115,8 @@ private: FHardwareTexture *wipestartscreen; FHardwareTexture *wipeendscreen; - bool HWGammaActive = false; - - std::shared_ptr mDebug; public: - AActor * LastCamera; - int palette_brightness; };