blob: b109e397c3a6e21ec4c7c6ab6db1a541a5aac3bf (
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
|
#ifndef LLMR_RENDERER_PRERENDERED_TEXTURE
#define LLMR_RENDERER_PRERENDERED_TEXTURE
#include <llmr/util/noncopyable.hpp>
#include <llmr/platform/gl.hpp>
#include <llmr/style/properties.hpp>
namespace llmr {
class Painter;
class PrerenderedTexture : private util::noncopyable {
public:
PrerenderedTexture(const PrerenderProperties &properties);
~PrerenderedTexture();
void bindTexture();
void bindFramebuffer();
void unbindFramebuffer();
inline GLuint getTexture() const { return texture; }
void blur(Painter& painter, uint16_t passes);
public:
const PrerenderProperties properties;
private:
GLint previous_fbo = 0;
GLuint fbo = 0;
GLuint texture = 0;
};
}
#endif
|