PDA

View Full Version : Texture pixel value



11-14-2004, 05:13 PM
I'm making a 2D platformer and I'd like to have per-pixel collsion detection. Rather than making a bit-mask for the textures I load to test for collisions, I'd like to simply get the color value located at a specific point within a texture. Is there any way that I can do this?

dorbie
11-15-2004, 04:13 PM
Only to keep a copy of the texture in memory and test it. It may be better for your problem to store a bitmap for the image.

Using OpenGL for texel level queries would be very inefficient by comparrison.