View Full Version : Mouse manipulation

10-29-2009, 02:52 AM
I need to detect if the mouse is passing on top of a point that i defined and move the point with the mouse, if that is the user intention. I'm searching inside arrays to see if the mouse coordinates match the coordinates of the points marked before. Does anyone knows a better, faster, more reliable way of accomplishing this task?
Can i detect more easily that the mouse pointer is passing through a graphic?

My thanks in advanced

10-29-2009, 09:12 AM
Well..Yes, actually! A clever way to do this, is store the point ID to the framebuffer, then read back to get it and modify the corresponding point. ID could be an 32-bit array index, packed as a color or something similar(people in this forum have even mentioned pointers).