Game Development Reference
In-Depth Information
Chapter 1
Direct3D Initialization
Initialization of Direct3D has historically been a tedious chore. Fortu-
nately, version 8.0 adopted a simplified initialization model, and
Direct3D 9.0 follows that same model. However, the initialization pro-
cess still assumes that the programmer is familiar with basic graphics
concepts and some fundamental Direct3D types. The first few sections
of this chapter address these requirements. With these prerequisites
met, the remainder of the chapter explains the initialization process.
Objectives
To learn how Direct3D interacts with graphics hardware
To understand the role that COM plays with Direct3D
To learn fundamental graphics concepts, such as how 2D images
are stored, page flipping, and depth buffering
To learn how to initialize Direct3D
To become familiar with the general structure that the sample
applications of this topic employ
1.1 Direct3D Overview
Direct3D is a low-level graphics API (application programming inter-
face) that enables us to render 3D worlds using 3D hardware
acceleration. Direct3D can be thought of as a mediator between the
application and the graphics device (3D hardware). For example, to
instruct the graphics device to clear the screen, the application would
call the Direct3D method IDirect3DDevice9::Clear . Figure 1.1
shows the relationship between the application, Direct3D, and the
hardware.
35
Search WWH ::




Custom Search