fix (partially) linux compilation

This commit is contained in:
themancalledjakob 2024-03-29 09:19:06 +01:00
parent 8df9884624
commit 0b5f9bdebc
2 changed files with 14 additions and 4 deletions

View file

@ -24,10 +24,18 @@ void GPUFontAtlasLayerCombo::setup(const ComboIdentifier & identifier,
shaderCatalog = std::make_shared <ofxGPUFont::ShaderCatalog>(shaderDir); shaderCatalog = std::make_shared <ofxGPUFont::ShaderCatalog>(shaderDir);
if(this->settings.bufferTargetType == GL_TEXTURE_2D_ARRAY){ if(this->settings.bufferTargetType == GL_TEXTURE_2D_ARRAY){
#ifdef TARGET_EMSCRIPTEN
fontShader = shaderCatalog->get("font_ta"); fontShader = shaderCatalog->get("font_ta");
#else
fontShader = shaderCatalog->get("font");
#endif
}else if(this->settings.bufferTargetType == GL_UNIFORM_BUFFER){ }else if(this->settings.bufferTargetType == GL_UNIFORM_BUFFER){
#ifdef TARGET_EMSCRIPTEN
shaderCatalog->setReplacement("{{CURVES_BUFFER_SIZE}}", "2048"); shaderCatalog->setReplacement("{{CURVES_BUFFER_SIZE}}", "2048");
fontShader = shaderCatalog->get("font_ub"); fontShader = shaderCatalog->get("font_ub");
#else
fontShader = shaderCatalog->get("font");
#endif
} }
fontShaderProgram = fontShader->program; fontShaderProgram = fontShader->program;

View file

@ -7,7 +7,9 @@
#include "MsdfLayer.h" #include "MsdfLayer.h"
#include "Utils.h" #include "Utils.h"
#include "ofUtils.h" #include "ofUtils.h"
#ifdef TARGET_EMSCRIPTEN
#include <GLES3/gl3.h> #include <GLES3/gl3.h>
#endif
#include <memory> #include <memory>
namespace ofxVariableLab { namespace ofxVariableLab {