Reputation: 1336
I'm using wglCreateContextAttribsARB() function to create an OGL context with the following parameters:
const int contextAttrib[] = {
WGL_CONTEXT_MAJOR_VERSION_ARB, 4,
WGL_CONTEXT_MINOR_VERSION_ARB, 2,
WGL_CONTEXT_PROFILE_MASK_ARB, WGL_CONTEXT_CORE_PROFILE_BIT_ARB,
#ifdef _DEBUG
WGL_CONTEXT_FLAGS_ARB, WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB | WGL_CONTEXT_DEBUG_BIT_ARB,
#else
WGL_CONTEXT_FLAGS_ARB, WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB,
#endif
0
};
mContext = wglCreateContextAttribsARB_local(mhDC, shareLists, contextAttrib);
Unfortunately, I get an error - 0xc00710dd or 3221688541 (returned by GetLastError()), when I try to create a second context which shares data with some context created successfully earlier (the shareLists argument). Googling it gave only a single result: http://software.intel.com/en-us/forums/topic/303629 I'm using GeForce 680 GTX on Windows 8.1 with the latest drivers, so the thread isn't much us anyway.
One strange thing is the way this error could be reproduced. When I create context A and context B which shares data with A, then C sharing data with A, the error only occurs when B renders something before creating C (which fails).
Does anyone have an idea what might be going on?
Upvotes: 3
Views: 590
Reputation: 98358
This error is probably an HRESULT
/ SCODE
which is a compound value. Each of the pieces (severity, facility, code) can be accessed with a macro:
HRESULT_SEVERITY(0xC00710DD) = 0xC0000000 //ERROR_SEVERITY_ERROR
HRESULT_FACILITY(0xC00710DD) = 7 //FACILITY_WIN32
HRESULT_CODE(0xC00710DD) = 4317 //ERROR_INVALID_OPERATION
Upvotes: 8