Picking - PowerPoint PPT Presentation

About This Presentation
Title:

Picking

Description:

http://gpwiki.org/index.php/OpenGL:Tutorials:Picking. Color Picking ... http://gpwiki.org/index.php/OpenGL:Tutorials:Picking. Render twice. glRenderMode(GL_SELECT) ... – PowerPoint PPT presentation

Number of Views:59
Avg rating:3.0/5.0
Slides: 9
Provided by: CISE6
Learn more at: https://www.cise.ufl.edu
Category:
Tags: php | picking | tutorial

less

Transcript and Presenter's Notes

Title: Picking


1
Picking
2
What is picking?
  • Selecting an object on the screen
  • What does this require?
  • Get Mouse Location
  • Compute what objects are rendered at the position

3
Example
4
How to do it
  • http//www.opengl.org/resources/faq/technical/sele
    ction.htm
  • http//gpwiki.org/index.php/OpenGLTutorialsPicki
    ng

5
Color Picking
  • http//gpwiki.org/index.php/OpenGL_Selection_Using
    _Unique_Color_IDs

6
GL_SELECTION
  • http//gpwiki.org/index.php/OpenGLTutorialsPicki
    ng
  • Render twice
  • glRenderMode(GL_SELECT)
  • SetViewport to one pixel
  • It counts how many objects render to that pixel
  • Read back (glRenderMode(GL_RENDER)
  • Identify objects use name stack

7
What weve been doing
8
gluUnProject
  • GLint gluUnProject( GLdouble winX, GLdouble winY,
    GLdouble winZ, const GLdouble model, const
    GLdouble proj, const GLint view, GLdouble
    objX, GLdouble objY, GLdouble objZ )
Write a Comment
User Comments (0)
About PowerShow.com