Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
Microsoft® Direct3D® Mobile is implemented through COM objects and interfaces. Applications written in C++ access these interfaces and objects directly. The Direct3DMobile object is the first object that your application creates and the last object that your application releases. Functions for enumerating and retrieving capabilities of a Direct3D Mobile device are accessible through the Direct3DMobile object. This enables applications to select devices without creating them.
When a Direct3D Mobile application starts, it must obtain a pointer to an IDirect3DMobileinterface to access Direct3D Mobile functionality.
The following code example shows how to use the Direct3DMobileCreatefunction to retrieve a pointer to the IDirect3DMobileinterface.
Copy Code | |
---|---|
LPDIRECT3DMOBILE g_pD3Dm = NULL; if( NULL == (g_pD3Dm = Direct3DMobileCreate(D3DM_SDK_VERSION))) return E_FAIL; |
To navigate from the Direct3DDevice object to the Direct3DMobile object that created the device, use the IDirect3DMobileDevice::GetDirect3Dmethod.