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

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

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

GLFW.glfwPollEvents介绍

[英]Processes all pending events.

This function processes only those events that are already in the event queue and then returns immediately. Processing events will cause the window and input callbacks associated with those events to be called.

On some platforms, a window move, resize or menu operation will cause event processing to block. This is due to how event processing is designed on those platforms. You can use the window refresh callback to redraw the contents of your window when necessary during such operations.

On some platforms, certain events are sent directly to the application without going through the event queue, causing callbacks to be called outside of a call to one of the event processing functions.

Event processing is not required for joystick input to work.

Note
  • This function must only be called from the main thread.
  • This function must not be called from a callback.
    [中]处理所有挂起的事件。
    此函数仅处理事件队列中已存在的事件,然后立即返回。处理事件将导致调用与这些事件关联的窗口和输入回调。
    在某些平台上,窗口移动、调整大小或菜单操作将导致事件处理阻塞。这是由于在这些平台上如何设计事件处理。在此类操作期间,如果需要,可以使用{$0$}重新绘制窗口的内容。
    在某些平台上,某些事件直接发送到应用程序,而不经过事件队列,从而导致在调用某个事件处理函数之外调用回调。
    操纵杆输入工作不需要事件处理。
    #####注
    *只能从主线程调用此函数。
    *不能从回调调用此函数。

代码示例

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

glfwPollEvents();

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

glfwPollEvents();

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

GLFW.glfwPollEvents();

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

GLFW.glfwPollEvents();

代码示例来源:origin: lwjglgamedev/lwjglbook

public void update() {
    glfwSwapBuffers(windowHandle);
    glfwPollEvents();
  }
}

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

public void update() {
  hasResized = false;
  input.update();
  glfwPollEvents();
}

代码示例来源:origin: lwjglgamedev/lwjglbook

public void update() {
    glfwSwapBuffers(windowHandle);
    glfwPollEvents();
  }
}

代码示例来源:origin: lwjglgamedev/lwjglbook

public void update() {
    glfwSwapBuffers(windowHandle);
    glfwPollEvents();
  }
}

代码示例来源:origin: lwjglgamedev/lwjglbook

public void update() {
    glfwSwapBuffers(windowHandle);
    glfwPollEvents();
  }
}

代码示例来源:origin: lwjglgamedev/lwjglbook

public void update() {
    glfwSwapBuffers(windowHandle);
    glfwPollEvents();
  }
}

代码示例来源:origin: lwjglgamedev/lwjglbook

public void update() {
  glfwSwapBuffers(windowHandle);
  glfwPollEvents();
}

代码示例来源:origin: lwjglgamedev/lwjglbook

public void update() {
  glfwSwapBuffers(windowHandle);
  glfwPollEvents();
}

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

@Override void update() {
 glfwPollEvents();
 super.update();
}

代码示例来源:origin: lwjglgamedev/lwjglbook

public void update() {
    glfwSwapBuffers(windowHandle);
    glfwPollEvents();
  }
}

代码示例来源:origin: lwjglgamedev/lwjglbook

public void update() {
    glfwSwapBuffers(windowHandle);
    glfwPollEvents();
  }
}

代码示例来源:origin: lwjglgamedev/lwjglbook

public void update() {
    glfwSwapBuffers(windowHandle);
    glfwPollEvents();
  }
}

代码示例来源:origin: lwjglgamedev/lwjglbook

public void update() {
    glfwSwapBuffers(windowHandle);
    glfwPollEvents();
  }
}

代码示例来源:origin: lwjglgamedev/lwjglbook

public void update() {
    glfwSwapBuffers(windowHandle);
    glfwPollEvents();
  }
}

代码示例来源:origin: lwjglgamedev/lwjglbook

public void update() {
    glfwSwapBuffers(windowHandle);
    glfwPollEvents();
  }
}

代码示例来源:origin: lwjglgamedev/lwjglbook

public void update() {
    glfwSwapBuffers(windowHandle);
    glfwPollEvents();
  }
}

相关文章

GLFW类方法