Well you need to create a new surface for rendering to.
DX7 or DX9 rendertargets need to be video memory. The trick is getting it back to system memory for a pixmap. For DX9 i have disabled the ability to get a device context. That is how DX7 does but the lock is slow, and in DX9 there is StretchRect and UpdateSurface that work using a blitter style of function.
Based upon what I see. As you noted you cant render to a managed texture you can however create a texture that is a render target. Once you have it as a texture you can use it. The big issue is that it will need to be recreated if the device is lost since a RenderTarget cant be managed.
I would assume you want to Update this RenderTarget every frame.
You could also just draw on the rendertarget and call grabimage or grabpixmap.
So there is really two choices here. Create a RenderTexture and be able to use it in functions simlar to DrawImage or create a rendertarget and copy the it back to the managed texture.
Ill see if I can make it work out over the weekend or if I cant steal some time at work tommorrow.
Doug Stastny
DX7 or DX9 rendertargets need to be video memory. The trick is getting it back to system memory for a pixmap. For DX9 i have disabled the ability to get a device context. That is how DX7 does but the lock is slow, and in DX9 there is StretchRect and UpdateSurface that work using a blitter style of function.
Based upon what I see. As you noted you cant render to a managed texture you can however create a texture that is a render target. Once you have it as a texture you can use it. The big issue is that it will need to be recreated if the device is lost since a RenderTarget cant be managed.
I would assume you want to Update this RenderTarget every frame.
You could also just draw on the rendertarget and call grabimage or grabpixmap.
So there is really two choices here. Create a RenderTexture and be able to use it in functions simlar to DrawImage or create a rendertarget and copy the it back to the managed texture.
Ill see if I can make it work out over the weekend or if I cant steal some time at work tommorrow.
Doug Stastny