How can I determine which object is drawn at a particular pixel?
Currently my program calls DrawUserPrimitives, which takes in as data CustomVertex.PositionColored.
since z-buffer is enabled there must be easy way to determine the polygon at the pixel. but that still leaves the challenge to determine the array from which it came. Seems like I must use some other API to render the objects.
my other option is to compute on-screen bounds of the object. precision is not important. an approximate rectangular box is acceptable. this seems to be simpler but tedious on my part.
Then there is the issue of dragging the object around. The object moves along a horizontal surface. So this time I have to compute world coordinate from screen coordinate.
how should I go about solving this?
btw, I am using .NET 2.0 managed DirectX libs.