Replacement for GLU.glUnproject

Hi Everyone,

I’ve been moving my code to LWJGL version 3…
In moving my raycasting code ive come across the realization that GLU.unproject is no longer in lwjgl.

So now i need a replacement. Im wondering if anyone knows of any pure java ports of the GLU.unproject… (or any other viable alternative)

thanks
j.

The docs of gluUnproject shows you the algorithm to compute the coordinates: https://www.opengl.org/sdk/docs/man2/xhtml/gluUnProject.xml (best to view in Firefox, Google Chrome doesn’t support MathML unfortunately)

Hi

You should look at how software picking is implemented in 3D Java engines, especially Ardor3D.

GLM : https://github.com/g-truc/glm/blob/master/glm/gtc/matrix_transform.inl line 342.

https://www.opengl.org/wiki/GluProject_and_gluUnProject_code seems to be ok too.

The previous version of the library you use has a Java implementation of the GLU, why not using it? I don’t think that it uses native GLU implementation by default, am I wrong?

Sorry, I was accurate, the source code is here: