nuclear@3: #include "opengl.h" nuclear@3: nuclear@3: void load_gl_matrix(const Matrix4x4 &mat) nuclear@3: { nuclear@3: #ifdef SINGLE_PRECISION_MATH nuclear@3: if(glLoadTransposeMatrixfARB) { nuclear@3: glLoadTransposeMatrixfARB((float*)&mat); nuclear@3: } else { nuclear@3: Matrix4x4 tmat = mat.transposed(); nuclear@3: glLoadMatrixf((float*)&tmat); nuclear@3: } nuclear@3: #else nuclear@3: if(glLoadTransposeMatrixdARB) { nuclear@3: glLoadTransposeMatrixdARB((double*)&mat); nuclear@3: } else { nuclear@3: Matrix4x4 tmat = mat.transposed(); nuclear@3: glLoadMatrixd((double*)&tmat); nuclear@3: } nuclear@3: #endif nuclear@3: } nuclear@3: nuclear@3: void mult_gl_matrix(const Matrix4x4 &mat) nuclear@3: { nuclear@3: #ifdef SINGLE_PRECISION_MATH nuclear@3: if(glMultTransposeMatrixfARB) { nuclear@3: glMultTransposeMatrixfARB((float*)&mat); nuclear@3: } else { nuclear@3: Matrix4x4 tmat = mat.transposed(); nuclear@3: glMultMatrixf((float*)&tmat); nuclear@3: } nuclear@3: #else nuclear@3: if(glMultTransposeMatrixdARB) { nuclear@3: glMultTransposeMatrixdARB((double*)&mat); nuclear@3: } else { nuclear@3: Matrix4x4 tmat = mat.transposed(); nuclear@3: glMultMatrixd((double*)&tmat); nuclear@3: } nuclear@3: #endif nuclear@3: }