
On Fri, Jun 6, 2014 at 11:50 AM, Erik H
Hi Emil,
Apologies for being yet another random support requester :) I use GLM http://www.g-truc.net/project-0016.html#menu here and there and boost quite a bit; replacing the GLM dependency with boost::QVM is therefore attractive, assuming it is approved. As a GLM user, I have a couple questions:
Ha, I didn't mean to imply that I'm annoyed by support questions. :)
Would I have to use QVM with my own matrix type if I want to feed a QVM matrix to glUniformMatrix4fv without a temp copy? With GLM, I do this using, for example, glUniformMatrix4fv(fooLoc, 1, GL_FALSE, glm::value_ptr(fooMatrix)).
If a matrix type stores its values as anything but a 1-dimensional
array in column-major order, you can't (portably) feed it into
glUniformMatrix4fv without a temporary; at least it'd require a cast,
which in theory may not work on some platform.
The solution if you use QVM is to define your own matrix type that
stores the values as an array internally, which would let you pass it
to OpenGL without a temp:
struct gl_mat4
{
float el[16];
};
Then you specialize the m_traits type from the QVM library to enable
the appropriate matrix operations for objects of type gl_mat4:
template <>
struct m_traits