title: OpenGL - Draw two textures using the same FBO?
body: <p>How can I draw two textures using the same FBO?</p>
  
  <p>As seen bellow, I have a <code>initDesktop()</code> where I initialize my both textures (previously loaded using SOIL). 
  On my other class, I want to execute the <code>drawDesktop()</code> which will draw my background rectangle with a texture, and a footer rectangle...</p>
  
  <p>I only see the footer...
  What I am missing here?</p>
  
  <p><strong>EDITED</strong> </p>
  
  <pre><code>void Desktop::initDesktop ()
  {
      GLuint fboId = 0;
      glGenFramebuffers(1, &amp;fboId);
      glBindFramebuffer(GL_READ_FRAMEBUFFER, fboId);
  
      //now with GL_COLOR_ATTACHMENT0
      glFramebufferTexture2D(GL_READ_FRAMEBUFFER, GL_COLOR_ATTACHMENT0,GL_TEXTURE_2D, m_background.getId(), 0);
  
      //now with GL_COLOR_ATTACHMENT1
      glFramebufferTexture2D(GL_READ_FRAMEBUFFER, GL_COLOR_ATTACHMENT1,GL_TEXTURE_2D, m_footer.getId(), 0);
  }
  
  void Desktop::drawDesktop ()
  {
      drawBackground ();
      drawFooter ();
  }
  
  void Desktop::drawBackground ()
  {
      glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0);
      glReadBuffer(GL_COLOR_ATTACHMENT0); //&lt;-- ?
      glBlitFramebuffer(0, 0, 1200, 800, 0, 0, 1200, 800, GL_COLOR_BUFFER_BIT, GL_NEAREST);
  
  }
  
  void Desktop::drawFooter ()
  {
      glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0);
      glReadBuffer(GL_COLOR_ATTACHMENT1); //&lt;-- ?
      glBlitFramebuffer(0, 0, 1200, 100, 0, 0, 1200, 100, GL_COLOR_BUFFER_BIT, GL_NEAREST);
  }
  </code></pre>
  
  <p>Thanks!</p>