A project based on the use of opengl mouse position, that connects the two points on the left mouse button click with a straight line
Rajeev
Connect Dots - OpenGL Mouse Position Example
An interactive project features the use of mouse function. Today we are going to have a project based opengl mouse position . The name of projects is - "Connect Dots".
1. About the Project
This c++ opengl project is based on mouse click position. The theme of project is - draws straight lines connecting dots placed with mouse clicks. First one point is drawn on mouse click, next mouse click will draw a point while connecting it with previous point. This process of connecting points will continues till the max allotted points slots is over, after which first point will get deleted as new point is generate, this continues. 2. O pengl mouse click position
Problem of the project is getting the position of a user mouse click in C/C++ & GLUT (OpenGL). Solution to this is in our myMouseFunc() function. We will typically pass the parameter to this function while adjusting the algorithm as per our requirement.
In our mouse function, will condition to check if only left mouse bu…