Monado OpenXR Runtime
glx_api.h
Go to the documentation of this file.
1// Copyright 2022, James Hogan <james@albanarts.com>
2// SPDX-License-Identifier: BSL-1.0
3/*!
4 * @file
5 * @brief GLX API wrapper header.
6 * @author James Hogan <james@albanarts.com>
7 * @ingroup aux_ogl
8 */
9
10#pragma once
11
12#include "xrt/xrt_gfx_xlib.h"
13
14// We don't #include "glad/glx.h" here in order not to conflict with our typedefs in xrt_gfx_xlib.h.
15
16Display *
17glXGetCurrentDisplay(void);
18GLXContext
19glXGetCurrentContext(void);
20GLXDrawable
21glXGetCurrentDrawable(void);
22GLXDrawable
23glXGetCurrentReadDrawable(void);
24bool
25glXMakeContextCurrent(Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx);
26bool
27glXMakeCurrent(Display *dpy, GLXDrawable drawable, GLXContext ctx);
28
29typedef void (*GLADapiproc)(void);
30typedef GLADapiproc (*GLADloadfunc)(const char *name);
31int
32gladLoadGLX(Display *display, int screen, GLADloadfunc load);
Header defining an XRT graphics provider.