2 /* Copyright (c) Mark J. Kilgard, 1997. */
4 /* This program is freely distributable without licensing fees
5 and is provided without guarantee or warrantee expressed or
6 implied. This program is -not- in the public domain. */
12 #if defined(GLX_VERSION_1_1)
14 __glutIsSupportedByGLX(char *extension
)
16 static const char *extensions
= NULL
;
18 char *where
, *terminator
;
21 glXQueryVersion(__glutDisplay
, &major
, &minor
);
22 /* Be careful not to call glXQueryExtensionsString if it
23 looks like the server doesn't support GLX 1.1.
24 Unfortunately, the original GLX 1.0 didn't have the notion
26 if ((major
== 1 && minor
>= 1) || (major
> 1)) {
28 extensions
= glXQueryExtensionsString(__glutDisplay
, __glutScreen
);
29 /* It takes a bit of care to be fool-proof about parsing
30 the GLX extensions string. Don't be fooled by
34 where
= strstr(start
, extension
);
37 terminator
= where
+ strlen(extension
);
38 if (where
== start
|| *(where
- 1) == ' ') {
39 if (*terminator
== ' ' || *terminator
== '\0') {