Sign in to follow this  

Tile selection

Recommended Posts

Hi All, I'm having a problem with the selection of a tile. I have made a tiled map in OpenGL of little squares. The squares consist of bitmaps of 64 x 64 pixels with on the bottom a 45 degree turned square of 64*31 pixels. The rest of the picture is black and blended into the background to only display the turned square. The thing I want is to know which tile I click upon or hover over. I have made regions in c++ and loop through my map tiles in which one my mouse pointer is. I constantly change between OpenGL units and pixel coords. This is causing a major performance hit and is probably not the way to go. Can some one help me please how I can select tiles or squares in OpenGL? Thanks in advance, - Erik

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this