Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 1883 in orxonox.OLD for orxonox/trunk/core/orxonox.cc


Ignore:
Timestamp:
May 10, 2004, 12:36:58 AM (21 years ago)
Author:
patrick
Message:

orxonox/trunk: added envoronment eg. little mountain - its time to talk about further development…

File:
1 edited

Legend:

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

    r1879 r1883  
    2626/* class definition header */
    2727#include "orxonox.h"
     28#include "environment.h"
    2829
    2930
     
    7071{
    7172  glutInit(&argc, argv);
    72   glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB);
     73  glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH);
     74  glEnable(GL_DEPTH_TEST);
    7375  glutInitWindowSize(500, 500);
    7476  //glutFullScreen();
     
    9395  glClearColor(0.0, 0.0, 0.0, 0.0);
    9496  world = new World;
     97  (*world).initEnvironement();
    9598  Player* localPlayer = new Player;
    9699  io = new InputOutput(world, localPlayer);
    97100  (*world).addPlayer(localPlayer);
    98   //  (*localPlayer).addIO(io);
    99 
    100   //glutIgnoreKeyRepeat(1);                 /* for win32 */
    101   //glutSetKeyRepeat(GLUT_KEY_REPEAT_OFF);  /* for linux X11 */
     101  Environment *env = new Environment;
     102  (*world).addEnv(env);
     103 
     104
    102105  glutSpecialFunc(specFunc);
    103106  glutSpecialUpFunc(releaseKey);
     
    144147    break;
    145148  case 27:
     149  case 'q':
    146150    quitGame();
    147151    break;
     
    208212void Orxonox::display()
    209213{
    210   glClear(GL_COLOR_BUFFER_BIT);
     214  glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
    211215
    212216  glColor3f(0.0, 0.5, 0.6);
Note: See TracChangeset for help on using the changeset viewer.