Skip to content

unable to use opengl

I have a such error since b6740a7b :

 2,9083s  GFX| Setting video mode 1920x1200 (32-bpp fullscreen).
 2,9413s ERROR| Unable to set video mode: SDL_GL_CreateContext failed: Could not create GL context: BadValue (integer parameter out of range for operation).
 2,9415s ERROR| Video driver does not support OpenGL version 2 or greater; all OpenGL modes are unavailable.
 2,9421s ERROR| Failure setting video mode 1920x1200x32 fullscreen! Trying next mode...

It is rk3588 based sbc with panfork driver (but looks like with mainline mesa behaviour are same here).

$ glxinfo|grep version
server glx version string: 1.4
client glx version string: 1.4
GLX version: 1.4
    Max core profile version: 0.0
    Max compat profile version: 3.0
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.1
OpenGL version string: 3.0 Mesa 23.0.0-devel (git-120202c675)
OpenGL shading language version string: 1.30
OpenGL ES profile version string: OpenGL ES 3.1 Mesa 23.0.0-devel (git-120202c675)
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10
    GL_EXT_shader_implicit_conversions, GL_EXT_shader_integer_mix, 

this change makes opengl work again (it reverts small part of b6740a7b ):

--- a/source/build/src/sdlayer.cpp
+++ b/source/build/src/sdlayer.cpp
@@ -1836,11 +1836,6 @@ int32_t videoSetMode(int32_t x, int32_t y, int32_t c, int32_t fs)
               { SDL_GL_CONTEXT_MAJOR_VERSION, 1 },
               { SDL_GL_CONTEXT_MINOR_VERSION, 1 },
 #endif
-              { SDL_GL_CONTEXT_FLAGS,
-#ifndef NDEBUG
-              SDL_GL_CONTEXT_DEBUG_FLAG |
-#endif
-              SDL_GL_CONTEXT_ROBUST_ACCESS_FLAG },
               { SDL_GL_CONTEXT_RESET_NOTIFICATION, SDL_GL_CONTEXT_RESET_LOSE_CONTEXT },
               { SDL_GL_DOUBLEBUFFER, 1 },

Seems it is driver issue, but is it really necessary?