Further directx cleaning.

This commit is contained in:
jmsgrogan 2023-01-05 12:06:17 +00:00
parent d99a36f24f
commit 7fcc8e43ae
23 changed files with 401 additions and 304 deletions

View file

@ -8,42 +8,41 @@
#include "OpenGlFontTexture.h"
#endif
#ifdef _WIN32
#include "DirectXPainter.h"
//#include "DirectXMeshPainter.h"
//#include "DirectXTextPainter.h"
//#include "DirectXShaderProgram.h"
#endif
#include "Grid.h"
#include "RasterPainter.h"
#include "DrawingContext.h"
std::unique_ptr<AbstractPainter> PainterFactory::Create(DrawingMode drawMode)
#ifdef _WIN32
#include "DirectXPainter.h"
#include "DirectXMesh.h"
#include "DirectXMeshPainter.h"
#include "DirectXTextPainter.h"
#endif
std::unique_ptr<AbstractPainter> PainterFactory::Create(DrawingContext* context, DrawingMode drawMode)
{
#ifdef _WIN32
if (drawMode == DrawingMode::GRAPH)
{
return std::make_unique<DirectXPainter>();
return std::make_unique<DirectXPainter>(context);
}
else
{
return std::make_unique<RasterPainter>();
return std::make_unique<RasterPainter>(context);
}
#else
#ifdef HAS_OPENGL
if (drawMode == DrawingMode::GRAPH)
{
return std::make_unique<OpenGlPainter>();
return std::make_unique<OpenGlPainter>(context);
}
else
{
return std::make_unique<RasterPainter>();
return std::make_unique<RasterPainter>(context);
}
#else
return std::make_unique<RasterPainter>();
return std::make_unique<RasterPainter>(context);
#endif
#endif
}