summaryrefslogtreecommitdiff
path: root/src/mbgl/util/offscreen_texture.hpp
blob: c71c0e51d90069dd0ea9916245e584195b72d799 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#pragma once

#include <mbgl/gl/texture.hpp>

namespace mbgl {

namespace gl {
class Context;
} // namespace gl

class OffscreenTexture {
public:
    void bind(gl::Context&, std::array<uint16_t, 2> size);

    gl::Texture& getTexture();
    std::array<uint16_t, 2> getSize() const;

private:
    optional<gl::UniqueFramebuffer> framebuffer;
    optional<gl::Texture> texture;
};

} // namespace mbgl