I’m using OpenGL with GLUT and am currently implementing selection features in my 3d application.
I’m using two (glut) subwindows: one for the 3d scene and one for glut bitmap text (this subwindow is ortho 2d).
Basically, I want the user to be able to select an object either by clicking it in the 3d scene subwindow or by clicking its name in the text window. I already have selection working in the 3d scene.
But now I can’t figure out how to get selection working in the text window.
There are two complications:
Do I need two name stacks - One for the objects in the scene and one for the text objects? Can you even have two name stacks?
Secondly, how should selection differ in a 2d context from that of a 3d?
Thanks