LibGame v0.4.0
The LG Game Engine - Copyright (C) 2024-2026 ETMSoftware
Loading...
Searching...
No Matches
lg_mesh_lines.h
1/*
2 * LibGame - Copyright (C) Emmanuel Thomas-Maurin 2011-2026
3 * All rights reserved
4 */
5
6#ifndef LG_MESH_LINES_H
7#define LG_MESH_LINES_H
8
9#define MESHLINE_N_SEG_MAX 1024
10
11/*
12 * Hexagon-based mesh line
13 *
14 * base
15 *
16 * x x (i = 1)
17 * x x (i = 0)
18 * x x
19 *
20 * n_seg = 2
21 *
22 * x x
23 * / / x
24 * x x /
25 * / / x
26 * x x /
27 * x x
28 * x x
29 *
30 */
31typedef struct {
32 vec3_t v1;
33 vec3_t v2;
34 uint32_t n_seg;
35 float line_width;
36 LG_Color_u c1; /* Color of odd segments */
37 LG_Color_u c2; /* Color of even segments */
38 Vertex_rgba *vbo_data;
39 uint32_t vbo_size;
40 LG_VAO vao;
41 LG_VBO vbo;
42 LG_ShaderProg shader;
44
46
48
50
52
53#endif /* LG_MESH_LINES_H */
int lg_meshline_set_data(LG_MeshLine *mesh_line, vec3_t v1, vec3_t v2, LG_Color_u c1, LG_Color_u c2)
Definition lg_mesh_lines.c:189
void lg_meshline_free(LG_MeshLine *mesh_line)
Definition lg_mesh_lines.c:253
int lg_meshline_render(LG_MeshLine *mesh_line, mat4_t *model_view_proj_m)
Definition lg_mesh_lines.c:228
LG_MeshLine lg_meshline_new(vec3_t v1, vec3_t v2, int n_seg, float line_width, LG_Color_u c1, LG_Color_u c2, zboolean *is_ok)
Definition lg_mesh_lines.c:86
Definition lg_vertex.h:111
Definition lg_mesh_lines.h:31
Definition lg_shader_progs.h:11
Definition lg_vbo.h:52
Definition lg_vbo.h:16
Definition lg_vertex.h:80
Definition math_3d.c:129
Definition math_3d.c:233