Clean up fontsmanager
This commit is contained in:
parent
076e32b1d6
commit
64f0b3e77a
26 changed files with 111 additions and 89 deletions
|
@ -108,9 +108,19 @@ void DirectXMeshPainter::updateBuffers(DrawingContext* context)
|
|||
auto scene = context->getSurface()->getScene();
|
||||
for (const auto item : scene->getItems())
|
||||
{
|
||||
if (item->getType() == SceneItem::Type::MODEL && item->isVisible())
|
||||
if (!item->isVisible())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (item->getType() == SceneItem::Type::MODEL)
|
||||
{
|
||||
auto model = dynamic_cast<SceneModel*>(item);
|
||||
if (model->getGeometry())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
auto dx_mesh = std::make_unique<DirectXMesh>(model);
|
||||
dx_mesh->update(context, mDxInterface->getD3dDevice());
|
||||
mDxMeshes.push_back(std::move(dx_mesh));
|
||||
|
|
|
@ -84,14 +84,14 @@ void DirectXPainter::initializeDxInterface()
|
|||
|
||||
void DirectXPainter::resetPainters()
|
||||
{
|
||||
m2dPainter->setD2dInterface(mDxInterface->getD2dInterface());
|
||||
mTextPainter->setD2dInterface(mDxInterface->getD2dInterface());
|
||||
m2dPainter->setD2dInterface(getDxInterface()->getD2dInterface());
|
||||
mTextPainter->setD2dInterface(getDxInterface()->getD2dInterface());
|
||||
mMeshPainter->setDxInterface(getDxInterface());
|
||||
}
|
||||
|
||||
void DirectXPainter::paint()
|
||||
{
|
||||
if (!mDxInterface)
|
||||
if (!getDxInterface())
|
||||
{
|
||||
initializeDxInterface();
|
||||
}
|
||||
|
|
|
@ -6,8 +6,6 @@
|
|||
#include "FontsManager.h"
|
||||
#include "FontGlyph.h"
|
||||
|
||||
#include "DirectXShaderProgram.h"
|
||||
|
||||
#include "TextData.h"
|
||||
#include "SceneText.h"
|
||||
#include "DirectX2dInterface.h"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue