chore: move render-dependant texture code to render instead of assets

This commit is contained in:
Almamu 2025-09-11 21:22:33 +02:00
parent f83bc66699
commit 256135a082
14 changed files with 14 additions and 17 deletions

View File

@ -267,9 +267,6 @@ add_executable(
src/WallpaperEngine/Application/CWallpaperApplication.cpp src/WallpaperEngine/Application/CWallpaperApplication.cpp
src/WallpaperEngine/Application/CWallpaperApplication.h src/WallpaperEngine/Application/CWallpaperApplication.h
src/WallpaperEngine/Assets/ITexture.h
src/WallpaperEngine/Assets/CTexture.h
src/WallpaperEngine/Assets/CTexture.cpp
src/WallpaperEngine/Assets/CAssetLoadException.cpp src/WallpaperEngine/Assets/CAssetLoadException.cpp
src/WallpaperEngine/Assets/CAssetLoadException.h src/WallpaperEngine/Assets/CAssetLoadException.h
@ -374,6 +371,9 @@ add_executable(
src/WallpaperEngine/Render/CCamera.cpp src/WallpaperEngine/Render/CCamera.cpp
src/WallpaperEngine/Render/CObject.h src/WallpaperEngine/Render/CObject.h
src/WallpaperEngine/Render/CObject.cpp src/WallpaperEngine/Render/CObject.cpp
src/WallpaperEngine/Render/CTexture.cpp
src/WallpaperEngine/Render/CTexture.h
src/WallpaperEngine/Render/ITexture.h
src/WallpaperEngine/Render/Objects/CImage.h src/WallpaperEngine/Render/Objects/CImage.h
src/WallpaperEngine/Render/Objects/CImage.cpp src/WallpaperEngine/Render/Objects/CImage.cpp

View File

@ -9,7 +9,7 @@
#include "CApplicationState.h" #include "CApplicationState.h"
#include "WallpaperEngine/Assets/ITexture.h" #include "../Render/ITexture.h"
#include "WallpaperEngine/Render/CWallpaperState.h" #include "WallpaperEngine/Render/CWallpaperState.h"
#include "WallpaperEngine/Data/Model/Project.h" #include "WallpaperEngine/Data/Model/Project.h"

View File

@ -2,7 +2,7 @@
#include <string> #include <string>
#include "WallpaperEngine/Assets/ITexture.h" #include "ITexture.h"
using namespace WallpaperEngine::Assets; using namespace WallpaperEngine::Assets;

View File

@ -5,10 +5,7 @@
#include <GL/glew.h> #include <GL/glew.h>
#include <glm/vec4.hpp> #include <glm/vec4.hpp>
#include <map>
#include <memory> #include <memory>
#include <stdexcept>
#include <string>
#include <vector> #include <vector>
namespace WallpaperEngine::Assets { namespace WallpaperEngine::Assets {

View File

@ -2,8 +2,8 @@
#include "WallpaperEngine/FileSystem/Container.h" #include "WallpaperEngine/FileSystem/Container.h"
#include "CTexture.h"
#include "WallpaperEngine/Assets/CAssetLoadException.h" #include "WallpaperEngine/Assets/CAssetLoadException.h"
#include "WallpaperEngine/Assets/CTexture.h"
#include "WallpaperEngine/Render/Helpers/CContextAware.h" #include "WallpaperEngine/Render/Helpers/CContextAware.h"
#include "WallpaperEngine/Data/Model/Project.h" #include "WallpaperEngine/Data/Model/Project.h"

View File

@ -4,7 +4,7 @@
#include <string> #include <string>
#include <memory> #include <memory>
#include "WallpaperEngine/Assets/ITexture.h" #include "ITexture.h"
#include "WallpaperEngine/Render/CRenderContext.h" #include "WallpaperEngine/Render/CRenderContext.h"
#include "WallpaperEngine/Render/Helpers/CContextAware.h" #include "WallpaperEngine/Render/Helpers/CContextAware.h"

View File

@ -1,5 +1,5 @@
#include "CWallpaperState.h" #include "CWallpaperState.h"
#include "WallpaperEngine/Assets/ITexture.h" #include "ITexture.h"
#include "WallpaperEngine/Logging/CLog.h" #include "WallpaperEngine/Logging/CLog.h"
#include <algorithm> #include <algorithm>

View File

@ -4,7 +4,7 @@
#include <GLFW/glfw3.h> #include <GLFW/glfw3.h>
#include <glm/vec4.hpp> #include <glm/vec4.hpp>
#include "WallpaperEngine/Assets/ITexture.h" #include "ITexture.h"
namespace WallpaperEngine::Render { namespace WallpaperEngine::Render {
using namespace WallpaperEngine::Data::Assets; using namespace WallpaperEngine::Data::Assets;

View File

@ -247,6 +247,8 @@ void CImage::setup () {
); );
} }
auto fboProvider = std::make_shared<CFBOProvider> (this);
// prepare the passes list // prepare the passes list
if (!this->getImage ().effects.empty ()) { if (!this->getImage ().effects.empty ()) {
// generate the effects used by this material // generate the effects used by this material
@ -257,8 +259,6 @@ void CImage::setup () {
continue; continue;
} }
auto fboProvider = std::make_shared<CFBOProvider> (this);
// create all the fbos for this effect // create all the fbos for this effect
for (const auto& fbo : cur->effect->fbos) { for (const auto& fbo : cur->effect->fbos) {
fboProvider->create (*fbo, this->m_texture->getFlags (), this->getSize ()); fboProvider->create (*fbo, this->m_texture->getFlags (), this->getSize ());

View File

@ -6,7 +6,7 @@
#include "WallpaperEngine/Render/Shaders/CShader.h" #include "WallpaperEngine/Render/Shaders/CShader.h"
#include "WallpaperEngine/Assets/ITexture.h" #include "../ITexture.h"
#include <glm/vec3.hpp> #include <glm/vec3.hpp>

View File

@ -3,8 +3,8 @@
#include <glm/gtc/type_ptr.hpp> #include <glm/gtc/type_ptr.hpp>
#include <utility> #include <utility>
#include "../../ITexture.h"
#include "WallpaperEngine/Data/Model/Material.h" #include "WallpaperEngine/Data/Model/Material.h"
#include "WallpaperEngine/Assets/ITexture.h"
#include "WallpaperEngine/Render/CFBO.h" #include "WallpaperEngine/Render/CFBO.h"
#include "WallpaperEngine/Render/CFBOProvider.h" #include "WallpaperEngine/Render/CFBOProvider.h"
#include "WallpaperEngine/Render/Helpers/CContextAware.h" #include "WallpaperEngine/Render/Helpers/CContextAware.h"

View File

@ -4,7 +4,7 @@
#include <map> #include <map>
#include <vector> #include <vector>
#include "WallpaperEngine/Assets/ITexture.h" #include "../ITexture.h"
#include "WallpaperEngine/Render/Shaders/Variables/CShaderVariable.h" #include "WallpaperEngine/Render/Shaders/Variables/CShaderVariable.h"
#include "CShaderUnit.h" #include "CShaderUnit.h"