where Vector3 is a vec3 typedef and m_lo and m_hi are Vector3’s. I keep getting errors similar to this:
‘glm::detail::tquat<valType> glm::detail::operator /(const glm::detail::tquat<valType> &,const valType &)’ :
could not deduce template argument for ‘const glm::detail::tquat<valType>&’ from ‘glm::detail::tvec3<valType>’
whereas I obviously need the template for (const glm::detail::vec3<valType> &,const valType &),
which I believe is defined in type_vec3.inl(491) by inline tvec3<T> operator/ (const tvec3<T>& v, T const & s)
GLM is really strict on types: there is no automatic cast at all.
‘2.0’ is a double but you are using it with a vec3 which is based on single-precision floating-point numbers.
GLM is strict based on GLSL API, sementics and conventions so that based on GLSL knowledge, you know how to use GLM. In GLSL conversions are explicits so GLM conversions are.
I figured as much and I tried that before.
However, when I explicitly cast to float, or use a qualifier (2.0f), I get the following error:
1>e:\development\glm-0.8.4.0\glm\core ype_half.inl(249) : error C2440: ‘<function-style-cast>’ : cannot convert from ‘const RenderTools::Vector3’ to ‘float’
1> No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
1> e:\development\rendertools-1.0\src ypes.h(187) : see reference to function template instantiation ‘glm::detail::half::half<RenderTools::Vector3>(const U &)’ being compiled
1> with
1> [
1> U=RenderTools::Vector3
1> ]
which I understand even less.
I compile with the following:
1>e:\development\rendertools-1.0\src
ode.cpp(57) : error C2676: binary ‘+=’ : ‘RenderTools::Quaternion’ does not define this operator or a conversion to a type acceptable to the predefined operator
changing the code to
q1 = q1 + q2
gives me:
1>e:\development\rendertools-1.0\src
ode.cpp(57) : error C2679: binary ‘=’ : no operator found which takes a right-hand operand of type ‘glm::detail::half’ (or there is no acceptable conversion)
1> e:\development\glm-0.8.4.0\glm\gtc\quaternion.hpp(54): could be ‘glm::detail::tquat<valType> &glm::detail::tquat<valType>::operator =(const glm::detail::tquat<valType> &)’
1> with
1> [
1> valType=float
1> ]
1> while trying to match the argument list ‘(RenderTools::Quaternion, glm::detail::half)’
I’m a bit at a loss here. hope someone can help.
thats a bit difficult right now, as things are spread out over
several files and in order to reproduce the problem, you’d have to build the whole system. I’ll try to make a simple pathological example, as soon as my deadline of 4 december has passed…
hm. I don’t know what happened, but revisiting this issue I can’t reproduce it. Must have been a clash with some other lib’s Im using, or my lack of understanding of templates. Anyway, I’ll leave this topic as a ‘dangling pointer’… Thanks for the support, though.