#pragma once #include "ofMain.h" #include "ofxMsdfgen.h" #include "Atlas.h" #include "Layer.h" namespace ofxVariableLab { class MsdfLayer : public Layer { public: void setup(const Settings & settings); void update() override; void draw(glm::vec3 position = glm::vec3(0, 0, 0)) const override; void drawCharacter(const char character, glm::vec3 position = glm::vec3(0, 0, 0), ofxMsdfgen::FontVariation fontVariation = ofxMsdfgen::FontVariation()) const override; void setProps(const Props & props) override; const Props & getProps() const override; void clearPropsBuffer() override; void setId(const string & id) override; const string & getId() override; void setShader(shared_ptr _shader) override; shared_ptr getShader() const override; const Type & getType() const override; void setAtlas(shared_ptr _atlas); shared_ptr getAtlas() const; shared_ptr atlas; Settings settings; std::deque propsBuffer; shared_ptr shader; /// \brief are props updated but not drawn yet bool isDirty = true; /// \brief hashed id string id; private: Layer::Type type = MSDFGEN; }; }