diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2024-08-26 13:47:22 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2024-08-26 13:47:22 +0100 |
commit | 362c6952742eb01e32fdeb2ec26a2fe463e5001c (patch) | |
tree | 8f8d2dd65817e31dac5a637d0551f7d91e86a0b8 /game/scenary | |
parent | Include sizes of shadow box extents as uniforms to shaders (diff) | |
download | ilt-362c6952742eb01e32fdeb2ec26a2fe463e5001c.tar.bz2 ilt-362c6952742eb01e32fdeb2ec26a2fe463e5001c.tar.xz ilt-362c6952742eb01e32fdeb2ec26a2fe463e5001c.zip |
Add a foliage vertex array for just the location data
Diffstat (limited to 'game/scenary')
-rw-r--r-- | game/scenary/foliage.cpp | 2 | ||||
-rw-r--r-- | game/scenary/foliage.h | 1 |
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>; |