I’m trying to use another thread for creating (and loading) OpenGL objects
The problem is that I have a successful D3D implementation, as it supports threaded object creation.
As for OpenGL , I have followed the guideline described here, and also using GLFW3 for managing contexts:
[ul]
[li]At Init, I Create the main context and set it after other contexts and threads are created[/li][li]At Init I create a context (new 1x1 hidden window in GLFW) for loader thread, in the main thread, Also I pass the main thread’s context to loader thread as shared[/li][li]At the start of loader thread execution, set it to current[/li][li]Create my objects in the loader thread[/li][li]After loading done, pass the object IDs and render them in main thread[/li][/ul]
But I’m currently having couple of problems, that I need to ask …
[ul]
[li]Besides Buffers and texture objects, I’m creating VAOs, I’ve read somewhere that VAO’s can’t be shared, as a result I don’t get valid geometry, is this true?[/li][li]Performance is terrible, when I create another context shared with the main one, I get terrible frame-rates, for example from 3-4ms per-frame to 20ms per-frame (using latest AMD gpu drivers), any tips? or is there anything wrong with this method of loading ?[/li][/ul]