mirror of
https://github.com/shadowfacts/lwjgl2-arm64.git
synced 2026-04-12 01:43:58 +00:00
Added setSwapInterval to Display and AWTGLCanvas
This commit is contained in:
parent
2a9b8de2fb
commit
5faf661f04
10 changed files with 59 additions and 38 deletions
|
|
@ -110,13 +110,13 @@ final class MacOSXContextImplementation implements ContextImplementation {
|
|||
}
|
||||
private static native boolean nIsCurrent(ByteBuffer context_handle) throws LWJGLException;
|
||||
|
||||
public void setVSync(boolean enabled) {
|
||||
public void setSwapInterval(int value) {
|
||||
Context current_context = Context.getCurrentContext();
|
||||
synchronized (current_context) {
|
||||
nSetVSync(current_context.getHandle(), enabled);
|
||||
nSetSwapInterval(current_context.getHandle(), value);
|
||||
}
|
||||
}
|
||||
private static native void nSetVSync(ByteBuffer context_handle, boolean enabled);
|
||||
private static native void nSetSwapInterval(ByteBuffer context_handle, int value);
|
||||
|
||||
public void destroy(PeerInfo peer_info, ByteBuffer handle) throws LWJGLException {
|
||||
nDestroy(handle);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue