mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-05 23:28:48 +00:00
Merge remote-tracking branch 'offical/master'
This commit is contained in:
Vendored
+10
-31
@@ -86,7 +86,6 @@ import "core:fmt"
|
||||
import "core:mem"
|
||||
import "core:strings"
|
||||
|
||||
USE_LINALG :: #config(RAYLIB_USE_LINALG, true)
|
||||
import "core:math/linalg"
|
||||
_ :: linalg
|
||||
|
||||
@@ -213,39 +212,19 @@ BLANK :: Color{ 0, 0, 0, 0 } // Blank (Transparent)
|
||||
MAGENTA :: Color{ 255, 0, 255, 255 } // Magenta
|
||||
RAYWHITE :: Color{ 245, 245, 245, 255 } // My own White (raylib logo)
|
||||
|
||||
// Vector2 type
|
||||
Vector2 :: linalg.Vector2f32
|
||||
// Vector3 type
|
||||
Vector3 :: linalg.Vector3f32
|
||||
// Vector4 type
|
||||
Vector4 :: linalg.Vector4f32
|
||||
|
||||
when USE_LINALG {
|
||||
// Vector2 type
|
||||
Vector2 :: linalg.Vector2f32
|
||||
// Vector3 type
|
||||
Vector3 :: linalg.Vector3f32
|
||||
// Vector4 type
|
||||
Vector4 :: linalg.Vector4f32
|
||||
// Quaternion type
|
||||
Quaternion :: linalg.Quaternionf32
|
||||
|
||||
// Quaternion type
|
||||
Quaternion :: linalg.Quaternionf32
|
||||
// Matrix type (OpenGL style 4x4 - right handed, stored column major)
|
||||
Matrix :: linalg.Matrix4x4f32
|
||||
|
||||
// Matrix type (OpenGL style 4x4 - right handed, column major)
|
||||
Matrix :: linalg.Matrix4x4f32
|
||||
} else {
|
||||
// Vector2 type
|
||||
Vector2 :: distinct [2]f32
|
||||
// Vector3 type
|
||||
Vector3 :: distinct [3]f32
|
||||
// Vector4 type
|
||||
Vector4 :: distinct [4]f32
|
||||
|
||||
// Quaternion type
|
||||
Quaternion :: distinct quaternion128
|
||||
|
||||
// Matrix, 4x4 components, column major, OpenGL style, right handed
|
||||
Matrix :: struct {
|
||||
m0, m4, m8, m12: f32, // Matrix first row (4 components)
|
||||
m1, m5, m9, m13: f32, // Matrix second row (4 components)
|
||||
m2, m6, m10, m14: f32, // Matrix third row (4 components)
|
||||
m3, m7, m11, m15: f32, // Matrix fourth row (4 components)
|
||||
}
|
||||
}
|
||||
|
||||
// Color, 4 components, R8G8B8A8 (32bit)
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user