summaryrefslogtreecommitdiff
path: root/src/mbgl/util/offscreen_texture.hpp
diff options
context:
space:
mode:
authorLauren Budorick <lauren@mapbox.com>2017-05-08 09:06:07 -0700
committerGitHub <noreply@github.com>2017-05-08 09:06:07 -0700
commit1c9af3226f0ad306cf2ec8be9ff1558938f69736 (patch)
tree407389df9fd8c9c807fcab09d4ba99482829dc6f /src/mbgl/util/offscreen_texture.hpp
parentb622aed3490d623a31ec576aefe9696f221ead76 (diff)
downloadqtlocation-mapboxgl-1c9af3226f0ad306cf2ec8be9ff1558938f69736.tar.gz
[core] Reuse fill-extrusion textures between frames (#8896)
Diffstat (limited to 'src/mbgl/util/offscreen_texture.hpp')
-rw-r--r--src/mbgl/util/offscreen_texture.hpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/mbgl/util/offscreen_texture.hpp b/src/mbgl/util/offscreen_texture.hpp
index 4e9e936114..ae96286340 100644
--- a/src/mbgl/util/offscreen_texture.hpp
+++ b/src/mbgl/util/offscreen_texture.hpp
@@ -10,13 +10,21 @@ class Context;
class Texture;
} // namespace gl
+enum class OffscreenTextureAttachment {
+ None,
+ Depth,
+};
+
class OffscreenTexture : public View {
public:
- OffscreenTexture(gl::Context&, Size size = { 256, 256 });
+ OffscreenTexture(gl::Context&,
+ Size size = { 256, 256 },
+ OffscreenTextureAttachment type = OffscreenTextureAttachment::None);
~OffscreenTexture();
+ OffscreenTexture(OffscreenTexture&&);
+ OffscreenTexture& operator=(OffscreenTexture&&);
void bind() override;
- void bindRenderbuffers(gl::TextureUnit unit = 0);
PremultipliedImage readStillImage();
@@ -26,7 +34,7 @@ public:
private:
class Impl;
- const std::unique_ptr<Impl> impl;
+ std::unique_ptr<Impl> impl;
};
} // namespace mbgl