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

> Returns the number of Lamp indices on a LampArray that match a given set of LampPurposes flags, used to size buffers for GetIndicesForPurposes.

# ILampArray::GetIndicesCountForPurposes

Returns the number of Lamp indices that support the given set of LampPurposes.

## Syntax

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

### Parameters

*lampPurposes*\
Type: [LampPurposes](/reference/lighting/lamparray/enums/lamppurposes)

The desired set of purposes to query.

### Return value

Type: uint32\_t

The number of Lamps on this ILampArray that support all values marked in LampPurposes.

## Remarks

Call this method prior to using [ILampArray::GetIndicesForPurposes](/reference/lighting/lamparray/interfaces/ilamparray/methods/ilamparray_getindicesforpurposes) to determine the maximum buffer size that function will support.

## Requirements

**Header:** LampArray.h

**Library:** xgameplatform.lib

**Supported platforms:** XBOX One family consoles and XBOX Series consoles

## See also

[Lighting API Overview](/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 method](/reference/lighting/lamparray/interfaces/ilamparray/methods/ilamparray_getindicesforpurposes.md)
- [ILampArray::GetLampCount method](/reference/lighting/lamparray/interfaces/ilamparray/methods/ilamparray_getlampcount.md)
- [ILampArray::SetColorsForIndices method](/reference/lighting/lamparray/interfaces/ilamparray/methods/ilamparray_setcolorsforindices.md)
- [ILampArray::GetLampInfo method](/reference/lighting/lamparray/interfaces/ilamparray/methods/ilamparray_getlampinfo.md)
- [ILampArray::GetLampArrayKind method](/reference/lighting/lamparray/interfaces/ilamparray/methods/ilamparray_getlamparraykind.md)
