Object Picking

Luminary
Posts: 5,143
Joined: 2002.04
Post: #16
There should be no difference between GLUT and AGL as far as gluPickMatrix and GL's selection mechanism is concerned.
Quote this message in a reply
Moderator
Posts: 608
Joined: 2002.04
Post: #17
Quote:Originally posted by OneSadCookie
There should be no difference between GLUT and AGL as far as gluPickMatrix and GL's selection mechanism is concerned.
I wouldn't think so either, I just know that the method that works with GLUT doesn't with AGL.

P.S. Yay! 100 posts!
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #18
... which suggests to me that you're not setting something up correctly for AGL. Why don't you post your code?
Quote this message in a reply
Moderator
Posts: 608
Joined: 2002.04
Post: #19
I will post my code later tonight, not at home right now.
Quote this message in a reply
Moderator
Posts: 608
Joined: 2002.04
Post: #20
OK, I lie Grin I am not going to post the code, too much and I have actually already redone the interface using CopyBits. Thanks anway.
Quote this message in a reply
Zephyras
Unregistered
 
Post: #21
Not really important but..Im confused.. are you sure opengl uses a selection buffer for picking? I thourt it just transformed the view frustrum/cube and the hits were any intersecting objects. Interesting since i might get some speed increase if this is so.using a intersection method must be much faster.
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #22
When you're using OpenGL picking, you pass a buffer to OpenGL which it uses to store hits. Whenever you're drawing anything, you specify a pick ID, much like you specify the current color. If any pixel of that object is rasterized, its pick ID is added to your buffer.

gluPickMatrix simply changes the viewport & projection so that only objects inside the area you specify will be rasterized.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  How do I do Color Picking? dockode 2 5,161 Sep 24, 2011 08:02 PM
Last Post: dockode
  Issues with picking FFaqui 0 2,291 Nov 21, 2009 04:37 PM
Last Post: FFaqui
  Opengl picking problem (zip file) papillon68 1 4,511 Mar 1, 2009 08:49 PM
Last Post: chronus
  Picking and selection... chalamov33 2 3,474 Mar 31, 2008 02:08 PM
Last Post: wyrmmage
  glut picking clashes with drawing wyrmmage 2 3,590 Jan 24, 2008 06:39 PM
Last Post: wyrmmage