title: OpenGL glGenTextures multithreading not working (with SDL)
body: <p>I have <code>id</code> like a variable of a opengl texture identificator. I generate it with <code>glGenTextures (1, &amp;id)</code> and it works fine. The problem is when i call <code>glGenTextures</code> function in a different thread. It always return 0 and not generate texture. I think it is because the opengl context is different.</p>
  
  <p>I use SDL for load the image and then pass it to the texture with <code>glTexImage2D</code>. I'm trying to create a new <code>SDL_GLContext</code> in the thread to share it with the main thread, but i don't how to make it. I can modify <code>id</code> inside the thread with <code>id=2</code> for example, and read and print it, but i can't modify with <code>glGenTextures</code> and i can't generate the texture that i need.</p>