Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3436 in orxonox.OLD for orxonox/trunk/src/orxonox.cc


Ignore:
Timestamp:
Mar 1, 2005, 6:16:49 PM (20 years ago)
Author:
bensch
Message:

orxonox/trunk: added new Class light, that handles lights (needed for Bump-mapping).
Because Light is very important in 3D, I have created this Class

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/orxonox.cc

    r3398 r3436  
    173173  glClearColor (0.0, 0.0, 0.0, 0.0);
    174174  glEnable (GL_DEPTH_TEST);
    175  
    176   // LIGHTING
    177   GLfloat lmodelAmbient[] = {.1, .1, .1, 1.0};
    178   GLfloat whiteLight[] = {1.0, 1.0, 1.0,1.0};
    179   GLfloat lightPosition[] = {10.0, 10, 19.0, 0.0};
    180 
    181   glLightfv (GL_LIGHT0, GL_DIFFUSE, whiteLight);
    182   glLightfv (GL_LIGHT0, GL_SPECULAR, whiteLight);
    183   glEnable (GL_LIGHTING);
    184   glEnable (GL_LIGHT0);
    185   glEnable (GL_DEPTH_TEST);
    186   glLightfv (GL_LIGHT0, GL_POSITION, lightPosition);
    187   glLightfv (GL_LIGHT0, GL_DIFFUSE, whiteLight);
    188175   
    189   //glEnable (GL_TEXTURE_2D);
    190   //  glEnable(GL_COLOR);
    191   //  glShadeModel(GL_SMOOTH);
    192  
    193   // create camera
    194   //localcamera = new Camera(world); /* \todo camera/input node not used anymore*/
    195  
    196176  return 0;
    197177}
Note: See TracChangeset for help on using the changeset viewer.