-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Description
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