summaryrefslogtreecommitdiff
path: root/gfx/gl/bufferedLocation.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2023-05-07 01:41:31 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2023-05-07 01:41:31 +0100
commit9ab2aad4aa00afe3373b3a779377fa049459fb4d (patch)
tree18bf013e3be660b0769cd1a601e670eb79355324 /gfx/gl/bufferedLocation.cpp
parentRename strings.h to something that won't conflict with a system header (diff)
parentTemplated BufferedLocation and single buffer storage for RVC locations (diff)
downloadilt-9ab2aad4aa00afe3373b3a779377fa049459fb4d.tar.bz2
ilt-9ab2aad4aa00afe3373b3a779377fa049459fb4d.tar.xz
ilt-9ab2aad4aa00afe3373b3a779377fa049459fb4d.zip
Merge branch 'containers'
Diffstat (limited to 'gfx/gl/bufferedLocation.cpp')
-rw-r--r--gfx/gl/bufferedLocation.cpp16
1 files changed, 2 insertions, 14 deletions
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 <glm/gtx/transform.hpp>
-BufferedLocation::BufferedLocation(InstanceVertices<glm::mat4> & 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<glm::mat4> & 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
{