本文整理了Java中org.lwjgl.glfw.GLFW.glfwTerminate()
方法的一些代码示例,展示了GLFW.glfwTerminate()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。GLFW.glfwTerminate()
方法的具体详情如下:
包路径:org.lwjgl.glfw.GLFW
类名称:GLFW
方法名:glfwTerminate
[英]Destroys all remaining windows and cursors, restores any modified gamma ramps and frees any other allocated resources. Once this function is called, you must again call #glfwInit successfully before you will be able to use most GLFW functions.
If GLFW has been successfully initialized, this function should be called before the application exits. If initialization fails, there is no need to call this function, as it is called by #glfwInit before it returns failure.
代码示例来源:origin: libgdx/libgdx
private void cleanup() {
Lwjgl3Cursor.disposeSystemCursors();
if (audio instanceof OpenALAudio) {
((OpenALAudio) audio).dispose();
}
errorCallback.free();
errorCallback = null;
if (glDebugCallback != null) {
glDebugCallback.free();
glDebugCallback = null;
}
GLFW.glfwTerminate();
}
代码示例来源:origin: libgdx/libgdx
private void cleanup() {
Lwjgl3Cursor.disposeSystemCursors();
if (audio instanceof OpenALAudio) {
((OpenALAudio) audio).dispose();
}
errorCallback.free();
errorCallback = null;
if (glDebugCallback != null) {
glDebugCallback.free();
glDebugCallback = null;
}
GLFW.glfwTerminate();
}
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
glfwTerminate();
} catch (final Exception ex) {
listener.handleError("Failed to destroy context", ex);
代码示例来源:origin: jsettlers/settlers-remake
public void async_stop() {
GLFW.glfwTerminate();
}
代码示例来源:origin: Renanse/Ardor3D
@Override
public void close() {
GLFW.glfwDestroyWindow(_windowId);
GLFW.glfwTerminate();
}
代码示例来源:origin: Renanse/Ardor3D
@Override
public void close() {
GLFW.glfwDestroyWindow(_windowId);
GLFW.glfwTerminate();
}
代码示例来源:origin: sriharshachilakapati/SilenceEngine
/**
* <p> This function destroys all remaining windows and cursors, restores any modified gamma ramps and frees any
* other allocated resources. Once this function is called, you must again call {@link GLFW3#init()} successfully
* before you will be able to use most GLFW functions.</p>
*
* <p> If GLFW has been successfully initialized, this function should be called before the application exits. If
* initialization fails, there is no need to call this function, as it is called by {@link GLFW3#init()} before it
* returns failure.</p>
*/
public static void terminate()
{
if (!isInitialized())
return;
if (glfwErrorCallback != null)
glfwErrorCallback.free();
if (glfwJoystickCallback != null)
glfwJoystickCallback.free();
glfwTerminate();
initialized = false;
}
代码示例来源:origin: com.badlogicgames.gdx/gdx-backend-lwjgl3
private void cleanup() {
Lwjgl3Cursor.disposeSystemCursors();
if (audio instanceof OpenALAudio) {
((OpenALAudio) audio).dispose();
}
errorCallback.free();
errorCallback = null;
if (glDebugCallback != null) {
glDebugCallback.free();
glDebugCallback = null;
}
GLFW.glfwTerminate();
}
代码示例来源:origin: badlogic/lwjgl3-maven-gradle
public void run() {
System.out.println("Hello LWJGL " + Sys.getVersion() + "!");
try {
init();
loop();
// Release window and window callbacks
glfwDestroyWindow(window);
keyCallback.release();
} finally {
// Terminate GLFW and release the GLFWerrorfun
glfwTerminate();
errorCallback.release();
}
}
代码示例来源:origin: badlogic/lwjgl3-maven-gradle
public void run() {
System.out.println("Hello LWJGL " + Sys.getVersion() + "!");
try {
init();
loop();
// Release window and window callbacks
glfwDestroyWindow(window);
keyCallback.release();
} finally {
// Terminate GLFW and release the GLFWerrorfun
glfwTerminate();
errorCallback.release();
}
}
代码示例来源:origin: FedUni/caliko
/** Destroy the window, finish up glfw and release all callback methods. */
public void cleanup()
{
glfwDestroyWindow(mWindowId);
glfwTerminate();
cursorPosCallback.release();
mouseButtonCallback.release();
windowSizeCallback.release();
keyCallback.release();
errorCallback.release();
}
代码示例来源:origin: playn/playn
@Override protected void loop () {
boolean wasActive = glfwGetWindowAttrib(window, GLFW_VISIBLE) > 0;
while (!glfwWindowShouldClose(window)) {
// notify the app if lose or regain focus (treat said as pause/resume)
boolean newActive = glfwGetWindowAttrib(window, GLFW_VISIBLE) > 0;
if (wasActive != newActive) {
dispatchEvent(lifecycle, wasActive ? Lifecycle.PAUSE : Lifecycle.RESUME);
wasActive = newActive;
}
// process frame, if we don't need to provide true pausing
if (newActive || !config.truePause) {
processFrame();
}
// sleep until it's time for the next frame
glfwSwapBuffers(window);
}
input.shutdown();
graphics.shutdown();
errorCallback.close();
glfwDestroyWindow(window);
glfwTerminate();
}
}
代码示例来源:origin: WarmfulDevelopment/LWJGL-3-Tutorial
glfwTerminate();
内容来源于网络,如有侵权,请联系作者删除!