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

# ILampArray::GetIndicesCountForPurposes

> ILampArray::GetIndicesCountForPurposes

# ILampArray::GetIndicesCountForPurposes

返回支持给定 LampPurposes 集合的 Lamp 索引数量。

## 语法

```cpp theme={null}
uint32_t GetIndicesCountForPurposes(
    LampPurposes lampPurposes)
```

### 参数

*lampPurposes*\
类型：[LampPurposes](/reference/lighting/lamparray/enums/lamppurposes)

要查询的所需用途集合。

### 返回值

类型：uint32\_t

此 ILampArray 上支持 LampPurposes 中所有标记值的 Lamp 数量。

## 备注

在使用 [ILampArray::GetIndicesForPurposes](/reference/lighting/lamparray/interfaces/ilamparray/methods/ilamparray_getindicesforpurposes) 之前，请调用此方法以确定该函数将支持的最大缓冲区大小。

## 要求

**头文件：** LampArray.h

**库：** xgameplatform.lib

**支持的平台：** XBOX One 系列主机和 XBOX Series 主机

## 另请参阅

[光照 API 概览](/build/core-features/common/lighting/gc-lighting-toc)\
[ILampArray::GetIndicesForPurposes](/reference/lighting/lamparray/interfaces/ilamparray/methods/ilamparray_getindicesforpurposes)\
[ILampArray](/reference/lighting/lamparray/interfaces/ilamparray/ilamparray)


## Related topics

- [ILampArray::GetIndicesForPurposes](/zh-CN/reference/lighting/lamparray/interfaces/ilamparray/methods/ilamparray_getindicesforpurposes.md)
- [LampPurposes 枚举](/zh-CN/reference/lighting/lamparray/enums/lamppurposes.md)
- [ILampArray::GetLampCount](/zh-CN/reference/lighting/lamparray/interfaces/ilamparray/methods/ilamparray_getlampcount.md)
- [ILampArray](/zh-CN/reference/lighting/lamparray/interfaces/ilamparray/ilamparray.md)
- [ILampArray::SetColorsForIndices](/zh-CN/reference/lighting/lamparray/interfaces/ilamparray/methods/ilamparray_setcolorsforindices.md)
