Hi,
I still can’t use the gluUnProject Method in my program. In fact it works perfectly with in glOrtho mode but it failed in gluPerspective mode… Here is the output of my matrix I printed:
300 303 // Point X Y clicked
Viewport: 0 0 600 600 // viewport matrix
MvMatrix: 1.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 1.0 //modelisation matrix
ProjMatrix: 11.430052757263184 0.0 0.0 0.0 0.0 11.430052757263184 0.0 0.0 0.0 0.0 -1.0 -1.0 0.0 0.0 0.0 0.0 //projection matrix
0 //value returned by gluUnproject = GL_FAILED
X:0.0 Y:0.0 Z:0.0 = Values of each point at 0
My function is :
glu.gluUnProject((double)X,(double)Y,0.2,mvmatrix,projmatrix,viewport,x,y,z) and I don’t need the pointer sign & because it’s Java
Is there anyone who has an idea
Thanks a lot
MAt