GetNativeType method

Retrieves the native underlying pixel format of a DXSurface.


DXSAMPLEFORMATENUM retVal = object.GetNativeType(pInfo);


pInfo [out]


Pointer to a DXNATIVETYPEINFO structure that the method fills with native type information about the surface. This structure contains the color key, surface pitch, pointers to the samples at the current location, and origin of the surface. This pointer can be NULL, in which case only the DXSAMPLEFORMATENUM enumeration is returned.


This method can be used to directly access the data in the surface. If the calling routine supports the pixel format of the surface, it can use the information in this structure to retrieve or modify data directly in the surface memory. Note that some surfaces, such as procedural surfaces, don't have a backing array of samples, and therefore will always set the entire DXNATIVETYPEINFO structure to zero.