libsdl-org / SDL

Simple Directmedia Layer
https://libsdl.org
zlib License
10.17k stars 1.86k forks source link

Does kmsdrm need a window before it can load OpenGL? #6525

Open icculus opened 2 years ago

icculus commented 2 years ago

Basically the problem is that they are trying to load a GL library without creating a window, which like everything else OpenGL, is subject to the weird quirks of the platform.

We can investigate whether the backend's requirement that a window exist first is reasonable in the first place, but that's probably going to wait until we merge the atomic version in SDL3.

Originally posted by @icculus in https://github.com/libsdl-org/SDL/issues/5399#issuecomment-1315707250

icculus commented 2 years ago

This might be unavoidable (and thus just close this as WONTFIX), but we should check this at some point.

joolswills commented 1 year ago

This used to work fine before https://github.com/libsdl-org/SDL/commit/f60f8d5d84eeac4e115617070606a83f71abc61d on the RPI4 with KMSDRM. Some software will no longer work on SDL2 2.26.x using KMSDRM (eg darkplaces quake) due to this - https://github.com/xonotic/darkplaces/blob/1fe13da8a5fbb6b1ae4e7dcf55c415cf6846b59b/vid_shared.c#L698 (GL_GetProcAddress function for SDL2 backend calls SDL_GL_GetProcAddress)