title: OpenGL texture upload using PBOs?
body: <p>I'm developing an OpenGL application using OpenGL2.1 and want to upload textures via threads.</p>
  
  <p>What I have done so far:</p>
  
  <ol>
  <li>Create a second context and share between the two</li>
  <li>Upload texture data in a thread </li>
  </ol>
  
  <p>Everything is working fine, except that I notice a small "lag" when the texture upload happens!  I know this is because the driver have to synchronize the two contexts.  The problem is that I want it to stream the texture. I don't want to update the texture later.  I just want to load textures in the background while displaying an "almost smooth" loading animation without stalling the whole application. </p>
  
  <p>That's the point I searched and found that PBOs can be used for DMA data transfer of pixel data.  Is it possible to use a PBO for texture upload?  If so, how?</p>