summaryrefslogtreecommitdiff
path: root/gfx
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2026-02-16 18:43:26 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2026-02-16 18:43:26 +0000
commitbcea70c226070b44cca2c20ff7d4cf29d5b018fd (patch)
tree9fc4e8ed91d4e86aad81d92633127324e58210b2 /gfx
parentSupport for testing if a point/sphere is within a Frustum (diff)
downloadilt-bcea70c226070b44cca2c20ff7d4cf29d5b018fd.tar.bz2
ilt-bcea70c226070b44cca2c20ff7d4cf29d5b018fd.tar.xz
ilt-bcea70c226070b44cca2c20ff7d4cf29d5b018fd.zip
Add Renderable::preFrame for doing non-const frame prep work
In theory, this phase should be parallelisable before being pushed out by the render loop.
Diffstat (limited to 'gfx')
-rw-r--r--gfx/renderable.cpp5
-rw-r--r--gfx/renderable.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/gfx/renderable.cpp b/gfx/renderable.cpp
index 27f2459..7df5851 100644
--- a/gfx/renderable.cpp
+++ b/gfx/renderable.cpp
@@ -1,6 +1,11 @@
#include "renderable.h"
void
+Renderable::preFrame(const Frustum &)
+{
+}
+
+void
Renderable::lights(const SceneShader &) const
{
}
diff --git a/gfx/renderable.h b/gfx/renderable.h
index 140c570..d7f593a 100644
--- a/gfx/renderable.h
+++ b/gfx/renderable.h
@@ -13,6 +13,7 @@ public:
virtual ~Renderable() = default;
DEFAULT_MOVE_COPY(Renderable);
+ virtual void preFrame(const Frustum &);
virtual void render(const SceneShader & shader, const Frustum &) const = 0;
virtual void lights(const SceneShader & shader) const;
virtual void shadows(const ShadowMapper & shadowMapper, const Frustum &) const;