本文整理了Java中org.lwjgl.glfw.GLFW.nglfwGetVersion()
方法的一些代码示例,展示了GLFW.nglfwGetVersion()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。GLFW.nglfwGetVersion()
方法的具体详情如下:
包路径:org.lwjgl.glfw.GLFW
类名称:GLFW
方法名:nglfwGetVersion
[英]Unsafe version of: #glfwGetVersion
[中]不安全版本:#glfwGetVersion
代码示例来源:origin: sriharshachilakapati/SilenceEngine
/**
* <p> This function retrieves the major, minor and revision numbers of the GLFW library. It is intended for when
* you are using GLFW as a shared library and want to ensure that you are using the minimum required version. It is
* included here so you may want to write the GLFW version to a log file.</p>
*
* <p> The version is returned as a {@link Vector3} object whose components x, y, z represent the major, minor and
* revision numbers of the version respectively</p>
*
* @return The version of the GLFW3 library linked with LWJGL3 as a Vector3 object.
*/
public static Vector3 getVersion()
{
IntBuffer version = BufferUtils.createIntBuffer(3);
nglfwGetVersion(memAddress(version), memAddress(version) + Integer.BYTES, memAddress(version) + 2 * Integer.BYTES);
return new Vector3(version.get(0), version.get(1), version.get(2));
}
代码示例来源:origin: org.lwjgl.osgi/org.lwjgl.glfw
/**
* Retrieves the major, minor and revision numbers of the GLFW library. It is intended for when you are using GLFW as a shared library and want to ensure
* that you are using the minimum required version.
*
* <div style="margin-left: 26px; border-left: 1px solid gray; padding-left: 14px;"><h5>Note</h5>
*
* <ul>
* <li>Any or all of the version arguments may be {@code NULL}.</li>
* <li>This function always succeeds.</li>
* <li>This function may be called before {@link #glfwInit Init}.</li>
* <li>This function may be called from any thread.</li>
* </ul></div>
*
* @param major where to store the major version number, or {@code NULL}
* @param minor where to store the minor version number, or {@code NULL}
* @param rev where to store the revision number, or {@code NULL}
*
* @since version 1.0
*/
public static void glfwGetVersion(@Nullable @NativeType("int *") IntBuffer major, @Nullable @NativeType("int *") IntBuffer minor, @Nullable @NativeType("int *") IntBuffer rev) {
if (CHECKS) {
checkSafe(major, 1);
checkSafe(minor, 1);
checkSafe(rev, 1);
}
nglfwGetVersion(memAddressSafe(major), memAddressSafe(minor), memAddressSafe(rev));
}
内容来源于网络,如有侵权,请联系作者删除!