void cApp::draw(){ mExp.begin( camUi.getCamera() );{ gl::clear(); gl::enableAlphaBlending(); gl::pushMatrices(); if( !mExp.bRender && !mExp.bSnap ){ glLineWidth( 3 ); mt::drawCoordinate(100); } if( mDg.mDot ){ glPointSize( 1 ); gl::draw( mDg.mDot ); } gl::popMatrices(); }mExp.end(); if( bDrawLine ){ mExp2.begin( camUi.getCamera() );{ gl::clear(); gl::enableAlphaBlending(); gl::pushMatrices(); if( mDg.mLine ){ glLineWidth( 1 ); gl::draw( mDg.mLine ); } gl::popMatrices(); }mExp2.end(); } //gl::enableAdditiveBlending(); gl::clear( ColorA(0,0,0,1) ); gl::color( Color::white() ); mExp.draw(); if( bDrawLine ) mExp2.draw(); gl::drawString("Frame: " + to_string(frame), Vec2f(50, 50) ); gl::drawString("simDirNum: " + to_string(simDirNum), Vec2f(50, 75) ); gl::drawString("numParticle: " + to_string(numParticle), Vec2f(50, 100) ); #ifdef RENDER frame+=1; #else frame+=1; #endif }
void cApp::draw(){ bOrtho ? mExp.beginOrtho( true ) : mExp.begin( camUi.getCamera() ); { gl::clear(); gl::enableDepthRead(); gl::enableDepthWrite(); gl::enableAlphaBlending(); glPointSize(1); glLineWidth(1); if( !mExp.bRender && !mExp.bSnap ){ mt::drawCoordinate(10); } for( int i=0; i<rms.size(); i++){ rms[rms.size()-i-1].draw(); } norms.draw(); }mExp.end(); mExp.draw(); if(gui) gui->draw(); if( bStart && !bFall )frame++; }
void cApp::draw(){ //gl::setMatrices( camUi.getCamera() ); mExp.begin( camUi.getCamera() ); { gl::clear( Color(0,0,0) ); gl::pointSize(1); gl::lineWidth(1); gl::enableAlphaBlending(); gl::color(1,1,1); gl::TextureRef tex = gl::Texture::create( sur ); gl::draw( tex ); // feature key point //gl::enableAdditiveBlending(); nline.draw(); vbo.draw(); } mExp.end(); mExp.draw(); frame+=1; }
void cApp::draw(){ mExp.begin( mCamUi.getCamera() ); { gl::clear( Colorf(0,0,0) ); if(0){ glPushMatrix(); glTranslatef( 5, 0, 0); gl::color(1, 1, 1); glBegin( GL_POINTS ); for( int i=0; i<mSAs.size(); i++ ){ for (int j=0; j<mSAs[i].points.size(); j++) { glVertex3f( mSAs[i].points[j] ); } } glEnd(); glPopMatrix(); } glPushMatrix(); glTranslatef( -total*scale*0.5, 0, 0); gl::color(0, 0, 1, 0.35); glBegin( GL_POINTS ); for( int i=0; i<mPlnPts.size(); i++ ){ glVertex3f( mPlnPts[i] ); } glEnd(); glPopMatrix(); glPushMatrix(); glColor3f(1, 0, 0); glBegin( GL_LINES ); glVertex3f(-100, 0, 0); glVertex3f(100, 0, 0); glEnd(); glPopMatrix(); } mExp.end(); gl::clear( Colorf(1,1,1) ); gl::color( Colorf(1,1,1) ); mExp.draw(); }
void cApp::draw(){ mExp.begin( camUi.getCamera() );{ gl::clear(); gl::enableAlphaBlending(); gl::pushMatrices(); glPointSize( 1 ); for( auto & v : vbo){ v.draw(); } gl::popMatrices(); }mExp.end(); gl::clear( ColorA(1,1,1,1) ); gl::color( Color::white() ); mExp.draw(); gl::drawString("Frame: " + to_string(frame), Vec2f(50, 50) ); frame++; }
void cApp::draw(){ glPointSize(1); glLineWidth(1); gl::enableAlphaBlending(); mExp.begin(camui.getCamera());{ gl::clear(); mt::drawCoordinate(100); vbo.draw(); } mExp.end(); mExp.draw(); gl::pushMatrices(); { gl::color(1, 1, 1); gl::drawString("fps " + to_string( getAverageFps()), vec2(20,20) ); gl::drawString("frame " + to_string( frame ), vec2(20,35) ); } gl::popMatrices(); }
void cApp::draw(){ mExp.begin( camUi.getCamera() );{ gl::clear( ColorA(0,0,0,1) ); gl::enableAlphaBlending(); gl::enableDepthRead(); gl::enableDepthWrite(); if( !mExp.bSnap && !mExp.bRender ){ // Guide mt::drawCoordinate( 100 ); } glPointSize( 1 ); gl::translate( -intensityW/2, -intensityH/2 ); gl::draw( mPoints ); }mExp.end(); gl::clear( ColorA(1,1,1,1) ); gl::color( Color::white() ); mExp.draw(); }