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 {