LibGame  v0.4.0
The LG Game Engine - Copyright (C) 2024 ETMSoftware
lg_opengl_2d.h
1 /*
2  * LibGame - Copyright (C) Emmanuel Thomas-Maurin 2011-2024
3  * All rights reserved
4  */
5 
6 #ifndef LG_OPENGL_2D_H
7 #define LG_OPENGL_2D_H
8 
9 typedef struct {
10  LG_ShaderProg line_shader;
11  LG_VAO line_vao;
12  LG_VBO line_vbo;
13  int u_line_color;
14 
15  LG_ShaderProg rect_shader;
16  LG_VAO rect_vao;
17  LG_VBO rect_vbo;
18  int u_rect_color;
19 
20  LG_ShaderProg tex_shader;
21  LG_VAO tex_vao;
22  LG_VBO tex_vbo;
23  int u_tex;
25 
27 
28 void lg_free_renderer_2d();
29 
30 int lg_render_line_2d(int, int, int, int, LG_Color_u);
31 
33 
34 int lg_render_tex_2d(const LG_Texture *, const Rec2Di *, const Rec2Di *);
35 
36 #endif /* LG_OPENGL_2D_H */
LG_Renderer2D
Definition: lg_opengl_2d.h:9
LG_ShaderProg
Definition: lg_shader_progs.h:11
lg_free_renderer_2d
void lg_free_renderer_2d()
Definition: lg_opengl_2d.c:57
LG_VAO
Definition: lg_vbo.h:52
lg_render_tex_2d
int lg_render_tex_2d(const LG_Texture *tex, const Rec2Di *src, const Rec2Di *dest)
Definition: lg_opengl_2d.c:370
LG_Color_u
Definition: lg_vertex.h:91
LG_Texture
Definition: lg_textures.h:42
LG_VBO
Definition: lg_vbo.h:16
lg_render_rect_2d
int lg_render_rect_2d(Rec2Di r, LG_Color_u color)
Definition: lg_opengl_2d.c:230
lg_render_line_2d
int lg_render_line_2d(int x1, int y1, int x2, int y2, LG_Color_u color)
Definition: lg_opengl_2d.c:125
lg_init_renderer_2d
int lg_init_renderer_2d()
Definition: lg_opengl_2d.c:35
Rec2Di
Definition: lg_gr_func.h:47