Appendix A 1. Direct3D object
(Cai Junsheng copyright)
In Direct3D applications, the object that is created first is Direct3D object, and finally deleted objects are also Direct3D objects. So what is the Direct3D object used? How is it created? Since the Direct3D object is implemented with a COM, you have to use the Direct3D object, you must initialize the COM library, then create a Direct3D COM object. If you create a Direct3D object when C is as follows: lpdirect3d9 g_pd3d = null; if (null == (g_pd3d = Direct3dcreate9 (D3D_SDK_VERSION))) Return E_FAIL; D3D_SDK_VERSION parameter is used to determine the use of the SDK header file to compile. Once you have created a Direct3D object, you can enumerate the compatibility of the device and check the device. To further create a display device object, select the appropriate display mode for a specific device, and the programming of special hardware acceleration.