Direct3D Immediate Mode is made up of a series of objects. You work with these objects to manipulate your virtual world and build a Direct3D application.
- DirectDraw Object
- A DirectDraw object provides the functionality of Direct3D; IDirect3D, IDirect3D2 and IDirect3D3 are interfaces to a DirectDraw object. Since a DirectDraw object represents the display device, and the display device implements many of the most important features of Direct3D, it makes sense that the abilities of Direct3D are incorporated into DirectDraw. You create a DirectDraw object by calling the DirectDrawCreate function. For more information, see the IDirect3D3 Interface.
- DirectDrawSurface Object
- A DirectDrawSurface object that was created as a texture map contains the bitmap(s) that your Direct3D application will use as textures. You can retrieve the IDirect3DTexture2 interface for the surface by calling the IUnknown::QueryInterface method, specifying the IID_IDirect3DTexture2 reference identifier.
For more information, see Textures.
- Direct3DDevice Object
- A Direct3DDevice object encapsulates and stores the rendering state for an Immediate Mode application; it can be thought of as a rendering target for Direct3D. Prior to DirectX 5, Direct3D devices were interfaces to DirectDrawSurface objects. DirectX 5 introduced a new device-object model, in which a Direct3DDevice object is entirely separate from DirectDraw surfaces. This new object supports the IDirect3DDevice3 interface.
You can call the IDirect3D3::CreateDevice method to create a Direct3DDevice object and retrieve an IDirect3DDevice3 interface. (Notice that you do not call QueryInterface to retrieve IDirect3DDevice3.) If necessary, you can retrieve an IDirect3DDevice interface by calling the IDirect3DDevice3::QueryInterface method.
For more information, see and Direct3D Devices.
- Direct3DMaterial Object
- A Direct3DMaterial object describes the illumination properties of a visible element in a three-dimensional scene, including how it handles light and whether it uses a texture. You can create a Direct3DMaterial object by calling the IDirect3D3::CreateMaterial method. You can use the IDirect3DMaterial3 interface to get and set materials and to retrieve material handles.
For more information, see Materials.
- Direct3DViewport Object
- A Direct3DViewport object defines the rectangle into which a three-dimensional scene is projected. You can create an IDirect3DViewport3 interface by calling the IDirect3D3::CreateViewport method. For more information, see Viewports and Clipping.
- Direct3DLight Object
- A Direct3DLight object describes the characteristics of a light in your application. You can use the IDirect3DLight interface to get and set lights. You can create an IDirect3DLight interface by calling the IDirect3D3::CreateLight method.
For more information, see Lights.
- Direct3DVertexBuffer Object
- A Direct3DVertexBuffer object is a memory buffer that contains vertices to be rendered with the vertex-buffer rendering methods offered in the IDirect3DDevice3 interface. Vertex buffers are not to be confused with execute buffers. A vertex buffer contains only vertex data to be processed by a Direct3DDevice object, and offers features that you can use to improve performance during rendering.
For additional information, see Vertex Buffers.
- Direct3DExecuteBuffer Object
- A Direct3DExecuteBuffer object is a buffer full of vertices and instructions about how to handle them. Prior to DirectX 5, Immediate Mode programming was done exclusively by using Direct3DExecuteBuffer objects. The introduction of the DrawPrimitive methods in DirectX 5, however, has made it unnecessary for most applications to work with execute buffers.
For more information about execute buffers, see Execute Buffers.