remove unnecessary gpuTextureOffset
This commit is contained in:
parent
922566f597
commit
8a1497fb4f
4 changed files with 1 additions and 13 deletions
|
@ -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;
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
namespace ofxVariableLab {
|
||||
|
||||
struct GPUFontAtlasLayerComboSettings : public AtlasLayerComboSettings {
|
||||
int gpuTextureOffset = 0;
|
||||
};
|
||||
class GPUFontAtlasLayerCombo : public AtlasLayerCombo {
|
||||
struct Transform {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue