summaryrefslogtreecommitdiff
path: root/src/effects/hybrid_3d_effect.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/effects/hybrid_3d_effect.h')
-rw-r--r--src/effects/hybrid_3d_effect.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/effects/hybrid_3d_effect.h b/src/effects/hybrid_3d_effect.h
new file mode 100644
index 0000000..818b65c
--- /dev/null
+++ b/src/effects/hybrid_3d_effect.h
@@ -0,0 +1,29 @@
+// This file is part of the 64k demo project.
+// It defines the Hybrid3DEffect, integrating the 3D renderer into the demo
+// timeline.
+
+#pragma once
+
+#include "3d/camera.h"
+#include "3d/renderer.h"
+#include "3d/scene.h"
+#include "gpu/effect.h"
+#include "gpu/texture_manager.h"
+
+class Hybrid3DEffect : public Effect {
+ public:
+ Hybrid3DEffect(const GpuContext& ctx);
+ virtual ~Hybrid3DEffect() override = default;
+
+ void init(MainSequence* demo) override;
+ void render(WGPURenderPassEncoder pass,
+ const CommonPostProcessUniforms& uniforms) override;
+ void resize(int width, int height) override;
+
+ private:
+ Renderer3D renderer_;
+ TextureManager texture_manager_;
+ Scene scene_;
+ Camera camera_;
+ bool initialized_ = false;
+};