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

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

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

GLFW.glfwGetVersionString介绍

[英]Returns the compile-time generated version string of the GLFW library binary. It describes the version, platform, compiler and any platform-specific compile-time options. It should not be confused with the OpenGL or OpenGL ES version string, queried with glGetString.

Do not use the version string to parse the GLFW library version. The #glfwGetVersion function already provides the version of the library binary in numerical format.

Note
  • This function always succeeds.
  • This function may be called before #glfwInit.
  • This function may be called from any thread.
  • The returned string is static and compile-time generated.
    [中]返回编译时生成的GLFW库二进制文件的版本字符串。它描述了版本、平台、编译器和任何特定于平台的编译时选项。它不应与OpenGL或OpenGL ES版本字符串混淆,使用glGetString查询。
    不要使用版本字符串来解析GLFW库版本。#glfwGetVersion函数已经以数字格式提供了库二进制文件的版本。
    #####注
    *这个功能总是成功的。
    *此函数可以在#glfwInit之前调用。
    *此函数可以从任何线程调用。
    *返回的字符串是静态的,并在编译时生成。

代码示例

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

/**
 * Check if the display is a retina display.
 * @return <code>true</code> if the display is a retina display and <code>false</code> otherwise.
 */
public boolean isRetinaDisplay() {
  return GLFW.glfwGetVersionString().contains("retina");
}

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

protected void printContextInitInfo() {
  logger.log(Level.INFO, "LWJGL {0} context running on thread {1}\n"
      + " * Graphics Adapter: GLFW {2}",
      new Object[]{Integer.toString(org.lwjgl.Version.VERSION_MAJOR), Thread.currentThread().getName(), GLFW.glfwGetVersionString()});
}

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

protected void printContextInitInfo() {
  logger.log(Level.INFO, "LWJGL {0} context running on thread {1}\n * Graphics Adapter: GLFW {2}",
      APIUtil.toArray(Version.getVersion(), Thread.currentThread().getName(), GLFW.glfwGetVersionString()));
}

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

/**
 * <p> This function returns the compile-time generated version string of the GLFW library binary. It describes the
 * version, platform, compiler and any platform-specific compile-time options.</p>
 *
 * <p><b>Do not use the version string</b> to parse the GLFW library version. The getVersion() function already
 * provides the version of the running library binary.</p>
 *
 * @return The String representation of the compile-time generated GLFW version string.
 */
public static String getVersionString()
{
  return glfwGetVersionString();
}

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

protected void printContextInitInfo() {
  logger.log(Level.INFO, "LWJGL {0} context running on thread {1}\n"
          + " * Graphics Adapter: GLFW {2}",
      new Object[]{org.lwjgl.Version.getVersion(), Thread.currentThread().getName(), GLFW.glfwGetVersionString()});
}

相关文章

GLFW类方法