Merge branch 'master' into gallium-0.2
[mesa.git] / src / glut / os2 / glut_mesa.cpp
index 73682a506728d9c478f089bafcd1033595bb4f05..7e202fa078684c4d5f1b8909a7da47ff753f2db9 100644 (file)
@@ -1,57 +1,57 @@
-\r
-/* Copyright (c) Mark J. Kilgard, 1996. */\r
-\r
-/* This program is freely distributable without licensing fees \r
-   and is provided without guarantee or warrantee expressed or \r
-   implied. This program is -not- in the public domain. */\r
-\r
-#include <stdlib.h>\r
-#include <string.h>\r
-#include "glutint.h"\r
-\r
-int __glutMesaSwapHackSupport = 0;  /* Not supported until\r
-                                       proven otherwise. */\r
-\r
-/* Use the "Mesa swap hack" if reasonable if and only if\r
-   MESA_SWAP_HACK is set to something whose first character is\r
-   not "N" or "n" AND "Brian Paul" is the vendor string AND\r
-   "Mesa X11"* (or "Mesa" for backward compatibility)  is the\r
-   renderer string.\r
-\r
-   Anyone who modifies Mesa so that glXSwapBuffers does not\r
-   simply blit the previously rendered back buffer should\r
-   change either their vendor or renderer string to avoid\r
-   confusing GLUT. */\r
-\r
-void\r
-__glutDetermineMesaSwapHackSupport(void)\r
-{\r
-  static int doneAlready = 0;\r
-  char *env, *vendor, *renderer;\r
-\r
-  if (doneAlready)\r
-    return;\r
-  env = getenv("MESA_SWAP_HACK");\r
-  if (env) {\r
-    if ((env[0] != 'n') && (env[0] != 'N')) {\r
-      vendor = (char *) glGetString(GL_VENDOR);\r
-      renderer = (char *) glGetString(GL_RENDERER);\r
-\r
-      /* Old versions of X11 Mesa uses the renderer string\r
-         "Mesa"; Brian plans to start using "Mesa X11" to\r
-         distinguish the X version of Mesa from other flavor\r
-         such as Windows or 3Dfx. */\r
-\r
-#define MESA_X11 "Mesa X11"\r
-\r
-      /* XXX At some point in the future, eliminate the\r
-         backward compatibility for the old "Mesa" renderer\r
-         string. */\r
-\r
-      if (!strcmp(vendor, "Brian Paul") && (!strcmp(renderer, "Mesa") ||\r
-          !strncmp(renderer, MESA_X11, sizeof(MESA_X11) - 1)))\r
-        __glutMesaSwapHackSupport = 1;\r
-    }\r
-  }\r
-  doneAlready = 1;\r
-}\r
+
+/* Copyright (c) Mark J. Kilgard, 1996. */
+
+/* This program is freely distributable without licensing fees 
+   and is provided without guarantee or warrantee expressed or 
+   implied. This program is -not- in the public domain. */
+
+#include <stdlib.h>
+#include <string.h>
+#include "glutint.h"
+
+int __glutMesaSwapHackSupport = 0;  /* Not supported until
+                                       proven otherwise. */
+
+/* Use the "Mesa swap hack" if reasonable if and only if
+   MESA_SWAP_HACK is set to something whose first character is
+   not "N" or "n" AND "Brian Paul" is the vendor string AND
+   "Mesa X11"* (or "Mesa" for backward compatibility)  is the
+   renderer string.
+
+   Anyone who modifies Mesa so that glXSwapBuffers does not
+   simply blit the previously rendered back buffer should
+   change either their vendor or renderer string to avoid
+   confusing GLUT. */
+
+void
+__glutDetermineMesaSwapHackSupport(void)
+{
+  static int doneAlready = 0;
+  char *env, *vendor, *renderer;
+
+  if (doneAlready)
+    return;
+  env = getenv("MESA_SWAP_HACK");
+  if (env) {
+    if ((env[0] != 'n') && (env[0] != 'N')) {
+      vendor = (char *) glGetString(GL_VENDOR);
+      renderer = (char *) glGetString(GL_RENDERER);
+
+      /* Old versions of X11 Mesa uses the renderer string
+         "Mesa"; Brian plans to start using "Mesa X11" to
+         distinguish the X version of Mesa from other flavor
+         such as Windows or 3Dfx. */
+
+#define MESA_X11 "Mesa X11"
+
+      /* XXX At some point in the future, eliminate the
+         backward compatibility for the old "Mesa" renderer
+         string. */
+
+      if (!strcmp(vendor, "Brian Paul") && (!strcmp(renderer, "Mesa") ||
+          !strncmp(renderer, MESA_X11, sizeof(MESA_X11) - 1)))
+        __glutMesaSwapHackSupport = 1;
+    }
+  }
+  doneAlready = 1;
+}