Index: /trunk/src/lib/graphics/importer/vertex_array_model.cc
===================================================================
--- /trunk/src/lib/graphics/importer/vertex_array_model.cc	(revision 6036)
+++ /trunk/src/lib/graphics/importer/vertex_array_model.cc	(revision 6037)
@@ -35,5 +35,6 @@
   this->setClassID(CL_MODEL, "VertexArrayModel");
 
-  this->finalized = false;
+  this->bFinalized = false;
+  this->newStripe();
 }
 
@@ -59,29 +60,15 @@
 
 /**
- * @brief Finalizes an Object. This can be done outside of the Class.
- */
-void VertexArrayModel::finalize()
-{
-  // this creates the display List.
-  this->importToVertexArray();
-
-  this->finalized = true;
-}
-
-
-//////////
-// DRAW //
-//////////
-/**
- *  Draws the VertexArrayModels of all Groups.
-   It does this by just calling the Lists that must have been created earlier.
-*/
-void VertexArrayModel::draw () const
+ * @brief Draws the VertexArrayModels of all Groups.
+ *
+ * It does this by just calling the Lists that must have been created earlier.
+ */
+void VertexArrayModel::draw() const
 {
   PRINTF(4)("drawing the 3D-VertexArrayModels\n");
 
-  glEnableClientState(GL_VERTEX_ARRAY);
-  glEnableClientState(GL_TEXTURE_COORD_ARRAY);
-  glEnableClientState(GL_NORMAL_ARRAY);
+  glEnableClientState(GL_VERTEX_ARRAY |
+		      GL_TEXTURE_COORD_ARRAY |
+		      GL_NORMAL_ARRAY);
   //  glEnableClientState(GL_INDEX_ARRAY);
 
@@ -90,37 +77,13 @@
   glTexCoordPointer(2, GL_FLOAT, 0, this->texCoords.getArray());  
 
-  printf("%d\n", this->indices.getCount());
-  glDrawElements(GL_TRIANGLE_STRIP,
-		 this->indices.getCount(),
-		 GL_UNSIGNED_BYTE,
-		 this->indices.getArray());
-
-
-
-  /*  const GLfloat* pVertices = NULL;
-      const GLfloat* pNorm = NULL;
-      
-      glBegin(GL_TRIANGLES);
-      for( int i = 0; i < this->triangleCount; ++i)
-      {
-      //printf("int i = %i\n", i);
-      pNorm = &this->normals->getArray()[this->triangles[i].indexToNormals[0]];
-      pVertices = &this->vertices->getArray()[this->triangles[i].indexToVertices[0]];
-      glNormal3f(pNorm[0], pNorm[1], pNorm[2]);
-      glVertex3f(pVertices[0], pVertices[1], pVertices[2]);
-      
-      pNorm = &this->normals->getArray()[this->triangles[i].indexToNormals[1]];
-      pVertices = &this->vertices->getArray()[this->triangles[i].indexToVertices[1]];
-      glNormal3f(pNorm[0], pNorm[1], pNorm[2]);
-      glVertex3f(pVertices[0], pVertices[1], pVertices[2]);
-      
-      pNorm = &this->normals->getArray()[this->triangles[i].indexToNormals[2]];
-      pVertices = &this->vertices->getArray()[this->triangles[i].indexToVertices[2]];
-      glNormal3f(pNorm[0], pNorm[1], pNorm[2]);
-      glVertex3f(pVertices[0], pVertices[1], pVertices[2]);
-      
-      }
-      glEnd();
-  */
+  for (GLuint i = 0; i+1 < this->stripes.size(); i++)
+    {
+      glDrawRangeElements(GL_TRIANGLE_STRIP,
+			  stripes[i],
+			  stripes[i+1],
+			  this->indices.getCount(),
+			  GL_UNSIGNED_BYTE,
+			  this->indices.getArray());
+    }
 }
 
@@ -129,4 +92,13 @@
 // MESH //
 //////////
+/**
+ * @brief generates a new Stripe in this Model
+ */
+void VertexArrayModel::newStripe()
+{
+  this->stripes.push_back(this->vertices.getCount()-1);
+}
+
+
 /**
  * @brief parses a vertex-String
@@ -180,15 +152,11 @@
 {
   this->indices.addEntry(indice);
-
-}
-
-
-////////////
-// openGL //
-////////////
-/**
- *  reads and includes the Faces/Materials into the openGL state Machine
-*/
-void VertexArrayModel::importToVertexArray()
+}
+
+
+/**
+ * @brief Finalizes an Object. This can be done outside of the Class.
+ */
+void VertexArrayModel::finalize()
 {
   // finalize the Arrays
@@ -198,8 +166,13 @@
   this->indices.finalizeArray();
 
-  //  glEnableClientState(GL_VERTEX_ARRAY);
-  //  glEnableClientState(GL_TEXTURE_COORD_ARRAY);
-  //  glEnableClientState(GL_NORMAL_ARRAY);
-  //  glEnableClientState(GL_INDEX_ARRAY);
+  this->newStripe();
+
+  /*
+    glEnableClientState(GL_VERTEX_ARRAY |
+    GL_TEXTURE_COORD_ARRAY |
+    GL_NORMAL_ARRAY);
+  */
+
+  this->bFinalized = true;
 }
 
