r3dux.org
How to: Convert an OpenCV cv::Mat to an OpenGL texture
I’m working on using OpenCV to get Kinect sensor data via OpenNI, and needed a way to get a matrix (cv::Mat) into an OpenGL texture – so I wrote a function to do just that – woo! …