1
0
Fork 0
2022-untitled-game/code/game/engine/render_mgr.h

61 lines
864 B
C

#pragma once
enum { MAX_TEXT_LENGTH = 128 };
typedef struct render_mgr {
struct {
GLuint shader;
GLuint u_proj, u_view, u_model;
GLuint u_texture;
GLuint u_light;
mat4 proj_mat;
} geo;
struct {
GLuint shader;
GLuint vao, vbo;
GLuint texture;
GLuint u_proj, u_model;
GLuint u_texture;
GLuint u_color;
mat4 proj_mat;
} text;
struct {
GLuint shader;
GLuint texture;
GLuint vao, vbo, fbo, rbo;
GLuint u_texture;
} screen;
camera_t* active_camera;
} render_mgr_t;
void
render_mgr_startup(void);
const char*
format_text(const char* format, ...);
void
render_geo_begin(void);
void
render_geo_end(void);
void
render_screen_begin(void);
void
render_screen_end(void);
void
render_text(const char* text, vec2 position, vec3 color, float size);
void
set_active_camera(camera_t* camera);
camera_t*
get_active_camera(void);