Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7042 in orxonox.OLD


Ignore:
Timestamp:
Feb 6, 2006, 1:55:36 AM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: water renders again

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/environments/water.cc

    r6860 r7042  
    183183    glRotatef (this->getAbsDir().getSpacialAxisAngle(), tmpRot.x, tmpRot.y, tmpRot.z );
    184184
    185 //     if (State::getSkyBox())
    186 //     {
    187 //       glBindTexture(GL_TEXTURE_2D, State::getSkyBox()->getTexture(SKY_RIGHT));
    188 //       glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
    189 //
    190 //       glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_SPHERE_MAP);
    191 //       glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_SPHERE_MAP);
    192 //       glEnable(GL_TEXTURE_GEN_S);
    193 //       glEnable(GL_TEXTURE_GEN_T);
    194 //     }
    195 //     glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
    196 
    197     SkyBox::enableCubeMap();
     185     if (State::getSkyBox())
     186     {
     187       glBindTexture(GL_TEXTURE_2D, State::getSkyBox()->getTexture(SKY_RIGHT));
     188       glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
     189
     190       glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_SPHERE_MAP);
     191       glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_SPHERE_MAP);
     192       glEnable(GL_TEXTURE_GEN_S);
     193       glEnable(GL_TEXTURE_GEN_T);
     194     }
     195     glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
     196
     197//    SkyBox::enableCubeMap();
    198198    this->grid->draw();
    199199    // this->waterShader->activateShader();
     
    202202
    203203    SkyBox::disableCubeMap();
    204 //     glDisable(GL_TEXTURE_GEN_S);
    205 //     glDisable(GL_TEXTURE_GEN_T);
     204     glDisable(GL_TEXTURE_GEN_S);
     205     glDisable(GL_TEXTURE_GEN_T);
    206206
    207207    glPopMatrix();
Note: See TracChangeset for help on using the changeset viewer.