wglCopyContext with pbuffer ??

Started by
4 comments, last by LtJax 18 years, 5 months ago
Hi Short: after wglCopyContext on pbuffer which is target for texture, it returns FALSE and GetLastError() = ERROR_INVALID_HANDLE or driver crashes with "Access Violation" if the current context is a source context [dead] It's very importand for me that pbuffer and rendering context ( source one ) both have this same settings. I even tried glPush/PopAttrib() but it's not cross context. i don't want to do it "by hand" using glGet() [sick] thanks for any halp
"The Gods Made Heavy Metal And They Saw That It Was Good They Said To Play It Louder Than Hell We Promised That We WouldWhen Losers Say Its Over With You Know That It's A Lie The Gods Made Heavy Metal And It's Never Gonna Die"THE GODS MADE HEAVY METAL/by ManOwaR
Advertisement
Make sure the source context is not current before copying.

All in all, wglCopyContext is considered evil. Many drivers have trouble implementing it correctly, and using it will most likely introduce a lot of instabilities on some hardware. Then, it's far from being an efficient function. In short, avoid using it.
Quote:Original post by Yann L
Make sure the source context is not current before copying.


Yes... i tried that at the beginning, i even tried something stupid like

wglMakeCurrent( null, null );

of curse... without luck [depressed]

Ok, then i see the best i can do is to write own copyContext

Thanks Yann L
"The Gods Made Heavy Metal And They Saw That It Was Good They Said To Play It Louder Than Hell We Promised That We WouldWhen Losers Say Its Over With You Know That It's A Lie The Gods Made Heavy Metal And It's Never Gonna Die"THE GODS MADE HEAVY METAL/by ManOwaR
you don't want to use the same context on the pbuffer and the window?
Quote:Original post by LtJax
you don't want to use the same context on the pbuffer and the window?


I want them to have this same settings like lighting, texture modes etc. every thing that you can Push/Pop using glPush/PopAttrib().

"The Gods Made Heavy Metal And They Saw That It Was Good They Said To Play It Louder Than Hell We Promised That We WouldWhen Losers Say Its Over With You Know That It's A Lie The Gods Made Heavy Metal And It's Never Gonna Die"THE GODS MADE HEAVY METAL/by ManOwaR
so why not use the same context for both then?

This topic is closed to new replies.

Advertisement