Draw with a mouse in openGL
3 answers
Assuming this is homework and that you want to try and figure it out for yourself, before looking at another solution, consider:
- How do you know when a user clicks a button?
- What are the coordinates of the mouse at this time?
- How do you translate mouse coordinates to world coordinates of your GL model?
- How do you determine which top to move? (or add)
- How do you move the top?
- How do you redraw?
- What is the relationship between model and view?
+5
source to share