Skip to main content
GameDev.net gamedev.net
🔒 Locked

Selection Tool..

Started by HellRiZZer Nov 30, 2001 at 6:01 AM 0 replies 200+ views
Original Post
HellRiZZer
HellRiZZer
What basic steps I should go to implement a selection tool, you know , the rectangle with mouse (drag mouse from one pos to another in explorer and you select all items within rectangle) for OpenGL? Is it simply going through all points and determining if they are inside the projected to far plane parellelogram? E.g I got a camera at 30 degrees on x axis, I create 6 surfaces (left/right, top/bottom, far/near) and look if point is in between that parallelogram? Please help. Thanks.
Fruny
Fruny
There is a whole chapter dedicated to selection and feedback in the Red Book (chapter 13).

Read up on the following functions :
- glSelectBuffer(), glRenderMode()
- glInitNames(), glPushName(), glPopName(), glLoadName()
- gluPickMatrix()
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.