external ofNode to transform text

This commit is contained in:
jrkb 2023-04-17 17:16:00 +02:00
parent d78c341871
commit 74fed4e1f4

View file

@ -212,9 +212,12 @@ void GPUFontAtlasLayerCombo::draw(){
std::vector <int32_t> indices; std::vector <int32_t> indices;
for(const auto & layer : layers){ for(const auto & layer : layers){
font->collectVerticesAndIndices(glm::vec3(layer->getProps().x, ofNode node;
layer->getProps().y, node.rotateDeg(layer->getProps().rotation, glm::vec3(0, 0, 1));
0), node.move(glm::vec3(layer->getProps().x,
layer->getProps().y,
0));
font->collectVerticesAndIndices(node,
layer->getVariationText(), layer->getVariationText(),
vertices, indices, true, vertices, indices, true,
layer->getProps().fontSize_px); layer->getProps().fontSize_px);