Platformer in OpenGL
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.

34 lines
571 B

5 years ago
  1. #define GLM_ENABLE_EXPERIMENTAL
  2. #include <glm/gtx/gradient_paint.hpp>
  3. int test_radialGradient()
  4. {
  5. int Error = 0;
  6. float Gradient = glm::radialGradient(glm::vec2(0), 1.0f, glm::vec2(1), glm::vec2(0.5));
  7. Error += Gradient != 0.0f ? 0 : 1;
  8. return Error;
  9. }
  10. int test_linearGradient()
  11. {
  12. int Error = 0;
  13. float Gradient = glm::linearGradient(glm::vec2(0), glm::vec2(1), glm::vec2(0.5));
  14. Error += Gradient != 0.0f ? 0 : 1;
  15. return Error;
  16. }
  17. int main()
  18. {
  19. int Error = 0;
  20. Error += test_radialGradient();
  21. Error += test_linearGradient();
  22. return Error;
  23. }