summaryrefslogtreecommitdiffstats
path: root/src/RenderConfigs.hpp
diff options
context:
space:
mode:
authorLaG1924 <lag1924@gmail.com>2021-12-08 16:33:09 +0100
committerLaG1924 <lag1924@gmail.com>2021-12-08 16:33:09 +0100
commita12779bc153425407b131bce541c0bb97cccca39 (patch)
tree91ed3bb9b00c274f5be91cf920317e760fe99e7a /src/RenderConfigs.hpp
parentAdded more SSAO settings (diff)
downloadAltCraft-a12779bc153425407b131bce541c0bb97cccca39.tar
AltCraft-a12779bc153425407b131bce541c0bb97cccca39.tar.gz
AltCraft-a12779bc153425407b131bce541c0bb97cccca39.tar.bz2
AltCraft-a12779bc153425407b131bce541c0bb97cccca39.tar.lz
AltCraft-a12779bc153425407b131bce541c0bb97cccca39.tar.xz
AltCraft-a12779bc153425407b131bce541c0bb97cccca39.tar.zst
AltCraft-a12779bc153425407b131bce541c0bb97cccca39.zip
Diffstat (limited to 'src/RenderConfigs.hpp')
-rw-r--r--src/RenderConfigs.hpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/RenderConfigs.hpp b/src/RenderConfigs.hpp
index d76647e..8ca5a9e 100644
--- a/src/RenderConfigs.hpp
+++ b/src/RenderConfigs.hpp
@@ -22,6 +22,34 @@ std::shared_ptr<Gal::Shader> LoadVertexShader(std::string_view assetPath);
std::shared_ptr<Gal::Shader> LoadPixelShader(std::string_view assetPath);
+class TextureFbCopy {
+ std::shared_ptr<Gal::Framebuffer> framebuffer;
+ std::shared_ptr<Gal::Buffer> fbBuffer;
+ std::shared_ptr<Gal::Pipeline> pipeline;
+ std::shared_ptr<Gal::PipelineInstance> pipelineInstance;
+public:
+
+ TextureFbCopy(
+ std::shared_ptr<Gal::Texture> inputTexture,
+ std::shared_ptr<Gal::Texture> outputTexture,
+ std::shared_ptr<Gal::Shader> copyShader = nullptr);
+
+ TextureFbCopy(
+ std::shared_ptr<Gal::Texture> inputTexture,
+ std::shared_ptr<Gal::Framebuffer> outputFb,
+ std::shared_ptr<Gal::Shader> copyShader = nullptr);
+
+ void Clear() {
+ framebuffer->Clear();
+ }
+
+ void Copy() {
+ pipeline->Activate();
+ pipelineInstance->Activate();
+ pipelineInstance->Render(0, 6);
+ }
+};
+
class PostProcess {
std::shared_ptr<Gal::Framebuffer> framebuffer;
std::shared_ptr<Gal::Buffer> fbBuffer;