Share via


Direct3DMobile Object

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

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 IDirect3DMobile interface to access Direct3D Mobile functionality.

The following code example shows how to use the Direct3DMobileCreate function to retrieve a pointer to the IDirect3DMobile interface.

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::GetDirect3D method.

See Also

Concepts

Direct3D Mobile Programming