Jump to content

View more

Image of the Day

The night is still, but the invasion brings chaos. #screenshotsaturday #hanako #indiegame #gameart #ue4 #samurai https://t.co/cgILXuokoS
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

Reading Pixel Colours

4: Adsense

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   

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?

#2 Null and Void   Members   

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   

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.