mesh done? starting obj loader (port from dosdemo)
[vrtris] / src / cmesh.h
index ba3c97d..a73cd20 100644 (file)
@@ -46,8 +46,10 @@ int cmesh_indexed(struct cmesh *cm);
  */
 float *cmesh_set_attrib(struct cmesh *cm, int attr, int nelem, unsigned int num,
                const float *vdata);
-float *cmesh_attrib(struct cmesh *cm, int attr);       /* invalidates VBO */
+float *cmesh_attrib(struct cmesh *cm, int attr);                       /* invalidates VBO */
 const float *cmesh_attrib_ro(struct cmesh *cm, int attr);      /* doesn't invalidate */
+float *cmesh_attrib_at(struct cmesh *cm, int attr, int idx);
+const float *cmesh_attrib_at_ro(struct cmesh *cm, int attr, int idx);
 int cmesh_attrib_count(struct cmesh *cm, int attr);
 
 /* indices can be 0, in which case only memory is allocated
@@ -58,7 +60,7 @@ unsigned int *cmesh_index(struct cmesh *cm);  /* invalidates IBO */
 const unsigned int *cmesh_index_ro(struct cmesh *cm);  /* doesn't invalidate */
 int cmesh_index_count(struct cmesh *cm);
 
-int get_poly_count(struct cmesh *cm);
+int cmesh_poly_count(struct cmesh *cm);
 
 /* attr can be -1 to invalidate all attributes */
 void cmesh_invalidate_vbo(struct cmesh *cm, int attr);
@@ -81,7 +83,7 @@ void cmesh_flip(struct cmesh *cm);    /* flip faces (winding) and normals */
 void cmesh_flip_faces(struct cmesh *cm);
 void cmesh_flip_normals(struct cmesh *cm);
 
-void cmesh_explode(struct cmesh *cm);  /* undo all vertex sharing */
+int cmesh_explode(struct cmesh *cm);   /* undo all vertex sharing */
 
 /* this is only guaranteed to work on an exploded mesh */
 void cmesh_calc_face_normals(struct cmesh *cm);