Moved stuff around
parent
804dc2471e
commit
2af1a71ab5
|
@ -71,6 +71,7 @@ public class Litecraft extends Game
|
|||
@Override
|
||||
public void render()
|
||||
{
|
||||
<<<<<<< Upstream, based on branch 'liteCraft' of https://github.com/halotroop/Ginger3D.git
|
||||
fps += 1; // This section updates the debug stats once per real-time second, regardless of how many frames have been rendered
|
||||
if (System.currentTimeMillis() > frameTimer + 1000)
|
||||
{
|
||||
|
@ -83,6 +84,10 @@ public class Litecraft extends Game
|
|||
/**
|
||||
* And now, the actual rendering:
|
||||
*/
|
||||
=======
|
||||
fps+=1;
|
||||
updateDebugStats();
|
||||
>>>>>>> 4b249f6 Moved stuff around
|
||||
// Render shadows
|
||||
GingerRegister.getInstance().masterRenderer.renderShadowMap(data.entities, data.lights.get(0));
|
||||
// If there's a world, render it!
|
||||
|
@ -93,9 +98,24 @@ public class Litecraft extends Game
|
|||
Window.swapBuffers();
|
||||
}
|
||||
|
||||
// Updates the debug stats once per real-time second, regardless of how many frames have been rendered
|
||||
private void updateDebugStats()
|
||||
{
|
||||
if (System.currentTimeMillis() > frameTimer + 1000)
|
||||
{
|
||||
this.dbgStats.set(fps, ups, tps, threadWaitlist);
|
||||
this.fps=0;
|
||||
this.ups=0;
|
||||
this.tps=0;
|
||||
this.frameTimer += 1000;
|
||||
}
|
||||
}
|
||||
|
||||
public void update()
|
||||
{
|
||||
Input.invokeAllListeners();
|
||||
data.player.updateMovement();
|
||||
data.camera.updateMovement();
|
||||
}
|
||||
|
||||
private void setupConstants()
|
||||
|
|
|
@ -134,8 +134,6 @@ public class Ginger
|
|||
public void update(GameData data)
|
||||
{
|
||||
registry.game.update();
|
||||
data.player.updateMovement();
|
||||
data.camera.updateMovement();
|
||||
picker.update();
|
||||
GingerUtils.update();
|
||||
ParticleMaster.update(data.camera);
|
||||
|
|
Loading…
Reference in New Issue