I've spent hours straight writting a pixel perfect collision detection procedure and when I've came to test it I got an Automation Error when I get to this line:
VB Code:
  1. D3DDevice.SetRenderTarget Sur1
Sur1 is a DirectDrawSurface7 and D3DDevice is declared as Direct3DDevice7.
Is there something I must do to Sur1 before I can set it as the renderTarget? I'm simply trying to paint a D3DSprite to Sur1 which is a tempory dest for the image while I check for collisions.
Am I doing it right, I am ment to set Sur1 as RenderTarget? coz otherwise i'll paint to the Backbuffer.

Thanx for any help.