Added Display.releaseContext()
This commit is contained in:
parent
196471a968
commit
9ccb31416e
|
@ -592,7 +592,20 @@ public final class Display {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Make the Display the current rendering context for GL calls. Also initialize native stubs.
|
* Release the Display context.
|
||||||
|
*
|
||||||
|
* @throws LWJGLException If the context could not be released
|
||||||
|
*/
|
||||||
|
public void releaseContext() throws LWJGLException {
|
||||||
|
if (!isCreated())
|
||||||
|
throw new IllegalStateException("No window created to make current");
|
||||||
|
if (context.isCurrent())
|
||||||
|
Context.releaseCurrentContext();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Make the Display the current rendering context for GL calls.
|
||||||
|
*
|
||||||
* @throws LWJGLException If the context could not be made current
|
* @throws LWJGLException If the context could not be made current
|
||||||
*/
|
*/
|
||||||
public static void makeCurrent() throws LWJGLException {
|
public static void makeCurrent() throws LWJGLException {
|
||||||
|
|
Loading…
Reference in New Issue