本文整理汇总了Java中org.lwjgl.glfw.Callbacks类的典型用法代码示例。如果您正苦于以下问题:Java Callbacks类的具体用法?Java Callbacks怎么用?Java Callbacks使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Callbacks类属于org.lwjgl.glfw包,在下文中一共展示了Callbacks类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: dispose
import org.lwjgl.glfw.Callbacks; //导入依赖的package包/类
@Override
public void dispose() {
checkMainThread();
if (DBG)
log.debug("window destroy: " + title);
// note: we cannot destroy window as long as the context is acquired (i.e. window is rendering)
contextLock.lock();
Callbacks.glfwFreeCallbacks(window);
GLFW.glfwDestroyWindow(window);
window = 0;
contextLock.unlock();
// XXX not sure if this is what we want in all cases, but for now ok.
if (NUM_WINDOWS.decrementAndGet() == 0)
Platform.get().exit();
}
开发者ID:arisona,项目名称:ether,代码行数:19,代码来源:GLFWWindow.java
示例2: createDisplay
import org.lwjgl.glfw.Callbacks; //导入依赖的package包/类
public static void createDisplay()
{
glfwInit();
glfwSetErrorCallback(errorCallback = Callbacks.errorCallbackPrint(System.err));
glfwWindowHint(GLFW_RESIZABLE, GL_FALSE);
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
window = glfwCreateWindow(width, height, "", 0, 0);
glfwMakeContextCurrent(window);
GLContext.createFromCurrent();
glfwShowWindow(window);
setCursorPosCallback();
setMouseCallback();
setKeyCallback();
if (window == 0) {
throw new RuntimeException("Failed to create window");
}
GL11.glViewport(0, 0, width, height);
}
开发者ID:dantetam,项目名称:civgame,代码行数:25,代码来源:DisplayManager.java
示例3: initGLFWCallbacks
import org.lwjgl.glfw.Callbacks; //导入依赖的package包/类
/**
* Initialize GLFW callbacks
*/
private void initGLFWCallbacks() {
// Set GLFW to output errors to System.err
GLFW.glfwSetErrorCallback(Callbacks.errorCallbackPrint(System.err));
// Setup input callbacks
WINDOW.setCursorPosCallback(Input.cursorPosCallback);
WINDOW.setKeyCallback(Input.keyCallback);
Input.applicationListener = applicationListener;
}
开发者ID:camilne,项目名称:open-world,代码行数:13,代码来源:Application.java
示例4: run
import org.lwjgl.glfw.Callbacks; //导入依赖的package包/类
public void run(){
try{
start();
render();
glfwDestroyWindow(window);
}finally{
Callbacks.glfwFreeCallbacks(window);
glfwTerminate();
}
}
开发者ID:FlyArts,项目名称:NovelJ,代码行数:11,代码来源:Test.java
示例5: closeDisplay
import org.lwjgl.glfw.Callbacks; //导入依赖的package包/类
@Override
public void closeDisplay() {
if (!this.created)
return;
Callbacks.glfwFreeCallbacks(this.windowID);
glfwDestroyWindow(this.windowID);
this.created = false;
}
开发者ID:Guerra24,项目名称:NanoUI,代码行数:9,代码来源:AbstractWindow.java
示例6: destroy
import org.lwjgl.glfw.Callbacks; //导入依赖的package包/类
public void destroy()
{
// Free the window callbacks and destroy the window
Callbacks.glfwFreeCallbacks(this.handle);
GLFW.glfwDestroyWindow(this.handle);
}
开发者ID:andykuo1,项目名称:candlelight,代码行数:7,代码来源:Window.java
示例7: disposeGLFW
import org.lwjgl.glfw.Callbacks; //导入依赖的package包/类
public void disposeGLFW() {
Callbacks.glfwFreeCallbacks(windowID);
GLFW.glfwTerminate();
}
开发者ID:ComunityEngine,项目名称:CommunityEngine-Java,代码行数:5,代码来源:Window.java
示例8: destroy
import org.lwjgl.glfw.Callbacks; //导入依赖的package包/类
public static void destroy()
{
LoggerInternal.log("Destroying window");
Callbacks.glfwFreeCallbacks(nativeId);
glfwDestroyWindow(nativeId);
nativeId = NULL;
}
开发者ID:Snakybo,项目名称:TorchEngine,代码行数:11,代码来源:WindowInternal.java
注:本文中的org.lwjgl.glfw.Callbacks类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论