Original Post
I've got an interesting little problem here... I'm making an isometric tile map in GL, which is working quite well, but I need to be able to figure out which tile a point lies on. The way I chose to do this was via a "mouse map" picture, with different colors that tell you what tile your point is in (once you calculate the general area of the mouse) It works very well, but the issue is that I'm using glReadPixels() to get the color of the texture at a certain point. That works, but in order for it to work, I need to actually draw the mouse map on the screen somewhere, since glReadPixels() reads from the framebuffer, which is rather ugly and wouldn't work in the game. There's two things I could do, and I need help with one: 1 - Draw the mousemap before rendering the frame, figure out where my point lies on, and then clear the screen after it. It would work, but some day I may need to read several different points, and clearing the screen twice per frame isn't exactly speedy, using glReadPixels() ONCE per frame takes a large framerate hit as it is. 2 - Store the mouse map texture in memory and read the value of a texel whenever I need to. This is ideal, but I don't know how to read individual pixels without drawing to the screen first. This is what I need some help on. [Edited by - Foobar of Integers on July 1, 2006 8:16:51 PM]
