Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6511 in orxonox.OLD for branches/network/src/world_entities


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

Location:
branches/network/src/world_entities
Files:
2 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);
  • branches/network/src/world_entities/skybox.h

    r6470 r6511  
    3333  void postInit();
    3434
     35  virtual void draw();
    3536
    3637  void setSize(float size);
     
    6061
    6162  float           size;            //!< Size of the SkyBox. This should match the frustum maximum range.
     63  float           textureSize;     //!< this is the length of a texture (assumes a square texture)
    6264  char*           textureName;     //!< Name of the Texture
    6365
Note: See TracChangeset for help on using the changeset viewer.