Skip to content

Releases: recp/cglm

v0.7.3: Print Functions Update

30 Apr 22:24
95161f7
Compare
Choose a tag to compare

Bugfixes and Improvements:

  • suppress documentation warnings
  • remove redundant typedef
  • fix print functions to align column correctly

New Features:

Print Functions Improvements

  • While printing, mis-alignment of columns are fixed: larger numbers are printed via %g and others are printed via %f Column withs are calculated before print.

  • Now values are colorful ;)

    Screen Shot 2020-05-01 at 1 17 48 AM
  • New options with default values:

    #define CGLM_PRINT_PRECISION    5
    #define CGLM_PRINT_MAX_TO_SHORT 1e5
    #define CGLM_PRINT_COLOR        "\033[36m"
    #define CGLM_PRINT_COLOR_RESET  "\033[0m"
  • Inline prints are only enabled in DEBUG mode and if CGLM_DEFINE_PRINTS is defined.
  • You can still call library-print functions e.g. glmc_print...

To make codes unbroken, cglm makes inline print functions to be empty-body (if DEBUG and CGLM_DEFINE_PRINTS are not defined):

CGLM_INLINE void glm_mat4_print(mat4 matrix, FILE *o) { }

compiler must eliminate this empty inline function calls. This also can be disabled by defining CGLM_NO_PRINTS_NOOP macro. 🎉

Define CGLM_PRINT_PRECISION to change print precision, default is increased to 5 from 4 ...

v0.7.2: CMake Integration and Ray Intersection Update

27 Apr 19:44
edf46aa
Compare
Choose a tag to compare

