我正在用 LWJGL 3.0.0a 开发游戏.许多教程都使用 lwjgl_util.jar
,其中包含 Vector2f
和 GLU
等功能,例如 gluUnProject
。
但是在这个版本中(在 downloads page 上可用)不再包含这样的库;它只包含核心 lwjgl.jar
。这些实用程序到哪里去了?
最佳答案
LWJGL 3 专注于 OpenGL 绑定(bind)。关于wiki据称
The library includes functionality and APIs that simply should never have been added to it. Such functionality belongs either to an engine using LWJGL, or to another library layered on top of LWJGL. This includes the util package (vecmath, mapped objects, image/sound file readers, etc) and anything to do with applets.
所以本质上这意味着,至少目前,核心库中不会有任何 Util 包。
但是,有计划在其他核心功能(OpenGL ES 绑定(bind)、Vulkan 绑定(bind)等)已实现时包含一个。
来自roadmap :
- [.x]: May be postponed to a point release after 3.0.
[...]
[.x] Official utility library.
Even though the focus for LWJGL 3 is to only include the very lightweight, lower-level functionality in the core library, ease-of-use and appeal to novice programmers is also important. The current plan is to start a sibling project that will create an official utility library for LWJGL 3. It will include all non-essential functionality, optional features and helper/convenience utilities. It may also include an API that matches LWJGL 2 for easy porting of existing code. Engine-level functionality, like vecmath and fixed-function simulation, may or may not be included, depending on the amount of support the project receives. Another option is the creation of "profile-based" OpenGL classes, e.g. a GLCore class that includes only the core profile functionality from GL11 up to GL31.
[...]
Removed Features
The util package.
Some of the old functionality might be added to the utility library.
论坛上还启动了一个非官方实用程序项目,Java OpenGL Math Library (JOML) ( Github page ),但是否继续还不清楚。
编辑:截至 2015 年 6 月,JOML 是 LWJGL 团队的推荐:blog entry .
编辑:截至 2015 年 6 月,LWJGL 拥有 STB library包括。这为图像和字体加载提供了有用的实用函数。
关于java - "lwjgl-util.jar"属于哪里?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30100585/