mirror of
https://github.com/shadowfacts/lwjgl2-arm64.git
synced 2026-04-04 22:17:59 +00:00
Added releaseContext to BaseGL.java (and native for linux)
This commit is contained in:
parent
c13797bae2
commit
139e7b4cfb
3 changed files with 39 additions and 3 deletions
|
|
@ -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
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue