Selectable renderer implementation (#1247)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
mwilsnd
2023-06-26 15:49:48 -05:00
committed by Bart Louwers
parent fe165c8924
commit 1963697687
64 changed files with 1189 additions and 316 deletions

View File

@@ -44,8 +44,10 @@ public:
/// Returns a reference to the default surface that should be rendered on.
virtual Renderable& getDefaultRenderable() = 0;
#if MLN_DRAWABLE_RENDERER
/// One-time shader initialization
virtual void initShaders(gfx::ShaderRegistry&, const ProgramParameters&) = 0;
#endif
protected:
virtual std::unique_ptr<Context> createContext() = 0;

View File

@@ -11,8 +11,6 @@ class Size;
namespace gfx {
constexpr int32_t MaxActiveTextureUnits = 8;
class Context;
class UploadPass;
class TextureResource;

View File

@@ -22,8 +22,10 @@ public:
/// Called prior to rendering to update the internally assumed OpenGL state.
virtual void updateAssumedState() = 0;
#if MLN_DRAWABLE_RENDERER
/// One-time shader initialization
void initShaders(gfx::ShaderRegistry&, const ProgramParameters& programParameters) override;
#endif
protected:
std::unique_ptr<gfx::Context> createContext() override;

View File

@@ -1,6 +1,8 @@
#pragma once
#if MLN_DRAWABLE_RENDERER
#include <mbgl/gfx/drawable.hpp>
#endif
#include <memory>