invisible
diff src/frame.cc @ 13:65fd6d7c42b1
foo: show/hide rgb video and depth frames
author | Eleni Maria Stea <eleni@mutantstargoat.com> |
---|---|
date | Tue, 05 Nov 2013 00:24:25 +0200 |
parents | 226073258785 |
children | 8b81571dd4dd |
line diff
1.1 --- a/src/frame.cc Mon Nov 04 23:39:22 2013 +0200 1.2 +++ b/src/frame.cc Tue Nov 05 00:24:25 2013 +0200 1.3 @@ -1,5 +1,4 @@ 1.4 #include <GL/gl.h> 1.5 -#include <assert.h> 1.6 #include <cxcore.h> 1.7 #include <opencv2/imgproc/imgproc.hpp> 1.8 #include <opencv2/photo/photo.hpp> 1.9 @@ -55,8 +54,10 @@ 1.10 if(has_video) { 1.11 glBindTexture(GL_TEXTURE_2D, video_tex); 1.12 glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, KINECT_VIDEO_WIDTH, KINECT_VIDEO_HEIGHT, GL_BGR, GL_UNSIGNED_BYTE, video_buf.data); 1.13 - //glBindTexture(GL_TEXTURE_2D, depth_tex); 1.14 - //subi; 1.15 + } 1.16 + if(has_depth) { 1.17 + glBindTexture(GL_TEXTURE_2D, depth_tex); 1.18 + glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, KINECT_DEPTH_WIDTH, KINECT_DEPTH_HEIGHT, GL_LUMINANCE, GL_UNSIGNED_BYTE, depth_buf.data); 1.19 } 1.20 if(has_video && has_depth) {//pot 1.21 }