picking primitives in OpenGL
-
Is it possible to pick points/edges/faces with the OpenGL API given a set of 2D coords? I know you can pick an "object", but can pick the individual components of the object? If not, anyone know of a good library that supports this or pointers on how to accomplish it?
¡El diablo está en mis pantalones! ¡Mire, mire! SELECT * FROM User WHERE Clue > 0 0 rows returned Save an Orange - Use the VCF! Personal 3D projects Just Say No to Web 2 Point Blow
-
Is it possible to pick points/edges/faces with the OpenGL API given a set of 2D coords? I know you can pick an "object", but can pick the individual components of the object? If not, anyone know of a good library that supports this or pointers on how to accomplish it?
¡El diablo está en mis pantalones! ¡Mire, mire! SELECT * FROM User WHERE Clue > 0 0 rows returned Save an Orange - Use the VCF! Personal 3D projects Just Say No to Web 2 Point Blow
Sure. You can achieve the granularity you like by placement of 'names' - UINT identifiers. You can draw as much or as little as you like between calls to
glLoadName
; if a rendered primitive is 'hit', it'll be identified by the name. No third party lib necessary - it's all built in. Check out Chap. 13 of the Red Book - 'Selection and Feedback'. (Well, it's Chap. 13 in the Third Ed., anyway. I think they're up to the 5th Ed. now.)L u n a t i c F r i n g e
modified on Saturday, January 30, 2010 9:08 AM
-
Sure. You can achieve the granularity you like by placement of 'names' - UINT identifiers. You can draw as much or as little as you like between calls to
glLoadName
; if a rendered primitive is 'hit', it'll be identified by the name. No third party lib necessary - it's all built in. Check out Chap. 13 of the Red Book - 'Selection and Feedback'. (Well, it's Chap. 13 in the Third Ed., anyway. I think they're up to the 5th Ed. now.)L u n a t i c F r i n g e
modified on Saturday, January 30, 2010 9:08 AM
Thanks, I'll try that out.
¡El diablo está en mis pantalones! ¡Mire, mire! SELECT * FROM User WHERE Clue > 0 0 rows returned Save an Orange - Use the VCF! Personal 3D projects Just Say No to Web 2 Point Blow