Faster contextswitch

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 ?

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…

LaBasX2

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 :frowning: