|
From: <eli...@us...> - 2008-05-30 07:08:16
|
Revision: 3085
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3085&view=rev
Author: elias_naur
Date: 2008-05-30 00:08:14 -0700 (Fri, 30 May 2008)
Log Message:
-----------
Removed dead code from Display
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/opengl/Display.java
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/Display.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/Display.java 2008-05-30 06:53:33 UTC (rev 3084)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/Display.java 2008-05-30 07:08:14 UTC (rev 3085)
@@ -390,61 +390,9 @@
}
}
- /**
- * Synchronize the display to a capped frame rate. Note that we are being "smart" about the
- * desired results in our implementation; we automatically subtract 1 from the desired framerate
- * to prevent just missing the frame time if vsync is set.
- * @param fps The desired frame rate, in frames per second
- */
-/* public static void sync3(int fps) {
- long savedTimeThen;
- long timeNow;
- synchronized (GlobalLock.lock) {
- timeNow = Sys.getTime();
- savedTimeThen = timeThen;
- timeThen = timeNow;
- }
- float frameTime = 1.0f / (fps > 1 ? fps - 1 : 1);
- while (timeNow > savedTimeThen && (float) (timeNow - savedTimeThen) / (float) Sys.getTimerResolution() < frameTime) {
- // This is a system-friendly way of allowing other stuff to use CPU if it wants to
- Thread.yield();
- timeNow = Sys.getTime();
- }
- }
-*/
private static long timeLate;
/**
- * Alternative sync method which works better on triple-buffered GL displays.
- *
- * @param fps The desired frame rate, in frames per second
- */
-/* public static void sync2(int fps) {
- long timeNow;
- long gapTo;
- long savedTimeLate;
- synchronized (GlobalLock.lock) {
- gapTo = Sys.getTimerResolution() / fps + timeThen;
- timeNow = Sys.getTime();
- savedTimeLate = timeLate;
- }
-
- while (gapTo > timeNow + savedTimeLate) {
- Thread.yield();
- timeNow = Sys.getTime();
- }
-
- synchronized (GlobalLock.lock) {
- if (gapTo < timeNow)
- timeLate = timeNow - gapTo;
- else
- timeLate = 0;
-
- timeThen = timeNow;
- }
- }
-*/
- /**
* Best sync method that works reliably.
*
* @param fps The desired frame rate, in frames per second
@@ -478,21 +426,6 @@
}
/**
- * @return the X coordinate of the window (always 0 for fullscreen)
- */
- /*public static int getX() {
- return (fullscreen) ? 0 : x;
- }*/
-
- /**
- * @return the Y coordinate of the window (always 0 for fullscreen)
- */
- /*public static int getY() {
- return (fullscreen) ? 0 : y;
- }*/
-
-
- /**
* @return the title of the window
*/
public static String getTitle() {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|