Skip to content

Releases: recp/cglm

v0.8.4: Clipspace Control and Improvements

18 Aug 02:02
Compare
Choose a tag to compare

Now there are _no and _zo vesions of project / unproject functions. They are placed in include/cglm/clipspace/ and include/cglm/call/clipspace/ folders.

if CGLM_CLIPSPACE_INCLUDE_ALL is defined then all clipspace headers are icluded in project.h or related main headers, otherwise only related clipspace headers will be included to avoid including unused headers...

New Features

  • #218: add ZERO_TO_ONE support to glm_unprojecti ( thanks to @Nairou )
  • #219: add ZERO_TO_ONE support to glm_project
  • #219: new function: glm_pickmatrix() aka gluPickMatrix()

Bugfix and Improvements

  • #205: include affine.h in quat.h; remove needless decls ( thanks to @legends2k )
  • #207: fix vec3_ortho ( thanks to @legends2k )
  • #209: fix cross product when an operand is also dest ( thanks to @legends2k )
  • #210: compute quaternion rotating a vector into another ( thanks to @legends2k )
  • fix including headers
  • fix some documentations ( thanks to @bubba2k and others )

Sponsorship: Consider become a sponsor for cglm

Supporting cross platform, multiple OS-es and multiple CPUs requires multiple hardwares to test on it which requires extra financial cost. Also sparing time is another big issue while working at somewhere fulltime... Your company can become a sponsor to help:

https://opencollective.com/cglm#backer

v0.8.3: Clipspace Control and Performance Update

30 May 13:09
e5d88f2
Compare
Choose a tag to compare

