From fb78c88576d9fed90ee69dfa35a9fbd3179ff486 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Mon, 30 Mar 2026 13:04:36 +0100 Subject: Use a single buffer for the location/rotation data of all renderable objects Removes the BufferedLocation and BufferedLocationUpdater mess. Note: appears to break bogie rendering in asset factory test only, same symptom as broken network render test? (out of date buffer data) --- game/scenary/illuminator.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'game/scenary/illuminator.cpp') diff --git a/game/scenary/illuminator.cpp b/game/scenary/illuminator.cpp index 4398853..e991baa 100644 --- a/game/scenary/illuminator.cpp +++ b/game/scenary/illuminator.cpp @@ -11,8 +11,8 @@ std::weak_ptr Illuminator::commonInstanceVAO, Illuminator::common std::any Illuminator::createAt(const Location & position) const { - return std::make_shared::InstanceProxy>( - instances.acquire(position.getRotationTransform(), position.pos)); + return std::make_shared::InstanceProxy>( + instances.acquire(locationData->acquire(position))); } bool @@ -46,8 +46,7 @@ Illuminator::postLoad() glDebugScope _ {0}; if (!(instanceVAO = commonInstanceVAO.lock())) { commonInstanceVAO = instanceVAO = std::make_shared(); - bodyMesh->configureVAO(*instanceVAO, 0) - .addAttribs(1); + bodyMesh->configureVAO(*instanceVAO, 0).addAttribs(1); } if (!spotLight.empty()) { if (!(instancesSpotLightVAO = commonInstancesSpotLightVAO.lock())) { @@ -55,7 +54,7 @@ Illuminator::postLoad() instancesSpotLightVAO->configure() .addAttribs(0) - .addAttribs(1); + .addAttribs(1); } std::transform( spotLight.begin(), spotLight.end(), std::back_inserter(spotLightInstances), [this](const auto & s) { @@ -68,7 +67,7 @@ Illuminator::postLoad() instancesPointLightVAO->configure() .addAttribs(0) - .addAttribs(1); + .addAttribs(1); } std::transform( pointLight.begin(), pointLight.end(), std::back_inserter(pointLightInstances), [this](const auto & s) { -- cgit v1.3