Compare commits

...

41 Commits

Author SHA1 Message Date
Recep Aslantas
77b4c5cffb reset visual studio tool verisons 2023-03-16 13:16:24 +03:00
Recep Aslantas
e276b5b405 Update intrin.h 2023-03-14 09:54:32 +03:00
Recep Aslantas
13ed79a61a arm: fix checking arm64 2023-03-12 16:43:47 +03:00
Recep Aslantas
ba993b3ea9 arm: use intrin to set/init vec4 as @gottfriedleibniz suggests 2023-03-11 14:15:30 +03:00
Recep Aslantas
4a6fc485fd use CGLM_SIMD_NEON instead of CGLM_NEON_FP 2023-03-09 22:16:39 +03:00
Recep Aslantas
9ed325018d Update intrin.h 2023-03-09 22:06:20 +03:00
Recep Aslantas
a30baffafa arm: update ARM/NEON macros 2023-03-09 21:56:25 +03:00
Recep Aslantas
8a117017ea fix building ARM NEON on windows & msvc 2023-03-07 13:11:08 +03:00
Recep Aslantas
799749fc6a Merge pull request #279 from NeRdTheNed/master
Check for builtin before using it
2023-03-07 03:44:36 +03:00
Ned Loynd
f4c9ddf530 Check for builtin before using it
The check for __has_builtin being defined and using the __has_builtin() macro need to be on different lines, as when __has_builtin is not defined, using the __has_builtin() macro is an invalid preprocessor directive.
2023-03-07 10:17:44 +11:00
Recep Aslantas
bc8dc72739 now working on v0.9.0 2023-02-08 18:12:23 +03:00
Recep Aslantas
3eafc599ac Merge pull request #277 from Ransel117/patch-1
Fixed glm_mat4_mulv3
2023-02-08 18:09:58 +03:00
Ransel117
7fba424f64 Fixed glm_mat4_mulv3
Fixed it so that the function has all of it's parameters in the comments
2023-02-05 20:57:36 +01:00
Recep Aslantas
c51040cd41 Merge pull request #276 from recp/cmake-fix-buildtype
cmake: prevent overriding CMAKE_BUILD_TYPE if it is subdirectory
2023-01-27 21:01:54 +03:00
Recep Aslantas
9fc3a20d0f cmake: prevent overriding CMAKE_BUILD_TYPE if it is subdirectory 2023-01-26 11:07:08 +03:00
Recep Aslantas
7f1c062696 Merge pull request #274 from duarm/master
Adding initialization macros for ivec types
2023-01-17 21:07:32 +03:00
duarm
e70571e9e0 ivec initialization macros docs, fixing vec2 macro docs 2023-01-15 20:52:18 -03:00
duarm
007ee48b58 adding initialization macros for ivec types 2023-01-15 20:47:40 -03:00
Recep Aslantas
38771599c7 Merge pull request #273 from JulianSchoenbaechler/fix-Wdouble-promotion
Make implicit double promotion/casting explicit (fixes #228)
2022-12-31 21:18:40 +03:00
Julian Schönbächler
bfd87acfc4 Make double promotion in printf args explicit
Also use f-suffix on epsilon definitions for float comparisons.
2022-12-29 13:00:15 +01:00
Recep Aslantas
a38622e1d6 Merge pull request #272 from Artturin/revert259
Revert "fix: simplified pkgconfig generation"
2022-12-19 20:07:37 +03:00
Artturin
9c7012bb39 Revert "fix: simplified pkgconfig generation"
This reverts commit c7393f75c3.
2022-12-19 00:22:55 +02:00
Recep Aslantas
71367b67cf now working on v0.8.9 2022-12-14 14:12:29 +03:00
Recep Aslantas
3894ea32fb Merge pull request #270 from suicvne/cglm-pc-fix-cmake
Switch CMAKE_BINARY_DIR to CMAKE_CURRENT_BINARY_DIR for cmake.pc
2022-12-13 20:17:03 +03:00
Michael Santiago
a430408ec4 Switch CMAKE_BINARY_DIR to CMAKE_CURRENT_BINARY_DIR for cmake.pc install target 2022-12-13 10:59:54 -05:00
Recep Aslantas
3815e18fea bring the fix https://github.com/recp/cglm/pull/269 outside Emscripten 2022-12-12 00:37:07 +03:00
Recep Aslantas
8b5eaa5301 Merge pull request #269 from KivApple/master
Fix missing abs declaration on Emscripten
2022-12-09 14:54:37 +03:00
Ivan Kolesikov
6037618942 Fix missing abs declaration on Emscripten 2022-12-09 00:24:53 +01:00
Recep Aslantas
c6d198d780 Merge pull request #268 from bl4ckb0ne/test-clamp-fix
test_clamp: use glm_eq for floating point comparison
2022-12-07 23:17:13 +03:00
Simon Zeni
d001593f9c test_clamp: use glm_eq for floating point comparison
Fixes #266
2022-12-07 15:06:45 -05:00
Recep Aslantas
ac9461778c possible fix for https://github.com/recp/cglm/issues/266 2022-12-07 12:57:26 +03:00
Recep Aslantas
0b3d227568 Merge branch 'master' of https://github.com/recp/cglm 2022-12-07 12:55:57 +03:00
Recep Aslantas
78236d24a1 now working on v0.8.8 2022-12-07 12:55:51 +03:00
Recep Aslantas
b41858f184 Merge pull request #265 from duarm/abs-functions
New abs functions for vec2, ivec2, ivec3, ivec4
2022-11-20 12:16:49 +03:00
duarm
60bf21ba43 add missing table of contents 2022-11-19 17:48:32 -03:00
duarm
2386cdcc19 docs 2022-11-19 17:46:08 -03:00
duarm
a0f01c5ed1 new abs functions for vec2, ivec2, ivec3, ivec4 2022-11-18 14:28:39 -03:00
Recep Aslantas
8cfc98d283 Merge branch 'master' of https://github.com/recp/cglm 2022-10-26 23:15:54 +03:00
Recep Aslantas
074189163f add missing struct affine functions and headers 2022-10-26 23:15:27 +03:00
Recep Aslantas
bfbd9ba1dc add struct affine functions and headers 2022-10-26 23:13:36 +03:00
Recep Aslantas
89cee7912a now working on v0.8.7 2022-10-26 23:12:52 +03:00
50 changed files with 1281 additions and 238 deletions

View File

@@ -1,4 +1,5 @@
{
"C_Cpp.default.configurationProvider": "vector-of-bool.cmake-tools",
"restructuredtext.confPath": "${workspaceFolder}/docs/source"
"restructuredtext.confPath": "${workspaceFolder}/docs/source",
"workbench.colorTheme": "Visual Studio Dark - C++"
}

View File

@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.8.2)
project(cglm
VERSION 0.8.6
VERSION 0.9.0
HOMEPAGE_URL https://github.com/recp/cglm
DESCRIPTION "OpenGL Mathematics (glm) for C"
LANGUAGES C
@@ -41,7 +41,9 @@ else()
add_compile_options(-Wall -Werror -O3)
endif()
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
get_directory_property(hasParent PARENT_DIRECTORY)
if(NOT hasParent AND NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
message(STATUS "Setting build type to '${DEFAULT_BUILD_TYPE}' as none was specified.")
set(CMAKE_BUILD_TYPE "${DEFAULT_BUILD_TYPE}" CACHE STRING "Choose the type of build." FORCE)
# Set the possible values of build type for cmake-gui
@@ -157,7 +159,21 @@ install(EXPORT ${PROJECT_NAME}
NAMESPACE ${PROJECT_NAME}::
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME})
set(PACKAGE_NAME ${PROJECT_NAME})
set(prefix ${CMAKE_INSTALL_PREFIX})
set(exec_prefix ${CMAKE_INSTALL_PREFIX})
if (IS_ABSOLUTE "${CMAKE_INSTALL_INCLUDEDIR}")
set(includedir "${CMAKE_INSTALL_INCLUDEDIR}")
else()
set(includedir "\${prefix}/${CMAKE_INSTALL_INCLUDEDIR}")
endif()
if (IS_ABSOLUTE "${CMAKE_INSTALL_LIBDIR}")
set(libdir "${CMAKE_INSTALL_LIBDIR}")
else()
set(libdir "\${exec_prefix}/${CMAKE_INSTALL_LIBDIR}")
endif()
set(PACKAGE_VERSION "${PROJECT_VERSION}")
configure_file(cglm.pc.in cglm.pc @ONLY)
install(FILES ${CMAKE_BINARY_DIR}/cglm.pc
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/cglm.pc
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)

View File

@@ -45,6 +45,8 @@ cglm_HEADERS = include/cglm/version.h \
include/cglm/mat4.h \
include/cglm/mat3.h \
include/cglm/mat2.h \
include/cglm/affine-pre.h \
include/cglm/affine-post.h \
include/cglm/affine.h \
include/cglm/affine-mat.h \
include/cglm/vec2.h \

View File

@@ -1,11 +1,11 @@
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix="${prefix}"
libdir="${exec_prefix}/lib"
includedir="${prefix}/include"
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
Name: @PROJECT_NAME@
Description: @CMAKE_PROJECT_DESCRIPTION@
URL: @CMAKE_PROJECT_HOMEPAGE_URL@
Version: @PROJECT_VERSION@
Name: @PACKAGE_NAME@
Description: OpenGL Mathematics (glm) for C
URL: https://github.com/recp/cglm
Version: @PACKAGE_VERSION@
Cflags: -I${includedir}
Libs: -L${libdir} -lcglm @LIBS@

View File

@@ -2,7 +2,7 @@ Pod::Spec.new do |s|
# Description
s.name = "cglm"
s.version = "0.8.4"
s.version = "0.8.9"
s.summary = "📽 Highly Optimized Graphics Math (glm) for C"
s.description = <<-DESC
cglm is math library for graphics programming for C. See the documentation or README for all features.

View File

@@ -7,7 +7,7 @@
#*****************************************************************************
AC_PREREQ([2.69])
AC_INIT([cglm], [0.8.6], [info@recp.me])
AC_INIT([cglm], [0.9.0], [info@recp.me])
AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects serial-tests])
# Don't use the default cflags (-O2 -g), we set ours manually in Makefile.am.

