hello all,
I used "CreateDevice" API to connect D3DM device. and returned an error value -- D3DMERR_INVALIDDEVICE, it seems platform doesn't support D3DM.
Hardware is Sirf prima TT442, accroding white paper, it integrated MBX-lite core, so D3DM should be supported, and I built OS softaware by myself, certainly I checked all D3DM items in catalog items view.
maybe you know why?
please refer to following source code.
if( NULL == ( g_pD3DM = Direct3DMobileCreate( D3DM_SDK_VERSION ) ) )
return E_FAIL;
return E_FAIL;
D3DMPRESENT_PARAMETERS d3dmpp;
memset( &d3dmpp, 0, sizeof(d3dmpp) );
d3dmpp.Windowed = TRUE;
d3dmpp.SwapEffect = D3DMSWAPEFFECT_DISCARD;
d3dmpp.BackBufferFormat = D3DMFMT_UNKNOWN;
d3dmpp.EnableAutoDepthStencil = TRUE;
d3dmpp.AutoDepthStencilFormat = D3DMFMT_D16;
memset( &d3dmpp, 0, sizeof(d3dmpp) );
d3dmpp.Windowed = TRUE;
d3dmpp.SwapEffect = D3DMSWAPEFFECT_DISCARD;
d3dmpp.BackBufferFormat = D3DMFMT_UNKNOWN;
d3dmpp.EnableAutoDepthStencil = TRUE;
d3dmpp.AutoDepthStencilFormat = D3DMFMT_D16;
UINT uAdapter D3DMADAPTER_DEFAULT;
HRESULT hRes = g_pD3DM->CreateDevice( uAdapter,
D3DMDEVTYPE_DEFAULT,
hWnd, 0,
&d3dmpp, &g_pd3dmDevice );
if( FAILED( hRes ) )
{
ErrorOutput(hRes);
OutputDebugString(TEXT("Unable to create a D3DM device.n"));
return E_FAIL;
}
Best regards
Gavin