fix: black backgrounds on latest wallpaperengine version (g_Color4 was added)

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
This commit is contained in:
Alexis Maiquez 2023-12-14 02:59:00 +01:00
parent b8fd1eefac
commit 170af5ff7c
3 changed files with 16 additions and 0 deletions

View File

@ -239,6 +239,8 @@ void CWallpaper::setupFramebuffers () {
// create framebuffer for the scene
this->m_sceneFBO = this->createFBO ("_rt_FullFrameBuffer", ITexture::TextureFormat::ARGB8888, clamp, 1.0, width,
height, width, height);
this->aliasFBO ("_rt_MipMappedFrameBuffer", this->m_sceneFBO);
}
CAudioContext& CWallpaper::getAudioContext () {
@ -255,6 +257,12 @@ CFBO* CWallpaper::createFBO (const std::string& name, ITexture::TextureFormat fo
return fbo;
}
void CWallpaper::aliasFBO(const std::string& alias, CFBO* original)
{
this->m_fbos.insert (std::make_pair (alias, original));
}
const std::map<std::string, CFBO*>& CWallpaper::getFBOs () const {
return this->m_fbos;
}

View File

@ -81,6 +81,13 @@ class CWallpaper : public Helpers::CContextAware {
CFBO* createFBO (const std::string& name, ITexture::TextureFormat format, ITexture::TextureFlags flags, float scale,
uint32_t realWidth, uint32_t realHeight, uint32_t textureWidth, uint32_t textureHeight);
/**
* Creates an alias of an existing fbo
* @param alias
* @param original
*/
void aliasFBO (const std::string& alias, CFBO* original);
/**
* @return The full FBO list to work with
*/

View File

@ -519,6 +519,7 @@ void CPass::setupUniforms () {
this->addUniform ("g_UserAlpha", this->m_material->getImage ()->getImage ()->getAlpha ());
this->addUniform ("g_Alpha", this->m_material->getImage ()->getImage ()->getAlpha ());
this->addUniform ("g_Color", this->m_material->getImage ()->getImage ()->getColor ());
this->addUniform ("g_Color4", glm::vec4(this->m_material->getImage ()->getImage ()->getColor (), 1));
// TODO: VALIDATE THAT G_COMPOSITECOLOR REALLY COMES FROM THIS ONE
this->addUniform ("g_CompositeColor", this->m_material->getImage ()->getImage ()->getColor ());
// add some external variables