take 2, still not working
This commit is contained in:
@@ -22,6 +22,7 @@ class Sprite;
|
||||
class Style;
|
||||
class StyleBucket;
|
||||
class StyleBucketFill;
|
||||
class StyleBucketRaster;
|
||||
class StyleBucketLine;
|
||||
class StyleBucketSymbol;
|
||||
class StyleLayerGroup;
|
||||
@@ -45,6 +46,7 @@ private:
|
||||
std::unique_ptr<Bucket> createBucket(std::shared_ptr<StyleBucket> bucket_desc);
|
||||
|
||||
std::unique_ptr<Bucket> createFillBucket(const VectorTileLayer& layer, const FilterExpression &filter, const StyleBucketFill &fill);
|
||||
std::unique_ptr<Bucket> createRasterBucket(const VectorTileLayer& layer, const FilterExpression &filter, const StyleBucketRaster &raster);
|
||||
std::unique_ptr<Bucket> createLineBucket(const VectorTileLayer& layer, const FilterExpression &filter, const StyleBucketLine &line);
|
||||
std::unique_ptr<Bucket> createSymbolBucket(const VectorTileLayer& layer, const FilterExpression &filter, const StyleBucketSymbol &symbol);
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include <mbgl/util/noncopyable.hpp>
|
||||
#include <mbgl/platform/gl.hpp>
|
||||
#include <mbgl/style/rasterize_properties.hpp>
|
||||
//#include <mbgl/renderer/raster_bucket.hpp>
|
||||
|
||||
namespace mbgl {
|
||||
|
||||
@@ -11,7 +12,7 @@ class Painter;
|
||||
|
||||
class PrerenderedTexture : private util::noncopyable {
|
||||
public:
|
||||
PrerenderedTexture(const RasterizedProperties &properties);
|
||||
PrerenderedTexture(const RasterBucket &properties);
|
||||
~PrerenderedTexture();
|
||||
|
||||
void bindTexture();
|
||||
@@ -23,7 +24,7 @@ public:
|
||||
void blur(Painter& painter, uint16_t passes);
|
||||
|
||||
public:
|
||||
const RasterizedProperties properties;
|
||||
const RasterBucket properties;
|
||||
|
||||
private:
|
||||
GLint previous_fbo = 0;
|
||||
|
||||
@@ -15,7 +15,7 @@ public:
|
||||
|
||||
class RasterizeProperties {
|
||||
public:
|
||||
// Function<bool> enabled = ConstantFunction<bool>(false); // going to need to delete this? or keep ?
|
||||
Function<bool> enabled = ConstantFunction<bool>(false); // maybe delete?
|
||||
Function<float> buffer = ConstantFunction<float>(1.0f / 32.0f);
|
||||
Function<float> size = ConstantFunction<float>(256);
|
||||
Function<float> blur = ConstantFunction<float>(0);
|
||||
|
||||
@@ -82,6 +82,7 @@ public:
|
||||
|
||||
class StyleBucketRaster {
|
||||
public:
|
||||
bool prerendered = false;
|
||||
uint16_t raster_size = 256;
|
||||
float blur = 0.0f;
|
||||
float buffer = 0.03125f;
|
||||
|
||||
@@ -20,8 +20,7 @@ class StyleLayerGroup;
|
||||
|
||||
class StyleLayer {
|
||||
public:
|
||||
StyleLayer(const std::string &id, std::map<ClassID, ClassProperties> &&styles,
|
||||
std::unique_ptr<const RasterizeProperties> &&rasterize);
|
||||
StyleLayer(const std::string &id, std::map<ClassID, ClassProperties> &&styles);
|
||||
|
||||
template <typename T> const T &getProperties() {
|
||||
if (properties.is<T>()) {
|
||||
@@ -83,7 +82,7 @@ public:
|
||||
// Rasterization properties are used for prerendering the tile to a bitmap,
|
||||
// which is then used as a raster image instead of rendering this layer
|
||||
// directly in every frame.
|
||||
const std::unique_ptr<const RasterizeProperties> rasterize;
|
||||
// const std::unique_ptr<const RasterizeProperties> rasterize;
|
||||
|
||||
// Child layer array (if this layer has child layers).
|
||||
std::shared_ptr<StyleLayerGroup> layers;
|
||||
|
||||
Reference in New Issue
Block a user