Added test on presence of glTranspose extension (for old hw support)

This commit is contained in:
Paolo Cignoni 2004-07-13 15:55:57 +00:00
parent 5e9d001b2f
commit ed3a96d48d
1 changed files with 15 additions and 2 deletions

View File

@ -24,6 +24,9 @@
History History
$Log: not supported by cvs2svn $ $Log: not supported by cvs2svn $
Revision 1.6 2004/05/26 15:12:39 cignoni
Removed inclusion of gl extension stuff
Revision 1.5 2004/05/12 20:54:55 ponchio Revision 1.5 2004/05/12 20:54:55 ponchio
*** empty log message *** *** empty log message ***
@ -55,12 +58,22 @@ namespace vcg {
inline void glMultMatrix(const Matrix44f &matrix) { inline void glMultMatrix(const Matrix44f &matrix) {
//glMultMatrixf((const GLfloat *)(matrix[0])); //glMultMatrixf((const GLfloat *)(matrix[0]));
glMultTransposeMatrixf((const GLfloat *)(matrix[0])); if(glMultTransposeMatrixf) glMultTransposeMatrixf((const GLfloat *)(matrix[0]));
else {
Matrix44f tmp(matrix);
Transpose(tmp);
glMultMatrixf((const GLfloat *)(tmp[0]));
}
} }
inline void glMultMatrix(const Matrix44d &matrix) { inline void glMultMatrix(const Matrix44d &matrix) {
// glMultMatrixd((const GLdouble *)(matrix[0])); // glMultMatrixd((const GLdouble *)(matrix[0]));
glMultTransposeMatrixd((const GLdouble *)(matrix[0])); if(glMultTransposeMatrixd) glMultTransposeMatrixd((const GLdouble *)(matrix[0]));
else {
Matrix44d tmp(matrix);
Transpose(tmp);
glMultMatrixd((const GLdouble *)(tmp[0]));
}
} }
inline void glMultMatrix(const Similarityf &s) { inline void glMultMatrix(const Similarityf &s) {