Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10034 in orxonox.OLD for trunk/src/world_entities/weather_effects


Ignore:
Timestamp:
Dec 7, 2006, 7:02:27 PM (18 years ago)
Author:
rennerc
Message:

fix for segfault with ati r300 driver

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/weather_effects/cloud_effect.cc

    r9869 r10034  
    121121    this->skydome->setTexture(noise3DTexName);
    122122
    123     this->shader = ResourceShader("/shaders/cloud.vert", "/shaders/cloud.frag");
    124 
    125     this->shader.activateShader();
    126 
    127     Shader::Uniform(shader, "Noise").set(0);
    128 
    129     this->offset = new Shader::Uniform(shader, "Offset");
    130     this->skycolor = new Shader::Uniform(shader, "SkyColor");
    131     this->cloudcolor = new Shader::Uniform(shader, "CloudColor");
    132 
    133     this->shader.deactivateShader();
    134 
    135     this->skydome->setShader(&shader);
     123    if ( Shader::isSupported() )
     124    {
     125      this->shader = ResourceShader("/shaders/cloud.vert", "/shaders/cloud.frag");
     126     
     127      this->shader.activateShader();
     128     
     129      Shader::Uniform(shader, "Noise").set(0);
     130     
     131      this->offset = new Shader::Uniform(shader, "Offset");
     132      this->skycolor = new Shader::Uniform(shader, "SkyColor");
     133      this->cloudcolor = new Shader::Uniform(shader, "CloudColor");
     134     
     135      this->shader.deactivateShader();
     136     
     137      this->skydome->setShader(&shader);
     138    }
    136139}
    137140
     
    186189void CloudEffect::tick (float dt) {
    187190
    188     if (this->cloudActivate) {
     191    if ( this->cloudActivate && Shader::isSupported() ) {
    189192
    190193        this->offsetZ += 0.05 * dt * this->animationSpeed;
Note: See TracChangeset for help on using the changeset viewer.