Index: orxonox/trunk/src/lib/graphics/importer/material.cc
===================================================================
--- orxonox/trunk/src/lib/graphics/importer/material.cc	(revision 3863)
+++ orxonox/trunk/src/lib/graphics/importer/material.cc	(revision 3894)
@@ -34,9 +34,9 @@
    \param mtlName Name of the Material to be added to the Material List
 */
-Material::Material (char* mtlName)
+Material::Material (const char* mtlName)
 {
    PRINTF(4)("initializing new Material.\n");
   this->nextMat = NULL;
-  this->name ="";
+  this->name = NULL;
   this->setIllum(3);
   this->setDiffuse(0,0,0);
@@ -55,8 +55,5 @@
   this->specularTextureSet = false;
 
-  if (mtlName)
-    this->setName (mtlName);
-  else
-    this->setName("");
+  this->setName(mtlName);
 }
 
@@ -80,5 +77,5 @@
    \param mtlName The name of the Material to be added.
 */
-Material* Material::addMaterial(char* mtlName)
+Material* Material::addMaterial(const char* mtlName)
 {
   PRINTF(4)("adding Material %s.\n", mtlName);
@@ -98,5 +95,5 @@
    \returns Material named mtlName if it is found. NULL otherwise.
 */
-Material* Material::search(char* mtlName)
+Material* Material::search(const char* mtlName)
 {
   PRINTF(5)("Searching for material %s", mtlName);
@@ -168,9 +165,18 @@
    \param mtlName the Name of the Material to be set.
 */ 
-void Material::setName (char* mtlName)
-{
-  PRINTF(4)("setting Material Name to %s.\n", this->name);
-  this->name = new char [strlen(mtlName)+1];
-  strcpy(this->name, mtlName);
+void Material::setName (const char* mtlName)
+{
+  if (this->name)
+    delete this->name;
+  if (mtlName)
+    {
+      this->name = new char [strlen(mtlName)+1];
+      strcpy(this->name, mtlName);
+    }
+  else
+    {
+      this->name = new char[2];
+      strcpy(this->name, "");
+    }
 }
 
Index: orxonox/trunk/src/lib/graphics/importer/material.h
===================================================================
--- orxonox/trunk/src/lib/graphics/importer/material.h	(revision 3863)
+++ orxonox/trunk/src/lib/graphics/importer/material.h	(revision 3894)
@@ -14,4 +14,8 @@
 #endif /* HAVE_CONFIG_H */
 
+#ifndef NULL
+#define NULL 0
+#endif
+
 // FORWARD DEFINITIONS //
 class Texture;
@@ -22,12 +26,12 @@
 {
  public:
-  Material (char* mtlName = "");
-  Material* addMaterial(char* mtlName);
+  Material (const char* mtlName = NULL);
+  Material* addMaterial(const char* mtlName);
   ~Material ();
 
-  Material* search(char* mtlName);
+  Material* search(const char* mtlName);
   bool select (void);
 
-  void setName (char* mtlName);
+  void setName (const char* mtlName);
   char* getName (void);
   void setIllum (int illum);
Index: orxonox/trunk/src/lib/graphics/importer/model.cc
===================================================================
--- orxonox/trunk/src/lib/graphics/importer/model.cc	(revision 3863)
+++ orxonox/trunk/src/lib/graphics/importer/model.cc	(revision 3894)
@@ -323,5 +323,5 @@
    With it you should be able to import .obj-files with more than one Models inside. 
 */
-bool Model::addGroup (char* groupString)
+bool Model::addGroup (const char* groupString)
 {
   PRINTF(5)("Read Group: %s.\n", groupString);
@@ -366,5 +366,5 @@
    
 */
-bool Model::addVertex(const float x, const float y, const float z)
+bool Model::addVertex(float x, float y, float z)
 {
   PRINTF(5)("reading in a vertex: %f %f %f\n", x, y, z);
@@ -441,5 +441,5 @@
    \param type 0: vertex only, 1: vertex and normal, 2: vertex and Texture, 3 vertex, normal and texture
 */
-bool Model::addFace(const float faceElemCount, int type, ...)
+bool Model::addFace(int faceElemCount, int type, ...)
 {
    if (this->currentGroup->faceCount > 0)
@@ -496,5 +496,5 @@
    If a vertexNormal line is found this function will inject it into the vertexNormal-Array
 */
-bool Model::addVertexNormal(const float x, const float y, const float z)
+bool Model::addVertexNormal(float x, float y, float z)
 {
   PRINTF(3)("found vertex-Normal %f, %f, %f\n", x, y, z);
@@ -527,7 +527,7 @@
    If a TextureCoordinate line is found this function will inject it into the TextureCoordinate-Array
 */
-bool Model::addVertexTexture(const float u, const float v)
-{
-  PRINTF(3)("found vertex-Texture %f, %f\n", u, v);
+bool Model::addVertexTexture(float u, float v)
+{
+  PRINTF(5)("found vertex-Texture %f, %f\n", u, v);
   this->vTexture->addEntry(u);
   this->vTexture->addEntry(v);
@@ -538,5 +538,5 @@
    \param matString the Material that will be set.
 */
-bool Model::addUseMtl (char* matString)
+bool Model::addUseMtl (const char* matString)
 {
   /*
Index: orxonox/trunk/src/lib/graphics/importer/model.h
===================================================================
--- orxonox/trunk/src/lib/graphics/importer/model.h	(revision 3863)
+++ orxonox/trunk/src/lib/graphics/importer/model.h	(revision 3894)
@@ -19,4 +19,9 @@
 #define NORMAL 1       //!< If Faces are created WITH Normals (otherwise autocalculate)
 #define TEXCOORD 2     //!< If Faces are created WITH TextureCoordinate
+//! an enumerator for VERTEX_FORMAT
+enum VERTEX_FORMAT {VERTEX_ONLY = VERTEX,
+		    VERTEX_NORMAL = NORMAL,
+		    VERTEX_TEXCOORD = TEXCOORD,
+		    VERTEXT_TEXTURE_NORMAL = NORMAL | TEXCOORD};
 
 //! Class that handles 3D-Models. it can also read them in and display them.
@@ -96,14 +101,14 @@
 
  public:
-  bool addGroup(char* groupString);
+  bool addGroup(const char* groupString);
   bool addVertex(char* vertexString);
-  bool addVertex(const float x, const float y, const float z);
+  bool addVertex(float x, float y, float z);
   bool addFace(char* faceString);
-  bool addFace(const float faceElemCount, int type, ...);
+  bool addFace(int faceElemCount, int type, ...);
   bool addVertexNormal(char* normalString);
-  bool addVertexNormal(const float x, const float y, const float z);
+  bool addVertexNormal(float x, float y, float z);
   bool addVertexTexture(char* vTextureString);
-  bool addVertexTexture(const float u, const float v);
-  bool addUseMtl(char* mtlString);
+  bool addVertexTexture(float u, float v);
+  bool addUseMtl(const char* mtlString);
   bool addUseMtl(Material* mtl);
   void finalize(void);
