Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 5f4dea6

Browse filesBrowse files
bitshifterozkriff
andauthored
Newsletter 11: glam 0.9 (rust-gamedev#196)
* glam 0.9 breaking changes. * Newsletter 11: glam: Fmt tweaks * Newsletter 11: glam: Move section up Co-authored-by: Andrey Lesnikov <ozkriff@gmail.com>
1 parent a93199f commit 5f4dea6
Copy full SHA for 5f4dea6

File tree

Expand file treeCollapse file tree

1 file changed

+27
-0
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+27
-0
lines changed
Open diff view settings
Collapse file

‎content/posts/newsletter-011/index.md‎

Copy file name to clipboardExpand all lines: content/posts/newsletter-011/index.md
+27Lines changed: 27 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -417,6 +417,33 @@ channel in the [PSP Homebrew discord server](https://discord.gg/WY8XhDG).
417417

418418
[rust-psp]: https://github.com/overdrivenpotato/rust-psp
419419

420+
### [glam]
421+
422+
[glam] is a simple and fast linear algebra crate for games and graphics.
423+
424+
This month [glam 0.9] was published to crates.io. This update is a breaking
425+
change from 0.8.
426+
427+
In 0.9 the `Vec3` type was changed from being a 128 byte SIMD vector type to a
428+
tuple of three floats. This changes the size of `Vec3` from 16 bytes to 12 bytes
429+
and the alignment from 16 bytes to 4 bytes. This might not effect all users but
430+
if `Vec3` was used in a context where the size or alignment mattered, such as in
431+
FFI or as input to shaders, this could cause breakage.
432+
433+
The SIMD parts of `Vec3` were moved to a new type, `Vec3A` (`A` for Aligned)
434+
which is 16 byte aligned and thus 16 bytes in size. The `Vec3A` type is still
435+
there for users who want the performance benefits of the SIMD implementation.
436+
437+
The motivation for this change was that it is potentially surprising and
438+
confusing for new users that the `Vec3` type was not 12 bytes. Also it's common
439+
that users needed a `Vec3` that was just 12 bytes.
440+
441+
While glam is reasonably stable it has not yet reached a 1.0 release so it
442+
seemed like now is the time to address such issues in the API.
443+
444+
[glam]: https://github.com/bitshifter/glam-rs
445+
[glam 0.9]: https://github.com/bitshifter/glam-rs/blob/master/CHANGELOG.md#090---2020-06-28
446+
420447
### [This Month in Mun][mun-june]
421448

422449
![Language Server Diagnostics in action](mun-languageserver.gif)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.