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. --- assetFactory/assetFactory.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'assetFactory/assetFactory.cpp') diff --git a/assetFactory/assetFactory.cpp b/assetFactory/assetFactory.cpp index b96e527..a8d6036 100644 --- a/assetFactory/assetFactory.cpp +++ b/assetFactory/assetFactory.cpp @@ -3,6 +3,7 @@ #include "cuboid.h" #include "cylinder.h" #include "filesystem.h" +#include "gfx/gl/gldebug.h" #include "gfx/image.h" #include "gfx/models/texture.h" #include "gfx/renderable.h" @@ -26,6 +27,7 @@ AssetFactory::AssetFactory() : std::shared_ptr AssetFactory::loadXML(const std::filesystem::path & filename) { + glDebugScope _ {0, filename.native()}; filesystem::FileStar file {filename.c_str(), "r"}; return Persistence::SAXParsePersistence {}.loadState>(file); } @@ -33,6 +35,7 @@ AssetFactory::loadXML(const std::filesystem::path & filename) AssetFactory::Assets AssetFactory::loadAll(const std::filesystem::path & root) { + glDebugScope _ {0}; return std::accumulate(std::filesystem::recursive_directory_iterator {root}, std::filesystem::recursive_directory_iterator {}, Assets {}, [](auto out, const auto & path) { if (path.path().extension() == ".xml") { @@ -115,6 +118,7 @@ void AssetFactory::createTexutre() const { if (!textureFragments.empty() && !texture) { + glDebugScope _ {0}; // * layout images std::map> images; std::transform( -- cgit v1.3