Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7568 in orxonox.OLD for branches


Ignore:
Timestamp:
May 10, 2006, 1:50:53 PM (19 years ago)
Author:
hdavid
Message:

/branches/atmospheric_engine: extension available check with glew

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

Legend:

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

    r7561 r7568  
    5353{
    5454  PRINTF(0)("Initalize VolFogEffect\n");
     55 
     56  if (glewInit() == GLEW_OK)
     57    PRINTF(0)("glewInit OK\n");
     58  else
     59    PRINTF(0)("glewInit failed\n");
    5560
    5661  // Set fog color
     
    7277  // glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
    7378
    74   // *********************************************
    75 
    76   char extensions[ 16384 ];
    77   char Extension_Name[] = "GL_EXT_fog_coord";
    78   char *buf;
    79 
    80   sprintf( extensions, "%s", (char *)glGetString( GL_EXTENSIONS ) );
    81   buf = strtok( extensions, " " );
    82   while( buf != NULL )
     79  if (glewGetExtension("GL_EXT_fog_coord"))
    8380  {
    84     if( !strcmp( Extension_Name, buf ) )
    85     {
    86       PRINTF(0)( "%s found, great.\n", Extension_Name );
    87       return true;
    88     }
    89     buf = strtok( NULL, " " );
     81    PRINTF(0)("GL_EXT_fog_coord extension found\n");
     82    return true;
    9083  }
    91 
    92   PRINTF(0)( "%s\n", (char *)glGetString( GL_EXTENSIONS ) );
    93   PRINTF(0)( "%s not found.\n", Extension_Name );
    94   return false;
     84  else
     85  {
     86    PRINTF(0)("GL_EXT_fog_coord extension NOT found\n");
     87    return false;
     88  }
    9589}
    9690
     
    117111        glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
    118112
    119         glEnable(GL_BLEND);
    120         glBlendFunc(GL_SRC_ALPHA, GL_DST_ALPHA);
     113        //glEnable(GL_BLEND);
     114        //glBlendFunc(GL_SRC_ALPHA, GL_DST_ALPHA);
    121115
    122116        //glLoadIdentity ();    // Reset The Modelview Matrix
  • branches/atmospheric_engine/src/lib/graphics/effects/volfog_effect.h

    r7557 r7568  
    99
    1010#include "weather_effect.h"
    11 
    12 // Variables Necessary For FogCoordfEXT
    13 #define GL_FOG_COORDINATE_SOURCE_EXT  0x8450
    14 #define GL_FOG_COORDINATE_EXT         0x8451
    1511
    1612class VolFogEffect : public WeatherEffect
Note: See TracChangeset for help on using the changeset viewer.