Jump to content
  • Advertisement

Archived

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

ShawMishrak

Rendering to a texture

This topic is 6069 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
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
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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!