View File

@@ -62,9 +62,9 @@ author = u'Recep Aslantas'
# built documents.
#
# The short X.Y version.
version = u'0.8.6'
version = u'0.9.0'
# The full version, including alpha/beta/rc tags.
release = u'0.8.6'
release = u'0.9.0'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.

View File

@@ -8,6 +8,13 @@ Header: cglm/ivec2.h
Table of contents (click to go):
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Macros:
1. GLM_IVEC2_ONE_INIT
#. GLM_IVEC2_ZERO_INIT
#. GLM_IVEC2_ONE
#. GLM_IVEC2_ZERO
Functions:
1. :c:func:`glm_ivec2`
@@ -25,6 +32,7 @@ Functions:
#. :c:func:`glm_ivec2_maxv`
#. :c:func:`glm_ivec2_minv`
#. :c:func:`glm_ivec2_clamp`
#. :c:func:`glm_ivec2_abs`
Functions documentation
~~~~~~~~~~~~~~~~~~~~~~~
@@ -161,3 +169,11 @@ Functions documentation
| *[in, out]* **v** vector
| *[in]* **minVal** minimum value
| *[in]* **maxVal** maximum value
.. c:function:: void glm_ivec2_abs(ivec2 v, ivec2 dest)
absolute value of each vector item
Parameters:
| *[in]* **v** vector
| *[out]* **dest** destination vector

View File

@@ -8,6 +8,13 @@ Header: cglm/ivec3.h
Table of contents (click to go):
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Macros:
1. GLM_IVEC3_ONE_INIT
#. GLM_IVEC3_ZERO_INIT
#. GLM_IVEC3_ONE
#. GLM_IVEC3_ZERO
Functions:
1. :c:func:`glm_ivec3`
@@ -25,6 +32,7 @@ Functions:
#. :c:func:`glm_ivec3_maxv`
#. :c:func:`glm_ivec3_minv`
#. :c:func:`glm_ivec3_clamp`
#. :c:func:`glm_ivec2_abs`
Functions documentation
~~~~~~~~~~~~~~~~~~~~~~~
@@ -161,3 +169,11 @@ Functions documentation
| *[in, out]* **v** vector
| *[in]* **minVal** minimum value
| *[in]* **maxVal** maximum value
.. c:function:: void glm_ivec3_abs(ivec3 v, ivec3 dest)
absolute value of each vector item
Parameters:
| *[in]* **v** vector
| *[out]* **dest** destination vector

View File

@@ -8,6 +8,13 @@ Header: cglm/ivec4.h
Table of contents (click to go):
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Macros:
1. GLM_IVEC4_ONE_INIT
#. GLM_IVEC4_ZERO_INIT
#. GLM_IVEC4_ONE
#. GLM_IVEC4_ZERO
Functions:
1. :c:func:`glm_ivec4`
@@ -25,6 +32,7 @@ Functions:
#. :c:func:`glm_ivec4_maxv`
#. :c:func:`glm_ivec4_minv`
#. :c:func:`glm_ivec4_clamp`
#. :c:func:`glm_ivec4_abs`
Functions documentation
~~~~~~~~~~~~~~~~~~~~~~~
@@ -161,3 +169,11 @@ Functions documentation
| *[in, out]* **v** vector
| *[in]* **minVal** minimum value
| *[in]* **maxVal** maximum value
.. c:function:: void glm_ivec4_abs(ivec4 v, ivec4 dest)
absolute value of each vector item
Parameters:
| *[in]* **v** vector
| *[out]* **dest** destination vector

View File

@@ -26,6 +26,7 @@ Functions:
#. :c:func:`glm_vec2_isinf`
#. :c:func:`glm_vec2_isvalid`
#. :c:func:`glm_vec2_sign`
#. :c:func:`glm_vec2_abs`
#. :c:func:`glm_vec2_sqrt`
Functions documentation
@@ -125,6 +126,14 @@ Functions documentation
| *[in]* **v** vector
| *[out]* **dest** sign vector (only keeps signs as -1, 0, -1)
.. c:function:: void glm_vec2_abs(vec2 v, vec2 dest)
absolute value of each vector item
Parameters:
| *[in]* **v** vector
| *[out]* **dest** destination vector
.. c:function:: void glm_vec2_sqrt(vec2 v, vec2 dest)
square root of each vector item

View File

@@ -10,10 +10,10 @@ Table of contents (click to go):
Macros:
1. GLM_vec2_ONE_INIT
#. GLM_vec2_ZERO_INIT
#. GLM_vec2_ONE
#. GLM_vec2_ZERO
1. GLM_VEC2_ONE_INIT
#. GLM_VEC2_ZERO_INIT
#. GLM_VEC2_ONE
#. GLM_VEC2_ZERO
Functions:

View File

@@ -27,6 +27,7 @@ Functions:
#. :c:func:`glm_vec3_isinf`
#. :c:func:`glm_vec3_isvalid`
#. :c:func:`glm_vec3_sign`
#. :c:func:`glm_vec3_abs`
#. :c:func:`glm_vec3_sqrt`
Functions documentation
@@ -134,6 +135,14 @@ Functions documentation
| *[in]* **v** vector
| *[out]* **dest** sign vector (only keeps signs as -1, 0, -1)
.. c:function:: void glm_vec3_abs(vec3 v, vec3 dest)
absolute value of each vector item
Parameters:
| *[in]* **v** vector
| *[out]* **dest** destination vector
.. c:function:: void glm_vec3_sqrt(vec3 v, vec3 dest)
square root of each vector item

View File

@@ -73,6 +73,10 @@ CGLM_EXPORT
void
glmc_ivec2_clamp(ivec2 v, int minVal, int maxVal);
CGLM_EXPORT
void
glmc_ivec2_abs(ivec2 v, ivec2 dest);
#ifdef __cplusplus
}
#endif

View File

@@ -73,6 +73,10 @@ CGLM_EXPORT
void
glmc_ivec3_clamp(ivec3 v, int minVal, int maxVal);
CGLM_EXPORT
void
glmc_ivec3_abs(ivec3 v, ivec3 dest);
#ifdef __cplusplus
}
#endif

View File

@@ -73,6 +73,10 @@ CGLM_EXPORT
void
glmc_ivec4_clamp(ivec4 v, int minVal, int maxVal);
CGLM_EXPORT
void
glmc_ivec4_abs(ivec4 v, ivec4 dest);
#ifdef __cplusplus
}
#endif

View File

@@ -145,6 +145,10 @@ CGLM_EXPORT
void
glmc_vec2_clamp(vec2 v, float minval, float maxval);
CGLM_EXPORT
void
glmc_vec2_abs(vec2 v, vec2 dest);
CGLM_EXPORT
void
glmc_vec2_lerp(vec2 from, vec2 to, float t, vec2 dest);

View File

@@ -18,6 +18,7 @@
#include <stdint.h>
#include <stddef.h>
#include <stdlib.h>
#include <math.h>
#include <float.h>
#include <stdbool.h>
@@ -44,7 +45,7 @@
#ifndef CGLM_USE_DEFAULT_EPSILON
# ifndef GLM_FLT_EPSILON
# define GLM_FLT_EPSILON 1e-5
# define GLM_FLT_EPSILON 1e-5f
# endif
#else
# define GLM_FLT_EPSILON FLT_EPSILON

View File

