PDA

View Full Version : multiple rendering contexts?



08-15-2002, 01:59 AM
Hi

I have the following problem. I have severale rendering contexts but would like to share resources between them. I can share display lists easiely thru wglShareLists, but what about texture objects? Is there any way to share them?
Maybe I dont need to do all this because there is a way to do it without multiple contexts, so here is my general problem. I need to support multiple windows. They might have different pixelformats so I can't just use one context and then change the destination DC with wglMakeCurrent.
Any ideas? Thank you in advance.

Relic
08-15-2002, 05:13 AM
wglShareLists also shares texture objects, but to the second half of your problem:

MSDN doc on wglShareLists:

"You can only share display lists with rendering contexts within the same process. However, not all rendering contexts in a process can share display lists. Rendering contexts can share display lists only if they use the same implementation of OpenGL functions. All client rendering contexts of a given pixel format can always share display lists.

All rendering contexts of a shared display list must use an identical pixel format. Otherwise the results depend on the implementation of OpenGL used."

No way you can do that reliably among different processes and pixelformats.