Archived

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

Diakon_Tristan

Render To Surface - How to?

Recommended Posts

Have a look at IDirect3DDevice8::CreateRenderTarget and IDirect3DDevice8::SetRenderTarget.

Edited by - VolkerG on October 23, 2001 2:37:55 PM

Share this post


Link to post
Share on other sites
quote:
Original post by Diakon_Tristan
Greetings...

I am a little bit nerved, because I cannot find anything about the subject in DX8.

Would you please help?
THNX


It''s not that hard to do really.

Create a render texture using the IDirect3DDevice8::CreateRenderTarget method.

Then use this surface with IDirect3DDevice8::SetRenderTarget
also setting a z-buffer if you need to.

Render what you need to the render target, then switch back
to your original buffer and carry on rendering.

You should be able to use the rendertarget as a source for
texturing at this point aswell.

There are a few catch alls on this though. When creating a
rendertarget you might be limited to POW2 or Square textures,
the z-buffer, if you use one , also needs to be the same size
or bigger than the rendertarget.

Share this post


Link to post
Share on other sites