diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2016-08-22 15:54:40 +0200 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2016-09-27 10:42:10 +0200 |
commit | c88ce2d51e4aa61f1e6b3939ada474a0572c7ce0 (patch) | |
tree | 82ec0eea510b7db5cdcec890a8fc65d7e32ad033 /src/mbgl/util/offscreen_texture.hpp | |
parent | 68ec9d3fd5725aa9bf0d2debf5f72551e8f4aef2 (diff) | |
download | qtlocation-mapboxgl-c88ce2d51e4aa61f1e6b3939ada474a0572c7ce0.tar.gz |
[core] add ability to render to offscreen textures
Diffstat (limited to 'src/mbgl/util/offscreen_texture.hpp')
-rw-r--r-- | src/mbgl/util/offscreen_texture.hpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/mbgl/util/offscreen_texture.hpp b/src/mbgl/util/offscreen_texture.hpp new file mode 100644 index 0000000000..cceb938174 --- /dev/null +++ b/src/mbgl/util/offscreen_texture.hpp @@ -0,0 +1,23 @@ +#pragma once + +#include <mbgl/util/raster.hpp> + +namespace mbgl { + +namespace gl { +class Config; +} // namespace gl + +class OffscreenTexture { +public: + void bind(gl::ObjectStore&, gl::Config&, std::array<uint16_t, 2> size); + + Raster& getTexture(); + std::array<uint16_t, 2> getSize() const; + +private: + mbgl::optional<gl::UniqueFBO> fbo; + Raster raster; +}; + +} // namespace mbgl |