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 <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
<li>LIBGL_DRIVERS_PATH - colon-separated list of paths to search for DRI drivers
<li>LIBGL_ALWAYS_INDIRECT - if set to `true`, forces an indirect rendering context/connection.
<li>LIBGL_ALWAYS_SOFTWARE - if set to `true`, always use software rendering
-<li>LIBGL_NO_DRAWARRAYS - if set do not use DrawArrays GLX protocol (for debugging)
+<li>LIBGL_NO_DRAWARRAYS - if set to `true`, do not use DrawArrays GLX protocol (for debugging)
<li>LIBGL_SHOW_FPS - print framerate to stdout based on the number of glXSwapBuffers
calls per second.
<li>LIBGL_DRI3_DISABLE - disable DRI3 if set to `true`.
* 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);
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