profile update funtion, add todo for fixing propsbuffer update when no props are sent

This commit is contained in:
jrkb 2023-04-22 14:24:25 +02:00
parent cfe9d56e65
commit 7a39530cfe

View file

@ -6,6 +6,7 @@
#include "fwd.hpp" #include "fwd.hpp"
#include "ofGraphics.h" #include "ofGraphics.h"
#include "ofUtils.h" #include "ofUtils.h"
#include "ofxProfiler.h"
namespace ofxVariableLab { namespace ofxVariableLab {
@ -19,6 +20,19 @@ void GPUFontLayer::setup(const LayerSettings & settings){
} }
void GPUFontLayer::update(){ void GPUFontLayer::update(){
OFX_PROFILER_FUNCTION();
// TODO: figure out why this makes it slow
//if(propsBuffer.size() > 0){
//propsBuffer.push_front(lastProps);
//propsBuffer.pop_back();
//const Props & props = lastProps;
//for(int i = 0; i < props.text.size(); i++){
//const Props & vProps = getProps(i * props.letterDelay);
//ofxGPUFont::GlyphAppearance & glyphAppearance = variationTextAppearance[i];
//glyphAppearance.fontSize_px = vProps.fontSize_px;
//variationTextAppearance[i].color = vProps.color;
//}
//}
} }
void GPUFontLayer::draw(glm::vec3 position){ void GPUFontLayer::draw(glm::vec3 position){