> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# XGCreateTextureComputerWithPitch (XBOX One 系列)

> 為 Direct3D12 樣式的資源描述建立紋理位址計算器物件。

為 Direct3D12 樣式的資源描述建立紋理位址計算器物件。

<a id="syntaxSection" />

## 語法

```cpp theme={null}
HRESULT XGCreateTextureComputerWithPitch(
         const XG_RESOURCE_DESC *pDesc,
         UINT Pitch,
         XGTextureAddressComputer **ppComputer
)  
```

<a id="ID4EG" />

### 參數

*pDesc*   \_In\_<br />類型：[XG\_RESOURCE\_DESC\*](/zh-TW/reference/graphics/xg__NR/structs/xg_resource_desc)

描述資源。

*Pitch*   \_In\_<br />類型：UINT

間距 (以紋素為單位)。

*ppComputer*   \_Out\_<br />類型：XGTextureAddressComputer\*\*

成功時，包含針對傳入的資源和間距所設定之 XGTextureAddressComputer 的位址。

<a id="ID4EO" />

### 傳回值

類型：[HRESULT](https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-erref/0642cb2f-2075-4469-918c-4441e69c548a)

如果成功，會傳回 **S\_OK**；否則會傳回錯誤碼。如需錯誤碼清單，請參閱[錯誤碼](/zh-TW/reference/errorcodes)。如果函式因 *pDesc* 描述的是緩衝區而失敗，傳回值會設為 **E\_INVALIDARG**。

<a id="remarks" />

## 備註

不支援緩衝區。

<a id="requirements" />

## 需求

**標頭：** xg.h

**程式庫：** xg\_x.lib

**支援的平台：** XBOX One 系列

## 另請參閱

[XG 參考](/zh-TW/reference/graphics/xg__NR/xg_members)


## Related topics

- [NDA 主題目錄 - Microsoft Learn 線上連結](/zh-TW/nda/nda-topic-directory.md)
- [PitchToShapeSrcSamplingIncrement](/zh-TW/reference/audio/shapesrccontext/functions/pitchtoshapesrcsamplingincrement.md)
- [GetShapeSrcPitch](/zh-TW/reference/audio/shapesrccontext/functions/getshapesrcpitch.md)
- [SetShapeSrcPitch](/zh-TW/reference/audio/shapesrccontext/functions/setshapesrcpitch.md)
- [GetShapeSrcPitchTarget](/zh-TW/reference/audio/shapesrccontext/functions/getshapesrcpitchtarget.md)
