Added GTC_functions extension

This commit is contained in:
Christophe Riccio
2016-07-14 15:20:44 +02:00
parent 3b1af3fe0b
commit b8b43e6a4d
5 changed files with 121 additions and 0 deletions

View File

@@ -2,6 +2,7 @@ glmCreateTestGTC(gtc_bitfield)
glmCreateTestGTC(gtc_color_space)
glmCreateTestGTC(gtc_constants)
glmCreateTestGTC(gtc_epsilon)
glmCreateTestGTC(gtc_functions)
glmCreateTestGTC(gtc_integer)
glmCreateTestGTC(gtc_matrix_access)
glmCreateTestGTC(gtc_matrix_integer)

View File

@@ -0,0 +1,35 @@
#include <glm/gtc/functions.hpp>
#include <vector>
int test_gauss_1d()
{
int Error = 0;
std::vector<float> Result(20);
for(std::size_t i = 0, n = Result.size(); i < n; ++i)
Result[i] = glm::gauss(static_cast<float>(i) * 0.1f, 0.0f, 1.0f);
return Error;
}
int test_gauss_2d()
{
int Error = 0;
std::vector<float> Result(20);
for(std::size_t i = 0, n = Result.size(); i < n; ++i)
Result[i] = glm::gauss(glm::vec2(i) * 0.1f, glm::vec2(0.0f), glm::vec2(1.0f));
return Error;
}
int main()
{
int Error = 0;
Error += test_gauss_1d();
Error += test_gauss_2d();
return Error;
}