Mount Fuji Engine  0.8b
MF_API MFTexture* MFTexture_CreateFromRawData ( const char *  pName,
void *  pData,
int  width,
int  height,
MFImageFormat  format,
uint32  flags = 0,
bool  generateMipChain = true,
uint32 pPalette = 0 
)

Creates a texture from a raw data buffer.

Parameters
pNameName of the texture being created.
pDataPointer to a buffer containing the image data
widthImage width.
heightImage height.
formatFormat of the image data being read. Only formats supported by the platform and ImgFmt_A8R8G8B8 can be used.
flagsTexture creation flags.
generateMipChainIf true, a mip-chain will be generated for the texture.
pPalettePointer to palette data. Use NULL for non-paletted image formats.
Returns
Pointer to an MFTexture structure representing the newly created texture.
Remarks
If ImgFmt_A8R8G8B8 is used, and it is not supported by the platform natively, a copy of the image is taken and the data is swizzled to the best available 32bit format on the target platform. Use MFTexture_GetPlatformAvailability() or MFImage_IsAvailableOnPlatform() to determine what formats are supported on a particular platform.
See Also
MFTexture_Create(), MFTexture_Release(), MFTexture_GetPlatformAvailability(), MFImage_IsAvailableOnPlatform()