summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorDanny Baumann <dannybaumann@web.de>2008-10-16 16:01:44 +0200
committerDanny Baumann <dannybaumann@web.de>2008-10-16 16:01:44 +0200
commit6e6c68898d6a6a74b0baf9f4421d83e652122ca3 (patch)
treec0eaf814f498c71ca57b4dfc9851c6b6135a7fc1 /src/main.c
parenta18f32963dab3babccee8e24f74e9c0e489d8152 (diff)
Always set the LIBGL_ALWAYS_INDIRECT environment variable to 1 if indirect rendering was requested.
All AIGLX drivers need that environment variable to return the correct set of extension strings. Other drivers probably ignore the variable, but setting it shouldn't harm in any case. If we don't set this environment variable from inside compiz, we're breaking being restored from a session manager for users of those drivers.
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index ff8328d5..d8921e7c 100644
--- a/src/main.c
+++ b/src/main.c
@@ -314,6 +314,9 @@ main (int argc, char **argv)
}
else if (!strcmp (argv[i], "--indirect-rendering"))
{
+ /* force Mesa libGL into indirect rendering mode, because
+ glXQueryExtensionsString is context-independant */
+ setenv ("LIBGL_ALWAYS_INDIRECT", "1", True);
indirectRendering = TRUE;
}
else if (!strcmp (argv[i], "--loose-binding"))