Quantcast
Channel: beginners - openFrameworks
Viewing all articles
Browse latest Browse all 4929

How to draw mesh in Fbo?

$
0
0

@sewonist wrote:

I just want to mesh draw on fbo. because ofxVideoRecorder need pixels from fbo. I try to add fbo in 3d examples. The code like below that.

void ofApp::draw() {

recordFbo.begin();

float spinX = sin(ofGetElapsedTimef()*.35f);
float spinY = cos(ofGetElapsedTimef()*.075f);

if(bMousePressed) {
    spinX = spinY = 0.0f;
}

ofEnableDepthTest();

...

if(bInfoText) {
    stringstream ss;
    ss << "Framerate: " << ofToString(ofGetFrameRate(),0) << "\n";
    ss << "(f): Toggle Fullscreen"<<endl<<"(s): Draw Solid Shapes"<<endl<<"(w): Draw Wireframes"<<endl;
    ss <<"(1/2/3/4): Set Resolutions" <<endl<<"(n): Draw Normals"<<"\n(LEFT/RIGHT): Set Mode "<<ofToString(mode,0)<<endl;
    ss <<"(z): Split Faces " <<bSplitFaces<<endl;
    ss <<"(a): Draw Axes"<<endl<<"(l): Render lights"<<endl<<"(t): Info Text"<<endl;

    ofDrawBitmapString(ss.str().c_str(), 20, 20);
}

recordFbo.end();

recordFbo.draw(0,0);
}

This code represented like that

Please let me know how to draw mesh in fbo.

Thanks,

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 4929

Trending Articles