Results 1 to 4 of 4

Thread: Selection and Feedbakc in OpenGL 3

  1. #1
    Junior Member Newbie
    Join Date
    Aug 2008
    Posts
    1

    Selection and Feedbakc in OpenGL 3

    Hello,

    I've been scanning the openGL 3.0 spec and a lot of mails and it seems to be the plan the selection and feedback modes are removed from openGL in the near future.

    My question is: how can I achieve that functionality once they are gone? For some of the removed functions the spec states the proposed replacement but there is no mention of how I am supposed to find out what is below the mouse once openGL 3.x is there. I tried to find an answer to this in several forums but I could not find anything....

    Someone here can give me a hint?

    Thanks a lot

    Andreas

  2. #2
    Senior Member Regular Contributor remdul's Avatar
    Join Date
    Mar 2004
    Location
    The Netherlands
    Posts
    346

    Re: Selection and Feedbakc in OpenGL 3

    This isn't something for a graphics API imo, it should never have been in GL in the first place.

    You can render each object with an unique color, then read back the pixel under the mousepointer with glReadPixels. Keep in mind that the spec doesn't guarantee that the rasterized color is the exact same value you passed to glColor3f, but you can take this in account by allowing a margin.

  3. #3
    Senior Member OpenGL Pro Zengar's Avatar
    Join Date
    Sep 2001
    Location
    Germany
    Posts
    1,931

    Re: Selection and Feedbakc in OpenGL 3

    For feedback you can use the transform feedback (render to VBO) functionality. For selection: so it yourself. There are lots of ways, like manual raycasting or using occlusion queries, or the unique-color-id as remdul suggested.

  4. #4
    Member Contributor
    Join Date
    Feb 2005
    Posts
    90

    Re: Selection and Feedbakc in OpenGL 3

    Hi,

    transform feedback can be used for both things, just wrap it with your own parser for selection and feedback.

    The best way to do proper selection is by ray casting and using some spatial data structure, once I've moved from OpenGL selection to my own ray casting solutions the selection became RT.

    Ido

Similar Threads

  1. OpenGl - selection
    By CoolBeanJ in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 03-24-2011, 09:04 PM
  2. selection the 3d objects OpenGL ES 1.1
    By pcersltda in forum OpenGL ES
    Replies: 1
    Last Post: 07-23-2010, 10:51 AM
  3. Help on OpenGL selection ???
    By jun wang in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 06-17-2010, 03:52 PM
  4. Region Selection Opengl
    By maximian in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 03-06-2004, 02:17 AM
  5. Is using selection buffer for selection or picking slow?
    By mohsin in forum OpenGL: Basic Coding
    Replies: 5
    Last Post: 04-11-2001, 03:56 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean