My PolyLines appear jagged or with gaps in the lines. At different points, I’ve tried several smoothing techniques that I found mentioned on the forum but without improvement. However, I suspect I am missing something basic in the way that I am using Fbos. I’m posting some code below in case this error might be obvious to see. Thanks.
//--------------------------------------------------------------
void ofApp::setup(){
fbo1.allocate(ofGetWidth(), ofGetHeight(), GL_RGBA, 4);
fbo1.begin();
ofClear(255, 255, 255, 255);
fbo1.end();
fbo2.allocate(ofGetWidth(), ofGetHeight(), GL_RGBA, 4);
fbo2.begin();
ofClear(255, 255, 255, 255);
fbo2.end();
fbo3.allocate(ofGetWidth(), ofGetHeight(), GL_RGBA, 4);
fbo3.begin();
ofClear(255, 255, 255, 255);
fbo3.end();
//Load an array with the three Fbos after they are set up
fboArray[0] = fbo1;
fboArray[1] = fbo2;
fboArray[2] = fbo3;
//set up hold for the view
hold = ofVec3f(0, 0, 100);
incrementPos = 0;
thisCue = 0;
}
//--------------------------------------------------------------
void ofApp::update(){
if (drawIt) {
myThreeDPoint.update();
myThreeDPoint2.update();
myThreeDPoint3.update();
}
}
//--------------------------------------------------------------
void ofApp::draw(){
//this doesnt seem to do anything
glDepthFunc(GL_ALWAYS);
for(int i = 0; i<=2; i++) //initialize the 3 Fbos
{
fboArray[i].begin();
ofClear(0, 0, 0, 0);
fboArray[i].end();
}
background.draw(); //draw the background in first
if (tiltIt){
fbo1.begin();
cam.begin();
ofScale(1,-1,1);
ofTranslate(-ofGetWidth()/2, -ofGetHeight()/2);
cam.orbit(0, 0-updatePos, 0 + moveBack, ofVec3f(0, 0, 0));
myThreeDPoint.draw();
cam.end();
fbo1.end();
fbo2.begin();
cam.begin();
ofScale(1,-1,1);
ofTranslate(-ofGetWidth()/2, -ofGetHeight()/2);
cam.orbit(0, 0-updatePos, 0 + moveBack, ofVec3f(0, 0, 0));
myThreeDPoint2.draw();
cam.end();
fbo2.end();
fbo3.begin();
cam.begin();
ofScale(1,-1,1);
ofTranslate(-ofGetWidth()/2, -ofGetHeight()/2);
cam.setPosition(hold.x, hold.y + incrementPos, hold.z);
incrementPos += 0.75; //change camera positions slightly
cam.lookAt(ofVec3f(0, 0, 0));
myThreeDPoint3.draw();
cam.end();
fbo3.end();
}
ofSetColor(255, 255, 255);
//shape on the left
fbo1.draw(ofGetWidth()/3.0, 0 + ofGetHeight()/5.0, ofGetWidth()/3.0, ofGetHeight()/1.5 );
//shape in the middle
fbo3.draw(0, 0 + ofGetHeight()/5.0, ofGetWidth()/3.0, ofGetHeight()/1.5 );
//shape on the far right
fbo2.draw((ofGetWidth()/3.0)*2.0, 0 + ofGetHeight()/5.0, ofGetWidth()/3.0, ofGetHeight()/1.5 );
}