-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFBO.h
More file actions
58 lines (53 loc) · 1.13 KB
/
FBO.h
File metadata and controls
58 lines (53 loc) · 1.13 KB
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#ifndef FBO_HEADER
#define FBO_HEADER
#ifdef GL_API_GLAD_OPENGL_3
#include <glad/glad.h>
#endif
class FBO {
public:
#ifdef GL_API_GLAD_OPENGL_3
static const GLenum bufferType = GL_FRAMEBUFFER;
GLuint ID;
#endif
FBO();
~FBO();
void Init();
#ifdef GL_API_GLAD_OPENGL_3
static void Init(GLuint* ID);
#endif
void Bind();
#ifdef GL_API_GLAD_OPENGL_3
static void Bind(GLuint ID);
#endif
static void Unbind();
void BindRead();
#ifdef GL_API_GLAD_OPENGL_3
static void BindRead(GLuint ID);
#endif
static void UnbindRead();
void BindDraw();
#ifdef GL_API_GLAD_OPENGL_3
static void BindDraw(GLuint ID);
#endif
static void UnbindDraw();
#ifdef GL_API_GLAD_OPENGL_3
static void LinkTexture2D(GLuint texture, GLenum texType, GLenum attachment);
static void LinkRBO(GLuint RBO, GLenum attachment);
static void Blit(GLint srcBottomLeftX,
GLint srcBottomLeftY,
GLint srcTopRightX,
GLint srcTopRightY,
GLint dstBottomLeftX,
GLint dstBottomLeftY,
GLint dstTopRightX,
GLint dstTopRightY,
GLbitfield mask,
GLenum filter
);
#endif
void Delete();
#ifdef GL_API_GLAD_OPENGL_3
static void Delete(GLuint* ID);
#endif
};
#endif