Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 2 of 2

Thread: selection and picking

  1. #1
    Junior Member Newbie
    Join Date
    Jan 2002
    Location
    Bangalore, India
    Posts
    15

    selection and picking

    I am drawing a text using the OpenGL bitmaps(glBitmap) on to the drawing area created using X-Motif. I want to pick that text using the mouse as like any other geometric objects. So, please give me the coding details using OpenGL.
    Any idea

  2. #2
    Junior Member Newbie
    Join Date
    Jan 2002
    Location
    Portugal
    Posts
    11

    Re: selection and picking

    Draw your pieces of text in the back buffer, each one with a different color. Then read the color of the pixel where the user pressed the mouse. This color tells you
    which object was selected. This is very fast and the user does not see nothing strange, because everything happens in the back buffer. :-)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •