libultraship
Reimplementations of libultra (N64 SDK) functions for modern hardware
Loading...
Searching...
No Matches
Color_RGBA8_u32 Union Reference

32-bit RGBA colour stored in a union that allows component and packed-integer access. More...

#include <color.h>

Public Attributes

struct { 
 
   uint8_t   a 
 Alpha channel (little-endian layout — lowest address byte). More...
 
   uint8_t   b 
 Blue channel (little-endian layout). More...
 
   uint8_t   g 
 Green channel (little-endian layout). More...
 
   uint8_t   r 
 Red channel (little-endian layout — highest address byte). More...
 
};  
 
uint32_t rgba
 All four channels packed into a single 32-bit integer.
 

Detailed Description

32-bit RGBA colour stored in a union that allows component and packed-integer access.

The byte order of the components within rgba depends on whether the target is big-endian (IS_BIGENDIAN defined) or little-endian. Use the named struct members for portable access and the rgba field only when a packed 32-bit representation is required (e.g. GPU uploads).

Note
Only use the rgba field when alignment requirements demand it.

Member Data Documentation

◆ [struct]

struct { ... } Color_RGBA8_u32

◆ a

uint8_t Color_RGBA8_u32::a

Alpha channel (little-endian layout — lowest address byte).

◆ b

uint8_t Color_RGBA8_u32::b

Blue channel (little-endian layout).

◆ g

uint8_t Color_RGBA8_u32::g

Green channel (little-endian layout).

◆ r

uint8_t Color_RGBA8_u32::r

Red channel (little-endian layout — highest address byte).

◆ rgba

uint32_t Color_RGBA8_u32::rgba

All four channels packed into a single 32-bit integer.


The documentation for this union was generated from the following file: