From 7a39530cfeb32cb518ae80caf29e944d641641bc Mon Sep 17 00:00:00 2001 From: themancalledjakob Date: Sat, 22 Apr 2023 14:24:25 +0200 Subject: [PATCH] profile update funtion, add todo for fixing propsbuffer update when no props are sent --- src/GPUFontLayer.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/GPUFontLayer.cpp b/src/GPUFontLayer.cpp index 0b128ee..6a63b74 100644 --- a/src/GPUFontLayer.cpp +++ b/src/GPUFontLayer.cpp @@ -6,6 +6,7 @@ #include "fwd.hpp" #include "ofGraphics.h" #include "ofUtils.h" +#include "ofxProfiler.h" namespace ofxVariableLab { @@ -19,6 +20,19 @@ void GPUFontLayer::setup(const LayerSettings & settings){ } 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){