summaryrefslogtreecommitdiff
path: root/app/glxinfo/glinfo_common.h
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2015-02-03 03:17:21 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2015-02-03 03:17:21 +0000
commite85fc2831801d55d4f5d014139af3575ce837423 (patch)
treec4cadf553806f64f02cdc5476705133e1b6683ad /app/glxinfo/glinfo_common.h
parentd90da118f6f7ee6eec1a5a60e74f5bfef6097278 (diff)
Update to the latest glxinfo code in mesa demos git which notably adds
information based on GLX_MESA_query_renderer. The glxinfo man page isn't present in mesa demos so switch our page to mdoc and update the flags. Prompted by an initial diff from brynet@ ok brynet@ kettenis@
Diffstat (limited to 'app/glxinfo/glinfo_common.h')
-rw-r--r--app/glxinfo/glinfo_common.h52
1 files changed, 52 insertions, 0 deletions
diff --git a/app/glxinfo/glinfo_common.h b/app/glxinfo/glinfo_common.h
index d0daf4dd0..0830c7f2a 100644
--- a/app/glxinfo/glinfo_common.h
+++ b/app/glxinfo/glinfo_common.h
@@ -63,6 +63,54 @@ struct bit_info
};
+typedef enum
+{
+ Normal,
+ Wide,
+ Verbose
+} InfoMode;
+
+
+struct options
+{
+ InfoMode mode;
+ GLboolean findBest;
+ GLboolean limits;
+ GLboolean singleLine;
+ /* GLX only */
+ char *displayName;
+ GLboolean allowDirect;
+};
+
+
+/** list of known OpenGL versions */
+static const struct { int major, minor; } gl_versions[] = {
+ {4, 5},
+ {4, 4},
+ {4, 3},
+ {4, 2},
+ {4, 1},
+ {4, 0},
+
+ {3, 3},
+ {3, 2},
+ {3, 1},
+ {3, 0},
+
+ {2, 1},
+ {2, 0},
+
+ {1, 5},
+ {1, 4},
+ {1, 3},
+ {1, 2},
+ {1, 1},
+ {1, 0},
+
+ {0, 0} /* end of list */
+};
+
+
void
print_extension_list(const char *ext, GLboolean singleLine);
@@ -86,4 +134,8 @@ const char *
context_flags_string(int mask);
+void
+parse_args(int argc, char *argv[], struct options *options);
+
+
#endif /* GLINFO_COMMON_H */