#ifndef GUARD_4770FE04EA612B028DF68960A453BD0B
#define GUARD_4770FE04EA612B028DF68960A453BD0B

#include "types.h"
#include "vec2i.h"

struct sw_framebuffer {
	struct sw_vec2i size;
	u32 _fb, _fbtex, _fbdepth;
};

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();

/* pass 0 to use currently bound */
void sw_framebuffer_copy_to_screen(struct sw_framebuffer *fb);
/* 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 */
