From 8a1497fb4f3f329e1a876bc36f559fbd8c6326eb Mon Sep 17 00:00:00 2001 From: themancalledjakob Date: Mon, 29 May 2023 09:42:06 +0200 Subject: [PATCH] remove unnecessary gpuTextureOffset --- src/GPUFontAtlasLayerCombo.cpp | 3 +-- src/GPUFontAtlasLayerCombo.h | 1 - src/LayerComposition.cpp | 4 ---- src/LayerComposition.h | 6 ------ 4 files changed, 1 insertion(+), 13 deletions(-) diff --git a/src/GPUFontAtlasLayerCombo.cpp b/src/GPUFontAtlasLayerCombo.cpp index 5001e3f..604863b 100644 --- a/src/GPUFontAtlasLayerCombo.cpp +++ b/src/GPUFontAtlasLayerCombo.cpp @@ -35,8 +35,7 @@ void GPUFontAtlasLayerCombo::setup(const ComboIdentifier & identifier, } ofxGPUFont::initializeFont(library, this->identifier.fontPath, - font, - this->settings.gpuTextureOffset); + font); font->listFontVariationAxes(fontVariationAxesParameters, library); //cout << this->identifier.fontPath << " : fontVariationAxes :" << endl; diff --git a/src/GPUFontAtlasLayerCombo.h b/src/GPUFontAtlasLayerCombo.h index e4207f2..58b6c29 100644 --- a/src/GPUFontAtlasLayerCombo.h +++ b/src/GPUFontAtlasLayerCombo.h @@ -15,7 +15,6 @@ namespace ofxVariableLab { struct GPUFontAtlasLayerComboSettings : public AtlasLayerComboSettings { - int gpuTextureOffset = 0; }; class GPUFontAtlasLayerCombo : public AtlasLayerCombo { struct Transform { diff --git a/src/LayerComposition.cpp b/src/LayerComposition.cpp index 7e466df..2b02e34 100644 --- a/src/LayerComposition.cpp +++ b/src/LayerComposition.cpp @@ -44,9 +44,7 @@ void LayerComposition::findOrCreateNewMomForLayer(shared_ptr layer, case LayerType::GPUFONT: { auto combo = make_shared (); GPUFontAtlasLayerComboSettings settings; - settings.gpuTextureOffset = nextGpuTextureOffset; combo->setup(idealMom, settings); - nextGpuTextureOffset++; combo->careForChild(layer); atlasLayerCombos[idealMom] = std::move(combo); break; @@ -105,9 +103,7 @@ LayerID LayerComposition::addLayer(const ComboIdentifier & identifier, // so let's create it combo = make_shared (); GPUFontAtlasLayerComboSettings settings; - settings.gpuTextureOffset = nextGpuTextureOffset; combo->setup(identifier, settings); - nextGpuTextureOffset++; atlasLayerCombos[identifier] = combo; }else{ // use existing combo diff --git a/src/LayerComposition.h b/src/LayerComposition.h index 2b955ad..247745f 100644 --- a/src/LayerComposition.h +++ b/src/LayerComposition.h @@ -41,12 +41,6 @@ class LayerComposition { unordered_map > atlasLayerCombos; vector layerOrder; - /** - * @brief lastGpuTextureOffset GL_TEXTURE0 + offset - * we want to different textures for different fonts - * this value is incremented/decremented when adding/removing GPUFont layers - */ - int nextGpuTextureOffset = 0; //unordered_map > layers; };