summaryrefslogtreecommitdiff
path: root/game
diff options
context:
space:
mode:
Diffstat (limited to 'game')
-rw-r--r--game/scenary/foliage.cpp2
-rw-r--r--game/scenary/foliage.h1
2 files changed, 3 insertions, 0 deletions
diff --git a/game/scenary/foliage.cpp b/game/scenary/foliage.cpp
index 13d2f3b..1c03217 100644
--- a/game/scenary/foliage.cpp
+++ b/game/scenary/foliage.cpp
@@ -16,6 +16,8 @@ Foliage::postLoad()
texture = getTexture();
bodyMesh->configureVAO(instanceVAO)
.addAttribs<LocationVertex, &LocationVertex::first, &LocationVertex::second>(instances.bufferName(), 1);
+ VertexArrayObject {instancePointVAO}.addAttribs<LocationVertex, &LocationVertex::first, &LocationVertex::second>(
+ instances.bufferName());
}
void
diff --git a/game/scenary/foliage.h b/game/scenary/foliage.h
index fa6c63b..824a644 100644
--- a/game/scenary/foliage.h
+++ b/game/scenary/foliage.h
@@ -14,6 +14,7 @@ class Foliage : public Asset, public Renderable, public StdTypeDefs<Foliage> {
Mesh::Ptr bodyMesh;
Texture::Ptr texture;
glVertexArray instanceVAO;
+ glVertexArray instancePointVAO;
public:
using LocationVertex = std::pair<glm::mat3, GlobalPosition3D>;