[FIXED] Problem with WGL_ARB_create_context

Started by ArtMax, December 18, 2012, 11:04:39

Previous topic - Next topic

ArtMax

So far I've tried to use SharedDrawable and Pbuffer to load resources in background. Whenever I try to create either one an exception is always thrown: org.lwjgl.LWJGLException: Could not create context (WGL_ARB_create_context). But then comes the weird part: it only fails to do so on GeForce videocards. I tried to do so on 5 different PCs with different GeForce video cards and all of them failed. When I tried to do so on 2 PCs with Radeon VCs everything worked properly. It should be noted that WGL_ARB_create_context is supported by all of the video cards in question. The PCs have latest drivers. (in fact, the drivers were released today)
Any idea what might be wrong?

spasi

Hey Max,

I saw your messages on #lwjgl earlier and have already fixed this. Try the next nightly build.

The main problem was that the worker context has to be created/shared on the main thread and then made current in the worker thread. Creating the context in the worker thread was working fine on AMD, but failed on NV and Intel. I've also improved context synchronization; on NV's multithreaded driver you need to explicitly sync the two contexts, otherwise the GL commands get mixed up and everything behaves weirdly. The demo will now use fences (OpenGL 3.2+) for synchronization and fall-back to glFlush if they're not available.

ArtMax

And it works, thanks for a fast response. I referred to BackgroundLoadTest when I tried to do the trick, hence the confusion.