View Full Version : Faster contextswitch

09-15-2002, 11:57 PM
As i understand it, it should be much faster to just switch the DC and not the RC ( and that will keep all states) for example when you have to render to multiple textures or similar. And i also heard that it is possible, if the RC:s for the different DC:s are compatible.. but do you still have to create the RC for each DC? and loose a lot of usable memory ?

09-16-2002, 02:11 AM
I've tried that out and on my GF3 there was no speed difference when using a shared RC or seperate RCs. Context switching was always pretty slow...


09-16-2002, 08:18 PM
You do not need to create a separate RC for each DC. You can create a pbuffer with a "compatible" pixel format, get a DC from it, and wglMakeCurrent( oldRC, pbufferDC ), and then later wglMakeCurrent( oldRC, windowDC ).

Note that some hardware doesn't support certain features that may make a pixel format "compatible," such as double-buffering. I believe the spec is vague in whether something that's double-buffered is compatible with something else that has the same pixel format, except it isn't -- the safe assumption is that it isn't :-(