cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

asylum29
Adept II

SwapBuffers() generates GL_INVALID_ENUM in core profile context

This was bugging me for some time... Both SwapBuffers() and wglSwapLayerBuffers() generate GL_INVALID_ENUM on first call.

Debug output from CodeXL says:

OpenGL Debug Output: API - Error, Using glGetString in a Core context with parameter <name> and enum '0x1f03' which was removed from Core OpenGL (GL_INVALID_ENUM)

Is this a driver bug? Or a Windows 10 bug? (I don't remember of this happening on win7)

0 Likes
1 Reply

Re: SwapBuffers() generates GL_INVALID_ENUM in core profile context

Hi, asylum29

wglSwapLayerBuffers this Win32 API, not OpenGL API.

You should check OpenGL Errors before calling wglSwapLayerBuffers, to check win32 error use GetLastError.

OpenGL Debug Output: API - Error, Using glGetString in a Core context with parameter <name> and enum '0x1f03' which was removed from Core OpenGL (GL_INVALID_ENUM)

For core OpenGL profile use glGetIntegerv(GL_NUM_EXTENSIONS, ..)/glGetStringi(GL_EXTENSIONS😞

GLint n, i;

glGetIntegerv(GL_NUM_EXTENSIONS, &n);

for (i = 0; i < n; i++) {

printf("%s\n", glGetStringi(GL_EXTENSIONS, i);

}

OpenGL Discussion and Help Forums

0 Likes