summaryrefslogtreecommitdiff
path: root/gfx/gl/bufferedLocation.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan.goodliffe@octal.co.uk>2026-03-30 13:04:36 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2026-03-31 00:37:24 +0100
commitfb78c88576d9fed90ee69dfa35a9fbd3179ff486 (patch)
tree3666e8c7a7ebf56b5d9e6919093c3a9c7766a750 /gfx/gl/bufferedLocation.cpp
parentUse uint32_t for indexes in InstanceVertices (diff)
downloadilt-fb78c88576d9fed90ee69dfa35a9fbd3179ff486.tar.bz2
ilt-fb78c88576d9fed90ee69dfa35a9fbd3179ff486.tar.xz
ilt-fb78c88576d9fed90ee69dfa35a9fbd3179ff486.zip
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)
Diffstat (limited to 'gfx/gl/bufferedLocation.cpp')
-rw-r--r--gfx/gl/bufferedLocation.cpp70
1 files changed, 0 insertions, 70 deletions
diff --git a/gfx/gl/bufferedLocation.cpp b/gfx/gl/bufferedLocation.cpp
deleted file mode 100644
index f1bedfe..0000000
--- a/gfx/gl/bufferedLocation.cpp
+++ /dev/null
@@ -1,70 +0,0 @@
-#include "bufferedLocation.h"
-#include "location.h"
-#include <glm/gtx/transform.hpp>
-
-BufferedLocation::BufferedLocation(GlobalPosition3D p, Rotation3D r) : BufferedLocation {Location {p, r}} { }
-
-BufferedLocation::BufferedLocation(const Location & l) : loc {l} { }
-
-BufferedLocation::operator const Location &() const
-{
- return loc;
-}
-
-BufferedLocation &
-BufferedLocation::operator=(const Location & l)
-{
- loc = l;
- updateBuffer();
- return *this;
-}
-
-GlobalPosition3D
-BufferedLocation::position() const
-{
- return loc.pos;
-}
-
-Rotation3D
-BufferedLocation::rotation() const
-{
- return loc.rot;
-}
-
-void
-BufferedLocation::setPosition(GlobalPosition3D p, bool update)
-{
- loc.pos = p;
- if (update) {
- updateBuffer();
- }
-}
-
-void
-BufferedLocation::setRotation(Rotation3D r, bool update)
-{
- loc.rot = r;
- if (update) {
- updateBuffer();
- }
-}
-
-void
-BufferedLocation::setLocation(GlobalPosition3D p, Rotation3D r)
-{
- loc.pos = p;
- loc.rot = r;
- updateBuffer();
-}
-
-glm::mat4
-BufferedLocation::getRotationTransform() const
-{
- return loc.getRotationTransform();
-}
-
-void
-BufferedLocationUpdater::updateBuffer() const
-{
- onUpdate(this);
-}