Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 11, 2006, 11:22:13 PM (18 years ago)
Author:
patrick
Message:

bsp_model: added antialiasing to the orxonox grpahics engine, activated per default

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/bsp_model/src/lib/graphics/graphics_engine.cc

    r8148 r8322  
    6666
    6767  this->bDisplayFPS = false;
     68  this->bAntialiasing = true;
    6869  this->minFPS = 9999;
    6970  this->maxFPS = 0;
     
    281282  SDL_GL_SetAttribute( SDL_GL_ACCUM_ALPHA_SIZE, 0);
    282283
    283   SDL_GL_SetAttribute(SDL_GL_RED_SIZE, 5);      //Use at least 5 bits of Red
    284   SDL_GL_SetAttribute(SDL_GL_GREEN_SIZE, 5);    //Use at least 5 bits of Green
    285   SDL_GL_SetAttribute(SDL_GL_BLUE_SIZE, 5);     //Use at least 5 bits of Blue
    286   SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 16);   //Use at least 16 bits for the depth buffer
     284  SDL_GL_SetAttribute(SDL_GL_RED_SIZE, 5);      //Use at least 5 bits of Red
     285  SDL_GL_SetAttribute(SDL_GL_GREEN_SIZE, 5);    //Use at least 5 bits of Green
     286  SDL_GL_SetAttribute(SDL_GL_BLUE_SIZE, 5);     //Use at least 5 bits of Blue
     287  SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 16);   //Use at least 16 bits for the depth buffer
    287288  SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);  //Enable double buffering
     289
     290  // enable antialiasing?
     291  if( this->bAntialiasing)
     292  {
     293    SDL_GL_SetAttribute(SDL_GL_MULTISAMPLESAMPLES,4);
     294    SDL_GL_SetAttribute(SDL_GL_MULTISAMPLEBUFFERS,1);
     295  }
    288296
    289297  glEnable(GL_CULL_FACE);
Note: See TracChangeset for help on using the changeset viewer.