Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix glm::rotate for GLM_FORCE_QUAT_DATA_XYZW configuration #1111

Closed
wants to merge 1 commit into from
Closed

Fix glm::rotate for GLM_FORCE_QUAT_DATA_XYZW configuration #1111

wants to merge 1 commit into from

Conversation

zeux
Copy link

@zeux zeux commented Jul 17, 2022

GLM_FORCE_QUAT_DATA_XYZW doesn't simply change the data layout, it also changes the meaning of quat constructor.
This means that every call inside glm itself that passes 4 arguments needs to check that define.

This change fixes glm::rotate specifically by relying on scalar+vector ctor (which is stable across configurations), although
there are other instances in glm that are likely problematic eg glm::cross.

GLM_FORCE_QUAT_DATA_XYZW doesn't simply change the data layout, it also changes the meaning of quat constructor.
This means that every call inside glm itself that passes 4 arguments needs to check that define.

This change fixes glm::rotate specifically by relying on scalar+vector ctor (which is stable across configurations), although
there are other instances in glm that are likely problematic eg glm::cross.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant