VID_BuildGLXAttrib(attrib, bpp == 32, stereobuffer, samples);
visinfo = qglXChooseVisual(vidx11_display, vidx11_screen, attrib);
+ if (!visinfo && (samples == 1))
+ {
+ /* Some Mesa drivers reject sample buffers with 1 sample, so try
+ * entirely without one */
+ VID_BuildGLXAttrib(attrib, bpp == 32, stereobuffer, 0);
+ visinfo = qglXChooseVisual(vidx11_display, vidx11_screen, attrib);
+ }
if (!visinfo)
{
Con_Print("Couldn't get an RGB, Double-buffered, Depth visual\n");
int VID_Mode(int fullscreen, int width, int height, int bpp, int refreshrate, int stereobuffer, int samples)
{
cl_ignoremousemoves = 2;
- Con_Printf("Initialized Video Mode: %s %dx%dx%dx%dhz%s%s\n", fullscreen ? "fullscreen" : "window", width, height, bpp, refreshrate, stereobuffer ? " stereo" : "", samples > 1 ? va(" (%ix AA)", samples) : "");
+ Con_Printf("Initializing Video Mode: %s %dx%dx%dx%dhz%s%s\n", fullscreen ? "fullscreen" : "window", width, height, bpp, refreshrate, stereobuffer ? " stereo" : "", samples > 1 ? va(" (%ix AA)", samples) : "");
if (VID_InitMode(fullscreen, width, height, bpp, vid_userefreshrate.integer ? max(1, refreshrate) : 0, stereobuffer, samples))
{
vid.fullscreen = fullscreen;