태그 : Direct3D9
HRESULT CreateDevice(
... parameters ...
);
=======================================================================================
... parameters ...
UINT Adapter,
그래픽 카드, D3DADAPTER_DEFAULT(주 디스플레이 장치를 선택)
D3DDEVTYPE DeviceType,
D3DDEVTYPE_HAL, D3DDEVTYPE_REF, D3DDEVTYPE_SW, etc.
HWND hFocusWindow,
장치와 연결될 윈도우 핸들
DWORD BehaviorFlags,
#define D3DCREATE_FPU_PRESERVE 0x00000002L
- 배정밀도 연산. Dirct3D의 성능 저하 요인.
#define D3DCREATE_MULTITHREADED 0x00000004L
- 쓰레드 안전 모드로 수행하기 위해 속도를 낮춘다. 전역 크리티컬 섹션을 많이 사용하지 않는 것이 좋은 방법이란다.
#define D3DCREATE_PUREDEVICE 0x00000010L
- Get 계열의 함수 사용 금지.
#define D3DCREATE_SOFTWARE_VERTEXPROCESSING 0x00000020L
- 정점 쉐이더를 지원시 소프트웨어를 이용하여 T&L(변형 & 라이팅)을 사용
#define D3DCREATE_HARDWARE_VERTEXPROCESSING 0x00000040L
- 정점 쉐이더를 지원시 하드웨어를 이용하여 T&L(변형 & 라이팅)을 사용
#define D3DCREATE_MIXED_VERTEXPROCESSING 0x00000080L
- H/W, S/W의 병행 사용
#define D3DCREATE_DISABLE_DRIVER_MANAGEMENT 0x00000100L
- 드라이버 대신 Direct3D가 Resource를 관리
#define D3DCREATE_ADAPTERGROUP_DEVICE 0x00000200L
- 마스터 어댑터가 소유하는 모든 헤드를 구동하도록 장치에 지시.
#define D3DCREATE_DISABLE_DRIVER_MANAGEMENT_EX 0x00000400L
- ???
D3DPRESENT_PARAMETERS * pPresentationParameters,
위에서 정의한 PRESENT_PARAMETER 구조체.
IDirect3DDevice9 ** ppReturnedDeviceInterface
앞의 매개변수의 수준으로 생성된 Direct3D Device를 return. 1번에서 선언한 Direct3D Device component의 인터페이스 포인터를 인수로 지정한다.
이리하여 g_pd3dDevice에 생성된 Direct3D Device가 도킹 되었다.
# by | 2008/04/09 12:52 | ▶▷DirectX◁◀ | 트랙백 | 덧글(0)

Direct3D exposes a device-independent interface to an application. Direct3D applications can exist alongsideGDI applications, and both have access to the computer's graphics hardware through the device driver for the graphics card. UnlikeGDI, Direct3D can take advantage of hardware features by creating a hal device.
A hal device provides hardware acceleration to graphics pipeline functions, based upon the feature set supported by the graphics card. Direct3D methods are provided to retrieve device display capabilities at run time. (See IDirect3D9::GetDeviceCaps and IDirect3DDevice9::GetDeviceCaps.) If a capability is not provided by the hardware, the hal does not report it as a hardware capability.
For more information about hal and reference devices supported by Direct3D, see Device Types (Direct3D 9).
==================================================================================================
# by | 2008/04/04 12:10 | ▶▷DirectX◁◀ | 트랙백 | 덧글(0)
◀ 이전 페이지 다음 페이지 ▶