I´ve been searching the forum but with no luck I am afraid. I have a fairly simple question I would guess. I use the library “Shapelib” to load a shape-file and all I want to do is to be able to move the shapefile with the mouse. I click and hold the left-button and then when i move the mouse the shape should follow.
Is there someone who can give me a point in the right direction on this one?
My idea was to use glTranslatef(x,y,0.0) and then calculate how many pixels the mouse moved. But it didn’t work that well.
Absolutely. Mostly I was just looking to get some theoretical tips or hints on how to approach the problem and I´m not sure if this helps in any way but maybe you get the idea.
I thought I could just translate the coords here. It kind of works but it´s not very nice to look at. It´s flickering and most of the time the shape-file just dissapears.