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

warnings for glm::decompose in MS VS12.0.21005.1 for glm 0.9.6.3 #373

Closed
senselevel opened this issue Aug 1, 2015 · 1 comment
Closed
Assignees
Labels
Milestone

Comments

@senselevel
Copy link

In MS Visual Studio 2013, if I do something like:

glm::mat4x4 glmMat;
// assign something to glmMat (removed for brevity)
glm::vec3 scale, translation, skew;
glm::vec4 perspective;
glm::quat rotation;

glm::decompose(glmMat, scale, rotation, translation, skew, perspective);

it will generate the following conversion warnings, based on loss of precision.

4>c:\monkey\dependencies\glm\glm\gtx\matrix_decompose.inl(189): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
4> ..\MeshSceneManager.cpp(213) : see reference to function template instantiation 'bool glm::decompose<float,0>(const glm::tmat4x4<float,0> &,glm::tvec3<float,0> &,glm::tquat<float,0> &,glm::tvec3<float,0> &,glm::tvec3<float,0> &,glm::tvec4<float,0> &)' being compiled
4>c:\monkey\dependencies\glm\glm\gtx\matrix_decompose.inl(193): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
4>c:\monkey\dependencies\glm\glm\gtx\matrix_decompose.inl(194): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
4>c:\monkey\dependencies\glm\glm\gtx\matrix_decompose.inl(201): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
4>c:\monkey\dependencies\glm\glm\gtx\matrix_decompose.inl(202): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
4>c:\monkey\dependencies\glm\glm\gtx\matrix_decompose.inl(209): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
4>c:\monkey\dependencies\glm\glm\gtx\matrix_decompose.inl(211): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
4>c:\monkey\dependencies\glm\glm\gtx\matrix_decompose.inl(217): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
4>c:\monkey\dependencies\glm\glm\gtx\matrix_decompose.inl(220): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data

I looked at it, seemed like explicit casts to the template type should handle it, but I thought you should look at it.

M

Groovounet added a commit that referenced this issue Aug 1, 2015
@Groovounet Groovounet added the bug label Aug 1, 2015
@Groovounet Groovounet added this to the GLM 0.9.7 milestone Aug 1, 2015
@Groovounet Groovounet self-assigned this Aug 1, 2015
@Groovounet
Copy link
Member

This issue is fixed in master branch for GLM 0.9.7 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants