本文整理了Java中org.lwjgl.glfw.GLFW.glfwGetMonitorName()
方法的一些代码示例,展示了GLFW.glfwGetMonitorName()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。GLFW.glfwGetMonitorName()
方法的具体详情如下:
包路径:org.lwjgl.glfw.GLFW
类名称:GLFW
方法名:glfwGetMonitorName
[英]Returns a human-readable name, encoded as UTF-8, of the specified monitor. The name typically reflects the make and model of the monitor and is not guaranteed to be unique among the connected monitors.
The returned string is allocated and freed by GLFW. You should not free it yourself. It is valid until the specified monitor is disconnected or the library is terminated.
This function must only be called from the main thread.
[中]返回指定监视器的人类可读名称,编码为UTF-8。名称通常反映监视器的品牌和型号,不保证在连接的监视器中是唯一的。
返回的字符串由GLFW分配和释放。你不应该自己把它放出来。在指定的监视器断开连接或库终止之前,它一直有效。
只能从主线程调用此函数。
代码示例来源: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: sriharshachilakapati/SilenceEngine
/**
* This method returns a human-readable name, encoded as UTF-8, of the specified monitor. The name typically
* reflects the make and model of the monitor and is not guaranteed to be unique among the connected monitors.
*
* @return The name of this monitor object.
*/
public String getName()
{
return glfwGetMonitorName(handle);
}
代码示例来源: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);
}
内容来源于网络,如有侵权,请联系作者删除!