creating a render texture in d3d9?

Started by
1 comment, last by Syrillix 20 years, 5 months ago
im confused, do you create the texture using d3dxCreateTexture then use that textures 0th surface in pdev->createRenderTarget? or do you just create a surface with pdev->CreateRenderTarget? the parameters of d3dxCreateTexture and pdev->CreateRenderTarget seem to overlap one another so i dont get it.. can someone clarify this for me. cheers. Get busy livin'' or get busy dyin''... - Shawshank Redemption If a man is talking in the forest, and no woman is around to hear him, is he still wrong? - Unknown Fulcrum
Get busy livin' or get busy dyin'... - Shawshank RedemptionIf a man is talking in the forest, and no woman is around to hear him, is he still wrong? - UnknownFulcrum
Advertisement
1) Use D3DXCreateRenderToSurface() instead. That creates an ID3DXRenderToSurface interface.

2) The "Water" sample in the SDK demonstrates use of the above.

--
Simon O''Connor
3D Game Programmer &
Microsoft DirectX MVP

Simon O'Connor | Technical Director (Newcastle) Lockwood Publishing | LinkedIn | Personal site

right... ok so let me get this straight, I create a texture as a render target with d3dxcreatetexture and create a Id3dxRenderToSurface. and when want to render to the texture i pass in the textures surface to id3dxRenderToSurfaces->BeginScene, right?
so does id3dxRenderToSurfaces->BeginScene end up calling device->beginScene ? if so, does that mean that i would have to have 2 seperate begin/end scene calls, one for id3dxRenderToSurface and one for the the rest of the rendering?

another question - does the dx8 way of making a render texture work with dx9?

Get busy livin' or get busy dyin'... - Shawshank Redemption
If a man is talking in the forest, and no woman is around to hear him, is he still wrong? - Unknown
Fulcrum

[edited by - syrillix on November 15, 2003 10:07:42 PM]

[edited by - syrillix on November 15, 2003 12:33:41 AM]
Get busy livin' or get busy dyin'... - Shawshank RedemptionIf a man is talking in the forest, and no woman is around to hear him, is he still wrong? - UnknownFulcrum

This topic is closed to new replies.

Advertisement