summaryrefslogtreecommitdiff
path: root/include/mbgl/renderer
diff options
context:
space:
mode:
authorLauren Budorick <lauren@mapbox.com>2014-08-06 17:40:48 -0700
committerLauren Budorick <lauren@mapbox.com>2014-08-11 12:13:22 -0700
commit560cc112e1e281ae57743fbabfa629203b09ffb1 (patch)
tree49fa057f3085f0707958299c3347dd19443e1711 /include/mbgl/renderer
parent9e1156d660cfe220db25c4f21de2aec2ed175487 (diff)
downloadqtlocation-mapboxgl-560cc112e1e281ae57743fbabfa629203b09ffb1.tar.gz
rm rasterize_properties, should be close to working...doesn't work
Diffstat (limited to 'include/mbgl/renderer')
-rw-r--r--include/mbgl/renderer/bucket.hpp2
-rw-r--r--include/mbgl/renderer/painter.hpp13
-rw-r--r--include/mbgl/renderer/prerendered_texture.hpp7
-rw-r--r--include/mbgl/renderer/raster_bucket.hpp11
4 files changed, 18 insertions, 15 deletions
diff --git a/include/mbgl/renderer/bucket.hpp b/include/mbgl/renderer/bucket.hpp
index 18f58ee464..a8bd437bb6 100644
--- a/include/mbgl/renderer/bucket.hpp
+++ b/include/mbgl/renderer/bucket.hpp
@@ -5,7 +5,6 @@
#include <memory>
#include <mbgl/map/tile.hpp>
#include <mbgl/util/noncopyable.hpp>
-#include <mbgl/renderer/prerendered_texture.hpp>
namespace mbgl {
@@ -18,7 +17,6 @@ public:
virtual bool hasData() const = 0;
virtual ~Bucket() {}
- std::unique_ptr<PrerenderedTexture> prerendered;
};
}
diff --git a/include/mbgl/renderer/painter.hpp b/include/mbgl/renderer/painter.hpp
index 82b71b6cb0..fa981c3c25 100644
--- a/include/mbgl/renderer/painter.hpp
+++ b/include/mbgl/renderer/painter.hpp
@@ -40,7 +40,8 @@ class FillBucket;
class LineBucket;
class SymbolBucket;
class RasterBucket;
-
+class PrerenderedTexture;
+
struct FillProperties;
struct CompositeProperties;
@@ -84,15 +85,13 @@ public:
void renderLine(LineBucket& bucket, std::shared_ptr<StyleLayer> layer_desc, const Tile::ID& id);
void renderSymbol(SymbolBucket& bucket, std::shared_ptr<StyleLayer> layer_desc, const Tile::ID& id);
void renderRaster(RasterBucket& bucket, std::shared_ptr<StyleLayer> layer_desc, const Tile::ID& id);
- void renderRaster(GLuint texture, const RasterizeProperties &properties); // do I want to save that?
- void preparePrerender(PrerenderedTexture &texture);
- void finishPrerender(PrerenderedTexture &texture);
+ void preparePrerender(RasterBucket &bucket);
+ void finishPrerender(RasterBucket &bucket);
- template <typename Properties>
- void renderPrerenderedTexture(PrerenderedTexture &texture, const Properties &properties);
+ void renderPrerenderedTexture(RasterBucket &bucket);
- void createPrerendered(RasterBucket& bucket, std::shared_ptr<StyleLayer> layer_desc, const Tile::ID& id, const RasterizeProperties& properties);
+ void createPrerendered(RasterBucket& bucket, std::shared_ptr<StyleLayer> layer_desc, const Tile::ID& id);
void resize();
diff --git a/include/mbgl/renderer/prerendered_texture.hpp b/include/mbgl/renderer/prerendered_texture.hpp
index 310375b5ea..4a5b736d4f 100644
--- a/include/mbgl/renderer/prerendered_texture.hpp
+++ b/include/mbgl/renderer/prerendered_texture.hpp
@@ -3,16 +3,15 @@
#include <mbgl/util/noncopyable.hpp>
#include <mbgl/platform/gl.hpp>
-#include <mbgl/style/rasterize_properties.hpp>
-//#include <mbgl/renderer/raster_bucket.hpp>
namespace mbgl {
+class StyleBucketRaster;
class Painter;
class PrerenderedTexture : private util::noncopyable {
public:
- PrerenderedTexture(const RasterBucket &properties);
+ PrerenderedTexture(const StyleBucketRaster &properties);
~PrerenderedTexture();
void bindTexture();
@@ -24,7 +23,7 @@ public:
void blur(Painter& painter, uint16_t passes);
public:
- const RasterBucket properties;
+ const StyleBucketRaster &properties;
private:
GLint previous_fbo = 0;
diff --git a/include/mbgl/renderer/raster_bucket.hpp b/include/mbgl/renderer/raster_bucket.hpp
index c111193126..631fb3471b 100644
--- a/include/mbgl/renderer/raster_bucket.hpp
+++ b/include/mbgl/renderer/raster_bucket.hpp
@@ -3,6 +3,10 @@
#include <mbgl/renderer/bucket.hpp>
#include <mbgl/util/raster.hpp>
+#include <mbgl/renderer/prerendered_texture.hpp>
+#include <mbgl/style/style_bucket.hpp>
+
+
namespace mbgl {
@@ -12,12 +16,15 @@ class VertexArrayObject;
class RasterBucket : public Bucket {
public:
- RasterBucket(const std::shared_ptr<Texturepool> &texturepool);
-
+ RasterBucket(const std::shared_ptr<Texturepool> &texturepool, const StyleBucketRaster& properties);
+
virtual void render(Painter& painter, std::shared_ptr<StyleLayer> layer_desc, const Tile::ID& id);
virtual bool hasData() const;
bool setImage(const std::string &data);
+
+ const StyleBucketRaster &properties;
+ PrerenderedTexture texture;
void drawRaster(RasterShader& shader, VertexBuffer &vertices, VertexArrayObject &array);