Object picking...

Hello !

I’m trying to develop a CAD-based application powered by OpenGL. Of course, I have to implement “object picking”. I know two ways to do that. First, the selection rendering with “RenderMode(GL_SELECT)” but it costs one rendering… Second, the ray intersection method which is CPU-time consuming. In fact, all I want to do is to store a user defined 32-bits value for each pixel that OpenGL rasterize. I’ve tried to use z-buffer to store them but now, I want to use z-buffer for z-buffering.
Is it possible to create a buffer like that ? Is there any other way used by real CAD-based software ? Is OpenGL’s selection mode fast enough ?

Thanks for any helps…

 -- Spotaszn --