Hello Guest

LWJGL 3.0.0

  • 14 Replies
  • 19705 Views
*

Offline spasi

  • *****
  • 2261
    • WebHotelier
LWJGL 3.0.0
« on: February 27, 2016, 16:17:54 »
LWJGL 3.0.0 has been released!

Visit the download page to get it. You can also get it from Maven Central or this direct link.

Release notes:

BINDINGS

- Added support for Java array parameters and HotSpot Critical Natives. (#175)
- Added Vulkan bindings. (#50)
- Added NanoVG bindings. (#99)
- Added NativeFileDialog bindings.
- Added par_shapes.h bindings.
- Added dyncall bindings.
- Added jawt bindings for AWT/Swing integration. (#125)
- Added simple OS-specific window creation bindings, for custom window/context creation. (#105)
- Added missing OpenCL and OpenAL extensions.
- Fully documented OpenCL and OpenAL.
- Moved WGL and GLX capabilities to the new WGLCapabilities and GLXCapabilities classes, respectively. Functionality in WGL, GLX and corresponding extensions that does not require a current context can now be used without creating a dummy context first. (#171)

IMPROVEMENTS

- Added stack allocation APIs (the MemoryStack class and new allocation methods in struct classes and MemoryUtil).
- Made the implementations of PointerBuffer and Struct/StructBuffer subclasses as lightweight as possible. This makes it easier for escape analysis to eliminate allocations.
- Minor struct API improvements.
- Added nullability information to struct members, to protect against buggy code crashing the JVM.
- All bindings are updated to the latest versions of the corresponding libraries. Notably, GLFW now has glfwSetWindowIcon and glfwSetWindowMonitor, it now doesn't lack anything compared to LWJGL 2's Display.
- Refactored callbacks for Java 8. (#182)
- Added NativeResource interface and made freeable objects usable as resources in try-with-resources statements. (#186)
- Faster thread-local lookups for the stack and current capabilities. New options in Configuration can be used to complete eliminate thread-local lookup in OpenGL, OpenGL ES and OpenAL, when it is known that only a single context will be used, or that all contexts will be compatible (same capabilities and same function pointers).
- Added memSlice for all buffers types in MemoryUtil. (#179)
- Refactored the Configuration class for type safety and added more options.
- JDK 9 can now be used to build and run LWJGL.
- Javadoc is now generated with JDK 9. The API is fully indexed and search functionality is available. Also made multiple Javadoc formatting improvements.
- Improved debug diagnostics on startup and when loading the LWJGL shared library fails.
- Optimized memSet and memCopy for small buffers.

FIXES

- Stopped using UPX compression for binaries. This eliminates various integration issues and virus scanning false-positives.
- The SharedLibraryLoader now works with any shared library, not only libraries LWJGL knows about. (#176)

BREAKING CHANGES

- LWJGL now requires Java 8 to build and run. Certain custom interfaces have been replaced with java.util.function interfaces. (#177)
- Dropped support for Linux x86. (#162)
- Dropped libffi bindings.
- Dropped ALDevice/ALContext wrappers from OpenAL and CLPlatform/CLDevice wrappers from OpenCL. (#152)
- Dropped the getInstance() method from bindings loaded from shared libraries. Function pointers are now stored either in capabilities classes or in a nested Functions inner class.
- Dropped infrequently used method overloads in bindings. Full javadoc is now generated on (almost) all overloads.
- Dropped utility classes that were not useful.
- Added AutoSize support to struct members. Instance setters for the corresponding count/size members were removed to avoid bugs and confusion.
- Replaced MemoryUtil.memFree(StructBuffer) with StructBuffer.free().
- Renamed __ALIGNMENT to ALIGNOF in struct classes.
- Removed org.lwjgl.system.Retainable interface. Closure and FunctionProvider subclasses are now destroyed using .free() instead of .release().
- Moved xxHash and SSE bindings to the org.lwjgl.util package.
- Integer-boolean native types (0 or 1 are the only legal values) are now mapped to Java booleans. (#181)
- Macros without parameters are now generated as static final values, not methods.
« Last Edit: June 03, 2016, 18:30:17 by spasi »

Re: LWJGL 3.0.0 - WIP Release notes
« Reply #1 on: March 26, 2016, 13:08:03 »
great to see all these additions! any indication when they go into an upcoming release? currently using 3.0.0b but would love start using nanovg without switching to daily snapshots. thanks /s

*

Offline spasi

  • *****
  • 2261
    • WebHotelier
Re: LWJGL 3.0.0 - WIP Release notes
« Reply #2 on: March 26, 2016, 15:59:44 »
I'll try to release 3.0.0 soon, likely when GLFW 3.2 is ready.

Re: LWJGL 3.0.0 - WIP Release notes
« Reply #3 on: March 31, 2016, 07:19:04 »
Ok thank you. Think I will start using then Snapshots, just to be on the bleeding edge.  :)

*

Offline spasi

  • *****
  • 2261
    • WebHotelier
Re: LWJGL 3.0.0 - WIP Release notes
« Reply #4 on: April 27, 2016, 13:41:40 »
The OP has been updated with the latest changes.

The current nightly build, 3.0.0 #79, is the first release candidate.

Re: LWJGL 3.0.0 - WIP Release notes
« Reply #5 on: May 23, 2016, 14:25:01 »
I like how LWJGL seems to be one of the few libraries where readability seems to improve over time.
Details like mapping 0-1-ints to booleans directly and using Java 8 Functions make a great difference in my opinion. ;)
Any chance of getting MemoryUtil.NULL mapped to null?  :P

Keep up the good work!

*

Offline spasi

  • *****
  • 2261
    • WebHotelier
Re: LWJGL 3.0.0 - WIP Release notes
« Reply #6 on: May 23, 2016, 14:50:56 »
Any chance of getting MemoryUtil.NULL mapped to null?  :P

You shouldn't ever have to see "MemoryUtil.NULL" in your code. MemoryUtil, MemoryStack and all bindings are supposed to be used with static imports. Many users don't like them, but it's the recommended and only way to have clean code with LWJGL. So, then, it becomes just "NULL" which is basically the same as "null" (except it's a pointer argument vs an object reference).

Re: LWJGL 3.0.0 - WIP Release notes
« Reply #7 on: May 23, 2016, 20:56:49 »
That was half a joke. MemoryUtil is one of the cases where I'm actually following the advice to use static imports.
For the rest, I'm sticking to writing it out, since it helps in learning what OpenGL things go together.

Anyway, my point was, I like the progress. ;)

*

Offline spasi

  • *****
  • 2261
    • WebHotelier
Re: LWJGL 3.0.0 - WIP Release notes
« Reply #8 on: June 03, 2016, 18:26:17 »
LWJGL 3.0.0 has been released!

*

Offline SilverTiger

  • *
  • 18
  • がんばってください!
    • SilverTiger Development
Re: LWJGL 3.0.0
« Reply #9 on: June 04, 2016, 18:40:23 »
Great news and thanks for all the hard work behind the release!

When can we get it from the Maven Central?
Right now only 3.0.0a and 3.0.0b are listed.
« Last Edit: June 05, 2016, 22:46:43 by SilverTiger »

*

Offline spasi

  • *****
  • 2261
    • WebHotelier
Re: LWJGL 3.0.0
« Reply #10 on: June 04, 2016, 21:55:30 »
Sorry for the delay, the 3.0.0 release is up now. It should appear on Maven Central soon.

*

Offline Obsyd

  • **
  • 71
Re: LWJGL 3.0.0
« Reply #11 on: June 05, 2016, 10:29:18 »
Thank you for your hard work guys! LWJGL 3 is looking great!

Re: LWJGL 3.0.0
« Reply #12 on: July 07, 2016, 17:48:29 »
hey,

I am very fond of java language.
I was searching to start learning openGL and i am very exited to found lwjgl here for me so i can learn openGL directly in java without writing code in C.

I just need a little help, is there any tutorial for me that could teach me about openGL in lwjgl from scratch i have never programmed in opengl or Direct3D.

thanks in Advance.

*

Kai

Re: LWJGL 3.0.0
« Reply #13 on: July 07, 2016, 19:11:31 »
The good thing is that LWJGL's OpenGL binding scheme does not differ from using OpenGL with C.
There are just slight differences when it comes to passing client memory to OpenGL using Java's NIO buffers.
So, the most benefitial approach is to make yourself comfortable reading OpenGL demos in C. You'll learn the most by this approach, because you can leverage the numerous tutorials/demos/examples out there written in C, such as:
- http://learnopengl.com/
- https://open.gl/

If you don't want to read C programs, there are some tutorials and even books specifically for LWJGL:
- https://www.gitbook.com/book/lwjglgamedev/3d-game-development-with-lwjgl/details
- https://github.com/SilverTiger/lwjgl3-tutorial/wiki

I'd also recommend buying an actual book to read through, such as:
- OpenGL Programming Guide: The Official Guide to Learning OpenGL, Version 4.3 (8th Edition)

And then again, there is always the reference documentation and the specification, in case you want to know something very precisely:
- https://www.opengl.org/sdk/docs/man/
- https://www.opengl.org/registry/

And lastly, welcome to the world of OpenGL programming! :)
« Last Edit: July 07, 2016, 19:58:55 by Kai »

Re: LWJGL 3.0.0
« Reply #14 on: July 09, 2016, 09:55:42 »
Amazing,

Same function and variable names as it is in C, so no problem to take idea from c program and implement that in java.

thats Great.

thanks Kai, You are the man.