diff options
Diffstat (limited to '06_performance/src/oni.cpp')
| -rw-r--r-- | 06_performance/src/oni.cpp | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/06_performance/src/oni.cpp b/06_performance/src/oni.cpp index 3f028fc..346adec 100644 --- a/06_performance/src/oni.cpp +++ b/06_performance/src/oni.cpp @@ -98,13 +98,13 @@ void syncOniPlayer::drawCloud(int step){ } void syncOniPlayer::drawPoints(float birth,float life,float dx,float dy, float dz,float size){ if (!drawable) return; - glEnable(GL_PROGRAM_POINT_SIZE); - glEnable(GL_POINT_SMOOTH); - glHint(GL_POINT_SMOOTH_HINT, GL_NICEST); + //glEnable(GL_PROGRAM_POINT_SIZE); + //glEnable(GL_POINT_SMOOTH); + //glHint(GL_POINT_SMOOTH_HINT, GL_NICEST); glEnable( GL_BLEND ); glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA ); //glPointSize( size); - glBegin(GL_POINTS); + //glBegin(GL_POINTS); const XnDepthPixel* depthmap=players[0]->getDepthGenerator().GetDepthMap(); const ofPixels& pixels=players[0]->getImagePixels(); int range=1700; @@ -121,7 +121,11 @@ void syncOniPlayer::drawPoints(float birth,float life,float dx,float dy, float d //fpoint f=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); //f.draw(life,dx,dy,dz); if (pointPool.size()) {//take 1st dead particle - points[(*pointPool.begin())].setup(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); + points[(*pointPool.begin())].setup(p.x, p.y, p.z, + LUT[pixels[((j*step*dmw)+(i*step))*3]], + LUT[pixels[((j*step*dmw)+(i*step))*3]+1], + LUT[pixels[((j*step*dmw)+(i*step))*3]+2] + ); pointPool.erase(pointPool.begin()); } else {//make a new one @@ -134,9 +138,9 @@ void syncOniPlayer::drawPoints(float birth,float life,float dx,float dy, float d pointPool.insert(i); } } - glEnd(); + //glEnd(); glDisable( GL_BLEND ); - glDisable(GL_PROGRAM_POINT_SIZE); + //glDisable(GL_PROGRAM_POINT_SIZE); } int syncOniPlayer::getNumParticles(){ return points.size()-pointPool.size(); |
