From 6b8af9cf83851c075c6c9514b1deaa931c2b19a4 Mon Sep 17 00:00:00 2001 From: Thomas Guillermo Albers Raviola Date: Fri, 16 Jan 2026 23:02:32 +0100 Subject: Initial commit --- 09-september/tomcat/not_in_use/fbo.h | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 09-september/tomcat/not_in_use/fbo.h (limited to '09-september/tomcat/not_in_use/fbo.h') 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 -- cgit v1.2.3