summaryrefslogtreecommitdiff
path: root/src/dispatch_glx.c
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2017-01-27 18:12:05 +0000
committerEmmanuele Bassi <ebassi@gnome.org>2017-02-03 11:13:30 +0000
commit6af57b07459742b90ef7471733bd090a4580fe61 (patch)
tree93ff8fdcd40bdd2113206fce3961fd41e5237c71 /src/dispatch_glx.c
parent59d9c2d83db722599d612f4339d9d8405f0c13e7 (diff)
downloadlibepoxy-6af57b07459742b90ef7471733bd090a4580fe61.tar.gz
Write the API reference
Now that we have Doxygen generating it, we should fill out the API reference for Epoxy.
Diffstat (limited to 'src/dispatch_glx.c')
-rw-r--r--src/dispatch_glx.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/dispatch_glx.c b/src/dispatch_glx.c
index 9396f1c..a74725e 100644
--- a/src/dispatch_glx.c
+++ b/src/dispatch_glx.c
@@ -47,6 +47,27 @@ epoxy_conservative_glx_version(void)
return epoxy_glx_version(dpy, screen);
}
+
+/**
+ * @brief Returns the version of GLX we are using
+ *
+ * The version is encoded as:
+ *
+ * ```
+ *
+ * version = major * 10 + minor
+ *
+ * ```
+ *
+ * So it can be easily used for version comparisons.
+ *
+ * @param dpy The X11 display
+ * @param screen The X11 screen
+ *
+ * @return The encoded version of GLX we are using
+ *
+ * @see epoxy_gl_version()
+ */
int
epoxy_glx_version(Display *dpy, int screen)
{
@@ -98,6 +119,18 @@ epoxy_conservative_has_glx_extension(const char *ext)
return epoxy_has_glx_extension(dpy, screen, ext);
}
+/**
+ * @brief Returns true if the given GLX extension is supported in the current context.
+ *
+ * @param dpy The X11 display
+ * @param screen The X11 screen
+ * @param extension The name of the GLX extension
+ *
+ * @return `true` if the extension is available
+ *
+ * @see epoxy_has_gl_extension()
+ * @see epoxy_has_egl_extension()
+ */
bool
epoxy_has_glx_extension(Display *dpy, int screen, const char *ext)
{