c++opengl3dparallel-processingdisplaylist

Parallel processing for display list


Is that possible to do parallel processing for display list on OpenGL? I am trying to find a way to accelerate my program. The part of loading the model to the GPU by using display list is taking too long (the model is very massive). Is that possible to use parallel processing for display list? Will is cause any run time error?


Solution

  • Display lists are shareable between contexts, so you can create a second thread with a second GL context sharing the objects with your main/drawing context, and compile the list in that separate thread. But you manually have to synchronize both threads and the GL server, so you must actually make sure that the display list compilation is finished before you can tell the main thread to use it.