Copying rendering context

Maybe it’s a dummy question…i have two DC and two rendering context, when i create the second one is it possible to copy all opengl state of the first one?
For example:
in the first RC i have specified light,material,projection data,ecc…when i create the second one i have to rewrite all if i want another RC with same settings.

Thank you

You could try wglCopyContext but that only copies the Pushable attributes. (An I don’t know how well supported it currently is)

In RC one, you could store the state changes into a display list, using wglShareLists(rc1,rc2) you can make them usable in RC two