本文整理了Java中org.lwjgl.glfw.GLFW.glfwGetMonitorPos()
方法的一些代码示例,展示了GLFW.glfwGetMonitorPos()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。GLFW.glfwGetMonitorPos()
方法的具体详情如下:
包路径:org.lwjgl.glfw.GLFW
类名称:GLFW
方法名:glfwGetMonitorPos
[英]Returns the position, in screen coordinates, of the upper-left corner of the specified monitor.
Any or all of the position arguments may be NULL. If an error occurs, all non- NULL position arguments will be set to zero.
This function must only be called from the main thread.
[中]返回指定监视器左上角的位置(以屏幕坐标表示)。
任何或所有位置参数都可能为空。如果发生错误,所有非空位置参数都将设置为零。
只能从主线程调用此函数。
代码示例来源:origin: libgdx/libgdx
static Lwjgl3Monitor toLwjgl3Monitor(long glfwMonitor) {
IntBuffer tmp = BufferUtils.createIntBuffer(1);
IntBuffer tmp2 = BufferUtils.createIntBuffer(1);
GLFW.glfwGetMonitorPos(glfwMonitor, tmp, tmp2);
int virtualX = tmp.get(0);
int virtualY = tmp2.get(0);
String name = GLFW.glfwGetMonitorName(glfwMonitor);
return new Lwjgl3Monitor(glfwMonitor, virtualX, virtualY, name);
}
}
代码示例来源:origin: libgdx/libgdx
static Lwjgl3Monitor toLwjgl3Monitor(long glfwMonitor) {
IntBuffer tmp = BufferUtils.createIntBuffer(1);
IntBuffer tmp2 = BufferUtils.createIntBuffer(1);
GLFW.glfwGetMonitorPos(glfwMonitor, tmp, tmp2);
int virtualX = tmp.get(0);
int virtualY = tmp2.get(0);
String name = GLFW.glfwGetMonitorName(glfwMonitor);
return new Lwjgl3Monitor(glfwMonitor, virtualX, virtualY, name);
}
}
代码示例来源:origin: com.badlogicgames.gdx/gdx-backend-lwjgl3
static Lwjgl3Monitor toLwjgl3Monitor(long glfwMonitor) {
IntBuffer tmp = BufferUtils.createIntBuffer(1);
IntBuffer tmp2 = BufferUtils.createIntBuffer(1);
GLFW.glfwGetMonitorPos(glfwMonitor, tmp, tmp2);
int virtualX = tmp.get(0);
int virtualY = tmp2.get(0);
String name = GLFW.glfwGetMonitorName(glfwMonitor);
return new Lwjgl3Monitor(glfwMonitor, virtualX, virtualY, name);
}
内容来源于网络,如有侵权,请联系作者删除!