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

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

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

GLFW.glfwSetWindowSizeCallback介绍

[英]Sets the size callback of the specified window, which is called when the window is resized. The callback is provided with the size, in screen coordinates, of the client area of the window.

This function must only be called from the main thread.
[中]设置指定窗口的大小回调,在调整窗口大小时调用该回调。回调提供了窗口的客户端区域的大小(以屏幕坐标为单位)。
只能从主线程调用此函数。

代码示例

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

glfwSetWindowSizeCallback(window, new GLFWWindowSizeCallback() {
  @Override
  public void invoke(final long window, final int width, final int height) {

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

glfwSetWindowSizeCallback(window, windowSizeCallback = new GLFWWindowSizeCallback() {
  @Override
  public void invoke(final long window, final int width, final int height) {

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

glfwSetWindowSizeCallback(window, windowSizeCallback = new GLFWWindowSizeCallback() {
  @Override
  public void invoke(final long window, final int width, final int height) {

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

/** See {@link GLFW#glfwSetWindowSizeCallback SetWindowSizeCallback}. */
public GLFWWindowSizeCallback set(long window) {
  glfwSetWindowSizeCallback(window, this);
  return this;
}

代码示例来源:origin: WarmfulDevelopment/LWJGL-3-Tutorial

private void setLocalCallbacks() {
  windowSizeCallback = new GLFWWindowSizeCallback() {
    @Override
    public void invoke(long argWindow, int argWidth, int argHeight) {
      width = argWidth;
      height = argHeight;
      hasResized = true;
    }
  };
  
  glfwSetWindowSizeCallback(window, windowSizeCallback);
}

代码示例来源:origin: jsettlers/settlers-remake

private void registerCallbacks() {
    GLFW.glfwSetKeyCallback(glfw_wnd, key_callback);
    GLFW.glfwSetMouseButtonCallback(glfw_wnd, mouse_callback);
    GLFW.glfwSetScrollCallback(glfw_wnd, scroll_callback);
    GLFW.glfwSetCursorEnterCallback(glfw_wnd, cursorenter_callback);
    GLFW.glfwSetCursorPosCallback(glfw_wnd, cursorpos_callback);
    GLFW.glfwSetWindowSizeCallback(glfw_wnd, size_callback);
  }
}

代码示例来源:origin: Renanse/Ardor3D

GLFW.glfwSetWindowSizeCallback(_windowId, _resizeCallback = new GLFWWindowSizeCallbackI() {
  @Override
  public void invoke(final long window, final int width, final int height) {

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

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

代码示例来源:origin: org.jmonkeyengine/jme3-lwjgl3

glfwSetWindowSizeCallback(window, windowSizeCallback = new GLFWWindowSizeCallback() {
  @Override
  public void invoke(final long window, final int width, final int height) {

代码示例来源: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());
}

代码示例来源:origin: FedUni/caliko

glfwSetWindowSizeCallback(mWindowId, windowSizeCallback = GLFWWindowSizeCallback.create( (long windowId, int windowWidth,  int windowHeight) ->

相关文章

GLFW类方法