Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions examples/micview.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@
pthread_t freenect_thread;
volatile int die = 0;

int window;

static freenect_context* f_ctx;
static freenect_device* f_dev;

Expand Down Expand Up @@ -149,7 +151,8 @@ void Reshape(int w, int h) {
void Keyboard(unsigned char key, int x, int y) {
if(key == 'q') {
die = 1;
pthread_exit(NULL);
pthread_join(freenect_thread, NULL);
glutDestroyWindow(window);
}
if(key == 32) {
paused = !paused;
Expand Down Expand Up @@ -205,7 +208,7 @@ int main(int argc, char** argv) {
glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGBA | GLUT_ALPHA );
glutInitWindowSize(800, 600);
glutInitWindowPosition(0, 0);
glutCreateWindow("Microphones");
window = glutCreateWindow("Microphones");
glClearColor(0.0, 0.0, 0.0, 0.0);
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
Expand Down