title: How can I resize existing texture attachments at my framebuffer?
body: <p>When I resize my window, I need to resize my textures that are attached to my framebuffer. I tried calling glTexStorage2D again, with different size parameters. However that does not work.</p>
  
  <p>How can I resize the textures attached to my framebuffer? (Including the depth attachment)</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>Code I tried:</p>
  
  <pre><code>glBindTexture(m_target, m_name);
  glTexStorage2D(m_target, 1, m_format, m_width, m_height);
  glBindTexture(m_target, 0);
  </code></pre>
  
  <p>where m_name, m_target and m_format are saved from the original texture and m_width and m_height are the new dimensions.</p>
  
  <p><strong>EDIT2</strong></p>
  
  <p>Please tell me why this has been downvoted so I can fix the question.</p>
  
  <p><strong>EDIT3</strong></p>
  
  <p><a href="http://blog.chaucery.com/2013/05/opengl-render-to-texture-resizing.html">Here</a>, someone else had the same problem.</p>
  
  <blockquote>
    <p>I found that the texture was being rendered correctly to the FBO, but that it was being displayed at the wrong size. It was as if the first time the texture was sent to the default framebuffer the texture size was set permanently, and then when a resized texture was sent it was being treated as if it was the original size. For example, if the first texture was 100x100 and the second texture was 50x50 then the entire texture would be displayed in the bottom left quarter of the screen. Conversely, if the original texture was 50x50 and the new texture 100x100 then the result would be the bottom left quarter of the texture being displayed over the whole screen.</p>
  </blockquote>
  
  <p>However, he uses a shader to fix this. That's not how I want to do this. There has to be another solution, right?</p>