Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 22, 2005, 7:24:57 PM (19 years ago)
Author:
bensch
Message:

heightMap: sphere with some info, draw with colors

File:
1 edited

Legend:

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

    r6265 r6266  
    6666void VertexArrayModel::draw() const
    6767{
    68   PRINTF(4)("drawing the 3D-VertexArrayModels\n");
    69   glDisable(GL_LIGHTING);
    70 
     68  PRINTF(4)("drawing 3D-VertexArrayModel %s\n", this->getName());
    7169  glEnableClientState(GL_VERTEX_ARRAY );
    7270  glEnableClientState(GL_TEXTURE_COORD_ARRAY );
     
    8785                      &this->indices[this->stripes[i-1]] );
    8886    }
    89     glEnable(GL_LIGHTING);
    9087}
    9188
     
    245242    float cosPhi = std::cos(phi);
    246243    this->addVertex(radius * cosPhi * sinTheta, radius * sinPhi * sinTheta, radius * cosTheta);
    247     this->addNormal(1,1,1);
    248     this->addTexCoor(0,0);
    249     this->addColor(.125,.436,.246);
     244    this->addNormal(radius * cosPhi * sinTheta, radius * sinPhi * sinTheta, radius * cosTheta);
     245    this->addTexCoor(0,0); /// FIXME
     246    this->addColor(.125,.436,.246); ///FIXME
    250247  }
    251248  for (unsigned int loopNumber = 0; loopNumber <= loops; ++loopNumber)
     
    264261      float cosPhi = std::cos(phi);
    265262      this->addVertex(radius * cosPhi * sinTheta, radius * sinPhi * sinTheta, radius * cosTheta);
    266       this->addNormal(1,1,1);
    267       this->addTexCoor(0,0);
     263      this->addNormal(radius * cosPhi * sinTheta, radius * sinPhi * sinTheta, radius * cosTheta);
     264      this->addTexCoor(0,0); //FIXME
    268265      this->addColor(.125,.436,.246);
    269266
Note: See TracChangeset for help on using the changeset viewer.