30 lines
606 B
C
30 lines
606 B
C
|
#pragma once
|
||
|
|
||
|
#include "ofMain.h"
|
||
|
#include "ofxMsdfgen.h"
|
||
|
#include "Layer.h"
|
||
|
#include <unordered_map>
|
||
|
|
||
|
namespace ofxVariableLab {
|
||
|
|
||
|
class LayerComposition {
|
||
|
public:
|
||
|
void setup();
|
||
|
void update();
|
||
|
void draw() const;
|
||
|
shared_ptr <ofImage> getAtlasImage();
|
||
|
#ifdef TARGET_EMSCRIPTEN
|
||
|
#else
|
||
|
#endif
|
||
|
|
||
|
private:
|
||
|
ofxMsdfgen::Atlas atlas;
|
||
|
shared_ptr <ofImage> atlasImage;
|
||
|
vector <ofxMsdfgen::GlyphGeometry> glyphGeometries;
|
||
|
shared_ptr <ofShader> msdfShader;
|
||
|
|
||
|
vector <unique_ptr <ofxVariableLab::Layer> > layers;
|
||
|
};
|
||
|
|
||
|
}
|