Search code examples
javaopengllwjgl

Where does "lwjgl-util.jar" belong to?


I'm developing a game with LWJGL 3.0.0a. Many tutorials out there use the lwjgl_util.jar that contains stuff like Vector2f and GLU for functions like gluUnProject.

In this version though (available on the downloads page) there is no such library contained anymore; it only contains the core lwjgl.jar. Where have these utils gone?


Solution

  • LWJGL 3 has the focus on the OpenGL bindings. On the wiki it is stated

    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.

    So essentially this means that, at least for the moment, there will not be any Util package in the core library.

    However, there are plans of including one when the other core features (OpenGL ES bindings, Vulkan bindings etc.) have been implemented.

    From the 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.

    There was also an unofficial utility project started on the forum, the Java OpenGL Math Library (JOML) (Github page), but it is unclear whether it will be continued.

    EDIT: As of June 2015, JOML is a recommendation from the LWJGL team: blog entry.

    EDIT: As of June 2015, LWJGL has the STB library included. This provides useful utility functions for image and font loading.