summaryrefslogtreecommitdiffstats
path: root/src/glx/indirect_glx.c
diff options
context:
space:
mode:
authorEric Engestrom <[email protected]>2017-09-08 11:57:26 +0100
committerEric Engestrom <[email protected]>2017-09-12 13:53:12 +0100
commit717fb6e4be9891cf77bb7ab43bda53ed62de747b (patch)
tree068506017547c6f09efc255dd225e16af96ed741 /src/glx/indirect_glx.c
parentd2768a397d6fb8a094765adf428726e323a0ae03 (diff)
glx: turn LIBGL_NO_DRAWARRAYS into a boolean
Instead of setting based on set/unset, allow users to use boolean values. In the docs, use `NO_DRAWARRAYS=true` instead of `NO_DRAWARRAYS=1` as it's clearer IMO. Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
Diffstat (limited to 'src/glx/indirect_glx.c')
-rw-r--r--src/glx/indirect_glx.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/glx/indirect_glx.c b/src/glx/indirect_glx.c
index 51dd2cacb21..4302a8ff288 100644
--- a/src/glx/indirect_glx.c
+++ b/src/glx/indirect_glx.c
@@ -30,9 +30,13 @@
* Kristian Høgsberg ([email protected])
*/
+#include <stdbool.h>
+
#include "glapi.h"
#include "glxclient.h"
+#include "util/debug.h"
+
#ifndef GLX_USE_APPLEGL
extern struct _glapi_table *__glXNewIndirectAPI(void);
@@ -371,7 +375,7 @@ indirect_create_context(struct glx_screen *psc,
return NULL;
}
gc->client_state_private = state;
- state->NoDrawArraysProtocol = (getenv("LIBGL_NO_DRAWARRAYS") != NULL);
+ state->NoDrawArraysProtocol = env_var_as_boolean("LIBGL_NO_DRAWARRAYS", false);
/*
** Create a temporary buffer to hold GLX rendering commands. The size