Major New Feature: Clipspace Control (#198) 🎉

cglm now supports different clipspace configurations.

Many many thanks to @raedwulf and @michael-g to provide this feature to cglm which was in TODOs long time. There are missing tests for now but tests will or should be added as soon as possible. Also thanks to @hartenfels and @bwhmather fixing build files...

Options

#define CGLM_FORCE_DEPTH_ZERO_TO_ONE
#define CGLM_FORCE_LEFT_HANDED
#define CGLM_CLIPSPACE_INCLUDE_ALL

/* auto created in cglm */
#define CGLM_CONFIG_CLIP_CONTROL
#define CGLM_CLIP_CONTROL_LH_ZO
#define CGLM_CLIP_CONTROL_LH_NO
#define CGLM_CLIP_CONTROL_RH_ZO
#define CGLM_CLIP_CONTROL_RH_NO

New functions

Now there are _no, _zo, _lh, _rh... vesions of projection and view functions. No need to paste all of them here, they are placed in include/cglm/clipspace/, include/cglm/struct/clipspace/ and include/cglm/call/clipspace/ folders.

if CGLM_CLIPSPACE_INCLUDE_ALL is defined then all clipspace headers are icluded in cam.h or related main headers, otherwise only related clipspace headers will be included to avoid including unused headers...

New Features

Bugfix and Improvements

  • simd: optimize glm_mat4_zero() with simd
  • simd, sse: optimize mat4 inv with sse
    • reduce a few shufflees
    • re-oder instructions for ILP
  • simd, sse: optimize mat4 mul with sse
  • simd, sse: optimize mat4 mul-v with sse
  • arm neon: optimize mat4 mul with neon
  • arm neon: optimize affine with neon
  • sse: optimize affine with sse
  • sse: optimize glm_quat_mul with sse
  • sse: optimize glm_mat2_mul_sse2 with sse
  • sse2: optimize glm_mat3_mul_sse2() with sse2
  • simd, sse: reduce some computation at glm_mul_rot_sse2()
  • arm, neon: impove hadd performance
  • arm, neon: use negate instruction instead of xor in glm_inv_tr_neon()
  • style: rename nearVal, farVal to nearZ and farZ
  • #192 fix function param type ( thanks to @Winter091 )
  • other improvements may not be mentioned here....

Sponsorship: Consider become a sponsor for cglm

Supporting cross platform, multiple OS-es and multiple CPUs requires multiple hardwares to test on it which requires extra financial cost. Also sparing time is another big issue while working at somewhere fulltime... Your company can become a sponsor to help:

https://opencollective.com/cglm#backer

v0.8.2: ARM NEON + FMA Update

29 Apr 21:56
Compare
Choose a tag to compare

New Features and Improvements

  • #188 configure and install cglm.pc with cmake ( thanks to @wdouglass )
  • minor doc impovements ( thanks to @ylecuyer )
  • rename glmm_shuff1x() to glmm_splat(), mark glmm_shuff1x() as DEPRECATED
  • optimize translate functions with FMA and NEON
  • use unified glmm api for vec4
  • arm: define CGLM_ARM64 for identify arm64
  • arm: optimize vec4 div with NEON
  • arm, neon: implement mat4 determinant with NEON
  • arm, neon: implement mat4 inv with NEON
  • arm, neon: update mat4_mul to use FMA
  • arm, neon: neon/fma support for glm_mul()
  • arm, neon: neon/fma support for glm_mul_rot()
  • arm, neon: neon/fma support for glm_inv_tr()
  • arm, neon: neon/fma support for glm_mat2_mul()
  • arm, neon: neon/fma support for glm_quat_mul()

New glmm functions:

  • glmm_set1(x)
  • glmm_splat_x(x)
  • glmm_splat_y(x)
  • glmm_splat_z(x)
  • glmm_splat_w(x)
  • glmm_xor(a, b) for neon
  • glmm_vhadd(a) for neon

v0.8.1: FMA Update + CMake Header Library

19 Apr 13:41
Compare
Choose a tag to compare

New Features:

Implement FMA

SIMD operations are optimized with FMA instructions to reduce operations and increasee accuracy. The gennerated CPU instructions are reduced. All matrix and related-vector operations are optimized.

FMA must be enable for these optimizations (with -mfma flag on GCC and Clang, /arch:AVX2 /O1-2 on MSVC)

  • optimize mat4 SSE operations with FMA
  • optimize mat3 SSE operations with FMA
  • optimize mat2 SSE operations with FMA
  • optimize affine mat SSE operations with FMA
  • optimize vec4 muladd and muladds operations with FMA

New glmm functions (SSE + NEON):

  • glmm_vhadd() - broadcast-ed hadd
  • glmm_fmadd(a, b, c) - fused multiply add
  • glmm_fnmadd(a, b, c) - fused negative multiply add
  • glmm_fmsub(a, b, c) - fused multiply sub
  • glmm_fnmsub(a, b, c) - fused negative multiply sub

New glmm functions (AVX):

  • glmm256_fmadd(a, b, c) - fused multiply add AVX
  • glmm256_fnmadd(a, b, c) - fused negative multiply add AVX
  • glmm256_fmsub(a, b, c) - fused multiply sub AVX
  • glmm256_fnmsub(a, b, c) - fused negative multiply sub AVX
  • glm_mat4_scale_avx(mat4 m, float s) - scale matrix with scalar (if AVX enabled)

CMake

Use as header-only library with your CMake project

This requires no building or installation of cglm.

  • Example:
cmake_minimum_required(VERSION 3.8.2)

project(<Your Project Name>)

add_executable(${PROJECT_NAME} src/main.c)
target_link_libraries(${LIBRARY_NAME} PRIVATE
  cglm_headers)

add_subdirectory(external/cglm/ EXCLUDE_FROM_ALL)

v0.8.0: Bugfixes and Improvements

02 Mar 20:33
1b0322e
Compare
Choose a tag to compare

Bugfixes and Improvements:

  • #180: aabb v sphere intesect fix (glm_aabb_sphere()) ( thanks to @ILeonor to report this ) - todo: more aabb v sphere intersect options
  • #178: fix cmake config install path ( thanks to @gaurapanasenko )
  • #177: remove wrong c standard bug ( thanks to @Winter091 )
  • #172: replace hex floating point literals ( thanks to @SanderMertens ) - todo: #172 (comment)
  • #169: fix Documentions WARNING for __restrict attribute ( thanks to @podsvirov )
  • update cglm.podspec
  • improve documentation

v0.7.9: ARM Neon + Improvements

18 Nov 20:21
ec852c7
Compare
Choose a tag to compare

New Features:

  • arm neon: support transpose mat4 with neon
  • arm neon: multiply mat4 with vec4
  • Swift Package Manager support, swiftpm package file with module map ( thanks to @smumryakW )
  • meson: add 'install' option ( thanks to @Akaricchi )
     

    This is useful for people who want to use cglm as a meson subproject
    without polluting the main project's install target.

Bugfixes and Improvements:

  • arm neon: move neon-scale to simd header
  • fix docs for glm_vec2() ( thanks to @emersion )
  • simd/x86: fix -Wcast-align warnings (gcc/clang) ( thanks to @Akaricchi )
     

    This modifies glmm_{load,store}3 functions to make the compiler assume
    the v pointer is appropriately aligned for the type it is being cast to.
    Not tested with CGLM_ALL_UNALIGNED, but it probably doesn't matter.

v0.7.8: Meson Build + Bugfixes

09 Aug 14:35
Compare
Choose a tag to compare

New Features:

Bugfixes and Improvements:

  • win32: fix symbol exports, drop CGLM_DLL, add CGLM_STATIC... ( thanks to @randy408 )
    • CGLM_EXPORTS - building a shared library (dllexport)
    • CGLM_STATIC - required for cglm\call headers with statically built library (no attributes)
    • No defines - assume dynamic (dllimport)
  • win32, test: don't link 'm' with msvc ( thanks to @randy408 )
  • gcc: fix some warnings ( thanks to @randy408 )
  • io: make options changeable by user, define colors as empty macro to remove colors from prints
  • io: add documentation to io.h header
  • io: deprecate CGLM_NO_PRINTS_NOOP
  • documentation improvements and fixes

v0.7.7: 2D Affine Transforms Update

31 Jul 17:22
Compare
Choose a tag to compare

New Features:

2D Affine Transforms

Now we have 2D Affine Transform functions. 2D Transform functions are suffixed with 2d, functions that don't have any suffixes are 3D. For instance glm_translate2d() is 2D and glm_translate() is 3D.

New Functions:

Translate2D:

  • glm_translate2d()
  • glm_translate2d_to()
  • glm_translate2d_x()
  • glm_translate2d_y()
  • glm_translate2d_make()

Scale2D:

  • glm_scale2d_to()
  • glm_scale2d_make()
  • glm_scale2d()
  • glm_scale2d_uni()

Rotate2D:

  • glm_rotate2d_make()
  • glm_rotate2d()
  • glm_rotate2d_to()

All these functions are documented at https://cglm.readthedocs.io/en/latest/affine2d.html . Rotate functions are rotating around Z axes. SIMD optimizations will be applied in the future releases.

Bugfixes and Improvements:

  • mat3_mulv: function behaviour to match with mat4 ( thanks to @terri00 )
  • mat2: don't use vec4 directly on mat2 because of alignment requirements may be different
  • define CGLM_DEFINE_PRINTS macro for test targets to see printed results
  • documentation fixes

Build:

  • build: update CFLAGS (-O3 -std=gnu11) for check/test target to match the main target
  • build: remove RTC1 from CMake build for Windows/MSVC

v0.7.6: Critical bugfix for ARM/NEON and Improvements

12 Jun 20:42
Compare
Choose a tag to compare

Critical Bugfix:

  • neon: fix vec4_muladds (critical): f49e8f9

Bugfixes and Improvements:

Core
  • Use epsilon to compare vec2/vec3/vec4_eq_all
  • mat2: suppress warnings for initializing mat2 sruct
Build
  • Build: Improve CMake build integration
  • Build: Update CMake to export Config to use find_package()
  • Build: Drop pedantic from C Flags and allow extensions
Tests
  • tests: add option to disable colors in test output
  • tests: add test for frustum

New Features:

  • Option to override FLT_EPSILON with GLM_FLT_EPSILON

v0.7.4: Critical [Build] Bugfix for ARM/NEON

16 May 18:17
Compare
Choose a tag to compare

Critical Bugfix:

  • fix arm neon build; to negating vectors, NEON gives single intrinsic: 269bdb3

Improvements:

  • io: in release mode, make print functions macro to suppress unused parameter warnings
  • build, cmake: use PROJECT_VERSION_** to set so version instead of custom variables