From 610ce89bfa49d138e13a6cf03f5a241e7e0b28ad Mon Sep 17 00:00:00 2001 From: themancalledjakob Date: Mon, 29 May 2023 09:56:03 +0200 Subject: [PATCH] make shaderCatalog shared_ptr --- src/GPUFontAtlasLayerCombo.cpp | 2 +- src/GPUFontAtlasLayerCombo.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/GPUFontAtlasLayerCombo.cpp b/src/GPUFontAtlasLayerCombo.cpp index aeac68f..07460ac 100644 --- a/src/GPUFontAtlasLayerCombo.cpp +++ b/src/GPUFontAtlasLayerCombo.cpp @@ -22,7 +22,7 @@ void GPUFontAtlasLayerCombo::setup(const ComboIdentifier & identifier, #else string shaderDir = "data/ofxGPUFont/shaders/GL3"; #endif - shaderCatalog = std::make_unique (shaderDir); + shaderCatalog = std::make_shared (shaderDir); //backgroundShader = shaderCatalog->get("background"); fontShader = shaderCatalog->get("font"); diff --git a/src/GPUFontAtlasLayerCombo.h b/src/GPUFontAtlasLayerCombo.h index cbb1257..5faa450 100644 --- a/src/GPUFontAtlasLayerCombo.h +++ b/src/GPUFontAtlasLayerCombo.h @@ -105,7 +105,7 @@ class GPUFontAtlasLayerCombo : public AtlasLayerCombo { // because OpenGL still requires a non-zero VAO to be bound for the draw call. GLuint emptyVAO; - std::unique_ptr shaderCatalog; + std::shared_ptr shaderCatalog; //std::shared_ptr backgroundShader; std::shared_ptr fontShader;