blob: db8cfac55966f9fae6c0001d1e1690b57cfee8ad (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
#pragma once
#include <mbgl/gfx/renderbuffer.hpp>
#include <mbgl/util/image.hpp>
namespace mbgl {
namespace gfx {
class Context;
class Texture;
} // namespace gfx
class OffscreenTexture {
public:
OffscreenTexture(gfx::Context&,
Size size = { 256, 256 },
gfx::TextureChannelDataType type = gfx::TextureChannelDataType::UnsignedByte);
OffscreenTexture(gfx::Context&,
Size size,
gfx::Renderbuffer<gfx::RenderbufferPixelType::Depth>&,
gfx::TextureChannelDataType type = gfx::TextureChannelDataType::UnsignedByte);
~OffscreenTexture();
OffscreenTexture(OffscreenTexture&&);
OffscreenTexture& operator=(OffscreenTexture&&);
void bind();
PremultipliedImage readStillImage();
gfx::Texture& getTexture();
const Size& getSize() const;
private:
class Impl;
std::unique_ptr<Impl> impl;
};
} // namespace mbgl
|