Changeset 10114 in orxonox.OLD for trunk/src/lib/graphics
- Timestamp:
- Dec 19, 2006, 11:55:26 PM (18 years ago)
- Location:
- trunk/src/lib/graphics
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/graphics/importer/md2/md2Model.cc
r9869 r10114 92 92 rebuildInfo(); 93 93 94 //this->debug();94 this->debug(); 95 95 } 96 96 … … 99 99 { 100 100 this->init(); 101 102 this->scaleFactor = model.scaleFactor; 103 101 104 this->rebuildInfo(); 102 105 } … … 104 107 MD2Model& MD2Model::operator=(const MD2Model& md2model) 105 108 { 109 this->init(); 110 this->scaleFactor = md2model.scaleFactor; 106 111 this->data = md2model.data; 107 112 this->rebuildInfo(); … … 141 146 this->data = MD2Data::Pointer(new MD2Data(modelFileName, skinFileName, scale)); 142 147 this->rebuildInfo(); 148 149 // init the animation - do not remove 150 this->tick( 0.01); 151 152 return true; 143 153 } 144 154 … … 268 278 /** 269 279 * @brief draws the model: interface for all other classes out in the world 270 * @todo make it const and virtual271 * FIXME272 280 */ 273 281 void MD2Model::draw() const … … 313 321 glNormal3fv(anorms[this->data->pLightNormals[pCommands[2]]]); 314 322 glVertex3fv(this->verticesList[pCommands[2]]); 323 // printf("vertex: %f, %f, %f\n", this->verticesList[pCommands[2]][0], this->verticesList[pCommands[2]][1], this->verticesList[pCommands[2]][2]); 315 324 } 316 325 glEnd(); … … 325 334 { 326 335 //static sVec3D this->verticesList[MD2_MAX_VERTICES]; /* performance: created only once in a lifetime */ 327 int* pCommands = this->data->pGLCommands;336 // int* pCommands = this->data->pGLCommands; 328 337 /* some face culling stuff */ 329 338 // glPushAttrib(GL_POLYGON_BIT); … … 428 437 PRINT(0)("= Number of Frames: \t%i\n", this->data->header->numFrames); 429 438 PRINT(0)("= Height, Width:\t%i, %i\n", this->data->header->skinHeight, this->data->header->skinWidth); 430 //PRINT(0)("= Pointer to the data object: %p\n", this->data); 439 PRINT(0)("= DATA:\n"); 440 PRINT(0)("= Number of references to data: %i\n", this->data.count()); 431 441 PRINT(0)("===================================================\n\n"); 432 442 } … … 452 462 this->loadModel(modelFileName); 453 463 this->loadSkin(skinFileName); 464 465 PRINTF(0)("model %s, skin %s\n", modelFileName.c_str(), skinFileName.c_str()); 454 466 } 455 467 … … 570 582 delete [] buffer; 571 583 fclose(pFile); 584 585 return true; 572 586 } 573 587 … … 592 606 this->material.setIllum(3); 593 607 this->material.setAmbient(1.0, 1.0, 1.0); 594 } 608 609 return true; 610 } -
trunk/src/lib/graphics/importer/md2/resource_md2.cc
r9869 r10114 20 20 PRINTF(0)("NOT FOUND MD2: %s\n", modelName.c_str()); 21 21 std::string modelFileName = this->Resource::locateFile(modelName); 22 //std::string skinFileName = this->Resource::locateFile(skinName); 22 std::string skinFileName = this->Resource::locateFile(skinName); 23 PRINTF(0)("NEW %s::%s\n", modelName.c_str(), modelFileName.c_str()); 23 24 this->MD2Model::load(modelFileName, skinName, scale); 24 this->Resource::addResource(new ResourceMD2::MD2ResourcePointer(loadString(modelName, skin Name, scale), keepLevel, this->MD2Model::dataPointer()));25 this->Resource::addResource(new ResourceMD2::MD2ResourcePointer(loadString(modelName, skinFileName, scale), keepLevel, this->MD2Model::dataPointer())); 25 26 } 26 27 -
trunk/src/lib/graphics/light.cc
r9869 r10114 26 26 #include "debug.h" 27 27 28 #include "class_id_DEPRECATED.h" 29 30 ObjectListDefinitionID(Light, CL_LIGHT); 28 ObjectListDefinition(Light); 31 29 CREATE_FACTORY(Light); 32 30 -
trunk/src/lib/graphics/render2D/image_plane.cc
r9869 r10114 23 23 #include "p_node.h" 24 24 25 26 #include "class_id_DEPRECATED.h" 27 28 ObjectListDefinitionID(ImagePlane, CL_IMAGE_PLANE); 25 ObjectListDefinition(ImagePlane); 29 26 CREATE_FACTORY(ImagePlane); 30 27 -
trunk/src/lib/graphics/shader_data.cc
r9869 r10114 63 63 { 64 64 PRINTF(2)("Shaders are not supported on your hardware\n"); 65 } 65 return true; 66 } 67 68 return true; 66 69 } 67 70 -
trunk/src/lib/graphics/text_engine/limited_width_text.cc
r9869 r10114 33 33 this->setLineWidth(lineWidth); 34 34 } 35 35 36 36 37 /**
Note: See TracChangeset
for help on using the changeset viewer.