knackered
03-13-2002, 09:20 AM
Well, I tried appending this question to another topic, but that topic doesn't seem to have been visited by anyone. So, I'll have to start a new one, as I need an answer before I make fundamental changes to my engine:-
I need to create/destroy/create multiple windows, with multiple renderering contexts (win32).
Question:-
I'm thinking of having an invisible dummy window (say with a client area of 1x1) with a gl context, which holds all display lists and textures, while all other visible windows 'share' the dummy windows display lists and textures using wglShareLists().
Would this impact performance more than having all other windows share the first visible windows resources?
The reason I want to do it this way is that I want to be able to create and destroy *all* windows randomly at runtime, but keeping track of the context that 'owns' the resources would be a pain. That's why I'm thinking an invisible window would be a neat solution.
Would this have any negative effects? Considering the dummy window/context will never be made current (except when creating textures/display lists) or be rendered to...
Also, in the MSDN spec for wglShareLists() it says that NO display lists should exist in the window that is sharing its resources at the time of the wglShareLists() call - does this still hold true?
And does this also apply to textures? (ie. no textures can exist in the sharing context before it shares its resources with another context).
I need to create/destroy/create multiple windows, with multiple renderering contexts (win32).
Question:-
I'm thinking of having an invisible dummy window (say with a client area of 1x1) with a gl context, which holds all display lists and textures, while all other visible windows 'share' the dummy windows display lists and textures using wglShareLists().
Would this impact performance more than having all other windows share the first visible windows resources?
The reason I want to do it this way is that I want to be able to create and destroy *all* windows randomly at runtime, but keeping track of the context that 'owns' the resources would be a pain. That's why I'm thinking an invisible window would be a neat solution.
Would this have any negative effects? Considering the dummy window/context will never be made current (except when creating textures/display lists) or be rendered to...
Also, in the MSDN spec for wglShareLists() it says that NO display lists should exist in the window that is sharing its resources at the time of the wglShareLists() call - does this still hold true?
And does this also apply to textures? (ie. no textures can exist in the sharing context before it shares its resources with another context).