From 938971291761ba8ea1e776347cb1cf3dafe6d549 Mon Sep 17 00:00:00 2001 From: mariob92 <89140037+mariob92@users.noreply.github.com> Date: Sat, 6 Jul 2024 20:23:03 +0200 Subject: [PATCH] wgl/glx: Fix attribute list for SDL_GL_FLOATBUFFERS This commit fixes the attribute list in the WGL and GLX code when requesting a floating point pixel format. The name of the attribute was missing in the list. Fixes libsdl-org#10189 --- src/video/windows/SDL_windowsopengl.c | 1 + src/video/x11/SDL_x11opengl.c | 1 + 2 files changed, 2 insertions(+) diff --git a/src/video/windows/SDL_windowsopengl.c b/src/video/windows/SDL_windowsopengl.c index 57fa7ec549..0c6a2a9ff8 100644 --- a/src/video/windows/SDL_windowsopengl.c +++ b/src/video/windows/SDL_windowsopengl.c @@ -641,6 +641,7 @@ static int WIN_GL_SetupWindowInternal(SDL_VideoDevice *_this, SDL_Window *window } if (_this->gl_config.floatbuffers) { + *iAttr++ = WGL_PIXEL_TYPE_ARB; *iAttr++ = WGL_TYPE_RGBA_FLOAT_ARB; } diff --git a/src/video/x11/SDL_x11opengl.c b/src/video/x11/SDL_x11opengl.c index 44a6c1e772..5eb75a8588 100644 --- a/src/video/x11/SDL_x11opengl.c +++ b/src/video/x11/SDL_x11opengl.c @@ -571,6 +571,7 @@ static int X11_GL_GetAttributes(SDL_VideoDevice *_this, Display *display, int sc } if (_this->gl_config.floatbuffers) { + attribs[i++] = GLX_RENDER_TYPE; attribs[i++] = GLX_RGBA_FLOAT_TYPE_ARB; }