From 0b5f9bdebc1e5550621957e73c040c258ec6317b Mon Sep 17 00:00:00 2001 From: themancalledjakob Date: Fri, 29 Mar 2024 09:19:06 +0100 Subject: [PATCH] fix (partially) linux compilation --- src/GPUFontAtlasLayerCombo.cpp | 14 +++++++++++--- src/LayerComposition.cpp | 4 +++- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/src/GPUFontAtlasLayerCombo.cpp b/src/GPUFontAtlasLayerCombo.cpp index 5ae4959..7f4b14d 100644 --- a/src/GPUFontAtlasLayerCombo.cpp +++ b/src/GPUFontAtlasLayerCombo.cpp @@ -24,10 +24,18 @@ void GPUFontAtlasLayerCombo::setup(const ComboIdentifier & identifier, shaderCatalog = std::make_shared (shaderDir); if(this->settings.bufferTargetType == GL_TEXTURE_2D_ARRAY){ - fontShader = shaderCatalog->get("font_ta"); + #ifdef TARGET_EMSCRIPTEN + fontShader = shaderCatalog->get("font_ta"); + #else + fontShader = shaderCatalog->get("font"); + #endif }else if(this->settings.bufferTargetType == GL_UNIFORM_BUFFER){ - shaderCatalog->setReplacement("{{CURVES_BUFFER_SIZE}}", "2048"); - fontShader = shaderCatalog->get("font_ub"); + #ifdef TARGET_EMSCRIPTEN + shaderCatalog->setReplacement("{{CURVES_BUFFER_SIZE}}", "2048"); + fontShader = shaderCatalog->get("font_ub"); + #else + fontShader = shaderCatalog->get("font"); + #endif } fontShaderProgram = fontShader->program; diff --git a/src/LayerComposition.cpp b/src/LayerComposition.cpp index 45b8191..5b8cf6f 100644 --- a/src/LayerComposition.cpp +++ b/src/LayerComposition.cpp @@ -7,7 +7,9 @@ #include "MsdfLayer.h" #include "Utils.h" #include "ofUtils.h" -#include +#ifdef TARGET_EMSCRIPTEN + #include +#endif #include namespace ofxVariableLab {