Render To Surface - How to?

Started by
1 comment, last by Diakon_Tristan 22 years, 5 months ago
Greetings... I am a little bit nerved, because I cannot find anything about the subject in DX8. Would you please help? THNX
Advertisement
Have a look at IDirect3DDevice8::CreateRenderTarget and IDirect3DDevice8::SetRenderTarget.

Edited by - VolkerG on October 23, 2001 2:37:55 PM
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.

MrF.--Code..reboot..code..reboot..sigh!

This topic is closed to new replies.

Advertisement