Picking areas of a texture on a mesh

Blitz3D Forums/Blitz3D Programming/Picking areas of a texture on a mesh

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Say I had a model of earth that could be rotated like a virtual globe, but when the user moves the mouse pointer over a specific state or country the border of it becomes highlighted.
Is there a way to figure out what pixel of the texture map the mouse pointer is over?
If that could be determined then I suppose you would need a formula to determine if it fell within the borders of a specific country, then drawing the outline of that country on top of the texture would be another challenge.
Anyone ever try something like this?

EDIT:
I just thought of an easier way, I suppose I could just record the x and y location of the mouse and what the rotation of the globe is and then just keep a table of what countries fall at what x,y coords for that rotation.
I would just have to limit the amount of different rotations the globe can be set at or it could get really time consuming.