when I click an object, how can it trigger an event?

Started by
0 comments, last by adamy 19 years, 11 months ago
I am new to OpenGL. I am using OpenGL on Linux. I would like to do a wireless node routing simulation project. When I click a node, such as a cube, it displays a window and I can input some information for the node. There are some questions. 1. How can I trigger the node. ie. how can OpenGL know I click the node? 2. How can I display a window over the 3D node? 3. How can I input information in the window? Thank you very much.
Advertisement
1. If you use the selection buffer OpenGL can tell you what was clicked, however you''ll have to pass in the postition of the mouse i belive to let OpenGL know where to select it from. Other than that, do the maths to work it out.
2. Draw it using your own code or a GUI SDK
3. you''ll have to handle the input yourself or again, use a GUI SDK

OpenGL is purely a graphical rendering system, for user interaction you have to do the work yourself as it doesnt have a way of opening a window, let alone iteracting with the mouse.

This topic is closed to new replies.

Advertisement