Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Graphics
  4. picking primitives in OpenGL

picking primitives in OpenGL

Scheduled Pinned Locked Moved Graphics
comgraphicsgame-devjsontutorial
3 Posts 2 Posters 2 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Jim Crafton
    wrote on last edited by
    #1

    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

    L 1 Reply Last reply
    0
    • J Jim Crafton

      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

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      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

      J 1 Reply Last reply
      0
      • L Lost User

        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

        J Offline
        J Offline
        Jim Crafton
        wrote on last edited by
        #3

        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

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups