   framebuffer object giving blank screen
  Hi! I am trying to make a particle system with a blur effect, what I want to do is to make a texture of the scene (lots of quads with textures on them) and send it to a shader. When I tried implementing a guide for fbo I get an empty screen... posting code (its a lot sorry..), gratefull for any help, cant find where it goes wrong......//( initializing particles and stuff )//render functionvoid renderScene(void) {   k++;glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);glLoadIdentity();gluLookAt(0.0,0.0,50.0,  0.0,0.0,-1.0,  0.0f,1.0f,0.0f);glLightfv(GL_LIGHT0, GL_POSITION, lpos);loadTextures(); //this is the textures for the particles //enable texturesglEnable( GL_TEXTURE_2D );//initialize the particles//use the texture that is loadedglBindTexture(GL_TEXTURE_2D, particle::particleTextures.textureID);//initialize startup-valuesinitAtStartup();//fbo-stufffloat width = 320;float height = 320;// First we bind the FBO so we can render to itglBindFramebufferEXT(GL_FRAMEBUFFER_EXT, fbo);// Save the view port and set it to the size of the textureglPushAttrib(GL_VIEWPORT_BIT);glViewport(0,0,width,height);//draw all particlesfor(int j = 0; j < maxParticles; j++){if(particleList[j].alive==true){//set colorglColor4f(particleList[j].color[0], particleList[j].color[1], particleList[j].color[2], 1.0f);//float(particleMaxAge-particleList[j].age)/float(particleMaxAge));float x = particleList[j].position[0];float y = particleList[j].position[1];float z = particleList[j].position[2];glBegin( GL_TRIANGLE_STRIP );  glTexCoord2d(10.0*particleList[j].size,10.0*particleList[j].size);   glVertex3f(x+1.0f, y+1.0f, z+1.0f);  glTexCoord2d(0.0,10.0*particleList[j].size);   glVertex3f(x-1.0f, y+1.0f, z+1.0f);  glTexCoord2d(10.0*particleList[j].size,0.0);   glVertex3f(x+1.0f, y-1.0f, z+1.0f);  glTexCoord2d(0.0,0.0); glVertex3f(x-1.0f, y-1.0f, z+1.0f);glEnd();}else{initializeParticle(j);}}updateParticles();// Restore old view port and set rendering back to default frame bufferglPopAttrib();glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);glDisable( GL_TEXTURE_2D );//glDeleteTextures( 1, &texture );glutSwapBuffers();}//shadersvoid setShaders(){.....//loading files...   p = glCreateProgram();//get texture of sceneglGenTextures(1, &img;glBindTexture(GL_TEXTURE_2D, img);glEnable(GL_TEXTURE_2D);glCopyTexImage2D(GL_TEXTURE_2D, 0, GL_LUMINANCE, 0, 0, 128, 128, 0);glActiveTextureARB(GL_TEXTURE1);GLint lLocation = glGetUniformLocationARB(p, "myScene");glUniform1iARB(lLocation, GL_TEXTURE1);    glAttachShader(p,f);.....//linking program and use program  glDisable(GL_TEXTURE_2D);}///main functionint main(int argc, char **argv) {glutInit(&argc, argv);glutInitDisplayMode(GLUT_DEPTH | GLUT_DOUBLE | GLUT_RGBA);glutInitWindowPosition(100,100);glutInitWindowSize(320,320);glutCreateWindow("Particle system");//viewport, fboglewInit();setupFBO(); //creating a texture 'img' attached to framebuffer obj 'fbo'   //renderglutDisplayFunc(renderScene);glutIdleFunc(renderScene);glutReshapeFunc(changeSize);glEnable(GL_DEPTH_TEST);glClearColor(0.9, 0.9, 0.9, 0.9);glEnable(GL_BLEND);glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);glEnable(GL_ALPHA_TEST);glAlphaFunc(GL_GREATER, 0);   setShaders();   cleanupCrew(); //delete textures etcglutMainLoop();}   
  I would bet the setupFBO function is the interesting part of this code [smile]. Do you check the FBO for completeness after setting it up? Do you check all of your gl calls for glError? Once you answer those questions we can start reading all of the you already posted.   ;  thanks for fast answer :) I dont get any errors while compiling, the program runs, just the scene is empty. There might be something missing, kinda opengl-noob so probably missing out something basic,I think setupFBO is working as it should. void setupFBO(){glGenFramebuffersEXT(1, &fbo);glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, fbo);//depthbufferglGenRenderbuffersEXT(1, &depthbuffer);glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, depthbuffer);glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_DEPTH_COMPONENT, width, height);//attach depth buffer to fboglFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT, GL_RENDERBUFFER_EXT, depthbuffer);//create a texture to render to   glGenTextures(1, &img;glBindTexture(GL_TEXTURE_2D, img);glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8,  buffer_width, buffer_height, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL);glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_2D, img, 0);//test to see if all is well (if status == GL_FRAMEBUFFER_COMPLETE_EXT)GLenum status = glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT);glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);// Unbind for a while}   ;  Paste the code for your FBO init function.  FBO's are a pain to get up and running as there are little details you have to pay attention to.Edit: Scrap that :PAre buffer_width/buffer_height and width/height the same value?  Your depth buffer attachment must be the same size as your colorbuffer   ;  You have this problem -> http://www.opengl.org/wiki/Common_Mistakes#Creating_a_Texture   ;  Also, you are not setting the appropriate texture filtering on your color buffer texture.  After your glTexImage2D call do something like:glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR );glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR );(You may also want to turn on texture clamping, but I guess that depends on what you are using the buffer for)Edit: beaten to it!   ;  buffer_width/height are same as width/height, ;  tried setting the texture filtering, still empty screen though;  What graphics card are you running?What does glCheckFramebufferStatusEXT return?Also, try attaching your depth buffer after the color buffer and see if that changes anything   ;  glCheckFramebufferStatusEXT gives 36054 back, hm I didnt see any change when attaching depth buffer efter the color buffer. using a GeForce 6600gt.edit: just noticed GL_FRAMEBUFFER_COMPLETE_EXT gives 36053, is that alright?   