title: Render to Tex only partially writing
body: <p><em>I apologise for the limited code in this question, but It's tied into a <a href="https://github.com/Robadob/sdl_exp/tree/nav_gen" rel="nofollow noreferrer">personal project</a> with much OpenGL functionality abstracted behind classes. Hoping someone visually recognises the problem and can offer direction.</em></p>
  
  <p>During the first execution of my animation loop, I'm creating a <code>GL_R32F</code> (format: <code>GL_RED</code>, type: <code>GL_FLOAT</code>) texture, rendering an orthographic projection of a utah teapot to it (for the purposes of debugging this I'm writing the same float to every fragment).</p>
  
  <p>The texture however renders incorrectly, as it should be a solid silhouette.</p>
  
  <p><a href="https://i.stack.imgur.com/LS4eh.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/LS4eh.png" alt="enter image description here"></a></p>
  
  <p>Re-running the the program causes the patches to move around.</p>
  
  <p><a href="https://i.stack.imgur.com/RIurO.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RIurO.png" alt="enter image description here"></a></p>
  
  <p>I've spent a good few hours tweaking things trying to work out the cause, I've compared the code to my working shadow mapping example which similarly writes to a  <code>GL_R32F</code> texture, yet I can't find a cause.</p>
  
  <p>I've narrowed it down, to find that it's only the first renderpass to the texture which this occurs. This wouldn't be so much of an issue except I don't require more than a single render (and looping the bindFB, setViewport, render, unbindFB doesn't fix it).</p>
  
  <p>I've </p>
  
  <p>If anyone has an suggestions for specific code extracts to provide, I'll try and edit the question.</p>