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

# XBTCArchiveReader::GetTextureOffset

> 取得封存中紋理之資料流資料的相關資訊，包括資料流資料的基底位移，以及下一個紋理之第一個資料流的索引。

取得封存中紋理之資料流資料的相關資訊，包括資料流資料的基底位移，以及下一個紋理之第一個資料流的索引。

<a id="syntaxSection" />

## 語法

```cpp theme={null}
XBTC_OFFSET_AND_INDEX* GetTextureOffset(  
         uint32_t ResourceIdx  
)  
```

<a id="parametersSection" />

### 參數

*ResourceIdx*\
類型: uint32\_t

紋理以零為起始的索引。

<a id="retvalSection" />

### 傳回值

類型: [XBTC\_OFFSET\_AND\_INDEX](/zh-TW/reference/graphics/xbtc/structs/xbtc_offset_and_index)\*

如果成功，則為指定紋理的 `XBTC_OFFSET_AND_INDEX` 結構；否則為 `nullptr`。

<a id="remarksSection" />

## 備註

此方法會傳回與紋理相關聯之資料流資料的相關資訊，包括資料流資料的基底位移，以及下一個紋理之第一個資料流的索引。如果 `ResourceIdx` 的值設定為現有紋理的索引，此方法會傳回包含該紋理資料流資料相關資訊的 [XBTC\_OFFSET\_AND\_INDEX](/zh-TW/reference/graphics/xbtc/structs/xbtc_texture_info) 結構。如果 `ResourceIdx` 的值設定為等於或大於封存中紋理數目的值，此方法會傳回 `nullptr`。如需 XBTC 封存內容與結構的詳細資訊，請參閱 [XBOX Texture Compressor (XBTC) 封存檔案規格](https://learn.microsoft.com/en-us/gaming/gdk/_content/gc/graphics/newfeatures/xbtc/xbtc-archive-format)。

<a id="requirementsSection" />

## 需求

**標頭:** XBTC.h

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

<a id="seealsoSection" />

## 另請參閱

[GetStreamInfo](/zh-TW/reference/graphics/xbtc/interfaces/XBTCArchiveReader/methods/xbtcarchivereader_getstreaminfo)\
[GetTextureInfo](/zh-TW/reference/graphics/xbtc/interfaces/XBTCArchiveReader/methods/xbtcarchivereader_gettextureinfo)\
[XBTCArchive](/zh-TW/reference/graphics/xbtc/interfaces/XBTCArchiveReader/xbtcarchivereader)\
[XBTC](/zh-TW/reference/graphics/xbtc/xbtc_members)


## Related topics

- [NDA topic directory - live Microsoft Learn links](/nda/nda-topic-directory.md)
- [NDA 主題目錄 - Microsoft Learn 線上連結](/zh-TW/nda/nda-topic-directory.md)
- [NDA 主题目录 - Microsoft Learn 在线链接](/zh-CN/nda/nda-topic-directory.md)
- [NDA トピック ディレクトリ - Microsoft Learn 公開版へのリンク](/ja-jp/nda/nda-topic-directory.md)
- [Diretório de tópicos NDA: links ativos do Microsoft Learn](/pt-BR/nda/nda-topic-directory.md)
