dungeon_crawler
diff prototype/src/mesh.cc @ 4:158de53b4e18
tile work
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sat, 11 Aug 2012 05:44:52 +0300 |
parents | 1f61f2a02832 |
children | 252a00508411 |
line diff
1.1 --- a/prototype/src/mesh.cc Fri Aug 10 04:45:38 2012 +0300 1.2 +++ b/prototype/src/mesh.cc Sat Aug 11 05:44:52 2012 +0300 1.3 @@ -16,6 +16,11 @@ 1.4 destroy(); 1.5 } 1.6 1.7 +const char *Mesh::get_name() const 1.8 +{ 1.9 + return name.c_str(); 1.10 +} 1.11 + 1.12 bool Mesh::create(const aiScene *scn, aiMesh *aim) 1.13 { 1.14 if(vbo[MESH_ATTR_VERTEX]) { 1.15 @@ -52,7 +57,7 @@ 1.16 /* map the buffer and fill it up */ 1.17 unsigned int *iptr = (unsigned int*)glMapBuffer(GL_ELEMENT_ARRAY_BUFFER, GL_WRITE_ONLY); 1.18 1.19 - for(int i=0; i<nfaces; i++) { 1.20 + for(int i=0; i<(int)nfaces; i++) { 1.21 for(int j=0; j<3; j++) { 1.22 *iptr++ = aim->mFaces[i].mIndices[j]; 1.23 }