CPU - based math library (like GLM)?

classic Classic list List threaded Threaded
7 messages Options
BIS
Reply | Threaded
Open this post in threaded view
|

CPU - based math library (like GLM)?

BIS
Hey, guys -

I've just finished getting up to speed on programmable pipeline GL, and am preparing to port a series of apps (the OneStone® Pebbles apps listed amon the featured apps on the JOGL site) to forward-compatible GL3.3.

I will probably have a few questions as I work through this, but the first question is this:

Is there a recommended library supporting CPU-side matrix and vector math for use with JOGL? I've searched the forums but haven't found anything definitive. I'd rather not re-invent the wheel and roll my own - there must be something available that does what I need. Or so I hope...



Thanks in advance -

DR
Reply | Threaded
Open this post in threaded view
|

Re: CPU - based math library (like GLM)?

gouessej
Administrator
Hi

elect will probably advise you to use JGLM. There are similar libraries in several scenegraph APIs and in JOGL itself.

P.S: https://github.com/java-graphics/glm
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: CPU - based math library (like GLM)?

gouessej
Administrator
In reply to this post by BIS
JOML is worth a look too.
Julien Gouesse | Personal blog | Website
BIS
Reply | Threaded
Open this post in threaded view
|

Re: CPU - based math library (like GLM)?

BIS
Thanks. I'll take a look at both.

Then I'll be back with my next question.


BIS
Reply | Threaded
Open this post in threaded view
|

Re: CPU - based math library (like GLM)?

BIS
Hi, gouessej -

You're right - everything I need is in the opengl.math package. No need for a 3rd party lib.

Reply | Threaded
Open this post in threaded view
|

Re: CPU - based math library (like GLM)?

gouessej
Administrator
It's a good piece of news. We plan to improve this package:
https://jogamp.org/bugzilla/show_bug.cgi?id=1323
Julien Gouesse | Personal blog | Website
BIS
Reply | Threaded
Open this post in threaded view
|

Re: CPU - based math library (like GLM)?

BIS
One enhancement I'd like to see would be a utility function for generating a matrix for transforming normals, derived from a vertex transformation matrix; i.e., a function that would take a 4x4 ModelView matrix, invert and transpose it, and return the upper left 3x3 of the result. That was the one feature I found I needed to add myself. (Or is there already such an animal, and I just overlooked it? I had written my own LookAt before I spotted the included one - maybe I've missed this, too?)