#pragma once

#include "basic.h"
#include <glad/glad.h>
#include <GLFW/glfw3.h>

struct Frame_Buffer {
  u32 width = 640;
  u32 height = 480;
  u32 buffer = 0;
  u32 color_tex = 0;
  u32 depth_buffer = 0;
};

bool init_frame_buffer(Frame_Buffer *frame_buffer, u32 width, u32 height);
bool resize_frame_buffer(Frame_Buffer *frame_buffer, u32 width, u32 height);
bool check_frame_buffer_complete(Frame_Buffer *frame_buffer);
void bind_frame_buffer(Frame_Buffer *frame_buffer);
void unbind_frame_buffer(Frame_Buffer *frame_buffer);
void draw_frame_buffer(Frame_Buffer *frame_buffer);
void cleanup_frame_buffer(Frame_Buffer *frame_buffer);
