XMCOLOR::XMCOLOR(uint32_t) function (directxpackedvector.h)
Initializes a new instance of XMCOLOR
from a uint32_t
variable containing
component data in a packed format.
This constructor initializes a new instance of XMCOLOR from a
uint32_t
variable containing component data in a packed format.
Note This constructor is only available under C++.
Syntax
void XMCOLOR(
uint32_t Color
) noexcept;
Parameters
Color
The values of four color components in a packed format.
Return value
None
Remarks
The values defining the four components of the new instance of XMCOLOR
are
stored in the argument Packed
as follows:
-
The first 8 bits (bits 0-7) of Packed assigned, as an unsigned
integer, to the a member (alpha channel) of the instance of
XMCOLOR
constructed. -
The second 8 bits (bits 8-15) of Packed assigned, as an unsigned
integer, to the r member (red color channel) of the instance of
XMCOLOR
constructed. -
The third 8 bits (bits 16-23) of Packed assigned, as an unsigned
integer, to the g member (green color channel) of the instance of
XMCOLOR
constructed. -
The fourth 8 bits (bits 24-31) of Packed assigned, as an unsigned
integer, to the b member (blue color channel) of the instance of
XMCOLOR
constructed.
Requirements
Requirement | Value |
---|---|
Target Platform | Windows |
Header | directxpackedvector.h |
See also
Reference
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for