committed by
Bart Louwers
parent
7e7fa37fd0
commit
a42b559fbe
@@ -129,6 +129,10 @@ public:
|
||||
bool getIs3D() const { return is3D; }
|
||||
void setIs3D(bool value) { is3D = value; }
|
||||
|
||||
/// Is custom
|
||||
bool getIsCustom() const { return isCustom; }
|
||||
void setIsCustom(bool value) { isCustom = value; }
|
||||
|
||||
/// The ID of the tile that this drawable represents, if any
|
||||
const std::optional<OverscaledTileID>& getTileID() const { return tileID; }
|
||||
void setTileID(const OverscaledTileID& value) { tileID = value; }
|
||||
@@ -175,6 +179,7 @@ protected:
|
||||
bool enableColor = true;
|
||||
bool enableStencil = false;
|
||||
bool is3D = false;
|
||||
bool isCustom = false;
|
||||
std::string name;
|
||||
util::SimpleIdentity uniqueID;
|
||||
gfx::ShaderProgramBasePtr shader;
|
||||
|
||||
@@ -32,7 +32,7 @@ public:
|
||||
virtual ~DrawableBuilder();
|
||||
|
||||
/// Get the drawable we're currently working on, if any
|
||||
const UniqueDrawable& getCurrentDrawable(bool createIfNone);
|
||||
UniqueDrawable& getCurrentDrawable(bool createIfNone);
|
||||
|
||||
/// Close the current drawable, using a new one for any further work
|
||||
void flush();
|
||||
|
||||
31
include/mbgl/gfx/drawable_custom_layer_host_tweaker.hpp
Normal file
31
include/mbgl/gfx/drawable_custom_layer_host_tweaker.hpp
Normal file
@@ -0,0 +1,31 @@
|
||||
#pragma once
|
||||
|
||||
#include <mbgl/gfx/drawable_tweaker.hpp>
|
||||
#include <mbgl/style/layers/custom_layer.hpp>
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
namespace mbgl {
|
||||
|
||||
namespace gfx {
|
||||
|
||||
class Drawable;
|
||||
|
||||
/**
|
||||
Tweaker that enables drawing a CustomLayer via their CustomLayerHost
|
||||
*/
|
||||
class DrawableCustomLayerHostTweaker : public gfx::DrawableTweaker {
|
||||
public:
|
||||
DrawableCustomLayerHostTweaker(std::shared_ptr<style::CustomLayerHost> host_)
|
||||
: host(host_) {}
|
||||
~DrawableCustomLayerHostTweaker() override = default;
|
||||
|
||||
void execute(Drawable&, const PaintParameters&) override;
|
||||
|
||||
protected:
|
||||
std::shared_ptr<style::CustomLayerHost> host;
|
||||
};
|
||||
|
||||
} // namespace gfx
|
||||
} // namespace mbgl
|
||||
@@ -16,6 +16,8 @@ public:
|
||||
virtual ~RenderableResource() = default;
|
||||
RenderableResource(const RenderableResource&) = delete;
|
||||
RenderableResource& operator=(const RenderableResource&) = delete;
|
||||
|
||||
virtual void bind() = 0;
|
||||
};
|
||||
|
||||
class Renderable {
|
||||
|
||||
Reference in New Issue
Block a user