Create shader programs through map context in order to cache programs through re-initialization

This commit is contained in:
Dan Paulat 2022-10-02 23:16:35 -05:00
parent 32e8ca72a0
commit a45e996872
10 changed files with 324 additions and 144 deletions

View file

@ -1,6 +1,6 @@
#pragma once
#include <scwx/qt/gl/shader_program.hpp>
#include <scwx/qt/map/map_context.hpp>
#include <scwx/qt/util/font.hpp>
#include <memory>
@ -24,13 +24,13 @@ enum class TextAlign
class TextShaderImpl;
class TextShader : public ShaderProgram
class TextShader
{
public:
explicit TextShader(OpenGLFunctions& gl);
explicit TextShader(std::shared_ptr<map::MapContext> context);
~TextShader();
TextShader(const TextShader&) = delete;
TextShader(const TextShader&) = delete;
TextShader& operator=(const TextShader&) = delete;
TextShader(TextShader&&) noexcept;