Skip to content

Commit

Permalink
fix: black backgrounds on latest wallpaperengine version (g_Color4 wa…
Browse files Browse the repository at this point in the history
…s added)

Signed-off-by: Alexis Maiquez <[email protected]>
  • Loading branch information
Almamu committed Dec 14, 2023
1 parent b8fd1ee commit 170af5f
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/WallpaperEngine/Render/CWallpaper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 () {
Expand All @@ -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;
}
Expand Down
7 changes: 7 additions & 0 deletions src/WallpaperEngine/Render/CWallpaper.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down
1 change: 1 addition & 0 deletions src/WallpaperEngine/Render/Objects/Effects/CPass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 170af5f

Please sign in to comment.