From c403a71564def731f4d3b80d6ff63f08aa3c7ea3 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Wed, 11 Mar 2026 20:45:05 +0000 Subject: Reuse vertex array objects for common structures with DSA Slashes the number of VAOs required and the amount of setup required. --- game/scenary/foliage.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'game/scenary/foliage.h') diff --git a/game/scenary/foliage.h b/game/scenary/foliage.h index bf98d55..c599649 100644 --- a/game/scenary/foliage.h +++ b/game/scenary/foliage.h @@ -12,8 +12,8 @@ class Location; class Foliage : public Asset, public Renderable, public StdTypeDefs { Mesh::Ptr bodyMesh; Texture::Ptr texture; - glVertexArray instanceVAO; - glVertexArray instancePointVAO; + std::shared_ptr instanceVAO, instancePointVAO; + static std::weak_ptr commonInstanceVAO, commonInstancePointVAO; public: [[nodiscard]] std::any createAt(const Location &) const override; -- cgit v1.3