goat3d

diff src/goat3d.cc @ 57:76d0f55f9d5f

mesh and animation saving looks done...
author John Tsiombikas <nuclear@member.fsf.org>
date Thu, 23 Jan 2014 03:57:15 +0200
parents af1310ed212b
children 99715321ad6d 3751aabbc5b3
line diff
     1.1 --- a/src/goat3d.cc	Thu Jan 23 02:50:54 2014 +0200
     1.2 +++ b/src/goat3d.cc	Thu Jan 23 03:57:15 2014 +0200
     1.3 @@ -247,6 +247,21 @@
     1.4  	g->scn->add_material(mtl);
     1.5  }
     1.6  
     1.7 +GOAT3DAPI int goat3d_get_mtl_count(struct goat3d *g)
     1.8 +{
     1.9 +	return g->scn->get_material_count();
    1.10 +}
    1.11 +
    1.12 +GOAT3DAPI struct goat3d_material *goat3d_get_mtl(struct goat3d *g, int idx)
    1.13 +{
    1.14 +	return (goat3d_material*)g->scn->get_material(idx);
    1.15 +}
    1.16 +
    1.17 +GOAT3DAPI struct goat3d_material *goat3d_get_mtl_by_name(struct goat3d *g, const char *name)
    1.18 +{
    1.19 +	return (goat3d_material*)g->scn->get_material(name);
    1.20 +}
    1.21 +
    1.22  GOAT3DAPI struct goat3d_material *goat3d_create_mtl(void)
    1.23  {
    1.24  	return new goat3d_material;
    1.25 @@ -405,6 +420,12 @@
    1.26  	goat3d_add_mesh_attrib4f(mesh, attrib, val, 0, 0, 1);
    1.27  }
    1.28  
    1.29 +GOAT3DAPI void goat3d_add_mesh_attrib2f(struct goat3d_mesh *mesh, enum goat3d_mesh_attrib attrib,
    1.30 +		float x, float y)
    1.31 +{
    1.32 +	goat3d_add_mesh_attrib4f(mesh, attrib, x, y, 0, 1);
    1.33 +}
    1.34 +
    1.35  GOAT3DAPI void goat3d_add_mesh_attrib3f(struct goat3d_mesh *mesh, enum goat3d_mesh_attrib attrib,
    1.36  		float x, float y, float z)
    1.37  {