mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-28 23:12:24 +00:00
Fix tonemap palette not being rebuilt on palette change
This commit is contained in:
parent
c9578ae72d
commit
b1a0108a96
4 changed files with 11 additions and 0 deletions
|
@ -278,6 +278,12 @@ void FGLRenderer::BindTonemapPalette(int texunit)
|
|||
}
|
||||
}
|
||||
|
||||
void FGLRenderer::ClearTonemapPalette()
|
||||
{
|
||||
delete mTonemapPalette;
|
||||
mTonemapPalette = nullptr;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Apply lens distortion and place the result in the HUD/2D texture
|
||||
|
|
|
@ -111,6 +111,7 @@ FGLRenderer::FGLRenderer(OpenGLFrameBuffer *fb)
|
|||
gllight = glpart2 = glpart = mirrortexture = NULL;
|
||||
mLights = NULL;
|
||||
m2DDrawer = nullptr;
|
||||
mTonemapPalette = nullptr;
|
||||
}
|
||||
|
||||
void gl_LoadModels();
|
||||
|
|
|
@ -167,6 +167,7 @@ public:
|
|||
void BloomScene();
|
||||
void TonemapScene();
|
||||
void BindTonemapPalette(int texunit);
|
||||
void ClearTonemapPalette();
|
||||
void LensDistortScene();
|
||||
void CopyToBackbuffer(const GL_IRECT *bounds, bool applyGamma);
|
||||
void Flush() { CopyToBackbuffer(nullptr, true); }
|
||||
|
|
|
@ -310,6 +310,9 @@ void OpenGLFrameBuffer::UpdatePalette()
|
|||
bb>>=8;
|
||||
|
||||
palette_brightness = (rr*77 + gg*143 + bb*35)/255;
|
||||
|
||||
if (GLRenderer)
|
||||
GLRenderer->ClearTonemapPalette();
|
||||
}
|
||||
|
||||
void OpenGLFrameBuffer::GetFlashedPalette (PalEntry pal[256])
|
||||
|
|
Loading…
Reference in a new issue