17 #include "../gtx/optimum_pow.hpp"
19 #ifndef GLM_ENABLE_EXPERIMENTAL
20 # error "GLM: GLM_GTX_gradient_paint 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."
23 #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
24 # pragma message("GLM: GLM_GTX_gradient_paint extension included")
34 template<
typename T, qualifier P>
36 vec<2, T, P>
const & Center,
38 vec<2, T, P>
const & Focal,
39 vec<2, T, P>
const & Position);
43 template<
typename T, qualifier P>
45 vec<2, T, P>
const & Point0,
46 vec<2, T, P>
const & Point1,
47 vec<2, T, P>
const & Position);
52 #include "gradient_paint.inl"
GLM_FUNC_DECL T radialGradient(vec< 2, T, P > const &Center, T const &Radius, vec< 2, T, P > const &Focal, vec< 2, T, P > const &Position)
Return a color from a radial gradient.
GLM_FUNC_DECL T linearGradient(vec< 2, T, P > const &Point0, vec< 2, T, P > const &Point1, vec< 2, T, P > const &Position)
Return a color from a linear gradient.