Microsoft DirectX 8.1 (C++) |
The ID3DXRenderToSurface interface is used to generalize the process of rendering to surfaces.
Surfaces can be used in a variety of ways including render targets, off-screen rendering, or rendering to textures. An example of off-screen rendering can be seen in the water sample.
A surface can be configured using a separate viewport using the 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 methods of the ID3DXRenderToSurface interface can be organized into the following groups.
Information | GetDesc |
GetDevice | |
Rendering | BeginScene |
EndScene | |
Miscellaneous | OnLostDevice |
OnResetDevice |
The ID3DXRenderToSurface interface, like all COM interfaces, inherits the IUnknown Interface.
The LPD3DXRENDERTOSURFACE type is defined as a pointer to the ID3DXRenderToSurface interface.
typedef interface ID3DXRenderToSurface* LPD3DXRENDERTOSURFACE;
Header: Declared in D3dx8core.h.
Import Library: Use D3dx8.lib.