title: Threading textures load process for android opengl game
body: <p>I have a large amount of textures in JPG format.
  And I need to preload them in opengl memory before the actual drawing starts.
  I've asked a question and I've been told that the way to do this is to separate JPEG unpacking from  glTexImage2D(...) calls to another thread.
  The problem is I'm not quite sure how to do this.</p>
  
  <p>OpenGL (handler?), needed to execute glTexImage2D is only available in GLSurfaceView.Renderer's onSurfaceCreated and OnDrawFrame methods.</p>
  
  <p>I can't unpack all my textures and then in onSurfaceCreated(...) load them in opnegl,
  because they probably won't fit in limited vm's memory (20-40MB?)</p>
  
  <p>That means I have to unpack and load them one-by one, but in that case I can't get an opengl pointer.</p>
  
  <p>Could someone, please, give me and example of threading of textures loading for opengl game?</p>
  
  <p>It must be some some typical procedure, and I can't get any info anywhere.</p>