diff --git a/main.cpp b/main.cpp index 3180819..c3bea84 100644 --- a/main.cpp +++ b/main.cpp @@ -216,11 +216,11 @@ CVirtualContainer* buildVirtualContainer () "\t\t}," "\t\t{" "\t\t\t\"material\": \"materials/util/combine.json\"," - "\t\t\t\"target\": \"_rt_imageLayerComposite_-1_b\"," + "\t\t\t\"target\": \"_rt_FullFrameBuffer\"," "\t\t\t\"bind\":" "\t\t\t[" "\t\t\t\t{" - "\t\t\t\t\t\"name\": \"_rt_FullFrameBuffer\"," + "\t\t\t\t\t\"name\": \"_rt_imageLayerComposite_-1_a\"," "\t\t\t\t\t\"index\": 0" "\t\t\t\t}," "\t\t\t\t{" diff --git a/src/WallpaperEngine/Core/CScene.cpp b/src/WallpaperEngine/Core/CScene.cpp index 8a528a1..a0df3b6 100644 --- a/src/WallpaperEngine/Core/CScene.cpp +++ b/src/WallpaperEngine/Core/CScene.cpp @@ -74,7 +74,7 @@ CScene* CScene::fromFile (const std::string& filename, CContainer* container) auto camerashakeamplitude = jsonFindDefault (*general_it, "camerashakeamplitude", 0.0f); auto camerashakeroughness = jsonFindDefault (*general_it, "camerashakeroughness", 0.0f); auto camerashakespeed = jsonFindDefault (*general_it, "camerashakespeed", 0.0f); - auto clearcolor_it = jsonFindRequired (*general_it, "clearcolor", "General section must have clear color"); + auto clearcolor = jsonFindUserConfig (*general_it, "clearcolor", "1 1 1"); auto orthogonalprojection_it = jsonFindRequired (*general_it, "orthogonalprojection", "General section must have orthogonal projection info"); auto skylightcolor = jsonFindDefault (*general_it, "skylightcolor", "0 0 0"); @@ -95,7 +95,7 @@ CScene* CScene::fromFile (const std::string& filename, CContainer* container) camerashakeamplitude, camerashakeroughness, camerashakespeed, - WallpaperEngine::Core::aToColorf(*clearcolor_it), + WallpaperEngine::Core::aToColorf(clearcolor), Scenes::CProjection::fromJSON (*orthogonalprojection_it), WallpaperEngine::Core::aToColorf(skylightcolor) ); diff --git a/src/WallpaperEngine/Render/CScene.cpp b/src/WallpaperEngine/Render/CScene.cpp index 74332ce..3a1f998 100644 --- a/src/WallpaperEngine/Render/CScene.cpp +++ b/src/WallpaperEngine/Render/CScene.cpp @@ -247,8 +247,8 @@ void CScene::renderFrame (glm::ivec4 viewport) // use the scene's framebuffer by default glBindFramebuffer (GL_FRAMEBUFFER, this->getWallpaperFramebuffer()); - // ensure we render over the whole screen - glViewport (0, 0, projection->getWidth (), projection->getHeight ()); + // ensure we render over the whole framebuffer + glViewport (0, 0, this->m_sceneFBO->getRealWidth (), this->m_sceneFBO->getRealHeight ()); glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);