title: Bind new texture to existing FBO
body: <p>I am looking to bind a new texture to an existing FBO. But at the moment it decreases my speed significantly.</p>
  
  <pre><code>        int holdTextureId = glGenTextures();
  
          glBindTexture(GL_TEXTURE_2D, 0);
          glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, panoramaModelsFboId); 
  
          glBindTexture(GL_TEXTURE_2D, holdTextureId);                                
          glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);                   
          glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);           
          glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, SAVE_WIDTH, SAVE_HEIGHT, 0,GL_RGBA, GL_INT, (java.nio.ByteBuffer) null);
          glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT,GL_COLOR_ATTACHMENT0_EXT,GL_TEXTURE_2D, holdTextureId, 0);
  
          glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, panoramaModelsDepthRenderBufferId);              
          glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_DEPTH_COMPONENT, SAVE_WIDTH, SAVE_HEIGHT);
          glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT,GL_DEPTH_ATTACHMENT_EXT,GL_RENDERBUFFER_EXT, panoramaModelsDepthRenderBufferId);
  
    //Rendering starts here..
    // After which I unbind the FBO and use the texture
  </code></pre>
  
  <p>I have a feeling glTexImage2D is the perpetrator, so perhaps creating the textures before this process starts is an idea?
  Also, I probably don't need to create the renderbuffer each time, but you can save me some time and tell me if it is needed :) </p>