-/* xscreensaver, Copyright (c) 1999-2011 by Jamie Zawinski <jwz@jwz.org>
+/* xscreensaver, Copyright (c) 1999-2018 by Jamie Zawinski <jwz@jwz.org>
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
# define DB GLX_DOUBLEBUFFER
# define ST GLX_STENCIL_SIZE
-# if defined(GL_SAMPLE_BUFFERS)
-# define SB GL_SAMPLE_BUFFERS
-# define SM GL_SAMPLES
-# elif defined(GLX_SAMPLE_BUFFERS)
+# if defined(GLX_SAMPLE_BUFFERS) /* Needs to come before GL_SAMPLE_BUFFERS */
# define SB GLX_SAMPLE_BUFFERS
# define SM GLX_SAMPLES
# elif defined(GLX_SAMPLE_BUFFERS_ARB)
# elif defined(GLX_SAMPLE_BUFFERS_SGIS)
# define SB GLX_SAMPLE_BUFFERS_SGIS
# define SM GLX_SAMPLES_SGIS
+# elif defined(GL_SAMPLE_BUFFERS)
+# define SB GL_SAMPLE_BUFFERS
+# define SM GL_SAMPLES
# endif
+
int attrs[][40] = {
# ifdef SB /* rgba double stencil multisample */
{ GLX_RGBA, R,8, G,8, B,8, A,8, D,8, DB, ST,1, SB,1, SM,8, 0 },