@@ -49,7 +49,7 @@
#endif
#ifndef CGLM_PRINT_MAX_TO_SHORT
# define CGLM_PRINT_MAX_TO_SHORT 1e5
# define CGLM_PRINT_MAX_TO_SHORT 1e5f
#endif
#ifndef CGLM_PRINT_COLOR
@@ -77,9 +77,9 @@ glm_mat4_print(mat4 matrix,
for (i = 0; i < m; i++) {
for (j = 0; j < n; j++) {
if (matrix[i][j] < CGLM_PRINT_MAX_TO_SHORT)
cwi = sprintf(buff, "% .*f", CGLM_PRINT_PRECISION, matrix[i][j]);
cwi = sprintf(buff, "% .*f", CGLM_PRINT_PRECISION, (double)matrix[i][j]);
else
cwi = sprintf(buff, "% g", matrix[i][j]);
cwi = sprintf(buff, "% g", (double)matrix[i][j]);
cw[i] = GLM_MAX(cw[i], cwi);
}
}
@@ -89,9 +89,9 @@ glm_mat4_print(mat4 matrix,
for (j = 0; j < n; j++)
if (matrix[i][j] < CGLM_PRINT_MAX_TO_SHORT)
fprintf(ostream, " % *.*f", cw[j], CGLM_PRINT_PRECISION, matrix[j][i]);
fprintf(ostream, " % *.*f", cw[j], CGLM_PRINT_PRECISION, (double)matrix[j][i]);
else
fprintf(ostream, " % *g", cw[j], matrix[j][i]);
fprintf(ostream, " % *g", cw[j], (double)matrix[j][i]);
fprintf(ostream, " |\n");
}
@@ -120,22 +120,22 @@ glm_mat3_print(mat3 matrix,
for (i = 0; i < m; i++) {
for (j = 0; j < n; j++) {
if (matrix[i][j] < CGLM_PRINT_MAX_TO_SHORT)
cwi = sprintf(buff, "% .*f", CGLM_PRINT_PRECISION, matrix[i][j]);
cwi = sprintf(buff, "% .*f", CGLM_PRINT_PRECISION, (double)matrix[i][j]);
else
cwi = sprintf(buff, "% g", matrix[i][j]);
cwi = sprintf(buff, "% g", (double)matrix[i][j]);
cw[i] = GLM_MAX(cw[i], cwi);
}
}
for (i = 0; i < m; i++) {
fprintf(ostream, " |");
for (j = 0; j < n; j++)
if (matrix[i][j] < CGLM_PRINT_MAX_TO_SHORT)
fprintf(ostream, " % *.*f", cw[j], CGLM_PRINT_PRECISION, matrix[j][i]);
fprintf(ostream, " % *.*f", cw[j], CGLM_PRINT_PRECISION, (double)matrix[j][i]);
else
fprintf(ostream, " % *g", cw[j], matrix[j][i]);
fprintf(ostream, " % *g", cw[j], (double)matrix[j][i]);
fprintf(ostream, " |\n");
}
@@ -162,22 +162,22 @@ glm_mat2_print(mat2 matrix,
for (i = 0; i < m; i++) {
for (j = 0; j < n; j++) {
if (matrix[i][j] < CGLM_PRINT_MAX_TO_SHORT)
cwi = sprintf(buff, "% .*f", CGLM_PRINT_PRECISION, matrix[i][j]);
cwi = sprintf(buff, "% .*f", CGLM_PRINT_PRECISION, (double)matrix[i][j]);
else
cwi = sprintf(buff, "% g", matrix[i][j]);
cwi = sprintf(buff, "% g", (double)matrix[i][j]);
cw[i] = GLM_MAX(cw[i], cwi);
}
}
for (i = 0; i < m; i++) {
fprintf(ostream, " |");
for (j = 0; j < n; j++)
if (matrix[i][j] < CGLM_PRINT_MAX_TO_SHORT)
fprintf(ostream, " % *.*f", cw[j], CGLM_PRINT_PRECISION, matrix[j][i]);
fprintf(ostream, " % *.*f", cw[j], CGLM_PRINT_PRECISION, (double)matrix[j][i]);
else
fprintf(ostream, " % *g", cw[j], matrix[j][i]);
fprintf(ostream, " % *g", cw[j], (double)matrix[j][i]);
fprintf(ostream, " |\n");
}
@@ -199,9 +199,9 @@ glm_vec4_print(vec4 vec,
for (i = 0; i < m; i++) {
if (vec[i] < CGLM_PRINT_MAX_TO_SHORT)
fprintf(ostream, " % .*f", CGLM_PRINT_PRECISION, vec[i]);
fprintf(ostream, " % .*f", CGLM_PRINT_PRECISION, (double)vec[i]);
else
fprintf(ostream, " % g", vec[i]);
fprintf(ostream, " % g", (double)vec[i]);
}
fprintf(ostream, " )" CGLM_PRINT_COLOR_RESET "\n\n");
@@ -221,9 +221,9 @@ glm_vec3_print(vec3 vec,
for (i = 0; i < m; i++) {
if (vec[i] < CGLM_PRINT_MAX_TO_SHORT)
fprintf(ostream, " % .*f", CGLM_PRINT_PRECISION, vec[i]);
fprintf(ostream, " % .*f", CGLM_PRINT_PRECISION, (double)vec[i]);
else
fprintf(ostream, " % g", vec[i]);
fprintf(ostream, " % g", (double)vec[i]);
}
fprintf(ostream, " )" CGLM_PRINT_COLOR_RESET "\n\n");
@@ -245,7 +245,7 @@ glm_ivec3_print(ivec3 vec,
fprintf(ostream, " % d", vec[i]);
fprintf(ostream, " )" CGLM_PRINT_COLOR_RESET "\n\n");
#undef m
}
@@ -261,9 +261,9 @@ glm_vec2_print(vec2 vec,
for (i = 0; i < m; i++) {
if (vec[i] < CGLM_PRINT_MAX_TO_SHORT)
fprintf(ostream, " % .*f", CGLM_PRINT_PRECISION, vec[i]);
fprintf(ostream, " % .*f", CGLM_PRINT_PRECISION, (double)vec[i]);
else
fprintf(ostream, " % g", vec[i]);
fprintf(ostream, " % g", (double)vec[i]);
}
fprintf(ostream, " )" CGLM_PRINT_COLOR_RESET "\n\n");
@@ -283,9 +283,9 @@ glm_versor_print(versor vec,
for (i = 0; i < m; i++) {
if (vec[i] < CGLM_PRINT_MAX_TO_SHORT)
fprintf(ostream, " % .*f", CGLM_PRINT_PRECISION, vec[i]);
fprintf(ostream, " % .*f", CGLM_PRINT_PRECISION, (double)vec[i]);
else
fprintf(ostream, " % g", vec[i]);
fprintf(ostream, " % g", (double)vec[i]);
}
@@ -307,12 +307,12 @@ glm_aabb_print(vec3 bbox[2],
for (i = 0; i < 2; i++) {
fprintf(ostream, " (");
for (j = 0; j < m; j++) {
if (bbox[i][j] < CGLM_PRINT_MAX_TO_SHORT)
fprintf(ostream, " % .*f", CGLM_PRINT_PRECISION, bbox[i][j]);
fprintf(ostream, " % .*f", CGLM_PRINT_PRECISION, (double)bbox[i][j]);
else
fprintf(ostream, " % g", bbox[i][j]);
fprintf(ostream, " % g", (double)bbox[i][j]);
}
fprintf(ostream, " )\n");

View File

@@ -6,7 +6,13 @@
*/
/*
FUNCTIONS:
Macros:
GLM_IVEC2_ONE_INIT
GLM_IVEC2_ZERO_INIT
GLM_IVEC2_ONE
GLM_IVEC2_ZERO
Functions:
CGLM_INLINE void glm_ivec2(int * __restrict v, ivec2 dest)
CGLM_INLINE void glm_ivec2_copy(ivec2 a, ivec2 dest)
CGLM_INLINE void glm_ivec2_zero(ivec2 v)
@@ -22,6 +28,7 @@ FUNCTIONS:
CGLM_INLINE void glm_ivec2_maxv(ivec2 a, ivec2 b, ivec2 dest)
CGLM_INLINE void glm_ivec2_minv(ivec2 a, ivec2 b, ivec2 dest)
CGLM_INLINE void glm_ivec2_clamp(ivec2 v, int minVal, int maxVal)
CGLM_INLINE void glm_ivec2_abs(ivec2 v, ivec2 dest)
*/
#ifndef cglm_ivec2_h
@@ -29,6 +36,12 @@ FUNCTIONS:
#include "common.h"
#define GLM_IVEC2_ONE_INIT {1, 1}
#define GLM_IVEC2_ZERO_INIT {0, 0}
#define GLM_IVEC2_ONE ((ivec2)GLM_IVEC2_ONE_INIT)
#define GLM_IVEC2_ZERO ((ivec2)GLM_IVEC2_ZERO_INIT)
/*!
* @brief init ivec2 using vec3 or vec4
*
@@ -239,4 +252,17 @@ glm_ivec2_clamp(ivec2 v, int minVal, int maxVal) {
v[1] = maxVal;
}
/*!
* @brief absolute value of v
*
* @param[in] v vector
* @param[out] dest destination
*/
CGLM_INLINE
void
glm_ivec2_abs(ivec2 v, ivec2 dest) {
dest[0] = abs(v[0]);
dest[1] = abs(v[1]);
}
#endif /* cglm_ivec2_h */

View File

@@ -6,7 +6,13 @@
*/
/*
FUNCTIONS:
Macros:
GLM_IVEC3_ONE_INIT
GLM_IVEC3_ZERO_INIT
GLM_IVEC3_ONE
GLM_IVEC3_ZERO
Functions:
CGLM_INLINE void glm_ivec3(ivec4 v4, ivec3 dest)
CGLM_INLINE void glm_ivec3_copy(ivec3 a, ivec3 dest)
CGLM_INLINE void glm_ivec3_zero(ivec3 v)
@@ -22,6 +28,7 @@ FUNCTIONS:
CGLM_INLINE void glm_ivec3_maxv(ivec3 a, ivec3 b, ivec3 dest)
CGLM_INLINE void glm_ivec3_minv(ivec3 a, ivec3 b, ivec3 dest)
CGLM_INLINE void glm_ivec3_clamp(ivec3 v, int minVal, int maxVal)
CGLM_INLINE void glm_ivec3_abs(ivec3 v, ivec3 dest)
*/
#ifndef cglm_ivec3_h
@@ -29,6 +36,12 @@ FUNCTIONS:
#include "common.h"
#define GLM_IVEC3_ONE_INIT {1, 1, 1}
#define GLM_IVEC3_ZERO_INIT {0, 0, 0}
#define GLM_IVEC3_ONE ((ivec3)GLM_IVEC3_ONE_INIT)
#define GLM_IVEC3_ZERO ((ivec3)GLM_IVEC3_ZERO_INIT)
/*!
* @brief init ivec3 using ivec4
*
@@ -255,4 +268,18 @@ glm_ivec3_clamp(ivec3 v, int minVal, int maxVal) {
v[2] = maxVal;
}
/*!
* @brief absolute value of v
*
* @param[in] v vector
* @param[out] dest destination
*/
CGLM_INLINE
void
glm_ivec3_abs(ivec3 v, ivec3 dest) {
dest[0] = abs(v[0]);
dest[1] = abs(v[1]);
dest[2] = abs(v[2]);
}
#endif /* cglm_ivec3_h */

View File

@@ -6,7 +6,13 @@
*/
/*
FUNCTIONS:
Macros:
GLM_IVEC4_ONE_INIT
GLM_IVEC4_ZERO_INIT
GLM_IVEC4_ONE
GLM_IVEC4_ZERO
Functions:
CGLM_INLINE void glm_ivec4(ivec3 v3, int last, ivec4 dest)
CGLM_INLINE void glm_ivec4_copy(ivec4 a, ivec4 dest)
CGLM_INLINE void glm_ivec4_zero(ivec4 v)
@@ -22,6 +28,7 @@ FUNCTIONS:
CGLM_INLINE void glm_ivec4_maxv(ivec4 a, ivec4 b, ivec4 dest)
CGLM_INLINE void glm_ivec4_minv(ivec4 a, ivec4 b, ivec4 dest)
CGLM_INLINE void glm_ivec4_clamp(ivec4 v, int minVal, int maxVal)
CGLM_INLINE void glm_ivec4_abs(ivec4 v, ivec4 dest)
*/
#ifndef cglm_ivec4_h
@@ -29,6 +36,12 @@ FUNCTIONS:
#include "common.h"
#define GLM_IVEC4_ONE_INIT {1, 1, 1, 1}
#define GLM_IVEC4_ZERO_INIT {0, 0, 0, 0}
#define GLM_IVEC4_ONE ((ivec4)GLM_IVEC4_ONE_INIT)
#define GLM_IVEC4_ZERO ((ivec4)GLM_IVEC4_ZERO_INIT)
/*!
* @brief init ivec4 using ivec3
*
@@ -272,4 +285,19 @@ glm_ivec4_clamp(ivec4 v, int minVal, int maxVal) {
v[3] = maxVal;
}
/*!
* @brief absolute value of v
*
* @param[in] v vector
* @param[out] dest destination
*/
CGLM_INLINE
void
glm_ivec4_abs(ivec4 v, ivec4 dest) {
dest[0] = abs(v[0]);
dest[1] = abs(v[1]);
dest[2] = abs(v[2]);
dest[3] = abs(v[3]);
}
#endif /* cglm_ivec4_h */

View File

@@ -29,7 +29,7 @@
CGLM_INLINE void glm_mat4_mul(mat4 m1, mat4 m2, mat4 dest);
CGLM_INLINE void glm_mat4_mulN(mat4 *matrices[], int len, mat4 dest);
CGLM_INLINE void glm_mat4_mulv(mat4 m, vec4 v, vec4 dest);
CGLM_INLINE void glm_mat4_mulv3(mat4 m, vec3 v, vec3 dest);
CGLM_INLINE void glm_mat4_mulv3(mat4 m, vec3 v, float last, vec3 dest);
CGLM_INLINE float glm_mat4_trace(mat4 m);
CGLM_INLINE float glm_mat4_trace3(mat4 m);
CGLM_INLINE void glm_mat4_quat(mat4 m, versor dest) ;

View File

@@ -12,6 +12,8 @@
#if defined(_M_ARM64) || defined(_M_HYBRID_X86_ARM64) || defined(_M_ARM64EC) || defined(__aarch64__)
# define CGLM_ARM64 1
#else
# define CGLM_ARM64 0
#endif
#define glmm_load(p) vld1q_f32(p)
@@ -38,6 +40,18 @@
#define glmm_combine_lh(x, y) vcombine_f32(vget_low_f32(x), vget_high_f32(y))
#define glmm_combine_hh(x, y) vcombine_f32(vget_high_f32(x), vget_high_f32(y))
#if defined(_WIN32) && defined(_MSC_VER)
/* # define glmm_float32x4_init(x, y, z, w) { .n128_f32 = { x, y, z, w } } */
CGLM_INLINE
float32x4_t
glmm_float32x4_init(float x, float y, float z, float w) {
CGLM_ALIGN(16) float v[4] = {x, y, z, w};
return vld1q_f32(v);
}
#else
# define glmm_float32x4_init(x, y, z, w) { x, y, z, w }
#endif
static inline
float32x4_t
glmm_abs(float32x4_t v) {

View File

@@ -17,7 +17,7 @@
# ifndef __SSE__
# define __SSE__
# endif
# endif
#endif
/* do not use alignment for older visual studio versions */
# if _MSC_VER < 1913 /* Visual Studio 2017 version 15.6 */
# define CGLM_ALL_UNALIGNED
@@ -63,17 +63,43 @@
#endif
/* ARM Neon */
#if defined(__ARM_NEON)
# include <arm_neon.h>
# if defined(__ARM_NEON_FP)
# define CGLM_NEON_FP 1
#if defined(_WIN32)
/* TODO: non-ARM stuff already inported, will this be better option */
/* # include <intrin.h> */
# if defined(_M_ARM64) || defined(_M_HYBRID_X86_ARM64) || defined(_M_ARM64EC)
# include <arm64intr.h>
# include <arm64_neon.h>
# ifndef CGLM_NEON_FP
# define CGLM_NEON_FP 1
# endif
# ifndef CGLM_SIMD_ARM
# define CGLM_SIMD_ARM
# endif
# elif defined(_M_ARM)
# include <armintr.h>
# include <arm_neon.h>
# ifndef CGLM_NEON_FP
# define CGLM_NEON_FP 1
# endif
# ifndef CGLM_SIMD_ARM
# define CGLM_SIMD_ARM
# endif
# endif
#else /* non-windows */
# if defined(__ARM_NEON) || defined(__ARM_NEON__)
# include <arm_neon.h>
# if defined(__ARM_NEON_FP)
# define CGLM_NEON_FP 1
# endif
# ifndef CGLM_SIMD_ARM
# define CGLM_SIMD_ARM
# endif
# endif
#endif
#if defined(CGLM_SIMD_x86) || defined(CGLM_NEON_FP)
#if defined(CGLM_SIMD_x86) || defined(CGLM_SIMD_ARM)
# ifndef CGLM_SIMD
# define CGLM_SIMD
# endif

View File

@@ -7,7 +7,7 @@
#ifndef cglm_affine_neon_h
#define cglm_affine_neon_h
#if defined(__ARM_NEON_FP)
#if defined(CGLM_NEON_FP)
#include "../../common.h"
#include "../intrin.h"

View File

@@ -7,7 +7,7 @@
#ifndef cglm_mat2_neon_h
#define cglm_mat2_neon_h
#if defined(__ARM_NEON_FP)
#if defined(CGLM_NEON_FP)
#include "../../common.h"
#include "../intrin.h"

View File

@@ -7,7 +7,7 @@
#ifndef cglm_mat4_neon_h
#define cglm_mat4_neon_h
#if defined(__ARM_NEON_FP)
#if defined(CGLM_NEON_FP)
#include "../../common.h"
#include "../intrin.h"
@@ -108,7 +108,7 @@ glm_mat4_det_neon(mat4 mat) {
float32x4_t r0, r1, r2, r3, x0, x1, x2;
float32x2_t ij, op, mn, kl, nn, mm, jj, ii, gh, ef, t12, t34;
float32x4x2_t a1;
float32x4_t x3 = { 0.f, -0.f, 0.f, -0.f };
float32x4_t x3 = glmm_float32x4_init(0.f, -0.f, 0.f, -0.f);
/* 127 <- 0, [square] det(A) = det(At) */
r0 = glmm_load(mat[0]); /* d c b a */
@@ -181,7 +181,7 @@ glm_mat4_inv_neon(mat4 mat, mat4 dest) {
x0, x1, x2, x3, x4, x5, x6, x7, x8;
float32x4x2_t a1;
float32x2_t lp, ko, hg, jn, im, fe, ae, bf, cg, dh;
float32x4_t x9 = { -0.f, 0.f, -0.f, 0.f };
float32x4_t x9 = glmm_float32x4_init(-0.f, 0.f, -0.f, 0.f);
x8 = vrev64q_f32(x9);

View File

@@ -7,7 +7,7 @@
#ifndef cglm_quat_neon_h
#define cglm_quat_neon_h
#if defined(__ARM_NEON_FP)
#if defined(CGLM_NEON_FP)
#include "../../common.h"
#include "../intrin.h"
@@ -23,7 +23,7 @@ glm_quat_mul_neon(versor p, versor q, versor dest) {
*/
glmm_128 xp, xq, xqr, r, x, y, z, s2, s3;
glmm_128 s1 = {-0.f, 0.f, 0.f, -0.f};
glmm_128 s1 = glmm_float32x4_init(-0.f, 0.f, 0.f, -0.f);
float32x2_t qh, ql;
xp = glmm_load(p); /* 3 2 1 0 */

View File

@@ -0,0 +1,184 @@
/*
* Copyright (c), Recep Aslantas.
*
* MIT License (MIT), http://opensource.org/licenses/MIT
* Full license can be found in the LICENSE file
*/
/*
Functions:
CGLM_INLINE mat4s glms_translated(mat4s m, vec3s v);
CGLM_INLINE mat4s glms_translated_x(mat4s m, float x);
CGLM_INLINE mat4s glms_translated_y(mat4s m, float y);
CGLM_INLINE mat4s glms_translated_z(mat4s m, float z);
CGLM_INLINE mat4s glms_rotated_x(mat4s m, float angle);
CGLM_INLINE mat4s glms_rotated_y(mat4s m, float angle);
CGLM_INLINE mat4s glms_rotated_z(mat4s m, float angle);
CGLM_INLINE mat4s glms_rotated(mat4s m, float angle, vec3s axis);
CGLM_INLINE mat4s glms_rotated_at(mat4s m, vec3s pivot, float angle, vec3s axis);
CGLM_INLINE mat4s glms_spinned(mat4s m, float angle, vec3s axis);
*/
#ifndef cglms_affines_post_h
#define cglms_affines_post_h
#include "../common.h"
#include "../types-struct.h"
#include "../affine.h"
#include "vec3.h"
#include "vec4.h"
#include "mat4.h"
/*!
* @brief translate existing transform matrix by v vector
* and stores result in same matrix
*
* @param[in] m affine transfrom
* @param[in] v translate vector [x, y, z]
* @returns affine transfrom
*/
CGLM_INLINE
mat4s
glms_translated(mat4s m, vec3s v) {
glm_translated(m.raw, v.raw);
return m;
}
/*!
* @brief translate existing transform matrix by x factor
*
* @param[in] m affine transfrom
* @param[in] x x factor
* @returns affine transfrom
*/
CGLM_INLINE
mat4s
glms_translated_x(mat4s m, float x) {
glm_translated_x(m.raw, x);
return m;
}
/*!
* @brief translate existing transform matrix by y factor
*
* @param[in] m affine transfrom
* @param[in] y y factor
* @returns affine transfrom
*/
CGLM_INLINE
mat4s
glms_translated_y(mat4s m, float y) {
glm_translated_y(m.raw, y);
return m;
}
/*!
* @brief translate existing transform matrix by z factor
*
* @param[in] m affine transfrom
* @param[in] z z factor
* @returns affine transfrom
*/
CGLM_INLINE
mat4s
glms_translated_z(mat4s m, float z) {
glm_translated_z(m.raw, z);
return m;
}
/*!
* @brief rotate existing transform matrix around X axis by angle
* and store result in dest
*
* @param[in] m affine transfrom
* @param[in] angle angle (radians)
* @returns rotated matrix
*/
CGLM_INLINE
mat4s
glms_rotated_x(mat4s m, float angle) {
mat4s r;
glm_rotated_x(m.raw, angle, r.raw);
return r;
}
/*!
* @brief rotate existing transform matrix around Y axis by angle
* and store result in dest
*
* @param[in] m affine transfrom
* @param[in] angle angle (radians)
* @returns rotated matrix
*/
CGLM_INLINE
mat4s
glms_rotated_y(mat4s m, float angle) {
mat4s r;
glm_rotated_y(m.raw, angle, r.raw);
return r;
}
/*!
* @brief rotate existing transform matrix around Z axis by angle
* and store result in dest
*
* @param[in] m affine transfrom
* @param[in] angle angle (radians)
* @returns rotated matrix
*/
CGLM_INLINE
mat4s
glms_rotated_z(mat4s m, float angle) {
mat4s r;
glm_rotated_z(m.raw, angle, r.raw);
return r;
}
/*!
* @brief rotate existing transform matrix around given axis by angle
*
* @param[in] m affine transfrom
* @param[in] angle angle (radians)
* @param[in] axis axis
* @returns affine transfrom
*/
CGLM_INLINE
mat4s
glms_rotated(mat4s m, float angle, vec3s axis) {
glm_rotated(m.raw, angle, axis.raw);
return m;
}
/*!
* @brief rotate existing transform
* around given axis by angle at given pivot point (rotation center)
*
* @param[in] m affine transfrom
* @param[in] pivot rotation center
* @param[in] angle angle (radians)
* @param[in] axis axis
* @returns affine transfrom
*/
CGLM_INLINE
mat4s
glms_rotated_at(mat4s m, vec3s pivot, float angle, vec3s axis) {
glm_rotated_at(m.raw, pivot.raw, angle, axis.raw);
return m;
}
/*!
* @brief rotate existing transform matrix around given axis by angle around self (doesn't affected by position)
*
* @param[in] m affine transfrom
* @param[in] angle angle (radians)
* @param[in] axis axis
* @returns affine transfrom
*/
CGLM_INLINE
mat4s
glms_spinned(mat4s m, float angle, vec3s axis) {
glm_spinned(m.raw, angle, axis.raw);
return m;
}
#endif /* cglms_affines_post_h */

View File

@@ -0,0 +1,184 @@
/*
* Copyright (c), Recep Aslantas.
*
* MIT License (MIT), http://opensource.org/licenses/MIT
* Full license can be found in the LICENSE file
*/
/*
Functions:
CGLM_INLINE mat4s glms_translate(mat4s m, vec3s v);
CGLM_INLINE mat4s glms_translate_x(mat4s m, float x);
CGLM_INLINE mat4s glms_translate_y(mat4s m, float y);
CGLM_INLINE mat4s glms_translate_z(mat4s m, float z);
CGLM_INLINE mat4s glms_rotate_x(mat4s m, float angle);
CGLM_INLINE mat4s glms_rotate_y(mat4s m, float angle);
CGLM_INLINE mat4s glms_rotate_z(mat4s m, float angle);
CGLM_INLINE mat4s glms_rotate(mat4s m, float angle, vec3s axis);
CGLM_INLINE mat4s glms_rotate_at(mat4s m, vec3s pivot, float angle, vec3s axis);
CGLM_INLINE mat4s glms_spin(mat4s m, float angle, vec3s axis);
*/
#ifndef cglms_affines_pre_h
#define cglms_affines_pre_h
#include "../common.h"
#include "../types-struct.h"
#include "../affine.h"
#include "vec3.h"
#include "vec4.h"
#include "mat4.h"
/*!
* @brief translate existing transform matrix by v vector
* and stores result in same matrix
*
* @param[in] m affine transfrom
* @param[in] v translate vector [x, y, z]
* @returns affine transfrom
*/
CGLM_INLINE
mat4s
glms_translate(mat4s m, vec3s v) {
glm_translate(m.raw, v.raw);
return m;
}
/*!
* @brief translate existing transform matrix by x factor
*
* @param[in] m affine transfrom
* @param[in] x x factor
* @returns affine transfrom
*/
CGLM_INLINE
mat4s
glms_translate_x(mat4s m, float x) {
glm_translate_x(m.raw, x);
return m;
}
/*!
* @brief translate existing transform matrix by y factor
*
* @param[in] m affine transfrom
* @param[in] y y factor
* @returns affine transfrom
*/
CGLM_INLINE
mat4s
glms_translate_y(mat4s m, float y) {
glm_translate_y(m.raw, y);
return m;
}
/*!
* @brief translate existing transform matrix by z factor
*
* @param[in] m affine transfrom
* @param[in] z z factor
* @returns affine transfrom
*/
CGLM_INLINE
mat4s
glms_translate_z(mat4s m, float z) {
glm_translate_z(m.raw, z);
return m;
}
/*!
* @brief rotate existing transform matrix around X axis by angle
* and store result in dest
*
* @param[in] m affine transfrom
* @param[in] angle angle (radians)
* @returns rotated matrix
*/
CGLM_INLINE
mat4s
glms_rotate_x(mat4s m, float angle) {
mat4s r;
glm_rotate_x(m.raw, angle, r.raw);
return r;
}
/*!
* @brief rotate existing transform matrix around Y axis by angle
* and store result in dest
*
* @param[in] m affine transfrom
* @param[in] angle angle (radians)
* @returns rotated matrix
*/
CGLM_INLINE
mat4s
glms_rotate_y(mat4s m, float angle) {
mat4s r;
glm_rotate_y(m.raw, angle, r.raw);
return r;
}
/*!
* @brief rotate existing transform matrix around Z axis by angle
* and store result in dest
*
* @param[in] m affine transfrom
* @param[in] angle angle (radians)
* @returns rotated matrix
*/
CGLM_INLINE
mat4s
glms_rotate_z(mat4s m, float angle) {
mat4s r;
glm_rotate_z(m.raw, angle, r.raw);
return r;
}
/*!
* @brief rotate existing transform matrix around given axis by angle
*
* @param[in] m affine transfrom
* @param[in] angle angle (radians)
* @param[in] axis axis
* @returns affine transfrom
*/
CGLM_INLINE
mat4s
glms_rotate(mat4s m, float angle, vec3s axis) {
glm_rotate(m.raw, angle, axis.raw);
return m;
}
/*!
* @brief rotate existing transform
* around given axis by angle at given pivot point (rotation center)
*
* @param[in] m affine transfrom
* @param[in] pivot rotation center
* @param[in] angle angle (radians)
* @param[in] axis axis
* @returns affine transfrom
*/
CGLM_INLINE
mat4s
glms_rotate_at(mat4s m, vec3s pivot, float angle, vec3s axis) {
glm_rotate_at(m.raw, pivot.raw, angle, axis.raw);
return m;
}
/*!
* @brief rotate existing transform matrix around given axis by angle around self (doesn't affected by position)
*
* @param[in] m affine transfrom
* @param[in] angle angle (radians)
* @param[in] axis axis
* @returns affine transfrom
*/
CGLM_INLINE
mat4s
glms_spin(mat4s m, float angle, vec3s axis) {
glm_spin(m.raw, angle, axis.raw);
return m;
}
#endif /* cglms_affines_pre_h */

View File

@@ -40,63 +40,6 @@
#include "vec4.h"
#include "mat4.h"
/*!
* @brief translate existing transform matrix by v vector
* and stores result in same matrix
*
* @param[in] m affine transfrom
* @param[in] v translate vector [x, y, z]
* @returns affine transfrom
*/
CGLM_INLINE
mat4s
glms_translate(mat4s m, vec3s v) {
glm_translate(m.raw, v.raw);
return m;
}
/*!
* @brief translate existing transform matrix by x factor
*
* @param[in] m affine transfrom
* @param[in] x x factor
* @returns affine transfrom
*/
CGLM_INLINE
mat4s
glms_translate_x(mat4s m, float x) {
glm_translate_x(m.raw, x);
return m;
}
/*!
* @brief translate existing transform matrix by y factor
*
* @param[in] m affine transfrom
* @param[in] y y factor
* @returns affine transfrom
*/
CGLM_INLINE
mat4s
glms_translate_y(mat4s m, float y) {
glm_translate_y(m.raw, y);
return m;
}
/*!
* @brief translate existing transform matrix by z factor
*
* @param[in] m affine transfrom
* @param[in] z z factor
* @returns affine transfrom
*/
CGLM_INLINE
mat4s
glms_translate_z(mat4s m, float z) {
glm_translate_z(m.raw, z);
return m;
}
/*!
* @brief creates NEW translate transform matrix by v vector
*
@@ -156,54 +99,6 @@ glms_scale_uni(mat4s m, float s) {
return m;
}
/*!
* @brief rotate existing transform matrix around X axis by angle
* and store result in dest
*
* @param[in] m affine transfrom
* @param[in] angle angle (radians)
* @returns rotated matrix
*/
CGLM_INLINE
mat4s
glms_rotate_x(mat4s m, float angle) {
mat4s r;
glm_rotate_x(m.raw, angle, r.raw);
return r;
}
/*!
* @brief rotate existing transform matrix around Y axis by angle
* and store result in dest
*
* @param[in] m affine transfrom
* @param[in] angle angle (radians)
* @returns rotated matrix
*/
CGLM_INLINE
mat4s
glms_rotate_y(mat4s m, float angle) {
mat4s r;
glm_rotate_y(m.raw, angle, r.raw);
return r;
}
/*!
* @brief rotate existing transform matrix around Z axis by angle
* and store result in dest
*
* @param[in] m affine transfrom
* @param[in] angle angle (radians)
* @returns rotated matrix
*/
CGLM_INLINE
mat4s
glms_rotate_z(mat4s m, float angle) {
mat4s r;
glm_rotate_z(m.raw, angle, r.raw);
return r;
}
/*!
* @brief creates NEW rotation matrix by angle and axis
*
@@ -221,38 +116,6 @@ glms_rotate_make(float angle, vec3s axis) {
return m;
}
/*!
* @brief rotate existing transform matrix around given axis by angle
*
* @param[in] m affine transfrom
* @param[in] angle angle (radians)
* @param[in] axis axis
* @returns affine transfrom
*/
CGLM_INLINE
mat4s
glms_rotate(mat4s m, float angle, vec3s axis) {
glm_rotate(m.raw, angle, axis.raw);
return m;
}
/*!
* @brief rotate existing transform
* around given axis by angle at given pivot point (rotation center)
*
* @param[in] m affine transfrom
* @param[in] pivot rotation center
* @param[in] angle angle (radians)
* @param[in] axis axis
* @returns affine transfrom
*/
CGLM_INLINE
mat4s
glms_rotate_at(mat4s m, vec3s pivot, float angle, vec3s axis) {
glm_rotate_at(m.raw, pivot.raw, angle, axis.raw);
return m;
}
/*!
* @brief creates NEW rotation matrix by angle and axis at given point
*
@@ -274,21 +137,6 @@ glms_rotate_atm(mat4s m, vec3s pivot, float angle, vec3s axis) {
return m;
}
/*!
* @brief rotate existing transform matrix around given axis by angle around self (doesn't affected by position)
*
* @param[in] m affine transfrom
* @param[in] angle angle (radians)
* @param[in] axis axis
* @returns affine transfrom
*/
CGLM_INLINE
mat4s
glms_spin(mat4s m, float angle, vec3s axis) {
glm_spin(m.raw, angle, axis.raw);
return m;
}
/*!
* @brief decompose scale vector
*
@@ -346,4 +194,7 @@ glms_decompose(mat4s m, vec4s * __restrict t, mat4s * __restrict r, vec3s * __re
glm_decompose(m.raw, t->raw, r->raw, s->raw);
}
#include "affine-pre.h"
#include "affine-post.h"
#endif /* cglms_affines_h */

View File

@@ -32,9 +32,13 @@
# define CGLM_ALIGN_MAT CGLM_ALIGN(16)
#endif
#ifdef __GNUC__
# define CGLM_ASSUME_ALIGNED(expr, alignment) \
__builtin_assume_aligned((expr), (alignment))
#if defined(__has_builtin)
# if __has_builtin(__builtin_assume_aligned)
# define CGLM_ASSUME_ALIGNED(expr, alignment) \
__builtin_assume_aligned((expr), (alignment))
# else
# define CGLM_ASSUME_ALIGNED(expr, alignment) (expr)
# endif
#else
# define CGLM_ASSUME_ALIGNED(expr, alignment) (expr)
#endif

View File

@@ -19,6 +19,7 @@
CGLM_INLINE bool glm_vec2_isinf(vec2 v);
CGLM_INLINE bool glm_vec2_isvalid(vec2 v);
CGLM_INLINE void glm_vec2_sign(vec2 v, vec2 dest);
CGLM_INLINE void glm_vec2_abs(vec2 v, vec2 dest);
CGLM_INLINE void glm_vec2_sqrt(vec2 v, vec2 dest);
CGLM_INLINE void glm_vec2_complex_mul(vec2 a, vec2 b, vec2 dest)
CGLM_INLINE void glm_vec2_complex_div(vec2 a, vec2 b, vec2 dest)
@@ -176,6 +177,19 @@ glm_vec2_sign(vec2 v, vec2 dest) {
dest[1] = glm_signf(v[1]);
}
/*!
* @brief absolute value of v
*
* @param[in] v vector
* @param[out] dest destination
*/
CGLM_INLINE
void
glm_vec2_abs(vec2 v, vec2 dest) {
dest[0] = fabsf(v[0]);
dest[1] = fabsf(v[1]);
}
/*!
* @brief square root of each vector item
*
@@ -237,5 +251,4 @@ glm_vec2_complex_conjugate(vec2 a, vec2 dest) {
dest[1] = -a[1];
}
#endif /* cglm_vec2_ext_h */

View File

@@ -9,7 +9,7 @@
#define cglm_version_h
#define CGLM_VERSION_MAJOR 0
#define CGLM_VERSION_MINOR 8
#define CGLM_VERSION_PATCH 6
#define CGLM_VERSION_MINOR 9
#define CGLM_VERSION_PATCH 0
#endif /* cglm_version_h */

View File

@@ -1,5 +1,5 @@
project('cglm', 'c',
version : '0.8.6',
version : '0.9.0',
license : 'mit',
default_options : [
'c_std=c11',

View File

@@ -97,3 +97,10 @@ void
glmc_ivec2_clamp(ivec2 v, int minVal, int maxVal) {
glm_ivec2_clamp(v, minVal, maxVal);
}
CGLM_EXPORT
void
glmc_ivec2_abs(ivec2 v, ivec2 dest) {
glm_ivec2_abs(v, dest);
}

View File

@@ -97,3 +97,10 @@ void
glmc_ivec3_clamp(ivec3 v, int minVal, int maxVal) {
glm_ivec3_clamp(v, minVal, maxVal);
}
CGLM_EXPORT
void
glmc_ivec3_abs(ivec3 v, ivec3 dest) {
glm_ivec3_abs(v, dest);
}

View File

@@ -97,3 +97,10 @@ void
glmc_ivec4_clamp(ivec4 v, int minVal, int maxVal) {
glm_ivec4_clamp(v, minVal, maxVal);
}
CGLM_EXPORT
void
glmc_ivec4_abs(ivec4 v, ivec4 dest) {
glm_ivec4_abs(v, dest);
}

View File

@@ -206,6 +206,12 @@ glmc_vec2_clamp(vec2 v, float minval, float maxval) {
glm_vec2_clamp(v, minval, maxval);
}
CGLM_EXPORT
void
glmc_vec2_abs(vec2 v, vec2 dest) {
glm_vec2_abs(v, dest);
}
CGLM_EXPORT
void
glmc_vec2_lerp(vec2 from, vec2 to, float t, vec2 dest) {

View File

@@ -11,21 +11,21 @@ TEST_IMPL(clamp) {
vec3 v3 = {15.07f, 0.4f, 17.3f};
vec4 v4 = {5.07f, 2.3f, 1.3f, 1.4f};
ASSERT(glm_clamp(1.6f, 0.0f, 1.0f) == 1.0f)
ASSERT(glm_clamp(-1.6f, 0.0f, 1.0f) == 0.0f)
ASSERT(glm_clamp(0.6f, 0.0f, 1.0f) == 0.6f)
ASSERT(glm_eq(glm_clamp(1.6f, 0.0f, 1.0f), 1.0f))
ASSERT(glm_eq(glm_clamp(-1.6f, 0.0f, 1.0f), 0.0f))
ASSERT(glm_eq(glm_clamp(0.6f, 0.0f, 1.0f), 0.6f))
glm_vec3_clamp(v3, 0.0, 1.0);
glm_vec4_clamp(v4, 1.5, 3.0);
ASSERT(v3[0] == 1.0f)
ASSERT(v3[1] == 0.4f)
ASSERT(v3[2] == 1.0f)
ASSERT(glm_eq(v3[0], 1.0f))
ASSERT(glm_eq(v3[1], 0.4f))
ASSERT(glm_eq(v3[2], 1.0f))
ASSERT(v4[0] == 3.0f)
ASSERT(v4[1] == 2.3f)
ASSERT(v4[2] == 1.5f)
ASSERT(v4[3] == 1.5f)
ASSERT(glm_eq(v4[0], 3.0f))
ASSERT(glm_eq(v4[1], 2.3f))
ASSERT(glm_eq(v4[2], 1.5f))
ASSERT(glm_eq(v4[3], 1.5f))
TEST_SUCCESS
}

View File

@@ -187,3 +187,18 @@ TEST_IMPL(GLM_PREFIX, ivec2_clamp) {
TEST_SUCCESS
}
TEST_IMPL(GLM_PREFIX, ivec2_abs) {
ivec2 v1 = {2, -3}, v2 = {-12, -31};
ivec2 v3, v4;
GLM(ivec2_abs)(v1, v3);
GLM(ivec2_abs)(v2, v4);
ASSERT(v3[0] == 2)
ASSERT(v3[1] == 3)
ASSERT(v4[0] == 12)
ASSERT(v4[1] == 31)
TEST_SUCCESS
}

View File

@@ -197,3 +197,20 @@ TEST_IMPL(GLM_PREFIX, ivec3_clamp) {
TEST_SUCCESS
}
TEST_IMPL(GLM_PREFIX, ivec3_abs) {
ivec3 v1 = {2, -3, 4}, v2 = {-12, -31, -42};
ivec3 v3, v4;
GLM(ivec3_abs)(v1, v3);
GLM(ivec3_abs)(v2, v4);
ASSERT(v3[0] == 2)
ASSERT(v3[1] == 3)
ASSERT(v3[2] == 4)
ASSERT(v4[0] == 12)
ASSERT(v4[1] == 31)
ASSERT(v4[2] == 42)
TEST_SUCCESS
}

View File

@@ -212,3 +212,22 @@ TEST_IMPL(GLM_PREFIX, ivec4_clamp) {
TEST_SUCCESS
}
TEST_IMPL(GLM_PREFIX, ivec4_abs) {
ivec4 v1 = {2, -3, 4, -5}, v2 = {-12, -31, -42, -50};
ivec4 v3, v4;
GLM(ivec4_abs)(v1, v3);
GLM(ivec4_abs)(v2, v4);
ASSERT(v3[0] == 2)
ASSERT(v3[1] == 3)
ASSERT(v3[2] == 4)
ASSERT(v3[3] == 5)
ASSERT(v4[0] == 12)
ASSERT(v4[1] == 31)
ASSERT(v4[2] == 42)
ASSERT(v4[3] == 50)
TEST_SUCCESS
}

View File

@@ -579,6 +579,20 @@ TEST_IMPL(GLM_PREFIX, vec2_clamp) {
TEST_SUCCESS
}
TEST_IMPL(GLM_PREFIX, vec2_abs) {
vec2 v1 = {2, -3}, v2 = {-12, -31};
vec2 v3, v4;
vec2 v5 = {2, 3}, v6 = {12, 31};
GLM(vec2_abs)(v1, v3);
GLM(vec2_abs)(v2, v4);
ASSERTIFY(test_assert_vec2_eq(v3, v5))
ASSERTIFY(test_assert_vec2_eq(v4, v6))
TEST_SUCCESS
}
TEST_IMPL(GLM_PREFIX, vec2_lerp) {
vec2 v1 = {-100.0f, -200.0f};
vec2 v2 = {100.0f, 200.0f};

View File

@@ -379,6 +379,7 @@ TEST_DECLARE(glm_vec2_distance)
TEST_DECLARE(glm_vec2_maxv)
TEST_DECLARE(glm_vec2_minv)
TEST_DECLARE(glm_vec2_clamp)
TEST_DECLARE(glm_vec2_abs)
TEST_DECLARE(glm_vec2_lerp)
TEST_DECLARE(glm_vec2_complex_mul)
TEST_DECLARE(glm_vec2_complex_div)
@@ -416,6 +417,7 @@ TEST_DECLARE(glmc_vec2_distance)
TEST_DECLARE(glmc_vec2_maxv)
TEST_DECLARE(glmc_vec2_minv)
TEST_DECLARE(glmc_vec2_clamp)
TEST_DECLARE(glmc_vec2_abs)
TEST_DECLARE(glmc_vec2_lerp)
TEST_DECLARE(glmc_vec2_complex_mul)
TEST_DECLARE(glmc_vec2_complex_div)
@@ -746,6 +748,7 @@ TEST_DECLARE(glm_ivec2_distance)
TEST_DECLARE(glm_ivec2_maxv)
TEST_DECLARE(glm_ivec2_minv)
TEST_DECLARE(glm_ivec2_clamp)
TEST_DECLARE(glm_ivec2_abs)
TEST_DECLARE(glmc_ivec2)
TEST_DECLARE(glmc_ivec2_copy)
@@ -762,6 +765,7 @@ TEST_DECLARE(glmc_ivec2_distance)
TEST_DECLARE(glmc_ivec2_maxv)
TEST_DECLARE(glmc_ivec2_minv)
TEST_DECLARE(glmc_ivec2_clamp)
TEST_DECLARE(glmc_ivec2_abs)
/* ivec3 */
TEST_DECLARE(glm_ivec3)
@@ -812,6 +816,7 @@ TEST_DECLARE(glm_ivec4_distance)
TEST_DECLARE(glm_ivec4_maxv)
TEST_DECLARE(glm_ivec4_minv)
TEST_DECLARE(glm_ivec4_clamp)
TEST_DECLARE(glm_ivec4_abs)
TEST_DECLARE(glmc_ivec4)
TEST_DECLARE(glmc_ivec4_copy)
@@ -828,6 +833,7 @@ TEST_DECLARE(glmc_ivec4_distance)
TEST_DECLARE(glmc_ivec4_maxv)
TEST_DECLARE(glmc_ivec4_minv)
TEST_DECLARE(glmc_ivec4_clamp)
TEST_DECLARE(glmc_ivec4_abs)
/* structs */
TEST_DECLARE(mat3s_identity_init)
@@ -1244,6 +1250,7 @@ TEST_LIST {
TEST_ENTRY(glmc_vec2_maxv)
TEST_ENTRY(glmc_vec2_minv)
TEST_ENTRY(glmc_vec2_clamp)
TEST_ENTRY(glmc_vec2_abs)
TEST_ENTRY(glmc_vec2_lerp)
TEST_ENTRY(glmc_vec2_complex_mul)
TEST_ENTRY(glmc_vec2_complex_div)
@@ -1573,6 +1580,7 @@ TEST_LIST {
TEST_ENTRY(glm_ivec2_maxv)
TEST_ENTRY(glm_ivec2_minv)
TEST_ENTRY(glm_ivec2_clamp)
TEST_ENTRY(glm_ivec2_abs)
TEST_ENTRY(glmc_ivec2)
TEST_ENTRY(glmc_ivec2_copy)
@@ -1589,6 +1597,7 @@ TEST_LIST {
TEST_ENTRY(glmc_ivec2_maxv)
TEST_ENTRY(glmc_ivec2_minv)
TEST_ENTRY(glmc_ivec2_clamp)
TEST_ENTRY(glmc_ivec2_abs)
/* ivec3 */
TEST_ENTRY(glm_ivec3)
@@ -1655,6 +1664,7 @@ TEST_LIST {
TEST_ENTRY(glmc_ivec4_maxv)
TEST_ENTRY(glmc_ivec4_minv)
TEST_ENTRY(glmc_ivec4_clamp)
TEST_ENTRY(glmc_ivec4_abs)
/* structs */
TEST_ENTRY(mat3s_identity_init)

View File

@@ -1,10 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|ARM">
<Configuration>Debug</Configuration>
<Platform>ARM</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|ARM64">
<Configuration>Debug</Configuration>
<Platform>ARM64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|ARM64EC">
<Configuration>Debug</Configuration>
<Platform>ARM64EC</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|ARM">
<Configuration>Release</Configuration>
<Platform>ARM</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|ARM64">
<Configuration>Release</Configuration>
<Platform>ARM64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|ARM64EC">
<Configuration>Release</Configuration>
<Platform>ARM64EC</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
@@ -86,6 +110,24 @@
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64EC'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
@@ -93,6 +135,27 @@
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64EC'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
@@ -107,19 +170,55 @@
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64EC'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64EC'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64EC'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64EC'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
@@ -144,6 +243,69 @@
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<AdditionalIncludeDirectories>../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64EC'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<AdditionalIncludeDirectories>../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<AdditionalIncludeDirectories>../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>
@@ -180,6 +342,60 @@
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<AdditionalIncludeDirectories>../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64EC'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<AdditionalIncludeDirectories>../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<AdditionalIncludeDirectories>../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<PrecompiledHeader>

View File

@@ -9,24 +9,54 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cglm-test", "cglm-test.vcxp
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|ARM = Debug|ARM
Debug|ARM64 = Debug|ARM64
Debug|ARM64EC = Debug|ARM64EC
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|ARM = Release|ARM
Release|ARM64 = Release|ARM64
Release|ARM64EC = Release|ARM64EC
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{CA8BCAF9-CD25-4133-8F62-3D1449B5D2FC}.Debug|ARM.ActiveCfg = Debug|ARM
{CA8BCAF9-CD25-4133-8F62-3D1449B5D2FC}.Debug|ARM.Build.0 = Debug|ARM
{CA8BCAF9-CD25-4133-8F62-3D1449B5D2FC}.Debug|ARM64.ActiveCfg = Debug|ARM64
{CA8BCAF9-CD25-4133-8F62-3D1449B5D2FC}.Debug|ARM64.Build.0 = Debug|ARM64
{CA8BCAF9-CD25-4133-8F62-3D1449B5D2FC}.Debug|ARM64EC.ActiveCfg = Debug|ARM64EC
{CA8BCAF9-CD25-4133-8F62-3D1449B5D2FC}.Debug|ARM64EC.Build.0 = Debug|ARM64EC
{CA8BCAF9-CD25-4133-8F62-3D1449B5D2FC}.Debug|x64.ActiveCfg = Debug|x64
{CA8BCAF9-CD25-4133-8F62-3D1449B5D2FC}.Debug|x64.Build.0 = Debug|x64
{CA8BCAF9-CD25-4133-8F62-3D1449B5D2FC}.Debug|x86.ActiveCfg = Debug|Win32
{CA8BCAF9-CD25-4133-8F62-3D1449B5D2FC}.Debug|x86.Build.0 = Debug|Win32
{CA8BCAF9-CD25-4133-8F62-3D1449B5D2FC}.Release|ARM.ActiveCfg = Release|ARM
{CA8BCAF9-CD25-4133-8F62-3D1449B5D2FC}.Release|ARM.Build.0 = Release|ARM
{CA8BCAF9-CD25-4133-8F62-3D1449B5D2FC}.Release|ARM64.ActiveCfg = Release|ARM64
{CA8BCAF9-CD25-4133-8F62-3D1449B5D2FC}.Release|ARM64.Build.0 = Release|ARM64
{CA8BCAF9-CD25-4133-8F62-3D1449B5D2FC}.Release|ARM64EC.ActiveCfg = Release|ARM64EC
{CA8BCAF9-CD25-4133-8F62-3D1449B5D2FC}.Release|ARM64EC.Build.0 = Release|ARM64EC
{CA8BCAF9-CD25-4133-8F62-3D1449B5D2FC}.Release|x64.ActiveCfg = Release|x64
{CA8BCAF9-CD25-4133-8F62-3D1449B5D2FC}.Release|x64.Build.0 = Release|x64
{CA8BCAF9-CD25-4133-8F62-3D1449B5D2FC}.Release|x86.ActiveCfg = Release|Win32
{CA8BCAF9-CD25-4133-8F62-3D1449B5D2FC}.Release|x86.Build.0 = Release|Win32
{200E0DF1-7532-44E6-8273-84FB92C5557E}.Debug|ARM.ActiveCfg = Debug|ARM
{200E0DF1-7532-44E6-8273-84FB92C5557E}.Debug|ARM.Build.0 = Debug|ARM
{200E0DF1-7532-44E6-8273-84FB92C5557E}.Debug|ARM64.ActiveCfg = Debug|ARM64
{200E0DF1-7532-44E6-8273-84FB92C5557E}.Debug|ARM64.Build.0 = Debug|ARM64
{200E0DF1-7532-44E6-8273-84FB92C5557E}.Debug|ARM64EC.ActiveCfg = Debug|ARM64EC
{200E0DF1-7532-44E6-8273-84FB92C5557E}.Debug|ARM64EC.Build.0 = Debug|ARM64EC
{200E0DF1-7532-44E6-8273-84FB92C5557E}.Debug|x64.ActiveCfg = Debug|x64
{200E0DF1-7532-44E6-8273-84FB92C5557E}.Debug|x64.Build.0 = Debug|x64
{200E0DF1-7532-44E6-8273-84FB92C5557E}.Debug|x86.ActiveCfg = Debug|Win32
{200E0DF1-7532-44E6-8273-84FB92C5557E}.Debug|x86.Build.0 = Debug|Win32
{200E0DF1-7532-44E6-8273-84FB92C5557E}.Release|ARM.ActiveCfg = Release|ARM
{200E0DF1-7532-44E6-8273-84FB92C5557E}.Release|ARM.Build.0 = Release|ARM
{200E0DF1-7532-44E6-8273-84FB92C5557E}.Release|ARM64.ActiveCfg = Release|ARM64
{200E0DF1-7532-44E6-8273-84FB92C5557E}.Release|ARM64.Build.0 = Release|ARM64
{200E0DF1-7532-44E6-8273-84FB92C5557E}.Release|ARM64EC.ActiveCfg = Release|ARM64EC
{200E0DF1-7532-44E6-8273-84FB92C5557E}.Release|ARM64EC.Build.0 = Release|ARM64EC
{200E0DF1-7532-44E6-8273-84FB92C5557E}.Release|x64.ActiveCfg = Release|x64
{200E0DF1-7532-44E6-8273-84FB92C5557E}.Release|x64.Build.0 = Release|x64
{200E0DF1-7532-44E6-8273-84FB92C5557E}.Release|x86.ActiveCfg = Release|Win32

View File

@@ -1,10 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|ARM">
<Configuration>Debug</Configuration>
<Platform>ARM</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|ARM64">
<Configuration>Debug</Configuration>
<Platform>ARM64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|ARM64EC">
<Configuration>Debug</Configuration>
<Platform>ARM64EC</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|ARM">
<Configuration>Release</Configuration>
<Platform>ARM</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|ARM64">
<Configuration>Release</Configuration>
<Platform>ARM64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|ARM64EC">
<Configuration>Release</Configuration>
<Platform>ARM64EC</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
@@ -158,6 +182,8 @@
<ClInclude Include="..\include\cglm\simd\x86.h" />
<ClInclude Include="..\include\cglm\sphere.h" />
<ClInclude Include="..\include\cglm\struct.h" />
<ClInclude Include="..\include\cglm\struct\affine-post.h" />
<ClInclude Include="..\include\cglm\struct\affine-pre.h" />
<ClInclude Include="..\include\cglm\struct\affine.h" />
<ClInclude Include="..\include\cglm\struct\affine2d.h" />
<ClInclude Include="..\include\cglm\struct\box.h" />
@@ -233,6 +259,24 @@
<PlatformToolset>v141</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64EC'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
@@ -240,6 +284,27 @@
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64EC'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
@@ -254,9 +319,27 @@
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64EC'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64EC'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
@@ -267,6 +350,18 @@
<CodeAnalysisRuleSet>NativeRecommendedRules.ruleset</CodeAnalysisRuleSet>
<RunCodeAnalysis>true</RunCodeAnalysis>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
<CodeAnalysisRuleSet>NativeRecommendedRules.ruleset</CodeAnalysisRuleSet>
<RunCodeAnalysis>true</RunCodeAnalysis>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64EC'">
<CodeAnalysisRuleSet>NativeRecommendedRules.ruleset</CodeAnalysisRuleSet>
<RunCodeAnalysis>true</RunCodeAnalysis>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
<CodeAnalysisRuleSet>NativeRecommendedRules.ruleset</CodeAnalysisRuleSet>
<RunCodeAnalysis>true</RunCodeAnalysis>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<CodeAnalysisRuleSet>NativeRecommendedRules.ruleset</CodeAnalysisRuleSet>
@@ -277,6 +372,21 @@
<CodeAnalysisRuleSet>NativeRecommendedRules.ruleset</CodeAnalysisRuleSet>
<RunCodeAnalysis>true</RunCodeAnalysis>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
<LinkIncremental>false</LinkIncremental>
<CodeAnalysisRuleSet>NativeRecommendedRules.ruleset</CodeAnalysisRuleSet>
<RunCodeAnalysis>true</RunCodeAnalysis>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64EC'">
<LinkIncremental>false</LinkIncremental>
<CodeAnalysisRuleSet>NativeRecommendedRules.ruleset</CodeAnalysisRuleSet>
<RunCodeAnalysis>true</RunCodeAnalysis>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
<LinkIncremental>false</LinkIncremental>
<CodeAnalysisRuleSet>NativeRecommendedRules.ruleset</CodeAnalysisRuleSet>
<RunCodeAnalysis>true</RunCodeAnalysis>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
@@ -312,6 +422,63 @@
<SubSystem>Windows</SubSystem>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<PreprocessorDefinitions>_DEBUG;_WINDOWS;_USRDLL;CGLM_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<IntrinsicFunctions>true</IntrinsicFunctions>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PrecompiledHeaderFile>
</PrecompiledHeaderFile>
<CompileAs>CompileAsC</CompileAs>
<DebugInformationFormat>None</DebugInformationFormat>
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
<EnablePREfast>true</EnablePREfast>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64EC'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<PreprocessorDefinitions>_DEBUG;_WINDOWS;_USRDLL;CGLM_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<IntrinsicFunctions>true</IntrinsicFunctions>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PrecompiledHeaderFile>
</PrecompiledHeaderFile>
<CompileAs>CompileAsC</CompileAs>
<DebugInformationFormat>None</DebugInformationFormat>
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
<EnablePREfast>true</EnablePREfast>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<PreprocessorDefinitions>_DEBUG;_WINDOWS;_USRDLL;CGLM_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<IntrinsicFunctions>true</IntrinsicFunctions>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PrecompiledHeaderFile>
</PrecompiledHeaderFile>
<CompileAs>CompileAsC</CompileAs>
<DebugInformationFormat>None</DebugInformationFormat>
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
<EnablePREfast>true</EnablePREfast>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
@@ -352,7 +519,70 @@
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>NDEBUG;_WINDOWS;_USRDLL;CGLM_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<DebugInformationFormat>None</DebugInformationFormat>
<PrecompiledHeaderFile>
</PrecompiledHeaderFile>
<CompileAs>CompileAsC</CompileAs>
<EnablePREfast>true</EnablePREfast>
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64EC'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>NDEBUG;_WINDOWS;_USRDLL;CGLM_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<DebugInformationFormat>None</DebugInformationFormat>
<PrecompiledHeaderFile>
</PrecompiledHeaderFile>
<CompileAs>CompileAsC</CompileAs>
<EnablePREfast>true</EnablePREfast>
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>NDEBUG;_WINDOWS;_USRDLL;CGLM_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<DebugInformationFormat>None</DebugInformationFormat>
<PrecompiledHeaderFile>
</PrecompiledHeaderFile>
<CompileAs>CompileAsC</CompileAs>
<EnablePREfast>true</EnablePREfast>
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
</Project>

View File

@@ -597,5 +597,11 @@
<ClInclude Include="..\include\cglm\affine-pre.h">
<Filter>include\cglm</Filter>
</ClInclude>
<ClInclude Include="..\include\cglm\struct\affine-post.h">
<Filter>include\cglm\struct</Filter>
</ClInclude>
<ClInclude Include="..\include\cglm\struct\affine-pre.h">
<Filter>include\cglm\struct</Filter>
</ClInclude>
</ItemGroup>
</Project>