Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 21, 2005, 4:24:50 PM (18 years ago)
Author:
bottac
Message:

Uses VertexArrayModel now

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/height_map/src/lib/graphics/importer/vertex_array_model.cc

    r6038 r6249  
    7171                      GL_TEXTURE_COORD_ARRAY |
    7272                      GL_NORMAL_ARRAY);
    73   //  glEnableClientState(GL_INDEX_ARRAY);
     73  glEnableClientState(GL_INDEX_ARRAY);
    7474
    7575  glVertexPointer(3, GL_FLOAT, 0, this->vertices.getArray());
     
    7777  glTexCoordPointer(2, GL_FLOAT, 0, this->texCoords.getArray()); 
    7878
    79   for (GLuint i = 1; i < this->stripes.size(); ++i)
     79      glDrawElements(GL_TRIANGLE_STRIP, this->indices.getCount(), GL_UNSIGNED_BYTE, this->indices.getArray());
     80/*  for (GLuint i = 1; i < this->stripes.size(); ++i)
    8081    {
    8182      glDrawRangeElements(GL_TRIANGLE_STRIP,
     
    8586                          GL_UNSIGNED_BYTE,
    8687                          this->indices.getArray());
    87     }
     88    }*/
    8889}
    8990
     
    194195      for (j = 0; j < 20; j++)
    195196        {
    196           this->addVertex(i* 50, .5, (j)*50);
     197          this->addVertex((float)i, .5, (float)(j));
    197198          this->addNormal(0, 1, 0);
    198199          this->addTexCoor((float)i/20.0, (float)j/20.0);
Note: See TracChangeset for help on using the changeset viewer.