summaryrefslogtreecommitdiff
path: root/src/mbgl/util/offscreen_texture.hpp
blob: cceb93817413697c78c0a860f1a3585338554703 (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/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