View Full Version : wglShareLists and multiple Rendering Contexts with different resolutions

07-01-2003, 05:35 AM
I currently have 2 OpenGL rendering contexts. The first is a double buffered 800x600 rendering buffer, and the second is a 1024x1024 Device Independent Bitmap (created using CreateDIBSection), that I am using to render a large texture to. I want to share the texture with the first context after I have rendered over it and read it back using glCopyTexSubImage2D(), but wglShareLists returns 0 after the contexts have been initially created.

Is this possible to do ? This is running using Microsofts OpenGL implementation at the moment - unaccelerated.

How identical do my Pixel Formats have to be for wglShareLists to work OK ? Evidently the double buffered context is to a window, and the DIB is to a Bitmap, so they have to be different.....

Can anyone shed any light on how to do this ?

07-01-2003, 12:18 PM
I don't really know enough about the MS software implementation to help you with the problem there.

I believe most HW accelleration will share lists between any true-color contexts. ATI HW definitely does, and I believe NVIDIA does also. Of course you can't use HW to render to a DIB. You would need to allocate a PBuffer instead.


07-03-2003, 01:10 AM
OK, thanks. I did it using PBuffers and that works fine.