diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2025-03-22 11:50:31 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2025-03-22 11:50:31 +0000 |
commit | 9fd25e8b10b1291525a18c8b3e34256ca6151dd6 (patch) | |
tree | c483b55010f310ed60cb7381130feedd2b3980a9 /gfx/gl | |
parent | Support resizing the main window (diff) | |
download | ilt-9fd25e8b10b1291525a18c8b3e34256ca6151dd6.tar.bz2 ilt-9fd25e8b10b1291525a18c8b3e34256ca6151dd6.tar.xz ilt-9fd25e8b10b1291525a18c8b3e34256ca6151dd6.zip |
Add ManyPtr which tracks specified subclasses
This removes the need to repeated dynamic_cast the pointer.
Provides interface which enforces the fastest option for the required
types.
Diffstat (limited to 'gfx/gl')
-rw-r--r-- | gfx/gl/shadowMapper.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gfx/gl/shadowMapper.cpp b/gfx/gl/shadowMapper.cpp index 6525f76..3cb73f7 100644 --- a/gfx/gl/shadowMapper.cpp +++ b/gfx/gl/shadowMapper.cpp @@ -88,7 +88,7 @@ ShadowMapper::update(const SceneProvider & scene, const LightDirection & dir, co shadowStenciller.setLightDirection(dir); for (const auto & [id, asset] : gameState->assets) { - if (const auto r = std::dynamic_pointer_cast<const Renderable>(asset)) { + if (const auto r = asset.getAs<const Renderable>()) { r->updateStencil(shadowStenciller); } } |