Original Post
Hi!
I need a texture that can be used as a render target and also has to be lockable, as I want to render something into it and then access the pixeldata written to it.
However, the DX docs say, that lockable texture have to be in the managed pool, while render target textures have to be in the default pool, so that''s not possible.
There is the D3DUSAGE_DYNAMIC flag, is this what I need? I tried to create the texture like:
device->CreateTexture(512, 512, 1, D3DUSAGE_RENDERTARGET|D3DUSAGE_DYNAMIC /* = 0x201 */,
D3DFORMAT_A8R8G8B8, D3DPOOL_DEFAULT, &texture, NULL);
This call fails (D3D_INVALIDCALL). So, how do I create the dynamic texture?
Thanks for your help.
Regards,
Andre