ILampArray::SetColorsForIndices
Sets the color for one or more Lamps. Position within each array maps Lamp index to desired color.Syntax
Parameters
lampIndicesCount Type: uint32_t The size of the color and Lamp index buffers. lampIndices _In_reads_(scanCodesCount) Type: uint32_t* The array of Lamp indices for which color updates are being applied. desiredColors _In_reads_(scanCodesCount) Type: LampArrayColor* The array of corresponding Lamp colors.Return value
Type: voidRemarks
Lamp indices buffer and desired colors buffer are implied to be the same size. The Lamp indices passed into this API can be in any order. Black (a zero-filled LampArrayColor) is equivalent to a Lamp being ‘off’. The alpha value (LampArrayColor::a) represents the relative transparency of a color, where zero is fully transparent and 0xFF is fully opaque. If an alpha value other than 0xFF is used, the color will undergo an additional blending step against black. To avoid this blending step, do not pass in any alpha value other than 0xFF when setting colors. Lamp state will not be flushed to the device if the ILampArray is disabled for the current process (see ILampArray::SetIsEnabled). If a Lamp index does not exist on the device, it is ignored and the remaining indices are still applied. If a Lamp index is used multiple times in the same buffer, the API will overwrite the previous state of the Lamp at that index. The following sample shows how to set alternating colors for each Lamp in an ILampArray.Requirements
Header: LampArray.h Library: xgameplatform.lib Supported platforms: XBOX One family consoles and XBOX Series consolesSee also
Lighting API OverviewSetting Colors on a LampArray
LampArrayColor
ILampArray::SetColor
ILampArray::SetColorsForScanCodes
ILampArray
