REVIEWED: Added new mechanism to avoid data types collision between modules that share same data types and can be used in standalone mode

This commit is contained in:
raysan5 2021-07-30 13:44:52 +02:00
parent aeb1a0da84
commit b4fddf146b
6 changed files with 490 additions and 494 deletions

View file

@ -48,14 +48,12 @@
*
********************************************************************************************/
#define RAYMATH_STANDALONE
#define RAYMATH_HEADER_ONLY
#include "raymath.h" // Vector3, Quaternion and Matrix functionality
#define RLGL_IMPLEMENTATION
#define RLGL_STANDALONE
#include "rlgl.h" // OpenGL abstraction layer to OpenGL 1.1, 3.3+ or ES2
#define RAYMATH_STATIC_INLINE
#include "raymath.h" // Vector3, Quaternion and Matrix functionality
#if defined(__EMSCRIPTEN__)
#define GLFW_INCLUDE_ES2
#endif
@ -79,21 +77,6 @@ typedef struct Color {
unsigned char a; // Color alpha value
} Color;
#if !defined(RAYMATH_STANDALONE)
// Vector2, 2 components
typedef struct Vector2 {
float x; // Vector x component
float y; // Vector y component
} Vector2;
// Vector3, 3 components
typedef struct Vector3 {
float x; // Vector x component
float y; // Vector y component
float z; // Vector z component
} Vector3;
#endif
// Camera type, defines a camera position/orientation in 3d space
typedef struct Camera {
Vector3 position; // Camera position