diff --git a/inc/hgl/math/HalfFloat.h b/inc/hgl/math/HalfFloat.h index e771cda..f6c3aa7 100644 --- a/inc/hgl/math/HalfFloat.h +++ b/inc/hgl/math/HalfFloat.h @@ -2,6 +2,7 @@ #define HGL_HALF_FLOAT_INCLUDE #include +#include namespace hgl { @@ -143,6 +144,44 @@ namespace hgl ++target; ++source; } - } + } + + inline void half2u16(uint16 *output,const half_float *input,const uint count) + { + union + { + float f; + uint32 u; + }x; + + for(uint i=0;i