Mac OS X: Added a workaround for the 'white screen' problem

This commit is contained in:
Elias Naur 2005-04-28 12:55:23 +00:00
parent 2cd1e740ee
commit 019a1418c6
3 changed files with 53 additions and 1 deletions

View file

@ -81,6 +81,18 @@ final class MacOSXContextImplementation implements ContextImplementation {
private static native void clearDrawable(ByteBuffer handle) throws LWJGLException;
static void resetView(PeerInfo peer_info, Context context) throws LWJGLException {
ByteBuffer peer_handle = peer_info.lockAndGetHandle();
try {
synchronized (context) {
clearDrawable(context.getHandle());
setView(peer_handle, context.getHandle());
}
} finally {
peer_info.unlock();
}
}
public void makeCurrent(PeerInfo peer_info, ByteBuffer handle) throws LWJGLException {
ByteBuffer peer_handle = peer_info.lockAndGetHandle();
try {