1 #pragma once 2 3 #include "system-gl.h" 4 #include <stddef.h> // size_t 5 6 struct fbo_t 7 { 8 GLuint fbo_id; 9 GLuint old_fbo_id; 10 11 GLuint renderbuf_id; 12 GLuint depthbuf_id; 13 }; 14 15 fbo_t *fbo_new(); 16 bool fbo_init(fbo_t *fbo, size_t width, size_t height); 17 bool fbo_resize(fbo_t *fbo, size_t width, size_t height); 18 void fbo_delete(fbo_t *fbo); 19 GLuint fbo_bind(fbo_t *fbo); 20 void fbo_unbind(fbo_t *fbo); 21 22 bool REPORTGLERROR(const char * task); 23