summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNigel Stewart <nstewart@nvidia.com>2010-08-10 17:27:37 -0600
committerJosé Fonseca <jfonseca@vmware.com>2011-07-11 20:05:32 +0100
commitce233fcde31624a76e0785828fa31ff7e664be9f (patch)
treec4da5695361931e3cc6d144f3dad3698816dd5a6
parent4d9669171c0c86949e9777269a87234f21927153 (diff)
downloadglut-ce233fcde31624a76e0785828fa31ff7e664be9f.tar.gz
glut: also check for GLX_ARB_multisample
Signed-off-by: Brian Paul <brianp@vmware.com>
-rw-r--r--src/glut/glx/glut_dstr.c14
-rw-r--r--src/glut/glx/glut_overlay.c5
2 files changed, 11 insertions, 8 deletions
diff --git a/src/glut/glx/glut_dstr.c b/src/glut/glx/glut_dstr.c
index 2513af4..319930c 100644
--- a/src/glut/glx/glut_dstr.c
+++ b/src/glut/glx/glut_dstr.c
@@ -232,7 +232,7 @@ loadVisuals(int *nitems_return)
XVisualInfo *vinfo, **vlist, template;
FrameBufferMode *fbmodes, *mode;
int n, i, j, rc, glcapable;
-#if defined(GLX_VERSION_1_1) && defined(GLX_SGIS_multisample)
+#if defined(GLX_VERSION_1_1) && (defined(GLX_SGIS_multisample) || defined(GLX_ARB_multisample))
int multisample;
#endif
#if defined(GLX_VERSION_1_1) && defined(GLX_EXT_visual_info)
@@ -275,8 +275,9 @@ loadVisuals(int *nitems_return)
}
}
-#if defined(GLX_VERSION_1_1) && defined(GLX_SGIS_multisample)
- multisample = __glutIsSupportedByGLX("GLX_SGIS_multisample");
+#if defined(GLX_VERSION_1_1) && (defined(GLX_SGIS_multisample) || defined(GLX_ARB_multisample))
+ multisample = __glutIsSupportedByGLX("GLX_SGIS_multisample") ||
+ __glutIsSupportedByGLX("GLX_ARB_multisample");
#endif
#if defined(GLX_VERSION_1_1) && defined(GLX_EXT_visual_info)
visual_info = __glutIsSupportedByGLX("GLX_EXT_visual_info");
@@ -572,7 +573,7 @@ loadVisuals(int *nitems_return)
#else
mode->cap[TRANSPARENT] = 0;
#endif
-#if defined(GLX_VERSION_1_1) && defined(GLX_SGIS_multisample)
+#if defined(GLX_VERSION_1_1) && (defined(GLX_SGIS_multisample) || defined(GLX_ARB_multisample))
if (multisample) {
rc = __glut_glXGetFBConfigAttribSGIX(__glutDisplay,
fbc, GLX_SAMPLES_SGIS, &mode->cap[SAMPLES]);
@@ -1250,8 +1251,9 @@ parseModeString(char *mode, int *ncriteria, Bool * allowDoubleAsSingle,
word = strtok(NULL, " \t");
}
-#if defined(GLX_VERSION_1_1) && defined(GLX_SGIS_multisample)
- if (__glutIsSupportedByGLX("GLX_SGIS_multisample")) {
+#if defined(GLX_VERSION_1_1) && (defined(GLX_SGIS_multisample) || defined(GLX_ARB_multisample))
+ if (__glutIsSupportedByGLX("GLX_SGIS_multisample") ||
+ __glutIsSupportedByGLX("GLX_ARB_multisample")) {
if (!(mask & (1 << SAMPLES))) {
criteria[n].capability = SAMPLES;
criteria[n].comparison = EQ;
diff --git a/src/glut/glx/glut_overlay.c b/src/glut/glx/glut_overlay.c
index 3243465..ce8e68d 100644
--- a/src/glut/glx/glut_overlay.c
+++ b/src/glut/glx/glut_overlay.c
@@ -81,10 +81,11 @@ checkOverlayAcceptability(XVisualInfo * vi, unsigned int mode)
if (GLUT_WIND_HAS_STENCIL(mode) && (value <= 0))
return 1;
-#if defined(GLX_VERSION_1_1) && defined(GLX_SGIS_multisample)
+#if defined(GLX_VERSION_1_1) && (defined(GLX_SGIS_multisample) || defined(GLX_ARB_multisample))
/* XXX Multisampled overlay color index?? Pretty unlikely. */
/* Look for multisampling if requested. */
- if (__glutIsSupportedByGLX("GLX_SGIS_multisample"))
+ if (__glutIsSupportedByGLX("GLX_SGIS_multisample") ||
+ __glutIsSupportedByGLX("GLX_ARB_multisample"))
glXGetConfig(__glutDisplay, vi, GLX_SAMPLES_SGIS, &value);
else
value = 0;