title: No OpenGL context found in the current thread
body: <p>I am using LibGDX to make a game. I want to simultaneously load/unload assets on the fly as needed. However, waiting for assets to load in the main thread causes lag. In order to remedy this, I've created a <strong>background thread</strong> that monitors which assets need to be loaded (textures, sounds, etc.) and loads/unloads them appropriately.</p>
  
  <p>Unfortunately, I get the following error when calling <code>AssetManager.update()</code> from that thread.</p>
  
  <pre><code>com.badlogic.gdx.utils.GdxRuntimeException: java.lang.RuntimeException: No OpenGL context found in the current thread.
  </code></pre>
  
  <p>I've tried <code>run</code>ing the background thread in the main thread in the beginning and just dealing with the first few screens, and everything works fine. I can also change the algorithm to just load everything into memory from the start in the same thread, and that works as well. However, neither works in the background thread.</p>
  
  <p>When I run this on Android with OpenGL ES 2.0 (which is flexible in odd ways) instead of on Windows, everything runs fine, and I can even get the pixel dimensions of the images - <strong>but the textures render black</strong>.</p>
  
  <p>My searches have told me that this is an issue of the <strong>OpenGL context</strong> being bound to a single thread, but not much else. This explains why everything works when I shove it in the main thread, and not when I put it in a different one. How do I fix this context problem?</p>