
44 3. Introduction to DirectX
device3d->Clear(0, NULL, D3DCLEAR_TARGET, D3DCOLOR_XRGB(0,255,0), 0.0f, 0);
Listing 3.3. Clearing the display buer.
e Clear function is accessed through our device3d pointer that was returned by the
CreateDevice function we called earlier.
e -> operator in C++ is used to access members via a pointer. In this case, device3d is a
pointer that points to the Direct3D device. We can access any of the member functions in the
device by using device3d-> . In Visual Studio, a code completion window will pop up as
soon as we type device3d->. All of the available methods are listed.
3.5 Page Flipping
Now we can display the cleared ...