You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
748 B

5 years ago
  1. ///////////////////////////////////////////////////////////////////////////////////////////////////
  2. // OpenGL Mathematics Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
  3. ///////////////////////////////////////////////////////////////////////////////////////////////////
  4. // Created : 2010-07-07
  5. // Updated : 2010-07-07
  6. // Licence : This source is under MIT License
  7. // File : glm/gtx/int_10_10_10_2.inl
  8. ///////////////////////////////////////////////////////////////////////////////////////////////////
  9. namespace glm
  10. {
  11. GLM_FUNC_QUALIFIER dword uint10_10_10_2_cast
  12. (
  13. glm::vec4 const & v
  14. )
  15. {
  16. return dword(uint(v.x * 2047.f) << 0 | uint(v.y * 2047.f) << 10 | uint(v.z * 2047.f) << 20 | uint(v.w * 3.f) << 30);
  17. }
  18. }//namespace glm