From: Elias N. <eli...@us...> - 2002-11-25 17:04:59
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl In directory sc8-pr-cvs1:/tmp/cvs-serv21735/java/org/lwjgl/opengl Modified Files: BaseGL.java Log Message: Added releaseContext to BaseGL.java (and native for linux) Index: BaseGL.java CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/BaseGL.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/BaseGL.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- BaseGL.java 23 Aug 2002 16:14:10 -0000 1.5 +++ BaseGL.java 25 Nov 2002 17:04:56 -0000 1.6 @@ -166,6 +166,16 @@ } /** + * 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. */ public final void makeCurrent() { @@ -180,6 +190,11 @@ */ public native void swapBuffers(); + /** + * Native method to free the context + */ + private native void nReleaseContext(); + /** * Native method to make this the current thread */ |