Start aligning Dx and OpenGl approaches.
This commit is contained in:
parent
d1ec8b4f68
commit
d99a36f24f
22 changed files with 899 additions and 366 deletions
|
@ -8,6 +8,13 @@
|
|||
#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"
|
||||
|
@ -16,17 +23,28 @@
|
|||
|
||||
std::unique_ptr<AbstractPainter> PainterFactory::Create(DrawingMode drawMode)
|
||||
{
|
||||
#ifdef HAS_OPENGL
|
||||
#ifdef _WIN32
|
||||
if (drawMode == DrawingMode::GRAPH)
|
||||
{
|
||||
return std::make_unique<OpenGlPainter>();
|
||||
return std::make_unique<DirectXPainter>();
|
||||
}
|
||||
else
|
||||
{
|
||||
return std::make_unique<RasterPainter>();
|
||||
}
|
||||
#else
|
||||
return std::make_unique<RasterPainter>();
|
||||
#ifdef HAS_OPENGL
|
||||
if (drawMode == DrawingMode::GRAPH)
|
||||
{
|
||||
return std::make_unique<OpenGlPainter>();
|
||||
}
|
||||
else
|
||||
{
|
||||
return std::make_unique<RasterPainter>();
|
||||
}
|
||||
#else
|
||||
return std::make_unique<RasterPainter>();
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue