mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-22 14:15:38 +00:00
Fixed an issue where the cached background would sometimes miss some GUI elements.
This commit is contained in:
parent
f66bb91496
commit
5c07e29101
|
@ -11,6 +11,7 @@
|
||||||
#include "Log.h"
|
#include "Log.h"
|
||||||
#include "Settings.h"
|
#include "Settings.h"
|
||||||
#include "ThemeData.h"
|
#include "ThemeData.h"
|
||||||
|
#include "Window.h"
|
||||||
#include "resources/TextureResource.h"
|
#include "resources/TextureResource.h"
|
||||||
#include "utils/CImgUtil.h"
|
#include "utils/CImgUtil.h"
|
||||||
|
|
||||||
|
@ -402,8 +403,14 @@ void ImageComponent::render(const glm::mat4& parentTrans)
|
||||||
// Actually draw the image.
|
// Actually draw the image.
|
||||||
// The bind() function returns false if the texture is not currently loaded. A blank
|
// The bind() function returns false if the texture is not currently loaded. A blank
|
||||||
// texture is bound in this case but we want to handle a fade so it doesn't just
|
// texture is bound in this case but we want to handle a fade so it doesn't just
|
||||||
// 'jump' in when it finally loads.
|
// 'jump' in when it finally loads. The exception is if the cached background is
|
||||||
|
// getting invalidated, in which case we want to make sure to not get a partially
|
||||||
|
// faded texture rendered onto the new background.
|
||||||
|
if (mWindow->isInvalidatingCachedBackground())
|
||||||
|
mTexture->bind();
|
||||||
|
else
|
||||||
fadeIn(mTexture->bind());
|
fadeIn(mTexture->bind());
|
||||||
|
|
||||||
#if defined(USE_OPENGL_21)
|
#if defined(USE_OPENGL_21)
|
||||||
if (mSaturation < 1.0) {
|
if (mSaturation < 1.0) {
|
||||||
mVertices[0].shaders = Renderer::SHADER_DESATURATE;
|
mVertices[0].shaders = Renderer::SHADER_DESATURATE;
|
||||||
|
|
Loading…
Reference in a new issue