|
From: <eli...@us...> - 2008-01-19 08:49:13
|
Revision: 2932
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=2932&view=rev
Author: elias_naur
Date: 2008-01-19 00:49:10 -0800 (Sat, 19 Jan 2008)
Log Message:
-----------
Removed OS message polls from mouse and keyboard poll() and read(), since they can be quite expensive
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java
trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDisplay.java
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java 2008-01-18 10:29:01 UTC (rev 2931)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java 2008-01-19 08:49:10 UTC (rev 2932)
@@ -693,7 +693,6 @@
}
public void pollMouse(IntBuffer coord_buffer, ByteBuffer buttons) {
- update();
lockAWT();
try {
mouse.poll(grab, coord_buffer, buttons);
@@ -703,7 +702,6 @@
}
public void readMouse(ByteBuffer buffer) {
- update();
lockAWT();
try {
mouse.read(buffer);
@@ -865,7 +863,6 @@
}
public void pollKeyboard(ByteBuffer keyDownBuffer) {
- update();
lockAWT();
try {
keyboard.poll(keyDownBuffer);
@@ -875,7 +872,6 @@
}
public void readKeyboard(ByteBuffer buffer) {
- update();
lockAWT();
try {
keyboard.read(buffer);
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDisplay.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDisplay.java 2008-01-18 10:29:01 UTC (rev 2931)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDisplay.java 2008-01-19 08:49:10 UTC (rev 2932)
@@ -354,7 +354,7 @@
/**
* WORKAROUND:
* Making the context current (redundantly) when the window
- * is maximized helps some gfx recover from fullscreen
+ * is maximized helps some gfx cards recover from fullscreen
*/
try {
if (Display.getDrawable().getContext() != null && Display.getDrawable().getContext().isCurrent())
@@ -393,12 +393,10 @@
}
public void pollMouse(IntBuffer coord_buffer, ByteBuffer buttons) {
- update();
mouse.poll(coord_buffer, buttons);
}
public void readMouse(ByteBuffer buffer) {
- update();
mouse.read(buffer);
}
@@ -481,12 +479,10 @@
}
public void pollKeyboard(ByteBuffer keyDownBuffer) {
- update();
keyboard.poll(keyDownBuffer);
}
public void readKeyboard(ByteBuffer buffer) {
- update();
keyboard.read(buffer);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|