Ok I have a program with a number of threads (loaded from DLLs at run-time). Each thread has a separate OpenGL rendering context. What I want to do is, from the main thread, be able to draw the frame buffers of each opengl contexts and draw them where I choose in the main window (if that makes any sense). I have it set up multi-threaded because, when single threaded the "run-time processes"(just glorified functions), made the hole program hang while loading resources (run-time processes, can be created and terminated any time). Basicly I want to be able to "trick" opengl into drawing into a random buffer, take that buffer and in the main thread turn it into a opengl texture and draw it where it needs to be (the position is also determined during runtime and it subject to change). My question is this, is there any way to get a rendering context to draw to some allocated memory without drawing it in a window? Also is there any way to get the frame buffer from that context. If so i would just call "glTexImage2D" and in the "bytes" argument have the pointer to the memory. Don't worry about the thread syncing, i've gotten rather good at it...
See Question&Answers more detail:os