Archived

This topic is now archived and is closed to further replies.

ShawMishrak

Rendering to a texture

Recommended Posts

invective    118
1. Save current target with:
IDirect3DDevice8::GetRenderTarget

2. Get the surface of your texture:
IDirect3DTexture8::GetSurfaceLevel

3. Change Render target:
IDirect3DDevice8::SetRenderTarget

4. Render

5. Restore saved target with
IDirect3DDevice8::SetRenderTarget

Share this post


Link to post
Share on other sites
Guest Anonymous Poster   
Guest Anonymous Poster
Thanks. One question, though. What do I need to do with the IDirect3DTexture8 object before I call GetSurfaceLevel? Do I need to initialize it and lock it?

Share this post


Link to post
Share on other sites