티스토리 뷰
Create an IDirect3D9 object and return an interface to it.
syntax
C++
IDirect3D9* Direct3DCreate9(
UINT SDKversion
);
Parameters
SDKVersion: The value of this parameter should be D3D_SDK_VERSION. SeeRemarks.
Return value
If successful, this function returns a pointer to an IDirect3D9 interface; oterwise, a NULL pointer is returned.
Remarks
The Direct3D object is the first Direct3D COM object that your graphical application needs to create and the last ovject that your application needs to release. Functions for enumerating and retrieving capabilities of a device are accessivle through the Direct3E obfect. This enables applications to select devices without creating them.
Create an IDirect3D9 object as shown here:
LPDIRECT3D9 g_pD3D = NULL; if(NULL==(g_pD3D = Direct3DCreate9(D3D_SDK_VERSION)) return E_FAIL; |
The Direct3D9 interface supports enumeration of active display adaprters and allows the creation of IDirect3DDevice9 objects. If user dynamically adds adapters (either by adding devices to the desktop, or by hot-docking a laptop), those devices will not be included in the enumeration. Creating a new IDirect3D9 interface will expose the new devices.
D3D_SDK_VERSION is passed to this function to ensure that the header files against which an application is compiled match the version of the runtime DLL's that are installed on the machine. D3D_SDK_VERSION is only changed in the runtime when a header change( or other code change) would require an application to be rebuilt. If this function fails, it indicates that the header file version does not match the runtime DLL version.
For and example, see Creating a Device (Direct3D 9).
Requirements
Header |
|
---|---|
Library |
|
DLL |
|
'ComComComCom > DX .. D3D' 카테고리의 다른 글
[function] IDirect3DDevice9::BeginScene (0) | 2017.06.17 |
---|---|
[function] IDirect3DDevice9::Clear (0) | 2017.06.17 |
크라메르 법을 이용한 역행렬, 가우시안법을 이용한 역행렬 퍼포먼스 비교한 글 캡쳐 (0) | 2017.06.11 |
com객체 컴포넌트 오브젝트 모델 (0) | 2017.06.11 |
Direct3D (0) | 2017.06.09 |