本文整理汇总了C++中ofFloatImage::draw方法的典型用法代码示例。如果您正苦于以下问题:C++ ofFloatImage::draw方法的具体用法?C++ ofFloatImage::draw怎么用?C++ ofFloatImage::draw使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ofFloatImage
的用法示例。
在下文中一共展示了ofFloatImage::draw方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: draw
//--------------------------------------------------------------
void testApp::draw(){
int disp_img_w = 153;
int disp_img_h = 120;
int disp_img_off_x = 250;
int disp_img_off_y = 10;
int spc = 10;
for (int i = 0; i < images.size(); i++) {
int row = i / 4;
int col = i % 4;
ofPushMatrix();
ofTranslate(disp_img_off_x + (disp_img_w + spc) * col, disp_img_off_y + (disp_img_h + spc) * row);
images[i].draw(0, 0, disp_img_w, disp_img_h);
ofPopMatrix();
}
ofPushMatrix();
ofTranslate(disp_img_off_x, (disp_img_h + spc) * 2 + spc);
img.draw(0, 0, 640, 480);
ofPopMatrix();
gui.draw();
// ofDrawBitmapString(ofToString(ofGetFrameRate(), 0), 20, ofGetHeight() - 20);
}
示例2: renderScene
void renderScene(ofAutoShader& shader, ofFloatImage& xyz, ofFloatImage& confidence) {
float mx = (float) ofGetMouseX() / ofGetWidth();
float my = (float) ofGetMouseY() / ofGetHeight();
shader.begin(); {
shader.setUniformTexture("xyzMap", xyz, 0);
shader.setUniformTexture("confidenceMap", confidence, 1);
shader.setUniform1f("elapsedTime", ofGetElapsedTimef());
shader.setUniform1i("frameNumber", ofGetFrameNum());
shader.setUniform2f("mouse", ofVec2f(mx,my));
xyz.draw(0, 0);
} shader.end();
}
示例3: draw
void draw() {
ofEnableAlphaBlending();
ofSetColor(255);
ofHideCursor();
renderScene(shader, xyzMap, confidenceMap);
if (server->getDebug()) {
speakerXyzMap.draw(mouseX, mouseY);
speakerFbo.draw(mouseX, mouseY+8);
string msg = ofToString(id) + ": " + ofToString(round(ofGetFrameRate())) + "fps";
ofDrawBitmapString(msg, 10, 20);
}
}