aboutsummaryrefslogtreecommitdiff
path: root/09-september/tomcat/not_in_use/fbo.h
diff options
context:
space:
mode:
Diffstat (limited to '09-september/tomcat/not_in_use/fbo.h')
-rw-r--r--09-september/tomcat/not_in_use/fbo.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/09-september/tomcat/not_in_use/fbo.h b/09-september/tomcat/not_in_use/fbo.h
new file mode 100644
index 0000000..244cb7f
--- /dev/null
+++ b/09-september/tomcat/not_in_use/fbo.h
@@ -0,0 +1,35 @@
+#ifndef FBO_H
+#define FBO_H
+
+#include "../shared.h"
+
+struct _Texture;
+
+typedef struct _Fbo
+{
+ char _name[MAX_PATH_LENGTH];
+
+ GLuint frame_buffer; /** Actual fbo object**/
+
+ /** color_texture when you want to render to a
+ texture and color_buffer when you want to render
+ to a RenderBuffer **/
+ struct _Texture *color_textures[8];
+ GLuint color_buffer[8];
+ GLenum color_format;
+
+ struct _Texture *depth_texture;
+ GLuint depth_buffer;
+ GLenum depth_format;
+
+ GLint width;
+ GLint height;
+} Fbo;
+
+extern Fbo *fbo_new(const char *name, GLint width, GLint height);
+extern void fbo_attach_buffer(Fbo *fbo, GLenum format, int index);
+extern void fbo_attach_texture(Fbo *fbo, struct _Texture *t, GLenum attachment);
+extern void fbo_bind(Fbo *fbo);
+extern void fbo_purge(Fbo *fbo);
+
+#endif // FBO_H