aboutsummaryrefslogtreecommitdiff
path: root/src/rlgl.h
diff options
context:
space:
mode:
authorraysan5 <raysan5@gmail.com>2016-01-20 18:20:05 +0100
committerraysan5 <raysan5@gmail.com>2016-01-20 18:20:05 +0100
commitefa1c96d19095c801a01dbf9b0214a82b7ae8c11 (patch)
tree7fedcc9545ef4277ea49dd9e54e150591d458a76 /src/rlgl.h
parentc8e8c0a0024a2301bbcc940233cbc4e82116242c (diff)
downloadraylib-efa1c96d19095c801a01dbf9b0214a82b7ae8c11.tar.gz
raylib-efa1c96d19095c801a01dbf9b0214a82b7ae8c11.zip
Adapted raymath as single header library
Added support for single header implementation and also inline functions support
Diffstat (limited to 'src/rlgl.h')
-rw-r--r--src/rlgl.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/rlgl.h b/src/rlgl.h
index 066e0339..fbece962 100644
--- a/src/rlgl.h
+++ b/src/rlgl.h
@@ -37,11 +37,12 @@
#endif
#if defined(RLGL_STANDALONE)
- #define RAYMATH_STANDALONE
+ #define RAYMATH_IMPLEMENTATION // Use raymath as a header-only library (includes implementation)
+ #define RAYMATH_EXTERN_INLINE // Compile raymath functions as static inline (remember, it's a compiler hint)
+ #define RAYMATH_STANDALONE // Not dependent on raylib.h structs: Vector3, Matrix
+ #include "raymath.h" // Required for Vector3 and Matrix functions
#endif
-#include "raymath.h" // Required for data type Matrix and Matrix functions
-
// Select desired OpenGL version
// NOTE: Those preprocessor defines are only used on rlgl module,
// if OpenGL version is required by any other module, it uses rlGetVersion()
@@ -92,7 +93,7 @@ typedef enum { RL_LINES, RL_TRIANGLES, RL_QUADS } DrawMode;
typedef enum { OPENGL_11 = 1, OPENGL_33, OPENGL_ES_20 } GlVersion;
-#ifdef RLGL_STANDALONE
+#if defined(RLGL_STANDALONE)
#ifndef __cplusplus
// Boolean type
typedef enum { false, true } bool;