Please help me settle a bet.
Imagine I have context1 and context2. Are the display lists created in context1 BEFORE I call wglShareLists visible (usable) in context2 AFTERwards?
The available docs are vague, the FAQs don’t apply, and my meager tests seem to suggest that only display lists create AFTER wglShareLists is called are then visible to context2.
Thanks for the help!
from official wgl documentation
BOOL wglShareLists(HGLRC hglrc1, HGLRC hdlrc2);
hglrc1 - Specifies the OpenGL rendering context with which to share display lists.
hglrc2 - Specifies the OpenGL rendering context to share display lists with hglrc1. The hglrc2 parameter should not contain any existing display lists when wglShareLists is called.
unofficially, both hglrc2 and hglrc1 lose their entire display-list space. The hglrc1 space is copied to a new (reference-counted) shared-display-list space, and both hglrc1 and hglrc2 receive the new shared space.
If hglrc1 was already a shared space, then the hgrlc2 points to it, and adds a reference.
If hglrc2 was already a shared space, then a reference is decremented to that space and teh above processing applies.