Sign in to follow this  
Estor

wglCopyContext with pbuffer ??

Recommended Posts

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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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().

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this