Share via


Retrieving Material Properties (Windows CE 5.0)

Send Feedback

You retrieve the material properties that the rendering device is currently using by calling the IDirect3DMobileDevice::GetMaterial method for the device. Unlike the IDirect3DMobileDevice::SetMaterial method, GetMaterial does not require preparation. The GetMaterial method accepts the address of a D3DMMATERIAL structure and fills the provided structure with information describing the current material properties before returning.

// For this example, the pd3dmDev variable is assumed to 
// be a valid pointer to an IDirect3DMobileDevice interface.
HRESULT hr;
D3DMMATERIAL mat;

hr = pd3dmDev->GetMaterial(&mat);
if(FAILED(hr))
{
    // Code to handle the error goes here.
}

See Also

Materials

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.