Clean opengl rendering.

This commit is contained in:
James Grogan 2022-11-16 09:39:05 +00:00
parent 4849d83fcf
commit 798cb365d7
19 changed files with 483 additions and 274 deletions

View file

@ -1,10 +1,8 @@
#include "DrawingContext.h"
#include "AbstractPainter.h"
#include "OpenGlPainter.h"
#include "OpenGlShaderProgram.h"
#include "OpenGlFontTexture.h"
#include "RasterPainter.h"
#include "PainterFactory.h"
#include "Grid.h"
#include "TriMesh.h"
@ -17,14 +15,7 @@ DrawingContext::DrawingContext(DrawingSurface* surface, FontsManager* fontsManag
mScene(std::make_unique<Scene>()),
mFontsManager(fontsManager)
{
if (mDrawingMode == DrawingMode::GRAPH)
{
mPainter = std::make_unique<OpenGlPainter>();
}
else
{
mPainter = std::make_unique<RasterPainter>();
}
mPainter = PainterFactory::Create(mDrawingMode);
}
std::unique_ptr<DrawingContext> DrawingContext::Create(DrawingSurface* surface, FontsManager* fontsManager, DrawingMode requestedDrawingMode)