wglShareLists always failing

I want to be able to create a bitmap by redirecting OpenGL to render to bitmap instead of the window. I’ve created another resource context that is pointed at the bitmap. It is working to a certain extent, but display lists are not being drawn to the bitmap.

I’ve created these display lists in the context of the screen resource context, and I would like to be able to reuse these display lists in the bitmap resource context. I am using WGL to set up the resource contexts, and I noticed that there is a wglShareLists() method that seems like it should be the solution to my problem. However, every time I call it, it returns FALSE and the display lists are still not shared.

If anyone has any idea what I could be doing wrong, I’d appreciate any advise. Is there some special state that needs to be set before calling this method? Is there any way to get extended error information for this method? Any help would be appreciated.

Thanks in advance!

Sincerely,
Jonathan DeCarlo

Originally posted by jdecarlo:
I want to be able to create a bitmap by redirecting OpenGL to render to bitmap instead of the window. I’ve created another resource context that is pointed at the bitmap.
[…]
I noticed that there is a wglShareLists() method that seems like it should be the solution to my problem. However, every time I call it, it returns FALSE and the display lists are still not shared.

All rendering contexts of a shared display list must use an identical pixel format. Otherwise the results depend on the implementation of OpenGL used.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/opengl/ntopnglr_6flf.asp

Originally posted by evanGLizr:
[b] [quote]Originally posted by jdecarlo:
I want to be able to create a bitmap by redirecting OpenGL to render to bitmap instead of the window. I’ve created another resource context that is pointed at the bitmap.
[…]
I noticed that there is a wglShareLists() method that seems like it should be the solution to my problem. However, every time I call it, it returns FALSE and the display lists are still not shared.

All rendering contexts of a shared display list must use an identical pixel format. Otherwise the results depend on the implementation of OpenGL used.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/opengl/ntopn glr_6flf.asp [/b][/QUOTE]Thanks for the reply! So does that mean that it is impossible to share display lists between two render contexts if one has PFD_DRAW_TO_BITMAP and the other has PFD_DRAW_TO_WINDOW? If so, then could anyone recommend the best way to go about making a bitmap from what it currently being rendered to the window?

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.