libgoatvr
view src/mesh.h @ 28:5136dfcea7b1
ported to OVR 0.5.0.1
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Mon, 06 Apr 2015 05:17:11 +0300 |
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_ */