Fix up minimal dependency case and clang support.

This commit is contained in:
James Grogan 2022-11-30 15:28:15 +00:00
parent 925f0c3ccd
commit 1adc9272f8
17 changed files with 183 additions and 226 deletions

View file

@ -1,10 +1,12 @@
#include "PainterFactory.h"
#ifdef HAS_OPENGL
#include "OpenGlPainter.h"
#include "OpenGlMeshPainter.h"
#include "OpenGlTextPainter.h"
#include "OpenGlShaderProgram.h"
#include "OpenGlFontTexture.h"
#endif
#include "Grid.h"
@ -14,6 +16,7 @@
std::unique_ptr<AbstractPainter> PainterFactory::Create(DrawingMode drawMode)
{
#ifdef HAS_OPENGL
if (drawMode == DrawingMode::GRAPH)
{
return std::make_unique<OpenGlPainter>();
@ -22,6 +25,9 @@ std::unique_ptr<AbstractPainter> PainterFactory::Create(DrawingMode drawMode)
{
return std::make_unique<RasterPainter>();
}
#else
return std::make_unique<RasterPainter>();
#endif
}