Added releaseContext to BaseGL.java (and native for linux)

This commit is contained in:
Elias Naur 2002-11-25 17:04:56 +00:00
parent c13797bae2
commit 139e7b4cfb
3 changed files with 39 additions and 3 deletions

View file

@ -165,6 +165,16 @@ abstract class BaseGL {
destroy();
}
/**
* Free the context from the current thread.
*/
public final void releaseContext() {
assert created : "GL has not been created yet.";
renderThread = null;
currentContext = null;
nReleaseContext();
}
/**
* Make this the current context for the current thread.
*/
@ -180,6 +190,11 @@ abstract class BaseGL {
*/
public native void swapBuffers();
/**
* Native method to free the context
*/
private native void nReleaseContext();
/**
* Native method to make this the current thread
*/