The ID3DXRenderToSurface interface is used to generalize the process of rendering to surfaces.
Method | Description |
---|---|
ID3DXRenderToSurface::BeginScene | Begins a scene. |
ID3DXRenderToSurface::EndScene | Ends a scene. |
ID3DXRenderToSurface::GetDesc | Retrieves the parameters of the render surface. |
ID3DXRenderToSurface::GetDevice | Retrieves the Direct3D device associated with the render surface. |
ID3DXRenderToSurface::OnLostDevice | Use this method to release all references to video memory resources and delete all stateblocks. This method should be called whenever a device is lost or before resetting a device. |
ID3DXRenderToSurface::OnResetDevice | Use this method to re-acquire resources and save initial state. |
Surfaces can be used in a variety of ways including render targets, off-screen rendering, or rendering to textures.
A surface can be configured using a separate viewport using the ID3DXRenderToSurface::BeginScene method, to provide a custom render view. If the surface is not a render target, a compatible render target is used, and the result is copied to the surface at the end of the scene.
The ID3DXRenderToSurface interface is obtained by calling the D3DXCreateRenderToSurface function.
The LPD3DXRENDERTOSURFACE type is defined as a pointer to the ID3DXRenderToSurface interface.
typedef interface ID3DXRenderToSurface ID3DXRenderToSurface; typedef interface ID3DXRenderToSurface *LPD3DXRENDERTOSURFACE;
Header: Declared in D3dx9core.h.
Import Library: Use D3dx9.lib.