> ## 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.

# XBTCBlockCompressTexture

> 建立線性紋理、為其配置紋理容器，並對其進行區塊壓縮。

建立線性紋理、為其配置紋理容器，並對其進行區塊壓縮。

## 語法

```cpp theme={null}
HRESULT XBTCBlockCompressTexture(  
         XBTCTextureContainer** ppBCTexture,  
         const XBTCTextureContainer* pSourceTexture,  
         DXGI_FORMAT BlockCompressFormat,  
         XBTC_ENCODING_OPTIONS Options= XBTC_DEFAULT_ENCODING_OPTIONS,  
         XBTC_ENCODING_STATS* pStats= nullptr  
)  
```

### 參數

*ppBCTexture*   \_Out\_\
類型：[XBTCTextureContainer](/zh-TW/reference/graphics/xbtc/interfaces/XBTCTextureContainer/xbtctexturecontainer)\*\*

指向 `XBTCTextureContainer` 位址的指標。

*pSourceTexture*   \_In\_\
類型：[XBTCTextureContainer](/zh-TW/reference/graphics/xbtc/interfaces/XBTCTextureContainer/xbtctexturecontainer)\*

指向來源 `XBTCTextureContainer` 的指標。

*BlockCompressFormat*   \_In\_\
類型：DXGI\_FORMAT

紋理格式 (用於 BCPack)。

*Options*   \_In\_\
類型：[XBTC\_ENCODING\_OPTIONS](/zh-TW/reference/graphics/xbtc/structs/xbtc_encoding_options)

壓縮編碼選項。

*pStats*   \_Out\_opt\_\
類型：[XBTC\_ENCODING\_STATS\*](/zh-TW/reference/graphics/xbtc/structs/xbtc_encoding_stats)

傳回時包含壓縮作業的編碼統計資料。

### 傳回值

類型：HRESULT

HRESULT 成功或錯誤碼。

## 備註

`XBTCBlockCompressTexture` 會對線性來源紋理進行區塊壓縮 (編碼為 BCn 格式)。
接著，函式會配置線性紋理以供輸出。

## 需求

**標頭:** XBTC.h

**支援的平台**: XBOX One 系列主機與 XBOX Series 主機

## 另請參閱

[XBTC](/zh-TW/reference/graphics/xbtc/xbtc_members)\
[XBOX Texture Compressor 概觀](https://learn.microsoft.com/en-us/gaming/gdk/_content/gc/graphics/newfeatures/xbtc/xbox-texture-compressor)


## Related topics

- [NDA topic directory - live Microsoft Learn links](/nda/nda-topic-directory.md)
- [Répertoire des rubriques NDA : liens actifs vers Microsoft Learn](/fr/nda/nda-topic-directory.md)
- [NDA トピック ディレクトリ - Microsoft Learn 公開版へのリンク](/ja-jp/nda/nda-topic-directory.md)
- [NDA 主題目錄 - Microsoft Learn 線上連結](/zh-TW/nda/nda-topic-directory.md)
- [XBOX Texture Compressor (XBTC) tool reference](/build/core-features/graphics/newfeatures/xbtc/index.md)
