Events
Nov 19, 11 PM - Nov 21, 11 PM
Gain the competitive edge you need with powerful AI and Cloud solutions by attending Microsoft Ignite online.
Register nowThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Uses a user-provided function to fill each texel of each mip level of a given texture.
HRESULT D3DXFillTexture(
_Out_ LPDIRECT3DTEXTURE9 pTexture,
_In_ LPD3DXFILL2D pFunction,
_In_ LPVOID pData
);
pTexture [out]
Type: LPDIRECT3DTEXTURE9
Pointer to an IDirect3DTexture9 interface, representing the filled texture.
pFunction [in]
Type: LPD3DXFILL2D
Pointer to a user-provided evaluator function, which will be used to compute the value of each texel. The function follows the prototype of LPD3DXFILL2D.
pData [in]
Type: LPVOID
Pointer to an arbitrary block of user-defined data. This pointer will be passed to the function provided in pFunction.
Type: HRESULT
If the function succeeds, the return value is D3D_OK. If the function fails, the return value can be one of the following values: D3DERR_INVALIDCALL.
Here is an example that creates a function called ColorFill, which relies on D3DXFillTexture.
// Define a function that matches the prototype of LPD3DXFILL3D
VOID WINAPI ColorFill (D3DXVECTOR4* pOut, const D3DXVECTOR2* pTexCoord,
const D3DXVECTOR2* pTexelSize, LPVOID pData)
{
*pOut = D3DXVECTOR4(pTexCoord->x, pTexCoord->y, 0.0f, 0.0f);
}
// Fill the texture using D3DXFillTexture
if (FAILED (hr = D3DXFillTexture (m_pTexture, ColorFill, NULL)))
{
return hr;
}
Requirement | Value |
---|---|
Header |
|
Library |
|
Events
Nov 19, 11 PM - Nov 21, 11 PM
Gain the competitive edge you need with powerful AI and Cloud solutions by attending Microsoft Ignite online.
Register now