Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3338 in orxonox.OLD for orxonox/branches/parenting/src/orxonox.cc


Ignore:
Timestamp:
Jan 5, 2005, 4:13:50 AM (21 years ago)
Author:
patrick
Message:

orxonox/branches/parenting: implemented a simple LoadScreen that just displays a bmp image (format will change - not important yet). You must copy a bmp file to the src directory to see the effect. if there is no bmp file, the LoadScreen won't appear. I have made a little bmp, that can be found on the server

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/parenting/src/orxonox.cc

    r3336 r3338  
    115115  // Set video mode
    116116  // TO DO: parse arguments for settings
    117   SDL_GL_SetAttribute(SDL_GL_RED_SIZE, 5);
    118   SDL_GL_SetAttribute(SDL_GL_GREEN_SIZE, 5);
    119   SDL_GL_SetAttribute(SDL_GL_BLUE_SIZE, 5);
    120   SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 16);
    121  
     117  //SDL_GL_SetAttribute(SDL_GL_RED_SIZE, 5);
     118  //SDL_GL_SetAttribute(SDL_GL_GREEN_SIZE, 5);
     119  //SDL_GL_SetAttribute(SDL_GL_BLUE_SIZE, 5);
     120  //SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 16);
     121 
     122
     123  SDL_GL_SetAttribute( SDL_GL_DOUBLEBUFFER, 1 );   
     124  SDL_GL_SetAttribute( SDL_GL_DEPTH_SIZE, 16);   
     125  SDL_GL_SetAttribute( SDL_GL_STENCIL_SIZE, 0); 
     126  SDL_GL_SetAttribute( SDL_GL_ACCUM_RED_SIZE, 0);
     127  SDL_GL_SetAttribute( SDL_GL_ACCUM_GREEN_SIZE, 0);
     128  SDL_GL_SetAttribute( SDL_GL_ACCUM_BLUE_SIZE, 0);
     129  SDL_GL_SetAttribute( SDL_GL_ACCUM_ALPHA_SIZE, 0);
     130
     131
     132
    122133  int bpp = 16;
    123134  int width = 640;
     
    138149  if( videoInfo->hw_available)
    139150    videoFlags |= SDL_HWSURFACE;
    140   else
     151  else 
    141152    videoFlags |= SDL_SWSURFACE;
    142153  /*
     
    153164 
    154165  // Set window labeling
    155   SDL_WM_SetCaption("Orxonox " PACKAGE_VERSION, "Orxonox " PACKAGE_VERSION);
     166  SDL_WM_SetCaption ("Orxonox " PACKAGE_VERSION, "Orxonox " PACKAGE_VERSION);
    156167 
    157168  // TO DO: Create a cool icon and use it here
     
    159170
    160171  // OpenGL stuff
    161   glClearColor(0.0, 0.0, 0.0, 0.0);
    162   glEnable(GL_DEPTH_TEST);
     172  glClearColor (0.0, 0.0, 0.0, 0.0);
     173  glEnable (GL_DEPTH_TEST);
    163174 
    164175  // LIGHTING
     
    167178  GLfloat lightPosition[] = {10.0, 10, 19.0, 0.0};
    168179
    169   glLightfv(GL_LIGHT0, GL_DIFFUSE, whiteLight);
    170   glLightfv(GL_LIGHT0, GL_SPECULAR, whiteLight);
    171   glEnable(GL_LIGHTING);
    172   glEnable(GL_LIGHT0);
    173   glEnable(GL_DEPTH_TEST);
    174   glLightfv(GL_LIGHT0, GL_POSITION, lightPosition);
    175   glLightfv(GL_LIGHT0, GL_DIFFUSE, whiteLight);
     180  glLightfv (GL_LIGHT0, GL_DIFFUSE, whiteLight);
     181  glLightfv (GL_LIGHT0, GL_SPECULAR, whiteLight);
     182  glEnable (GL_LIGHTING);
     183  glEnable (GL_LIGHT0);
     184  glEnable (GL_DEPTH_TEST);
     185  glLightfv (GL_LIGHT0, GL_POSITION, lightPosition);
     186  glLightfv (GL_LIGHT0, GL_DIFFUSE, whiteLight);
    176187   
     188  glEnable (GL_TEXTURE_2D);
    177189  //  glEnable(GL_COLOR);
    178190  //  glShadeModel(GL_SMOOTH);
Note: See TracChangeset for help on using the changeset viewer.