diff --git a/src/GPUFontAtlasLayerCombo.cpp b/src/GPUFontAtlasLayerCombo.cpp index de91a0c..b31fb8f 100644 --- a/src/GPUFontAtlasLayerCombo.cpp +++ b/src/GPUFontAtlasLayerCombo.cpp @@ -27,8 +27,10 @@ void GPUFontAtlasLayerCombo::setup(const ComboIdentifier & identifier, if(this->settings.bufferTargetType == GL_TEXTURE_2D_ARRAY){ fontShader = shaderCatalog->get("font_ta"); }else if(this->settings.bufferTargetType == GL_UNIFORM_BUFFER){ + shaderCatalog->setReplacement("{{CURVES_BUFFER_SIZE}}", "2048"); fontShader = shaderCatalog->get("font_ub"); } + fontShaderProgram = fontShader->program; { FT_Error error = FT_Init_FreeType(&library); @@ -40,6 +42,7 @@ void GPUFontAtlasLayerCombo::setup(const ComboIdentifier & identifier, ofxGPUFont::initializeFont(library, this->identifier.fontPath, font, + fontShaderProgram, this->settings.bufferTargetType); font->listFontVariationAxes(fontVariationAxesParameters, library); @@ -97,6 +100,8 @@ void GPUFontAtlasLayerCombo::update(){ variationText = std::move(_variationText); font->prepareGlyphsForText(variationText, library, + shaderCatalog, + fontShader, true); isDirty = false; }