The open source OpenXR runtime
1#!/usr/bin/env bash
2# SPDX-FileCopyrightText: 2020-2022, Collabora, Ltd. and the Monado contributors
3# SPDX-License-Identifier: CC0-1.0
4
5tmpdir=$(mktemp -d)
6trap "rm -rf $tmpdir" EXIT
7echo "Creating python3 venv in a temporary directory"
8python3 -m venv "${tmpdir}/venv"
9. "${tmpdir}/venv"/bin/activate
10
11echo "Installing glad2 from git"
12python3 -m pip install git+https://github.com/Dav1dde/glad.git@glad2
13
14# command line (for the glad2 branch!)
15
16echo "GLAD2 generation"
17
18glad --merge \
19 --api='gl:core=4.6,gles2=3.2,egl=1.5,glx=1.4,wgl=1.0' \
20 --extensions=\
21EGL_ANDROID_front_buffer_auto_refresh,\
22EGL_ANDROID_get_native_client_buffer,\
23EGL_ANDROID_image_native_buffer,\
24EGL_ANDROID_native_fence_sync,\
25EGL_EXT_create_context_robustness,\
26EGL_EXT_image_dma_buf_import,\
27EGL_EXT_image_dma_buf_import_modifiers,\
28EGL_EXT_image_gl_colorspace,\
29EGL_IMG_context_priority,\
30EGL_KHR_create_context,\
31EGL_KHR_fence_sync,\
32EGL_KHR_gl_colorspace,\
33EGL_KHR_image,\
34EGL_KHR_image_base,\
35EGL_KHR_no_config_context,\
36EGL_KHR_platform_android,\
37EGL_KHR_reusable_sync,\
38EGL_KHR_wait_sync,\
39GL_EXT_EGL_image_storage,\
40GL_EXT_YUV_target,\
41GL_EXT_external_buffer,\
42GL_EXT_memory_object,\
43GL_EXT_memory_object_fd,\
44GL_EXT_memory_object_win32,\
45GL_EXT_sRGB,\
46GL_EXT_semaphore,\
47GL_OES_EGL_image,\
48GL_OES_EGL_image_external,\
49GL_OES_EGL_image_external_essl3,\
50GL_OES_depth_texture,\
51GL_OES_packed_depth_stencil,\
52GL_OES_rgb8_rgba8,\
53 --out-path . c