Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 1879 in orxonox.OLD for orxonox/trunk/core/world.cc


Ignore:
Timestamp:
May 8, 2004, 1:12:33 PM (20 years ago)
Author:
patrick
Message:

orxonox/trunk: perspective view, key-repeat bug fixed

File:
1 edited

Legend:

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

    r1872 r1879  
    117117   \brief Draws the World and all Objects contained
    118118   
    119    Calls the draw function of all: Objects, Players, Environement
     119   Calls the draw function of all: Objects, Players, Environement. This is the core of all graphics here.
    120120*/
    121121void World::drawWorld(void)
    122122{
     123  /* first draw all players */
    123124  playerList* tmpPlayer = lastPlayer;
    124125  Player* player = tmpPlayer->player;
     
    128129      tmpPlayer = tmpPlayer->next;
    129130    }
     131  /* second draw all npcs */
    130132  npcList* tmpNPC = lastNPC;
    131133  while( tmpNPC != null )
     
    134136      tmpNPC = tmpNPC->next;
    135137    }
     138  /* now draw the rest of the world: environement */
     139  glColor3f(0.0, 1.0, 0.0);
     140  glBegin(GL_LINES);
     141  glVertex3f(0.0, -10.0, 0.0);
     142  glVertex3f(0.0, 200.0, 0.0);
     143
     144  glVertex3f(5.0, -10.0, 0.0);
     145  glVertex3f(5.0, 200.0, 0.0);
     146
     147  glVertex3f(-5.0, -10.0, 0.0);
     148  glVertex3f(-5.0, 200.0, 0.0);
     149
     150  glVertex3f(10.0, -10.0, 0.0);
     151  glVertex3f(10.0, 200.0, 0.0);
     152
     153  glVertex3f(-10.0, -10.0, 0.0);
     154  glVertex3f(-10.0, 200.0, 0.0);
     155
     156  glVertex3f(15.0, -10.0, 0.0);
     157  glVertex3f(15.0, 200.0, 0.0);
     158
     159  glVertex3f(-15.0, -10.0, 0.0);
     160  glVertex3f(-15.0, 200.0, 0.0);
     161
     162  glVertex3f(20.0, -10.0, 0.0);
     163  glVertex3f(20.0, 200.0, 0.0);
     164
     165  glVertex3f(-20.0, -10.0, 0.0);
     166  glVertex3f(-20.0, 200.0, 0.0);
     167
     168  glVertex3f(25.0, -10.0, 0.0);
     169  glVertex3f(25.0, 200.0, 0.0);
     170
     171  glVertex3f(-25.0, -10.0, 0.0);
     172  glVertex3f(-25.0, 200.0, 0.0);
     173  glEnd();
     174
     175
    136176}
    137177
Note: See TracChangeset for help on using the changeset viewer.