Bugfixes and Improvements:

  • fix glms_sphere_transform by using mat4s instead of mat4 (#121) ( thanks to @Zollerboy1 )
  • fix glms_vec2_rotate() by using a dest vec2s instead of taking an axis ( thanks to @Zollerboy1 )
  • fix some documentation mistakes ( thanks to @Uwila )
  • remove redundant forward decelerations
  • use glm_clamp_zo in some places to clamp between 0 and 1
  • make Github recognize header language as C (#127) ( thanks to @Uwila )
  • [README] link contributors' avatars to the correct page ( thanks to @Uwila )
  • and some forgotten big or small fixes maybe :) ( thanks to all )

New Features:

  • ray-triangle intersection ( many thanks to @Uwila )

  • CMake build support ( many thanks to @FMMazur and @realaltffour )
    Now we can build cglm with CMake and can integrate with other CMake projects.

    CMake options:

  option(CGLM_SHARED "Shared build" ON)
  option(CGLM_STATIC "Static build" OFF)
  option(CGLM_USE_C99 "" OFF) # C11 
  option(CGLM_USE_TEST "Enable Tests" OFF) # for make check - make test

there may be some bugs in CMake configurations, it will be improved by time.

feel free to suggest new features, improvements and fix things by creating issues or pull requests.

v0.7.1: Critical Build Bugfix

02 Mar 07:12
Compare
Choose a tag to compare
  • build: add missing headers
  • helper to swap two float values

v0.7.0: vec2 and mat2 update

25 Feb 19:26
Compare
Choose a tag to compare

New Features:

  • Now vec2 and mat2 are officially supported (including struct api) 🎉 ( #97 )
  • add forward vector as macro (vec3, RH)

Bugfixes and Improvements:

  • quat: fix quat_for and quat_forp implementations; These are identical to QuaternionLook / LookRotation in other frameworks/engines...
  • add notes for versor/quaternion type to describe memory layout
  • merge test sources into one C source
  • make plane zero if norm is zero after normalization
  • Add more tests

Since vec2 and mat2 are new features, bugs may occurs. Any feedback or help would be appreciated.

v0.6.2: Bug-fixes for Windows MSC compiler

17 Jan 21:07
Compare
Choose a tag to compare
  • Now tests can be run on Windows too. Just run cglm-test project.
  • Anonymous structs are enabled for MSC >=1900 (Visual Studio 2015+)
  • win: fix glms_quat_imagn if use_struct option is disabled

v0.6.1: Custom/Built-in Test Suite and Improvements

17 Jan 14:17
Compare
Choose a tag to compare

New Features:

  • Custom Built-in Unit Test Suite: Now we have custom test suite which don't require external dependencies. It is very cool and simple to implement
  • Helpers for apple's simd library (#107)
  • mat4: add zero for call

Bugfixes and Improvements:

  • Add more tests
  • Remove build-deps.sh
  • Remove cmocka from submodules and update docs
  • quat: fix glmc_quat_normalize()
  • vec: fix min/max for compiled vec3
  • arm: fix type castings for ARM Neon
  • vec4: fix parameter name for NEON
  • build: remove duplicate entry in makefile
  • Change empty prototypes to (void) ( @hartenfels )
  • Add a vec2s struct type for consistency ( @hartenfels )
  • Don't add default autoconf flags to build ( @hartenfels )
  • [major change] Use gnu11 instead of gnu99 ( @hartenfels )
  • and some other bugfixes and improvements made by @hartenfels
  • Fix spelling error in name of glms_rotate_x ( @jdolan )

Now cglm don't require external dependencies and it has very cool test suite 🎉

v0.6.0: Struct API and New Features

01 Sep 12:11
Compare
Choose a tag to compare

New API: Structs ( thanks to @acoto87 ) (#80)

cglm now supports structs. To use struct api, just include cglm/struct.h header. You can also use struct api with array api. Struct api provides type-safety. Currently struct parameters are pass-by-value but in the future it may be pass-by-reference by using pointers (feedbacks are welcome by creating issues).

New Features and Improvements:

  • swizzling api: now cglm supports swizzling
  • Find post-build.sh even when not building in. ( @hartenfels )
  • quat: fix glm_quat_axis axis parameter type
  • win: remove optional DLLMain entry point
  • new name for euler sequence (#94) ( @superbigio )
  • squared distance with SIMD support (#96) ( @superbigio )
  • glm_lerpc(), glm_step(), glm_smoothstep(), glm_smoothinterp() (#98) ( @superbigio )
  • added glm_vec_fill() (#100) ( @superbigio )
  • swapped argument order in glmm_store3() (#102) ( @superbigio )
  • vec: some useful functions (#103) ( @superbigio )
  • quat: fix identity quat in glm_quat_normalize_to (#88) ( @yushli )
  • and some minor changes...

New glmm (SIMD) functions: (thanks to @superbigio )

  • glmm_norm2(v) squared l2 norm
  • glmm_vhmin(v) horizontal min
  • glmm_vhmax(v) horizontal max
  • glmm_norm_one(v) l1 norm
  • glmm_norm_inf(v) infinity norm

v0.5.4: Bug fixes and Improvements

30 Apr 11:00
63e60f4
Compare
Choose a tag to compare

Bug fixes and Improvements:

  • improve vec3 alignment ( @haxpor )
  • Add missing header for size_t ( @acoto87 )
  • move common headers to common.h
  • Fix glm_vec4_distance for armv7 and improve for SSE2 ( @haxpor )
  • ci: print test logs after failure
  • fix glm_quat_normalize_to ( @yushli )
  • improve docs
  • fix build scripts
    • fix linking cmocka
    • fix build script if folder names contain spaces

v0.5.3: memory and improvements

03 Mar 13:43
Compare
Choose a tag to compare

Improvements:

  • drop glm__memcpy, glm__memset and glm__memzero
    • copy matrix items manually in _ucopy functions
  • update docs

New Functions:

  • float glm_mat3_rmc(vec3 r, mat3 m, vec3 c) multiplies row vector, matrix and column vector and returns scalar.
  • glm_mat3_zero(mat3 mat) , glm_mat4_zero(mat4 mat) make given matrix zero.

v0.5.2: SIMD Update + New Features

03 Feb 14:31
1a34ffc
Compare
Choose a tag to compare

New Options:

  • CGLM_SSE4_DOT : Enable SSE4 dot product
  • CGLM_SSE3_DOT : Enable SSE3 dot product

New Functions:

  • glm_persp_move_far() extend frustum's far distance
  • void glm_vec4_cubic(float s, vec4 dest) fills vec4 as [s^3, s^2, s, 1.0]
  • float glm_mat4_rmc(vec4 r, mat4 m, vec4 c) multiplies row vector, matrix and column vector and returns scalar. This is good helper to get SMC result easily for curves.
  • float glm_smc(float s, mat4 m, vec4 c) calculates SMC multiplication by using glm_mat4_rmc()and glm_vec4_cubic()
  • float glm_bezier() cubic bezier equation
  • float glm_hermite() cubic hermite equation
  • float glm_decasteljau() solve cubic bezier equation using decasteljau

New glmm (SIMD) functions:

  • glmm_vhadds(v) horizontal add, returns register
  • glmm_hadd(v) horizontal add, returns scalar
  • glmm_vdots(a, b) dot product, single lane contain dot product to convert result to scalar
  • glmm_vdot(a, b) dot product, all lanes contain dot product to use result with other vector operations

Improvements:

  • glmm_ functions are moved to platform specific headers.
  • Now some glmm_ functions supports NEON
  • CGLM_SIMD_x86, CGLM_SIMD_ARM and CGLM_SIMD are defined if it is supported.