View Full Version : selection and picking
01-01-2002, 11:11 PM
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.
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. :-)
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.