mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-05 15:18:49 +00:00
Raylib: use fixed array instead of struct for rl.Color. This makes swizzling etc work, but the memory layout is still the same
This commit is contained in:
Vendored
+3
-6
@@ -245,12 +245,9 @@ when USE_LINALG {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Color, 4 components, R8G8B8A8 (32bit)
|
// Color, 4 components, R8G8B8A8 (32bit)
|
||||||
Color :: struct {
|
//
|
||||||
r: u8, // Color red value
|
// Note: In Raylib this is a struct. But here we use a fixed array, so that .rgba swizzling etc work.
|
||||||
g: u8, // Color green value
|
Color :: distinct [4]u8
|
||||||
b: u8, // Color blue value
|
|
||||||
a: u8, // Color alpha value
|
|
||||||
}
|
|
||||||
|
|
||||||
// Rectangle type
|
// Rectangle type
|
||||||
Rectangle :: struct {
|
Rectangle :: struct {
|
||||||
|
|||||||
Reference in New Issue
Block a user