-
Notifications
You must be signed in to change notification settings - Fork 6
/
meshes.h
28 lines (25 loc) · 681 Bytes
/
meshes.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
struct flag_mesh {
GLuint vertex_buffer, element_buffer;
GLsizei element_count;
GLuint texture;
};
struct flag_vertex {
GLfloat position[4];
GLfloat normal[4];
GLfloat texcoord[2];
GLfloat shininess;
GLubyte specular[4];
};
void init_mesh(
struct flag_mesh *out_mesh,
struct flag_vertex const *vertex_data, GLsizei vertex_count,
GLushort const *element_data, GLsizei element_count,
GLenum hint
);
struct flag_vertex *init_flag_mesh(struct flag_mesh *out_mesh);
void init_background_mesh(struct flag_mesh *out_mesh);
void update_flag_mesh(
struct flag_mesh const *mesh,
struct flag_vertex *vertex_data,
GLfloat time
);