   Weird Mesh Render Behavior
  Hello,I currently exported a blender object to Wavefront OBJ file format. Now I am trying to render it in my Application. But i get weird results there. Here is what i got there:ScreenshotIt supposed to be a banana model. But the parts which are shown with a red arrow are not in the model (checked by importing it into the blender format). What am i doing wrong?Here is the source:void InitMesh() {Mesh * mesh = new Mesh("BananaMesh");LoadOBJ("banana.obj", mesh);MeshEntity = new MeshEntity(mesh);}void RenderMesh(MeshEntity * entity) {for(dour::MeshEntity::SubMeshEntityList::iterator i = entity->submeshes.begin(); i != entity->submeshes.end(); ++i) {program->Bind();GPUProgramManager::Instance().setUniformMatrix(program, "modelViewProjection", modelviewprojection.row);(*i).vertexbuffer->Bind();(*i).indexbuffer->Bind();OpenGLVertexLayout::BindAttribute("POSITION", sizeof(Vertex), 0);glEnableClientState(GL_VERTEX_ARRAY);glDrawElements(GL_TRIANGLES, (*i).getCreator()->getTris().size() * 3, GL_UNSIGNED_INT, 0);glDisableClientState(GL_VERTEX_ARRAY);(*i).indexbuffer->Unbind();(*i).vertexbuffer->Unbind();program->Unbind();}}SubMeshEntity::SubMeshEntity(MeshEntity * entity_, const SubMesh * creator_) : entity(entity_), creator(creator_) {Vertex * verts = new Vertex[creator->getVerts().size()];for(uint i = 0; i < creator->getVerts().size(); ++i) {verts = creator->getVerts();}uint * indices = new uint[creator->getTris().size() * 3];uint current = 0;for(SubMesh::TriangleList::const_iterator i = creator->getTris().begin(); i != creator->getTris().end(); ++i) {for(uint idx = 0; idx < 3; ++idx) {indices[current++] = (*i).index[idx];}}vertexbuffer = HardwareBufferManager::Instance().createVertexBuffer(sizeof(Vertex) * creator->getVerts().size(), HardwareBufferManager::USG_DYNAMIC, verts, true);indexbuffer = HardwareBufferManager::Instance().createIndexBuffer(sizeof(uint) * creator->getTris().size() * 3, HardwareBufferManager::USG_STATIC, indices, false);delete [] indices; indices = 0;delete [] verts; verts = 0;current = 0;}MeshEntity::MeshEntity(const Mesh * creator_) : creator(creator_) {for(Mesh::SubMeshList::const_iterator i = creator->getSubMeshes().begin(); i != creator->getSubMeshes().end(); ++i) {const SubMesh &temp = (*i);submeshes.push_back(SubMeshEntity(this, &temp));}}Shader Source:[VertexShader]#version 130in vec3 POSITION;uniform mat4 modelViewProjection;void main() {gl_Position = modelViewProjection * vec4(POSITION, 1.0);}[FragmentShader]#version 130out vec4 myfragcolor;void main() {myfragcolor = vec4(1.0, 1.0, 1.0, 1.0);}Thanks,Kasya   
  Bump. Anyone?   ;  Problem with your LoadOBJ implementation, would be my guess.   ;  I really don't think so:void LoadOBJ(const String &filename, Mesh * mdl) {std::ifstream file(filename);String line;SubMesh submesh(mdl);uint t1;Vertex v;Triangle t;while(!file.eof()) {std::getline(file, line);if(!line.empty()) {if(line[0] == 'v') {if(line[1] != 't' && line[1] != 'n') {sscanf(line.c_str(), "v %f %f %f", &v.x, &v.y, &v.z);submesh.addVertex(v);}}if(line[0] == 'f') {sscanf(line.c_str(), "f %d/%d/%d %d/%d/%d %d/%d/%d", &t.index[0], &t1, &t1, &t.index[1], &t1, &t1, &t.index[2], &t1, &t1);submesh.addTriangle(t);}}}mdl->addSubMesh(submesh);}There is nothing easier than loading ASCII file (IMHO);  Don't .obj vertex indices start from 1, and your "Submesh" vertex listing presumably starts at 0? (i.e. So shouldn't you be subtracting 1 from each "f %d/%d/%d" index?)   ;  Thank you very much!! I didn't know that. Now My Mesh is draw as needed :)   