views:

52

answers:

1

Hi everyone , i'm looking for some tutorials about Threads in GLFW

A: 

OpenGL calls must be made from the same thread that created the context. Rendering from multiple threads is not possible.

Also see the answers here: http://stackoverflow.com/questions/742090/how-to-draw-opengl-graphics-from-different-threads

Edit: Here's a list of some C++ threading solutions you could look into. There are other solutions, with various effects on portability and dependencies. Personally, I use Qt's threads.

amro
fatehmtd
I forgot to mention that a threading solution wouldn't be specific to GLFW. You should look into generic threading tutorials. There are several solutions for C++, I'll edit some links into my answer.
amro
fatehmtd
Is your application C or C++? GLFW's threading API is designed with C in mind. I wouldn't recommend directly using it without a wrapper.That said, GLFW's threading is just pthreads in disguise. You can adapt any pthreads tutorial to GLFW, just keep GLFW's reference manual handy and switch pthread calls with GLFW calls.
amro