Further directx cleaning.
This commit is contained in:
parent
d99a36f24f
commit
7fcc8e43ae
23 changed files with 401 additions and 304 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue