#include <main.h>
#include <iostream>
#include <string>
#include <GL/glew.h>
#include <Eigen/OpenGLSupport>
#include <GL/freeglut.h>
◆ VERIFY_MATRIX
| #define VERIFY_MATRIX |
( |
|
CODE, |
|
|
|
REF |
|
) |
| |
Value: { \
glMatrixMode(GL_MODELVIEW); \
glLoadIdentity(); \
CODE; \
glGet(GL_MODELVIEW_MATRIX,
m); \
if(!(REF).cast<float>().isApprox(
m)) { \
std::cerr <<
"Expected:\n" << ((REF).cast<float>()) <<
"\n" <<
"got\n" <<
m <<
"\n\n"; \
} \
VERIFY_IS_APPROX((REF).cast<float>(),
m); \
}
Matrix3f m
Definition AngleAxis_mimic_euler.cpp:1
The matrix class, also used for vectors and row-vectors.
Definition Matrix.h:180
EIGEN_DEVICE_FUNC Derived & setZero(Index size)
Definition CwiseNullaryOp.h:562
◆ VERIFY_UNIFORM
| #define VERIFY_UNIFORM |
( |
|
SUFFIX, |
|
|
|
NAME, |
|
|
|
TYPE |
|
) |
| |
Value: { \
TYPE value; value.setRandom(); \
int loc = glGetUniformLocation(prg_id, #NAME); \
VERIFY((loc!=-1) && "uniform not found"); \
glUniform(loc,value); \
EIGEN_CAT(glGetUniform,SUFFIX)(prg_id,loc,
data.data()); \
if(!value.isApprox(
data)) { \
std::cerr <<
"Expected:\n" << value <<
"\n" <<
"got\n" <<
data <<
"\n\n"; \
} \
VERIFY_IS_APPROX(value,
data); \
}
int data[]
Definition Map_placement_new.cpp:1
#define TYPE
Definition benchFFT.cpp:31
◆ VERIFY_UNIFORMi
| #define VERIFY_UNIFORMi |
( |
|
NAME, |
|
|
|
TYPE |
|
) |
| |
Value: { \
TYPE value = TYPE::Random().eval().cast<
float>().cast<TYPE::Scalar>(); \
int loc = glGetUniformLocation(prg_id, #NAME); \
VERIFY((loc!=-1) && "uniform not found"); \
glUniform(loc,value); \
glGetUniformiv(prg_id,loc,(GLint*)
data.data()); \
if(!value.isApprox(
data)) { \
std::cerr <<
"Expected:\n" << value <<
"\n" <<
"got\n" <<
data <<
"\n\n"; \
} \
VERIFY_IS_APPROX(value,
data); \
}
◆ createProgram() [1/2]
| GLint createProgram |
( |
const char * |
vtx, |
|
|
const char * |
frg, |
|
|
bool |
print_errors = true |
|
) |
| |
◆ createProgram() [2/2]
| GLint createProgram |
( |
const std::string & |
vtx, |
|
|
const std::string & |
frg, |
|
|
bool |
print_errors = true |
|
) |
| |
◆ EIGEN_DECLARE_TEST()
| EIGEN_DECLARE_TEST |
( |
openglsupport |
| ) |
|
◆ find_and_replace()
| void find_and_replace |
( |
std::string & |
str, |
|
|
const std::string & |
find, |
|
|
const std::string & |
replace |
|
) |
| |
◆ format()
| std::string format |
( |
const std::string & |
str, |
|
|
const std::vector< std::string > & |
find, |
|
|
const std::vector< std::string > & |
replace |
|
) |
| |
◆ getGlslVersionString()
| std::string getGlslVersionString |
( |
int |
gl_major_version, |
|
|
int |
gl_minor_version |
|
) |
| |
◆ openglsupport_test_loop()
| void openglsupport_test_loop |
( |
| ) |
|
◆ printProgramInfoLog()
| void printProgramInfoLog |
( |
GLuint |
objectID | ) |
|
◆ printShaderInfoLog()
| void printShaderInfoLog |
( |
GLuint |
objectID | ) |
|