So I have a picture(for easier understanding of problem like this: http://www.lib.utexas.edu/maps/europe/europe_95.jpg).
My goal is to click on any of the countries and get what country I clicked. The picture is full of colors, not just simple lets say Germany is purple. Also if I hover above a country I could also do things, like highlight it, write some text in a bar, etc.
What solutions popped in my mind:
- Draw every slice into a mesh, and ray trace the click. (making lots of meshes is a lot of time)
- Draw a single quad with texture, make a pixelmap, and get the coordinates clicked, then look up in the table.(I have to make a map for every resolution)
Is there any better way of doing this? Or are there any algorithms for it?