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

x33g5p2x  于2022-01-19 转载在 其他  
字(4.4k)|赞(0)|评价(0)|浏览(123)

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

GLFW.glfwSetWindowRefreshCallback介绍

[英]Sets the refresh callback of the specified window, which is called when the client area of the window needs to be redrawn, for example if the window has been exposed after having been covered by another window.

On compositing window systems such as Aero, Compiz or Aqua, where the window contents are saved off-screen, this callback may be called only very infrequently or never at all.

This function must only be called from the main thread.
[中]设置指定窗口的刷新回调,该回调在需要重新绘制窗口的客户端区域时调用,例如,如果该窗口在被另一个窗口覆盖后已公开。
在Aero、Compiz或Aqua等合成窗口系统上,窗口内容保存在屏幕外,此回调可能很少调用,或者根本不会调用。
只能从主线程调用此函数。

代码示例

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

void create(long windowHandle) {
  this.windowHandle = windowHandle;
  this.input = new Lwjgl3Input(this);
  this.graphics = new Lwjgl3Graphics(this);
  GLFW.glfwSetWindowFocusCallback(windowHandle, focusCallback);
  GLFW.glfwSetWindowIconifyCallback(windowHandle, iconifyCallback);
  GLFW.glfwSetWindowMaximizeCallback(windowHandle, maximizeCallback);
  GLFW.glfwSetWindowCloseCallback(windowHandle, closeCallback);
  GLFW.glfwSetDropCallback(windowHandle, dropCallback);
  GLFW.glfwSetWindowRefreshCallback(windowHandle, refreshCallback);
  if (windowListener != null) {
    windowListener.created(this);
  }
}

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

void create(long windowHandle) {
  this.windowHandle = windowHandle;
  this.input = new Lwjgl3Input(this);
  this.graphics = new Lwjgl3Graphics(this);
  GLFW.glfwSetWindowFocusCallback(windowHandle, focusCallback);
  GLFW.glfwSetWindowIconifyCallback(windowHandle, iconifyCallback);
  GLFW.glfwSetWindowMaximizeCallback(windowHandle, maximizeCallback);
  GLFW.glfwSetWindowCloseCallback(windowHandle, closeCallback);
  GLFW.glfwSetDropCallback(windowHandle, dropCallback);
  GLFW.glfwSetWindowRefreshCallback(windowHandle, refreshCallback);
  if (windowListener != null) {
    windowListener.created(this);
  }
}

代码示例来源:origin: org.lwjgl.osgi/org.lwjgl.glfw

/** See {@link GLFW#glfwSetWindowRefreshCallback SetWindowRefreshCallback}. */
public GLFWWindowRefreshCallback set(long window) {
  glfwSetWindowRefreshCallback(window, this);
  return this;
}

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

void create(long windowHandle) {
  this.windowHandle = windowHandle;
  this.input = new Lwjgl3Input(this);
  this.graphics = new Lwjgl3Graphics(this);
  GLFW.glfwSetWindowFocusCallback(windowHandle, focusCallback);
  GLFW.glfwSetWindowIconifyCallback(windowHandle, iconifyCallback);
  GLFW.glfwSetWindowMaximizeCallback(windowHandle, maximizeCallback);
  GLFW.glfwSetWindowCloseCallback(windowHandle, closeCallback);
  GLFW.glfwSetDropCallback(windowHandle, dropCallback);
  GLFW.glfwSetWindowRefreshCallback(windowHandle, refreshCallback);
  if (windowListener != null) {
    windowListener.created(this);
  }
}

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

glfwSetWindowIconifyCallback(handle, glfwWindowIconifyCallback);
glfwSetWindowPosCallback(handle, glfwWindowPosCallback);
glfwSetWindowRefreshCallback(handle, glfwWindowRefreshCallback);
glfwSetWindowSizeCallback(handle, glfwWindowSizeCallback);

代码示例来源:origin: SpinyOwl/legui

/**
 * Used to bind callbacks to OpenGL window. This method could be called only from main thread (Main OpenGL thread).
 *
 * @param window window to bind.
 * @param keeper callback keeper with callbacks.
 */
static void registerCallbacks(long window, CallbackKeeper keeper) {
  glfwSetCharCallback(window, keeper.getChainCharCallback());
  glfwSetDropCallback(window, keeper.getChainDropCallback());
  glfwSetKeyCallback(window, keeper.getChainKeyCallback());
  glfwSetScrollCallback(window, keeper.getChainScrollCallback());
  glfwSetCharModsCallback(window, keeper.getChainCharModsCallback());
  glfwSetCursorEnterCallback(window, keeper.getChainCursorEnterCallback());
  glfwSetFramebufferSizeCallback(window, keeper.getChainFramebufferSizeCallback());
  glfwSetMouseButtonCallback(window, keeper.getChainMouseButtonCallback());
  glfwSetCursorPosCallback(window, keeper.getChainCursorPosCallback());
  glfwSetWindowCloseCallback(window, keeper.getChainWindowCloseCallback());
  glfwSetWindowFocusCallback(window, keeper.getChainWindowFocusCallback());
  glfwSetWindowIconifyCallback(window, keeper.getChainWindowIconifyCallback());
  glfwSetWindowPosCallback(window, keeper.getChainWindowPosCallback());
  glfwSetWindowRefreshCallback(window, keeper.getChainWindowRefreshCallback());
  glfwSetWindowSizeCallback(window, keeper.getChainWindowSizeCallback());
}

相关文章

GLFW类方法