Changeset 6046 in orxonox.OLD for branches/spaceshipcontrol/src/lib/graphics/importer/vertex_array_model.cc
- Timestamp:
- Dec 11, 2005, 2:42:55 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/spaceshipcontrol/src/lib/graphics/importer/vertex_array_model.cc
r6012 r6046 33 33 VertexArrayModel::VertexArrayModel() 34 34 { 35 this->setClassID(CL_ MODEL, "VertexArrayModel");35 this->setClassID(CL_VERTEX_ARRAY_MODEL, "VertexArrayModel"); 36 36 37 37 this->finalized = false; … … 88 88 glVertexPointer(3, GL_FLOAT, 0, this->vertices.getArray()); 89 89 glNormalPointer(GL_FLOAT, 0, this->normals.getArray()); 90 glTexCoordPointer(2, GL_FLOAT, 0, this->texCoords.getArray()); 90 glTexCoordPointer(2, GL_FLOAT, 0, this->texCoords.getArray()); 91 91 92 92 printf("%d\n", this->indices.getCount()); … … 100 100 /* const GLfloat* pVertices = NULL; 101 101 const GLfloat* pNorm = NULL; 102 102 103 103 glBegin(GL_TRIANGLES); 104 104 for( int i = 0; i < this->triangleCount; ++i) … … 109 109 glNormal3f(pNorm[0], pNorm[1], pNorm[2]); 110 110 glVertex3f(pVertices[0], pVertices[1], pVertices[2]); 111 111 112 112 pNorm = &this->normals->getArray()[this->triangles[i].indexToNormals[1]]; 113 113 pVertices = &this->vertices->getArray()[this->triangles[i].indexToVertices[1]]; 114 114 glNormal3f(pNorm[0], pNorm[1], pNorm[2]); 115 115 glVertex3f(pVertices[0], pVertices[1], pVertices[2]); 116 116 117 117 pNorm = &this->normals->getArray()[this->triangles[i].indexToNormals[2]]; 118 118 pVertices = &this->vertices->getArray()[this->triangles[i].indexToVertices[2]]; 119 119 glNormal3f(pNorm[0], pNorm[1], pNorm[2]); 120 120 glVertex3f(pVertices[0], pVertices[1], pVertices[2]); 121 121 122 122 } 123 123 glEnd();
Note: See TracChangeset
for help on using the changeset viewer.