Changeset 6314 in orxonox.OLD for trunk/src/lib/graphics/importer
- Timestamp:
- Dec 27, 2005, 1:09:01 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/graphics/importer/vertex_array_model.cc
r6313 r6314 57 57 58 58 for (unsigned int i = 0; i < model.getVertexCount()*3; i+=3) 59 {60 59 this->addVertex(model.getVertexArray()[i], model.getVertexArray()[i+1], model.getVertexArray()[i+2]); 61 }62 60 for (unsigned int i = 0; i < model.getVertexCount()*3; i+=3) 63 this->addColor(model.getVertexArray()[i], model.getVertexArray()[i+1], model.getVertexArray()[i+2]); 61 this->addColor((float)i / (float)model.getVertexCount(), 0, 0); 62 64 63 for (unsigned int i = 0; i < model.getNormalsCount()*3; i+=3) 65 this->addNormal(model.getNormalsArray()[i], model.getNormalsArray()[i+1], model.getNormalsArray()[i+2]); 66 // for (unsigned int i = 0; i < model.getTexCoordCount(); i+=2) 67 // this->addTexCoor(model.getTexCoordArray()[i], model.getTexCoordArray()[i+1]); 68 for (unsigned int i = 0; i < model.getVertexCount()*2; i+=2) 69 this->addTexCoor(1,2); 64 this->addNormal(model.getNormalsArray()[i], model.getNormalsArray()[i+1], model.getNormalsArray()[i+2]); 65 for (unsigned int i = 0; i < model.getTexCoordCount(); i+=2) 66 this->addTexCoor(model.getTexCoordArray()[i], model.getTexCoordArray()[i+1]); 70 67 71 68 … … 101 98 this->addIndice(v1); 102 99 this->addIndice(v2); 103 printf("%d\n", v1);104 printf("%d\n", v2);105 100 /* start a primitive of type "prim" with v1 and v2 */ 106 101 while(actcGetNextVert(tc, &v3) != ACTC_PRIM_COMPLETE) … … 108 103 /* continue primitive using v3 */ 109 104 this->addIndice(v3); 110 printf("%d\n", v3);111 105 } 112 106 } … … 114 108 115 109 this->finalize(); 116 this->debug();117 110 } 118 111 … … 376 369 for (GLuint j = this->stripes[i-1] ; j < this->stripes[i]; j++) 377 370 { 378 PRINT(0)(" %d->", this->indices[j]);371 PRINT(0)("->%d", this->indices[j]); 379 372 } 380 373 PRINT(0)("\n");
Note: See TracChangeset
for help on using the changeset viewer.