PDA

View Full Version : program that draws a erasable rectangle based on the movement of the mouse



pavankumarm
04-15-2017, 04:07 PM
the program that draws an erasable rectangle based on the movement of the mouse using logic operation and finally rectangle should be displayed when there is no movement of mouse ... can u plz help me with this ?? give me an idea how to do it ??or even sorce code if possible plz

Dark Photon
04-15-2017, 06:14 PM
Is this an assignment? If so, your instructor has probably given you guidelines for implementing this.

One of many possible ways you could do this is with GLUT. Check out it's mouse motion (https://www.opengl.org/resources/libraries/glut/spec3/node51.html) and mouse button (https://www.opengl.org/resources/libraries/glut/spec3/node50.html) callbacks.

pavankumarm
04-19-2017, 01:53 AM
yes its an assignment question. he didnt instruct us he told us to search in the internet and do. so can u help me with mouse motion function plzz please type the motion function or explain me how to do it or give an idea!!thanks

Dark Photon
04-19-2017, 05:47 AM
Just websearch either of those callback registration functions in combination with the word "tutorial" and you'll come up with information and sample code you can use.