Performance: Maybe this fixes very big frame times.
This commit is contained in:
parent
742ff1eafc
commit
5610ff7806
@ -148,8 +148,8 @@ public class GameFrame extends JFrame {
|
|||||||
bufferedGraphics.dispose();
|
bufferedGraphics.dispose();
|
||||||
}
|
}
|
||||||
} while (this.bufferStrategy.contentsRestored()); //Redraw in case the VolatileImage was restored
|
} while (this.bufferStrategy.contentsRestored()); //Redraw in case the VolatileImage was restored
|
||||||
this.bufferStrategy.show(); //Show the drawn image
|
|
||||||
} while (this.bufferStrategy.contentsLost()); //Redraw in case the VolatileImage got lost
|
} while (this.bufferStrategy.contentsLost()); //Redraw in case the VolatileImage got lost
|
||||||
|
this.bufferStrategy.show(); //Show the drawn image
|
||||||
Toolkit.getDefaultToolkit().sync(); //Tell the OS to update its graphics of the window.
|
Toolkit.getDefaultToolkit().sync(); //Tell the OS to update its graphics of the window.
|
||||||
this.frameTime = System.nanoTime() - frameStart; //Update frameTime
|
this.frameTime = System.nanoTime() - frameStart; //Update frameTime
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user