remove unnecessary gpuTextureOffset

This commit is contained in:
jrkb 2023-05-29 09:42:06 +02:00
parent 922566f597
commit 8a1497fb4f
4 changed files with 1 additions and 13 deletions

View file

@ -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;

View file

@ -15,7 +15,6 @@
namespace ofxVariableLab {
struct GPUFontAtlasLayerComboSettings : public AtlasLayerComboSettings {
int gpuTextureOffset = 0;
};
class GPUFontAtlasLayerCombo : public AtlasLayerCombo {
struct Transform {

View file

@ -44,9 +44,7 @@ void LayerComposition::findOrCreateNewMomForLayer(shared_ptr <Layer> layer,
case LayerType::GPUFONT: {
auto combo = make_shared <GPUFontAtlasLayerCombo>();
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 <GPUFontAtlasLayerCombo>();
GPUFontAtlasLayerComboSettings settings;
settings.gpuTextureOffset = nextGpuTextureOffset;
combo->setup(identifier, settings);
nextGpuTextureOffset++;
atlasLayerCombos[identifier] = combo;
}else{
// use existing combo

View file

@ -41,12 +41,6 @@ class LayerComposition {
unordered_map <ComboIdentifier, shared_ptr <AtlasLayerCombo> > atlasLayerCombos;
vector <LayerID> 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 <LayerIdentifier, shared_ptr <ofxVariableLab::Layer> > layers;
};