glx: turn LIBGL_NO_DRAWARRAYS into a boolean
[mesa.git] / src / glx / indirect_glx.c
index 51dd2cacb212f909aa09783f72e9185514e85f79..4302a8ff28815cf11fb809f3cd2cfd236a970960 100644 (file)
  *   Kristian Høgsberg (krh@bitplanet.net)
  */
 
+#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