1
General / Loading thread using a second OpenGL context
« on: January 07, 2014, 07:32:22 pm »
My plan was to create a loading thread inside of which I load resources such as 3D models, shaders, textures, etc. On the main thread I perform all the game logic and rendering. Then, on my loading thread, I create a sf::Context which is used only for loading.
This is working for loading shaders. However, xserver crashes when attempting to load models. I have narrowed the crash down to the glBufferData() call.
Is it possible call glBufferData() from a second thread using a second OpenGL context? If not, why is it possible to load shaders in the second context?
This is working for loading shaders. However, xserver crashes when attempting to load models. I have narrowed the crash down to the glBufferData() call.
Is it possible call glBufferData() from a second thread using a second OpenGL context? If not, why is it possible to load shaders in the second context?