Changeset 3064 in orxonox.OLD for orxonox/trunk/importer
- Timestamp:
- Dec 3, 2004, 2:29:34 PM (20 years ago)
- Location:
- orxonox/trunk/importer
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/importer/array.cc
r2863 r3064 67 67 { 68 68 if (verbose >= 3) 69 printf ("Finalizing array. \n");69 printf ("Finalizing array. Length: %i\n", entryCount); 70 70 if ((array = (GLfloat*)malloc( entryCount* sizeof(GLfloat))) == NULL) 71 71 // if ((array = new GLfloat [entryCount]) == NULL) -
orxonox/trunk/importer/object.cc
r3063 r3064 27 27 BoxObject(); 28 28 29 importToGL (); 30 29 31 finalize(); 30 32 } … … 39 41 40 42 importFile (fileName); 43 44 importToGL (); 41 45 42 46 finalize(); … … 54 58 55 59 importFile (fileName); 60 61 importToGL (); 56 62 57 63 finalize(); … … 124 130 finalizeGroup (currentGroup); 125 131 126 importToGL ();127 128 132 if (vertices != NULL) 129 133 delete vertices; … … 135 139 if (material != NULL) 136 140 delete material; 137 return true; 141 return true; 138 142 } 139 143 … … 247 251 bool Object::finalizeGroup(Group* group) // think it is not needed anymore 248 252 { 249 if (verbose >=2)250 printf ("Finalize group %s.\n", group->name);253 // if (verbose >=2) 254 // printf ("Finalize group %s.\n", group->name); 251 255 252 256 } … … 362 366 tmpElem->next = NULL; 363 367 364 char * tmpValue = new char[50];368 char tmpValue [50]; 365 369 sscanf (faceString, "%s", tmpValue); 366 370 tmpElem->value = new char [strlen(tmpValue)]; 367 371 strcpy (tmpElem->value, tmpValue); 368 372 369 delete tmpValue; ////// DANGEROUS could be wrong to do this (useless) /////370 373 faceString += strlen(tmpElem->value); 371 374 if (strcmp (faceString, "\0")) … … 389 392 { 390 393 if (verbose >=3) 391 printf ("importing grafical Element to openGL \n");394 printf ("importing grafical Element to openGL: %s\n", elementString); 392 395 char* vertex = elementString; 393 396 … … 457 460 if (strcmp(currentGroup->name, "default")) 458 461 { 459 currentGroup->name = (char*) malloc ( strlen(groupString) * sizeof (char));462 currentGroup->name = new char [strlen(groupString)]; 460 463 strcpy(currentGroup->name, groupString); 461 464 } … … 463 466 { 464 467 Group* newGroup = new Group; 465 finalizeGroup(currentGroup);468 // finalizeGroup(currentGroup); 466 469 currentGroup->next = newGroup; 467 470 initGroup(newGroup); … … 557 560 delElem = tmpElem; 558 561 tmpElem = tmpElem->next; 559 delete delElem;562 // delete delElem; 560 563 } 561 564 tmpFace = tmpFace->next;
Note: See TracChangeset
for help on using the changeset viewer.