Def hit_test (x, y) :
Buffer_size=512
Viewport=glGetIntegerv (GL_VIEWPORT)
Aspect_rat=(viewport [2] - viewport [0])/(viewport [3] - viewport [1])
GlSelectBuffer (buffer_size)
GlRenderMode (GL_SELECT)
GlInitNames ()
GlPushName (0)
GlMatrixMode (GL_PROJECTION)
GlPushMatrix ()
GlLoadIdentity ()
GluPickMatrix (x, viewport [3] - y, 5, 5, viewport)
#... The Draw Something using glLoadName...
GlPopMatrix ()
GlMatrixMode (GL_MODELVIEW)
GlFlush ()
Buf=list (glRenderMode (GL_RENDER))
Print (buf)
This is a code, the great god, please have a look at how to change