15 Eigen::Vector2i size(image.cols, image.rows);
17 GLuint format = GL_BGR;
18 GLuint type = GL_UNSIGNED_BYTE;
20 switch(image.depth()) {
22 type = GL_UNSIGNED_BYTE;
25 type = GL_UNSIGNED_SHORT;
46 std::cerr <<
"error: unsupported depth " << image.depth() << std::endl;
50 switch(image.channels()) {
64 std::cerr <<
"error: unsupported channels " << image.channels() << std::endl;
68 return std::make_shared<glk::Texture>(size, GL_RGBA, format, type, image.data);
#define CV_16F
Definition texture_opencv.hpp:9