DirectX SDK |
A Direct3D device is the rendering component of Direct3D. It encapsulates and stores the rendering state. In addition, a Direct3D device performs transformations and lighting operations and rasterizes an image to a DirectDraw surface. Architecturally, Direct3D devices contain a transformation module, a lighting module, and a rasterizing module, as the following illustration shows.
Direct3D enables applications that use custom transformation and lighting models to bypass the Direct3D device's transformation and lighting modules. For details, see Vertex Formats.
In C++, there are four COM interfaces that can be used for rendering: IDirect3DDevice, IDirect3DDevice2, IDirect3DDevice3, and IDirect3DDevice7. In this documentation, it is assumed that applications target the latest interface version. For more information, see Device Interfaces.
In DirectX for Visual Basic, you access Direct3D Immediate Mode devices through the Direct3DDevice7 class. The Direct3DDevice7 class supports the DrawPrimitive family of scene-rendering methods. The Direct3DDevice7 object can use various DirectDraw surfaces as render targets at different times if the application requires it. For more information, see Direct3DDevice7.SetRenderTarget.