1 / 8

Selection & Picking in OpenGL

Selection & Picking in OpenGL. Seung-Hyun Yoon 3D Modeling and Processing Lab. Selection Buffer. Set up Pick Buffer. Selection Buffer: user specified integer array. glSelectBuffer( int size, int *pBuffer );. Initialize Name Stack. stack pointer. Name Stack. Set up Pick Buffer.

shamus
Download Presentation

Selection & Picking in OpenGL

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Selection & Picking in OpenGL Seung-Hyun Yoon 3D Modeling and Processing Lab.

  2. Selection Buffer Set up Pick Buffer Selection Buffer: user specified integer array glSelectBuffer( int size, int *pBuffer );

  3. Initialize Name Stack stack pointer Name Stack Set up Pick Buffer glRenderMode( GL_SELECT ); glInitNames();

  4. Specify a Pick Volume Pick Volume Set up Pick Buffer Initialize Name Stack gluPickMatrix( x, y, 5.0, 5.0, viewport );

  5. Draw Object with IDs 1 0 0 100 Fill Selection Buffer Set up Pick Buffer Initialize Name Stack Specify a Pick Volume glPushName(100); glDrawRedRect();

  6. 1 0 0 100 2 0 0 100 200 Fill Selection Buffer Set up Pick Buffer Initialize Name Stack Specify a Pick Volume Draw Object with IDs glPushName(200); glDrawGreenRect();

  7. 1 0 0 100 2 0 0 100 200 Fill Selection Buffer Set up Pick Buffer Initialize Name Stack Specify a Pick Volume Draw Object with IDs glPushName(300); glDrawBlueRect();

  8. Post Processing Post Processing Set up Pick Buffer Initialize Name Stack Specify a Pick Volume Draw Object with IDs gRenderMode( GL_RENDER ); Do anything you want !!!

More Related