[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] converting "object position" to "view position" in (py)opengl



You'll definitely want to use glu somewhere.  gluLookAt(...) comes to mind...

Anyway, for gluProject, try this (not tested, but should work)

x,y,z = gluProject(object.x,object.y,object.z,\
glGetDoublev(GL_MODELVIEW_MATRIX),glGetDoublev(GL_PROJECTION_MATRIX),\
glGetIntegerv(GL_VIEWPORT))


HTH,
Ian