Reputation: 68064
I'm using Direct2D with for some simple accelerated image compositing/manipulation, and now need to get the pixel data the RenderTarget to pass it to an encoder.
So far, I've managed this by rendering to a BitmapRenderTarget
, then finally drawing the bitmap from that onto a WicBitmapRenderTarget
which allows me to Lock an area and get a pointer to the pixels.
However...
This only works if my initial RenderTarget uses D2D1_RENDER_TARGET_TYPE_SOFTWARE
, because a hardware rendertarget's bitmap can't be 'shared' with the WicBitmapRenderTarget
which only supports software rendering. The software rendering seems significantly slower than hardware.
Is there any way round this? Would I be better off using Direct3D instead?
Upvotes: 4
Views: 198