diff --git a/barebones/g3d.cpp b/barebones/g3d.cpp index c1105f3..977272b 100644 --- a/barebones/g3d.cpp +++ b/barebones/g3d.cpp @@ -102,6 +102,7 @@ g3d_t::mesh_t::mesh_t(g3d_t& g,binary_reader_t& in,char ver): for(uint32_t f=0; f= vertex_count) - data_error("index[" << i << "]=" << i_data[i] << " out of bounds (" << vertex_count << ')'); + data_error("index[" << i << "]=" << i_data[i] << " out of bounds (" << vertex_count << ')'); } glGenBuffers(1,&i_vbo); glCheck(); @@ -225,7 +227,7 @@ void g3d_t::mesh_t::draw(float time,const glm::mat4& projection,const glm::mat4& glDisableVertexAttribArray(attrib_tex); glBindBuffer(GL_ELEMENT_ARRAY_BUFFER,i_vbo); std::cerr << "drawing " << g3d.filename << ':' << name << ' ' << __LINE__ << std::endl; - glDrawElements(GL_TRIANGLES,index_count,GL_UNSIGNED_SHORT,0); + glDrawElements(GL_TRIANGLES,index_count,GL_UNSIGNED_SHORT,(void*)(0)); std::cerr << "drawing " << g3d.filename << ':' << name << ' ' << __LINE__ << std::endl; glCheck(); std::cerr << "drew " << g3d.filename << ':' << name << std::endl;