summaryrefslogtreecommitdiff
path: root/src/mbgl/gl/offscreen_texture.hpp
blob: 07da4f57e26283b5abcb8c76fc336880523355b4 (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
#pragma once

#include <mbgl/gfx/offscreen_texture.hpp>
#include <mbgl/gfx/renderbuffer.hpp>

namespace mbgl {
namespace gl {

class Context;

class OffscreenTexture final : public gfx::OffscreenTexture {
public:
    OffscreenTexture(gl::Context&,
                     Size size,
                     gfx::TextureChannelDataType type = gfx::TextureChannelDataType::UnsignedByte);
    OffscreenTexture(gl::Context&,
                     Size size,
                     gfx::Renderbuffer<gfx::RenderbufferPixelType::Depth>&,
                     gfx::TextureChannelDataType type = gfx::TextureChannelDataType::UnsignedByte);

    bool isRenderable() override;

    PremultipliedImage readStillImage() override;
    gfx::Texture& getTexture() override;
};

} // namespace gl
} // namespace mbgl