Jump to content

  • Log In with Google      Sign In   
  • Create Account

Reading Pixel Colours


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 shalrath   Members   -  Reputation: 128

Like
Likes
Like

Posted 29 August 2001 - 12:23 AM

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?

Sponsor:

#2 Null and Void   Moderators   -  Reputation: 1087

Like
Likes
Like

Posted 29 August 2001 - 12:54 AM

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!]

#3 zedzeek   Members   -  Reputation: 528

Like
Likes
Like

Posted 29 August 2001 - 09:12 AM

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.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS