Ignore:
Timestamp:
May 29, 2010, 11:52:47 PM (14 years ago)
Author:
Torben Dannhauer
Message:

Updated to new osg version with new manipulator schema.
Updated integration of 3dx SpaceNavigator? to allow disabling without compile errors.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • osgVisual/src/sky_Silverlining/skySilverLining_skyDrawable.cpp

    r53 r55  
    8787void skySilverLining_skyDrawable::setSceneFog(SilverLining::Atmosphere *atmosphere) const
    8888{   
    89         //glEnable(GL_FOG);
    90  //   glFogi(GL_FOG_MODE, GL_EXP);
    91 
    92         ////float hazeR, hazeG, hazeB;
    93         ////double hazeDepth, hazeDensity;
    94         ////atmosphere->GetHaze(hazeR, hazeG, hazeB, hazeDepth, hazeDensity);
    95 
    96  //   //hazeDensity = 1.0 / 40000;
    97         ////hazeDensity = 0;
    98         //float hazeDensity = 1.0 / atmosphere->GetConditions()->GetVisibility();
    99 
    100  //   // Decrease fog density with altitude, to avoid fog effects through the vacuum of space.
    101  //   static const double H = 8435.0; // Pressure scale height of Earth's atmosphere
    102  //   double isothermalEffect = exp(-(atmosphere->GetConditions()->GetLocation().GetAltitude() / H));     
    103  //   if (isothermalEffect <= 0) isothermalEffect = 1E-9;
    104  //   if (isothermalEffect > 1.0) isothermalEffect = 1.0;
    105  //   hazeDensity *= isothermalEffect;
    106 
    107  //   bool silverLiningHandledTheFog = false;
    108 
    109  //   if (atmosphere->GetFogEnabled())
    110  //   {
    111  //           float density, r, g, b;
    112  //           // Note, the fog color returned is already lit
    113  //           atmosphere->GetFogSettings(&density, &r, &g, &b);
    114 
    115  //           if (density > hazeDensity)
    116  //           {
    117  //                   glFogf(GL_FOG_DENSITY, density);
    118 
    119  //                   GLfloat fogColor[4] = {r, g, b, 1.0};
    120  //                   glFogfv(GL_FOG_COLOR, fogColor);
    121 
    122  //                   silverLiningHandledTheFog = true;
    123  //           }
    124  //   }
    125  //   
    126  //   if (!silverLiningHandledTheFog)
    127  //   {
    128  //           GLfloat fogColor[4];
    129  //           //atmosphere->GetHorizonColor(yaw, &fogColor[0], &fogColor[1], &fogColor[2]);     // New version of this call: SL_1.94 /** \todo transmit the yaw value of the center channel to all slaves for consistent fog color. */
    130         //              atmosphere->GetHorizonColor( 0, &fogColor[0], &fogColor[1], &fogColor[2]);
    131  //           glFogfv(GL_FOG_COLOR, fogColor);
    132 
    133  //           glFogf(GL_FOG_DENSITY, hazeDensity);
    134  //   }
    135 
    136 
    137 
    138 
    139 
    140        
    14189        osg::ref_ptr<osg::Fog> fog = new osg::Fog;
    14290    fog->setMode(osg::Fog::EXP);
Note: See TracChangeset for help on using the changeset viewer.