ofFbo issue, and a bunch of questions

Alright, please bear with me if some of these questions sound tedious but I’m having a hard time figuring :

  1. What is the purpose of the ofxShader ? Doesn’t ofShader do exactly the same thing ?

  2. The sole purpose of a Vbo is to automatically provide indices for a mesh (once it is associated to this mesh), correct ?

  3. Say I have a geometry shader that takes two vertices as input and emits four vertices. Is it possible to access these output vertices for further manipulation, or is it that once you send something to the shader it’s definitely going to be rendered and thus the data is inaccessible ? [EDIT] : found the answer http://forum.openframeworks.cc/index.php?topic=7840.0"">here. You have to make calculations with a texture as output (through an FBO) and somehow access/interpret this information.

My code works fine if I remove the Fbo.begin() and Fbo.end() statements.

  
ofFbo myFbo; //in testApp.h  

  
myFbo.allocate(512,384); //in setup  

  
void testApp::draw(){  
  
    myFbo.begin();  
  
    myCamera.begin();  
        for(list<myObj>::iterator i = myObjList.begin(); i != myObjList.end(); i++){  
            i->draw();  
        }  
  
    myCamera.end();  
  
    myFbo.end();  
  
    myFbo.draw(200,200,512,384);  
  
  
}  

And I only get background color, no fbo is drawn. Allocating the fbo for 1024*768 produces the same result. I have tried ofDisableArbTex() from another thread but still doesn’t work.

  1. Could someone explain what is happening ?

  2. Are there any requirements for the Fbo capture (ie it will automatically capture what would be on the screen no matter what, like a screenshot), or does the Fbo only capture certain things ?

This is super old but in response to:

  1. What is the purpose of the ofxShader ? Doesn’t ofShader do exactly the same thing ?

That’s just an older version of ofShader.

) The sole purpose of a Vbo is to automatically provide indices for a mesh (once it is associated to this mesh), correct?

An FBO is for storing and rendering texture data. More info is here: http://www.songho.ca/opengl/gl-fbo.html