wrap.hpp 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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. #ifndef GLM_ENABLE_EXPERIMENTAL
  17. # error "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."
  18. #endif
  19. #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
  20. # pragma message("GLM: GLM_GTX_wrap extension included")
  21. #endif
  22. namespace glm
  23. {
  24. /// @addtogroup gtx_wrap
  25. /// @{
  26. /// Simulate GL_CLAMP OpenGL wrap mode
  27. /// @see gtx_wrap extension.
  28. template<typename genType>
  29. GLM_FUNC_DECL genType clamp(genType const& Texcoord);
  30. /// Simulate GL_REPEAT OpenGL wrap mode
  31. /// @see gtx_wrap extension.
  32. template<typename genType>
  33. GLM_FUNC_DECL genType repeat(genType const& Texcoord);
  34. /// Simulate GL_MIRRORED_REPEAT OpenGL wrap mode
  35. /// @see gtx_wrap extension.
  36. template<typename genType>
  37. GLM_FUNC_DECL genType mirrorClamp(genType const& Texcoord);
  38. /// Simulate GL_MIRROR_REPEAT OpenGL wrap mode
  39. /// @see gtx_wrap extension.
  40. template<typename genType>
  41. GLM_FUNC_DECL genType mirrorRepeat(genType const& Texcoord);
  42. /// @}
  43. }// namespace glm
  44. #include "wrap.inl"