Archived

This topic is now archived and is closed to further replies.

AquinasProtocal

GetPixel() Alternative

Recommended Posts

Hello, I want to be able to get access to the colour of a pixel in a texture in order to calculate collision detection, many of the posts i have read on this topic seem to be theory and say little about actual implementation. All I want to know is a single function that will return a value depending on the colour of a pixel at a certain point i.e. GetPixel(x,y). I don''t use an HDC in my game in order to use GetPixel(HDC,x,y). Is there a Direct3D equivalent to this function? or a different gdi function that doesn''t want an HDC? All the best, Hugh

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
keep a copy of the texture or and on/off bitmask around in normal system memory, and use it to check.. reading stuff from the video card, such as textures, is SLOW

Share this post


Link to post
Share on other sites