mirror of
https://github.com/shadowfacts/lwjgl2-arm64.git
synced 2026-04-05 14:35:58 +00:00
Ported OpenGL to Buffers
This commit is contained in:
parent
2305247ac1
commit
315375dee5
116 changed files with 9348 additions and 9020 deletions
|
|
@ -214,9 +214,6 @@ public class Keyboard {
|
|||
/** The keys status from the last poll */
|
||||
private static final ByteBuffer keyDownBuffer = ByteBuffer.allocateDirect(256);
|
||||
|
||||
/** Address of the keyDown buffer */
|
||||
private static final int keyDownAddress = Sys.getDirectBufferAddress(keyDownBuffer);
|
||||
|
||||
/**
|
||||
* The key events from the last read: a sequence of pairs of key number,
|
||||
* followed by state. If translation is enabled, the state is followed by
|
||||
|
|
@ -310,7 +307,7 @@ public class Keyboard {
|
|||
*/
|
||||
public static void poll() {
|
||||
assert created : "The keyboard has not been created.";
|
||||
nPoll(keyDownAddress);
|
||||
nPoll(keyDownBuffer);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -319,7 +316,7 @@ public class Keyboard {
|
|||
* @param keyDownBufferAddress the address of a 256-byte buffer to place
|
||||
* key states in.
|
||||
*/
|
||||
private static native void nPoll(int keyDownBufferAddress);
|
||||
private static native void nPoll(ByteBuffer keyDownBuffer);
|
||||
|
||||
/**
|
||||
* Reads the keyboard buffer.
|
||||
|
|
@ -427,4 +424,4 @@ public class Keyboard {
|
|||
} else
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue