mirror of
https://github.com/recp/cglm.git
synced 2026-02-17 03:39:05 +00:00
Make GLMS_ initializers use the GLM_ versions
So that we don't write them twice. More consistent this way.
This commit is contained in:
@@ -38,12 +38,8 @@
|
|||||||
#include "../mat3.h"
|
#include "../mat3.h"
|
||||||
#include "vec3.h"
|
#include "vec3.h"
|
||||||
|
|
||||||
#define GLMS_MAT3_IDENTITY_INIT {{1.0f, 0.0f, 0.0f, \
|
#define GLMS_MAT3_IDENTITY_INIT {GLM_MAT3_IDENTITY_INIT}
|
||||||
0.0f, 1.0f, 0.0f, \
|
#define GLMS_MAT3_ZERO_INIT {GLM_MAT3_ZERO_INIT}
|
||||||
0.0f, 0.0f, 1.0f}}
|
|
||||||
#define GLMS_MAT3_ZERO_INIT {{0.0f, 0.0f, 0.0f, \
|
|
||||||
0.0f, 0.0f, 0.0f, \
|
|
||||||
0.0f, 0.0f, 0.0f}}
|
|
||||||
|
|
||||||
/* for C only */
|
/* for C only */
|
||||||
#define GLMS_MAT3_IDENTITY ((mat3s)GLMS_MAT3_IDENTITY_INIT)
|
#define GLMS_MAT3_IDENTITY ((mat3s)GLMS_MAT3_IDENTITY_INIT)
|
||||||
|
|||||||
@@ -53,15 +53,8 @@
|
|||||||
#include "vec4.h"
|
#include "vec4.h"
|
||||||
#include "vec3.h"
|
#include "vec3.h"
|
||||||
|
|
||||||
#define GLMS_MAT4_IDENTITY_INIT {{1.0f, 0.0f, 0.0f, 0.0f, \
|
#define GLMS_MAT4_IDENTITY_INIT {GLM_MAT4_IDENTITY_INIT}
|
||||||
0.0f, 1.0f, 0.0f, 0.0f, \
|
#define GLMS_MAT4_ZERO_INIT {GLM_MAT4_ZERO_INIT}
|
||||||
0.0f, 0.0f, 1.0f, 0.0f, \
|
|
||||||
0.0f, 0.0f, 0.0f, 1.0f}}
|
|
||||||
|
|
||||||
#define GLMS_MAT4_ZERO_INIT {{0.0f, 0.0f, 0.0f, 0.0f, \
|
|
||||||
0.0f, 0.0f, 0.0f, 0.0f, \
|
|
||||||
0.0f, 0.0f, 0.0f, 0.0f, \
|
|
||||||
0.0f, 0.0f, 0.0f, 0.0f}}
|
|
||||||
|
|
||||||
/* for C only */
|
/* for C only */
|
||||||
#define GLMS_MAT4_IDENTITY ((mat4s)GLMS_MAT4_IDENTITY_INIT)
|
#define GLMS_MAT4_IDENTITY ((mat4s)GLMS_MAT4_IDENTITY_INIT)
|
||||||
|
|||||||
@@ -62,7 +62,7 @@
|
|||||||
* ----------------------------------------------------------------------------
|
* ----------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define GLMS_QUAT_IDENTITY_INIT GLM_QUAT_IDENTITY_INIT
|
#define GLMS_QUAT_IDENTITY_INIT {GLM_QUAT_IDENTITY_INIT}
|
||||||
#define GLMS_QUAT_IDENTITY ((versors)GLMS_QUAT_IDENTITY_INIT)
|
#define GLMS_QUAT_IDENTITY ((versors)GLMS_QUAT_IDENTITY_INIT)
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|||||||
@@ -86,15 +86,15 @@
|
|||||||
#include "../vec3.h"
|
#include "../vec3.h"
|
||||||
#include "vec3-ext.h"
|
#include "vec3-ext.h"
|
||||||
|
|
||||||
#define GLMS_VEC3_ONE_INIT {1.0f, 1.0f, 1.0f}
|
#define GLMS_VEC3_ONE_INIT {GLM_VEC3_ONE_INIT}
|
||||||
#define GLMS_VEC3_ZERO_INIT {0.0f, 0.0f, 0.0f}
|
#define GLMS_VEC3_ZERO_INIT {GLM_VEC3_ZERO_INIT}
|
||||||
|
|
||||||
#define GLMS_VEC3_ONE ((vec3s)GLMS_VEC3_ONE_INIT)
|
#define GLMS_VEC3_ONE ((vec3s)GLMS_VEC3_ONE_INIT)
|
||||||
#define GLMS_VEC3_ZERO ((vec3s)GLMS_VEC3_ZERO_INIT)
|
#define GLMS_VEC3_ZERO ((vec3s)GLMS_VEC3_ZERO_INIT)
|
||||||
|
|
||||||
#define GLMS_YUP ((vec3s){0.0f, 1.0f, 0.0f})
|
#define GLMS_YUP ((vec3s){{0.0f, 1.0f, 0.0f}})
|
||||||
#define GLMS_ZUP ((vec3s){0.0f, 0.0f, 1.0f})
|
#define GLMS_ZUP ((vec3s){{0.0f, 0.0f, 1.0f}})
|
||||||
#define GLMS_XUP ((vec3s){1.0f, 0.0f, 0.0f})
|
#define GLMS_XUP ((vec3s){{1.0f, 0.0f, 0.0f}})
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief init vec3 using vec4
|
* @brief init vec3 using vec4
|
||||||
|
|||||||
@@ -7,12 +7,12 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
Macros:
|
Macros:
|
||||||
GLM_VEC4_ONE_INIT
|
GLMS_VEC4_ONE_INIT
|
||||||
GLM_VEC4_BLACK_INIT
|
GLMS_VEC4_BLACK_INIT
|
||||||
GLM_VEC4_ZERO_INIT
|
GLMS_VEC4_ZERO_INIT
|
||||||
GLM_VEC4_ONE
|
GLMS_VEC4_ONE
|
||||||
GLM_VEC4_BLACK
|
GLMS_VEC4_BLACK
|
||||||
GLM_VEC4_ZERO
|
GLMS_VEC4_ZERO
|
||||||
|
|
||||||
Functions:
|
Functions:
|
||||||
CGLM_INLINE vec4s glms_vec4(vec3s v3, float last);
|
CGLM_INLINE vec4s glms_vec4(vec3s v3, float last);
|
||||||
@@ -72,9 +72,9 @@
|
|||||||
#include "../vec4.h"
|
#include "../vec4.h"
|
||||||
#include "vec4-ext.h"
|
#include "vec4-ext.h"
|
||||||
|
|
||||||
#define GLMS_VEC4_ONE_INIT {1.0f, 1.0f, 1.0f, 1.0f}
|
#define GLMS_VEC4_ONE_INIT {GLM_VEC4_ONE_INIT}
|
||||||
#define GLMS_VEC4_BLACK_INIT {0.0f, 0.0f, 0.0f, 1.0f}
|
#define GLMS_VEC4_BLACK_INIT {GLM_VEC4_BLACK_INIT}
|
||||||
#define GLMS_VEC4_ZERO_INIT {0.0f, 0.0f, 0.0f, 0.0f}
|
#define GLMS_VEC4_ZERO_INIT {GLM_VEC4_ZERO_INIT}
|
||||||
|
|
||||||
#define GLMS_VEC4_ONE ((vec4s)GLM_VEC4_ONE_INIT)
|
#define GLMS_VEC4_ONE ((vec4s)GLM_VEC4_ONE_INIT)
|
||||||
#define GLMS_VEC4_BLACK ((vec4s)GLM_VEC4_BLACK_INIT)
|
#define GLMS_VEC4_BLACK ((vec4s)GLM_VEC4_BLACK_INIT)
|
||||||
|
|||||||
Reference in New Issue
Block a user