@@ -210,9 +183,9 @@
 /////////////
 /**
- *  Includes a default model
+ * @brief Includes a default model
  *
  * This will inject a Cube, because this is the most basic model.
  */
-void VertexArrayModel::cubeModel()
+void VertexArrayModel::planeModel()
 {
   unsigned int i, j;
@@ -232,54 +205,3 @@
       this->addIndice(i+20);
     }
-
-  /*
-  this->addVertex (-0.5, -0.5, 0.5);
-  this->addVertex (0.5, -0.5, 0.5);
-  this->addVertex (-0.5, 0.5, 0.5);
-  this->addVertex (0.5, 0.5, 0.5);
-  this->addVertex (-0.5, 0.5, -0.5);
-  this->addVertex (0.5, 0.5, -0.5);
-  this->addVertex (-0.5, -0.5, -0.5);
-  this->addVertex (0.5, -0.5, -0.5);
-
-  this->addTexCoor (0.0, 0.0);
-  this->addTexCoor (1.0, 0.0);
-  this->addTexCoor (0.0, 1.0);
-  this->addTexCoor (1.0, 1.0);
-  this->addTexCoor (0.0, 2.0);
-  this->addTexCoor (1.0, 2.0);
-  this->addTexCoor (0.0, 3.0);
-  this->addTexCoor (1.0, 3.0);
-  this->addTexCoor (0.0, 4.0);
-  this->addTexCoor (1.0, 4.0);
-  this->addTexCoor (2.0, 0.0);
-  this->addTexCoor (2.0, 1.0);
-  this->addTexCoor (-1.0, 0.0);
-  this->addTexCoor (-1.0, 1.0);
-
-  this->addNormal (0.0, 0.0, 1.0);
-  this->addNormal (0.0, 0.0, 1.0);
-  this->addNormal (0.0, 0.0, 1.0);
-  this->addNormal (0.0, 0.0, 1.0);
-  this->addNormal (0.0, 1.0, 0.0);
-  this->addNormal (0.0, 1.0, 0.0);
-  this->addNormal (0.0, 1.0, 0.0);
-  this->addNormal (0.0, 1.0, 0.0);
-  this->addNormal (0.0, 0.0, -1.0);
-  this->addNormal (0.0, 0.0, -1.0);
-  this->addNormal (0.0, 0.0, -1.0);
-  this->addNormal (0.0, 0.0, -1.0);
-  this->addNormal (0.0, -1.0, 0.0);
-  this->addNormal (0.0, -1.0, 0.0);
-  this->addNormal (0.0, -1.0, 0.0);
-  this->addNormal (0.0, -1.0, 0.0);
-  this->addNormal (1.0, 0.0, 0.0);
-  this->addNormal (1.0, 0.0, 0.0);
-  this->addNormal (1.0, 0.0, 0.0);
-  this->addNormal (1.0, 0.0, 0.0);
-  this->addNormal (-1.0, 0.0, 0.0);
-  this->addNormal (-1.0, 0.0, 0.0);
-  this->addNormal (-1.0, 0.0, 0.0);
-  this->addNormal (-1.0, 0.0, 0.0);
-  */
-}
+}
Index: /trunk/src/lib/graphics/importer/vertex_array_model.h
===================================================================
--- /trunk/src/lib/graphics/importer/vertex_array_model.h	(revision 6036)
+++ /trunk/src/lib/graphics/importer/vertex_array_model.h	(revision 6037)
@@ -12,5 +12,5 @@
 
 #include "array.h"
-#include <list>
+#include <vector>
 
 /* Forward Declaration */
@@ -22,4 +22,7 @@
 /////////////
 //! Class that handles 3D-Models. it can also read them in and display them.
+/**
+ * this renders models with help of the OpenGL glVertexArray
+ */
 class VertexArrayModel : public Model
 {
@@ -30,16 +33,16 @@
   void draw() const;
 
+
+  void newStripe();
+
   void addVertex(float x, float y, float z);
-
   void addNormal(float x, float y, float z);
-
   void addTexCoor(float u, float v);
-
   void addIndice(GLubyte indice);
 
   void finalize();
 
-
-  void cubeModel();
+  // 
+  void planeModel();
 
  private:
@@ -47,5 +50,5 @@
 
  private:
-  bool                       finalized;       //!< Sets the Object to be finalized.
+  bool                       bFinalized;       //!< Sets the Object to be finalized.
 
   tArray<GLfloat>            vertices;        //!< The Array that handles the Vertices.
@@ -54,4 +57,7 @@
 
   tArray<GLubyte>            indices;         //!< The Array that tells us what Vertex is connected to which other one.
+
+  std::vector<GLuint>        stripes;         //!< A lsit of Stripes of this Model.
+
 };
 
