Basic Font integration.
This commit is contained in:
parent
ce11c52ae5
commit
72123bc333
36 changed files with 325 additions and 198 deletions
|
@ -3,16 +3,19 @@
|
|||
#include "VisualLayer.h"
|
||||
#include "GeometryNode.h"
|
||||
#include "RectangleNode.h"
|
||||
#include "TextNode.h"
|
||||
|
||||
#include "MeshBuilder.h"
|
||||
#include "TriMesh.h"
|
||||
|
||||
#include "Image.h"
|
||||
|
||||
void Scene::syncLayers(const std::vector<VisualLayer*>& layers)
|
||||
{
|
||||
mLayers = layers;
|
||||
}
|
||||
|
||||
void Scene::update(Image<unsigned char>* image)
|
||||
void Scene::update(FontsManager* fontsManager, Image<unsigned char>* image)
|
||||
{
|
||||
if (image)
|
||||
{
|
||||
|
@ -28,11 +31,23 @@ void Scene::update(Image<unsigned char>* image)
|
|||
auto node = layer->getShapeNode();
|
||||
if (layer->getIsDirty())
|
||||
{
|
||||
node->updateMesh();
|
||||
node->update(fontsManager);
|
||||
layer->setIsDirty(false);
|
||||
}
|
||||
|
||||
mWorkingMeshs.push_back(dynamic_cast<TriMesh*>(node->getMesh()));
|
||||
mTextures.push_back(nullptr);
|
||||
}
|
||||
else
|
||||
{
|
||||
auto node = layer->getTextNode();
|
||||
if (layer->getIsDirty())
|
||||
{
|
||||
node->update(fontsManager);
|
||||
layer->setIsDirty(false);
|
||||
}
|
||||
mWorkingMeshs.push_back(dynamic_cast<TriMesh*>(node->getMesh()));
|
||||
mTextures.push_back(node->getTexture());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue