Files
MapLibreParticleLab/src/mbgl/util/offscreen_texture.hpp
Vladimir Agafonkin 82de856c94 [core, ios, macos, android, node] Heatmap layer (#11046)
Co-Authored-By: Konstantin Käfer <mail@kkaefer.com>
Co-Authored-By: Anand Thakker <anandthakker@users.noreply.github.com>
Co-Authored-By: Minh Nguyễn <1ec5@users.noreply.github.com>
2018-02-15 17:38:23 +02:00

39 lines
868 B
C++

#pragma once
#include <mbgl/util/image.hpp>
namespace mbgl {
namespace gl {
class Context;
class Texture;
} // namespace gl
class OffscreenTexture {
public:
OffscreenTexture(gl::Context&,
Size size = { 256, 256 },
gl::TextureType type = gl::TextureType::UnsignedByte);
OffscreenTexture(gl::Context&,
Size size,
gl::Renderbuffer<gl::RenderbufferType::DepthComponent>&,
gl::TextureType type = gl::TextureType::UnsignedByte);
~OffscreenTexture();
OffscreenTexture(OffscreenTexture&&);
OffscreenTexture& operator=(OffscreenTexture&&);
void bind();
PremultipliedImage readStillImage();
gl::Texture& getTexture();
const Size& getSize() const;
private:
class Impl;
std::unique_ptr<Impl> impl;
};
} // namespace mbgl