libgoatvr

view src/mesh.h @ 33:1102327fe85f

added red-cyan anaglyph fallback drawing
author John Tsiombikas <nuclear@member.fsf.org>
date Fri, 30 Oct 2015 06:34:00 +0200
parents
children
line source
1 #ifndef MESH_H_
2 #define MESH_H_
4 struct vertex {
5 float x, y, z;
6 float tx, ty;
7 };
9 struct mesh {
10 int prim;
11 struct vertex *varr;
12 unsigned int *iarr;
13 int num_verts, num_faces;
14 unsigned int vbo, ibo;
15 };
17 int vrimp_mesh_init(struct mesh *m);
18 void vrimp_mesh_destroy(struct mesh *m);
20 void vrimp_mesh_draw(struct mesh *m);
22 int vrimp_mesh_barrel_distortion(struct mesh *m, int usub, int vsub, float aspect,
23 float lens_center_offset, float scale, const float *dist_factors,
24 float tex_scale_x, float tex_scale_y);
27 #endif /* MESH_H_ */