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

Quaternion elements order inconsistency depending on GLM_LANG_CXXMS_FLAG #934

Closed
GPopov opened this issue Aug 2, 2019 · 2 comments
Closed
Assignees

Comments

@GPopov
Copy link

GPopov commented Aug 2, 2019

The order of the w,x,y,z members in quats is not consistent, depending if GLM_LANG has the GLM_LANG_CXXMS_FLAG set. This currently produces a warning of the type:

field 'w' will be initialized after field 'x' [-Werror,-Wreorder]
in instantiation of member function 'glm::qua<float, glm::packed_lowp>::qua' requested here

The incosistency seems to have been introduced in abcc460

# if GLM_LANG & GLM_LANG_CXXMS_FLAG
union
{
struct { T w, x, y, z;};
typename detail::storage<4, T, detail::is_aligned<Q>::value>::type data;
};
# else
T x, y, z, w;
# endif

@pwipf
Copy link

pwipf commented Aug 7, 2019

I just commented on closed issue #916 before seeing this issue.

Inconsistent order caused by commit f5381ef.

My 2 cents is to roll back to the storage order x,y,z,w, which is consistent with glm::vec4 storage order, and openGL vec4 storage order, and is consistent with other well respected matrix libraries (Eigen).

Please see my comments on issue #916.

@Groovounet
Copy link
Member

This issue has been resolved with #942.

Thanks for reporting !

@Groovounet Groovounet self-assigned this Sep 7, 2019
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

No branches or pull requests

3 participants