receive vector of colors
This commit is contained in:
parent
106db1462c
commit
6946f49b34
2 changed files with 3 additions and 2 deletions
|
@ -316,7 +316,7 @@ void MsdfLayer::setBoundingBox(const Layer::BoundingBox & boundingBox){
|
|||
bool MsdfLayer::collectCharacter(const char character,
|
||||
vector <ofNode> & nodes,
|
||||
const ofCamera & camera,
|
||||
glm::vec4 color,
|
||||
const vector <glm::vec4> & colors,
|
||||
ofxVariableLab::FontVariation fontVariation){
|
||||
|
||||
OFX_PROFILER_FUNCTION()
|
||||
|
@ -372,6 +372,7 @@ bool MsdfLayer::collectCharacter(const char character,
|
|||
glm::vec2 uv3_b = glm::vec2(scale_b.x, 0) + translation_b;
|
||||
|
||||
for(int i = 0; i < nodes.size(); i++){
|
||||
const glm::vec4 & color = colors[i];
|
||||
ofNode & node = nodes[i];
|
||||
glm::vec4 p0 = node.getGlobalTransformMatrix() * glm::vec4(0, 0, 0, 1);
|
||||
glm::vec4 p1 = node.getGlobalTransformMatrix() * glm::vec4(0, h, 0, 1);
|
||||
|
|
|
@ -59,7 +59,7 @@ class MsdfLayer : public Layer {
|
|||
bool collectCharacter(const char character,
|
||||
vector <ofNode> & nodes,
|
||||
const ofCamera & camera,
|
||||
glm::vec4 color = glm::vec4(1, 1, 1, 1),
|
||||
const vector <glm::vec4> & colors,
|
||||
ofxVariableLab::FontVariation fontVariation = ofxVariableLab::FontVariation());
|
||||
|
||||
void setAtlas(shared_ptr <ofxMsdfgen::Atlas> _atlas);
|
||||
|
|
Loading…
Reference in a new issue