[PyOpenGL-Users] OpenGl + Mouse Selection
Brought to you by:
mcfletch
From: Jasper P. <ja...@pe...> - 2003-04-21 19:07:59
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I want to be able to "select" different entities rendered in OpenGL w/ a mouse -- essentially asking which shape the mouse pointer is over. Ideally this could be used to select game pieces to move, etc. This is fairly easy to compute when rending in an orthographic view, as you can simply translate mouse coordinates to viewpane coordinates. However, this doesn't work well for perspective views! It would be nice to simply ask opengl what lies behind a certain screen coordinate, but I haven't been able to find anything amongst the "glut" (rimshot!) of opengl documentation about this. Has anyone here had any experience with something like this? I suspect there must be an easy way to do it, as obviously the information is available inside of opengl. - -Jasper -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE+pEJN8EpjZ7/X9bIRAilwAKDWUmh9ltlv1HiYRh7G5WO0TlJwWQCg1F3N v9HHh5Eip+cBteBTCcPFMbE= =c8Xf -----END PGP SIGNATURE----- |