diff --git a/ChangeLog.md b/ChangeLog.md index 7ff14694..514071f4 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -44,6 +44,12 @@ had previously been initialized on the 2D X server without VirtualGL. other elements of the Firefox browser window to disappear when the window was resized. +10. Fixed an issue in the EGL back end whereby `GLX_EXT_framebuffer_sRGB` was +not added to the list of extensions returned by +`glXGetClientString(..., GLX_EXTENSIONS)`, `glXQueryExtensionsString()`, or +`glXQueryServerString(..., GLX_EXTENSIONS)` unless the underlying EGL +implementation supported v1.5 or later of the EGL API. + 3.0.2 ===== diff --git a/demos/glxspheres.c b/demos/glxspheres.c index e459cf19..cc318539 100644 --- a/demos/glxspheres.c +++ b/demos/glxspheres.c @@ -587,7 +587,7 @@ int main(int argc, char **argv) rgbAttribs[19] = 32 - bpc * 3; } - if(!GLX_EXTENSION_EXISTS(GLX_EXT_framebuffer_sRGB)) + if(useSRGB && !GLX_EXTENSION_EXISTS(GLX_EXT_framebuffer_sRGB)) THROW("GLX_EXT_framebuffer_sRGB extension is not available"); c = glXChooseFBConfig(dpy, screen, rgbAttribs, &n); diff --git a/server/faker-glx.cpp b/server/faker-glx.cpp index 28d1e395..7213330a 100644 --- a/server/faker-glx.cpp +++ b/server/faker-glx.cpp @@ -1,6 +1,6 @@ // Copyright (C)2004 Landmark Graphics Corporation // Copyright (C)2005, 2006 Sun Microsystems, Inc. -// Copyright (C)2009, 2011-2023 D. R. Commander +// Copyright (C)2009, 2011-2024 D. R. Commander // // This library is free software and may be redistributed and/or modified under // the terms of the wxWindows Library License, Version 3.1 or (at your option) @@ -866,7 +866,10 @@ static const char *getGLXExtensions(void) if((faker::eglMajor > 1 || (faker::eglMajor == 1 && faker::eglMinor >= 5)) && !strstr(glxextensions, "GLX_ARB_create_context")) strncat(glxextensions, - " GLX_ARB_create_context GLX_ARB_create_context_profile GLX_EXT_framebuffer_sRGB", + " GLX_ARB_create_context GLX_ARB_create_context_profile", + 1023 - strlen(glxextensions)); + if(!strstr(glxextensions, "GLX_EXT_framebuffer_sRGB")) + strncat(glxextensions, " GLX_EXT_framebuffer_sRGB", 1023 - strlen(glxextensions)); return glxextensions; }