[Windows] Some Intel drivers do not support context sharing with Win32ARBContext

Create issue
Issue #23 new
Rob van der Most created an issue

When running Pyglet on some Intel cards, it fails with "pyglet.gl.ContextException: Unable to share contexts".

Some reports have shown that changing to Win32Context instead of Win32ARBContext seems to fix the problem.

Comments (11)

  1. Rob van der Most reporter

    Pushed a workaround to disable ARB contexts on Intel devices to pyglet-1.2-maintenance.

  2. Michael Grazebrook

    This remains a problem for me. I'm using Python 3.4, Windows 7, a 64 bit Toshiba lap-top running an Indel(R) Core(TM) i3 CPU.

    Running: python -m pyglet.info > info.txt gives the same error or I'd give you better data ... setting the windows debug option debug_win32 created an empty log file.

  3. Rob van der Most reporter

    Until now it has been unclear how to detect a graphics card does not support ARB context sharing. There does not seem to be a specific flag to indicate this. We only notice it when we try to share the contexts and an error occurs.

    Due to the way the context is created and attached, it is not that easy to fall back to non ARB when we detect this issue. The context is created first in window creation from the config. Only later the attach is issued and the issue is found. It is then not possible to swap without an elaborate rollback and retry.

    Maybe we can write some code that tries whether context sharing works when the context is initially created? That code would have to fit in Win32CanvasConfigARB.create_context (gl/win32.py).

  4. Rob van der Most reporter
    • changed version to 2.x

    I think we have to include this in the transition to OpenGL 3 and up. There we already need to do some detection before creating e.g. the shadow window as well. Maybe we can include a context sharing test?

  5. mirh

    I’m under the impression there’s no way to check if shared contexts will work in the first place, because the extension itself presumes they do.

    Though, put aside bugged ancient drivers (which would seem even odder here, considering we are also talking of fairly new hardware), couldn’t it just be you are creating the contexts wrong? LWJGL doesn’t seem to have problems for example, once they take it slow with threading.

  6. Benjamin Moran

    It’s probably not threading related like the LWJGL issue, but we could certainly be doing something else wrong. If anyone has a machine that exhibits this issue, it would be helpful to troubleshoot. I can’t replicate myself, unfortunately.

  7. mirh

    I have (it would also be cool if somebody knew whether intel fixed this in the last hardware/drivers, if even)

  8. mirh

    Well, it turned out that on both G41 and HD2000 (on windows 7) I couldn't manage to trigger it, with drivers and

    Which I guess like it is the workaround properly engaging, but then the third post makes no sense to me (at least the GMA950 I first met the problem had the excuse to be old and on XP). And I haven’t new enough intel hardware to test the latest changes.

  9. Log in to comment