I design this for several reasons:
- Only the primary thread owns the OpenGL context, so I choose to create buffers, map buffers and unmap buffers in the primary thread.
- I have many pictures to load and I don't want them to block the primary thread, so I use the subthread to load images and copy the memory.
Here are my questions:
- Is my model correct?
- Is my model the best practice?
- Should I create a PBO for each picture or create two PBO for all pictures and use them in turn?
- Should I use a shared context?
Thank you for helping me out