Changeset 6012 in orxonox.OLD for trunk/src/lib
- Timestamp:
- Dec 10, 2005, 5:50:35 PM (19 years ago)
- Location:
- trunk/src/lib/graphics/importer
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/graphics/importer/vertex_array_model.cc
r6010 r6012 55 55 PRINT(4)("\n"); 56 56 } 57 this->cleanup();58 57 } 59 58 … … 91 90 glTexCoordPointer(2, GL_FLOAT, 0, this->texCoords.getArray()); 92 91 92 printf("%d\n", this->indices.getCount()); 93 93 glDrawElements(GL_TRIANGLE_STRIP, 94 94 this->indices.getCount(), … … 190 190 * reads and includes the Faces/Materials into the openGL state Machine 191 191 */ 192 boolVertexArrayModel::importToVertexArray()192 void VertexArrayModel::importToVertexArray() 193 193 { 194 194 // finalize the Arrays … … 196 196 this->texCoords.finalizeArray(); 197 197 this->normals.finalizeArray(); 198 199 200 glEnableClientState(GL_VERTEX_ARRAY);201 glEnableClientState(GL_TEXTURE_COORD_ARRAY);202 glEnableClientState(GL_NORMAL_ARRAY);198 this->indices.finalizeArray(); 199 200 // glEnableClientState(GL_VERTEX_ARRAY); 201 // glEnableClientState(GL_TEXTURE_COORD_ARRAY); 202 // glEnableClientState(GL_NORMAL_ARRAY); 203 203 // glEnableClientState(GL_INDEX_ARRAY); 204 205 glVertexPointer(3, GL_FLOAT, 0, this->vertices.getArray());206 glNormalPointer(GL_FLOAT, 0, this->normals.getArray());207 glTexCoordPointer(2, GL_FLOAT, 0, this->texCoords.getArray());208 204 } 209 205 … … 225 221 for (j = 0; j < 20; j++) 226 222 { 227 this->addVertex(i , i-10*j-10, j);228 this->addNormal( i-10, 1, j-10);223 this->addVertex(i* 50, .5, (j)*50); 224 this->addNormal(0, 1, 0); 229 225 this->addTexCoor((float)i/20.0, (float)j/20.0); 230 226 -
trunk/src/lib/graphics/importer/vertex_array_model.h
r6010 r6012 44 44 45 45 private: 46 bool importToVertexArray(); 47 48 bool cleanup(); 46 void importToVertexArray(); 49 47 50 48 private:
Note: See TracChangeset
for help on using the changeset viewer.