IDirect3DDevice9::SetRenderTarget(DWORD RenderTargetIndex,IDirect3DSurface9 *pRenderTarget);
IDirect3DDevice9::SetTexture(DWORD Sampler,IDirect3DBaseTexture9 *pTexture);
Do I need to copy the surface to a texture (although this would be slow), or is there another way?
Thanks for any help.
Rendering to a texture...
Hi,
I need to render to a texture, that will also be rendered. From what I can gather from the help, it is only possible to render to a surface, and a surface cannot be used as a texture.
Basically just create a texture with a supported surface format and then call surface = texture.GetSurfaceLevel(0); to get the surface and use it with device.SetRenderTarget(0, surface); (you might also want to set a new depth stencil surface in case you don't want your original overwritten or use bigger texture sizes).
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement