Reading Pixel Colours
For my 2D tile based game
I have two images involved in a collision test (there is also a background drawn), I detect that they are over one another, and want to test each at a per-pixel level, to see if they both have a non-transparent colour anywhere in my collision space, is there any way to do this real-time with open GL calls?
Using the image data as collision information normally isn''t a good idea. But, you can use glReadPixels if you really want to use the actual image data.
[Resist Windows XP''s Invasive Production Activation Technology!]
[Resist Windows XP''s Invasive Production Activation Technology!]
well what we used to do years back for 2d stuff is store the image data some where as 1''s and 0''s + just do an AND operation between the two.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement