src/video/windows/SDL_windowsopengl.c
changeset 11346 4d2bf1b340cd
parent 11332 e3797888c6f1
child 11347 7f254d0b7842
     1.1 --- a/src/video/windows/SDL_windowsopengl.c	Tue Aug 22 15:50:39 2017 -0400
     1.2 +++ b/src/video/windows/SDL_windowsopengl.c	Thu Aug 24 21:30:53 2017 -0400
     1.3 @@ -82,6 +82,11 @@
     1.4  #define WGL_CONTEXT_RELEASE_BEHAVIOR_FLUSH_ARB          0x2098
     1.5  #endif
     1.6  
     1.7 +#ifndef WGL_ARB_create_context_no_error
     1.8 +#define WGL_ARB_create_context_no_error
     1.9 +#define WGL_CONTEXT_OPENGL_NO_ERROR_ARB                 0x31B3
    1.10 +#endif
    1.11 +
    1.12  typedef HGLRC(APIENTRYP PFNWGLCREATECONTEXTATTRIBSARBPROC) (HDC hDC,
    1.13                                                              HGLRC
    1.14                                                              hShareContext,
    1.15 @@ -593,6 +598,11 @@
    1.16          *iAttr++ = _this->gl_config.framebuffer_srgb_capable;
    1.17      }
    1.18  
    1.19 +    if (_this->gl_config.no_error) {
    1.20 +        *iAttr++ = WGL_CONTEXT_OPENGL_NO_ERROR_ARB;
    1.21 +        *iAttr++ = _this->gl_config.no_error;
    1.22 +    }
    1.23 +
    1.24      /* We always choose either FULL or NO accel on Windows, because of flaky
    1.25         drivers. If the app didn't specify, we use FULL, because that's
    1.26         probably what they wanted (and if you didn't care and got FULL, that's