drakkanraz
drakkanraz

Reputation: 361

jogl - how to use GLU with GL3

I am unsure as to how the GLU class works with GL3 and higher using a programmable pipeline. I have seen a couple of examples (jogl+GL3 examples seem scarce) that have code like the following:

GL3 gl = glAutoDrawable.getGL().getGL3();
glu.gluPerspective(80.0f, 1920.0f / 1080.0f, 0.1f, 100f);

glu.gluPerspective(...) doesn't return anything, so how do I access the calculated projectionMatrix to pass it into the shader? Similarly for gluLookAt(...). If these are made available in the shader as a default attribute what do I use for things like picking algorithms, where I need to create a vector based on the camera position?

Upvotes: 1

Views: 426

Answers (1)

Nicol Bolas
Nicol Bolas

Reputation: 474016

If you're talking about core-profile OpenGL... you don't. You have to stop using GLU and start using an actual vector/matrix library.

Upvotes: 4

Related Questions