Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 17, 2006, 2:03:02 AM (19 years ago)
Author:
patrick
Message:

network: skybox is now fixed, there is no seam on the border anymore, some more texture work for the stars background

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/network/src/world_entities/skybox.cc

    r6500 r6511  
    7272  this->toList(OM_ENVIRON_NOTICK);
    7373  this->size = 100.0;
     74  this->textureSize = 1024.0f;
    7475
    7576  for (int i = 0; i < 6; i++)
     
    205206}
    206207
     208
     209
     210void SkyBox::draw()
     211{
     212  glPushAttrib(GL_LIGHTING_BIT);
     213  glDisable(GL_LIGHTING);
     214  WorldEntity::draw();
     215//   glEnable(GL_LIGHTING);
     216  glPopAttrib();
     217
     218}
     219
     220
    207221/**
    208222 *  rebuilds the SkyBox
     
    223237  model->addVertex (0.5*size, -0.5*size, -0.5*size);
    224238
    225   model->addVertexTexture (0.0, 1.0);
    226   model->addVertexTexture (1.0, 1.0);
    227   model->addVertexTexture (1.0, 0.0);
    228   model->addVertexTexture (0.0, 0.0);
     239//   model->addVertexTexture (0.0, 1.0);
     240//   model->addVertexTexture (1.0, 1.0);
     241//   model->addVertexTexture (1.0, 0.0);
     242//   model->addVertexTexture (0.0, 0.0);
     243
     244  model->addVertexTexture (1.0/this->textureSize, (this->textureSize - 1.0)/this->textureSize);
     245  model->addVertexTexture ((this->textureSize - 1.0)/this->textureSize, (this->textureSize - 1.0)/this->textureSize);
     246  model->addVertexTexture ((this->textureSize - 1.0)/this->textureSize, 1.0/this->textureSize);
     247  model->addVertexTexture (1.0/this->textureSize, 1.0/this->textureSize);
     248
    229249
    230250  model->addVertexNormal (0.0, 0.0, 1.0);
Note: See TracChangeset for help on using the changeset viewer.