gluUnProject

map window coordinates to object coordinates

Signature

gluUnProject( GLdouble ( winX ) , GLdouble ( winY ) , GLdouble ( winZ ) , const GLdouble * ( model ) , const GLdouble * ( proj ) , const GLint * ( view ) , GLdouble* ( objX ) , GLdouble* ( objY ) , GLdouble* ( objZ ) )-> GLint
gluUnProject( winX , winY , winZ , model , proj , view , objX , objY , objZ ) -> <class 'ctypes.c_int'>
Convenience wrapper for gluUnProject
    
    Automatically fills in the model, projection and viewing matrices
    if not provided.
    
    returns (objX,objY,objZ) doubles
    
gluUnProject4( winX , winY , winZ , clipW , model , proj , view , nearVal , farVal , objX , objY , objZ , objW ) -> <class 'ctypes.c_int'>
Convenience wrapper for gluUnProject
    
    Automatically fills in the model, projection and viewing matrices
    if not provided.
    
    returns (objX,objY,objZ) doubles
    

Parameters

VariablesDescription
winX, winY, winZ
Specify the window coordinates to be mapped.
model
Specifies the modelview matrix (as from a glGetDoublev call).
proj
Specifies the projection matrix (as from a glGetDoublev call).
view
Specifies the viewport (as from a glGetIntegerv call).
objX, objY, objZ
Returns the computed object coordinates.

Sample Code References

The following code samples have been found which appear to reference the functions described here. Take care that the code may be old, broken or not even use PyOpenGL.

gluUnProject
OpenGLContext OpenGLContext/events/mouseevents.py Lines: 108