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 and IDirect3D2 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 IDirect3D2 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 create an IDirect3DTexture2 interface by calling the IDirectDrawSurface3::QueryInterface method.
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 IDirect3DDevice2 interface.
You can call the IDirect3D2::CreateDevice method to create a Direct3DDevice object and retrieve an IDirect3DDevice2 interface. (Notice that you do not call QueryInterface to retrieve IDirect3DDevice2!) If necessary, you can retrieve an IDirect3DDevice interface by calling the IDirect3DDevice2::QueryInterface method.
For more information, see The DrawPrimitive Methods and Execute Buffers and 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 IDirect3D2::CreateMaterial method. You can use the IDirect3DMaterial2 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 IDirect3DViewport2 interface by calling the IDirect3D2::CreateViewport method. For more information, see Viewports and Transformations.
-
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 IDirect3D2::CreateLight method. For more information, see Lights.
-
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.