void draw(){ wc.begin(); if(!switchVideo){ wc.setUniformTexture("colorMap", img.getTexture(), 1); wc.setUniformTexture("heightMap",gray.getTexture(), 2); } else{ wc.setUniformTexture("colorMap", player.getTexture(), 1); fboDepth.begin(); player.draw(0,0); fboDepth.end(); wc.setUniformTexture("heightMap",fboDepth.getDepthTexture(),2); } wc.setUniform1f("time", ofGetElapsedTimef()*time); wc.setUniform1f("gradientStep", stepGradient); wc.setUniform1f("advectStep", advectStep); wc.setUniform1f("flipHeightMap",flipHeightMap); wc.setUniform4f("advectMatrix",advectMatrix->w,advectMatrix->x,advectMatrix->y,advectMatrix->z); fbo.draw(0,0); wc.end(); img.draw(0,0,img.getWidth()/4,img.getHeight()/4); player.draw(img.getWidth()/4,0,img.getWidth()/4,img.getHeight()/4); gui.draw(); }
void draw(){ name = app->metadata.name; exercice = app->metadata.exercice; string stamp = app->session->timestamp.substr(0, stamp.size()-7); timestamp = day(stamp); counter = ofToString(app->session->getSize()); index = ofToString(app->session->index); app->heatmap.L = trace; app->session->speed = playback_speed; if(bVisible){ gui.draw(); if(app->metadata.exercice == "Setas"){ setasPanel.draw(); current = ofToString(app->reactions.n_hits) + "/" + ofToString(Assets::getInstance()->maxItems(app->metadata.variation)); time = ofToString(app->ellapsedTime, 1) + "/" + ofToString(Assets::getInstance()->maxTime(app->metadata.variation)) ; code = ofToString(Assets::getInstance()->exerciceCode(app->metadata.variation)) ; setasLife = ofToString(Assets::getInstance()->maxLife(app->metadata.variation)) ; } } }
// --------------------------------------------------------------------------------------- // void draw() { ofSetColor( ofColor::white ); ofDisableAlphaBlending(); destImage.draw( 0, 0, ofGetWidth(), ofGetHeight() ); if( drawGui ) { gui.draw(); } drawStringShadowed( fontSmall, "Method " + methodNames.at(methodIndex), 5, ofGetHeight() - 25 ); drawStringShadowed( fontSmall, "Scale " + ofToString( Scale * ScaleMultiplier ), 5, ofGetHeight() - 5 ); drawStringShadowed( fontSmall, ofToString( ofGetFrameRate(), 2), ofGetWidth() - 30, ofGetHeight() - 5); }
void draw() { ofBackground(25); fbo.begin(); ofClear(0,0,0,0); ofEnableDepthTest(); camera.begin(); glPushMatrix(); glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_ONE); glEnable(GL_ALPHA_TEST); glAlphaFunc(GL_GREATER, 0); if(dvel) draw_velocity(); if(dden){ draw_density(); } glDisable(GL_BLEND); glDisable(GL_ALPHA_TEST); glPopMatrix(); if( drawAxis ){ ofDrawAxis(15); } camera.end(); ofDisableDepthTest(); fbo.end(); shader.begin(); shader.setUniformTexture("tex",fbo.getTextureReference(),0); shader.setUniform2f("resolution",dw,dh); shader.setUniform1f("timer",ofGetElapsedTimef()); fbo.draw(0,0); shader.end(); gui.draw(); }
void draw() { ofBackgroundGradient(ofColor::white, ofColor::gray); if( filled ){ ofFill(); }else{ ofNoFill(); } ofSetColor(color); if(twoCircles){ ofCircle(center->x-radius*.5, center->y, radius ); ofCircle(center->x+radius*.5, center->y, radius ); }else{ ofCircle((ofVec2f)center, radius ); } // auto draw? // should the gui control hiding? if( bHide ){ gui.draw(); } }
void draw() { local.gui.draw(); remote.gui.draw(); zeros.draw(); }