org.lwjgl.glfw.GLFWCursorPosCallback.free()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(1.9k)|赞(0)|评价(0)|浏览(63)

本文整理了Java中org.lwjgl.glfw.GLFWCursorPosCallback.free()方法的一些代码示例,展示了GLFWCursorPosCallback.free()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。GLFWCursorPosCallback.free()方法的具体详情如下:
包路径:org.lwjgl.glfw.GLFWCursorPosCallback
类名称:GLFWCursorPosCallback
方法名:free

GLFWCursorPosCallback.free介绍

暂无

代码示例

代码示例来源:origin: libgdx/libgdx

@Override
public void dispose() {
  keyCallback.free();
  charCallback.free();
  scrollCallback.free();
  cursorPosCallback.free();
  mouseButtonCallback.free();
}

代码示例来源:origin: libgdx/libgdx

@Override
public void dispose() {
  keyCallback.free();
  charCallback.free();
  scrollCallback.free();
  cursorPosCallback.free();
  mouseButtonCallback.free();
}

代码示例来源:origin: jMonkeyEngine/jmonkeyengine

@Override
public void destroy() {
  if (!context.isRenderable()) {
    return;
  }
  
  cursorPosCallback.free();
  scrollCallback.free();
  mouseButtonCallback.free();
  
  for (long glfwCursor : jmeToGlfwCursorMap.values()) {
    glfwDestroyCursor(glfwCursor);
  }
  logger.fine("Mouse destroyed.");
}

代码示例来源:origin: com.badlogicgames.gdx/gdx-backend-lwjgl3

@Override
public void dispose() {
  keyCallback.free();
  charCallback.free();
  scrollCallback.free();
  cursorPosCallback.free();
  mouseButtonCallback.free();
}

代码示例来源:origin: sriharshachilakapati/SilenceEngine

/**
 * This method releases the native callbacks, preventing the occurrence of segmentation fault errors from the JNI
 * code, which usually occurs due to the function address not being cleared from the native code. Releasing these
 * callbacks erases the function address, so it can't be called again.
 */
private void releaseNativeCallbacks()
{
  glfwCharCallback.free();
  glfwCharModsCallback.free();
  glfwCursorEnterCallback.free();
  glfwCursorPosCallback.free();
  glfwDropCallback.free();
  glfwFramebufferSizeCallback.free();
  glfwKeyCallback.free();
  glfwMouseButtonCallback.free();
  glfwScrollCallback.free();
  glfwWindowCloseCallback.free();
  glfwWindowFocusCallback.free();
  glfwWindowIconifyCallback.free();
  glfwWindowPosCallback.free();
  glfwWindowRefreshCallback.free();
  glfwWindowSizeCallback.free();
}

相关文章

微信公众号

最新文章

更多