Rendering to a texture

Started by
2 comments, last by ShawMishrak 22 years, 5 months ago
Can anyone provide any decent tutorials on rendering to a texture? Thanks in advance.
Advertisement
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
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?
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?

This topic is closed to new replies.

Advertisement