shuffle shaders

This commit is contained in:
jrkb 2023-05-29 10:10:48 +02:00
parent 610ce89bfa
commit f26de38913

View file

@ -9,7 +9,6 @@
#include "ofRectangle.h" #include "ofRectangle.h"
#include "ofUtils.h" #include "ofUtils.h"
#include "quaternion.hpp" #include "quaternion.hpp"
#include <GL/gl.h>
namespace ofxVariableLab { namespace ofxVariableLab {
@ -18,13 +17,18 @@ void GPUFontAtlasLayerCombo::setup(const ComboIdentifier & identifier,
this->identifier = identifier; this->identifier = identifier;
this->settings = static_cast <GPUFontAtlasLayerComboSettings &>(settings); this->settings = static_cast <GPUFontAtlasLayerComboSettings &>(settings);
#ifdef TARGET_EMSCRIPTEN #ifdef TARGET_EMSCRIPTEN
string shaderDir = "data/ofxGPUFont/shaders/DEBUG_ES3"; string shaderDir = "data/ofxGPUFont/shaders/ES3";
#else #else
string shaderDir = "data/ofxGPUFont/shaders/GL3"; string shaderDir = "data/ofxGPUFont/shaders/GL3";
#endif #endif
shaderCatalog = std::make_shared <ofxGPUFont::ShaderCatalog>(shaderDir); shaderCatalog = std::make_shared <ofxGPUFont::ShaderCatalog>(shaderDir);
//backgroundShader = shaderCatalog->get("background"); //backgroundShader = shaderCatalog->get("background");
fontShader = shaderCatalog->get("font");
if(this->settings.bufferTargetType == GL_TEXTURE_2D_ARRAY){
fontShader = shaderCatalog->get("font_ta");
}else if(this->settings.bufferTargetType == GL_UNIFORM_BUFFER){
fontShader = shaderCatalog->get("font_ub");
}
{ {
FT_Error error = FT_Init_FreeType(&library); FT_Error error = FT_Init_FreeType(&library);