~amacleod/game/functional-test-convenience

« back to all changes in this revision

Viewing changes to game/environment.py

Use OpenGL VBOs to render terrain, rather than a long, slow series of glVertex3f calls.

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
from twisted.internet.task import LoopingCall, Clock
8
8
 
9
9
from game.player import Player
 
10
from game.terrain import Terrain
10
11
 
11
12
 
12
13
class SimulationTime(Clock):
40
41
        Clock.__init__(self)
41
42
        self.granularity = granularity
42
43
        self.platformClock = platformClock
43
 
        self.terrain = {}
44
 
 
45
 
 
46
 
    def setTerrain(self, terrain):
47
 
        """
48
 
        Replace the existing terrain with the given new terrain.
49
 
        """
50
 
        self.terrain = terrain
 
44
        self.terrain = Terrain()
51
45
 
52
46
 
53
47
    def _update(self, frames):