Browse Source

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

(cherry picked from commit 938971291761ba8ea1e776347cb1cf3dafe6d549)
(cherry picked from commit 58e179c8b50feff2a321003886f218a7b006c4d0)
mariob92 9 months ago
parent
commit
7b11fff2ee
2 changed files with 2 additions and 0 deletions
  1. 1 0
      src/video/windows/SDL_windowsopengl.c
  2. 1 0
      src/video/x11/SDL_x11opengl.c

+ 1 - 0
src/video/windows/SDL_windowsopengl.c

@@ -642,6 +642,7 @@ static int WIN_GL_SetupWindowInternal(_THIS, SDL_Window *window)
     }
 
     if (_this->gl_config.floatbuffers) {
+        *iAttr++ = WGL_PIXEL_TYPE_ARB;
         *iAttr++ = WGL_TYPE_RGBA_FLOAT_ARB;
     }
 

+ 1 - 0
src/video/x11/SDL_x11opengl.c

@@ -575,6 +575,7 @@ static int X11_GL_GetAttributes(_THIS, Display *display, int screen, int *attrib
     }
 
     if (_this->gl_config.floatbuffers) {
+        attribs[i++] = GLX_RENDER_TYPE;
         attribs[i++] = GLX_RGBA_FLOAT_TYPE_ARB;
     }