From 72ab29786f6d4c97a92cb95c75091537490e2d0f Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sat, 6 May 2023 16:42:08 +0100 Subject: Templated BufferedLocation and single buffer storage for RVC locations --- gfx/gl/bufferedLocation.cpp | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'gfx/gl/bufferedLocation.cpp') diff --git a/gfx/gl/bufferedLocation.cpp b/gfx/gl/bufferedLocation.cpp index 7027b4c..eb3dac3 100644 --- a/gfx/gl/bufferedLocation.cpp +++ b/gfx/gl/bufferedLocation.cpp @@ -3,15 +3,9 @@ #include "maths.h" #include -BufferedLocation::BufferedLocation(InstanceVertices & i, glm::vec3 p, glm::vec3 r) : - BufferedLocation {i, Location {p, r}} -{ -} +BufferedLocation::BufferedLocation(glm::vec3 p, glm::vec3 r) : BufferedLocation {Location {p, r}} { } -BufferedLocation::BufferedLocation(InstanceVertices & i, const Location & l) : - loc {l}, buffer {i.acquire(getTransform())} -{ -} +BufferedLocation::BufferedLocation(const Location & l) : loc {l} { } BufferedLocation::operator const Location &() const { @@ -64,12 +58,6 @@ BufferedLocation::setLocation(glm::vec3 p, glm::vec3 r) updateBuffer(); } -void -BufferedLocation::updateBuffer() -{ - buffer = getTransform(); -} - glm::mat4 BufferedLocation::getTransform() const { -- cgit v1.2.3