Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7561 in orxonox.OLD for branches/atmospheric_engine/src


Ignore:
Timestamp:
May 10, 2006, 9:37:35 AM (19 years ago)
Author:
amaechler
Message:

branches/atmosphere_engine: rain_effect

Location:
branches/atmospheric_engine/src/lib/graphics/effects
Files:
2 added
1 edited

Legend:

Unmodified
Added
Removed
  • branches/atmospheric_engine/src/lib/graphics/effects/volfog_effect.cc

    r7558 r7561  
    5757  float fogColor[4] = {0.2, 0.2, 0.2, 1.0};
    5858
    59   // glClearColor(0.0, 0.0, 0.0, 1.0);  //sets bg color?!
    60 
    6159  /* set up fog params */       
    6260  glEnable(GL_FOG);                                             // Enable Fog
     
    6462  glFogfv(GL_FOG_COLOR, fogColor);                              // Set The Fog Color
    6563  glFogf(GL_FOG_START, 0.0f);                                   // Set The Fog Start
    66   glFogf(GL_FOG_END, 1.0f);                                     // Set The Fog End
    67   glFogi(GL_FOG_COORDINATE_SOURCE_EXT, GL_FOG_COORDINATE_EXT);
     64  glFogf(GL_FOG_END, 10.0f);                                    // Set The Fog End
     65  glFogi(GL_FOG_COORDINATE_SOURCE_EXT, GL_FOG_COORDINATE_EXT);  // Set The Fog based on vertice coordinates
    6866  // glHint(GL_FOG_HINT, GL_NICEST);                            // Per-Pixel Fog Calculation
     67
     68  // glClearColor(0.0, 0.0, 0.0, 1.0);  //sets bg color?!
    6969
    7070  /* enable texturing & set texturing function */
     
    117117        glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
    118118
    119         // glPushAttrib(GL_ENABLE_BIT);
    120 
    121119        glEnable(GL_BLEND);
    122120        glBlendFunc(GL_SRC_ALPHA, GL_DST_ALPHA);
     
    150148                glFogCoordfEXT(0.0f);   glVertex3f(0.0f,0.0f,100.0f);
    151149                glFogCoordfEXT(0.0f);   glVertex3f( 100.0f,0.0f,100.0f);
    152                 glFogCoordfEXT(5.0f);   glVertex3f( 100.0f, 100.0f,100.0f);
    153                 glFogCoordfEXT(5.0f);   glVertex3f(0.0f, 100.0f,100.0f);
     150                glFogCoordfEXT(50.0f);  glVertex3f( 100.0f, 100.0f,100.0f);
     151                glFogCoordfEXT(50.0f);  glVertex3f(0.0f, 100.0f,100.0f);
    154152        glEnd();
    155153
     
    172170
    173171        // glPopAttrib();
    174         // glPopAttrib();
    175172}
    176173
Note: See TracChangeset for help on using the changeset viewer.