#include "testApp.h" //next. //the real project //texture binding with normalised coords void bindTexture(ofBaseHasTexture &t) { ofTexture &tex = t.getTextureReference(); tex.bind(); glMatrixMode(GL_TEXTURE); glPushMatrix(); glLoadIdentity(); ofTextureData texData = tex.getTextureData(); if(texData.textureTarget == GL_TEXTURE_RECTANGLE_ARB) { glScalef(tex.getWidth(), tex.getHeight(), 1.0f); } else { glScalef(tex.getWidth() / texData.tex_w, tex.getHeight() / texData.tex_h, 1.0f); } glMatrixMode(GL_MODELVIEW); } void unbindTexture(ofBaseHasTexture &t) { t.getTextureReference().unbind(); glMatrixMode(GL_TEXTURE); glPopMatrix(); glMatrixMode(GL_MODELVIEW); } //-------------------------------------------------------------- void testApp::setup() { ofSetLogLevel(OF_LOG_NOTICE); verdana.loadFont(ofToDataPath("verdana.ttf"), 10); playing=0; numDevices=1; string filename="TRSS_nesbitt_recordings.xml"; if( !XML.loadFile(filename) ){ printf("unable to load recordings, check data/ folder\n"); }else{ if(XML.pushTag("TRSS")) { int num=XML.getNumTags("rec"); if(num) { for (int i=0;irange) continue; // gets rid of background -> still a bit weird if userID > 0... //&& isCPBkgnd //ofColor color = kinect->getColorAt(x,y); //userID); //if (col) glColor4ub((unsigned char)color.r, (unsigned char)color.g, (unsigned char)color.b, (unsigned char)color.a); // else points.push_back(fpoint(p.x, p.y, p.z,pixels[((j*step*dmw)+(i*step))*3],pixels[((j*step*dmw)+(i*step))*3]+1,pixels[((j*step*dmw)+(i*step))*3]+2,20,0.5)); //glColor4ub((unsigned char)255, (unsigned char)255, (unsigned char)255, (unsigned char)255); //glColor4ub(pixels[((j*step*dmw)+(i*step))*3],pixels[((j*step*dmw)+(i*step))*3]+1,pixels[((j*step*dmw)+(i*step))*3]+2, (unsigned char)255); //glVertex3f(p.x, p.y, p.z); //if (i==320&&j==160) cerr<<"world point: "<