Re: [PyOpenGL-Users] OpenGl + Mouse Selection
Brought to you by:
mcfletch
From: Jasper P. <ja...@pe...> - 2003-04-21 20:32:29
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 That sounds like what I want. Thanks for the search reference! - -Jasper On Mon, 21 Apr 2003, Mike C. Fletcher wrote: > There are a number of ways to do this, but the most common way I've > encountered is to use the glSelectBuffer-based selection mechanisms > which come with OpenGL. You can find sample code for the glSelectBuffer > stuff in OpenGLContext or just about any OpenGL reference or programming > Web site (such as NeHe). > > The basic approach is to re-render the scene in "select" mode, pushing > "names" (integers) onto the selection stack as you render to a frustum > which is the projection of your picking point to infinity. When you > exit the select rendering mode you receive a list of records indicating > which names were active when items were rendered to the frustum. > > Hope this helps, > Mike [snip my original question] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE+pFYa8EpjZ7/X9bIRAj6zAJ9Qd3y0PFhixkxbplYA+dxw4vCnYQCgwnGY ic7GD51sUgA+UrrgT+jii2M= =04I+ -----END PGP SIGNATURE----- |