added templated glLoadMatrix that automatically choose the right OpenGL call according the matrix type

This commit is contained in:
Paolo Cignoni 2014-08-06 22:37:55 +00:00
parent b06ff095a1
commit 9b6833e521
1 changed files with 19 additions and 14 deletions

View File

@ -74,6 +74,11 @@ Revision 1.1 2004/03/31 15:27:17 ponchio
namespace vcg {
template<typename T>
inline void glLoadMatrix(const vcg::Matrix44<T> &m) { assert(0); }
template<> inline void glLoadMatrix(const vcg::Matrix44f &m) {glLoadMatrixf(m.V()); }
template<> inline void glLoadMatrix(const vcg::Matrix44d &m) {glLoadMatrixd(m.V()); }
template<typename T,int StorageOrder>
inline void glLoadMatrix(const Eigen::Matrix<T,4,4,StorageOrder>& matrix) { assert(0); }