wrap.hpp 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /// @ref gtx_wrap
  2. /// @file glm/gtx/wrap.hpp
  3. ///
  4. /// @see core (dependence)
  5. ///
  6. /// @defgroup gtx_wrap GLM_GTX_wrap
  7. /// @ingroup gtx
  8. ///
  9. /// Include <glm/gtx/wrap.hpp> to use the features of this extension.
  10. ///
  11. /// Wrapping mode of texture coordinates.
  12. #pragma once
  13. // Dependency:
  14. #include "../glm.hpp"
  15. #include "../gtc/vec1.hpp"
  16. #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
  17. # ifndef GLM_ENABLE_EXPERIMENTAL
  18. # pragma message("GLM: GLM_GTX_wrap is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it.")
  19. # else
  20. # pragma message("GLM: GLM_GTX_wrap extension included")
  21. # endif
  22. #endif
  23. namespace glm
  24. {
  25. /// @addtogroup gtx_wrap
  26. /// @{
  27. /// Simulate GL_CLAMP OpenGL wrap mode
  28. /// @see gtx_wrap extension.
  29. template<typename genType>
  30. GLM_FUNC_DECL genType clamp(genType const& Texcoord);
  31. /// Simulate GL_REPEAT OpenGL wrap mode
  32. /// @see gtx_wrap extension.
  33. template<typename genType>
  34. GLM_FUNC_DECL genType repeat(genType const& Texcoord);
  35. /// Simulate GL_MIRRORED_REPEAT OpenGL wrap mode
  36. /// @see gtx_wrap extension.
  37. template<typename genType>
  38. GLM_FUNC_DECL genType mirrorClamp(genType const& Texcoord);
  39. /// Simulate GL_MIRROR_REPEAT OpenGL wrap mode
  40. /// @see gtx_wrap extension.
  41. template<typename genType>
  42. GLM_FUNC_DECL genType mirrorRepeat(genType const& Texcoord);
  43. /// @}
  44. }// namespace glm
  45. #include "wrap.inl"