You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-11 13:10:58 +00:00
Load X11 dynamically
The loaders have been generated through hpvb's dynload-wrapper, although they had to be heavily handpatched to workaround some already reported issues with it. I added a note to each generated file to account for that. As GLAD uses X11 stuff directly, I had to define the GLAD_GLX_NO_X11 macro to not let do it that, and handle myself the display loading and screen handling part myself, which wasn't that hard but it's still something worth saying. I plan to improve greatly the X11 backend (including this aspect) but, as the release isn't that far and I'm also working on the Wayland backend, this will do for now, I hope.
This commit is contained in:
@@ -321,8 +321,8 @@ void GLManager_X11::swap_buffers() {
|
||||
glXSwapBuffers(_x_windisp.x11_display, _x_windisp.x11_window);
|
||||
}
|
||||
|
||||
Error GLManager_X11::initialize() {
|
||||
if (!gladLoaderLoadGLX(nullptr, 0)) {
|
||||
Error GLManager_X11::initialize(Display *p_display) {
|
||||
if (!gladLoaderLoadGLX(p_display, XScreenNumberOfScreen(XDefaultScreenOfDisplay(p_display)))) {
|
||||
return ERR_CANT_CREATE;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user