Where is Matrix4f in lwjgl 3.0.0a?

Started by rileld, February 18, 2015, 08:02:30

Previous topic - Next topic

rileld

Hi All,

I'm new to lwjgl, so sorry if the answer to this is obvious.

I'm following the tutorial here: https://github.com/SilverTiger/lwjgl3-tutorial/wiki/Rendering. The tutorial started using Matrix4f in the "Specify Vertex Attributes" section, which I see in lwjgl_util v2.9.X. However, the tutorial is for lwjgl-3, and I only see a single jar: lwjgl.jar, which does not contain Matrix4f. Is there a lwjgl_util for 3.0.0a? Is Matrix4f somewhere else?

Maybe that tutorial is out of date? In that case, what should I use instead of org.lwjgl.util.vector.Matrix4f?

Thanks for any help with this :)

SHC

The LWJGL-Util library is no more available with LWJGL 3, and you must make your own Matrix and vector classes. Since you are following SilverTiger's tutorial, he had the Matrix4f class in his repository.

Matrix4f.java https://github.com/SilverTiger/lwjgl3-tutorial/blob/master/src/silvertiger/tutorial/lwjgl/math/Matrix4f.java

Hope this helps.

SilverTiger

Quote from: rileld on February 18, 2015, 08:02:30
Hi All,

I'm new to lwjgl, so sorry if the answer to this is obvious.

I'm following the tutorial here: https://github.com/SilverTiger/lwjgl3-tutorial/wiki/Rendering. The tutorial started using Matrix4f in the "Specify Vertex Attributes" section, which I see in lwjgl_util v2.9.X. However, the tutorial is for lwjgl-3, and I only see a single jar: lwjgl.jar, which does not contain Matrix4f. Is there a lwjgl_util for 3.0.0a? Is Matrix4f somewhere else?

Maybe that tutorial is out of date? In that case, what should I use instead of org.lwjgl.util.vector.Matrix4f?

Thanks for any help with this :)

LWJGL3 doesn't have a official utility package yet.
As SHC has already stated, I made a very basic Matrix4f class for that tutorial. Maybe I should add a comment inside the tutorial.

Kai

Hey,

work is underway to bring Neoptolemus's math library https://github.com/RGreenlees/Java-OpenGL-Math-Library into use, both via Maven and via simple direct JAR HTTP-download link.

It would be great if everyone could contribute to that library, and if we could bring it into more wirespread use, to once-and-forall end this "LWJGL3 does not have math libs anymore, so what linear algebra library should I use"-struggle. :)

rileld

Thanks for the replies, and the pointer to https://github.com/SilverTiger/lwjgl3-tutorial/blob/master/src/silvertiger/tutorial/lwjgl/math/Matrix4f.java!

I looked for https://github.com/RGreenlees/Java-OpenGL-Math-Library on Maven Central, and couldn't find it. It would be really helpful if whatever is recommended is on Maven Central.
The same goes for lwjgl. It would be really helpful if lwjgl-3 snapshot/alpha builds were on Maven Central. I presume after the release, the lwjgl jar will make it to Maven Central.


Kai

Quote from: rileld on February 19, 2015, 06:48:09
It would be really helpful if whatever is recommended is on Maven Central.
The same goes for lwjgl. It would be really helpful if lwjgl-3 snapshot/alpha builds were on Maven Central. I presume after the release, the lwjgl jar will make it to Maven Central.
I agree with you here, and we are working to make that happen.
In the meantime you know you can always build those projects yourself (i.e. jar them) and "mvn install:install-file" them in your local repository.