Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6634 in orxonox.OLD for trunk/src/world_entities/skybox.cc


Ignore:
Timestamp:
Jan 21, 2006, 1:18:19 AM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: merged the network-branche back to the trunk

merged with command:
svn merge https://svn.orxonox.net/orxonox/branches/network . -r6500:HEAD
minor conflicts in texture and one Makefile resolved to the trunk

also made a small patch to texture, so it Modulates with GL_REPEAT

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/skybox.cc

    r6523 r6634  
    7171  this->setClassID(CL_SKYBOX, "SkyBox");
    7272  this->toList(OM_ENVIRON_NOTICK);
    73   this->size = 100.0;
     73  //this->size = 100.0;
     74  this->textureSize = 1024.0f;
    7475
    7576  for (int i = 0; i < 6; i++)
     
    215216}
    216217
     218
     219
     220void SkyBox::draw()
     221{
     222  glPushAttrib(GL_ENABLE_BIT);
     223//   glPushAttrib(GL_LIGHTING_BIT);
     224  glDisable(GL_LIGHTING);
     225
     226  WorldEntity::draw();
     227
     228  glPopAttrib();
     229
     230}
     231
     232
    217233/**
    218234 *  rebuilds the SkyBox
     
    233249  model->addVertex (0.5*size, -0.5*size, -0.5*size);
    234250
    235   model->addVertexTexture (0.0, 1.0);
    236   model->addVertexTexture (1.0, 1.0);
    237   model->addVertexTexture (1.0, 0.0);
    238   model->addVertexTexture (0.0, 0.0);
     251//   model->addVertexTexture (0.0, 1.0);
     252//   model->addVertexTexture (1.0, 1.0);
     253//   model->addVertexTexture (1.0, 0.0);
     254//   model->addVertexTexture (0.0, 0.0);
     255
     256  model->addVertexTexture (1.0/this->textureSize, (this->textureSize - 1.0)/this->textureSize);
     257  model->addVertexTexture ((this->textureSize - 1.0)/this->textureSize, (this->textureSize - 1.0)/this->textureSize);
     258  model->addVertexTexture ((this->textureSize - 1.0)/this->textureSize, 1.0/this->textureSize);
     259  model->addVertexTexture (1.0/this->textureSize, 1.0/this->textureSize);
     260
    239261
    240262  model->addVertexNormal (0.0, 0.0, 1.0);
Note: See TracChangeset for help on using the changeset viewer.