Computes the hardware layout for a 2D texture.
HRESULT XGComputeTexture2DLayout(
const XG_TEXTURE2D_DESC *pDesc,
XG_RESOURCE_LAYOUT *pLayout
)
pDesc
Type: XG_TEXTURE2D_DESC *
[in] A description of a 2D texture, as a pointer to an XG_TEXTURE2D_DESC structure.
pLayout
Type: XG_RESOURCE_LAYOUT *
[out] The hardware layout, as a pointer to an XG_RESOURCE_LAYOUT structure.
Type: HRESULT
S_OK if successful; otherwise, an error code.
Returns E_INVALIDARG in the following cases:
Use this convenience function instead of creating a texture computer when you only need to compute a layout and you don’t need to use ony of the other features of a texture computer. This function internally creates a texture computer, calls XGTextureAddressComputer::GetResourceLayout Method, and then releases the texture computer.
Header: Declared in xg.h.
Library: Use xg_x.lib.