I have a strange problem. I have an application (3d viewer) which uses OpenGl in 2 threads but has only 1 opengl context. It switches the context between the threads via wglMakeCurrent(HDC, HGLRC) and wglMakeCurrent(nullptr, nullptr). In general this works. But with one special dataset in a special situation wglMakeCurrent(HDC, HGLRC) returns TRUE but after that every OpenGL call is ignored (even the ones directly after wglMakeCurrent).
- GetLastError() returns 0 before and after the call.
- OpenGLDebug context does not give a hint (which is expected since the context seems to be out of order).
- GetCurrentContext returns expected values.
- glGetError returns 0
For debug purposes I do
int i = 0; glGetIntegerv(GL_MAX_DRAW_BUFFERS, &i); ASSERT(i != 0);
after the context is out of order this assert fails.
I also logged the context switches and they seem to be correct, the context is bound to zero or one thread (which will do the next calls to OpenGL) at a time.
I have no clue what I could try next, what could be the reason for this behavior.
I use a Quadro K2000 with a 354.13 driver.
Every hint is appreciated.