Added setSwapInterval to Display and AWTGLCanvas

This commit is contained in:
Elias Naur 2006-01-01 19:50:06 +00:00
parent 2a9b8de2fb
commit 5faf661f04
10 changed files with 59 additions and 38 deletions

View file

@ -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);