Add support for doing an identity initialization in the default constructor of fmat4x4SIMD().

This is disabled by default and enabled with GLM_SIMD_ENABLE_DEFAULT_INIT. It makes toggling between SIMD and non-SIMD builds a bit easier.
This commit is contained in:
Dave Reid 2012-12-21 07:55:39 +10:00
parent efff3add87
commit 3681cd3523

View File

@ -26,7 +26,14 @@ GLM_FUNC_QUALIFIER fmat4x4SIMD::size_type fmat4x4SIMD::row_size()
} }
GLM_FUNC_QUALIFIER fmat4x4SIMD::fmat4x4SIMD() GLM_FUNC_QUALIFIER fmat4x4SIMD::fmat4x4SIMD()
{} {
#ifndef GLM_SIMD_ENABLE_DEFAULT_INIT
this->Data[0] = fvec4SIMD(1.0f, 0, 0, 0);
this->Data[1] = fvec4SIMD(0, 1.0f, 0, 0);
this->Data[2] = fvec4SIMD(0, 0, 1.0f, 0);
this->Data[3] = fvec4SIMD(0, 0, 0, 1.0f);
#endif
}
GLM_FUNC_QUALIFIER fmat4x4SIMD::fmat4x4SIMD(float const & s) GLM_FUNC_QUALIFIER fmat4x4SIMD::fmat4x4SIMD(float const & s)
{ {