Exemplo n.º 1
0
 def __igLoop(self):
     if self.renderRequested:
         self.graphicsEngine.renderFrame()
         #self.graphicsEngine.syncFrame()
         #self.graphicsEngine.readyFlip()
         self.graphicsEngine.flipFrame()
         #self.graphicsEngine.openWindows()
         self.renderRequested = False
     else:
         #self.graphicsEngine.flipFrame()
         self.globalClock.tick()
         PStatClient.mainTick()
     throwNewFrame()
Exemplo n.º 2
0
    def run(self):
        while self.running:

            # Manually advance the clock
            now = self.globalClock.getRealTime()
            self.deltaTime = now - self.frameTime
            self.frameTime = now

            self.globalClock.setFrameTime(self.frameTime)
            self.globalClock.setDt(self.deltaTime)
            self.globalClock.setFrameCount(self.frameCount)

            # Tick PStats if we are connected
            PStatClient.mainTick()

            self.preRunFrame()

            self.runFrame()

            self.postRunFrame()

            self.frameCount += 1