D3DX10CreateTextureFromMemory function
Create a texture resource from a file residing in system memory.
HRESULT D3DX10CreateTextureFromMemory(
_In_ ID3D10Device *pDevice,
_In_ LPCVOID pSrcData,
_In_ SIZE_T SrcDataSize,
_In_ D3DX10_IMAGE_LOAD_INFO *pLoadInfo,
_In_ ID3DX10ThreadPump *pPump,
_Out_ ID3D10Resource **ppTexture,
_Out_ HRESULT *pHResult
);
-
pDevice [in]
-
Type: ID3D10Device*
A pointer to the device (see ID3D10Device Interface) that will use the resource.
-
pSrcData [in]
-
Type: LPCVOID
Pointer to the resource in system memory.
-
SrcDataSize [in]
-
Type: SIZE_T
Size of the resource in system memory.
-
pLoadInfo [in]
-
Type: D3DX10_IMAGE_LOAD_INFO*
Optional. Identifies the characteristics of a texture (see D3DX10_IMAGE_LOAD_INFO) when the data processor is created; set this to NULL to read the characteristics of a texture when the texture is loaded.
-
pPump [in]
-
Type: ID3DX10ThreadPump*
A pointer to a thread pump interface (see ID3DX10ThreadPump Interface). If NULL is specified, this function will behave synchronously and will not return until it is finished.
-
ppTexture [out]
-
Type: ID3D10Resource**
Address of a pointer to the created resource. See ID3D10Resource Interface.
-
pHResult [out]
-
Type: HRESULT*
A pointer to the return value. May be NULL. If pPump is not NULL, then pHResult must be a valid memory location until the asynchronous execution completes.
Type: HRESULT
The return value is one of the values listed in Direct3D 10 Return Codes.
For a list of supported image formats see D3DX10_IMAGE_FILE_FORMAT.
Requirement | Value |
---|---|
Header |
|
Library |
|