Game Development Reference
In-Depth Information
return 0;
}
As you can see, our sample template structure is quite clean with our
utility function handling the window and Direct3D initialization pro-
cesses. For almost every sample program in this topic, our task is to fill
out the implementations for the Setup , Cleanup , and Display
functions.
Note: Remember to link in d3d9.lib, d3dx9.lib, and winmm.lib if
you are building these samples on your own.
1.6 Summary
Direct3D can be thought of as a mediator between the programmer
and the graphics hardware. The programmer calls a Direct3D func-
tion, which in turn, indirectly, has the physical hardware perform
the operation by interfacing with the device's HAL (Hardware
Abstraction Layer).
The REF device allows developers to test features that Direct3D
exposes but are not implemented by available hardware.
Component Object Model (COM) is the technology that allows
DirectX to be language independent and have backward compatibil-
ity. Direct3D programmers don't need to know the details of COM
and how it works; they only need to know how to acquire COM
interfaces and release them.
Surfaces are special Direct3D interfaces used to store 2D images.
A member of the D3DFORMAT enumerated type specifies the pixel
format of a surface. Surfaces and other Direct3D resources can be
stored in several different memory pools as is specified by a mem-
ber of the D3DPOOL enumerated type. In addition, surfaces can be
multisampled, which creates a smoother image.
The IDirect3D9 interface is used to find out information about
the system's graphics devices. For example, through this interface
we can obtain the capabilities of a device. It is also used to create
the IDirect3DDevice9 interface.
The IDirect3DDevice9 interface can be thought of as our soft-
ware interface for controlling the graphics device. For instance,
calling the IDirect3DDevice9::Clear method will indirectly
have the graphics device clear the specified surfaces.
Search WWH ::




Custom Search