skunkworks-c/include/framebuffer.h

27 lines
726 B
C
Raw Permalink Normal View History

#ifndef GUARD_4770FE04EA612B028DF68960A453BD0B
#define GUARD_4770FE04EA612B028DF68960A453BD0B
#include "types.h"
#include "vec2i.h"
struct sw_framebuffer {
struct sw_vec2i size;
u32 _fb, _fbtex, _fbdepth;
};
2023-01-14 05:48:58 +01:00
extern u32 sw_screen_vao;
struct sw_framebuffer *sw_framebuffer_create(struct sw_vec2i size);
void sw_framebuffer_destroy(struct sw_framebuffer *fb);
void sw_framebuffer_static_init();
2023-01-14 05:48:58 +01:00
/* pass 0 to use currently bound */
void sw_framebuffer_copy_to_screen(struct sw_framebuffer *fb);
2023-01-14 05:48:58 +01:00
/* pass 0 to use currently bound */
void sw_framebuffer_render(struct sw_framebuffer *fb);
void sw_framebuffer_resize(struct sw_framebuffer *fb, struct sw_vec2i new_size);
#endif /* GUARD_4770FE04EA612B028DF68960A453BD0B */