fix bug #204: limit integer values to numbers which are representable using float

This commit is contained in:
Gael Guennebaud 2011-03-02 14:24:26 +01:00
parent c8e1b679fa
commit adacacb285

View File

@ -57,7 +57,7 @@ using namespace Eigen;
} }
#define VERIFY_UNIFORMi(NAME,TYPE) { \ #define VERIFY_UNIFORMi(NAME,TYPE) { \
TYPE value; value.setRandom(); \ TYPE value = TYPE::Random().eval().cast<float>().cast<TYPE::Scalar>(); \
TYPE data; \ TYPE data; \
int loc = glGetUniformLocation(prg_id, #NAME); \ int loc = glGetUniformLocation(prg_id, #NAME); \
VERIFY((loc!=-1) && "uniform not found"); \ VERIFY((loc!=-1) && "uniform not found"); \