pass shader to font
This commit is contained in:
parent
f26de38913
commit
8f1e73eb6a
1 changed files with 5 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue