title: opengl - blending with previous contents of framebuffer
body: <p>I am rendering to a texture through a framebuffer object, and when I draw transparent primitives, the primitives are blended properly with other primitives drawn in that single draw step, but they are not blended properly with the previous contents of the framebuffer.</p>
  
  <p>Is there a way to properly blend the contents of the texture with the new data coming in?</p>
  
  <p>EDIT:  More information requsted, I will attempt to explain more clearly;</p>
  
  <p>The blendmode I am using is GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA.  (I believe that is typically the standard blendmode)</p>
  
  <p>I am creating an application that tracks mouse movement.  It draws lines connecting the previous mouse position to the current mouse position, and as I do not want to draw the lines over again each frame, I figured I would draw to a texture, never clear the texture and then just draw a rectangle with that texture on it to display it.</p>
  
  <p>This all works fine, except that when I draw shapes with alpha less than 1 onto the texture, it does not blend properly with the texture's previous contents.  Let's say I have some black lines with alpha = .6 drawn onto the texture.  A couple draw cycles later, I then draw a black circle with alpha = .4 over those lines.  The lines "underneath" the circle are completely overwritten.  Although the circle is not flat black (It blends properly with the white background) there are no "darker lines" underneath the circle as you would expect.</p>
  
  <p>If I draw the lines and the circle in the same frame however, they blend properly.  My guess is that the texture just does not blend with it's previous contents.  It's like it's only blending with the glclearcolor.  (Which, in this case is &lt;1.0f, 1.0f, 1.0f, 1.0f>)</p>