Explorar el Código

~ fixed multiple-screen rendering of backgrounds

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
Alexis Maiquez hace 5 años
padre
commit
4744304a3d
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      src/WallpaperEngine/Render/CWallpaper.cpp

+ 2 - 1
src/WallpaperEngine/Render/CWallpaper.cpp

@@ -262,7 +262,8 @@ void CWallpaper::render (glm::vec4 viewport, bool newFrame)
     // write to default's framebuffer
     glBindFramebuffer (GL_FRAMEBUFFER, GL_NONE);
 
-    glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+    if (newFrame == true)
+        glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
     glDisable (GL_BLEND);
     glDisable (GL_DEPTH_TEST);
     // do not use any shader