Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7558 in orxonox.OLD for branches


Ignore:
Timestamp:
May 9, 2006, 9:04:35 PM (19 years ago)
Author:
amaechler
Message:

branches/atmospheric_engine: blenging?! and U2 sound:)

File:
1 edited

Legend:

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

    r7557 r7558  
    1919
    2020#include "glincl.h"
    21 
    2221#include "shell_command.h"
    2322
     
    5655
    5756  // Set fog color
    58   float fogColor[4] = {0.4, 0.4, 0.4, 1.0};
     57  float fogColor[4] = {0.2, 0.2, 0.2, 1.0};
    5958
    6059  // glClearColor(0.0, 0.0, 0.0, 1.0);  //sets bg color?!
     
    6665  glFogf(GL_FOG_START, 0.0f);                                   // Set The Fog Start
    6766  glFogf(GL_FOG_END, 1.0f);                                     // Set The Fog End
    68   glFogi(GL_FOG_COORDINATE_SOURCE_EXT, GL_FOG_COORDINATE_EXT);  // Set Perspective Calculations To Most Accurate
     67  glFogi(GL_FOG_COORDINATE_SOURCE_EXT, GL_FOG_COORDINATE_EXT);
    6968  // glHint(GL_FOG_HINT, GL_NICEST);                            // Per-Pixel Fog Calculation
    7069
    7170  /* enable texturing & set texturing function */
    72   glEnable(GL_TEXTURE_2D);
    73   glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
     71  // glEnable(GL_TEXTURE_2D);
     72  // glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
    7473
    7574  // *********************************************
     
    118117        glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
    119118
     119        // glPushAttrib(GL_ENABLE_BIT);
     120
     121        glEnable(GL_BLEND);
     122        glBlendFunc(GL_SRC_ALPHA, GL_DST_ALPHA);
     123
    120124        //glLoadIdentity ();    // Reset The Modelview Matrix
    121 
    122125
    123126        // glBindTexture(GL_TEXTURE_2D, 0);
     
    131134
    132135        glBegin(GL_QUADS); // Roof
    133                 glFogCoordfEXT(5.0f);glVertex3f(0.0f, 100.0f,0.0f);
    134                 glFogCoordfEXT(5.0f);glVertex3f( 100.0f, 100.0f,0.0f);
    135                 glFogCoordfEXT(5.0f);glVertex3f( 100.0f, 100.0f, 100.0f);
    136                 glFogCoordfEXT(5.0f);glVertex3f(0.0f, 100.0f, 100.0f);
     136                glFogCoordfEXT(5.0f);   glVertex3f(0.0f, 100.0f,0.0f);
     137                glFogCoordfEXT(5.0f);   glVertex3f( 100.0f, 100.0f,0.0f);
     138                glFogCoordfEXT(5.0f);   glVertex3f( 100.0f, 100.0f, 100.0f);
     139                glFogCoordfEXT(5.0f);   glVertex3f(0.0f, 100.0f, 100.0f);
    137140        glEnd();
    138141
     
    140143                glFogCoordfEXT(0.0f);   glVertex3f(0.0f,0.0f,0.0f);
    141144                glFogCoordfEXT(0.0f);   glVertex3f( 100.0f,0.0f,0.0f);
    142                 glFogCoordfEXT(5.0f);glVertex3f( 100.0f, 100.0f,0.0f);
    143                 glFogCoordfEXT(5.0f);glVertex3f(0.0f, 100.0f,0.0f);
     145                glFogCoordfEXT(5.0f);   glVertex3f( 100.0f, 100.0f,0.0f);
     146                glFogCoordfEXT(5.0f);   glVertex3f(0.0f, 100.0f,0.0f);
    144147        glEnd();
    145148
    146149        glBegin(GL_QUADS); // Front Wall
    147                 glFogCoordfEXT(0.0f);           glVertex3f(0.0f,0.0f,100.0f);
     150                glFogCoordfEXT(0.0f);   glVertex3f(0.0f,0.0f,100.0f);
    148151                glFogCoordfEXT(0.0f);   glVertex3f( 100.0f,0.0f,100.0f);
    149                 glFogCoordfEXT(5.0f);glVertex3f( 100.0f, 100.0f,100.0f);
    150                 glFogCoordfEXT(5.0f);glVertex3f(0.0f, 100.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);
    151154        glEnd();
    152155
    153156        glBegin(GL_QUADS); // Right Wall
    154157                glFogCoordfEXT(0.0f);   glVertex3f( 100.0f,0.0f, 100.0f);
    155                 glFogCoordfEXT(5.0f);glVertex3f( 100.0f, 100.0f, 100.0f);
    156                 glFogCoordfEXT(5.0f);glVertex3f( 100.0f, 100.0f,0.0f);
     158                glFogCoordfEXT(5.0f);   glVertex3f( 100.0f, 100.0f, 100.0f);
     159                glFogCoordfEXT(5.0f);   glVertex3f( 100.0f, 100.0f,0.0f);
    157160                glFogCoordfEXT(0.0f);   glVertex3f( 100.0f,0.0f,0.0f);
    158161        glEnd();
     
    169172
    170173        // glPopAttrib();
     174        // glPopAttrib();
    171175}
    172 
    173 
    174176
    175177
Note: See TracChangeset for help on using the changeset viewer.