diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 325241d33..603becb45 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -22,7 +22,7 @@ jobs:
strategy:
matrix:
target-platform: [host-os]
- os: [ubuntu-20.04, ubuntu-22.04, windows-2022, macos-12]
+ os: [ubuntu-20.04, ubuntu-22.04, windows-2019, macos-12]
type: [Debug, Release]
compiler: [default]
include:
@@ -38,7 +38,7 @@ jobs:
compiler: clang
# on Windows we skip Debug because otherwise the hosted runner runs out of space
exclude:
- - os: windows-2022
+ - os: windows-2019
type: Debug
steps:
diff --git a/.gitignore b/.gitignore
index 82fff4431..82ebdb02b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,7 @@
/build*/
*~
.vscode/
+.cache/
*.swp
*.orig
*.pyc
diff --git a/CHANGELOG.md b/CHANGELOG.md
index b51218229..caff7542f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,69 @@
# Ramses Changelog
+28.2.0
+-------------------
+
+### Added
+- Added feature level 02
+ - Note that EFeatureLevel_Latest now points to EFeatureLevel_02
+ - New features:
+ - Added support for Uniform Buffer Objects (Uniform Blocks) in shaders
+ - Added semantics for UBO:
+ - `EEffectUniformSemantic::ModelBlock`, `EEffectUniformSemantic::CameraBlock`, `EEffectUniformSemantic::ModelCameraBlock` (fully implemented)
+ - `EEffectUniformSemantic::FramebufferBlock`, `EEffectUniformSemantic::SceneBlock` (not yet implemented on renderer side)
+ - Added support for merging content into an existing scene
+ - Added support for merging content of several files to ramses-viewer
+ - Add experimental support for Vulkan:
+ - Building vulkan device needs to be explicitly enabled using cmake option `ramses-sdk_ENABLE_DEVICE_TYPE_VULKAN`
+ - Added new enum value `EDeviceType::Vulkan`
+ - Scene can be configured to specify render backend compatibility using `SceneConfig::setRenderBackendCompatibility`
+- Added glad (OpenGL loader library)
+
+### Changed
+- Redesigned CMake build option for freetype/harfbuzz. Bundled package is used by default unless `ramses-sdk_USE_PLATFORM_FREETYPE` is ON.
+ - Removed `ramses-sdk_ALLOW_PLATFORM_FREETYPE` and `ramses-sdk_ALLOW_CUSTOM_FREETYPE`
+ - Replaced with `ramses-sdk_USE_PLATFORM_FREETYPE` for system package, and set to `OFF` by default
+- SkinBindings are now updated at the end of logic update
+- Upgraded internal abseil to 20240116.1
+- Upgraded glslang to 14.1.0
+- Allow embedded compositing using DMA buffers even if EGL extension `EGL_WL_bind_wayland_display` is not available
+- Mark APIs related to system compositor controller on renderer side as deprecated
+
+### Fixed
+- SkinBinding update order bug where skin bindings use old values in update
+- SkinBinding serializing inverse binding matrices in wrong order
+- Fixed scene locked in subscription requested state, when
+ - Scene is created in LocalOnly mode
+ - Display is destroyed, before the scene entered Ready state
+- Can create display with wayland IVI window without setting IVI layer if system compositor controller not enabled
+- Fixed possible crash when statistics logs are enabled
+- EGLContext for async effect uploader is no longer created if feature is disabled in DisplayConfig
+- Improved validation messages for RenderBuffers
+- Removed warning for empty render group
+
+28.1.1
+-------------------
+### Added
+- added ramsh commands to modify some object parameters (visibility, uniform inputs)
+
+### Fixed
+- Attempt to read pixels from multisampled offscreen buffer no longer crashes but fails with an event
+- Removed `ramses-sdk_ENABLE_LOGIC` flag, logic cannot be excluded from build anymore
+
+28.1.0
+-------------------
+### Added
+
+- Added `DisplayConfig::setWindowTitle()`
+- `ramses-viewer`: show scenes that are published remotely
+- `ramses-viewer`: show stream surfaces
+
+### Fixed
+- Handle time overflow when calculating watchdog notification intervals (IThreadWatchdogNotification)
+- Added sanity check for display thread sleep timeout (skub mode)
+- Fixed missing watchdog callbacks if notification interval is set to 1ms (RamsesFrameworkConfig::setWatchdogNotificationInterval)
+- Instance prefix for logging (RamsesFrameworkConfig::setLoggingInstanceName) now works also for dynamically linked renderer library
+
28.0.0
-------------------
### Added
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a6e74d0cd..0b1ddb24a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -9,7 +9,7 @@
CMAKE_MINIMUM_REQUIRED(VERSION 3.13)
set(RAMSES_VERSION_MAJOR 28)
-set(RAMSES_VERSION_MINOR 0)
+set(RAMSES_VERSION_MINOR 2)
set(RAMSES_VERSION_PATCH 0)
set(RAMSES_VERSION_POSTFIX "")
set(RAMSES_VERSION "${RAMSES_VERSION_MAJOR}.${RAMSES_VERSION_MINOR}.${RAMSES_VERSION_PATCH}${RAMSES_VERSION_POSTFIX}")
@@ -43,12 +43,12 @@ option(ramses-sdk_ENABLE_WINDOW_TYPE_ANDROID "Enable building for And
option(ramses-sdk_ENABLE_WINDOW_TYPE_IOS "Enable building for iOS window" OFF)
option(ramses-sdk_ENABLE_WINDOW_TYPE_WAYLAND_IVI "Enable building for Wayland ivi window" OFF)
option(ramses-sdk_ENABLE_WINDOW_TYPE_WAYLAND_WL_SHELL "Enable building for Wayland wl_shell window" OFF)
+option(ramses-sdk_ENABLE_DEVICE_TYPE_VULKAN "Enable building for an EXPERIMENTAL vulkan device" OFF)
# shared lib options
option(ramses-sdk_BUILD_FULL_SHARED_LIB "Build full shared libraries (with renderer)." ON)
# optional components
-option(ramses-sdk_ENABLE_LOGIC "Enable ramses logic - a component for scripting and animation." ON)
option(ramses-sdk_TEXT_SUPPORT "Enable/disable the ramses text API." ON)
option(ramses-sdk_ENABLE_TCP_SUPPORT "Enable use of TCP communication." ON)
option(ramses-sdk_ENABLE_DLT "Enable DLT logging support." ON)
@@ -66,11 +66,10 @@ option(ramses-sdk_ENABLE_FLATBUFFERS_GENERATION "Enable generation of fl
option(ramses-sdk_USE_IMAGEMAGICK "Enable tests depending on image magick compare" OFF)
# find options
-option(ramses-sdk_ALLOW_PLATFORM_GLM "Enable to search for platform provided OpenGL Math library (glm)." ON)
-option(ramses-sdk_ALLOW_PLATFORM_FREETYPE "Enable to search for platform provided freetype and harfbuzz." ON)
-option(ramses-sdk_ALLOW_CUSTOM_FREETYPE "Allow usage of custom freetype and harfbuzz if platform provided one was not found." ON)
-option(ramses-sdk_ALLOW_PLATFORM_LZ4 "Enable to search for platform provided lz4" ON)
-option(ramses-sdk_USE_PLATFORM_LUAJIT "Uses platform provided luajit instead of internal lua" OFF)
+option(ramses-sdk_ALLOW_PLATFORM_GLM "Enable to search for platform-provided OpenGL Math library (glm)." ON)
+option(ramses-sdk_ALLOW_PLATFORM_LZ4 "Enable to search for platform-provided lz4" ON)
+option(ramses-sdk_USE_PLATFORM_FREETYPE "Use platform-provided freetype and harfbuzz package instead of bundled package." OFF)
+option(ramses-sdk_USE_PLATFORM_LUAJIT "Use platform-provided luajit instead of internal lua" OFF)
# other options
set(ramses-sdk_FOLDER_PREFIX "" CACHE STRING "Optional folder prefix for targets in visual studio.")
diff --git a/cmake/modules/FindOpenGL.cmake b/cmake/modules/FindOpenGL.cmake
index 89b32ff13..178d66811 100644
--- a/cmake/modules/FindOpenGL.cmake
+++ b/cmake/modules/FindOpenGL.cmake
@@ -6,75 +6,27 @@
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
# -------------------------------------------------------------------------
-IF(CMAKE_SYSTEM_NAME MATCHES "Windows")
-
- # we always use the Khronos reference headers
- SET(OpenGL_INCLUDE_DIRS
- ${ramses-sdk_SOURCE_DIR}/external/khronos
- )
-
- # Windows has all OpenGL/WGL symbols in one lib - opengl32.lib
- SET(OpenGL_LIBRARIES opengl32)
- set(OpenGL_DEFINITIONS "-DDESKTOP_GL")
-
- MARK_AS_ADVANCED(
- OpenGL_INCLUDE_DIRS
- OpenGL_LIBRARIES
- OpenGL_DEFINITIONS
- )
-
- SET(OpenGL_FOUND TRUE)
-
-ELSEIF(CMAKE_SYSTEM_NAME MATCHES "Linux")
-
- # we always use the Khronos reference headers
- SET(OpenGL_INCLUDE_DIRS
- ${ramses-sdk_SOURCE_DIR}/external/khronos
- )
-
- # only check, if systems has GLESv3 headers, if yes we
- # assume the system is GLESv3 enabled.
- # we still use the included khronos GLESv3 headers.
- FIND_PATH(GLESv3_INCLUDE_DIRS_IN_SYSROOT GLES3/gl3.h
- /usr/include
- )
-
- # GL ES 3 is implemented in GLESv2 (in mesa)
- FIND_LIBRARY(OpenGL_LIBRARIES
- NAMES GLESv2
- PATHS
- )
-
- IF(OpenGL_LIBRARIES AND GLESv3_INCLUDE_DIRS_IN_SYSROOT)
- SET(OpenGL_FOUND TRUE)
- ENDIF()
-
- MARK_AS_ADVANCED(
- OpenGL_INCLUDE_DIRS
- OpenGL_LIBRARIES
- )
-
-ELSEIF(CMAKE_SYSTEM_NAME MATCHES "Android")
-
- # only check, if systems has GLESv3 headers, if yes we
- # assume the system is GLESv3 enabled.
- # we still use the included khronos GLESv3 headers.
- FIND_PATH(OpenGL_INCLUDE_DIRS_IN_SYSROOT GLES3/gl3.h
- /usr/include
- )
-
- FIND_LIBRARY(OpenGL_LIBRARIES
- NAMES GLESv3
- PATHS
- )
-
- IF(OpenGL_LIBRARIES AND OpenGL_INCLUDE_DIRS_IN_SYSROOT)
- SET(OpenGL_FOUND TRUE)
- ENDIF()
-
- MARK_AS_ADVANCED(
- OpenGL_INCLUDE_DIRS
- OpenGL_LIBRARIES
- )
-
-ENDIF()
+find_path(GLES3_INCLUDE_DIRS GLES3/gl3.h
+ PATHS
+ /usr/include
+)
+
+find_library(GLES3_LIBRARIES
+ NAMES GLESv3 GLESv2
+)
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(OpenGL DEFAULT_MSG GLES3_LIBRARIES GLES3_INCLUDE_DIRS)
+
+if (OpenGL_FOUND)
+ add_library(OpenGL::GLES3 UNKNOWN IMPORTED)
+ set_target_properties(OpenGL::GLES3 PROPERTIES
+ INTERFACE_INCLUDE_DIRECTORIES "${GLES3_INCLUDE_DIRS}"
+ IMPORTED_LOCATION "${GLES3_LIBRARIES}"
+ )
+
+ mark_as_advanced(
+ GLES3_INCLUDE_DIRS
+ GLES3_LIBRARIES
+ )
+endif()
diff --git a/cmake/ramses/platformConfig.cmake b/cmake/ramses/platformConfig.cmake
index 1e3ab2ee9..e960f6717 100644
--- a/cmake/ramses/platformConfig.cmake
+++ b/cmake/ramses/platformConfig.cmake
@@ -74,7 +74,7 @@ endif()
# gcc specific
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
# optimize for debuggability
- addFlags(RAMSES_DEBUG_FLAGS "-Og")
+ addFlags(RAMSES_DEBUG_FLAGS "-O0")
# remap GOT readonly after resolving
addFlags(RAMSES_C_CXX_FLAGS "-Wl,-z,relro,-z,now")
diff --git a/examples/ramses-example-local-scene-referencing/CMakeLists.txt b/cmake/toolchain/Linux_X86_64_clang15.toolchain
similarity index 64%
rename from examples/ramses-example-local-scene-referencing/CMakeLists.txt
rename to cmake/toolchain/Linux_X86_64_clang15.toolchain
index 5c85db2d2..06a4e389c 100644
--- a/examples/ramses-example-local-scene-referencing/CMakeLists.txt
+++ b/cmake/toolchain/Linux_X86_64_clang15.toolchain
@@ -1,15 +1,13 @@
# -------------------------------------------------------------------------
-# Copyright (C) 2020 BMW AG
+# Copyright (C) 2024 BMW AG
# -------------------------------------------------------------------------
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
# -------------------------------------------------------------------------
-createModule(
- NAME ramses-example-local-scene-referencing
- TYPE BINARY
- ENABLE_INSTALL ON
- SRC_FILES src/*
- DEPENDENCIES ramses-shared-lib
-)
+SET(CMAKE_C_COMPILER clang-15)
+SET(CMAKE_CXX_COMPILER clang++-15)
+
+SET(CMAKE_C_FLAGS "-m64 -fdiagnostics-color" CACHE STRING "")
+SET(CMAKE_CXX_FLAGS "-m64 -fdiagnostics-color" CACHE STRING "")
diff --git a/doc/sphinx/_static/style.css b/doc/sphinx/_static/style.css
new file mode 100644
index 000000000..1f1b6c4f9
--- /dev/null
+++ b/doc/sphinx/_static/style.css
@@ -0,0 +1,13 @@
+/*
+ -------------------------------------------------------------------------
+ Copyright (C) 2024 BMW AG
+ -------------------------------------------------------------------------
+ This Source Code Form is subject to the terms of the Mozilla Public
+ License, v. 2.0. If a copy of the MPL was not distributed with this
+ file, You can obtain one at https://mozilla.org/MPL/2.0/.
+ -------------------------------------------------------------------------
+*/
+
+.wy-nav-content {
+ max-width: none;
+}
diff --git a/doc/sphinx/_templates/layout.html b/doc/sphinx/_templates/layout.html
new file mode 100644
index 000000000..dd5570fc6
--- /dev/null
+++ b/doc/sphinx/_templates/layout.html
@@ -0,0 +1,13 @@
+
+{% extends "!layout.html" %}
+{% block extrahead %}
+
+{% endblock %}
diff --git a/doc/sphinx/build.rst b/doc/sphinx/build.rst
index eae96ff12..5c87f1065 100644
--- a/doc/sphinx/build.rst
+++ b/doc/sphinx/build.rst
@@ -133,11 +133,6 @@ Supported window types can be controlled with the cmake options below:
You can use the following options to disable some of the Ramses features:
-* -Dramses-sdk_ENABLE_LOGIC
- * options: ON/OFF
- * default: ON
- * Enables the logic subsystem of ramses alongside its dependencies (Lua, Sol, ...).
-
* -Dramses-sdk_TEXT_SUPPORT
* options: ON/OFF
* default: ON
diff --git a/doc/sphinx/core.rst b/doc/sphinx/core.rst
index de8fdafe3..55a22baa7 100644
--- a/doc/sphinx/core.rst
+++ b/doc/sphinx/core.rst
@@ -613,12 +613,6 @@ this in most cases means to render the scene(s) assigned to an offscreen buffer
the consumer scene using the contents of the offscreen buffer.
-^^^^^^^^^^^^^^^^^^^^^^
-ContentExpiration
-^^^^^^^^^^^^^^^^^^^^^^
-
-.. TODO
-
------------------------
The Daemon component
------------------------
diff --git a/doc/sphinx/index.rst b/doc/sphinx/index.rst
index eec65b74e..806458fd4 100644
--- a/doc/sphinx/index.rst
+++ b/doc/sphinx/index.rst
@@ -47,6 +47,12 @@ Ramses documentation
viewer
+.. toctree::
+ :maxdepth: 3
+ :caption: Performance and Profiling
+
+ profiling
+
.. toctree::
:maxdepth: 3
:caption: Class Index
diff --git a/doc/sphinx/profiling.rst b/doc/sphinx/profiling.rst
new file mode 100644
index 000000000..51b22a0f8
--- /dev/null
+++ b/doc/sphinx/profiling.rst
@@ -0,0 +1,253 @@
+..
+ -------------------------------------------------------------------------
+ Copyright (C) 2024 BMW AG
+ -------------------------------------------------------------------------
+ This Source Code Form is subject to the terms of the Mozilla Public
+ License, v. 2.0. If a copy of the MPL was not distributed with this
+ file, You can obtain one at https://mozilla.org/MPL/2.0/.
+ -------------------------------------------------------------------------
+
+=========================================================
+Performance and Profiling
+=========================================================
+
+There are multiple ways to find bottlenecks in your assets, your code using Ramses, or Ramses itself.
+
+
+=========================================================
+Inspecting the contents of your scene and optimizing it
+=========================================================
+
+The first source of performance problems in a 3D application is usually the content. Having large textures or geometry,
+heavy shaders, or simply rendering suboptimally - those are all things that can be easily solved in the content/scene directly
+by a skilled technical artist.
+
+Ramses provides a tool to perform such analysis, called the ramses scene viewer (see its documentation in :ref:`ramses-viewer `).
+
+=========================================================
+Looking at the Ramses periodic performance logs
+=========================================================
+
+A great source of information about what's going on in the Ramses threads (specifically when having network involved) are
+the ramses periodic logs (RPER). See below how
+to read and use these logs.
+
+--------------------------------------------------------
+General periodic logs
+--------------------------------------------------------
+
+Any Ramses application (regardless if it has a client, a renderer, or both) has a periodic log whichs looks like this:
+
+.. code-block:: text
+
+ 20240311-18:10:14.378 | Info | RPER | R.PerLogger: Version: 28.0.0 Hash:bfadebe40e Commit:40378 Type:RelWithDebInfo Env:(unknown) SyncT:1710177014378ms (dtSteady:2001 - dtSync:2001 -> 0) PUp:2002 RUp:2002 RInit:1 RParallel:1
+ 20240311-18:10:14.378 | Info | RPER | R.TCP_ConnSys: Connected Participant(s): 8649-E0139E8AE986;
+
+
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+Line-by-line explanation of the logs
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+First line:
+ * Version: Ramses version
+ * Hash: Commit hash
+ * Commit: Commit Count
+ * Type: Build type (e.g. Debug)
+ * Env: Build environment version
+ * SyncT: Current time (ms) from synchronized clock
+ * (dtSteady - dtSync -> DIFF)
+
+ * dtSteady: difference between current time and previous time from steady clock
+ * dtSync: difference between current time and previous time from synchronized clock
+ * DIFF: Difference between dtSteady and dtSync
+
+ * PUp: Uptime since process started
+ * RUp: Uptime since ramses started
+ * RInit: 1 instance of ramses initialized (framework)
+ * RParallel: 1 instance of ramses running now
+
+
+
+Second line:
+ * Participants connected to this instance of ramses
+
+
+--------------------------------------------------------
+Client periodic logs
+--------------------------------------------------------
+
+A Ramses client typically reports logs like this:
+
+.. code-block:: text
+
+ 20240311-18:10:14.378 | Info | RPER | R.PerLogger: Client: 1 scene(s): 123 Published
+ 20240311-18:10:14.378 | Info | RPER | R.PerLogger: msgIn (3/5/4) msgO (0/1/0) res+ (0/5/2) res- (0) resNr (5) resF (0) resFS (0)
+ 20240311-18:10:14.378 | Info | RPER | R.PerLogger: scene: 123 flush (0/1/0) obj+ (0/12/6) obj- (0) objNr (12) actG (0/46/23) actGS (0/878/439) actO (0) actSkp (0) suG (0) suGS (0) suX (0/0) ar# (0/3/1) aras (0/30/15) arms (0/48/24) er# (0/1/0) eras (0/385/192) erms (0/385/192) tr# (0/1/0) tras (0/1048576/524288) trms (0/1048576/524288)
+
+
+^^^^^^^^^^^^^^^^^^^^^^
+General Explanation
+^^^^^^^^^^^^^^^^^^^^^^
+
+The client-side periodic logger collects the stats values (flush, obj+, etc) every second. However the time interval
+for logging output is configurable and by default set to 2 seconds.
+
+The collected values are printed in two fashions depending on the stat value:
+ * `suX` lists the largest collected values of the last logging period (value1, value2, ..., valueN)
+ * For all other stats there are typically 3 values printed (min/max/avg):
+
+ * min: the smallest value that was collected since the last log output
+ * max: the largest value that was collected since the last log output
+ * avg: the average of all collected values since the last log output: ((value1 + value2 + ..valueN) / n)
+
+If the smallest and the largest value are equal (min == max), only 1 value will be printed: (value)
+
++--------------------------------+------------------+-----------+
+| | Example 1 | Example 2 |
++================================+==================+===========+
+| Logging output time interval | 4 seconds | 2 seconds |
++--------------------------------+------------------+-----------+
+| Number of values collected | 4 | 2 |
++--------------------------------+------------------+-----------+
+| Values collected in the logger | `20, 25, 21, 55` | `42, 42` |
++--------------------------------+------------------+-----------+
+| Values printed in logs | `(20/55/30)` | `(42)` |
++--------------------------------+------------------+-----------+
+
+
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+Line-by-line explanation of client logs
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+First line:
+ * Client participant id
+ * List of scenes owned by the client and their status
+
+
+Second line (General client performance stats):
+ * msgIn: Number of messages received
+ * msgO: Number of message sent
+ * res+: Client Resources created
+ * res-: Client Resources destroyed
+ * resNr: Client Resource Count
+ * resF: Number of Client Resources loaded from File
+ * resFS: Size of Client Resources loaded from file
+
+
+Third line and over (Scene related stats):
+ * scene: scene id
+ * flush: Number of flushes triggered per second
+ * obj+: Number of scene objects created (ramses::SceneObject) per second
+ * obj-: Number of scene objects destroyed (ramses::SceneObject) per second
+ * objNr: Number of currently existing scene objects (ramses::SceneObject)
+ * actG: Number of scene actions generated per second
+ * actGS: Size of scene actions generated per second
+ * actO: Number of scene actions sent to renderer(s) per second (will be counted for each scene subscriber)
+ * actSkp: Number of skipped scene actions per second (usually an optimization to avoid empty updates)
+ * suG: Scene updates generated per second. Number of scene update packages generated for network send (might be more than # of sceneupdates)
+ * suGS: Scene update generated size per second. Accumulated size of scene update packages generated for network send
+ * suX: Shows the n largest scene updated packets in the logging interval (to identify peaks in network load)
+ * ar#: Number of currently used array resources
+ * aras: Average size of a single array resource ((totalSize of currently used array resources) / ar#)
+ * arms: Largest currently used array resource
+ * er#: Number of currently used Effects
+ * eras: Average size of a single effect resource ((totalSize of currently used effects) / er#)
+ * erms: Largest currently used effect resource
+ * tr#: Number of currently used texture resources
+ * tras: Average size of a single texture resource ((totalSize of currently used textures) / tr#)
+ * trms: Largest currently used texture resource
+
+
+.. warning::
+ Some stats describe changes/deltas to the scene: flush, obj+, obj-, act*, su*; others describe a snapshot of the current scene state: objNr, ar*, er* tr*.
+ Resource stats (ar*,er*, tr*) are only logged if there was a flush during the logging interval.
+
+
+--------------------------------------------------------
+Renderer periodic logs
+--------------------------------------------------------
+
+A Ramses application which also contains a renderer component has periodic logs which look like this:
+
+.. code-block:: text
+
+ 20240311-16:33:23.008 | Info | RPER | R.DispThrd0: Display: threaded=true dispThreadsRunning=true loopMode=UpdAndRnd targetFPS=60 skub=true
+ 2 scene(s): 123 Rendered 124 Rendered
+ Avg framerate: 21.775545 FPS [minFrameTime 9431us, maxFrameTime 35222us], drawCalls (0/4/1), numFrames 13, resUploaded 11 (2160319 B), RC VRAM usage/cache (2/0 MB)
+ FB: 7
+ Scene 123: rendered 4, framesFArrived 2, framesFApplied 2, framesFBlocked 0, maxFramesWithNoFApplied 5, maxFramesFBlocked 0, FArrived 2, FApplied 2, actions/F (4/96/50), dt/F (13/766/389.5), RC+/F (0/2/1), RC-/F (0/0/0), RS/F (0/1/0.5), RSUploaded 1 (1024 B)
+ Scene 124: rendered 3, framesFArrived 3, framesFApplied 2, framesFBlocked 1, maxFramesWithNoFApplied 7, maxFramesFBlocked 1, FArrived 3, FApplied 3, actions/F (44/72/56.666668), dt/F (12/33/24.666666), RC+/F (0/6/3), RC-/F (0/0/0), RS/F (0/0/0)
+
+ Time budgets: sceneResourceUpload 315360000000000us resourceUpload 315360000000000us obRender 315360000000000us
+ Longest frame(us)[avg]:229046 RendererCommands:205638 [15529] UpdateClientResources:13 [767] ApplySceneActions:1 [101] UpdateSceneResources:1 [4] UpdateEmbeddedCompositingResources:7 [3] UpdateStreamTextures:1 [0] UpdateScenesToBeMapped:6 [604] UpdateResourceCache:1 [47] UpdateTransformations:5 [12] UpdateDataLinks:13 [13] HandleDisplayEvents:42 [63] DrawScenes:21792 [1802] SwapBuffersNotifyClients:1526 [329] MaxFramerateSleep:0 [8714]
+
+
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+Line-by-line explanation of renderer logs
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+First line:
+ * Whether display threaded
+ * Whether display thread running
+ * Renderer Loop Mode ( `UpdateAndRender` or `UpdateOnly` )
+ * Target FPS
+ * Whether unmodified scenes skipped
+
+Second line:
+ * Renderer participant id
+ * List of scenes known to renderer and status
+
+Third line (General renderer performance stats):
+ * Number of frames per second
+ * minimal and maximal frame time within time period
+ * drawcalls per frame
+ * Number of frames rendered in time period
+ * resources uploaded in time period
+ * Size of the uploaded client resources / Cache Size of GPU (in MB)
+
+Fourth line and over (Scene-related stats):
+ * Scene id
+ * rendered: Number of frames rendered
+ * FrameFArrived: Number of frames where flushes arrived
+ * FramesFApplied: Number of frames where flushes applied
+ * FrameFBlocked: Number of frames where applying a flush was blocked
+ * maxFramesWithNoFApplied: How many consecutive frame there was no flush applied
+ * maxFramesFBlocked: How many consecutive frames flushes were blocked from applying
+ * FArrived: Number of flushes arrived
+ * FApplied: Number of flushes applied
+ * actions/F: number of scene actions per flush
+ * dt/F: flush latency
+ * RC+/F RC-/F: Number of client resources added/removed per flush
+ * RS/F: Number of scene resource actions per flush
+ * RSUploaded: Size of scene resources uploaded
+
+Second-last line (Time budgets):
+ * Information about how much time per frame an action may take as a maximum, set by application
+
+Last line (Advanced stats):
+ * Longest Frame: How long did the longest frame take to render altogether
+ * Rest: Advanced stats for profiling renderer which need internal understanding of the Ramses renderer.
+
+.. note::
+ RC stands for client resources - legacy name for immutable/static resources - textures, static geometry buffers, shaders
+
+ RS stands for scene resources - legacy name for dynamic resources - render buffers/targets and dynamic geometry buffers
+
+
+=====================================================
+Using specialized tools
+=====================================================
+
+If the above methods didn't yield the results you expected, or you still think your application can perform better,
+you can also use some of the professional tools for profiling:
+
+ * NVidia NSight - a great tool by NVidia which can analyze any OpenGL-based application. Limitation: requires an NVidia graphics card.
+ * Standard profilers like the MSVC Profiler or gprof - great for finding CPU bottlenecks or memory attrition issues.
+ * Android Profiler - a great all-round tool for finding issues, also in native libs such as Ramses. Works only on Android.
+
+
+--------------------------------------------------------
+Logic Update Cycle Profiling
+--------------------------------------------------------
+
+The SDK also provides basic measuring. Please see :ref:`Logic API/Performance ` for details.
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index 7c68b22c8..6634cad3a 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -20,11 +20,12 @@ add_subdirectory(ramses-example-data-buffers-vertices)
add_subdirectory(ramses-example-data-buffers-texture)
add_subdirectory(ramses-example-geometry-instancing)
add_subdirectory(ramses-example-renderonce)
+add_subdirectory(ramses-example-interleaved-vertex-buffers)
+
if(ramses-sdk_TEXT_SUPPORT)
add_subdirectory(ramses-example-text-basic)
add_subdirectory(ramses-example-text-languages)
endif()
-add_subdirectory(ramses-example-interleaved-vertex-buffers)
if(ramses-sdk_BUILD_FULL_SHARED_LIB)
add_subdirectory(ramses-example-local-client)
@@ -34,11 +35,9 @@ if(ramses-sdk_BUILD_FULL_SHARED_LIB)
add_subdirectory(ramses-example-local-dma-offscreenbuffer)
add_subdirectory(ramses-example-local-viewport-link)
add_subdirectory(ramses-example-local-pick-handling)
- add_subdirectory(ramses-example-local-scene-referencing)
add_subdirectory(ramses-example-local-geometry-shaders)
add_subdirectory(ramses-example-local-compositing)
+ add_subdirectory(ramses-example-local-scene-merge)
endif()
-if(ramses-sdk_ENABLE_LOGIC)
- add_subdirectory(logic)
-endif()
+add_subdirectory(logic)
diff --git a/examples/ramses-example-local-client/res/ramses-local-client-test.frag b/examples/ramses-example-local-client/res/ramses-local-client-test.frag
index 21f831cc3..50cdd8b2e 100644
--- a/examples/ramses-example-local-client/res/ramses-local-client-test.frag
+++ b/examples/ramses-example-local-client/res/ramses-local-client-test.frag
@@ -6,10 +6,14 @@
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
// -------------------------------------------------------------------------
-#version 100
+#version 310 es
+
+precision highp float;
+uniform vec4 color;
+
+out vec4 fragColor;
-uniform highp vec4 color;
void main(void)
{
- gl_FragColor = color + vec4(0.1);
+ fragColor = color + vec4(0.1);
}
diff --git a/examples/ramses-example-local-client/res/ramses-local-client-test.vert b/examples/ramses-example-local-client/res/ramses-local-client-test.vert
index d36728575..16ca010d9 100644
--- a/examples/ramses-example-local-client/res/ramses-local-client-test.vert
+++ b/examples/ramses-example-local-client/res/ramses-local-client-test.vert
@@ -6,13 +6,20 @@
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
// -------------------------------------------------------------------------
-#version 100
+#version 310 es
-uniform highp mat4 mvpMatrix;
+precision highp float;
-attribute vec3 a_position;
+layout(std140,binding=1) uniform modelCameraBlock_t
+{
+ mat4 mvpMatrix;
+ mat4 mvMatrix;
+ mat4 normalMatrix;
+} modelCameraBlock;
+
+in vec3 a_position;
void main()
{
- gl_Position = mvpMatrix * vec4(a_position, 1.0);
+ gl_Position = modelCameraBlock.mvpMatrix * vec4(a_position, 1.0);
}
diff --git a/examples/ramses-example-local-client/src/main.cpp b/examples/ramses-example-local-client/src/main.cpp
index 9a863a076..1ed85ecab 100644
--- a/examples/ramses-example-local-client/src/main.cpp
+++ b/examples/ramses-example-local-client/src/main.cpp
@@ -81,7 +81,8 @@ int main()
ramses::EffectDescription effectDesc;
effectDesc.setVertexShaderFromFile("res/ramses-local-client-test.vert");
effectDesc.setFragmentShaderFromFile("res/ramses-local-client-test.frag");
- effectDesc.setUniformSemantic("mvpMatrix", ramses::EEffectUniformSemantic::ModelViewProjectionMatrix);
+ // tell Ramses that the shader uniform block is meant to be automatically filled with model/camera matrices
+ effectDesc.setUniformSemantic("modelCameraBlock", ramses::EEffectUniformSemantic::ModelCameraBlock);
ramses::Effect* effect = clientScene->createEffect(effectDesc, "glsl shader");
ramses::Appearance* appearance = clientScene->createAppearance(*effect, "triangle appearance");
@@ -124,5 +125,7 @@ int main()
meshNode->setRotation(glm::mix(q1, q2, factor));
clientScene->flush();
if (factor >= 1.f || factor <= 0.f) step = -step;
+
+ renderer.dispatchEvents(eventHandler);
}
}
diff --git a/examples/ramses-example-local-scene-merge/CMakeLists.txt b/examples/ramses-example-local-scene-merge/CMakeLists.txt
new file mode 100644
index 000000000..23d729972
--- /dev/null
+++ b/examples/ramses-example-local-scene-merge/CMakeLists.txt
@@ -0,0 +1,17 @@
+# -------------------------------------------------------------------------
+# Copyright (C) 2018 BMW Car IT GmbH
+# -------------------------------------------------------------------------
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at https://mozilla.org/MPL/2.0/.
+# -------------------------------------------------------------------------
+
+createModule(
+ NAME ramses-example-local-scene-merge
+ TYPE BINARY
+ ENABLE_INSTALL ON
+ SRC_FILES include/*.h
+ src/*.cpp
+ RESOURCE_FOLDERS res
+ DEPENDENCIES ramses-shared-lib
+)
diff --git a/examples/ramses-example-local-scene-merge/res/ramses-example-local-scene-merge-texture-inverted.png b/examples/ramses-example-local-scene-merge/res/ramses-example-local-scene-merge-texture-inverted.png
new file mode 100644
index 000000000..9efd252c9
Binary files /dev/null and b/examples/ramses-example-local-scene-merge/res/ramses-example-local-scene-merge-texture-inverted.png differ
diff --git a/examples/ramses-example-local-scene-merge/res/ramses-example-local-scene-merge-texture.png b/examples/ramses-example-local-scene-merge/res/ramses-example-local-scene-merge-texture.png
new file mode 100644
index 000000000..e7ad227ed
Binary files /dev/null and b/examples/ramses-example-local-scene-merge/res/ramses-example-local-scene-merge-texture.png differ
diff --git a/examples/ramses-example-local-scene-merge/res/ramses-example-local-scene-merge-texturing.frag b/examples/ramses-example-local-scene-merge/res/ramses-example-local-scene-merge-texturing.frag
new file mode 100644
index 000000000..367be321d
--- /dev/null
+++ b/examples/ramses-example-local-scene-merge/res/ramses-example-local-scene-merge-texturing.frag
@@ -0,0 +1,26 @@
+// -------------------------------------------------------------------------
+// Copyright (C) 2024 BMW AG
+// -------------------------------------------------------------------------
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this
+// file, You can obtain one at https://mozilla.org/MPL/2.0/.
+// -------------------------------------------------------------------------
+
+#version 310 es
+
+precision highp float;
+
+uniform sampler2D textureSampler;
+
+layout(std140,binding=1) uniform ub_t
+{
+ highp vec4 color;
+} uniformBlock;
+
+in lowp vec2 v_texcoord;
+out vec4 fragColor;
+
+void main(void)
+{
+ fragColor = uniformBlock.color * texture(textureSampler, v_texcoord);
+}
diff --git a/examples/ramses-example-local-scene-merge/res/ramses-example-local-scene-merge-texturing.vert b/examples/ramses-example-local-scene-merge/res/ramses-example-local-scene-merge-texturing.vert
new file mode 100644
index 000000000..76426cf27
--- /dev/null
+++ b/examples/ramses-example-local-scene-merge/res/ramses-example-local-scene-merge-texturing.vert
@@ -0,0 +1,24 @@
+// -------------------------------------------------------------------------
+// Copyright (C) 2024 BMW AG
+// -------------------------------------------------------------------------
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this
+// file, You can obtain one at https://mozilla.org/MPL/2.0/.
+// -------------------------------------------------------------------------
+
+#version 310 es
+
+precision highp float;
+
+uniform highp mat4 mvpMatrix;
+
+in vec3 a_position;
+in vec2 a_texcoord;
+
+out vec2 v_texcoord;
+
+void main()
+{
+ gl_Position = mvpMatrix * vec4(a_position, 1.0);
+ v_texcoord = a_texcoord;
+}
diff --git a/examples/ramses-example-local-scene-merge/src/main.cpp b/examples/ramses-example-local-scene-merge/src/main.cpp
new file mode 100644
index 000000000..3172beecf
--- /dev/null
+++ b/examples/ramses-example-local-scene-merge/src/main.cpp
@@ -0,0 +1,312 @@
+// -------------------------------------------------------------------------
+// Copyright (C) 2024 BMW AG
+// -------------------------------------------------------------------------
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this
+// file, You can obtain one at https://mozilla.org/MPL/2.0/.
+// -------------------------------------------------------------------------
+
+#include "ramses/framework/EFeatureLevel.h"
+#include "ramses/framework/DataTypes.h"
+#include "ramses/framework/RamsesFrameworkTypes.h"
+#include "ramses/framework/RamsesObjectTypes.h"
+#include "ramses/client/ramses-client.h"
+#include "ramses/client/ramses-utils.h"
+#include "ramses/client/Node.h"
+#include "ramses/client/RenderPass.h"
+#include "ramses/client/RenderTarget.h"
+#include "ramses/client/SceneObjectIterator.h"
+#include "ramses/client/logic/AppearanceBinding.h"
+#include "ramses/client/logic/LogicEngine.h"
+#include "ramses/client/logic/NodeBinding.h"
+#include "ramses/client/logic/LuaScript.h"
+#include "ramses/client/logic/LuaInterface.h"
+#include "ramses/client/logic/Property.h"
+#include "ramses/renderer/RamsesRenderer.h"
+#include "ramses/renderer/IRendererEventHandler.h"
+#include "ramses/renderer/IRendererSceneControlEventHandler.h"
+#include "ramses/renderer/DisplayConfig.h"
+#include "ramses/renderer/RendererConfig.h"
+#include "ramses/renderer/RendererSceneControl.h"
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+
+const ramses::sceneId_t SCENE_ID{123};
+constexpr int SCENE_COUNT = 3;
+const std::array FILE_NAMES{"tempfileA.ramses", "tempfileB.ramses", "tempfileC.ramses"};
+const std::array COLORS{ramses::vec4f{1.0f, 0.0f, 0.0f, 1.0f}, ramses::vec4f{0.0f, 1.0f, 0.0f, 1.0f}, ramses::vec4f{0.0f, 0.0f, 1.0f, 1.0f}};
+const std::array TRANSLATIONS{ramses::vec3f{-1.0f, 0.0f, 0.0f}, ramses::vec3f{1.0f, 0.0f, 0.0f}, ramses::vec3f{0.0f, 0.0f, 0.0f}};
+const std::array ROTATIONS{45.0f, -20.0f, 5.0f};
+const std::chrono::seconds DELAY{5};
+
+
+bool createScene(int sceneNumber);
+bool mergeScenes(const std::vector& files);
+
+
+class RendererEventHandler : public ramses::RendererEventHandlerEmpty
+{
+public:
+ void windowClosed(ramses::displayId_t /*displayId*/) override
+ {
+ m_windowClosed = true;
+ }
+
+ [[nodiscard]] bool isWindowClosed() const
+ {
+ return m_windowClosed;
+ }
+
+private:
+ bool m_windowClosed = false;
+};
+
+
+/**
+ * @example ramses-example-local-scene-merge/src/main.cpp
+ * @brief Scene Merging Example
+ */
+int main()
+{
+ std::vector fileNames;
+
+ for (int i = 0; i < SCENE_COUNT; ++i)
+ {
+ if (!createScene(i))
+ {
+ return EXIT_FAILURE;
+ }
+ fileNames.push_back(FILE_NAMES[i]);
+ }
+
+ if (!mergeScenes(fileNames))
+ {
+ return EXIT_FAILURE;
+ }
+
+ return EXIT_SUCCESS;
+}
+
+std::string generateName(std::string const & str, int sceneNumber)
+{
+ return str + "_" + std::to_string(sceneNumber);
+}
+
+bool createScene(int sceneNumber)
+{
+ constexpr uint32_t width = 1280u;
+ constexpr uint32_t height = 480u;
+ ramses::RamsesFrameworkConfig config{ramses::EFeatureLevel_Latest};
+ config.setLogLevelConsole(ramses::ELogLevel::Trace);
+ config.setLoggingInstanceName(generateName("Scene", sceneNumber));
+ ramses::RamsesFramework framework(config);
+ ramses::RamsesClient& ramses(*framework.createClient("ramses-example-local-scene-merge"));
+ const ramses::SceneConfig sceneConfig(SCENE_ID);
+ ramses::Scene* scene = ramses.createScene(sceneConfig, "scene merging from file");
+
+ // every scene needs a render pass with camera
+ auto* camera = scene->createPerspectiveCamera(generateName("my camera", sceneNumber));
+ camera->setViewport(0, 0, 1280u, 480u);
+ camera->setFrustum(19.f, 1280.f / 480.f, 0.1f, 1500.f);
+ camera->setTranslation({0.0f, 0.0f, 5.0f});
+ ramses::RenderPass* renderPass = scene->createRenderPass(generateName("my render pass", sceneNumber));
+ renderPass->setClearFlags(ramses::EClearFlag::None);
+ renderPass->setCamera(*camera);
+ ramses::RenderGroup* renderGroup = scene->createRenderGroup(generateName("group", sceneNumber));
+ renderPass->addRenderGroup(*renderGroup);
+
+ const std::array vertexPositionsArray{ ramses::vec3f{-0.5f, -0.5f, -1.f}, ramses::vec3f{0.5f, -0.5f, -1.f}, ramses::vec3f{-0.5f, 0.5f, -1.f}, ramses::vec3f{0.5f, 0.5f, -1.f} };
+ ramses::ArrayResource* vertexPositions = scene->createArrayResource(4u, vertexPositionsArray.data());
+
+ const std::array textureCoordsArray{ ramses::vec2f{0.f, 1.f}, ramses::vec2f{1.f, 1.f}, ramses::vec2f{0.f, 0.f}, ramses::vec2f{1.f, 0.f} };
+ ramses::ArrayResource* textureCoords = scene->createArrayResource(4u, textureCoordsArray.data());
+
+ const std::array indicesArray{ 0, 1, 2, 2, 1, 3 };
+ ramses::ArrayResource* indices = scene->createArrayResource(6u, indicesArray.data());
+
+ char const * const fileNameTexture = "res/ramses-example-local-scene-merge-texture.png";
+ char const * const fileNameTextureInverted = "res/ramses-example-local-scene-merge-texture-inverted.png";
+
+ ramses::Texture2D* texture = ramses::RamsesUtils::CreateTextureResourceFromPng(sceneNumber == 0 ? fileNameTexture : fileNameTextureInverted, *scene);
+ ramses::TextureSampler* sampler = scene->createTextureSampler(
+ ramses::ETextureAddressMode::Repeat,
+ ramses::ETextureAddressMode::Repeat,
+ ramses::ETextureSamplingMethod::Linear,
+ ramses::ETextureSamplingMethod::Linear,
+ *texture);
+
+ ramses::EffectDescription effectDesc;
+ effectDesc.setVertexShaderFromFile("res/ramses-example-local-scene-merge-texturing.vert");
+ effectDesc.setFragmentShaderFromFile("res/ramses-example-local-scene-merge-texturing.frag");
+ effectDesc.setUniformSemantic("mvpMatrix", ramses::EEffectUniformSemantic::ModelViewProjectionMatrix);
+
+ ramses::Effect* effectTex = scene->createEffect(effectDesc, generateName("glsl shader", sceneNumber));
+
+ ramses::Appearance* appearance = scene->createAppearance(*effectTex, generateName("triangle appearance", sceneNumber));
+ auto colorUniform = effectTex->findUniformInput("uniformBlock.color");
+ appearance->setInputValue(colorUniform.value(), ramses::vec4f{1.0f, 1.0f, 0.0f, 1.0f});
+
+ ramses::Geometry* geometry = scene->createGeometry(*effectTex, generateName("triangle geometry", sceneNumber));
+
+ geometry->setIndices(*indices);
+ std::optional positionsInput = effectTex->findAttributeInput("a_position");
+ std::optional texcoordsInput = effectTex->findAttributeInput("a_texcoord");
+ std::optional textureInput = effectTex->findUniformInput("textureSampler");
+ assert(positionsInput.has_value() && texcoordsInput.has_value() && textureInput.has_value());
+ geometry->setInputBuffer(*positionsInput, *vertexPositions);
+ geometry->setInputBuffer(*texcoordsInput, *textureCoords);
+ appearance->setInputTexture(*textureInput, *sampler);
+
+ ramses::Node* scaleNode = scene->createNode(generateName("scale node", sceneNumber));
+ scaleNode->setScaling({2.0f, 2.0f, 2.0f});
+
+ ramses::MeshNode* meshNode = scene->createMeshNode(generateName("textured triangle mesh node", sceneNumber));
+ meshNode->setAppearance(*appearance);
+ meshNode->setGeometry(*geometry);
+
+ meshNode->setTranslation(TRANSLATIONS[sceneNumber]);
+ // mesh needs to be added to a render group that belongs to a render pass with camera in order to be rendered
+ renderGroup->addMeshNode(*meshNode);
+
+ scaleNode->addChild(*meshNode);
+
+ scene->flush();
+
+ // create logic engine that sets the rotation of the meshes
+ ramses::LogicEngine& logicEngine{ *scene->createLogicEngine(generateName("example logic", sceneNumber))};
+ ramses::NodeBinding* nodeBinding = logicEngine.createNodeBinding(*meshNode, ramses::ERotationType::Euler_XYZ, "link to node");
+
+ auto* appearanceBinding = logicEngine.createAppearanceBinding(*appearance, generateName("appearance binding", sceneNumber));
+
+ ramses::LuaScript* simpleScript = logicEngine.createLuaScript(R"(
+ function interface(IN,OUT)
+ IN.rotationZ = Type:Float()
+ OUT.rotationZ = Type:Vec3f()
+ end
+
+ function run(IN,OUT)
+ -- Rotate around Z axis with 100 degrees per second
+ OUT.rotationZ = {0, 0, IN.rotationZ}
+ end
+ )", {}, "simple rotation script");
+
+ const std::string_view interfaceSrc = R"(
+ function interface(inout_params)
+ inout_params.rotationZ = Type:Float()
+ inout_params.color = Type:Vec4f()
+ end
+ )";
+
+ ramses::LuaInterface* intf = logicEngine.createLuaInterface(interfaceSrc, "Interface");
+ logicEngine.link(*simpleScript->getOutputs()->getChild("rotationZ"), *nodeBinding->getInputs()->getChild("rotation"));
+ logicEngine.link(
+ *intf->getOutputs()->getChild("rotationZ"),
+ *simpleScript->getInputs()->getChild("rotationZ"));
+
+ logicEngine.link(*intf->getOutputs()->getChild("color"), *appearanceBinding->getInputs()->getChild("uniformBlock.color"));
+
+ // Let's initialize the interface's input with some value
+ intf->getInputs()->getChild("rotationZ")->set(ROTATIONS[sceneNumber]);
+ intf->getInputs()->getChild("color")->set(COLORS[sceneNumber]);
+
+ /**
+ * Call update() before saving to ensure the ramses scene is in a state where all settings (in this case, the node's rotation)
+ * have been set once before saving
+ */
+ logicEngine.update();
+
+ bool result = scene->saveToFile(FILE_NAMES[sceneNumber], {});
+
+ ramses.destroy(*scene);
+
+ return result;
+}
+
+bool mergeScenes(const std::vector& files)
+{
+ if (files.empty())
+ {
+ return false;
+ }
+
+ ramses::EFeatureLevel featureLevel = ramses::EFeatureLevel_Latest;
+ if (!ramses::RamsesClient::GetFeatureLevelFromFile(files[0], featureLevel))
+ {
+ return false;
+ }
+
+ // load the saved file
+ ramses::RamsesFrameworkConfig config{featureLevel};
+ config.setRequestedRamsesShellType(ramses::ERamsesShellType::Console);
+ config.setLogLevel(ramses::ELogLevel::Info);
+ config.setPeriodicLogInterval(std::chrono::seconds(0));
+ config.setLoggingInstanceName("Merge");
+ ramses::RamsesFramework framework(config);
+ ramses::RamsesClient& ramses(*framework.createClient("ramses-example-local-scene-merge"));
+
+ ramses::RendererConfig rendererConfig;
+ ramses::RamsesRenderer& renderer(*framework.createRenderer(rendererConfig));
+ ramses::RendererSceneControl& sceneControlAPI = *renderer.getSceneControlAPI();
+ renderer.startThread();
+
+ ramses::DisplayConfig displayConfig;
+ const ramses::displayId_t display = renderer.createDisplay(displayConfig);
+ renderer.flush();
+
+ RendererEventHandler eventHandler;
+ ramses::RendererSceneControlEventHandlerEmpty sceneControlEventHandler;
+
+ ramses::Scene* loadedScene = nullptr;
+ for (size_t sceneIndex = 0; sceneIndex < files.size(); ++sceneIndex)
+ {
+ if (sceneIndex == 0)
+ {
+ // load scene from first file
+ loadedScene = ramses.loadSceneFromFile(files[0], ramses::SceneConfig(SCENE_ID, ramses::EScenePublicationMode::LocalOnly));
+ if (!loadedScene)
+ {
+ return false;
+ }
+
+ loadedScene->publish(ramses::EScenePublicationMode::LocalOnly);
+
+ // show the scene on the renderer
+ sceneControlAPI.setSceneMapping(SCENE_ID, display);
+ sceneControlAPI.setSceneState(SCENE_ID, ramses::RendererSceneState::Rendered);
+ sceneControlAPI.flush();
+ }
+ else
+ {
+ // merge the remaining files into the scene one by one
+ ramses.mergeSceneFromFile(*loadedScene, files[sceneIndex]);
+ loadedScene->flush();
+ }
+
+ const auto startTime = std::chrono::steady_clock::now();
+ while (!eventHandler.isWindowClosed() && (std::chrono::steady_clock::now() - startTime) < DELAY)
+ {
+ std::this_thread::sleep_for(std::chrono::milliseconds(16));
+ loadedScene->flush();
+ renderer.dispatchEvents(eventHandler);
+ sceneControlAPI.dispatchEvents(sceneControlEventHandler);
+ }
+ }
+
+ if (!loadedScene)
+ {
+ return false;
+ }
+
+ loadedScene->unpublish();
+ ramses.destroy(*loadedScene);
+
+ return true;
+}
diff --git a/examples/ramses-example-local-scene-referencing/src/main.cpp b/examples/ramses-example-local-scene-referencing/src/main.cpp
deleted file mode 100644
index 48f976574..000000000
--- a/examples/ramses-example-local-scene-referencing/src/main.cpp
+++ /dev/null
@@ -1,332 +0,0 @@
-// -------------------------------------------------------------------------
-// Copyright (C) 2020 BMW AG
-// -------------------------------------------------------------------------
-// This Source Code Form is subject to the terms of the Mozilla Public
-// License, v. 2.0. If a copy of the MPL was not distributed with this
-// file, You can obtain one at https://mozilla.org/MPL/2.0/.
-// -------------------------------------------------------------------------
-
-#include "ramses/client/ramses-client.h"
-
-#include "ramses/client/SceneReference.h"
-
-#include "ramses/renderer/RamsesRenderer.h"
-#include "ramses/renderer/IRendererEventHandler.h"
-#include "ramses/renderer/DisplayConfig.h"
-#include "ramses/renderer/RendererSceneControl.h"
-
-#include "ramses/client/ramses-utils.h"
-
-#include
-#include
-#include
-
-class RendererEventHandler : public ramses::RendererEventHandlerEmpty
-{
-public:
- void windowClosed(ramses::displayId_t /*displayId*/) override
- {
- m_windowClosed = true;
- }
-
- [[nodiscard]] bool isWindowClosed() const
- {
- return m_windowClosed;
- }
-
-private:
- bool m_windowClosed = false;
-};
-
-
-/** \cond HIDDEN_SYMBOLS */
-class SceneReferenceEventHandler final : public ramses::IClientEventHandler
-{
-public:
- explicit SceneReferenceEventHandler(ramses::RamsesClient& client)
- : m_client(client)
- {}
-
- void sceneFileLoadFailed(std::string_view /*filename*/) override {}
- void sceneFileLoadSucceeded(std::string_view /*filename*/, ramses::Scene* /*loadedScene*/) override {}
- void sceneReferenceFlushed(ramses::SceneReference& /*sceneRef*/, ramses::sceneVersionTag_t /*versionTag*/) override {}
- void dataLinked(ramses::sceneId_t /*providerScene*/, ramses::dataProviderId_t /*providerId*/, ramses::sceneId_t /*consumerScene*/, ramses::dataConsumerId_t /*consumerId*/, bool /*success*/) override {}
- void dataUnlinked(ramses::sceneId_t /*consumerScene*/, ramses::dataConsumerId_t /*consumerId*/, bool /*success*/) override {}
-
- void sceneReferenceStateChanged(ramses::SceneReference& sceneRef, ramses::RendererSceneState state) override
- {
- m_sceneRefState[sceneRef.getReferencedSceneId()] = state;
- }
-
- void waitForSceneRefState(ramses::sceneId_t sceneId, ramses::RendererSceneState state)
- {
- while (m_sceneRefState.count(sceneId) == 0 || m_sceneRefState.find(sceneId)->second != state)
- {
- ramses::SceneIterator sceneIter{ m_client };
- while (auto scene = sceneIter.getNext())
- scene->flush(); // local only scenes have to be flushed periodically when getting scene to READY state
-
- std::this_thread::sleep_for(std::chrono::milliseconds(5));
- m_client.dispatchEvents(*this);
- }
- }
-
-private:
- ramses::RamsesClient& m_client;
- std::unordered_map m_sceneRefState;
-};
-/** \endcond */
-
-static constexpr int32_t VPWidth = 600;
-static constexpr int32_t VPHeight = 400;
-static constexpr int32_t DispWidth = 1280;
-static constexpr int32_t DispHeight = 480;
-
-// Master scene's data provider IDs
-static constexpr ramses::dataProviderId_t VP1OffsetProviderId{ 333 };
-static constexpr ramses::dataProviderId_t VP1SizeProviderId{ 334 };
-static constexpr ramses::dataProviderId_t VP2OffsetProviderId{ 335 };
-static constexpr ramses::dataProviderId_t VP2SizeProviderId{ 336 };
-static constexpr ramses::dataProviderId_t Color1ProviderId{ 337 };
-static constexpr ramses::dataProviderId_t Color2ProviderId{ 338 };
-static constexpr ramses::dataProviderId_t Color3ProviderId{ 339 };
-static constexpr ramses::dataProviderId_t Color4ProviderId{ 340 };
-
-// Content scene's data consumer IDs
-static constexpr ramses::dataConsumerId_t VPOffsetConsumerId{ 350 };
-static constexpr ramses::dataConsumerId_t VPSizeConsumerId{ 351 };
-static constexpr ramses::dataConsumerId_t Color1ConsumerId{ 352 };
-static constexpr ramses::dataConsumerId_t Color2ConsumerId{ 353 };
-
-void createContentProviderScene(ramses::RamsesClient& client, ramses::sceneId_t sceneId)
-{
- ramses::Scene* clientScene = client.createScene(sceneId);
-
- ramses::PerspectiveCamera* camera = clientScene->createPerspectiveCamera("camera");
- camera->setFrustum(19.f, 1280.f / 480.f, 0.1f, 1500.f);
- camera->setTranslation({0.0f, 0.0f, 5.0f});
-
- // Bind data objects to scene's camera viewport offset/size and mark as data consumers
- const auto vpOffsetData = clientScene->createDataObject(ramses::EDataType::Vector2I, "vpOffset");
- const auto vpSizeData = clientScene->createDataObject(ramses::EDataType::Vector2I, "vpSize");
- vpOffsetData->setValue(ramses::vec2i{ 0, 0 });
- vpSizeData->setValue(ramses::vec2i{ VPWidth, VPHeight });
- camera->bindViewportOffset(*vpOffsetData);
- camera->bindViewportSize(*vpSizeData);
- clientScene->createDataConsumer(*vpOffsetData, VPOffsetConsumerId);
- clientScene->createDataConsumer(*vpSizeData, VPSizeConsumerId);
-
- ramses::RenderPass* renderPass = clientScene->createRenderPass("my render pass");
- renderPass->setClearFlags(ramses::EClearFlag::None);
- renderPass->setCamera(*camera);
- ramses::RenderGroup* renderGroup = clientScene->createRenderGroup();
- renderPass->addRenderGroup(*renderGroup);
-
- const std::array vertexPositionsData{ ramses::vec3f{-1.f, 0.f, -6.f}, ramses::vec3f{1.f, 0.f, -6.f}, ramses::vec3f{0.f, 1.f, -6.f} };
- ramses::ArrayResource* vertexPositions = clientScene->createArrayResource(3u, vertexPositionsData.data());
- const std::array indexData{ 0, 1, 2 };
- ramses::ArrayResource* indices = clientScene->createArrayResource(3u, indexData.data());
-
- ramses::EffectDescription effectDesc;
- effectDesc.setVertexShader(R"glsl(#version 100
-uniform highp mat4 mvpMatrix;
-attribute vec3 a_position;
-void main() {
- gl_Position = mvpMatrix * vec4(a_position, 1.0);
-})glsl");
- effectDesc.setFragmentShader(R"glsl(#version 100
-uniform highp vec4 color;
-void main(void) {
- gl_FragColor = color + vec4(0.1);
-})glsl");
- effectDesc.setUniformSemantic("mvpMatrix", ramses::EEffectUniformSemantic::ModelViewProjectionMatrix);
-
- ramses::Effect* effect = clientScene->createEffect(effectDesc, "glsl shader");
- ramses::Appearance* appearance = clientScene->createAppearance(*effect, "triangle appearance");
- ramses::Geometry* geometry = clientScene->createGeometry(*effect, "triangle geometry");
-
- geometry->setIndices(*indices);
- std::optional positionsInput = effect->findAttributeInput("a_position");
- assert(positionsInput.has_value());
- geometry->setInputBuffer(*positionsInput, *vertexPositions);
-
- ramses::MeshNode* meshNode = clientScene->createMeshNode("triangle mesh node");
- meshNode->setAppearance(*appearance);
- meshNode->setGeometry(*geometry);
- renderGroup->addMeshNode(*meshNode);
-
- ramses::MeshNode* meshNode2 = clientScene->createMeshNode("triangle mesh node 2");
- ramses::Appearance* appearance2 = clientScene->createAppearance(*effect, "triangle appearance");
- meshNode2->setAppearance(*appearance2);
- meshNode2->setGeometry(*geometry);
- renderGroup->addMeshNode(*meshNode2);
- meshNode2->setTranslation({0, -10, -5});
- meshNode2->setScaling({100, 100, 1});
-
- std::optional colorInput = effect->findUniformInput("color");
- assert(colorInput.has_value());
-
- // Create data objects to hold color and bind them to appearance inputs
- auto color1 = clientScene->createDataObject(ramses::EDataType::Vector4F);
- auto color2 = clientScene->createDataObject(ramses::EDataType::Vector4F);
- color1->setValue(ramses::vec4f{ 1.f, 1.f, 1.f, 1.f });
- color1->setValue(ramses::vec4f{ 0.5f, 0.5f, 0.5f, 1.f });
- appearance->bindInput(*colorInput, *color1);
- appearance2->bindInput(*colorInput, *color2);
- clientScene->createDataConsumer(*color1, Color1ConsumerId);
- clientScene->createDataConsumer(*color2, Color2ConsumerId);
-
- clientScene->flush();
- clientScene->publish();
-}
-
-ramses::Scene* createSceneMaster(ramses::RamsesClient& client, ramses::sceneId_t sceneId)
-{
- ramses::Scene* clientScene = client.createScene(sceneId);
-
- // In master scene create data objects and mark them as providers to control other scenes' viewports
- const auto vp1offset = clientScene->createDataObject(ramses::EDataType::Vector2I, "vp1offset");
- const auto vp1size = clientScene->createDataObject(ramses::EDataType::Vector2I, "vp1size");
- const auto vp2offset = clientScene->createDataObject(ramses::EDataType::Vector2I, "vp2offset");
- const auto vp2size = clientScene->createDataObject(ramses::EDataType::Vector2I, "vp2size");
-
- vp1offset->setValue(ramses::vec2i{ 0, 0 });
- vp1size->setValue(ramses::vec2i{ DispWidth, DispHeight });
- vp2offset->setValue(ramses::vec2i{ 0, 0 });
- vp2size->setValue(ramses::vec2i{ DispWidth, DispHeight });
-
- clientScene->createDataProvider(*vp1offset, VP1OffsetProviderId);
- clientScene->createDataProvider(*vp1size, VP1SizeProviderId);
- clientScene->createDataProvider(*vp2offset, VP2OffsetProviderId);
- clientScene->createDataProvider(*vp2size, VP2SizeProviderId);
-
- // Create data objects and mark them as providers to control content scenes colors
- const auto color1 = clientScene->createDataObject(ramses::EDataType::Vector4F, "color1");
- const auto color2 = clientScene->createDataObject(ramses::EDataType::Vector4F, "color2");
- const auto color3 = clientScene->createDataObject(ramses::EDataType::Vector4F, "color3");
- const auto color4 = clientScene->createDataObject(ramses::EDataType::Vector4F, "color4");
-
- color1->setValue(ramses::vec4f{ 1.f, 1.f, 0.3f, 1.f });
- color2->setValue(ramses::vec4f{ 0.f, 0.3f, 0.5f, 1.f });
- color3->setValue(ramses::vec4f{ 1.f, 0.f, 0.5f, 1.f });
- color4->setValue(ramses::vec4f{ 0.5f, 0.3f, 0.f, 1.f });
-
- clientScene->createDataProvider(*color1, Color1ProviderId);
- clientScene->createDataProvider(*color2, Color2ProviderId);
- clientScene->createDataProvider(*color3, Color3ProviderId);
- clientScene->createDataProvider(*color4, Color4ProviderId);
-
- clientScene->flush();
- clientScene->publish();
-
- return clientScene;
-}
-
-/**
- * @example ramses-example-local-scene-referencing/src/main.cpp
- * @brief Example for controlling scene state and data linking of scenes via scene referencing instead of renderer API.
- */
-int main()
-{
- // create a renderer and a client locally, open a display
- ramses::RamsesFrameworkConfig config{ramses::EFeatureLevel_Latest};
- config.setRequestedRamsesShellType(ramses::ERamsesShellType::Console); //needed for automated test of examples
- ramses::RamsesFramework framework(config);
- ramses::RamsesClient& client(*framework.createClient("ExampleSceneReferencing"));
-
- ramses::RendererConfig rendererConfig;
- ramses::RamsesRenderer& renderer(*framework.createRenderer(rendererConfig));
- renderer.startThread();
-
- ramses::DisplayConfig displayConfig;
- const ramses::displayId_t display = renderer.createDisplay(displayConfig);
- renderer.flush();
-
- framework.connect();
-
- // prepare a master scene and two scenes, which are to be referenced
- const ramses::sceneId_t refSceneId1(1u);
- const ramses::sceneId_t refSceneId2(2u);
- const ramses::sceneId_t sceneIdMaster(3u);
-
- createContentProviderScene(client, refSceneId1);
- createContentProviderScene(client, refSceneId2);
-
- ramses::Scene* masterScene = createSceneMaster(client, sceneIdMaster);
- ramses::RendererSceneControl& sceneControlAPI = *renderer.getSceneControlAPI();
- sceneControlAPI.setSceneMapping(sceneIdMaster, display);
- sceneControlAPI.flush();
-
- /// [Scene referencing setup]
- // create a scene reference for both scenes
- ramses::SceneReference* sceneRef1 = masterScene->createSceneReference(refSceneId1);
- ramses::SceneReference* sceneRef2 = masterScene->createSceneReference(refSceneId2);
-
- // request scene references state to rendered, they will be brought to state rendered alongside with master scene
- sceneRef1->requestState(ramses::RendererSceneState::Rendered);
- sceneRef2->requestState(ramses::RendererSceneState::Rendered);
- masterScene->flush();
- /// [Scene referencing setup]
-
- // request master scene to be ready, so scene references can become ready as well
- sceneControlAPI.setSceneState(sceneIdMaster, ramses::RendererSceneState::Ready);
- sceneControlAPI.flush();
-
- /// [Scene referencing data linking]
- // wait for referenced scene to be available, before trying to data link
- SceneReferenceEventHandler eventHandler(client);
- eventHandler.waitForSceneRefState(refSceneId1, ramses::RendererSceneState::Ready);
- eventHandler.waitForSceneRefState(refSceneId2, ramses::RendererSceneState::Ready);
-
- // Link master scene's data objects to other scenes cameras' viewports
- masterScene->linkData(nullptr, VP1OffsetProviderId, sceneRef1, VPOffsetConsumerId);
- masterScene->linkData(nullptr, VP1SizeProviderId, sceneRef1, VPSizeConsumerId);
- masterScene->linkData(nullptr, VP2OffsetProviderId, sceneRef2, VPOffsetConsumerId);
- masterScene->linkData(nullptr, VP2SizeProviderId, sceneRef2, VPSizeConsumerId);
- masterScene->flush();
- /// [Scene referencing data linking]
-
- // Link master scene's data objects to scene1 and scene2 colors
- masterScene->linkData(nullptr, Color1ProviderId, sceneRef1, Color1ConsumerId);
- masterScene->linkData(nullptr, Color2ProviderId, sceneRef1, Color2ConsumerId);
- masterScene->linkData(nullptr, Color3ProviderId, sceneRef2, Color1ConsumerId);
- masterScene->linkData(nullptr, Color4ProviderId, sceneRef2, Color2ConsumerId);
- masterScene->flush();
-
- // wait and check for data link result events for all links, skipped here for example simplicity
-
- // Now that everything is set up properly, bring master scene to a rendered state
- sceneControlAPI.setSceneState(sceneIdMaster, ramses::RendererSceneState::Rendered);
- sceneControlAPI.flush();
-
- // These are master scene's data objects linked to scene1 and scene2 cameras' viewports
- auto scene1vpOffset = masterScene->findObject("vp1offset");
- auto scene1vpSize = masterScene->findObject("vp1size");
- auto scene2vpOffset = masterScene->findObject("vp2offset");
- auto scene2vpSize = masterScene->findObject("vp2size");
-
- // start animating data provider values after scenes are being rendered
- eventHandler.waitForSceneRefState(refSceneId1, ramses::RendererSceneState::Rendered);
- eventHandler.waitForSceneRefState(refSceneId2, ramses::RendererSceneState::Rendered);
-
- int animParam = 0;
- bool animInc = true;
- RendererEventHandler rendererEventHandler;
- while (!rendererEventHandler.isWindowClosed())
- {
- renderer.dispatchEvents(rendererEventHandler);
- // animate master scene
- scene1vpOffset->setValue(ramses::vec2i{ VPWidth / 8 + VPWidth / 2 * animParam / 100, VPHeight / 8 + VPHeight / 4 * animParam / 100 });
- scene1vpSize->setValue(ramses::vec2i{ VPWidth / 4 + VPWidth / 2 * animParam / 100, VPHeight / 4 + VPHeight / 4 * animParam / 100 });
- const auto invAnimParam = 100 - animParam;
- scene2vpOffset->setValue(ramses::vec2i{ DispWidth / 2 - VPWidth / 2 * invAnimParam / 100, DispHeight - DispHeight / 4 - VPHeight / 4 * invAnimParam / 100 });
- scene2vpSize->setValue(ramses::vec2i{ VPWidth / 2 + VPWidth / 2 * invAnimParam / 100, VPHeight / 4 + VPHeight / 4 * invAnimParam / 100 });
- masterScene->flush();
-
- animParam = (animInc ? animParam + 1 : animParam - 1);
- if (animParam == 0 || animParam == 100)
- animInc = !animInc;
-
- std::this_thread::sleep_for(std::chrono::milliseconds(10));
- }
-}
diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt
index bfcf48f4a..5b20bb0d9 100644
--- a/external/CMakeLists.txt
+++ b/external/CMakeLists.txt
@@ -83,6 +83,21 @@ else()
endif()
endif()
+add_library(ramses-glad
+ glad/src/gles2.c
+)
+target_include_directories(ramses-glad PUBLIC
+ glad/include/
+)
+folderizeTarget(ramses-glad)
+
+if(WIN32)
+ target_include_directories(ramses-glad PUBLIC
+ khronos # find wgl.h/wglext.h
+ )
+ target_link_libraries(ramses-glad PUBLIC opengl32)
+endif()
+
# abseil library
function(add_abseil_scope)
set(BUILD_TESTING OFF)
@@ -131,7 +146,63 @@ foreach(lib
target_link_libraries(ramses-abseil INTERFACE absl::${lib})
endforeach()
+# glslang
+macro(configureGlslangGeneratedBuildHeader)
+ # This block is originally taken and adapted from glslang's CMakeLists.txt
+ # and licensed as follows:
+ # Copyright (C) 2020-2023 The Khronos Group Inc.
+ #
+ # All rights reserved.
+ #
+ # Redistribution and use in source and binary forms, with or without
+ # modification, are permitted provided that the following conditions
+ # are met:
+ #
+ # Redistributions of source code must retain the above copyright
+ # notice, this list of conditions and the following disclaimer.
+ #
+ # Redistributions in binary form must reproduce the above
+ # copyright notice, this list of conditions and the following
+ # disclaimer in the documentation and/or other materials provided
+ # with the distribution.
+ #
+ # Neither the name of The Khronos Group Inc. nor the names of its
+ # contributors may be used to endorse or promote products derived
+ # from this software without specific prior written permission.
+ #
+ # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ # COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ # POSSIBILITY OF SUCH DAMAGE.
+
+ set(GLSLANG_CHANGES_FILE "${CMAKE_CURRENT_SOURCE_DIR}/glslang/CHANGES.md")
+ set(GLSLANG_BUILD_INFO_H_TMPL "${CMAKE_CURRENT_SOURCE_DIR}/glslang/build_info.h.tmpl")
+ set(GLSLANG_GENERATED_INCLUDEDIR "${CMAKE_BINARY_DIR}/include/glslang")
+ set(GLSLANG_BUILD_INFO_H "${GLSLANG_GENERATED_INCLUDEDIR}/glslang/build_info.h")
+
+ include(glslang/parse_version.cmake)
+ parse_version(${GLSLANG_CHANGES_FILE} GLSLANG)
+
+ function(configurate_version)
+ set(major ${GLSLANG_VERSION_MAJOR})
+ set(minor ${GLSLANG_VERSION_MINOR})
+ set(patch ${GLSLANG_VERSION_PATCH})
+ set(flavor ${GLSLANG_VERSION_FLAVOR})
+ configure_file(${GLSLANG_BUILD_INFO_H_TMPL} ${GLSLANG_BUILD_INFO_H} @ONLY)
+ endfunction()
+
+ configurate_version()
+endmacro()
+configureGlslangGeneratedBuildHeader()
createModule(
NAME ramses-glslang
TYPE STATIC_LIBRARY
@@ -139,18 +210,27 @@ createModule(
INCLUDE_PATHS glslang/glslang
glslang/glslang/MachineIndependent
glslang
+ ${GLSLANG_GENERATED_INCLUDEDIR}
SRC_FILES glslang/glslang/Include/*.h
glslang/glslang/Public/*.h
glslang/glslang/OSDependent/*.h
glslang/glslang/MachineIndependent/*.h
glslang/OGLCompilersDLL/*.h
+ glslang/SPIRV/*.h
+ glslang/SPIRV*.hpp
glslang/glslang/MachineIndependent/*.cpp
glslang/glslang/MachineIndependent/preprocessor/*.cpp
glslang/glslang/GenericCodeGen/*.cpp
glslang/OGLCompilersDLL/*.cpp
- glslang-os-dep/GenericSingleThreaded/ossource.cpp
+ glslang/SPIRV/*.cpp
)
+if(WIN32)
+ target_sources(ramses-glslang PRIVATE glslang/glslang/OSDependent/Windows/ossource.cpp)
+else()
+ target_sources(ramses-glslang PRIVATE glslang/glslang/OSDependent/Unix/ossource.cpp)
+endif()
+
createModule(
NAME lodepng
TYPE STATIC_LIBRARY
@@ -171,10 +251,12 @@ createModule(
if(ramses-sdk_TEXT_SUPPORT)
# find freetype with harfbuzz support
- if (ramses-sdk_ALLOW_PLATFORM_FREETYPE)
- find_package(FreetypeAndHarfbuzz QUIET)
- endif()
- if (ramses-sdk_ALLOW_CUSTOM_FREETYPE AND NOT freetype_FOUND)
+ if (ramses-sdk_USE_PLATFORM_FREETYPE)
+ find_package(FreetypeAndHarfbuzz REQUIRED)
+ if (NOT freetype_FOUND)
+ message(FATAL_ERROR "Freetype package is not found on the system. Please make sure it is available or use bundled package instead.")
+ endif()
+ else()
set(SKIP_INSTALL_ALL ON)
# no 'd' suffix on debug libs
@@ -202,6 +284,11 @@ if(ramses-sdk_TEXT_SUPPORT)
endif()
endif()
else()
+ if (ramses-sdk_USE_PLATFORM_FREETYPE)
+ message(WARNING "ramses-sdk_USE_PLATFORM_FREETYPE is set to ${ramses-sdk_USE_PLATFORM_FREETYPE} but ramses-sdk_TEXT_SUPPORT is ${ramses-sdk_TEXT_SUPPORT}. ramses-sdk_USE_PLATFORM_FREETYPE will not take effect. Please set it to OFF or check the configuration.")
+ set(ramses-sdk_USE_PLATFORM_FREETYPE OFF)
+ message(VERBOSE "ramses-sdk_USE_PLATFORM_FREETYPE is now ${ramses-sdk_USE_PLATFORM_FREETYPE}.")
+ endif()
message(STATUS "- harfbuzz/freetype (text support disabled)")
endif()
@@ -237,6 +324,8 @@ ELSEIF (wayland-client_FOUND AND wayland-server_FOUND)
)
ENDIF()
+find_package(OpenGL QUIET)
+
importDependenciesAndCheckMissing(WAYLAND_IVI_EXT_MISSING wayland-ivi-extension)
if (ramses-sdk_BUILD_TOOLS AND (NOT WAYLAND_IVI_EXT_MISSING))
# wayland ivi example/test application
@@ -246,7 +335,7 @@ if (ramses-sdk_BUILD_TOOLS AND (NOT WAYLAND_IVI_EXT_MISSING))
ENABLE_INSTALL ON
SRC_FILES wayland-ivi-example-client/gears.c
DEPENDENCIES EGL
- OpenGL
+ OpenGL::GLES3
wayland-client
wayland-egl
wayland-ivi-extension
@@ -279,7 +368,7 @@ if (ramses-sdk_BUILD_TOOLS AND (NOT MISSING_DEPENDENCY))
ENABLE_INSTALL ON
SRC_FILES wayland-ivi-example-client/simple-dmabuf-egl.c
DEPENDENCIES EGL
- OpenGL
+ OpenGL::GLES3
wayland-client
wayland-egl
wayland-ivi-extension
@@ -346,138 +435,136 @@ ELSE()
ENDIF()
# Ramses logic specific dependencies
-if(ramses-sdk_ENABLE_LOGIC)
- ################################################
- ################ Google Benchmark ###########
- ################################################
+################################################
+################ Google Benchmark ###########
+################################################
- #project specific setup for google benchmark
- if(ramses-sdk_BUILD_TESTS AND NOT TARGET benchmark::benchmark)
- set(BENCHMARK_ENABLE_TESTING OFF CACHE INTERNAL "")
- set(BENCHMARK_ENABLE_GTEST_TESTS OFF CACHE INTERNAL "")
- set(BENCHMARK_ENABLE_INSTALL OFF CACHE INTERNAL "")
+#project specific setup for google benchmark
+if(ramses-sdk_BUILD_TESTS AND NOT TARGET benchmark::benchmark)
+ set(BENCHMARK_ENABLE_TESTING OFF CACHE INTERNAL "")
+ set(BENCHMARK_ENABLE_GTEST_TESTS OFF CACHE INTERNAL "")
+ set(BENCHMARK_ENABLE_INSTALL OFF CACHE INTERNAL "")
- ensureSubmoduleExists(google-benchmark)
+ ensureSubmoduleExists(google-benchmark)
- add_subdirectory(google-benchmark)
+ add_subdirectory(google-benchmark)
- folderizeTarget(benchmark)
- folderizeTarget(benchmark_main)
- endif()
+ folderizeTarget(benchmark)
+ folderizeTarget(benchmark_main)
+endif()
- add_library(ramses-google-benchmark-main INTERFACE)
- target_link_libraries(ramses-google-benchmark-main INTERFACE benchmark_main)
- add_library(ramses::google-benchmark-main ALIAS ramses-google-benchmark-main)
+add_library(ramses-google-benchmark-main INTERFACE)
+target_link_libraries(ramses-google-benchmark-main INTERFACE benchmark_main)
+add_library(ramses::google-benchmark-main ALIAS ramses-google-benchmark-main)
- ################################################
- ################ Lua ##################
- ################################################
+################################################
+################ Lua ##################
+################################################
- if(NOT TARGET lua::lua)
- message(STATUS "+ lua (internal) (STATIC_LIBRARY)")
- ensureSubmoduleExists(lua)
+if(NOT TARGET lua::lua)
+ message(STATUS "+ lua (internal) (STATIC_LIBRARY)")
+ ensureSubmoduleExists(lua)
- # Collect all source and header files
- file(GLOB LUA_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/lua/*.c)
- file(GLOB LUA_HEADER ${CMAKE_CURRENT_SOURCE_DIR}/lua/*.h)
+ # Collect all source and header files
+ file(GLOB LUA_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/lua/*.c)
+ file(GLOB LUA_HEADER ${CMAKE_CURRENT_SOURCE_DIR}/lua/*.h)
- # Remove luac from the list, because it contains a main function
- list(REMOVE_ITEM LUA_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/lua/lua.c)
+ # Remove luac from the list, because it contains a main function
+ list(REMOVE_ITEM LUA_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/lua/lua.c)
- set_source_files_properties(${LUA_SOURCE} PROPERTIES LANGUAGE CXX)
+ set_source_files_properties(${LUA_SOURCE} PROPERTIES LANGUAGE CXX)
- # Create library for lua
- add_library(lua STATIC ${LUA_SOURCE} ${LUA_HEADER})
+ # Create library for lua
+ add_library(lua STATIC ${LUA_SOURCE} ${LUA_HEADER})
- # This is required for Lua on Android to suppress a false-positive fortification trigger when
- # the garbage collector is invoked
- if (${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang" OR ${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")
- target_compile_options(lua PRIVATE -fno-stack-protector -U_FORTIFY_SOURCE -Wno-deprecated-declarations)
- endif()
+ # This is required for Lua on Android to suppress a false-positive fortification trigger when
+ # the garbage collector is invoked
+ if (${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang" OR ${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")
+ target_compile_options(lua PRIVATE -fno-stack-protector -U_FORTIFY_SOURCE -Wno-deprecated-declarations)
+ endif()
- if (${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
- # We compile lua as c++ even though it has .c files. convince clang to just do it without complaining
- target_compile_options(lua PRIVATE -x c++)
- endif()
+ if (${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
+ # We compile lua as c++ even though it has .c files. convince clang to just do it without complaining
+ target_compile_options(lua PRIVATE -x c++)
+ endif()
- target_include_directories(lua
- PUBLIC
- $
- )
+ target_include_directories(lua
+ PUBLIC
+ $
+ )
- folderizeTarget(lua)
- add_library(lua::lua ALIAS lua)
- endif()
+ folderizeTarget(lua)
+ add_library(lua::lua ALIAS lua)
+endif()
- ################################################
- ################ Sol ##################
- ################################################
-
- if(NOT TARGET sol2)
- set(SOL2_LUA_VERSION "5.1.1" CACHE STRING "" FORCE)
- set(INSTALL_SOL2 OFF CACHE INTERNAL "")
-
- ensureSubmoduleExists(sol)
-
- # TODO Violin remove EXCLUDE_FROM_ALL when upgrading to the next official sol version
- # Currently its's needed because otherwise sol is installed automatically and also
- # lands in the packaged version of ramses
- add_subdirectory(sol EXCLUDE_FROM_ALL)
-
- # Ensure sol is expecting c++ compiled lua
- target_compile_definitions(sol2 INTERFACE
- # catch and redirect exception to user handler func instead of
- # prapagating them directly through lua
- SOL_EXCEPTIONS_ALWAYS_UNSAFE=1
- # check if types are numbers before using them as numbers
- SOL_SAFE_NUMERICS=1
- # ensure sol calls luaL_checkstack to avoid stack overflows
- SOL_SAFE_STACK_CHECK=1
- # Make sure Debug flags are equivalent to Release flags in terms of behavior
- SOL_IN_DEBUG_DETECTED=0
- )
+################################################
+################ Sol ##################
+################################################
+
+if(NOT TARGET sol2)
+ set(SOL2_LUA_VERSION "5.1.1" CACHE STRING "" FORCE)
+ set(INSTALL_SOL2 OFF CACHE INTERNAL "")
+
+ ensureSubmoduleExists(sol)
+
+ # TODO Violin remove EXCLUDE_FROM_ALL when upgrading to the next official sol version
+ # Currently its's needed because otherwise sol is installed automatically and also
+ # lands in the packaged version of ramses
+ add_subdirectory(sol EXCLUDE_FROM_ALL)
+
+ # Ensure sol is expecting c++ compiled lua
+ target_compile_definitions(sol2 INTERFACE
+ # catch and redirect exception to user handler func instead of
+ # prapagating them directly through lua
+ SOL_EXCEPTIONS_ALWAYS_UNSAFE=1
+ # check if types are numbers before using them as numbers
+ SOL_SAFE_NUMERICS=1
+ # ensure sol calls luaL_checkstack to avoid stack overflows
+ SOL_SAFE_STACK_CHECK=1
+ # Make sure Debug flags are equivalent to Release flags in terms of behavior
+ SOL_IN_DEBUG_DETECTED=0
+ )
+
+ if(NOT ramses-sdk_USE_PLATFORM_LUAJIT)
+ target_compile_definitions(sol2 INTERFACE
+ # we compile lua with c++, make sol not use extern C etc
+ SOL_USING_CXX_LUA=1
+ )
+ endif()
+endif()
- if(NOT ramses-sdk_USE_PLATFORM_LUAJIT)
- target_compile_definitions(sol2 INTERFACE
- # we compile lua with c++, make sol not use extern C etc
- SOL_USING_CXX_LUA=1
- )
- endif()
- endif()
+################################################
+################ Flatbuffers ##################
+################################################
- ################################################
- ################ Flatbuffers ##################
- ################################################
-
- if(NOT TARGET flatbuffers)
- # Don't build flatbuf targets we don't need
- set(FLATBUFFERS_BUILD_TESTS OFF CACHE BOOL "" FORCE)
- set(FLATBUFFERS_INSTALL OFF CACHE BOOL "" FORCE)
- set(FLATBUFFERS_BUILD_FLATHASH OFF CACHE BOOL "" FORCE)
-
- # Only add flatc target if flatbuffers header generation needed
- if(ramses-sdk_ENABLE_FLATBUFFERS_GENERATION)
- set(FLATBUFFERS_BUILD_FLATC ON CACHE BOOL "Build flatbuffers compiler" FORCE)
- else()
- set(FLATBUFFERS_BUILD_FLATC OFF CACHE BOOL "Build flatbuffers compiler" FORCE)
- endif()
+if(NOT TARGET flatbuffers)
+ # Don't build flatbuf targets we don't need
+ set(FLATBUFFERS_BUILD_TESTS OFF CACHE BOOL "" FORCE)
+ set(FLATBUFFERS_INSTALL OFF CACHE BOOL "" FORCE)
+ set(FLATBUFFERS_BUILD_FLATHASH OFF CACHE BOOL "" FORCE)
- ensureSubmoduleExists(flatbuffers)
+ # Only add flatc target if flatbuffers header generation needed
+ if(ramses-sdk_ENABLE_FLATBUFFERS_GENERATION)
+ set(FLATBUFFERS_BUILD_FLATC ON CACHE BOOL "Build flatbuffers compiler" FORCE)
+ else()
+ set(FLATBUFFERS_BUILD_FLATC OFF CACHE BOOL "Build flatbuffers compiler" FORCE)
+ endif()
- add_subdirectory(flatbuffers)
- folderizeTarget(flatbuffers)
- endif()
+ ensureSubmoduleExists(flatbuffers)
- add_library(ramses::flatbuffers ALIAS flatbuffers)
+ add_subdirectory(flatbuffers)
+ folderizeTarget(flatbuffers)
+endif()
- if(ramses-sdk_ENABLE_FLATBUFFERS_GENERATION)
- folderizeTarget(flatc)
- endif()
+add_library(ramses::flatbuffers ALIAS flatbuffers)
+
+if(ramses-sdk_ENABLE_FLATBUFFERS_GENERATION)
+ folderizeTarget(flatc)
endif()
# ANGLE - Build for iOS support only
-IF((${CMAKE_SYSTEM_NAME} MATCHES "iOS"))
+if((${CMAKE_SYSTEM_NAME} MATCHES "iOS"))
# Define File Copy Function that WebKit ANGLE build expects to be there
function(WEBKIT_COPY_FILES target_name)
# This CMake macro is from the WebKit Repository and licensed as follows:
@@ -587,5 +674,20 @@ IF((${CMAKE_SYSTEM_NAME} MATCHES "iOS"))
target_include_directories(EGL INTERFACE ANGLE/include)
# Alias ANGLE as OpenGL, so it is a drop in replacement.
- add_library(OpenGL ALIAS GLESv2)
-ENDIF()
+ target_link_libraries(ramses-glad PUBLIC GLESv2)
+endif()
+
+
+if(ramses-sdk_ENABLE_DEVICE_TYPE_VULKAN)
+ message(STATUS "Environment VULKAN_SDK: $ENV{VULKAN_SDK}")
+
+ find_package(Vulkan REQUIRED)
+ message(STATUS "+ Vulkan ${Vulkan_VERSION}")
+ add_library(ramses-vulkan INTERFACE)
+ target_link_libraries(ramses-vulkan INTERFACE ${Vulkan_LIBRARIES})
+ target_include_directories(ramses-vulkan INTERFACE ${Vulkan_INCLUDE_DIR})
+
+ # add headers as sources to enable IntelliSense and other code completion features
+ file(GLOB VULKAN_HEADERS ${Vulkan_INCLUDE_DIR}/vulkan/*.h)
+ target_sources(ramses-vulkan INTERFACE ${VULKAN_HEADERS})
+endif()
diff --git a/external/abseil b/external/abseil
index 8c0b94e79..2f9e432cc 160000
--- a/external/abseil
+++ b/external/abseil
@@ -1 +1 @@
-Subproject commit 8c0b94e793a66495e0b1f34a5eb26bd7dc672db0
+Subproject commit 2f9e432cce407ce0ae50676696666f33a77d42ac
diff --git a/external/glad/include/KHR/khrplatform.h b/external/glad/include/KHR/khrplatform.h
new file mode 100644
index 000000000..01646449c
--- /dev/null
+++ b/external/glad/include/KHR/khrplatform.h
@@ -0,0 +1,311 @@
+#ifndef __khrplatform_h_
+#define __khrplatform_h_
+
+/*
+** Copyright (c) 2008-2018 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+/* Khronos platform-specific types and definitions.
+ *
+ * The master copy of khrplatform.h is maintained in the Khronos EGL
+ * Registry repository at https://github.com/KhronosGroup/EGL-Registry
+ * The last semantic modification to khrplatform.h was at commit ID:
+ * 67a3e0864c2d75ea5287b9f3d2eb74a745936692
+ *
+ * Adopters may modify this file to suit their platform. Adopters are
+ * encouraged to submit platform specific modifications to the Khronos
+ * group so that they can be included in future versions of this file.
+ * Please submit changes by filing pull requests or issues on
+ * the EGL Registry repository linked above.
+ *
+ *
+ * See the Implementer's Guidelines for information about where this file
+ * should be located on your system and for more details of its use:
+ * http://www.khronos.org/registry/implementers_guide.pdf
+ *
+ * This file should be included as
+ * #include
+ * by Khronos client API header files that use its types and defines.
+ *
+ * The types in khrplatform.h should only be used to define API-specific types.
+ *
+ * Types defined in khrplatform.h:
+ * khronos_int8_t signed 8 bit
+ * khronos_uint8_t unsigned 8 bit
+ * khronos_int16_t signed 16 bit
+ * khronos_uint16_t unsigned 16 bit
+ * khronos_int32_t signed 32 bit
+ * khronos_uint32_t unsigned 32 bit
+ * khronos_int64_t signed 64 bit
+ * khronos_uint64_t unsigned 64 bit
+ * khronos_intptr_t signed same number of bits as a pointer
+ * khronos_uintptr_t unsigned same number of bits as a pointer
+ * khronos_ssize_t signed size
+ * khronos_usize_t unsigned size
+ * khronos_float_t signed 32 bit floating point
+ * khronos_time_ns_t unsigned 64 bit time in nanoseconds
+ * khronos_utime_nanoseconds_t unsigned time interval or absolute time in
+ * nanoseconds
+ * khronos_stime_nanoseconds_t signed time interval in nanoseconds
+ * khronos_boolean_enum_t enumerated boolean type. This should
+ * only be used as a base type when a client API's boolean type is
+ * an enum. Client APIs which use an integer or other type for
+ * booleans cannot use this as the base type for their boolean.
+ *
+ * Tokens defined in khrplatform.h:
+ *
+ * KHRONOS_FALSE, KHRONOS_TRUE Enumerated boolean false/true values.
+ *
+ * KHRONOS_SUPPORT_INT64 is 1 if 64 bit integers are supported; otherwise 0.
+ * KHRONOS_SUPPORT_FLOAT is 1 if floats are supported; otherwise 0.
+ *
+ * Calling convention macros defined in this file:
+ * KHRONOS_APICALL
+ * KHRONOS_APIENTRY
+ * KHRONOS_APIATTRIBUTES
+ *
+ * These may be used in function prototypes as:
+ *
+ * KHRONOS_APICALL void KHRONOS_APIENTRY funcname(
+ * int arg1,
+ * int arg2) KHRONOS_APIATTRIBUTES;
+ */
+
+#if defined(__SCITECH_SNAP__) && !defined(KHRONOS_STATIC)
+# define KHRONOS_STATIC 1
+#endif
+
+/*-------------------------------------------------------------------------
+ * Definition of KHRONOS_APICALL
+ *-------------------------------------------------------------------------
+ * This precedes the return type of the function in the function prototype.
+ */
+#if defined(KHRONOS_STATIC)
+ /* If the preprocessor constant KHRONOS_STATIC is defined, make the
+ * header compatible with static linking. */
+# define KHRONOS_APICALL
+#elif defined(_WIN32)
+# define KHRONOS_APICALL __declspec(dllimport)
+#elif defined (__SYMBIAN32__)
+# define KHRONOS_APICALL IMPORT_C
+#elif defined(__ANDROID__)
+# define KHRONOS_APICALL __attribute__((visibility("default")))
+#else
+# define KHRONOS_APICALL
+#endif
+
+/*-------------------------------------------------------------------------
+ * Definition of KHRONOS_APIENTRY
+ *-------------------------------------------------------------------------
+ * This follows the return type of the function and precedes the function
+ * name in the function prototype.
+ */
+#if defined(_WIN32) && !defined(_WIN32_WCE) && !defined(__SCITECH_SNAP__)
+ /* Win32 but not WinCE */
+# define KHRONOS_APIENTRY __stdcall
+#else
+# define KHRONOS_APIENTRY
+#endif
+
+/*-------------------------------------------------------------------------
+ * Definition of KHRONOS_APIATTRIBUTES
+ *-------------------------------------------------------------------------
+ * This follows the closing parenthesis of the function prototype arguments.
+ */
+#if defined (__ARMCC_2__)
+#define KHRONOS_APIATTRIBUTES __softfp
+#else
+#define KHRONOS_APIATTRIBUTES
+#endif
+
+/*-------------------------------------------------------------------------
+ * basic type definitions
+ *-----------------------------------------------------------------------*/
+#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__GNUC__) || defined(__SCO__) || defined(__USLC__)
+
+
+/*
+ * Using
+ */
+#include
+typedef int32_t khronos_int32_t;
+typedef uint32_t khronos_uint32_t;
+typedef int64_t khronos_int64_t;
+typedef uint64_t khronos_uint64_t;
+#define KHRONOS_SUPPORT_INT64 1
+#define KHRONOS_SUPPORT_FLOAT 1
+/*
+ * To support platform where unsigned long cannot be used interchangeably with
+ * inptr_t (e.g. CHERI-extended ISAs), we can use the stdint.h intptr_t.
+ * Ideally, we could just use (u)intptr_t everywhere, but this could result in
+ * ABI breakage if khronos_uintptr_t is changed from unsigned long to
+ * unsigned long long or similar (this results in different C++ name mangling).
+ * To avoid changes for existing platforms, we restrict usage of intptr_t to
+ * platforms where the size of a pointer is larger than the size of long.
+ */
+#if defined(__SIZEOF_LONG__) && defined(__SIZEOF_POINTER__)
+#if __SIZEOF_POINTER__ > __SIZEOF_LONG__
+#define KHRONOS_USE_INTPTR_T
+#endif
+#endif
+
+#elif defined(__VMS ) || defined(__sgi)
+
+/*
+ * Using
+ */
+#include
+typedef int32_t khronos_int32_t;
+typedef uint32_t khronos_uint32_t;
+typedef int64_t khronos_int64_t;
+typedef uint64_t khronos_uint64_t;
+#define KHRONOS_SUPPORT_INT64 1
+#define KHRONOS_SUPPORT_FLOAT 1
+
+#elif defined(_WIN32) && !defined(__SCITECH_SNAP__)
+
+/*
+ * Win32
+ */
+typedef __int32 khronos_int32_t;
+typedef unsigned __int32 khronos_uint32_t;
+typedef __int64 khronos_int64_t;
+typedef unsigned __int64 khronos_uint64_t;
+#define KHRONOS_SUPPORT_INT64 1
+#define KHRONOS_SUPPORT_FLOAT 1
+
+#elif defined(__sun__) || defined(__digital__)
+
+/*
+ * Sun or Digital
+ */
+typedef int khronos_int32_t;
+typedef unsigned int khronos_uint32_t;
+#if defined(__arch64__) || defined(_LP64)
+typedef long int khronos_int64_t;
+typedef unsigned long int khronos_uint64_t;
+#else
+typedef long long int khronos_int64_t;
+typedef unsigned long long int khronos_uint64_t;
+#endif /* __arch64__ */
+#define KHRONOS_SUPPORT_INT64 1
+#define KHRONOS_SUPPORT_FLOAT 1
+
+#elif 0
+
+/*
+ * Hypothetical platform with no float or int64 support
+ */
+typedef int khronos_int32_t;
+typedef unsigned int khronos_uint32_t;
+#define KHRONOS_SUPPORT_INT64 0
+#define KHRONOS_SUPPORT_FLOAT 0
+
+#else
+
+/*
+ * Generic fallback
+ */
+#include
+typedef int32_t khronos_int32_t;
+typedef uint32_t khronos_uint32_t;
+typedef int64_t khronos_int64_t;
+typedef uint64_t khronos_uint64_t;
+#define KHRONOS_SUPPORT_INT64 1
+#define KHRONOS_SUPPORT_FLOAT 1
+
+#endif
+
+
+/*
+ * Types that are (so far) the same on all platforms
+ */
+typedef signed char khronos_int8_t;
+typedef unsigned char khronos_uint8_t;
+typedef signed short int khronos_int16_t;
+typedef unsigned short int khronos_uint16_t;
+
+/*
+ * Types that differ between LLP64 and LP64 architectures - in LLP64,
+ * pointers are 64 bits, but 'long' is still 32 bits. Win64 appears
+ * to be the only LLP64 architecture in current use.
+ */
+#ifdef KHRONOS_USE_INTPTR_T
+typedef intptr_t khronos_intptr_t;
+typedef uintptr_t khronos_uintptr_t;
+#elif defined(_WIN64)
+typedef signed long long int khronos_intptr_t;
+typedef unsigned long long int khronos_uintptr_t;
+#else
+typedef signed long int khronos_intptr_t;
+typedef unsigned long int khronos_uintptr_t;
+#endif
+
+#if defined(_WIN64)
+typedef signed long long int khronos_ssize_t;
+typedef unsigned long long int khronos_usize_t;
+#else
+typedef signed long int khronos_ssize_t;
+typedef unsigned long int khronos_usize_t;
+#endif
+
+#if KHRONOS_SUPPORT_FLOAT
+/*
+ * Float type
+ */
+typedef float khronos_float_t;
+#endif
+
+#if KHRONOS_SUPPORT_INT64
+/* Time types
+ *
+ * These types can be used to represent a time interval in nanoseconds or
+ * an absolute Unadjusted System Time. Unadjusted System Time is the number
+ * of nanoseconds since some arbitrary system event (e.g. since the last
+ * time the system booted). The Unadjusted System Time is an unsigned
+ * 64 bit value that wraps back to 0 every 584 years. Time intervals
+ * may be either signed or unsigned.
+ */
+typedef khronos_uint64_t khronos_utime_nanoseconds_t;
+typedef khronos_int64_t khronos_stime_nanoseconds_t;
+#endif
+
+/*
+ * Dummy value used to pad enum types to 32 bits.
+ */
+#ifndef KHRONOS_MAX_ENUM
+#define KHRONOS_MAX_ENUM 0x7FFFFFFF
+#endif
+
+/*
+ * Enumerated boolean type
+ *
+ * Values other than zero should be considered to be true. Therefore
+ * comparisons should not be made against KHRONOS_TRUE.
+ */
+typedef enum {
+ KHRONOS_FALSE = 0,
+ KHRONOS_TRUE = 1,
+ KHRONOS_BOOLEAN_ENUM_FORCE_SIZE = KHRONOS_MAX_ENUM
+} khronos_boolean_enum_t;
+
+#endif /* __khrplatform_h_ */
diff --git a/external/glad/include/glad/gles2.h b/external/glad/include/glad/gles2.h
new file mode 100644
index 000000000..af186d7eb
--- /dev/null
+++ b/external/glad/include/glad/gles2.h
@@ -0,0 +1,2463 @@
+/**
+ * Loader generated by glad 2.0.6 on Wed May 22 21:17:21 2024
+ *
+ * SPDX-License-Identifier: (WTFPL OR CC0-1.0) AND Apache-2.0
+ *
+ * Generator: C/C++
+ * Specification: gl
+ * Extensions: 7
+ *
+ * APIs:
+ * - gles2=3.2
+ *
+ * Options:
+ * - ALIAS = False
+ * - DEBUG = False
+ * - HEADER_ONLY = False
+ * - LOADER = False
+ * - MX = False
+ * - ON_DEMAND = False
+ *
+ * Commandline:
+ * --api='gles2=3.2' --extensions='GL_EXT_geometry_shader,GL_EXT_texture_compression_dxt1,GL_EXT_texture_filter_anisotropic,GL_OES_EGL_image,GL_OES_EGL_image_external,GL_OES_EGL_image_external_essl3,GL_OES_texture_compression_astc' c
+ *
+ * Online:
+ * http://glad.sh/#api=gles2%3D3.2&extensions=GL_EXT_geometry_shader%2CGL_EXT_texture_compression_dxt1%2CGL_EXT_texture_filter_anisotropic%2CGL_OES_EGL_image%2CGL_OES_EGL_image_external%2CGL_OES_EGL_image_external_essl3%2CGL_OES_texture_compression_astc&generator=c&options=
+ *
+ */
+
+#ifndef GLAD_GLES2_H_
+#define GLAD_GLES2_H_
+
+#ifdef __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wreserved-id-macro"
+#endif
+#ifdef __gl2_h_
+ #error OpenGL ES 2 header already included (API: gles2), remove previous include!
+#endif
+#define __gl2_h_ 1
+#ifdef __gles2_gl2_h_
+ #error OpenGL ES 2 header already included (API: gles2), remove previous include!
+#endif
+#define __gles2_gl2_h_ 1
+#ifdef __gl3_h_
+ #error OpenGL ES 3 header already included (API: gles2), remove previous include!
+#endif
+#define __gl3_h_ 1
+#ifdef __gles2_gl3_h_
+ #error OpenGL ES 3 header already included (API: gles2), remove previous include!
+#endif
+#define __gles2_gl3_h_ 1
+#ifdef __clang__
+#pragma clang diagnostic pop
+#endif
+
+#define GLAD_GLES2
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef GLAD_PLATFORM_H_
+#define GLAD_PLATFORM_H_
+
+#ifndef GLAD_PLATFORM_WIN32
+ #if defined(_WIN32) || defined(__WIN32__) || defined(WIN32) || defined(__MINGW32__)
+ #define GLAD_PLATFORM_WIN32 1
+ #else
+ #define GLAD_PLATFORM_WIN32 0
+ #endif
+#endif
+
+#ifndef GLAD_PLATFORM_APPLE
+ #ifdef __APPLE__
+ #define GLAD_PLATFORM_APPLE 1
+ #else
+ #define GLAD_PLATFORM_APPLE 0
+ #endif
+#endif
+
+#ifndef GLAD_PLATFORM_EMSCRIPTEN
+ #ifdef __EMSCRIPTEN__
+ #define GLAD_PLATFORM_EMSCRIPTEN 1
+ #else
+ #define GLAD_PLATFORM_EMSCRIPTEN 0
+ #endif
+#endif
+
+#ifndef GLAD_PLATFORM_UWP
+ #if defined(_MSC_VER) && !defined(GLAD_INTERNAL_HAVE_WINAPIFAMILY)
+ #ifdef __has_include
+ #if __has_include()
+ #define GLAD_INTERNAL_HAVE_WINAPIFAMILY 1
+ #endif
+ #elif _MSC_VER >= 1700 && !_USING_V110_SDK71_
+ #define GLAD_INTERNAL_HAVE_WINAPIFAMILY 1
+ #endif
+ #endif
+
+ #ifdef GLAD_INTERNAL_HAVE_WINAPIFAMILY
+ #include
+ #if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) && WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
+ #define GLAD_PLATFORM_UWP 1
+ #endif
+ #endif
+
+ #ifndef GLAD_PLATFORM_UWP
+ #define GLAD_PLATFORM_UWP 0
+ #endif
+#endif
+
+#ifdef __GNUC__
+ #define GLAD_GNUC_EXTENSION __extension__
+#else
+ #define GLAD_GNUC_EXTENSION
+#endif
+
+#define GLAD_UNUSED(x) (void)(x)
+
+#ifndef GLAD_API_CALL
+ #if defined(GLAD_API_CALL_EXPORT)
+ #if GLAD_PLATFORM_WIN32 || defined(__CYGWIN__)
+ #if defined(GLAD_API_CALL_EXPORT_BUILD)
+ #if defined(__GNUC__)
+ #define GLAD_API_CALL __attribute__ ((dllexport)) extern
+ #else
+ #define GLAD_API_CALL __declspec(dllexport) extern
+ #endif
+ #else
+ #if defined(__GNUC__)
+ #define GLAD_API_CALL __attribute__ ((dllimport)) extern
+ #else
+ #define GLAD_API_CALL __declspec(dllimport) extern
+ #endif
+ #endif
+ #elif defined(__GNUC__) && defined(GLAD_API_CALL_EXPORT_BUILD)
+ #define GLAD_API_CALL __attribute__ ((visibility ("default"))) extern
+ #else
+ #define GLAD_API_CALL extern
+ #endif
+ #else
+ #define GLAD_API_CALL extern
+ #endif
+#endif
+
+#ifdef APIENTRY
+ #define GLAD_API_PTR APIENTRY
+#elif GLAD_PLATFORM_WIN32
+ #define GLAD_API_PTR __stdcall
+#else
+ #define GLAD_API_PTR
+#endif
+
+#ifndef GLAPI
+#define GLAPI GLAD_API_CALL
+#endif
+
+#ifndef GLAPIENTRY
+#define GLAPIENTRY GLAD_API_PTR
+#endif
+
+#define GLAD_MAKE_VERSION(major, minor) (major * 10000 + minor)
+#define GLAD_VERSION_MAJOR(version) (version / 10000)
+#define GLAD_VERSION_MINOR(version) (version % 10000)
+
+#define GLAD_GENERATOR_VERSION "2.0.6"
+
+typedef void (*GLADapiproc)(void);
+
+typedef GLADapiproc (*GLADloadfunc)(const char *name);
+typedef GLADapiproc (*GLADuserptrloadfunc)(void *userptr, const char *name);
+
+typedef void (*GLADprecallback)(const char *name, GLADapiproc apiproc, int len_args, ...);
+typedef void (*GLADpostcallback)(void *ret, const char *name, GLADapiproc apiproc, int len_args, ...);
+
+#endif /* GLAD_PLATFORM_H_ */
+
+#define GL_ACTIVE_ATOMIC_COUNTER_BUFFERS 0x92D9
+#define GL_ACTIVE_ATTRIBUTES 0x8B89
+#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A
+#define GL_ACTIVE_PROGRAM 0x8259
+#define GL_ACTIVE_RESOURCES 0x92F5
+#define GL_ACTIVE_TEXTURE 0x84E0
+#define GL_ACTIVE_UNIFORMS 0x8B86
+#define GL_ACTIVE_UNIFORM_BLOCKS 0x8A36
+#define GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH 0x8A35
+#define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87
+#define GL_ACTIVE_VARIABLES 0x9305
+#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E
+#define GL_ALIASED_POINT_SIZE_RANGE 0x846D
+#define GL_ALL_BARRIER_BITS 0xFFFFFFFF
+#define GL_ALL_SHADER_BITS 0xFFFFFFFF
+#define GL_ALPHA 0x1906
+#define GL_ALPHA_BITS 0x0D55
+#define GL_ALREADY_SIGNALED 0x911A
+#define GL_ALWAYS 0x0207
+#define GL_ANY_SAMPLES_PASSED 0x8C2F
+#define GL_ANY_SAMPLES_PASSED_CONSERVATIVE 0x8D6A
+#define GL_ARRAY_BUFFER 0x8892
+#define GL_ARRAY_BUFFER_BINDING 0x8894
+#define GL_ARRAY_SIZE 0x92FB
+#define GL_ARRAY_STRIDE 0x92FE
+#define GL_ATOMIC_COUNTER_BARRIER_BIT 0x00001000
+#define GL_ATOMIC_COUNTER_BUFFER 0x92C0
+#define GL_ATOMIC_COUNTER_BUFFER_BINDING 0x92C1
+#define GL_ATOMIC_COUNTER_BUFFER_INDEX 0x9301
+#define GL_ATOMIC_COUNTER_BUFFER_SIZE 0x92C3
+#define GL_ATOMIC_COUNTER_BUFFER_START 0x92C2
+#define GL_ATTACHED_SHADERS 0x8B85
+#define GL_BACK 0x0405
+#define GL_BLEND 0x0BE2
+#define GL_BLEND_COLOR 0x8005
+#define GL_BLEND_DST_ALPHA 0x80CA
+#define GL_BLEND_DST_RGB 0x80C8
+#define GL_BLEND_EQUATION 0x8009
+#define GL_BLEND_EQUATION_ALPHA 0x883D
+#define GL_BLEND_EQUATION_RGB 0x8009
+#define GL_BLEND_SRC_ALPHA 0x80CB
+#define GL_BLEND_SRC_RGB 0x80C9
+#define GL_BLOCK_INDEX 0x92FD
+#define GL_BLUE 0x1905
+#define GL_BLUE_BITS 0x0D54
+#define GL_BOOL 0x8B56
+#define GL_BOOL_VEC2 0x8B57
+#define GL_BOOL_VEC3 0x8B58
+#define GL_BOOL_VEC4 0x8B59
+#define GL_BUFFER 0x82E0
+#define GL_BUFFER_ACCESS_FLAGS 0x911F
+#define GL_BUFFER_BINDING 0x9302
+#define GL_BUFFER_DATA_SIZE 0x9303
+#define GL_BUFFER_MAPPED 0x88BC
+#define GL_BUFFER_MAP_LENGTH 0x9120
+#define GL_BUFFER_MAP_OFFSET 0x9121
+#define GL_BUFFER_MAP_POINTER 0x88BD
+#define GL_BUFFER_SIZE 0x8764
+#define GL_BUFFER_UPDATE_BARRIER_BIT 0x00000200
+#define GL_BUFFER_USAGE 0x8765
+#define GL_BUFFER_VARIABLE 0x92E5
+#define GL_BYTE 0x1400
+#define GL_CCW 0x0901
+#define GL_CLAMP_TO_BORDER 0x812D
+#define GL_CLAMP_TO_EDGE 0x812F
+#define GL_COLOR 0x1800
+#define GL_COLORBURN 0x929A
+#define GL_COLORDODGE 0x9299
+#define GL_COLOR_ATTACHMENT0 0x8CE0
+#define GL_COLOR_ATTACHMENT1 0x8CE1
+#define GL_COLOR_ATTACHMENT10 0x8CEA
+#define GL_COLOR_ATTACHMENT11 0x8CEB
+#define GL_COLOR_ATTACHMENT12 0x8CEC
+#define GL_COLOR_ATTACHMENT13 0x8CED
+#define GL_COLOR_ATTACHMENT14 0x8CEE
+#define GL_COLOR_ATTACHMENT15 0x8CEF
+#define GL_COLOR_ATTACHMENT16 0x8CF0
+#define GL_COLOR_ATTACHMENT17 0x8CF1
+#define GL_COLOR_ATTACHMENT18 0x8CF2
+#define GL_COLOR_ATTACHMENT19 0x8CF3
+#define GL_COLOR_ATTACHMENT2 0x8CE2
+#define GL_COLOR_ATTACHMENT20 0x8CF4
+#define GL_COLOR_ATTACHMENT21 0x8CF5
+#define GL_COLOR_ATTACHMENT22 0x8CF6
+#define GL_COLOR_ATTACHMENT23 0x8CF7
+#define GL_COLOR_ATTACHMENT24 0x8CF8
+#define GL_COLOR_ATTACHMENT25 0x8CF9
+#define GL_COLOR_ATTACHMENT26 0x8CFA
+#define GL_COLOR_ATTACHMENT27 0x8CFB
+#define GL_COLOR_ATTACHMENT28 0x8CFC
+#define GL_COLOR_ATTACHMENT29 0x8CFD
+#define GL_COLOR_ATTACHMENT3 0x8CE3
+#define GL_COLOR_ATTACHMENT30 0x8CFE
+#define GL_COLOR_ATTACHMENT31 0x8CFF
+#define GL_COLOR_ATTACHMENT4 0x8CE4
+#define GL_COLOR_ATTACHMENT5 0x8CE5
+#define GL_COLOR_ATTACHMENT6 0x8CE6
+#define GL_COLOR_ATTACHMENT7 0x8CE7
+#define GL_COLOR_ATTACHMENT8 0x8CE8
+#define GL_COLOR_ATTACHMENT9 0x8CE9
+#define GL_COLOR_BUFFER_BIT 0x00004000
+#define GL_COLOR_CLEAR_VALUE 0x0C22
+#define GL_COLOR_WRITEMASK 0x0C23
+#define GL_COMMAND_BARRIER_BIT 0x00000040
+#define GL_COMPARE_REF_TO_TEXTURE 0x884E
+#define GL_COMPARE_R_TO_TEXTURE 0x884E
+#define GL_COMPILE_STATUS 0x8B81
+#define GL_COMPRESSED_R11_EAC 0x9270
+#define GL_COMPRESSED_RG11_EAC 0x9272
+#define GL_COMPRESSED_RGB8_ETC2 0x9274
+#define GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9276
+#define GL_COMPRESSED_RGBA8_ETC2_EAC 0x9278
+#define GL_COMPRESSED_RGBA_ASTC_10x10 0x93BB
+#define GL_COMPRESSED_RGBA_ASTC_10x10_KHR 0x93BB
+#define GL_COMPRESSED_RGBA_ASTC_10x5 0x93B8
+#define GL_COMPRESSED_RGBA_ASTC_10x5_KHR 0x93B8
+#define GL_COMPRESSED_RGBA_ASTC_10x6 0x93B9
+#define GL_COMPRESSED_RGBA_ASTC_10x6_KHR 0x93B9
+#define GL_COMPRESSED_RGBA_ASTC_10x8 0x93BA
+#define GL_COMPRESSED_RGBA_ASTC_10x8_KHR 0x93BA
+#define GL_COMPRESSED_RGBA_ASTC_12x10 0x93BC
+#define GL_COMPRESSED_RGBA_ASTC_12x10_KHR 0x93BC
+#define GL_COMPRESSED_RGBA_ASTC_12x12 0x93BD
+#define GL_COMPRESSED_RGBA_ASTC_12x12_KHR 0x93BD
+#define GL_COMPRESSED_RGBA_ASTC_3x3x3_OES 0x93C0
+#define GL_COMPRESSED_RGBA_ASTC_4x3x3_OES 0x93C1
+#define GL_COMPRESSED_RGBA_ASTC_4x4 0x93B0
+#define GL_COMPRESSED_RGBA_ASTC_4x4_KHR 0x93B0
+#define GL_COMPRESSED_RGBA_ASTC_4x4x3_OES 0x93C2
+#define GL_COMPRESSED_RGBA_ASTC_4x4x4_OES 0x93C3
+#define GL_COMPRESSED_RGBA_ASTC_5x4 0x93B1
+#define GL_COMPRESSED_RGBA_ASTC_5x4_KHR 0x93B1
+#define GL_COMPRESSED_RGBA_ASTC_5x4x4_OES 0x93C4
+#define GL_COMPRESSED_RGBA_ASTC_5x5 0x93B2
+#define GL_COMPRESSED_RGBA_ASTC_5x5_KHR 0x93B2
+#define GL_COMPRESSED_RGBA_ASTC_5x5x4_OES 0x93C5
+#define GL_COMPRESSED_RGBA_ASTC_5x5x5_OES 0x93C6
+#define GL_COMPRESSED_RGBA_ASTC_6x5 0x93B3
+#define GL_COMPRESSED_RGBA_ASTC_6x5_KHR 0x93B3
+#define GL_COMPRESSED_RGBA_ASTC_6x5x5_OES 0x93C7
+#define GL_COMPRESSED_RGBA_ASTC_6x6 0x93B4
+#define GL_COMPRESSED_RGBA_ASTC_6x6_KHR 0x93B4
+#define GL_COMPRESSED_RGBA_ASTC_6x6x5_OES 0x93C8
+#define GL_COMPRESSED_RGBA_ASTC_6x6x6_OES 0x93C9
+#define GL_COMPRESSED_RGBA_ASTC_8x5 0x93B5
+#define GL_COMPRESSED_RGBA_ASTC_8x5_KHR 0x93B5
+#define GL_COMPRESSED_RGBA_ASTC_8x6 0x93B6
+#define GL_COMPRESSED_RGBA_ASTC_8x6_KHR 0x93B6
+#define GL_COMPRESSED_RGBA_ASTC_8x8 0x93B7
+#define GL_COMPRESSED_RGBA_ASTC_8x8_KHR 0x93B7
+#define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1
+#define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0
+#define GL_COMPRESSED_SIGNED_R11_EAC 0x9271
+#define GL_COMPRESSED_SIGNED_RG11_EAC 0x9273
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10 0x93DB
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR 0x93DB
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5 0x93D8
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR 0x93D8
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6 0x93D9
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR 0x93D9
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8 0x93DA
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR 0x93DA
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10 0x93DC
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR 0x93DC
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12 0x93DD
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR 0x93DD
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_3x3x3_OES 0x93E0
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x3x3_OES 0x93E1
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4 0x93D0
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR 0x93D0
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4x3_OES 0x93E2
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4x4_OES 0x93E3
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4 0x93D1
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR 0x93D1
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4x4_OES 0x93E4
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5 0x93D2
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR 0x93D2
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5x4_OES 0x93E5
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5x5_OES 0x93E6
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5 0x93D3
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR 0x93D3
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5x5_OES 0x93E7
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6 0x93D4
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR 0x93D4
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6x5_OES 0x93E8
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6x6_OES 0x93E9
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5 0x93D5
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR 0x93D5
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6 0x93D6
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR 0x93D6
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8 0x93D7
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR 0x93D7
+#define GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC 0x9279
+#define GL_COMPRESSED_SRGB8_ETC2 0x9275
+#define GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9277
+#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3
+#define GL_COMPUTE_SHADER 0x91B9
+#define GL_COMPUTE_SHADER_BIT 0x00000020
+#define GL_COMPUTE_WORK_GROUP_SIZE 0x8267
+#define GL_CONDITION_SATISFIED 0x911C
+#define GL_CONSTANT_ALPHA 0x8003
+#define GL_CONSTANT_COLOR 0x8001
+#define GL_CONTEXT_FLAGS 0x821E
+#define GL_CONTEXT_FLAG_DEBUG_BIT 0x00000002
+#define GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT 0x00000004
+#define GL_CONTEXT_LOST 0x0507
+#define GL_COPY_READ_BUFFER 0x8F36
+#define GL_COPY_READ_BUFFER_BINDING 0x8F36
+#define GL_COPY_WRITE_BUFFER 0x8F37
+#define GL_COPY_WRITE_BUFFER_BINDING 0x8F37
+#define GL_CULL_FACE 0x0B44
+#define GL_CULL_FACE_MODE 0x0B45
+#define GL_CURRENT_PROGRAM 0x8B8D
+#define GL_CURRENT_QUERY 0x8865
+#define GL_CURRENT_VERTEX_ATTRIB 0x8626
+#define GL_CW 0x0900
+#define GL_DARKEN 0x9297
+#define GL_DEBUG_CALLBACK_FUNCTION 0x8244
+#define GL_DEBUG_CALLBACK_USER_PARAM 0x8245
+#define GL_DEBUG_GROUP_STACK_DEPTH 0x826D
+#define GL_DEBUG_LOGGED_MESSAGES 0x9145
+#define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH 0x8243
+#define GL_DEBUG_OUTPUT 0x92E0
+#define GL_DEBUG_OUTPUT_SYNCHRONOUS 0x8242
+#define GL_DEBUG_SEVERITY_HIGH 0x9146
+#define GL_DEBUG_SEVERITY_LOW 0x9148
+#define GL_DEBUG_SEVERITY_MEDIUM 0x9147
+#define GL_DEBUG_SEVERITY_NOTIFICATION 0x826B
+#define GL_DEBUG_SOURCE_API 0x8246
+#define GL_DEBUG_SOURCE_APPLICATION 0x824A
+#define GL_DEBUG_SOURCE_OTHER 0x824B
+#define GL_DEBUG_SOURCE_SHADER_COMPILER 0x8248
+#define GL_DEBUG_SOURCE_THIRD_PARTY 0x8249
+#define GL_DEBUG_SOURCE_WINDOW_SYSTEM 0x8247
+#define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR 0x824D
+#define GL_DEBUG_TYPE_ERROR 0x824C
+#define GL_DEBUG_TYPE_MARKER 0x8268
+#define GL_DEBUG_TYPE_OTHER 0x8251
+#define GL_DEBUG_TYPE_PERFORMANCE 0x8250
+#define GL_DEBUG_TYPE_POP_GROUP 0x826A
+#define GL_DEBUG_TYPE_PORTABILITY 0x824F
+#define GL_DEBUG_TYPE_PUSH_GROUP 0x8269
+#define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR 0x824E
+#define GL_DECR 0x1E03
+#define GL_DECR_WRAP 0x8508
+#define GL_DELETE_STATUS 0x8B80
+#define GL_DEPTH 0x1801
+#define GL_DEPTH24_STENCIL8 0x88F0
+#define GL_DEPTH32F_STENCIL8 0x8CAD
+#define GL_DEPTH_ATTACHMENT 0x8D00
+#define GL_DEPTH_BITS 0x0D56
+#define GL_DEPTH_BUFFER_BIT 0x00000100
+#define GL_DEPTH_CLEAR_VALUE 0x0B73
+#define GL_DEPTH_COMPONENT 0x1902
+#define GL_DEPTH_COMPONENT16 0x81A5
+#define GL_DEPTH_COMPONENT24 0x81A6
+#define GL_DEPTH_COMPONENT32F 0x8CAC
+#define GL_DEPTH_FUNC 0x0B74
+#define GL_DEPTH_RANGE 0x0B70
+#define GL_DEPTH_STENCIL 0x84F9
+#define GL_DEPTH_STENCIL_ATTACHMENT 0x821A
+#define GL_DEPTH_STENCIL_TEXTURE_MODE 0x90EA
+#define GL_DEPTH_TEST 0x0B71
+#define GL_DEPTH_WRITEMASK 0x0B72
+#define GL_DIFFERENCE 0x929E
+#define GL_DISPATCH_INDIRECT_BUFFER 0x90EE
+#define GL_DISPATCH_INDIRECT_BUFFER_BINDING 0x90EF
+#define GL_DITHER 0x0BD0
+#define GL_DONT_CARE 0x1100
+#define GL_DRAW_BUFFER0 0x8825
+#define GL_DRAW_BUFFER1 0x8826
+#define GL_DRAW_BUFFER10 0x882F
+#define GL_DRAW_BUFFER11 0x8830
+#define GL_DRAW_BUFFER12 0x8831
+#define GL_DRAW_BUFFER13 0x8832
+#define GL_DRAW_BUFFER14 0x8833
+#define GL_DRAW_BUFFER15 0x8834
+#define GL_DRAW_BUFFER2 0x8827
+#define GL_DRAW_BUFFER3 0x8828
+#define GL_DRAW_BUFFER4 0x8829
+#define GL_DRAW_BUFFER5 0x882A
+#define GL_DRAW_BUFFER6 0x882B
+#define GL_DRAW_BUFFER7 0x882C
+#define GL_DRAW_BUFFER8 0x882D
+#define GL_DRAW_BUFFER9 0x882E
+#define GL_DRAW_FRAMEBUFFER 0x8CA9
+#define GL_DRAW_FRAMEBUFFER_BINDING 0x8CA6
+#define GL_DRAW_INDIRECT_BUFFER 0x8F3F
+#define GL_DRAW_INDIRECT_BUFFER_BINDING 0x8F43
+#define GL_DST_ALPHA 0x0304
+#define GL_DST_COLOR 0x0306
+#define GL_DYNAMIC_COPY 0x88EA
+#define GL_DYNAMIC_DRAW 0x88E8
+#define GL_DYNAMIC_READ 0x88E9
+#define GL_ELEMENT_ARRAY_BARRIER_BIT 0x00000002
+#define GL_ELEMENT_ARRAY_BUFFER 0x8893
+#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895
+#define GL_EQUAL 0x0202
+#define GL_EXCLUSION 0x92A0
+#define GL_EXTENSIONS 0x1F03
+#define GL_FALSE 0
+#define GL_FASTEST 0x1101
+#define GL_FIRST_VERTEX_CONVENTION 0x8E4D
+#define GL_FIRST_VERTEX_CONVENTION_EXT 0x8E4D
+#define GL_FIXED 0x140C
+#define GL_FLOAT 0x1406
+#define GL_FLOAT_32_UNSIGNED_INT_24_8_REV 0x8DAD
+#define GL_FLOAT_MAT2 0x8B5A
+#define GL_FLOAT_MAT2x3 0x8B65
+#define GL_FLOAT_MAT2x4 0x8B66
+#define GL_FLOAT_MAT3 0x8B5B
+#define GL_FLOAT_MAT3x2 0x8B67
+#define GL_FLOAT_MAT3x4 0x8B68
+#define GL_FLOAT_MAT4 0x8B5C
+#define GL_FLOAT_MAT4x2 0x8B69
+#define GL_FLOAT_MAT4x3 0x8B6A
+#define GL_FLOAT_VEC2 0x8B50
+#define GL_FLOAT_VEC3 0x8B51
+#define GL_FLOAT_VEC4 0x8B52
+#define GL_FRACTIONAL_EVEN 0x8E7C
+#define GL_FRACTIONAL_ODD 0x8E7B
+#define GL_FRAGMENT_INTERPOLATION_OFFSET_BITS 0x8E5D
+#define GL_FRAGMENT_SHADER 0x8B30
+#define GL_FRAGMENT_SHADER_BIT 0x00000002
+#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT 0x8B8B
+#define GL_FRAMEBUFFER 0x8D40
+#define GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE 0x8215
+#define GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE 0x8214
+#define GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING 0x8210
+#define GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE 0x8211
+#define GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE 0x8216
+#define GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE 0x8213
+#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED 0x8DA7
+#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED_EXT 0x8DA7
+#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1
+#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0
+#define GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE 0x8212
+#define GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE 0x8217
+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3
+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER 0x8CD4
+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2
+#define GL_FRAMEBUFFER_BARRIER_BIT 0x00000400
+#define GL_FRAMEBUFFER_BINDING 0x8CA6
+#define GL_FRAMEBUFFER_COMPLETE 0x8CD5
+#define GL_FRAMEBUFFER_DEFAULT 0x8218
+#define GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS 0x9314
+#define GL_FRAMEBUFFER_DEFAULT_HEIGHT 0x9311
+#define GL_FRAMEBUFFER_DEFAULT_LAYERS 0x9312
+#define GL_FRAMEBUFFER_DEFAULT_LAYERS_EXT 0x9312
+#define GL_FRAMEBUFFER_DEFAULT_SAMPLES 0x9313
+#define GL_FRAMEBUFFER_DEFAULT_WIDTH 0x9310
+#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6
+#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS 0x8CD9
+#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS 0x8DA8
+#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT 0x8DA8
+#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7
+#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE 0x8D56
+#define GL_FRAMEBUFFER_UNDEFINED 0x8219
+#define GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD
+#define GL_FRONT 0x0404
+#define GL_FRONT_AND_BACK 0x0408
+#define GL_FRONT_FACE 0x0B46
+#define GL_FUNC_ADD 0x8006
+#define GL_FUNC_REVERSE_SUBTRACT 0x800B
+#define GL_FUNC_SUBTRACT 0x800A
+#define GL_GENERATE_MIPMAP_HINT 0x8192
+#define GL_GEOMETRY_INPUT_TYPE 0x8917
+#define GL_GEOMETRY_LINKED_INPUT_TYPE_EXT 0x8917
+#define GL_GEOMETRY_LINKED_OUTPUT_TYPE_EXT 0x8918
+#define GL_GEOMETRY_LINKED_VERTICES_OUT_EXT 0x8916
+#define GL_GEOMETRY_OUTPUT_TYPE 0x8918
+#define GL_GEOMETRY_SHADER 0x8DD9
+#define GL_GEOMETRY_SHADER_BIT 0x00000004
+#define GL_GEOMETRY_SHADER_BIT_EXT 0x00000004
+#define GL_GEOMETRY_SHADER_EXT 0x8DD9
+#define GL_GEOMETRY_SHADER_INVOCATIONS 0x887F
+#define GL_GEOMETRY_SHADER_INVOCATIONS_EXT 0x887F
+#define GL_GEOMETRY_VERTICES_OUT 0x8916
+#define GL_GEQUAL 0x0206
+#define GL_GREATER 0x0204
+#define GL_GREEN 0x1904
+#define GL_GREEN_BITS 0x0D53
+#define GL_GUILTY_CONTEXT_RESET 0x8253
+#define GL_HALF_FLOAT 0x140B
+#define GL_HARDLIGHT 0x929B
+#define GL_HIGH_FLOAT 0x8DF2
+#define GL_HIGH_INT 0x8DF5
+#define GL_HSL_COLOR 0x92AF
+#define GL_HSL_HUE 0x92AD
+#define GL_HSL_LUMINOSITY 0x92B0
+#define GL_HSL_SATURATION 0x92AE
+#define GL_IMAGE_2D 0x904D
+#define GL_IMAGE_2D_ARRAY 0x9053
+#define GL_IMAGE_3D 0x904E
+#define GL_IMAGE_BINDING_ACCESS 0x8F3E
+#define GL_IMAGE_BINDING_FORMAT 0x906E
+#define GL_IMAGE_BINDING_LAYER 0x8F3D
+#define GL_IMAGE_BINDING_LAYERED 0x8F3C
+#define GL_IMAGE_BINDING_LEVEL 0x8F3B
+#define GL_IMAGE_BINDING_NAME 0x8F3A
+#define GL_IMAGE_BUFFER 0x9051
+#define GL_IMAGE_CUBE 0x9050
+#define GL_IMAGE_CUBE_MAP_ARRAY 0x9054
+#define GL_IMAGE_FORMAT_COMPATIBILITY_BY_CLASS 0x90C9
+#define GL_IMAGE_FORMAT_COMPATIBILITY_BY_SIZE 0x90C8
+#define GL_IMAGE_FORMAT_COMPATIBILITY_TYPE 0x90C7
+#define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B
+#define GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A
+#define GL_INCR 0x1E02
+#define GL_INCR_WRAP 0x8507
+#define GL_INFO_LOG_LENGTH 0x8B84
+#define GL_INNOCENT_CONTEXT_RESET 0x8254
+#define GL_INT 0x1404
+#define GL_INTERLEAVED_ATTRIBS 0x8C8C
+#define GL_INT_2_10_10_10_REV 0x8D9F
+#define GL_INT_IMAGE_2D 0x9058
+#define GL_INT_IMAGE_2D_ARRAY 0x905E
+#define GL_INT_IMAGE_3D 0x9059
+#define GL_INT_IMAGE_BUFFER 0x905C
+#define GL_INT_IMAGE_CUBE 0x905B
+#define GL_INT_IMAGE_CUBE_MAP_ARRAY 0x905F
+#define GL_INT_SAMPLER_2D 0x8DCA
+#define GL_INT_SAMPLER_2D_ARRAY 0x8DCF
+#define GL_INT_SAMPLER_2D_MULTISAMPLE 0x9109
+#define GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910C
+#define GL_INT_SAMPLER_3D 0x8DCB
+#define GL_INT_SAMPLER_BUFFER 0x8DD0
+#define GL_INT_SAMPLER_CUBE 0x8DCC
+#define GL_INT_SAMPLER_CUBE_MAP_ARRAY 0x900E
+#define GL_INT_VEC2 0x8B53
+#define GL_INT_VEC3 0x8B54
+#define GL_INT_VEC4 0x8B55
+#define GL_INVALID_ENUM 0x0500
+#define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506
+#define GL_INVALID_INDEX 0xFFFFFFFF
+#define GL_INVALID_OPERATION 0x0502
+#define GL_INVALID_VALUE 0x0501
+#define GL_INVERT 0x150A
+#define GL_ISOLINES 0x8E7A
+#define GL_IS_PER_PATCH 0x92E7
+#define GL_IS_ROW_MAJOR 0x9300
+#define GL_KEEP 0x1E00
+#define GL_LAST_VERTEX_CONVENTION 0x8E4E
+#define GL_LAST_VERTEX_CONVENTION_EXT 0x8E4E
+#define GL_LAYER_PROVOKING_VERTEX 0x825E
+#define GL_LAYER_PROVOKING_VERTEX_EXT 0x825E
+#define GL_LEQUAL 0x0203
+#define GL_LESS 0x0201
+#define GL_LIGHTEN 0x9298
+#define GL_LINEAR 0x2601
+#define GL_LINEAR_MIPMAP_LINEAR 0x2703
+#define GL_LINEAR_MIPMAP_NEAREST 0x2701
+#define GL_LINES 0x0001
+#define GL_LINES_ADJACENCY 0x000A
+#define GL_LINES_ADJACENCY_EXT 0x000A
+#define GL_LINE_LOOP 0x0002
+#define GL_LINE_STRIP 0x0003
+#define GL_LINE_STRIP_ADJACENCY 0x000B
+#define GL_LINE_STRIP_ADJACENCY_EXT 0x000B
+#define GL_LINE_WIDTH 0x0B21
+#define GL_LINK_STATUS 0x8B82
+#define GL_LOCATION 0x930E
+#define GL_LOSE_CONTEXT_ON_RESET 0x8252
+#define GL_LOW_FLOAT 0x8DF0
+#define GL_LOW_INT 0x8DF3
+#define GL_LUMINANCE 0x1909
+#define GL_LUMINANCE_ALPHA 0x190A
+#define GL_MAJOR_VERSION 0x821B
+#define GL_MAP_FLUSH_EXPLICIT_BIT 0x0010
+#define GL_MAP_INVALIDATE_BUFFER_BIT 0x0008
+#define GL_MAP_INVALIDATE_RANGE_BIT 0x0004
+#define GL_MAP_READ_BIT 0x0001
+#define GL_MAP_UNSYNCHRONIZED_BIT 0x0020
+#define GL_MAP_WRITE_BIT 0x0002
+#define GL_MATRIX_STRIDE 0x92FF
+#define GL_MAX 0x8008
+#define GL_MAX_3D_TEXTURE_SIZE 0x8073
+#define GL_MAX_ARRAY_TEXTURE_LAYERS 0x88FF
+#define GL_MAX_ATOMIC_COUNTER_BUFFER_BINDINGS 0x92DC
+#define GL_MAX_ATOMIC_COUNTER_BUFFER_SIZE 0x92D8
+#define GL_MAX_COLOR_ATTACHMENTS 0x8CDF
+#define GL_MAX_COLOR_TEXTURE_SAMPLES 0x910E
+#define GL_MAX_COMBINED_ATOMIC_COUNTERS 0x92D7
+#define GL_MAX_COMBINED_ATOMIC_COUNTER_BUFFERS 0x92D1
+#define GL_MAX_COMBINED_COMPUTE_UNIFORM_COMPONENTS 0x8266
+#define GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS 0x8A33
+#define GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS 0x8A32
+#define GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS_EXT 0x8A32
+#define GL_MAX_COMBINED_IMAGE_UNIFORMS 0x90CF
+#define GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS 0x8F39
+#define GL_MAX_COMBINED_SHADER_OUTPUT_RESOURCES 0x8F39
+#define GL_MAX_COMBINED_SHADER_STORAGE_BLOCKS 0x90DC
+#define GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS 0x8E1E
+#define GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS 0x8E1F
+#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D
+#define GL_MAX_COMBINED_UNIFORM_BLOCKS 0x8A2E
+#define GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS 0x8A31
+#define GL_MAX_COMPUTE_ATOMIC_COUNTERS 0x8265
+#define GL_MAX_COMPUTE_ATOMIC_COUNTER_BUFFERS 0x8264
+#define GL_MAX_COMPUTE_IMAGE_UNIFORMS 0x91BD
+#define GL_MAX_COMPUTE_SHADER_STORAGE_BLOCKS 0x90DB
+#define GL_MAX_COMPUTE_SHARED_MEMORY_SIZE 0x8262
+#define GL_MAX_COMPUTE_TEXTURE_IMAGE_UNITS 0x91BC
+#define GL_MAX_COMPUTE_UNIFORM_BLOCKS 0x91BB
+#define GL_MAX_COMPUTE_UNIFORM_COMPONENTS 0x8263
+#define GL_MAX_COMPUTE_WORK_GROUP_COUNT 0x91BE
+#define GL_MAX_COMPUTE_WORK_GROUP_INVOCATIONS 0x90EB
+#define GL_MAX_COMPUTE_WORK_GROUP_SIZE 0x91BF
+#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C
+#define GL_MAX_DEBUG_GROUP_STACK_DEPTH 0x826C
+#define GL_MAX_DEBUG_LOGGED_MESSAGES 0x9144
+#define GL_MAX_DEBUG_MESSAGE_LENGTH 0x9143
+#define GL_MAX_DEPTH_TEXTURE_SAMPLES 0x910F
+#define GL_MAX_DRAW_BUFFERS 0x8824
+#define GL_MAX_ELEMENTS_INDICES 0x80E9
+#define GL_MAX_ELEMENTS_VERTICES 0x80E8
+#define GL_MAX_ELEMENT_INDEX 0x8D6B
+#define GL_MAX_FRAGMENT_ATOMIC_COUNTERS 0x92D6
+#define GL_MAX_FRAGMENT_ATOMIC_COUNTER_BUFFERS 0x92D0
+#define GL_MAX_FRAGMENT_IMAGE_UNIFORMS 0x90CE
+#define GL_MAX_FRAGMENT_INPUT_COMPONENTS 0x9125
+#define GL_MAX_FRAGMENT_INTERPOLATION_OFFSET 0x8E5C
+#define GL_MAX_FRAGMENT_SHADER_STORAGE_BLOCKS 0x90DA
+#define GL_MAX_FRAGMENT_UNIFORM_BLOCKS 0x8A2D
+#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS 0x8B49
+#define GL_MAX_FRAGMENT_UNIFORM_VECTORS 0x8DFD
+#define GL_MAX_FRAMEBUFFER_HEIGHT 0x9316
+#define GL_MAX_FRAMEBUFFER_LAYERS 0x9317
+#define GL_MAX_FRAMEBUFFER_LAYERS_EXT 0x9317
+#define GL_MAX_FRAMEBUFFER_SAMPLES 0x9318
+#define GL_MAX_FRAMEBUFFER_WIDTH 0x9315
+#define GL_MAX_GEOMETRY_ATOMIC_COUNTERS 0x92D5
+#define GL_MAX_GEOMETRY_ATOMIC_COUNTERS_EXT 0x92D5
+#define GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS 0x92CF
+#define GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS_EXT 0x92CF
+#define GL_MAX_GEOMETRY_IMAGE_UNIFORMS 0x90CD
+#define GL_MAX_GEOMETRY_IMAGE_UNIFORMS_EXT 0x90CD
+#define GL_MAX_GEOMETRY_INPUT_COMPONENTS 0x9123
+#define GL_MAX_GEOMETRY_INPUT_COMPONENTS_EXT 0x9123
+#define GL_MAX_GEOMETRY_OUTPUT_COMPONENTS 0x9124
+#define GL_MAX_GEOMETRY_OUTPUT_COMPONENTS_EXT 0x9124
+#define GL_MAX_GEOMETRY_OUTPUT_VERTICES 0x8DE0
+#define GL_MAX_GEOMETRY_OUTPUT_VERTICES_EXT 0x8DE0
+#define GL_MAX_GEOMETRY_SHADER_INVOCATIONS 0x8E5A
+#define GL_MAX_GEOMETRY_SHADER_INVOCATIONS_EXT 0x8E5A
+#define GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS 0x90D7
+#define GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS_EXT 0x90D7
+#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS 0x8C29
+#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT 0x8C29
+#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS 0x8DE1
+#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_EXT 0x8DE1
+#define GL_MAX_GEOMETRY_UNIFORM_BLOCKS 0x8A2C
+#define GL_MAX_GEOMETRY_UNIFORM_BLOCKS_EXT 0x8A2C
+#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS 0x8DDF
+#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_EXT 0x8DDF
+#define GL_MAX_IMAGE_UNITS 0x8F38
+#define GL_MAX_INTEGER_SAMPLES 0x9110
+#define GL_MAX_LABEL_LENGTH 0x82E8
+#define GL_MAX_NAME_LENGTH 0x92F6
+#define GL_MAX_NUM_ACTIVE_VARIABLES 0x92F7
+#define GL_MAX_PATCH_VERTICES 0x8E7D
+#define GL_MAX_PROGRAM_TEXEL_OFFSET 0x8905
+#define GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET 0x8E5F
+#define GL_MAX_RENDERBUFFER_SIZE 0x84E8
+#define GL_MAX_SAMPLES 0x8D57
+#define GL_MAX_SAMPLE_MASK_WORDS 0x8E59
+#define GL_MAX_SERVER_WAIT_TIMEOUT 0x9111
+#define GL_MAX_SHADER_STORAGE_BLOCK_SIZE 0x90DE
+#define GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS 0x90DD
+#define GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS 0x92D3
+#define GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS 0x92CD
+#define GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS 0x90CB
+#define GL_MAX_TESS_CONTROL_INPUT_COMPONENTS 0x886C
+#define GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS 0x8E83
+#define GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS 0x90D8
+#define GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS 0x8E81
+#define GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS 0x8E85
+#define GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS 0x8E89
+#define GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS 0x8E7F
+#define GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS 0x92D4
+#define GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS 0x92CE
+#define GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS 0x90CC
+#define GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS 0x886D
+#define GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS 0x8E86
+#define GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS 0x90D9
+#define GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS 0x8E82
+#define GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS 0x8E8A
+#define GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS 0x8E80
+#define GL_MAX_TESS_GEN_LEVEL 0x8E7E
+#define GL_MAX_TESS_PATCH_COMPONENTS 0x8E84
+#define GL_MAX_TEXTURE_BUFFER_SIZE 0x8C2B
+#define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872
+#define GL_MAX_TEXTURE_LOD_BIAS 0x84FD
+#define GL_MAX_TEXTURE_MAX_ANISOTROPY 0x84FF
+#define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF
+#define GL_MAX_TEXTURE_SIZE 0x0D33
+#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS 0x8C8A
+#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS 0x8C8B
+#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS 0x8C80
+#define GL_MAX_UNIFORM_BLOCK_SIZE 0x8A30
+#define GL_MAX_UNIFORM_BUFFER_BINDINGS 0x8A2F
+#define GL_MAX_UNIFORM_LOCATIONS 0x826E
+#define GL_MAX_VARYING_COMPONENTS 0x8B4B
+#define GL_MAX_VARYING_FLOATS 0x8B4B
+#define GL_MAX_VARYING_VECTORS 0x8DFC
+#define GL_MAX_VERTEX_ATOMIC_COUNTERS 0x92D2
+#define GL_MAX_VERTEX_ATOMIC_COUNTER_BUFFERS 0x92CC
+#define GL_MAX_VERTEX_ATTRIBS 0x8869
+#define GL_MAX_VERTEX_ATTRIB_BINDINGS 0x82DA
+#define GL_MAX_VERTEX_ATTRIB_RELATIVE_OFFSET 0x82D9
+#define GL_MAX_VERTEX_ATTRIB_STRIDE 0x82E5
+#define GL_MAX_VERTEX_IMAGE_UNIFORMS 0x90CA
+#define GL_MAX_VERTEX_OUTPUT_COMPONENTS 0x9122
+#define GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS 0x90D6
+#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C
+#define GL_MAX_VERTEX_UNIFORM_BLOCKS 0x8A2B
+#define GL_MAX_VERTEX_UNIFORM_COMPONENTS 0x8B4A
+#define GL_MAX_VERTEX_UNIFORM_VECTORS 0x8DFB
+#define GL_MAX_VIEWPORT_DIMS 0x0D3A
+#define GL_MEDIUM_FLOAT 0x8DF1
+#define GL_MEDIUM_INT 0x8DF4
+#define GL_MIN 0x8007
+#define GL_MINOR_VERSION 0x821C
+#define GL_MIN_FRAGMENT_INTERPOLATION_OFFSET 0x8E5B
+#define GL_MIN_PROGRAM_TEXEL_OFFSET 0x8904
+#define GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET 0x8E5E
+#define GL_MIN_SAMPLE_SHADING_VALUE 0x8C37
+#define GL_MIRRORED_REPEAT 0x8370
+#define GL_MULTIPLY 0x9294
+#define GL_MULTISAMPLE_LINE_WIDTH_GRANULARITY 0x9382
+#define GL_MULTISAMPLE_LINE_WIDTH_RANGE 0x9381
+#define GL_NAME_LENGTH 0x92F9
+#define GL_NEAREST 0x2600
+#define GL_NEAREST_MIPMAP_LINEAR 0x2702
+#define GL_NEAREST_MIPMAP_NEAREST 0x2700
+#define GL_NEVER 0x0200
+#define GL_NICEST 0x1102
+#define GL_NONE 0
+#define GL_NOTEQUAL 0x0205
+#define GL_NO_ERROR 0
+#define GL_NO_RESET_NOTIFICATION 0x8261
+#define GL_NUM_ACTIVE_VARIABLES 0x9304
+#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
+#define GL_NUM_EXTENSIONS 0x821D
+#define GL_NUM_PROGRAM_BINARY_FORMATS 0x87FE
+#define GL_NUM_SAMPLE_COUNTS 0x9380
+#define GL_NUM_SHADER_BINARY_FORMATS 0x8DF9
+#define GL_OBJECT_TYPE 0x9112
+#define GL_OFFSET 0x92FC
+#define GL_ONE 1
+#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004
+#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002
+#define GL_ONE_MINUS_DST_ALPHA 0x0305
+#define GL_ONE_MINUS_DST_COLOR 0x0307
+#define GL_ONE_MINUS_SRC_ALPHA 0x0303
+#define GL_ONE_MINUS_SRC_COLOR 0x0301
+#define GL_OUT_OF_MEMORY 0x0505
+#define GL_OVERLAY 0x9296
+#define GL_PACK_ALIGNMENT 0x0D05
+#define GL_PACK_ROW_LENGTH 0x0D02
+#define GL_PACK_SKIP_PIXELS 0x0D04
+#define GL_PACK_SKIP_ROWS 0x0D03
+#define GL_PATCHES 0x000E
+#define GL_PATCH_VERTICES 0x8E72
+#define GL_PIXEL_BUFFER_BARRIER_BIT 0x00000080
+#define GL_PIXEL_PACK_BUFFER 0x88EB
+#define GL_PIXEL_PACK_BUFFER_BINDING 0x88ED
+#define GL_PIXEL_UNPACK_BUFFER 0x88EC
+#define GL_PIXEL_UNPACK_BUFFER_BINDING 0x88EF
+#define GL_POINTS 0x0000
+#define GL_POLYGON_OFFSET_FACTOR 0x8038
+#define GL_POLYGON_OFFSET_FILL 0x8037
+#define GL_POLYGON_OFFSET_UNITS 0x2A00
+#define GL_PRIMITIVES_GENERATED 0x8C87
+#define GL_PRIMITIVES_GENERATED_EXT 0x8C87
+#define GL_PRIMITIVE_BOUNDING_BOX 0x92BE
+#define GL_PRIMITIVE_RESTART_FIXED_INDEX 0x8D69
+#define GL_PRIMITIVE_RESTART_FOR_PATCHES_SUPPORTED 0x8221
+#define GL_PROGRAM 0x82E2
+#define GL_PROGRAM_BINARY_FORMATS 0x87FF
+#define GL_PROGRAM_BINARY_LENGTH 0x8741
+#define GL_PROGRAM_BINARY_RETRIEVABLE_HINT 0x8257
+#define GL_PROGRAM_INPUT 0x92E3
+#define GL_PROGRAM_OUTPUT 0x92E4
+#define GL_PROGRAM_PIPELINE 0x82E4
+#define GL_PROGRAM_PIPELINE_BINDING 0x825A
+#define GL_PROGRAM_SEPARABLE 0x8258
+#define GL_QUADS 0x0007
+#define GL_QUERY 0x82E3
+#define GL_QUERY_RESULT 0x8866
+#define GL_QUERY_RESULT_AVAILABLE 0x8867
+#define GL_R11F_G11F_B10F 0x8C3A
+#define GL_R16F 0x822D
+#define GL_R16I 0x8233
+#define GL_R16UI 0x8234
+#define GL_R32F 0x822E
+#define GL_R32I 0x8235
+#define GL_R32UI 0x8236
+#define GL_R8 0x8229
+#define GL_R8I 0x8231
+#define GL_R8UI 0x8232
+#define GL_R8_SNORM 0x8F94
+#define GL_RASTERIZER_DISCARD 0x8C89
+#define GL_READ_BUFFER 0x0C02
+#define GL_READ_FRAMEBUFFER 0x8CA8
+#define GL_READ_FRAMEBUFFER_BINDING 0x8CAA
+#define GL_READ_ONLY 0x88B8
+#define GL_READ_WRITE 0x88BA
+#define GL_RED 0x1903
+#define GL_RED_BITS 0x0D52
+#define GL_RED_INTEGER 0x8D94
+#define GL_REFERENCED_BY_COMPUTE_SHADER 0x930B
+#define GL_REFERENCED_BY_FRAGMENT_SHADER 0x930A
+#define GL_REFERENCED_BY_GEOMETRY_SHADER 0x9309
+#define GL_REFERENCED_BY_GEOMETRY_SHADER_EXT 0x9309
+#define GL_REFERENCED_BY_TESS_CONTROL_SHADER 0x9307
+#define GL_REFERENCED_BY_TESS_EVALUATION_SHADER 0x9308
+#define GL_REFERENCED_BY_VERTEX_SHADER 0x9306
+#define GL_RENDERBUFFER 0x8D41
+#define GL_RENDERBUFFER_ALPHA_SIZE 0x8D53
+#define GL_RENDERBUFFER_BINDING 0x8CA7
+#define GL_RENDERBUFFER_BLUE_SIZE 0x8D52
+#define GL_RENDERBUFFER_DEPTH_SIZE 0x8D54
+#define GL_RENDERBUFFER_GREEN_SIZE 0x8D51
+#define GL_RENDERBUFFER_HEIGHT 0x8D43
+#define GL_RENDERBUFFER_INTERNAL_FORMAT 0x8D44
+#define GL_RENDERBUFFER_RED_SIZE 0x8D50
+#define GL_RENDERBUFFER_SAMPLES 0x8CAB
+#define GL_RENDERBUFFER_STENCIL_SIZE 0x8D55
+#define GL_RENDERBUFFER_WIDTH 0x8D42
+#define GL_RENDERER 0x1F01
+#define GL_REPEAT 0x2901
+#define GL_REPLACE 0x1E01
+#define GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES 0x8D68
+#define GL_RESET_NOTIFICATION_STRATEGY 0x8256
+#define GL_RG 0x8227
+#define GL_RG16F 0x822F
+#define GL_RG16I 0x8239
+#define GL_RG16UI 0x823A
+#define GL_RG32F 0x8230
+#define GL_RG32I 0x823B
+#define GL_RG32UI 0x823C
+#define GL_RG8 0x822B
+#define GL_RG8I 0x8237
+#define GL_RG8UI 0x8238
+#define GL_RG8_SNORM 0x8F95
+#define GL_RGB 0x1907
+#define GL_RGB10_A2 0x8059
+#define GL_RGB10_A2UI 0x906F
+#define GL_RGB16F 0x881B
+#define GL_RGB16I 0x8D89
+#define GL_RGB16UI 0x8D77
+#define GL_RGB32F 0x8815
+#define GL_RGB32I 0x8D83
+#define GL_RGB32UI 0x8D71
+#define GL_RGB565 0x8D62
+#define GL_RGB5_A1 0x8057
+#define GL_RGB8 0x8051
+#define GL_RGB8I 0x8D8F
+#define GL_RGB8UI 0x8D7D
+#define GL_RGB8_SNORM 0x8F96
+#define GL_RGB9_E5 0x8C3D
+#define GL_RGBA 0x1908
+#define GL_RGBA16F 0x881A
+#define GL_RGBA16I 0x8D88
+#define GL_RGBA16UI 0x8D76
+#define GL_RGBA32F 0x8814
+#define GL_RGBA32I 0x8D82
+#define GL_RGBA32UI 0x8D70
+#define GL_RGBA4 0x8056
+#define GL_RGBA8 0x8058
+#define GL_RGBA8I 0x8D8E
+#define GL_RGBA8UI 0x8D7C
+#define GL_RGBA8_SNORM 0x8F97
+#define GL_RGBA_INTEGER 0x8D99
+#define GL_RGB_INTEGER 0x8D98
+#define GL_RG_INTEGER 0x8228
+#define GL_SAMPLER 0x82E6
+#define GL_SAMPLER_2D 0x8B5E
+#define GL_SAMPLER_2D_ARRAY 0x8DC1
+#define GL_SAMPLER_2D_ARRAY_SHADOW 0x8DC4
+#define GL_SAMPLER_2D_MULTISAMPLE 0x9108
+#define GL_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910B
+#define GL_SAMPLER_2D_SHADOW 0x8B62
+#define GL_SAMPLER_3D 0x8B5F
+#define GL_SAMPLER_BINDING 0x8919
+#define GL_SAMPLER_BUFFER 0x8DC2
+#define GL_SAMPLER_CUBE 0x8B60
+#define GL_SAMPLER_CUBE_MAP_ARRAY 0x900C
+#define GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW 0x900D
+#define GL_SAMPLER_CUBE_SHADOW 0x8DC5
+#define GL_SAMPLER_EXTERNAL_OES 0x8D66
+#define GL_SAMPLES 0x80A9
+#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E
+#define GL_SAMPLE_BUFFERS 0x80A8
+#define GL_SAMPLE_COVERAGE 0x80A0
+#define GL_SAMPLE_COVERAGE_INVERT 0x80AB
+#define GL_SAMPLE_COVERAGE_VALUE 0x80AA
+#define GL_SAMPLE_MASK 0x8E51
+#define GL_SAMPLE_MASK_VALUE 0x8E52
+#define GL_SAMPLE_POSITION 0x8E50
+#define GL_SAMPLE_SHADING 0x8C36
+#define GL_SCISSOR_BOX 0x0C10
+#define GL_SCISSOR_TEST 0x0C11
+#define GL_SCREEN 0x9295
+#define GL_SEPARATE_ATTRIBS 0x8C8D
+#define GL_SHADER 0x82E1
+#define GL_SHADER_BINARY_FORMATS 0x8DF8
+#define GL_SHADER_COMPILER 0x8DFA
+#define GL_SHADER_IMAGE_ACCESS_BARRIER_BIT 0x00000020
+#define GL_SHADER_SOURCE_LENGTH 0x8B88
+#define GL_SHADER_STORAGE_BARRIER_BIT 0x00002000
+#define GL_SHADER_STORAGE_BLOCK 0x92E6
+#define GL_SHADER_STORAGE_BUFFER 0x90D2
+#define GL_SHADER_STORAGE_BUFFER_BINDING 0x90D3
+#define GL_SHADER_STORAGE_BUFFER_OFFSET_ALIGNMENT 0x90DF
+#define GL_SHADER_STORAGE_BUFFER_SIZE 0x90D5
+#define GL_SHADER_STORAGE_BUFFER_START 0x90D4
+#define GL_SHADER_TYPE 0x8B4F
+#define GL_SHADING_LANGUAGE_VERSION 0x8B8C
+#define GL_SHORT 0x1402
+#define GL_SIGNALED 0x9119
+#define GL_SIGNED_NORMALIZED 0x8F9C
+#define GL_SOFTLIGHT 0x929C
+#define GL_SRC_ALPHA 0x0302
+#define GL_SRC_ALPHA_SATURATE 0x0308
+#define GL_SRC_COLOR 0x0300
+#define GL_SRGB 0x8C40
+#define GL_SRGB8 0x8C41
+#define GL_SRGB8_ALPHA8 0x8C43
+#define GL_STACK_OVERFLOW 0x0503
+#define GL_STACK_UNDERFLOW 0x0504
+#define GL_STATIC_COPY 0x88E6
+#define GL_STATIC_DRAW 0x88E4
+#define GL_STATIC_READ 0x88E5
+#define GL_STENCIL 0x1802
+#define GL_STENCIL_ATTACHMENT 0x8D20
+#define GL_STENCIL_BACK_FAIL 0x8801
+#define GL_STENCIL_BACK_FUNC 0x8800
+#define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802
+#define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803
+#define GL_STENCIL_BACK_REF 0x8CA3
+#define GL_STENCIL_BACK_VALUE_MASK 0x8CA4
+#define GL_STENCIL_BACK_WRITEMASK 0x8CA5
+#define GL_STENCIL_BITS 0x0D57
+#define GL_STENCIL_BUFFER_BIT 0x00000400
+#define GL_STENCIL_CLEAR_VALUE 0x0B91
+#define GL_STENCIL_FAIL 0x0B94
+#define GL_STENCIL_FUNC 0x0B92
+#define GL_STENCIL_INDEX 0x1901
+#define GL_STENCIL_INDEX8 0x8D48
+#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95
+#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96
+#define GL_STENCIL_REF 0x0B97
+#define GL_STENCIL_TEST 0x0B90
+#define GL_STENCIL_VALUE_MASK 0x0B93
+#define GL_STENCIL_WRITEMASK 0x0B98
+#define GL_STREAM_COPY 0x88E2
+#define GL_STREAM_DRAW 0x88E0
+#define GL_STREAM_READ 0x88E1
+#define GL_SUBPIXEL_BITS 0x0D50
+#define GL_SYNC_CONDITION 0x9113
+#define GL_SYNC_FENCE 0x9116
+#define GL_SYNC_FLAGS 0x9115
+#define GL_SYNC_FLUSH_COMMANDS_BIT 0x00000001
+#define GL_SYNC_GPU_COMMANDS_COMPLETE 0x9117
+#define GL_SYNC_STATUS 0x9114
+#define GL_TESS_CONTROL_OUTPUT_VERTICES 0x8E75
+#define GL_TESS_CONTROL_SHADER 0x8E88
+#define GL_TESS_CONTROL_SHADER_BIT 0x00000008
+#define GL_TESS_EVALUATION_SHADER 0x8E87
+#define GL_TESS_EVALUATION_SHADER_BIT 0x00000010
+#define GL_TESS_GEN_MODE 0x8E76
+#define GL_TESS_GEN_POINT_MODE 0x8E79
+#define GL_TESS_GEN_SPACING 0x8E77
+#define GL_TESS_GEN_VERTEX_ORDER 0x8E78
+#define GL_TEXTURE 0x1702
+#define GL_TEXTURE0 0x84C0
+#define GL_TEXTURE1 0x84C1
+#define GL_TEXTURE10 0x84CA
+#define GL_TEXTURE11 0x84CB
+#define GL_TEXTURE12 0x84CC
+#define GL_TEXTURE13 0x84CD
+#define GL_TEXTURE14 0x84CE
+#define GL_TEXTURE15 0x84CF
+#define GL_TEXTURE16 0x84D0
+#define GL_TEXTURE17 0x84D1
+#define GL_TEXTURE18 0x84D2
+#define GL_TEXTURE19 0x84D3
+#define GL_TEXTURE2 0x84C2
+#define GL_TEXTURE20 0x84D4
+#define GL_TEXTURE21 0x84D5
+#define GL_TEXTURE22 0x84D6
+#define GL_TEXTURE23 0x84D7
+#define GL_TEXTURE24 0x84D8
+#define GL_TEXTURE25 0x84D9
+#define GL_TEXTURE26 0x84DA
+#define GL_TEXTURE27 0x84DB
+#define GL_TEXTURE28 0x84DC
+#define GL_TEXTURE29 0x84DD
+#define GL_TEXTURE3 0x84C3
+#define GL_TEXTURE30 0x84DE
+#define GL_TEXTURE31 0x84DF
+#define GL_TEXTURE4 0x84C4
+#define GL_TEXTURE5 0x84C5
+#define GL_TEXTURE6 0x84C6
+#define GL_TEXTURE7 0x84C7
+#define GL_TEXTURE8 0x84C8
+#define GL_TEXTURE9 0x84C9
+#define GL_TEXTURE_2D 0x0DE1
+#define GL_TEXTURE_2D_ARRAY 0x8C1A
+#define GL_TEXTURE_2D_MULTISAMPLE 0x9100
+#define GL_TEXTURE_2D_MULTISAMPLE_ARRAY 0x9102
+#define GL_TEXTURE_3D 0x806F
+#define GL_TEXTURE_ALPHA_SIZE 0x805F
+#define GL_TEXTURE_ALPHA_TYPE 0x8C13
+#define GL_TEXTURE_BASE_LEVEL 0x813C
+#define GL_TEXTURE_BINDING_2D 0x8069
+#define GL_TEXTURE_BINDING_2D_ARRAY 0x8C1D
+#define GL_TEXTURE_BINDING_2D_MULTISAMPLE 0x9104
+#define GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY 0x9105
+#define GL_TEXTURE_BINDING_3D 0x806A
+#define GL_TEXTURE_BINDING_BUFFER 0x8C2C
+#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514
+#define GL_TEXTURE_BINDING_CUBE_MAP_ARRAY 0x900A
+#define GL_TEXTURE_BINDING_EXTERNAL_OES 0x8D67
+#define GL_TEXTURE_BLUE_SIZE 0x805E
+#define GL_TEXTURE_BLUE_TYPE 0x8C12
+#define GL_TEXTURE_BORDER_COLOR 0x1004
+#define GL_TEXTURE_BUFFER 0x8C2A
+#define GL_TEXTURE_BUFFER_BINDING 0x8C2A
+#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING 0x8C2D
+#define GL_TEXTURE_BUFFER_OFFSET 0x919D
+#define GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT 0x919F
+#define GL_TEXTURE_BUFFER_SIZE 0x919E
+#define GL_TEXTURE_COMPARE_FUNC 0x884D
+#define GL_TEXTURE_COMPARE_MODE 0x884C
+#define GL_TEXTURE_COMPRESSED 0x86A1
+#define GL_TEXTURE_CUBE_MAP 0x8513
+#define GL_TEXTURE_CUBE_MAP_ARRAY 0x9009
+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516
+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518
+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A
+#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515
+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517
+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519
+#define GL_TEXTURE_DEPTH 0x8071
+#define GL_TEXTURE_DEPTH_SIZE 0x884A
+#define GL_TEXTURE_DEPTH_TYPE 0x8C16
+#define GL_TEXTURE_EXTERNAL_OES 0x8D65
+#define GL_TEXTURE_FETCH_BARRIER_BIT 0x00000008
+#define GL_TEXTURE_FIXED_SAMPLE_LOCATIONS 0x9107
+#define GL_TEXTURE_GREEN_SIZE 0x805D
+#define GL_TEXTURE_GREEN_TYPE 0x8C11
+#define GL_TEXTURE_HEIGHT 0x1001
+#define GL_TEXTURE_IMMUTABLE_FORMAT 0x912F
+#define GL_TEXTURE_IMMUTABLE_LEVELS 0x82DF
+#define GL_TEXTURE_INTERNAL_FORMAT 0x1003
+#define GL_TEXTURE_MAG_FILTER 0x2800
+#define GL_TEXTURE_MAX_ANISOTROPY 0x84FE
+#define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE
+#define GL_TEXTURE_MAX_LEVEL 0x813D
+#define GL_TEXTURE_MAX_LOD 0x813B
+#define GL_TEXTURE_MIN_FILTER 0x2801
+#define GL_TEXTURE_MIN_LOD 0x813A
+#define GL_TEXTURE_RED_SIZE 0x805C
+#define GL_TEXTURE_RED_TYPE 0x8C10
+#define GL_TEXTURE_SAMPLES 0x9106
+#define GL_TEXTURE_SHARED_SIZE 0x8C3F
+#define GL_TEXTURE_STENCIL_SIZE 0x88F1
+#define GL_TEXTURE_SWIZZLE_A 0x8E45
+#define GL_TEXTURE_SWIZZLE_B 0x8E44
+#define GL_TEXTURE_SWIZZLE_G 0x8E43
+#define GL_TEXTURE_SWIZZLE_R 0x8E42
+#define GL_TEXTURE_UPDATE_BARRIER_BIT 0x00000100
+#define GL_TEXTURE_WIDTH 0x1000
+#define GL_TEXTURE_WRAP_R 0x8072
+#define GL_TEXTURE_WRAP_S 0x2802
+#define GL_TEXTURE_WRAP_T 0x2803
+#define GL_TIMEOUT_EXPIRED 0x911B
+#define GL_TIMEOUT_IGNORED 0xFFFFFFFFFFFFFFFF
+#define GL_TOP_LEVEL_ARRAY_SIZE 0x930C
+#define GL_TOP_LEVEL_ARRAY_STRIDE 0x930D
+#define GL_TRANSFORM_FEEDBACK 0x8E22
+#define GL_TRANSFORM_FEEDBACK_ACTIVE 0x8E24
+#define GL_TRANSFORM_FEEDBACK_BARRIER_BIT 0x00000800
+#define GL_TRANSFORM_FEEDBACK_BINDING 0x8E25
+#define GL_TRANSFORM_FEEDBACK_BUFFER 0x8C8E
+#define GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE 0x8E24
+#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING 0x8C8F
+#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE 0x8C7F
+#define GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED 0x8E23
+#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE 0x8C85
+#define GL_TRANSFORM_FEEDBACK_BUFFER_START 0x8C84
+#define GL_TRANSFORM_FEEDBACK_PAUSED 0x8E23
+#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN 0x8C88
+#define GL_TRANSFORM_FEEDBACK_VARYING 0x92F4
+#define GL_TRANSFORM_FEEDBACK_VARYINGS 0x8C83
+#define GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH 0x8C76
+#define GL_TRIANGLES 0x0004
+#define GL_TRIANGLES_ADJACENCY 0x000C
+#define GL_TRIANGLES_ADJACENCY_EXT 0x000C
+#define GL_TRIANGLE_FAN 0x0006
+#define GL_TRIANGLE_STRIP 0x0005
+#define GL_TRIANGLE_STRIP_ADJACENCY 0x000D
+#define GL_TRIANGLE_STRIP_ADJACENCY_EXT 0x000D
+#define GL_TRUE 1
+#define GL_TYPE 0x92FA
+#define GL_UNDEFINED_VERTEX 0x8260
+#define GL_UNDEFINED_VERTEX_EXT 0x8260
+#define GL_UNIFORM 0x92E1
+#define GL_UNIFORM_ARRAY_STRIDE 0x8A3C
+#define GL_UNIFORM_BARRIER_BIT 0x00000004
+#define GL_UNIFORM_BLOCK 0x92E2
+#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS 0x8A42
+#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES 0x8A43
+#define GL_UNIFORM_BLOCK_BINDING 0x8A3F
+#define GL_UNIFORM_BLOCK_DATA_SIZE 0x8A40
+#define GL_UNIFORM_BLOCK_INDEX 0x8A3A
+#define GL_UNIFORM_BLOCK_NAME_LENGTH 0x8A41
+#define GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER 0x8A46
+#define GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER 0x8A44
+#define GL_UNIFORM_BUFFER 0x8A11
+#define GL_UNIFORM_BUFFER_BINDING 0x8A28
+#define GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT 0x8A34
+#define GL_UNIFORM_BUFFER_SIZE 0x8A2A
+#define GL_UNIFORM_BUFFER_START 0x8A29
+#define GL_UNIFORM_IS_ROW_MAJOR 0x8A3E
+#define GL_UNIFORM_MATRIX_STRIDE 0x8A3D
+#define GL_UNIFORM_NAME_LENGTH 0x8A39
+#define GL_UNIFORM_OFFSET 0x8A3B
+#define GL_UNIFORM_SIZE 0x8A38
+#define GL_UNIFORM_TYPE 0x8A37
+#define GL_UNKNOWN_CONTEXT_RESET 0x8255
+#define GL_UNPACK_ALIGNMENT 0x0CF5
+#define GL_UNPACK_IMAGE_HEIGHT 0x806E
+#define GL_UNPACK_ROW_LENGTH 0x0CF2
+#define GL_UNPACK_SKIP_IMAGES 0x806D
+#define GL_UNPACK_SKIP_PIXELS 0x0CF4
+#define GL_UNPACK_SKIP_ROWS 0x0CF3
+#define GL_UNSIGNALED 0x9118
+#define GL_UNSIGNED_BYTE 0x1401
+#define GL_UNSIGNED_INT 0x1405
+#define GL_UNSIGNED_INT_10F_11F_11F_REV 0x8C3B
+#define GL_UNSIGNED_INT_24_8 0x84FA
+#define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368
+#define GL_UNSIGNED_INT_5_9_9_9_REV 0x8C3E
+#define GL_UNSIGNED_INT_ATOMIC_COUNTER 0x92DB
+#define GL_UNSIGNED_INT_IMAGE_2D 0x9063
+#define GL_UNSIGNED_INT_IMAGE_2D_ARRAY 0x9069
+#define GL_UNSIGNED_INT_IMAGE_3D 0x9064
+#define GL_UNSIGNED_INT_IMAGE_BUFFER 0x9067
+#define GL_UNSIGNED_INT_IMAGE_CUBE 0x9066
+#define GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY 0x906A
+#define GL_UNSIGNED_INT_SAMPLER_2D 0x8DD2
+#define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY 0x8DD7
+#define GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE 0x910A
+#define GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910D
+#define GL_UNSIGNED_INT_SAMPLER_3D 0x8DD3
+#define GL_UNSIGNED_INT_SAMPLER_BUFFER 0x8DD8
+#define GL_UNSIGNED_INT_SAMPLER_CUBE 0x8DD4
+#define GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY 0x900F
+#define GL_UNSIGNED_INT_VEC2 0x8DC6
+#define GL_UNSIGNED_INT_VEC3 0x8DC7
+#define GL_UNSIGNED_INT_VEC4 0x8DC8
+#define GL_UNSIGNED_NORMALIZED 0x8C17
+#define GL_UNSIGNED_SHORT 0x1403
+#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033
+#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034
+#define GL_UNSIGNED_SHORT_5_6_5 0x8363
+#define GL_VALIDATE_STATUS 0x8B83
+#define GL_VENDOR 0x1F00
+#define GL_VERSION 0x1F02
+#define GL_VERTEX_ARRAY 0x8074
+#define GL_VERTEX_ARRAY_BINDING 0x85B5
+#define GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT 0x00000001
+#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F
+#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR 0x88FE
+#define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622
+#define GL_VERTEX_ATTRIB_ARRAY_INTEGER 0x88FD
+#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A
+#define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645
+#define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623
+#define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624
+#define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625
+#define GL_VERTEX_ATTRIB_BINDING 0x82D4
+#define GL_VERTEX_ATTRIB_RELATIVE_OFFSET 0x82D5
+#define GL_VERTEX_BINDING_BUFFER 0x8F4F
+#define GL_VERTEX_BINDING_DIVISOR 0x82D6
+#define GL_VERTEX_BINDING_OFFSET 0x82D7
+#define GL_VERTEX_BINDING_STRIDE 0x82D8
+#define GL_VERTEX_SHADER 0x8B31
+#define GL_VERTEX_SHADER_BIT 0x00000001
+#define GL_VIEWPORT 0x0BA2
+#define GL_WAIT_FAILED 0x911D
+#define GL_WRITE_ONLY 0x88B9
+#define GL_ZERO 0
+
+
+#include
+typedef unsigned int GLenum;
+typedef unsigned char GLboolean;
+typedef unsigned int GLbitfield;
+typedef void GLvoid;
+typedef khronos_int8_t GLbyte;
+typedef khronos_uint8_t GLubyte;
+typedef khronos_int16_t GLshort;
+typedef khronos_uint16_t GLushort;
+typedef int GLint;
+typedef unsigned int GLuint;
+typedef khronos_int32_t GLclampx;
+typedef int GLsizei;
+typedef khronos_float_t GLfloat;
+typedef khronos_float_t GLclampf;
+typedef double GLdouble;
+typedef double GLclampd;
+typedef void *GLeglClientBufferEXT;
+typedef void *GLeglImageOES;
+typedef char GLchar;
+typedef char GLcharARB;
+#ifdef __APPLE__
+typedef void *GLhandleARB;
+#else
+typedef unsigned int GLhandleARB;
+#endif
+typedef khronos_uint16_t GLhalf;
+typedef khronos_uint16_t GLhalfARB;
+typedef khronos_int32_t GLfixed;
+#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ > 1060)
+typedef khronos_intptr_t GLintptr;
+#else
+typedef khronos_intptr_t GLintptr;
+#endif
+#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ > 1060)
+typedef khronos_intptr_t GLintptrARB;
+#else
+typedef khronos_intptr_t GLintptrARB;
+#endif
+#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ > 1060)
+typedef khronos_ssize_t GLsizeiptr;
+#else
+typedef khronos_ssize_t GLsizeiptr;
+#endif
+#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ > 1060)
+typedef khronos_ssize_t GLsizeiptrARB;
+#else
+typedef khronos_ssize_t GLsizeiptrARB;
+#endif
+typedef khronos_int64_t GLint64;
+typedef khronos_int64_t GLint64EXT;
+typedef khronos_uint64_t GLuint64;
+typedef khronos_uint64_t GLuint64EXT;
+typedef struct __GLsync *GLsync;
+struct _cl_context;
+struct _cl_event;
+typedef void (GLAD_API_PTR *GLDEBUGPROC)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam);
+typedef void (GLAD_API_PTR *GLDEBUGPROCARB)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam);
+typedef void (GLAD_API_PTR *GLDEBUGPROCKHR)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam);
+typedef void (GLAD_API_PTR *GLDEBUGPROCAMD)(GLuint id,GLenum category,GLenum severity,GLsizei length,const GLchar *message,void *userParam);
+typedef unsigned short GLhalfNV;
+typedef GLintptr GLvdpauSurfaceNV;
+typedef void (GLAD_API_PTR *GLVULKANPROCNV)(void);
+
+
+#define GL_ES_VERSION_2_0 1
+GLAD_API_CALL int GLAD_GL_ES_VERSION_2_0;
+#define GL_ES_VERSION_3_0 1
+GLAD_API_CALL int GLAD_GL_ES_VERSION_3_0;
+#define GL_ES_VERSION_3_1 1
+GLAD_API_CALL int GLAD_GL_ES_VERSION_3_1;
+#define GL_ES_VERSION_3_2 1
+GLAD_API_CALL int GLAD_GL_ES_VERSION_3_2;
+#define GL_EXT_geometry_shader 1
+GLAD_API_CALL int GLAD_GL_EXT_geometry_shader;
+#define GL_EXT_texture_compression_dxt1 1
+GLAD_API_CALL int GLAD_GL_EXT_texture_compression_dxt1;
+#define GL_EXT_texture_filter_anisotropic 1
+GLAD_API_CALL int GLAD_GL_EXT_texture_filter_anisotropic;
+#define GL_OES_EGL_image 1
+GLAD_API_CALL int GLAD_GL_OES_EGL_image;
+#define GL_OES_EGL_image_external 1
+GLAD_API_CALL int GLAD_GL_OES_EGL_image_external;
+#define GL_OES_EGL_image_external_essl3 1
+GLAD_API_CALL int GLAD_GL_OES_EGL_image_external_essl3;
+#define GL_OES_texture_compression_astc 1
+GLAD_API_CALL int GLAD_GL_OES_texture_compression_astc;
+
+
+typedef void (GLAD_API_PTR *PFNGLACTIVESHADERPROGRAMPROC)(GLuint pipeline, GLuint program);
+typedef void (GLAD_API_PTR *PFNGLACTIVETEXTUREPROC)(GLenum texture);
+typedef void (GLAD_API_PTR *PFNGLATTACHSHADERPROC)(GLuint program, GLuint shader);
+typedef void (GLAD_API_PTR *PFNGLBEGINQUERYPROC)(GLenum target, GLuint id);
+typedef void (GLAD_API_PTR *PFNGLBEGINTRANSFORMFEEDBACKPROC)(GLenum primitiveMode);
+typedef void (GLAD_API_PTR *PFNGLBINDATTRIBLOCATIONPROC)(GLuint program, GLuint index, const GLchar * name);
+typedef void (GLAD_API_PTR *PFNGLBINDBUFFERPROC)(GLenum target, GLuint buffer);
+typedef void (GLAD_API_PTR *PFNGLBINDBUFFERBASEPROC)(GLenum target, GLuint index, GLuint buffer);
+typedef void (GLAD_API_PTR *PFNGLBINDBUFFERRANGEPROC)(GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
+typedef void (GLAD_API_PTR *PFNGLBINDFRAMEBUFFERPROC)(GLenum target, GLuint framebuffer);
+typedef void (GLAD_API_PTR *PFNGLBINDIMAGETEXTUREPROC)(GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format);
+typedef void (GLAD_API_PTR *PFNGLBINDPROGRAMPIPELINEPROC)(GLuint pipeline);
+typedef void (GLAD_API_PTR *PFNGLBINDRENDERBUFFERPROC)(GLenum target, GLuint renderbuffer);
+typedef void (GLAD_API_PTR *PFNGLBINDSAMPLERPROC)(GLuint unit, GLuint sampler);
+typedef void (GLAD_API_PTR *PFNGLBINDTEXTUREPROC)(GLenum target, GLuint texture);
+typedef void (GLAD_API_PTR *PFNGLBINDTRANSFORMFEEDBACKPROC)(GLenum target, GLuint id);
+typedef void (GLAD_API_PTR *PFNGLBINDVERTEXARRAYPROC)(GLuint array);
+typedef void (GLAD_API_PTR *PFNGLBINDVERTEXBUFFERPROC)(GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride);
+typedef void (GLAD_API_PTR *PFNGLBLENDBARRIERPROC)(void);
+typedef void (GLAD_API_PTR *PFNGLBLENDCOLORPROC)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
+typedef void (GLAD_API_PTR *PFNGLBLENDEQUATIONPROC)(GLenum mode);
+typedef void (GLAD_API_PTR *PFNGLBLENDEQUATIONSEPARATEPROC)(GLenum modeRGB, GLenum modeAlpha);
+typedef void (GLAD_API_PTR *PFNGLBLENDEQUATIONSEPARATEIPROC)(GLuint buf, GLenum modeRGB, GLenum modeAlpha);
+typedef void (GLAD_API_PTR *PFNGLBLENDEQUATIONIPROC)(GLuint buf, GLenum mode);
+typedef void (GLAD_API_PTR *PFNGLBLENDFUNCPROC)(GLenum sfactor, GLenum dfactor);
+typedef void (GLAD_API_PTR *PFNGLBLENDFUNCSEPARATEPROC)(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
+typedef void (GLAD_API_PTR *PFNGLBLENDFUNCSEPARATEIPROC)(GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
+typedef void (GLAD_API_PTR *PFNGLBLENDFUNCIPROC)(GLuint buf, GLenum src, GLenum dst);
+typedef void (GLAD_API_PTR *PFNGLBLITFRAMEBUFFERPROC)(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
+typedef void (GLAD_API_PTR *PFNGLBUFFERDATAPROC)(GLenum target, GLsizeiptr size, const void * data, GLenum usage);
+typedef void (GLAD_API_PTR *PFNGLBUFFERSUBDATAPROC)(GLenum target, GLintptr offset, GLsizeiptr size, const void * data);
+typedef GLenum (GLAD_API_PTR *PFNGLCHECKFRAMEBUFFERSTATUSPROC)(GLenum target);
+typedef void (GLAD_API_PTR *PFNGLCLEARPROC)(GLbitfield mask);
+typedef void (GLAD_API_PTR *PFNGLCLEARBUFFERFIPROC)(GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil);
+typedef void (GLAD_API_PTR *PFNGLCLEARBUFFERFVPROC)(GLenum buffer, GLint drawbuffer, const GLfloat * value);
+typedef void (GLAD_API_PTR *PFNGLCLEARBUFFERIVPROC)(GLenum buffer, GLint drawbuffer, const GLint * value);
+typedef void (GLAD_API_PTR *PFNGLCLEARBUFFERUIVPROC)(GLenum buffer, GLint drawbuffer, const GLuint * value);
+typedef void (GLAD_API_PTR *PFNGLCLEARCOLORPROC)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
+typedef void (GLAD_API_PTR *PFNGLCLEARDEPTHFPROC)(GLfloat d);
+typedef void (GLAD_API_PTR *PFNGLCLEARSTENCILPROC)(GLint s);
+typedef GLenum (GLAD_API_PTR *PFNGLCLIENTWAITSYNCPROC)(GLsync sync, GLbitfield flags, GLuint64 timeout);
+typedef void (GLAD_API_PTR *PFNGLCOLORMASKPROC)(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
+typedef void (GLAD_API_PTR *PFNGLCOLORMASKIPROC)(GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a);
+typedef void (GLAD_API_PTR *PFNGLCOMPILESHADERPROC)(GLuint shader);
+typedef void (GLAD_API_PTR *PFNGLCOMPRESSEDTEXIMAGE2DPROC)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void * data);
+typedef void (GLAD_API_PTR *PFNGLCOMPRESSEDTEXIMAGE3DPROC)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void * data);
+typedef void (GLAD_API_PTR *PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void * data);
+typedef void (GLAD_API_PTR *PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void * data);
+typedef void (GLAD_API_PTR *PFNGLCOPYBUFFERSUBDATAPROC)(GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
+typedef void (GLAD_API_PTR *PFNGLCOPYIMAGESUBDATAPROC)(GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth);
+typedef void (GLAD_API_PTR *PFNGLCOPYTEXIMAGE2DPROC)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
+typedef void (GLAD_API_PTR *PFNGLCOPYTEXSUBIMAGE2DPROC)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+typedef void (GLAD_API_PTR *PFNGLCOPYTEXSUBIMAGE3DPROC)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+typedef GLuint (GLAD_API_PTR *PFNGLCREATEPROGRAMPROC)(void);
+typedef GLuint (GLAD_API_PTR *PFNGLCREATESHADERPROC)(GLenum type);
+typedef GLuint (GLAD_API_PTR *PFNGLCREATESHADERPROGRAMVPROC)(GLenum type, GLsizei count, const GLchar *const* strings);
+typedef void (GLAD_API_PTR *PFNGLCULLFACEPROC)(GLenum mode);
+typedef void (GLAD_API_PTR *PFNGLDEBUGMESSAGECALLBACKPROC)(GLDEBUGPROC callback, const void * userParam);
+typedef void (GLAD_API_PTR *PFNGLDEBUGMESSAGECONTROLPROC)(GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint * ids, GLboolean enabled);
+typedef void (GLAD_API_PTR *PFNGLDEBUGMESSAGEINSERTPROC)(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar * buf);
+typedef void (GLAD_API_PTR *PFNGLDELETEBUFFERSPROC)(GLsizei n, const GLuint * buffers);
+typedef void (GLAD_API_PTR *PFNGLDELETEFRAMEBUFFERSPROC)(GLsizei n, const GLuint * framebuffers);
+typedef void (GLAD_API_PTR *PFNGLDELETEPROGRAMPROC)(GLuint program);
+typedef void (GLAD_API_PTR *PFNGLDELETEPROGRAMPIPELINESPROC)(GLsizei n, const GLuint * pipelines);
+typedef void (GLAD_API_PTR *PFNGLDELETEQUERIESPROC)(GLsizei n, const GLuint * ids);
+typedef void (GLAD_API_PTR *PFNGLDELETERENDERBUFFERSPROC)(GLsizei n, const GLuint * renderbuffers);
+typedef void (GLAD_API_PTR *PFNGLDELETESAMPLERSPROC)(GLsizei count, const GLuint * samplers);
+typedef void (GLAD_API_PTR *PFNGLDELETESHADERPROC)(GLuint shader);
+typedef void (GLAD_API_PTR *PFNGLDELETESYNCPROC)(GLsync sync);
+typedef void (GLAD_API_PTR *PFNGLDELETETEXTURESPROC)(GLsizei n, const GLuint * textures);
+typedef void (GLAD_API_PTR *PFNGLDELETETRANSFORMFEEDBACKSPROC)(GLsizei n, const GLuint * ids);
+typedef void (GLAD_API_PTR *PFNGLDELETEVERTEXARRAYSPROC)(GLsizei n, const GLuint * arrays);
+typedef void (GLAD_API_PTR *PFNGLDEPTHFUNCPROC)(GLenum func);
+typedef void (GLAD_API_PTR *PFNGLDEPTHMASKPROC)(GLboolean flag);
+typedef void (GLAD_API_PTR *PFNGLDEPTHRANGEFPROC)(GLfloat n, GLfloat f);
+typedef void (GLAD_API_PTR *PFNGLDETACHSHADERPROC)(GLuint program, GLuint shader);
+typedef void (GLAD_API_PTR *PFNGLDISABLEPROC)(GLenum cap);
+typedef void (GLAD_API_PTR *PFNGLDISABLEVERTEXATTRIBARRAYPROC)(GLuint index);
+typedef void (GLAD_API_PTR *PFNGLDISABLEIPROC)(GLenum target, GLuint index);
+typedef void (GLAD_API_PTR *PFNGLDISPATCHCOMPUTEPROC)(GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z);
+typedef void (GLAD_API_PTR *PFNGLDISPATCHCOMPUTEINDIRECTPROC)(GLintptr indirect);
+typedef void (GLAD_API_PTR *PFNGLDRAWARRAYSPROC)(GLenum mode, GLint first, GLsizei count);
+typedef void (GLAD_API_PTR *PFNGLDRAWARRAYSINDIRECTPROC)(GLenum mode, const void * indirect);
+typedef void (GLAD_API_PTR *PFNGLDRAWARRAYSINSTANCEDPROC)(GLenum mode, GLint first, GLsizei count, GLsizei instancecount);
+typedef void (GLAD_API_PTR *PFNGLDRAWBUFFERSPROC)(GLsizei n, const GLenum * bufs);
+typedef void (GLAD_API_PTR *PFNGLDRAWELEMENTSPROC)(GLenum mode, GLsizei count, GLenum type, const void * indices);
+typedef void (GLAD_API_PTR *PFNGLDRAWELEMENTSBASEVERTEXPROC)(GLenum mode, GLsizei count, GLenum type, const void * indices, GLint basevertex);
+typedef void (GLAD_API_PTR *PFNGLDRAWELEMENTSINDIRECTPROC)(GLenum mode, GLenum type, const void * indirect);
+typedef void (GLAD_API_PTR *PFNGLDRAWELEMENTSINSTANCEDPROC)(GLenum mode, GLsizei count, GLenum type, const void * indices, GLsizei instancecount);
+typedef void (GLAD_API_PTR *PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXPROC)(GLenum mode, GLsizei count, GLenum type, const void * indices, GLsizei instancecount, GLint basevertex);
+typedef void (GLAD_API_PTR *PFNGLDRAWRANGEELEMENTSPROC)(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void * indices);
+typedef void (GLAD_API_PTR *PFNGLDRAWRANGEELEMENTSBASEVERTEXPROC)(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void * indices, GLint basevertex);
+typedef void (GLAD_API_PTR *PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC)(GLenum target, GLeglImageOES image);
+typedef void (GLAD_API_PTR *PFNGLEGLIMAGETARGETTEXTURE2DOESPROC)(GLenum target, GLeglImageOES image);
+typedef void (GLAD_API_PTR *PFNGLENABLEPROC)(GLenum cap);
+typedef void (GLAD_API_PTR *PFNGLENABLEVERTEXATTRIBARRAYPROC)(GLuint index);
+typedef void (GLAD_API_PTR *PFNGLENABLEIPROC)(GLenum target, GLuint index);
+typedef void (GLAD_API_PTR *PFNGLENDQUERYPROC)(GLenum target);
+typedef void (GLAD_API_PTR *PFNGLENDTRANSFORMFEEDBACKPROC)(void);
+typedef GLsync (GLAD_API_PTR *PFNGLFENCESYNCPROC)(GLenum condition, GLbitfield flags);
+typedef void (GLAD_API_PTR *PFNGLFINISHPROC)(void);
+typedef void (GLAD_API_PTR *PFNGLFLUSHPROC)(void);
+typedef void (GLAD_API_PTR *PFNGLFLUSHMAPPEDBUFFERRANGEPROC)(GLenum target, GLintptr offset, GLsizeiptr length);
+typedef void (GLAD_API_PTR *PFNGLFRAMEBUFFERPARAMETERIPROC)(GLenum target, GLenum pname, GLint param);
+typedef void (GLAD_API_PTR *PFNGLFRAMEBUFFERRENDERBUFFERPROC)(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
+typedef void (GLAD_API_PTR *PFNGLFRAMEBUFFERTEXTUREPROC)(GLenum target, GLenum attachment, GLuint texture, GLint level);
+typedef void (GLAD_API_PTR *PFNGLFRAMEBUFFERTEXTURE2DPROC)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
+typedef void (GLAD_API_PTR *PFNGLFRAMEBUFFERTEXTUREEXTPROC)(GLenum target, GLenum attachment, GLuint texture, GLint level);
+typedef void (GLAD_API_PTR *PFNGLFRAMEBUFFERTEXTURELAYERPROC)(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
+typedef void (GLAD_API_PTR *PFNGLFRONTFACEPROC)(GLenum mode);
+typedef void (GLAD_API_PTR *PFNGLGENBUFFERSPROC)(GLsizei n, GLuint * buffers);
+typedef void (GLAD_API_PTR *PFNGLGENFRAMEBUFFERSPROC)(GLsizei n, GLuint * framebuffers);
+typedef void (GLAD_API_PTR *PFNGLGENPROGRAMPIPELINESPROC)(GLsizei n, GLuint * pipelines);
+typedef void (GLAD_API_PTR *PFNGLGENQUERIESPROC)(GLsizei n, GLuint * ids);
+typedef void (GLAD_API_PTR *PFNGLGENRENDERBUFFERSPROC)(GLsizei n, GLuint * renderbuffers);
+typedef void (GLAD_API_PTR *PFNGLGENSAMPLERSPROC)(GLsizei count, GLuint * samplers);
+typedef void (GLAD_API_PTR *PFNGLGENTEXTURESPROC)(GLsizei n, GLuint * textures);
+typedef void (GLAD_API_PTR *PFNGLGENTRANSFORMFEEDBACKSPROC)(GLsizei n, GLuint * ids);
+typedef void (GLAD_API_PTR *PFNGLGENVERTEXARRAYSPROC)(GLsizei n, GLuint * arrays);
+typedef void (GLAD_API_PTR *PFNGLGENERATEMIPMAPPROC)(GLenum target);
+typedef void (GLAD_API_PTR *PFNGLGETACTIVEATTRIBPROC)(GLuint program, GLuint index, GLsizei bufSize, GLsizei * length, GLint * size, GLenum * type, GLchar * name);
+typedef void (GLAD_API_PTR *PFNGLGETACTIVEUNIFORMPROC)(GLuint program, GLuint index, GLsizei bufSize, GLsizei * length, GLint * size, GLenum * type, GLchar * name);
+typedef void (GLAD_API_PTR *PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC)(GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei * length, GLchar * uniformBlockName);
+typedef void (GLAD_API_PTR *PFNGLGETACTIVEUNIFORMBLOCKIVPROC)(GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint * params);
+typedef void (GLAD_API_PTR *PFNGLGETACTIVEUNIFORMSIVPROC)(GLuint program, GLsizei uniformCount, const GLuint * uniformIndices, GLenum pname, GLint * params);
+typedef void (GLAD_API_PTR *PFNGLGETATTACHEDSHADERSPROC)(GLuint program, GLsizei maxCount, GLsizei * count, GLuint * shaders);
+typedef GLint (GLAD_API_PTR *PFNGLGETATTRIBLOCATIONPROC)(GLuint program, const GLchar * name);
+typedef void (GLAD_API_PTR *PFNGLGETBOOLEANI_VPROC)(GLenum target, GLuint index, GLboolean * data);
+typedef void (GLAD_API_PTR *PFNGLGETBOOLEANVPROC)(GLenum pname, GLboolean * data);
+typedef void (GLAD_API_PTR *PFNGLGETBUFFERPARAMETERI64VPROC)(GLenum target, GLenum pname, GLint64 * params);
+typedef void (GLAD_API_PTR *PFNGLGETBUFFERPARAMETERIVPROC)(GLenum target, GLenum pname, GLint * params);
+typedef void (GLAD_API_PTR *PFNGLGETBUFFERPOINTERVPROC)(GLenum target, GLenum pname, void ** params);
+typedef GLuint (GLAD_API_PTR *PFNGLGETDEBUGMESSAGELOGPROC)(GLuint count, GLsizei bufSize, GLenum * sources, GLenum * types, GLuint * ids, GLenum * severities, GLsizei * lengths, GLchar * messageLog);
+typedef GLenum (GLAD_API_PTR *PFNGLGETERRORPROC)(void);
+typedef void (GLAD_API_PTR *PFNGLGETFLOATVPROC)(GLenum pname, GLfloat * data);
+typedef GLint (GLAD_API_PTR *PFNGLGETFRAGDATALOCATIONPROC)(GLuint program, const GLchar * name);
+typedef void (GLAD_API_PTR *PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC)(GLenum target, GLenum attachment, GLenum pname, GLint * params);
+typedef void (GLAD_API_PTR *PFNGLGETFRAMEBUFFERPARAMETERIVPROC)(GLenum target, GLenum pname, GLint * params);
+typedef GLenum (GLAD_API_PTR *PFNGLGETGRAPHICSRESETSTATUSPROC)(void);
+typedef void (GLAD_API_PTR *PFNGLGETINTEGER64I_VPROC)(GLenum target, GLuint index, GLint64 * data);
+typedef void (GLAD_API_PTR *PFNGLGETINTEGER64VPROC)(GLenum pname, GLint64 * data);
+typedef void (GLAD_API_PTR *PFNGLGETINTEGERI_VPROC)(GLenum target, GLuint index, GLint * data);
+typedef void (GLAD_API_PTR *PFNGLGETINTEGERVPROC)(GLenum pname, GLint * data);
+typedef void (GLAD_API_PTR *PFNGLGETINTERNALFORMATIVPROC)(GLenum target, GLenum internalformat, GLenum pname, GLsizei count, GLint * params);
+typedef void (GLAD_API_PTR *PFNGLGETMULTISAMPLEFVPROC)(GLenum pname, GLuint index, GLfloat * val);
+typedef void (GLAD_API_PTR *PFNGLGETOBJECTLABELPROC)(GLenum identifier, GLuint name, GLsizei bufSize, GLsizei * length, GLchar * label);
+typedef void (GLAD_API_PTR *PFNGLGETOBJECTPTRLABELPROC)(const void * ptr, GLsizei bufSize, GLsizei * length, GLchar * label);
+typedef void (GLAD_API_PTR *PFNGLGETPOINTERVPROC)(GLenum pname, void ** params);
+typedef void (GLAD_API_PTR *PFNGLGETPROGRAMBINARYPROC)(GLuint program, GLsizei bufSize, GLsizei * length, GLenum * binaryFormat, void * binary);
+typedef void (GLAD_API_PTR *PFNGLGETPROGRAMINFOLOGPROC)(GLuint program, GLsizei bufSize, GLsizei * length, GLchar * infoLog);
+typedef void (GLAD_API_PTR *PFNGLGETPROGRAMINTERFACEIVPROC)(GLuint program, GLenum programInterface, GLenum pname, GLint * params);
+typedef void (GLAD_API_PTR *PFNGLGETPROGRAMPIPELINEINFOLOGPROC)(GLuint pipeline, GLsizei bufSize, GLsizei * length, GLchar * infoLog);
+typedef void (GLAD_API_PTR *PFNGLGETPROGRAMPIPELINEIVPROC)(GLuint pipeline, GLenum pname, GLint * params);
+typedef GLuint (GLAD_API_PTR *PFNGLGETPROGRAMRESOURCEINDEXPROC)(GLuint program, GLenum programInterface, const GLchar * name);
+typedef GLint (GLAD_API_PTR *PFNGLGETPROGRAMRESOURCELOCATIONPROC)(GLuint program, GLenum programInterface, const GLchar * name);
+typedef void (GLAD_API_PTR *PFNGLGETPROGRAMRESOURCENAMEPROC)(GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei * length, GLchar * name);
+typedef void (GLAD_API_PTR *PFNGLGETPROGRAMRESOURCEIVPROC)(GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum * props, GLsizei count, GLsizei * length, GLint * params);
+typedef void (GLAD_API_PTR *PFNGLGETPROGRAMIVPROC)(GLuint program, GLenum pname, GLint * params);
+typedef void (GLAD_API_PTR *PFNGLGETQUERYOBJECTUIVPROC)(GLuint id, GLenum pname, GLuint * params);
+typedef void (GLAD_API_PTR *PFNGLGETQUERYIVPROC)(GLenum target, GLenum pname, GLint * params);
+typedef void (GLAD_API_PTR *PFNGLGETRENDERBUFFERPARAMETERIVPROC)(GLenum target, GLenum pname, GLint * params);
+typedef void (GLAD_API_PTR *PFNGLGETSAMPLERPARAMETERIIVPROC)(GLuint sampler, GLenum pname, GLint * params);
+typedef void (GLAD_API_PTR *PFNGLGETSAMPLERPARAMETERIUIVPROC)(GLuint sampler, GLenum pname, GLuint * params);
+typedef void (GLAD_API_PTR *PFNGLGETSAMPLERPARAMETERFVPROC)(GLuint sampler, GLenum pname, GLfloat * params);
+typedef void (GLAD_API_PTR *PFNGLGETSAMPLERPARAMETERIVPROC)(GLuint sampler, GLenum pname, GLint * params);
+typedef void (GLAD_API_PTR *PFNGLGETSHADERINFOLOGPROC)(GLuint shader, GLsizei bufSize, GLsizei * length, GLchar * infoLog);
+typedef void (GLAD_API_PTR *PFNGLGETSHADERPRECISIONFORMATPROC)(GLenum shadertype, GLenum precisiontype, GLint * range, GLint * precision);
+typedef void (GLAD_API_PTR *PFNGLGETSHADERSOURCEPROC)(GLuint shader, GLsizei bufSize, GLsizei * length, GLchar * source);
+typedef void (GLAD_API_PTR *PFNGLGETSHADERIVPROC)(GLuint shader, GLenum pname, GLint * params);
+typedef const GLubyte * (GLAD_API_PTR *PFNGLGETSTRINGPROC)(GLenum name);
+typedef const GLubyte * (GLAD_API_PTR *PFNGLGETSTRINGIPROC)(GLenum name, GLuint index);
+typedef void (GLAD_API_PTR *PFNGLGETSYNCIVPROC)(GLsync sync, GLenum pname, GLsizei count, GLsizei * length, GLint * values);
+typedef void (GLAD_API_PTR *PFNGLGETTEXLEVELPARAMETERFVPROC)(GLenum target, GLint level, GLenum pname, GLfloat * params);
+typedef void (GLAD_API_PTR *PFNGLGETTEXLEVELPARAMETERIVPROC)(GLenum target, GLint level, GLenum pname, GLint * params);
+typedef void (GLAD_API_PTR *PFNGLGETTEXPARAMETERIIVPROC)(GLenum target, GLenum pname, GLint * params);
+typedef void (GLAD_API_PTR *PFNGLGETTEXPARAMETERIUIVPROC)(GLenum target, GLenum pname, GLuint * params);
+typedef void (GLAD_API_PTR *PFNGLGETTEXPARAMETERFVPROC)(GLenum target, GLenum pname, GLfloat * params);
+typedef void (GLAD_API_PTR *PFNGLGETTEXPARAMETERIVPROC)(GLenum target, GLenum pname, GLint * params);
+typedef void (GLAD_API_PTR *PFNGLGETTRANSFORMFEEDBACKVARYINGPROC)(GLuint program, GLuint index, GLsizei bufSize, GLsizei * length, GLsizei * size, GLenum * type, GLchar * name);
+typedef GLuint (GLAD_API_PTR *PFNGLGETUNIFORMBLOCKINDEXPROC)(GLuint program, const GLchar * uniformBlockName);
+typedef void (GLAD_API_PTR *PFNGLGETUNIFORMINDICESPROC)(GLuint program, GLsizei uniformCount, const GLchar *const* uniformNames, GLuint * uniformIndices);
+typedef GLint (GLAD_API_PTR *PFNGLGETUNIFORMLOCATIONPROC)(GLuint program, const GLchar * name);
+typedef void (GLAD_API_PTR *PFNGLGETUNIFORMFVPROC)(GLuint program, GLint location, GLfloat * params);
+typedef void (GLAD_API_PTR *PFNGLGETUNIFORMIVPROC)(GLuint program, GLint location, GLint * params);
+typedef void (GLAD_API_PTR *PFNGLGETUNIFORMUIVPROC)(GLuint program, GLint location, GLuint * params);
+typedef void (GLAD_API_PTR *PFNGLGETVERTEXATTRIBIIVPROC)(GLuint index, GLenum pname, GLint * params);
+typedef void (GLAD_API_PTR *PFNGLGETVERTEXATTRIBIUIVPROC)(GLuint index, GLenum pname, GLuint * params);
+typedef void (GLAD_API_PTR *PFNGLGETVERTEXATTRIBPOINTERVPROC)(GLuint index, GLenum pname, void ** pointer);
+typedef void (GLAD_API_PTR *PFNGLGETVERTEXATTRIBFVPROC)(GLuint index, GLenum pname, GLfloat * params);
+typedef void (GLAD_API_PTR *PFNGLGETVERTEXATTRIBIVPROC)(GLuint index, GLenum pname, GLint * params);
+typedef void (GLAD_API_PTR *PFNGLGETNUNIFORMFVPROC)(GLuint program, GLint location, GLsizei bufSize, GLfloat * params);
+typedef void (GLAD_API_PTR *PFNGLGETNUNIFORMIVPROC)(GLuint program, GLint location, GLsizei bufSize, GLint * params);
+typedef void (GLAD_API_PTR *PFNGLGETNUNIFORMUIVPROC)(GLuint program, GLint location, GLsizei bufSize, GLuint * params);
+typedef void (GLAD_API_PTR *PFNGLHINTPROC)(GLenum target, GLenum mode);
+typedef void (GLAD_API_PTR *PFNGLINVALIDATEFRAMEBUFFERPROC)(GLenum target, GLsizei numAttachments, const GLenum * attachments);
+typedef void (GLAD_API_PTR *PFNGLINVALIDATESUBFRAMEBUFFERPROC)(GLenum target, GLsizei numAttachments, const GLenum * attachments, GLint x, GLint y, GLsizei width, GLsizei height);
+typedef GLboolean (GLAD_API_PTR *PFNGLISBUFFERPROC)(GLuint buffer);
+typedef GLboolean (GLAD_API_PTR *PFNGLISENABLEDPROC)(GLenum cap);
+typedef GLboolean (GLAD_API_PTR *PFNGLISENABLEDIPROC)(GLenum target, GLuint index);
+typedef GLboolean (GLAD_API_PTR *PFNGLISFRAMEBUFFERPROC)(GLuint framebuffer);
+typedef GLboolean (GLAD_API_PTR *PFNGLISPROGRAMPROC)(GLuint program);
+typedef GLboolean (GLAD_API_PTR *PFNGLISPROGRAMPIPELINEPROC)(GLuint pipeline);
+typedef GLboolean (GLAD_API_PTR *PFNGLISQUERYPROC)(GLuint id);
+typedef GLboolean (GLAD_API_PTR *PFNGLISRENDERBUFFERPROC)(GLuint renderbuffer);
+typedef GLboolean (GLAD_API_PTR *PFNGLISSAMPLERPROC)(GLuint sampler);
+typedef GLboolean (GLAD_API_PTR *PFNGLISSHADERPROC)(GLuint shader);
+typedef GLboolean (GLAD_API_PTR *PFNGLISSYNCPROC)(GLsync sync);
+typedef GLboolean (GLAD_API_PTR *PFNGLISTEXTUREPROC)(GLuint texture);
+typedef GLboolean (GLAD_API_PTR *PFNGLISTRANSFORMFEEDBACKPROC)(GLuint id);
+typedef GLboolean (GLAD_API_PTR *PFNGLISVERTEXARRAYPROC)(GLuint array);
+typedef void (GLAD_API_PTR *PFNGLLINEWIDTHPROC)(GLfloat width);
+typedef void (GLAD_API_PTR *PFNGLLINKPROGRAMPROC)(GLuint program);
+typedef void * (GLAD_API_PTR *PFNGLMAPBUFFERRANGEPROC)(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
+typedef void (GLAD_API_PTR *PFNGLMEMORYBARRIERPROC)(GLbitfield barriers);
+typedef void (GLAD_API_PTR *PFNGLMEMORYBARRIERBYREGIONPROC)(GLbitfield barriers);
+typedef void (GLAD_API_PTR *PFNGLMINSAMPLESHADINGPROC)(GLfloat value);
+typedef void (GLAD_API_PTR *PFNGLOBJECTLABELPROC)(GLenum identifier, GLuint name, GLsizei length, const GLchar * label);
+typedef void (GLAD_API_PTR *PFNGLOBJECTPTRLABELPROC)(const void * ptr, GLsizei length, const GLchar * label);
+typedef void (GLAD_API_PTR *PFNGLPATCHPARAMETERIPROC)(GLenum pname, GLint value);
+typedef void (GLAD_API_PTR *PFNGLPAUSETRANSFORMFEEDBACKPROC)(void);
+typedef void (GLAD_API_PTR *PFNGLPIXELSTOREIPROC)(GLenum pname, GLint param);
+typedef void (GLAD_API_PTR *PFNGLPOLYGONOFFSETPROC)(GLfloat factor, GLfloat units);
+typedef void (GLAD_API_PTR *PFNGLPOPDEBUGGROUPPROC)(void);
+typedef void (GLAD_API_PTR *PFNGLPRIMITIVEBOUNDINGBOXPROC)(GLfloat minX, GLfloat minY, GLfloat minZ, GLfloat minW, GLfloat maxX, GLfloat maxY, GLfloat maxZ, GLfloat maxW);
+typedef void (GLAD_API_PTR *PFNGLPROGRAMBINARYPROC)(GLuint program, GLenum binaryFormat, const void * binary, GLsizei length);
+typedef void (GLAD_API_PTR *PFNGLPROGRAMPARAMETERIPROC)(GLuint program, GLenum pname, GLint value);
+typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORM1FPROC)(GLuint program, GLint location, GLfloat v0);
+typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORM1FVPROC)(GLuint program, GLint location, GLsizei count, const GLfloat * value);
+typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORM1IPROC)(GLuint program, GLint location, GLint v0);
+typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORM1IVPROC)(GLuint program, GLint location, GLsizei count, const GLint * value);
+typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORM1UIPROC)(GLuint program, GLint location, GLuint v0);
+typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORM1UIVPROC)(GLuint program, GLint location, GLsizei count, const GLuint * value);
+typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORM2FPROC)(GLuint program, GLint location, GLfloat v0, GLfloat v1);
+typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORM2FVPROC)(GLuint program, GLint location, GLsizei count, const GLfloat * value);
+typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORM2IPROC)(GLuint program, GLint location, GLint v0, GLint v1);
+typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORM2IVPROC)(GLuint program, GLint location, GLsizei count, const GLint * value);
+typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORM2UIPROC)(GLuint program, GLint location, GLuint v0, GLuint v1);
+typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORM2UIVPROC)(GLuint program, GLint location, GLsizei count, const GLuint * value);
+typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORM3FPROC)(GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
+typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORM3FVPROC)(GLuint program, GLint location, GLsizei count, const GLfloat * value);
+typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORM3IPROC)(GLuint program, GLint location, GLint v0, GLint v1, GLint v2);
+typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORM3IVPROC)(GLuint program, GLint location, GLsizei count, const GLint * value);
+typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORM3UIPROC)(GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2);
+typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORM3UIVPROC)(GLuint program, GLint location, GLsizei count, const GLuint * value);
+typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORM4FPROC)(GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
+typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORM4FVPROC)(GLuint program, GLint location, GLsizei count, const GLfloat * value);
+typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORM4IPROC)(GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
+typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORM4IVPROC)(GLuint program, GLint location, GLsizei count, const GLint * value);
+typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORM4UIPROC)(GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
+typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORM4UIVPROC)(GLuint program, GLint location, GLsizei count, const GLuint * value);
+typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX2FVPROC)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value);
+typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX2X3FVPROC)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value);
+typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX2X4FVPROC)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value);
+typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX3FVPROC)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value);
+typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX3X2FVPROC)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value);
+typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX3X4FVPROC)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value);
+typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX4FVPROC)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value);
+typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX4X2FVPROC)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value);
+typedef void (GLAD_API_PTR *PFNGLPROGRAMUNIFORMMATRIX4X3FVPROC)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value);
+typedef void (GLAD_API_PTR *PFNGLPUSHDEBUGGROUPPROC)(GLenum source, GLuint id, GLsizei length, const GLchar * message);
+typedef void (GLAD_API_PTR *PFNGLREADBUFFERPROC)(GLenum src);
+typedef void (GLAD_API_PTR *PFNGLREADPIXELSPROC)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void * pixels);
+typedef void (GLAD_API_PTR *PFNGLREADNPIXELSPROC)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void * data);
+typedef void (GLAD_API_PTR *PFNGLRELEASESHADERCOMPILERPROC)(void);
+typedef void (GLAD_API_PTR *PFNGLRENDERBUFFERSTORAGEPROC)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
+typedef void (GLAD_API_PTR *PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
+typedef void (GLAD_API_PTR *PFNGLRESUMETRANSFORMFEEDBACKPROC)(void);
+typedef void (GLAD_API_PTR *PFNGLSAMPLECOVERAGEPROC)(GLfloat value, GLboolean invert);
+typedef void (GLAD_API_PTR *PFNGLSAMPLEMASKIPROC)(GLuint maskNumber, GLbitfield mask);
+typedef void (GLAD_API_PTR *PFNGLSAMPLERPARAMETERIIVPROC)(GLuint sampler, GLenum pname, const GLint * param);
+typedef void (GLAD_API_PTR *PFNGLSAMPLERPARAMETERIUIVPROC)(GLuint sampler, GLenum pname, const GLuint * param);
+typedef void (GLAD_API_PTR *PFNGLSAMPLERPARAMETERFPROC)(GLuint sampler, GLenum pname, GLfloat param);
+typedef void (GLAD_API_PTR *PFNGLSAMPLERPARAMETERFVPROC)(GLuint sampler, GLenum pname, const GLfloat * param);
+typedef void (GLAD_API_PTR *PFNGLSAMPLERPARAMETERIPROC)(GLuint sampler, GLenum pname, GLint param);
+typedef void (GLAD_API_PTR *PFNGLSAMPLERPARAMETERIVPROC)(GLuint sampler, GLenum pname, const GLint * param);
+typedef void (GLAD_API_PTR *PFNGLSCISSORPROC)(GLint x, GLint y, GLsizei width, GLsizei height);
+typedef void (GLAD_API_PTR *PFNGLSHADERBINARYPROC)(GLsizei count, const GLuint * shaders, GLenum binaryFormat, const void * binary, GLsizei length);
+typedef void (GLAD_API_PTR *PFNGLSHADERSOURCEPROC)(GLuint shader, GLsizei count, const GLchar *const* string, const GLint * length);
+typedef void (GLAD_API_PTR *PFNGLSTENCILFUNCPROC)(GLenum func, GLint ref, GLuint mask);
+typedef void (GLAD_API_PTR *PFNGLSTENCILFUNCSEPARATEPROC)(GLenum face, GLenum func, GLint ref, GLuint mask);
+typedef void (GLAD_API_PTR *PFNGLSTENCILMASKPROC)(GLuint mask);
+typedef void (GLAD_API_PTR *PFNGLSTENCILMASKSEPARATEPROC)(GLenum face, GLuint mask);
+typedef void (GLAD_API_PTR *PFNGLSTENCILOPPROC)(GLenum fail, GLenum zfail, GLenum zpass);
+typedef void (GLAD_API_PTR *PFNGLSTENCILOPSEPARATEPROC)(GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
+typedef void (GLAD_API_PTR *PFNGLTEXBUFFERPROC)(GLenum target, GLenum internalformat, GLuint buffer);
+typedef void (GLAD_API_PTR *PFNGLTEXBUFFERRANGEPROC)(GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size);
+typedef void (GLAD_API_PTR *PFNGLTEXIMAGE2DPROC)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void * pixels);
+typedef void (GLAD_API_PTR *PFNGLTEXIMAGE3DPROC)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void * pixels);
+typedef void (GLAD_API_PTR *PFNGLTEXPARAMETERIIVPROC)(GLenum target, GLenum pname, const GLint * params);
+typedef void (GLAD_API_PTR *PFNGLTEXPARAMETERIUIVPROC)(GLenum target, GLenum pname, const GLuint * params);
+typedef void (GLAD_API_PTR *PFNGLTEXPARAMETERFPROC)(GLenum target, GLenum pname, GLfloat param);
+typedef void (GLAD_API_PTR *PFNGLTEXPARAMETERFVPROC)(GLenum target, GLenum pname, const GLfloat * params);
+typedef void (GLAD_API_PTR *PFNGLTEXPARAMETERIPROC)(GLenum target, GLenum pname, GLint param);
+typedef void (GLAD_API_PTR *PFNGLTEXPARAMETERIVPROC)(GLenum target, GLenum pname, const GLint * params);
+typedef void (GLAD_API_PTR *PFNGLTEXSTORAGE2DPROC)(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
+typedef void (GLAD_API_PTR *PFNGLTEXSTORAGE2DMULTISAMPLEPROC)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
+typedef void (GLAD_API_PTR *PFNGLTEXSTORAGE3DPROC)(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
+typedef void (GLAD_API_PTR *PFNGLTEXSTORAGE3DMULTISAMPLEPROC)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
+typedef void (GLAD_API_PTR *PFNGLTEXSUBIMAGE2DPROC)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void * pixels);
+typedef void (GLAD_API_PTR *PFNGLTEXSUBIMAGE3DPROC)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void * pixels);
+typedef void (GLAD_API_PTR *PFNGLTRANSFORMFEEDBACKVARYINGSPROC)(GLuint program, GLsizei count, const GLchar *const* varyings, GLenum bufferMode);
+typedef void (GLAD_API_PTR *PFNGLUNIFORM1FPROC)(GLint location, GLfloat v0);
+typedef void (GLAD_API_PTR *PFNGLUNIFORM1FVPROC)(GLint location, GLsizei count, const GLfloat * value);
+typedef void (GLAD_API_PTR *PFNGLUNIFORM1IPROC)(GLint location, GLint v0);
+typedef void (GLAD_API_PTR *PFNGLUNIFORM1IVPROC)(GLint location, GLsizei count, const GLint * value);
+typedef void (GLAD_API_PTR *PFNGLUNIFORM1UIPROC)(GLint location, GLuint v0);
+typedef void (GLAD_API_PTR *PFNGLUNIFORM1UIVPROC)(GLint location, GLsizei count, const GLuint * value);
+typedef void (GLAD_API_PTR *PFNGLUNIFORM2FPROC)(GLint location, GLfloat v0, GLfloat v1);
+typedef void (GLAD_API_PTR *PFNGLUNIFORM2FVPROC)(GLint location, GLsizei count, const GLfloat * value);
+typedef void (GLAD_API_PTR *PFNGLUNIFORM2IPROC)(GLint location, GLint v0, GLint v1);
+typedef void (GLAD_API_PTR *PFNGLUNIFORM2IVPROC)(GLint location, GLsizei count, const GLint * value);
+typedef void (GLAD_API_PTR *PFNGLUNIFORM2UIPROC)(GLint location, GLuint v0, GLuint v1);
+typedef void (GLAD_API_PTR *PFNGLUNIFORM2UIVPROC)(GLint location, GLsizei count, const GLuint * value);
+typedef void (GLAD_API_PTR *PFNGLUNIFORM3FPROC)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
+typedef void (GLAD_API_PTR *PFNGLUNIFORM3FVPROC)(GLint location, GLsizei count, const GLfloat * value);
+typedef void (GLAD_API_PTR *PFNGLUNIFORM3IPROC)(GLint location, GLint v0, GLint v1, GLint v2);
+typedef void (GLAD_API_PTR *PFNGLUNIFORM3IVPROC)(GLint location, GLsizei count, const GLint * value);
+typedef void (GLAD_API_PTR *PFNGLUNIFORM3UIPROC)(GLint location, GLuint v0, GLuint v1, GLuint v2);
+typedef void (GLAD_API_PTR *PFNGLUNIFORM3UIVPROC)(GLint location, GLsizei count, const GLuint * value);
+typedef void (GLAD_API_PTR *PFNGLUNIFORM4FPROC)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
+typedef void (GLAD_API_PTR *PFNGLUNIFORM4FVPROC)(GLint location, GLsizei count, const GLfloat * value);
+typedef void (GLAD_API_PTR *PFNGLUNIFORM4IPROC)(GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
+typedef void (GLAD_API_PTR *PFNGLUNIFORM4IVPROC)(GLint location, GLsizei count, const GLint * value);
+typedef void (GLAD_API_PTR *PFNGLUNIFORM4UIPROC)(GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
+typedef void (GLAD_API_PTR *PFNGLUNIFORM4UIVPROC)(GLint location, GLsizei count, const GLuint * value);
+typedef void (GLAD_API_PTR *PFNGLUNIFORMBLOCKBINDINGPROC)(GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding);
+typedef void (GLAD_API_PTR *PFNGLUNIFORMMATRIX2FVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value);
+typedef void (GLAD_API_PTR *PFNGLUNIFORMMATRIX2X3FVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value);
+typedef void (GLAD_API_PTR *PFNGLUNIFORMMATRIX2X4FVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value);
+typedef void (GLAD_API_PTR *PFNGLUNIFORMMATRIX3FVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value);
+typedef void (GLAD_API_PTR *PFNGLUNIFORMMATRIX3X2FVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value);
+typedef void (GLAD_API_PTR *PFNGLUNIFORMMATRIX3X4FVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value);
+typedef void (GLAD_API_PTR *PFNGLUNIFORMMATRIX4FVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value);
+typedef void (GLAD_API_PTR *PFNGLUNIFORMMATRIX4X2FVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value);
+typedef void (GLAD_API_PTR *PFNGLUNIFORMMATRIX4X3FVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value);
+typedef GLboolean (GLAD_API_PTR *PFNGLUNMAPBUFFERPROC)(GLenum target);
+typedef void (GLAD_API_PTR *PFNGLUSEPROGRAMPROC)(GLuint program);
+typedef void (GLAD_API_PTR *PFNGLUSEPROGRAMSTAGESPROC)(GLuint pipeline, GLbitfield stages, GLuint program);
+typedef void (GLAD_API_PTR *PFNGLVALIDATEPROGRAMPROC)(GLuint program);
+typedef void (GLAD_API_PTR *PFNGLVALIDATEPROGRAMPIPELINEPROC)(GLuint pipeline);
+typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB1FPROC)(GLuint index, GLfloat x);
+typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB1FVPROC)(GLuint index, const GLfloat * v);
+typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB2FPROC)(GLuint index, GLfloat x, GLfloat y);
+typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB2FVPROC)(GLuint index, const GLfloat * v);
+typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB3FPROC)(GLuint index, GLfloat x, GLfloat y, GLfloat z);
+typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB3FVPROC)(GLuint index, const GLfloat * v);
+typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB4FPROC)(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB4FVPROC)(GLuint index, const GLfloat * v);
+typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBBINDINGPROC)(GLuint attribindex, GLuint bindingindex);
+typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBDIVISORPROC)(GLuint index, GLuint divisor);
+typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBFORMATPROC)(GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset);
+typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBI4IPROC)(GLuint index, GLint x, GLint y, GLint z, GLint w);
+typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBI4IVPROC)(GLuint index, const GLint * v);
+typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBI4UIPROC)(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
+typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBI4UIVPROC)(GLuint index, const GLuint * v);
+typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBIFORMATPROC)(GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
+typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBIPOINTERPROC)(GLuint index, GLint size, GLenum type, GLsizei stride, const void * pointer);
+typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBPOINTERPROC)(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void * pointer);
+typedef void (GLAD_API_PTR *PFNGLVERTEXBINDINGDIVISORPROC)(GLuint bindingindex, GLuint divisor);
+typedef void (GLAD_API_PTR *PFNGLVIEWPORTPROC)(GLint x, GLint y, GLsizei width, GLsizei height);
+typedef void (GLAD_API_PTR *PFNGLWAITSYNCPROC)(GLsync sync, GLbitfield flags, GLuint64 timeout);
+
+GLAD_API_CALL PFNGLACTIVESHADERPROGRAMPROC glad_glActiveShaderProgram;
+#define glActiveShaderProgram glad_glActiveShaderProgram
+GLAD_API_CALL PFNGLACTIVETEXTUREPROC glad_glActiveTexture;
+#define glActiveTexture glad_glActiveTexture
+GLAD_API_CALL PFNGLATTACHSHADERPROC glad_glAttachShader;
+#define glAttachShader glad_glAttachShader
+GLAD_API_CALL PFNGLBEGINQUERYPROC glad_glBeginQuery;
+#define glBeginQuery glad_glBeginQuery
+GLAD_API_CALL PFNGLBEGINTRANSFORMFEEDBACKPROC glad_glBeginTransformFeedback;
+#define glBeginTransformFeedback glad_glBeginTransformFeedback
+GLAD_API_CALL PFNGLBINDATTRIBLOCATIONPROC glad_glBindAttribLocation;
+#define glBindAttribLocation glad_glBindAttribLocation
+GLAD_API_CALL PFNGLBINDBUFFERPROC glad_glBindBuffer;
+#define glBindBuffer glad_glBindBuffer
+GLAD_API_CALL PFNGLBINDBUFFERBASEPROC glad_glBindBufferBase;
+#define glBindBufferBase glad_glBindBufferBase
+GLAD_API_CALL PFNGLBINDBUFFERRANGEPROC glad_glBindBufferRange;
+#define glBindBufferRange glad_glBindBufferRange
+GLAD_API_CALL PFNGLBINDFRAMEBUFFERPROC glad_glBindFramebuffer;
+#define glBindFramebuffer glad_glBindFramebuffer
+GLAD_API_CALL PFNGLBINDIMAGETEXTUREPROC glad_glBindImageTexture;
+#define glBindImageTexture glad_glBindImageTexture
+GLAD_API_CALL PFNGLBINDPROGRAMPIPELINEPROC glad_glBindProgramPipeline;
+#define glBindProgramPipeline glad_glBindProgramPipeline
+GLAD_API_CALL PFNGLBINDRENDERBUFFERPROC glad_glBindRenderbuffer;
+#define glBindRenderbuffer glad_glBindRenderbuffer
+GLAD_API_CALL PFNGLBINDSAMPLERPROC glad_glBindSampler;
+#define glBindSampler glad_glBindSampler
+GLAD_API_CALL PFNGLBINDTEXTUREPROC glad_glBindTexture;
+#define glBindTexture glad_glBindTexture
+GLAD_API_CALL PFNGLBINDTRANSFORMFEEDBACKPROC glad_glBindTransformFeedback;
+#define glBindTransformFeedback glad_glBindTransformFeedback
+GLAD_API_CALL PFNGLBINDVERTEXARRAYPROC glad_glBindVertexArray;
+#define glBindVertexArray glad_glBindVertexArray
+GLAD_API_CALL PFNGLBINDVERTEXBUFFERPROC glad_glBindVertexBuffer;
+#define glBindVertexBuffer glad_glBindVertexBuffer
+GLAD_API_CALL PFNGLBLENDBARRIERPROC glad_glBlendBarrier;
+#define glBlendBarrier glad_glBlendBarrier
+GLAD_API_CALL PFNGLBLENDCOLORPROC glad_glBlendColor;
+#define glBlendColor glad_glBlendColor
+GLAD_API_CALL PFNGLBLENDEQUATIONPROC glad_glBlendEquation;
+#define glBlendEquation glad_glBlendEquation
+GLAD_API_CALL PFNGLBLENDEQUATIONSEPARATEPROC glad_glBlendEquationSeparate;
+#define glBlendEquationSeparate glad_glBlendEquationSeparate
+GLAD_API_CALL PFNGLBLENDEQUATIONSEPARATEIPROC glad_glBlendEquationSeparatei;
+#define glBlendEquationSeparatei glad_glBlendEquationSeparatei
+GLAD_API_CALL PFNGLBLENDEQUATIONIPROC glad_glBlendEquationi;
+#define glBlendEquationi glad_glBlendEquationi
+GLAD_API_CALL PFNGLBLENDFUNCPROC glad_glBlendFunc;
+#define glBlendFunc glad_glBlendFunc
+GLAD_API_CALL PFNGLBLENDFUNCSEPARATEPROC glad_glBlendFuncSeparate;
+#define glBlendFuncSeparate glad_glBlendFuncSeparate
+GLAD_API_CALL PFNGLBLENDFUNCSEPARATEIPROC glad_glBlendFuncSeparatei;
+#define glBlendFuncSeparatei glad_glBlendFuncSeparatei
+GLAD_API_CALL PFNGLBLENDFUNCIPROC glad_glBlendFunci;
+#define glBlendFunci glad_glBlendFunci
+GLAD_API_CALL PFNGLBLITFRAMEBUFFERPROC glad_glBlitFramebuffer;
+#define glBlitFramebuffer glad_glBlitFramebuffer
+GLAD_API_CALL PFNGLBUFFERDATAPROC glad_glBufferData;
+#define glBufferData glad_glBufferData
+GLAD_API_CALL PFNGLBUFFERSUBDATAPROC glad_glBufferSubData;
+#define glBufferSubData glad_glBufferSubData
+GLAD_API_CALL PFNGLCHECKFRAMEBUFFERSTATUSPROC glad_glCheckFramebufferStatus;
+#define glCheckFramebufferStatus glad_glCheckFramebufferStatus
+GLAD_API_CALL PFNGLCLEARPROC glad_glClear;
+#define glClear glad_glClear
+GLAD_API_CALL PFNGLCLEARBUFFERFIPROC glad_glClearBufferfi;
+#define glClearBufferfi glad_glClearBufferfi
+GLAD_API_CALL PFNGLCLEARBUFFERFVPROC glad_glClearBufferfv;
+#define glClearBufferfv glad_glClearBufferfv
+GLAD_API_CALL PFNGLCLEARBUFFERIVPROC glad_glClearBufferiv;
+#define glClearBufferiv glad_glClearBufferiv
+GLAD_API_CALL PFNGLCLEARBUFFERUIVPROC glad_glClearBufferuiv;
+#define glClearBufferuiv glad_glClearBufferuiv
+GLAD_API_CALL PFNGLCLEARCOLORPROC glad_glClearColor;
+#define glClearColor glad_glClearColor
+GLAD_API_CALL PFNGLCLEARDEPTHFPROC glad_glClearDepthf;
+#define glClearDepthf glad_glClearDepthf
+GLAD_API_CALL PFNGLCLEARSTENCILPROC glad_glClearStencil;
+#define glClearStencil glad_glClearStencil
+GLAD_API_CALL PFNGLCLIENTWAITSYNCPROC glad_glClientWaitSync;
+#define glClientWaitSync glad_glClientWaitSync
+GLAD_API_CALL PFNGLCOLORMASKPROC glad_glColorMask;
+#define glColorMask glad_glColorMask
+GLAD_API_CALL PFNGLCOLORMASKIPROC glad_glColorMaski;
+#define glColorMaski glad_glColorMaski
+GLAD_API_CALL PFNGLCOMPILESHADERPROC glad_glCompileShader;
+#define glCompileShader glad_glCompileShader
+GLAD_API_CALL PFNGLCOMPRESSEDTEXIMAGE2DPROC glad_glCompressedTexImage2D;
+#define glCompressedTexImage2D glad_glCompressedTexImage2D
+GLAD_API_CALL PFNGLCOMPRESSEDTEXIMAGE3DPROC glad_glCompressedTexImage3D;
+#define glCompressedTexImage3D glad_glCompressedTexImage3D
+GLAD_API_CALL PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC glad_glCompressedTexSubImage2D;
+#define glCompressedTexSubImage2D glad_glCompressedTexSubImage2D
+GLAD_API_CALL PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC glad_glCompressedTexSubImage3D;
+#define glCompressedTexSubImage3D glad_glCompressedTexSubImage3D
+GLAD_API_CALL PFNGLCOPYBUFFERSUBDATAPROC glad_glCopyBufferSubData;
+#define glCopyBufferSubData glad_glCopyBufferSubData
+GLAD_API_CALL PFNGLCOPYIMAGESUBDATAPROC glad_glCopyImageSubData;
+#define glCopyImageSubData glad_glCopyImageSubData
+GLAD_API_CALL PFNGLCOPYTEXIMAGE2DPROC glad_glCopyTexImage2D;
+#define glCopyTexImage2D glad_glCopyTexImage2D
+GLAD_API_CALL PFNGLCOPYTEXSUBIMAGE2DPROC glad_glCopyTexSubImage2D;
+#define glCopyTexSubImage2D glad_glCopyTexSubImage2D
+GLAD_API_CALL PFNGLCOPYTEXSUBIMAGE3DPROC glad_glCopyTexSubImage3D;
+#define glCopyTexSubImage3D glad_glCopyTexSubImage3D
+GLAD_API_CALL PFNGLCREATEPROGRAMPROC glad_glCreateProgram;
+#define glCreateProgram glad_glCreateProgram
+GLAD_API_CALL PFNGLCREATESHADERPROC glad_glCreateShader;
+#define glCreateShader glad_glCreateShader
+GLAD_API_CALL PFNGLCREATESHADERPROGRAMVPROC glad_glCreateShaderProgramv;
+#define glCreateShaderProgramv glad_glCreateShaderProgramv
+GLAD_API_CALL PFNGLCULLFACEPROC glad_glCullFace;
+#define glCullFace glad_glCullFace
+GLAD_API_CALL PFNGLDEBUGMESSAGECALLBACKPROC glad_glDebugMessageCallback;
+#define glDebugMessageCallback glad_glDebugMessageCallback
+GLAD_API_CALL PFNGLDEBUGMESSAGECONTROLPROC glad_glDebugMessageControl;
+#define glDebugMessageControl glad_glDebugMessageControl
+GLAD_API_CALL PFNGLDEBUGMESSAGEINSERTPROC glad_glDebugMessageInsert;
+#define glDebugMessageInsert glad_glDebugMessageInsert
+GLAD_API_CALL PFNGLDELETEBUFFERSPROC glad_glDeleteBuffers;
+#define glDeleteBuffers glad_glDeleteBuffers
+GLAD_API_CALL PFNGLDELETEFRAMEBUFFERSPROC glad_glDeleteFramebuffers;
+#define glDeleteFramebuffers glad_glDeleteFramebuffers
+GLAD_API_CALL PFNGLDELETEPROGRAMPROC glad_glDeleteProgram;
+#define glDeleteProgram glad_glDeleteProgram
+GLAD_API_CALL PFNGLDELETEPROGRAMPIPELINESPROC glad_glDeleteProgramPipelines;
+#define glDeleteProgramPipelines glad_glDeleteProgramPipelines
+GLAD_API_CALL PFNGLDELETEQUERIESPROC glad_glDeleteQueries;
+#define glDeleteQueries glad_glDeleteQueries
+GLAD_API_CALL PFNGLDELETERENDERBUFFERSPROC glad_glDeleteRenderbuffers;
+#define glDeleteRenderbuffers glad_glDeleteRenderbuffers
+GLAD_API_CALL PFNGLDELETESAMPLERSPROC glad_glDeleteSamplers;
+#define glDeleteSamplers glad_glDeleteSamplers
+GLAD_API_CALL PFNGLDELETESHADERPROC glad_glDeleteShader;
+#define glDeleteShader glad_glDeleteShader
+GLAD_API_CALL PFNGLDELETESYNCPROC glad_glDeleteSync;
+#define glDeleteSync glad_glDeleteSync
+GLAD_API_CALL PFNGLDELETETEXTURESPROC glad_glDeleteTextures;
+#define glDeleteTextures glad_glDeleteTextures
+GLAD_API_CALL PFNGLDELETETRANSFORMFEEDBACKSPROC glad_glDeleteTransformFeedbacks;
+#define glDeleteTransformFeedbacks glad_glDeleteTransformFeedbacks
+GLAD_API_CALL PFNGLDELETEVERTEXARRAYSPROC glad_glDeleteVertexArrays;
+#define glDeleteVertexArrays glad_glDeleteVertexArrays
+GLAD_API_CALL PFNGLDEPTHFUNCPROC glad_glDepthFunc;
+#define glDepthFunc glad_glDepthFunc
+GLAD_API_CALL PFNGLDEPTHMASKPROC glad_glDepthMask;
+#define glDepthMask glad_glDepthMask
+GLAD_API_CALL PFNGLDEPTHRANGEFPROC glad_glDepthRangef;
+#define glDepthRangef glad_glDepthRangef
+GLAD_API_CALL PFNGLDETACHSHADERPROC glad_glDetachShader;
+#define glDetachShader glad_glDetachShader
+GLAD_API_CALL PFNGLDISABLEPROC glad_glDisable;
+#define glDisable glad_glDisable
+GLAD_API_CALL PFNGLDISABLEVERTEXATTRIBARRAYPROC glad_glDisableVertexAttribArray;
+#define glDisableVertexAttribArray glad_glDisableVertexAttribArray
+GLAD_API_CALL PFNGLDISABLEIPROC glad_glDisablei;
+#define glDisablei glad_glDisablei
+GLAD_API_CALL PFNGLDISPATCHCOMPUTEPROC glad_glDispatchCompute;
+#define glDispatchCompute glad_glDispatchCompute
+GLAD_API_CALL PFNGLDISPATCHCOMPUTEINDIRECTPROC glad_glDispatchComputeIndirect;
+#define glDispatchComputeIndirect glad_glDispatchComputeIndirect
+GLAD_API_CALL PFNGLDRAWARRAYSPROC glad_glDrawArrays;
+#define glDrawArrays glad_glDrawArrays
+GLAD_API_CALL PFNGLDRAWARRAYSINDIRECTPROC glad_glDrawArraysIndirect;
+#define glDrawArraysIndirect glad_glDrawArraysIndirect
+GLAD_API_CALL PFNGLDRAWARRAYSINSTANCEDPROC glad_glDrawArraysInstanced;
+#define glDrawArraysInstanced glad_glDrawArraysInstanced
+GLAD_API_CALL PFNGLDRAWBUFFERSPROC glad_glDrawBuffers;
+#define glDrawBuffers glad_glDrawBuffers
+GLAD_API_CALL PFNGLDRAWELEMENTSPROC glad_glDrawElements;
+#define glDrawElements glad_glDrawElements
+GLAD_API_CALL PFNGLDRAWELEMENTSBASEVERTEXPROC glad_glDrawElementsBaseVertex;
+#define glDrawElementsBaseVertex glad_glDrawElementsBaseVertex
+GLAD_API_CALL PFNGLDRAWELEMENTSINDIRECTPROC glad_glDrawElementsIndirect;
+#define glDrawElementsIndirect glad_glDrawElementsIndirect
+GLAD_API_CALL PFNGLDRAWELEMENTSINSTANCEDPROC glad_glDrawElementsInstanced;
+#define glDrawElementsInstanced glad_glDrawElementsInstanced
+GLAD_API_CALL PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXPROC glad_glDrawElementsInstancedBaseVertex;
+#define glDrawElementsInstancedBaseVertex glad_glDrawElementsInstancedBaseVertex
+GLAD_API_CALL PFNGLDRAWRANGEELEMENTSPROC glad_glDrawRangeElements;
+#define glDrawRangeElements glad_glDrawRangeElements
+GLAD_API_CALL PFNGLDRAWRANGEELEMENTSBASEVERTEXPROC glad_glDrawRangeElementsBaseVertex;
+#define glDrawRangeElementsBaseVertex glad_glDrawRangeElementsBaseVertex
+GLAD_API_CALL PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC glad_glEGLImageTargetRenderbufferStorageOES;
+#define glEGLImageTargetRenderbufferStorageOES glad_glEGLImageTargetRenderbufferStorageOES
+GLAD_API_CALL PFNGLEGLIMAGETARGETTEXTURE2DOESPROC glad_glEGLImageTargetTexture2DOES;
+#define glEGLImageTargetTexture2DOES glad_glEGLImageTargetTexture2DOES
+GLAD_API_CALL PFNGLENABLEPROC glad_glEnable;
+#define glEnable glad_glEnable
+GLAD_API_CALL PFNGLENABLEVERTEXATTRIBARRAYPROC glad_glEnableVertexAttribArray;
+#define glEnableVertexAttribArray glad_glEnableVertexAttribArray
+GLAD_API_CALL PFNGLENABLEIPROC glad_glEnablei;
+#define glEnablei glad_glEnablei
+GLAD_API_CALL PFNGLENDQUERYPROC glad_glEndQuery;
+#define glEndQuery glad_glEndQuery
+GLAD_API_CALL PFNGLENDTRANSFORMFEEDBACKPROC glad_glEndTransformFeedback;
+#define glEndTransformFeedback glad_glEndTransformFeedback
+GLAD_API_CALL PFNGLFENCESYNCPROC glad_glFenceSync;
+#define glFenceSync glad_glFenceSync
+GLAD_API_CALL PFNGLFINISHPROC glad_glFinish;
+#define glFinish glad_glFinish
+GLAD_API_CALL PFNGLFLUSHPROC glad_glFlush;
+#define glFlush glad_glFlush
+GLAD_API_CALL PFNGLFLUSHMAPPEDBUFFERRANGEPROC glad_glFlushMappedBufferRange;
+#define glFlushMappedBufferRange glad_glFlushMappedBufferRange
+GLAD_API_CALL PFNGLFRAMEBUFFERPARAMETERIPROC glad_glFramebufferParameteri;
+#define glFramebufferParameteri glad_glFramebufferParameteri
+GLAD_API_CALL PFNGLFRAMEBUFFERRENDERBUFFERPROC glad_glFramebufferRenderbuffer;
+#define glFramebufferRenderbuffer glad_glFramebufferRenderbuffer
+GLAD_API_CALL PFNGLFRAMEBUFFERTEXTUREPROC glad_glFramebufferTexture;
+#define glFramebufferTexture glad_glFramebufferTexture
+GLAD_API_CALL PFNGLFRAMEBUFFERTEXTURE2DPROC glad_glFramebufferTexture2D;
+#define glFramebufferTexture2D glad_glFramebufferTexture2D
+GLAD_API_CALL PFNGLFRAMEBUFFERTEXTUREEXTPROC glad_glFramebufferTextureEXT;
+#define glFramebufferTextureEXT glad_glFramebufferTextureEXT
+GLAD_API_CALL PFNGLFRAMEBUFFERTEXTURELAYERPROC glad_glFramebufferTextureLayer;
+#define glFramebufferTextureLayer glad_glFramebufferTextureLayer
+GLAD_API_CALL PFNGLFRONTFACEPROC glad_glFrontFace;
+#define glFrontFace glad_glFrontFace
+GLAD_API_CALL PFNGLGENBUFFERSPROC glad_glGenBuffers;
+#define glGenBuffers glad_glGenBuffers
+GLAD_API_CALL PFNGLGENFRAMEBUFFERSPROC glad_glGenFramebuffers;
+#define glGenFramebuffers glad_glGenFramebuffers
+GLAD_API_CALL PFNGLGENPROGRAMPIPELINESPROC glad_glGenProgramPipelines;
+#define glGenProgramPipelines glad_glGenProgramPipelines
+GLAD_API_CALL PFNGLGENQUERIESPROC glad_glGenQueries;
+#define glGenQueries glad_glGenQueries
+GLAD_API_CALL PFNGLGENRENDERBUFFERSPROC glad_glGenRenderbuffers;
+#define glGenRenderbuffers glad_glGenRenderbuffers
+GLAD_API_CALL PFNGLGENSAMPLERSPROC glad_glGenSamplers;
+#define glGenSamplers glad_glGenSamplers
+GLAD_API_CALL PFNGLGENTEXTURESPROC glad_glGenTextures;
+#define glGenTextures glad_glGenTextures
+GLAD_API_CALL PFNGLGENTRANSFORMFEEDBACKSPROC glad_glGenTransformFeedbacks;
+#define glGenTransformFeedbacks glad_glGenTransformFeedbacks
+GLAD_API_CALL PFNGLGENVERTEXARRAYSPROC glad_glGenVertexArrays;
+#define glGenVertexArrays glad_glGenVertexArrays
+GLAD_API_CALL PFNGLGENERATEMIPMAPPROC glad_glGenerateMipmap;
+#define glGenerateMipmap glad_glGenerateMipmap
+GLAD_API_CALL PFNGLGETACTIVEATTRIBPROC glad_glGetActiveAttrib;
+#define glGetActiveAttrib glad_glGetActiveAttrib
+GLAD_API_CALL PFNGLGETACTIVEUNIFORMPROC glad_glGetActiveUniform;
+#define glGetActiveUniform glad_glGetActiveUniform
+GLAD_API_CALL PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC glad_glGetActiveUniformBlockName;
+#define glGetActiveUniformBlockName glad_glGetActiveUniformBlockName
+GLAD_API_CALL PFNGLGETACTIVEUNIFORMBLOCKIVPROC glad_glGetActiveUniformBlockiv;
+#define glGetActiveUniformBlockiv glad_glGetActiveUniformBlockiv
+GLAD_API_CALL PFNGLGETACTIVEUNIFORMSIVPROC glad_glGetActiveUniformsiv;
+#define glGetActiveUniformsiv glad_glGetActiveUniformsiv
+GLAD_API_CALL PFNGLGETATTACHEDSHADERSPROC glad_glGetAttachedShaders;
+#define glGetAttachedShaders glad_glGetAttachedShaders
+GLAD_API_CALL PFNGLGETATTRIBLOCATIONPROC glad_glGetAttribLocation;
+#define glGetAttribLocation glad_glGetAttribLocation
+GLAD_API_CALL PFNGLGETBOOLEANI_VPROC glad_glGetBooleani_v;
+#define glGetBooleani_v glad_glGetBooleani_v
+GLAD_API_CALL PFNGLGETBOOLEANVPROC glad_glGetBooleanv;
+#define glGetBooleanv glad_glGetBooleanv
+GLAD_API_CALL PFNGLGETBUFFERPARAMETERI64VPROC glad_glGetBufferParameteri64v;
+#define glGetBufferParameteri64v glad_glGetBufferParameteri64v
+GLAD_API_CALL PFNGLGETBUFFERPARAMETERIVPROC glad_glGetBufferParameteriv;
+#define glGetBufferParameteriv glad_glGetBufferParameteriv
+GLAD_API_CALL PFNGLGETBUFFERPOINTERVPROC glad_glGetBufferPointerv;
+#define glGetBufferPointerv glad_glGetBufferPointerv
+GLAD_API_CALL PFNGLGETDEBUGMESSAGELOGPROC glad_glGetDebugMessageLog;
+#define glGetDebugMessageLog glad_glGetDebugMessageLog
+GLAD_API_CALL PFNGLGETERRORPROC glad_glGetError;
+#define glGetError glad_glGetError
+GLAD_API_CALL PFNGLGETFLOATVPROC glad_glGetFloatv;
+#define glGetFloatv glad_glGetFloatv
+GLAD_API_CALL PFNGLGETFRAGDATALOCATIONPROC glad_glGetFragDataLocation;
+#define glGetFragDataLocation glad_glGetFragDataLocation
+GLAD_API_CALL PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC glad_glGetFramebufferAttachmentParameteriv;
+#define glGetFramebufferAttachmentParameteriv glad_glGetFramebufferAttachmentParameteriv
+GLAD_API_CALL PFNGLGETFRAMEBUFFERPARAMETERIVPROC glad_glGetFramebufferParameteriv;
+#define glGetFramebufferParameteriv glad_glGetFramebufferParameteriv
+GLAD_API_CALL PFNGLGETGRAPHICSRESETSTATUSPROC glad_glGetGraphicsResetStatus;
+#define glGetGraphicsResetStatus glad_glGetGraphicsResetStatus
+GLAD_API_CALL PFNGLGETINTEGER64I_VPROC glad_glGetInteger64i_v;
+#define glGetInteger64i_v glad_glGetInteger64i_v
+GLAD_API_CALL PFNGLGETINTEGER64VPROC glad_glGetInteger64v;
+#define glGetInteger64v glad_glGetInteger64v
+GLAD_API_CALL PFNGLGETINTEGERI_VPROC glad_glGetIntegeri_v;
+#define glGetIntegeri_v glad_glGetIntegeri_v
+GLAD_API_CALL PFNGLGETINTEGERVPROC glad_glGetIntegerv;
+#define glGetIntegerv glad_glGetIntegerv
+GLAD_API_CALL PFNGLGETINTERNALFORMATIVPROC glad_glGetInternalformativ;
+#define glGetInternalformativ glad_glGetInternalformativ
+GLAD_API_CALL PFNGLGETMULTISAMPLEFVPROC glad_glGetMultisamplefv;
+#define glGetMultisamplefv glad_glGetMultisamplefv
+GLAD_API_CALL PFNGLGETOBJECTLABELPROC glad_glGetObjectLabel;
+#define glGetObjectLabel glad_glGetObjectLabel
+GLAD_API_CALL PFNGLGETOBJECTPTRLABELPROC glad_glGetObjectPtrLabel;
+#define glGetObjectPtrLabel glad_glGetObjectPtrLabel
+GLAD_API_CALL PFNGLGETPOINTERVPROC glad_glGetPointerv;
+#define glGetPointerv glad_glGetPointerv
+GLAD_API_CALL PFNGLGETPROGRAMBINARYPROC glad_glGetProgramBinary;
+#define glGetProgramBinary glad_glGetProgramBinary
+GLAD_API_CALL PFNGLGETPROGRAMINFOLOGPROC glad_glGetProgramInfoLog;
+#define glGetProgramInfoLog glad_glGetProgramInfoLog
+GLAD_API_CALL PFNGLGETPROGRAMINTERFACEIVPROC glad_glGetProgramInterfaceiv;
+#define glGetProgramInterfaceiv glad_glGetProgramInterfaceiv
+GLAD_API_CALL PFNGLGETPROGRAMPIPELINEINFOLOGPROC glad_glGetProgramPipelineInfoLog;
+#define glGetProgramPipelineInfoLog glad_glGetProgramPipelineInfoLog
+GLAD_API_CALL PFNGLGETPROGRAMPIPELINEIVPROC glad_glGetProgramPipelineiv;
+#define glGetProgramPipelineiv glad_glGetProgramPipelineiv
+GLAD_API_CALL PFNGLGETPROGRAMRESOURCEINDEXPROC glad_glGetProgramResourceIndex;
+#define glGetProgramResourceIndex glad_glGetProgramResourceIndex
+GLAD_API_CALL PFNGLGETPROGRAMRESOURCELOCATIONPROC glad_glGetProgramResourceLocation;
+#define glGetProgramResourceLocation glad_glGetProgramResourceLocation
+GLAD_API_CALL PFNGLGETPROGRAMRESOURCENAMEPROC glad_glGetProgramResourceName;
+#define glGetProgramResourceName glad_glGetProgramResourceName
+GLAD_API_CALL PFNGLGETPROGRAMRESOURCEIVPROC glad_glGetProgramResourceiv;
+#define glGetProgramResourceiv glad_glGetProgramResourceiv
+GLAD_API_CALL PFNGLGETPROGRAMIVPROC glad_glGetProgramiv;
+#define glGetProgramiv glad_glGetProgramiv
+GLAD_API_CALL PFNGLGETQUERYOBJECTUIVPROC glad_glGetQueryObjectuiv;
+#define glGetQueryObjectuiv glad_glGetQueryObjectuiv
+GLAD_API_CALL PFNGLGETQUERYIVPROC glad_glGetQueryiv;
+#define glGetQueryiv glad_glGetQueryiv
+GLAD_API_CALL PFNGLGETRENDERBUFFERPARAMETERIVPROC glad_glGetRenderbufferParameteriv;
+#define glGetRenderbufferParameteriv glad_glGetRenderbufferParameteriv
+GLAD_API_CALL PFNGLGETSAMPLERPARAMETERIIVPROC glad_glGetSamplerParameterIiv;
+#define glGetSamplerParameterIiv glad_glGetSamplerParameterIiv
+GLAD_API_CALL PFNGLGETSAMPLERPARAMETERIUIVPROC glad_glGetSamplerParameterIuiv;
+#define glGetSamplerParameterIuiv glad_glGetSamplerParameterIuiv
+GLAD_API_CALL PFNGLGETSAMPLERPARAMETERFVPROC glad_glGetSamplerParameterfv;
+#define glGetSamplerParameterfv glad_glGetSamplerParameterfv
+GLAD_API_CALL PFNGLGETSAMPLERPARAMETERIVPROC glad_glGetSamplerParameteriv;
+#define glGetSamplerParameteriv glad_glGetSamplerParameteriv
+GLAD_API_CALL PFNGLGETSHADERINFOLOGPROC glad_glGetShaderInfoLog;
+#define glGetShaderInfoLog glad_glGetShaderInfoLog
+GLAD_API_CALL PFNGLGETSHADERPRECISIONFORMATPROC glad_glGetShaderPrecisionFormat;
+#define glGetShaderPrecisionFormat glad_glGetShaderPrecisionFormat
+GLAD_API_CALL PFNGLGETSHADERSOURCEPROC glad_glGetShaderSource;
+#define glGetShaderSource glad_glGetShaderSource
+GLAD_API_CALL PFNGLGETSHADERIVPROC glad_glGetShaderiv;
+#define glGetShaderiv glad_glGetShaderiv
+GLAD_API_CALL PFNGLGETSTRINGPROC glad_glGetString;
+#define glGetString glad_glGetString
+GLAD_API_CALL PFNGLGETSTRINGIPROC glad_glGetStringi;
+#define glGetStringi glad_glGetStringi
+GLAD_API_CALL PFNGLGETSYNCIVPROC glad_glGetSynciv;
+#define glGetSynciv glad_glGetSynciv
+GLAD_API_CALL PFNGLGETTEXLEVELPARAMETERFVPROC glad_glGetTexLevelParameterfv;
+#define glGetTexLevelParameterfv glad_glGetTexLevelParameterfv
+GLAD_API_CALL PFNGLGETTEXLEVELPARAMETERIVPROC glad_glGetTexLevelParameteriv;
+#define glGetTexLevelParameteriv glad_glGetTexLevelParameteriv
+GLAD_API_CALL PFNGLGETTEXPARAMETERIIVPROC glad_glGetTexParameterIiv;
+#define glGetTexParameterIiv glad_glGetTexParameterIiv
+GLAD_API_CALL PFNGLGETTEXPARAMETERIUIVPROC glad_glGetTexParameterIuiv;
+#define glGetTexParameterIuiv glad_glGetTexParameterIuiv
+GLAD_API_CALL PFNGLGETTEXPARAMETERFVPROC glad_glGetTexParameterfv;
+#define glGetTexParameterfv glad_glGetTexParameterfv
+GLAD_API_CALL PFNGLGETTEXPARAMETERIVPROC glad_glGetTexParameteriv;
+#define glGetTexParameteriv glad_glGetTexParameteriv
+GLAD_API_CALL PFNGLGETTRANSFORMFEEDBACKVARYINGPROC glad_glGetTransformFeedbackVarying;
+#define glGetTransformFeedbackVarying glad_glGetTransformFeedbackVarying
+GLAD_API_CALL PFNGLGETUNIFORMBLOCKINDEXPROC glad_glGetUniformBlockIndex;
+#define glGetUniformBlockIndex glad_glGetUniformBlockIndex
+GLAD_API_CALL PFNGLGETUNIFORMINDICESPROC glad_glGetUniformIndices;
+#define glGetUniformIndices glad_glGetUniformIndices
+GLAD_API_CALL PFNGLGETUNIFORMLOCATIONPROC glad_glGetUniformLocation;
+#define glGetUniformLocation glad_glGetUniformLocation
+GLAD_API_CALL PFNGLGETUNIFORMFVPROC glad_glGetUniformfv;
+#define glGetUniformfv glad_glGetUniformfv
+GLAD_API_CALL PFNGLGETUNIFORMIVPROC glad_glGetUniformiv;
+#define glGetUniformiv glad_glGetUniformiv
+GLAD_API_CALL PFNGLGETUNIFORMUIVPROC glad_glGetUniformuiv;
+#define glGetUniformuiv glad_glGetUniformuiv
+GLAD_API_CALL PFNGLGETVERTEXATTRIBIIVPROC glad_glGetVertexAttribIiv;
+#define glGetVertexAttribIiv glad_glGetVertexAttribIiv
+GLAD_API_CALL PFNGLGETVERTEXATTRIBIUIVPROC glad_glGetVertexAttribIuiv;
+#define glGetVertexAttribIuiv glad_glGetVertexAttribIuiv
+GLAD_API_CALL PFNGLGETVERTEXATTRIBPOINTERVPROC glad_glGetVertexAttribPointerv;
+#define glGetVertexAttribPointerv glad_glGetVertexAttribPointerv
+GLAD_API_CALL PFNGLGETVERTEXATTRIBFVPROC glad_glGetVertexAttribfv;
+#define glGetVertexAttribfv glad_glGetVertexAttribfv
+GLAD_API_CALL PFNGLGETVERTEXATTRIBIVPROC glad_glGetVertexAttribiv;
+#define glGetVertexAttribiv glad_glGetVertexAttribiv
+GLAD_API_CALL PFNGLGETNUNIFORMFVPROC glad_glGetnUniformfv;
+#define glGetnUniformfv glad_glGetnUniformfv
+GLAD_API_CALL PFNGLGETNUNIFORMIVPROC glad_glGetnUniformiv;
+#define glGetnUniformiv glad_glGetnUniformiv
+GLAD_API_CALL PFNGLGETNUNIFORMUIVPROC glad_glGetnUniformuiv;
+#define glGetnUniformuiv glad_glGetnUniformuiv
+GLAD_API_CALL PFNGLHINTPROC glad_glHint;
+#define glHint glad_glHint
+GLAD_API_CALL PFNGLINVALIDATEFRAMEBUFFERPROC glad_glInvalidateFramebuffer;
+#define glInvalidateFramebuffer glad_glInvalidateFramebuffer
+GLAD_API_CALL PFNGLINVALIDATESUBFRAMEBUFFERPROC glad_glInvalidateSubFramebuffer;
+#define glInvalidateSubFramebuffer glad_glInvalidateSubFramebuffer
+GLAD_API_CALL PFNGLISBUFFERPROC glad_glIsBuffer;
+#define glIsBuffer glad_glIsBuffer
+GLAD_API_CALL PFNGLISENABLEDPROC glad_glIsEnabled;
+#define glIsEnabled glad_glIsEnabled
+GLAD_API_CALL PFNGLISENABLEDIPROC glad_glIsEnabledi;
+#define glIsEnabledi glad_glIsEnabledi
+GLAD_API_CALL PFNGLISFRAMEBUFFERPROC glad_glIsFramebuffer;
+#define glIsFramebuffer glad_glIsFramebuffer
+GLAD_API_CALL PFNGLISPROGRAMPROC glad_glIsProgram;
+#define glIsProgram glad_glIsProgram
+GLAD_API_CALL PFNGLISPROGRAMPIPELINEPROC glad_glIsProgramPipeline;
+#define glIsProgramPipeline glad_glIsProgramPipeline
+GLAD_API_CALL PFNGLISQUERYPROC glad_glIsQuery;
+#define glIsQuery glad_glIsQuery
+GLAD_API_CALL PFNGLISRENDERBUFFERPROC glad_glIsRenderbuffer;
+#define glIsRenderbuffer glad_glIsRenderbuffer
+GLAD_API_CALL PFNGLISSAMPLERPROC glad_glIsSampler;
+#define glIsSampler glad_glIsSampler
+GLAD_API_CALL PFNGLISSHADERPROC glad_glIsShader;
+#define glIsShader glad_glIsShader
+GLAD_API_CALL PFNGLISSYNCPROC glad_glIsSync;
+#define glIsSync glad_glIsSync
+GLAD_API_CALL PFNGLISTEXTUREPROC glad_glIsTexture;
+#define glIsTexture glad_glIsTexture
+GLAD_API_CALL PFNGLISTRANSFORMFEEDBACKPROC glad_glIsTransformFeedback;
+#define glIsTransformFeedback glad_glIsTransformFeedback
+GLAD_API_CALL PFNGLISVERTEXARRAYPROC glad_glIsVertexArray;
+#define glIsVertexArray glad_glIsVertexArray
+GLAD_API_CALL PFNGLLINEWIDTHPROC glad_glLineWidth;
+#define glLineWidth glad_glLineWidth
+GLAD_API_CALL PFNGLLINKPROGRAMPROC glad_glLinkProgram;
+#define glLinkProgram glad_glLinkProgram
+GLAD_API_CALL PFNGLMAPBUFFERRANGEPROC glad_glMapBufferRange;
+#define glMapBufferRange glad_glMapBufferRange
+GLAD_API_CALL PFNGLMEMORYBARRIERPROC glad_glMemoryBarrier;
+#define glMemoryBarrier glad_glMemoryBarrier
+GLAD_API_CALL PFNGLMEMORYBARRIERBYREGIONPROC glad_glMemoryBarrierByRegion;
+#define glMemoryBarrierByRegion glad_glMemoryBarrierByRegion
+GLAD_API_CALL PFNGLMINSAMPLESHADINGPROC glad_glMinSampleShading;
+#define glMinSampleShading glad_glMinSampleShading
+GLAD_API_CALL PFNGLOBJECTLABELPROC glad_glObjectLabel;
+#define glObjectLabel glad_glObjectLabel
+GLAD_API_CALL PFNGLOBJECTPTRLABELPROC glad_glObjectPtrLabel;
+#define glObjectPtrLabel glad_glObjectPtrLabel
+GLAD_API_CALL PFNGLPATCHPARAMETERIPROC glad_glPatchParameteri;
+#define glPatchParameteri glad_glPatchParameteri
+GLAD_API_CALL PFNGLPAUSETRANSFORMFEEDBACKPROC glad_glPauseTransformFeedback;
+#define glPauseTransformFeedback glad_glPauseTransformFeedback
+GLAD_API_CALL PFNGLPIXELSTOREIPROC glad_glPixelStorei;
+#define glPixelStorei glad_glPixelStorei
+GLAD_API_CALL PFNGLPOLYGONOFFSETPROC glad_glPolygonOffset;
+#define glPolygonOffset glad_glPolygonOffset
+GLAD_API_CALL PFNGLPOPDEBUGGROUPPROC glad_glPopDebugGroup;
+#define glPopDebugGroup glad_glPopDebugGroup
+GLAD_API_CALL PFNGLPRIMITIVEBOUNDINGBOXPROC glad_glPrimitiveBoundingBox;
+#define glPrimitiveBoundingBox glad_glPrimitiveBoundingBox
+GLAD_API_CALL PFNGLPROGRAMBINARYPROC glad_glProgramBinary;
+#define glProgramBinary glad_glProgramBinary
+GLAD_API_CALL PFNGLPROGRAMPARAMETERIPROC glad_glProgramParameteri;
+#define glProgramParameteri glad_glProgramParameteri
+GLAD_API_CALL PFNGLPROGRAMUNIFORM1FPROC glad_glProgramUniform1f;
+#define glProgramUniform1f glad_glProgramUniform1f
+GLAD_API_CALL PFNGLPROGRAMUNIFORM1FVPROC glad_glProgramUniform1fv;
+#define glProgramUniform1fv glad_glProgramUniform1fv
+GLAD_API_CALL PFNGLPROGRAMUNIFORM1IPROC glad_glProgramUniform1i;
+#define glProgramUniform1i glad_glProgramUniform1i
+GLAD_API_CALL PFNGLPROGRAMUNIFORM1IVPROC glad_glProgramUniform1iv;
+#define glProgramUniform1iv glad_glProgramUniform1iv
+GLAD_API_CALL PFNGLPROGRAMUNIFORM1UIPROC glad_glProgramUniform1ui;
+#define glProgramUniform1ui glad_glProgramUniform1ui
+GLAD_API_CALL PFNGLPROGRAMUNIFORM1UIVPROC glad_glProgramUniform1uiv;
+#define glProgramUniform1uiv glad_glProgramUniform1uiv
+GLAD_API_CALL PFNGLPROGRAMUNIFORM2FPROC glad_glProgramUniform2f;
+#define glProgramUniform2f glad_glProgramUniform2f
+GLAD_API_CALL PFNGLPROGRAMUNIFORM2FVPROC glad_glProgramUniform2fv;
+#define glProgramUniform2fv glad_glProgramUniform2fv
+GLAD_API_CALL PFNGLPROGRAMUNIFORM2IPROC glad_glProgramUniform2i;
+#define glProgramUniform2i glad_glProgramUniform2i
+GLAD_API_CALL PFNGLPROGRAMUNIFORM2IVPROC glad_glProgramUniform2iv;
+#define glProgramUniform2iv glad_glProgramUniform2iv
+GLAD_API_CALL PFNGLPROGRAMUNIFORM2UIPROC glad_glProgramUniform2ui;
+#define glProgramUniform2ui glad_glProgramUniform2ui
+GLAD_API_CALL PFNGLPROGRAMUNIFORM2UIVPROC glad_glProgramUniform2uiv;
+#define glProgramUniform2uiv glad_glProgramUniform2uiv
+GLAD_API_CALL PFNGLPROGRAMUNIFORM3FPROC glad_glProgramUniform3f;
+#define glProgramUniform3f glad_glProgramUniform3f
+GLAD_API_CALL PFNGLPROGRAMUNIFORM3FVPROC glad_glProgramUniform3fv;
+#define glProgramUniform3fv glad_glProgramUniform3fv
+GLAD_API_CALL PFNGLPROGRAMUNIFORM3IPROC glad_glProgramUniform3i;
+#define glProgramUniform3i glad_glProgramUniform3i
+GLAD_API_CALL PFNGLPROGRAMUNIFORM3IVPROC glad_glProgramUniform3iv;
+#define glProgramUniform3iv glad_glProgramUniform3iv
+GLAD_API_CALL PFNGLPROGRAMUNIFORM3UIPROC glad_glProgramUniform3ui;
+#define glProgramUniform3ui glad_glProgramUniform3ui
+GLAD_API_CALL PFNGLPROGRAMUNIFORM3UIVPROC glad_glProgramUniform3uiv;
+#define glProgramUniform3uiv glad_glProgramUniform3uiv
+GLAD_API_CALL PFNGLPROGRAMUNIFORM4FPROC glad_glProgramUniform4f;
+#define glProgramUniform4f glad_glProgramUniform4f
+GLAD_API_CALL PFNGLPROGRAMUNIFORM4FVPROC glad_glProgramUniform4fv;
+#define glProgramUniform4fv glad_glProgramUniform4fv
+GLAD_API_CALL PFNGLPROGRAMUNIFORM4IPROC glad_glProgramUniform4i;
+#define glProgramUniform4i glad_glProgramUniform4i
+GLAD_API_CALL PFNGLPROGRAMUNIFORM4IVPROC glad_glProgramUniform4iv;
+#define glProgramUniform4iv glad_glProgramUniform4iv
+GLAD_API_CALL PFNGLPROGRAMUNIFORM4UIPROC glad_glProgramUniform4ui;
+#define glProgramUniform4ui glad_glProgramUniform4ui
+GLAD_API_CALL PFNGLPROGRAMUNIFORM4UIVPROC glad_glProgramUniform4uiv;
+#define glProgramUniform4uiv glad_glProgramUniform4uiv
+GLAD_API_CALL PFNGLPROGRAMUNIFORMMATRIX2FVPROC glad_glProgramUniformMatrix2fv;
+#define glProgramUniformMatrix2fv glad_glProgramUniformMatrix2fv
+GLAD_API_CALL PFNGLPROGRAMUNIFORMMATRIX2X3FVPROC glad_glProgramUniformMatrix2x3fv;
+#define glProgramUniformMatrix2x3fv glad_glProgramUniformMatrix2x3fv
+GLAD_API_CALL PFNGLPROGRAMUNIFORMMATRIX2X4FVPROC glad_glProgramUniformMatrix2x4fv;
+#define glProgramUniformMatrix2x4fv glad_glProgramUniformMatrix2x4fv
+GLAD_API_CALL PFNGLPROGRAMUNIFORMMATRIX3FVPROC glad_glProgramUniformMatrix3fv;
+#define glProgramUniformMatrix3fv glad_glProgramUniformMatrix3fv
+GLAD_API_CALL PFNGLPROGRAMUNIFORMMATRIX3X2FVPROC glad_glProgramUniformMatrix3x2fv;
+#define glProgramUniformMatrix3x2fv glad_glProgramUniformMatrix3x2fv
+GLAD_API_CALL PFNGLPROGRAMUNIFORMMATRIX3X4FVPROC glad_glProgramUniformMatrix3x4fv;
+#define glProgramUniformMatrix3x4fv glad_glProgramUniformMatrix3x4fv
+GLAD_API_CALL PFNGLPROGRAMUNIFORMMATRIX4FVPROC glad_glProgramUniformMatrix4fv;
+#define glProgramUniformMatrix4fv glad_glProgramUniformMatrix4fv
+GLAD_API_CALL PFNGLPROGRAMUNIFORMMATRIX4X2FVPROC glad_glProgramUniformMatrix4x2fv;
+#define glProgramUniformMatrix4x2fv glad_glProgramUniformMatrix4x2fv
+GLAD_API_CALL PFNGLPROGRAMUNIFORMMATRIX4X3FVPROC glad_glProgramUniformMatrix4x3fv;
+#define glProgramUniformMatrix4x3fv glad_glProgramUniformMatrix4x3fv
+GLAD_API_CALL PFNGLPUSHDEBUGGROUPPROC glad_glPushDebugGroup;
+#define glPushDebugGroup glad_glPushDebugGroup
+GLAD_API_CALL PFNGLREADBUFFERPROC glad_glReadBuffer;
+#define glReadBuffer glad_glReadBuffer
+GLAD_API_CALL PFNGLREADPIXELSPROC glad_glReadPixels;
+#define glReadPixels glad_glReadPixels
+GLAD_API_CALL PFNGLREADNPIXELSPROC glad_glReadnPixels;
+#define glReadnPixels glad_glReadnPixels
+GLAD_API_CALL PFNGLRELEASESHADERCOMPILERPROC glad_glReleaseShaderCompiler;
+#define glReleaseShaderCompiler glad_glReleaseShaderCompiler
+GLAD_API_CALL PFNGLRENDERBUFFERSTORAGEPROC glad_glRenderbufferStorage;
+#define glRenderbufferStorage glad_glRenderbufferStorage
+GLAD_API_CALL PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC glad_glRenderbufferStorageMultisample;
+#define glRenderbufferStorageMultisample glad_glRenderbufferStorageMultisample
+GLAD_API_CALL PFNGLRESUMETRANSFORMFEEDBACKPROC glad_glResumeTransformFeedback;
+#define glResumeTransformFeedback glad_glResumeTransformFeedback
+GLAD_API_CALL PFNGLSAMPLECOVERAGEPROC glad_glSampleCoverage;
+#define glSampleCoverage glad_glSampleCoverage
+GLAD_API_CALL PFNGLSAMPLEMASKIPROC glad_glSampleMaski;
+#define glSampleMaski glad_glSampleMaski
+GLAD_API_CALL PFNGLSAMPLERPARAMETERIIVPROC glad_glSamplerParameterIiv;
+#define glSamplerParameterIiv glad_glSamplerParameterIiv
+GLAD_API_CALL PFNGLSAMPLERPARAMETERIUIVPROC glad_glSamplerParameterIuiv;
+#define glSamplerParameterIuiv glad_glSamplerParameterIuiv
+GLAD_API_CALL PFNGLSAMPLERPARAMETERFPROC glad_glSamplerParameterf;
+#define glSamplerParameterf glad_glSamplerParameterf
+GLAD_API_CALL PFNGLSAMPLERPARAMETERFVPROC glad_glSamplerParameterfv;
+#define glSamplerParameterfv glad_glSamplerParameterfv
+GLAD_API_CALL PFNGLSAMPLERPARAMETERIPROC glad_glSamplerParameteri;
+#define glSamplerParameteri glad_glSamplerParameteri
+GLAD_API_CALL PFNGLSAMPLERPARAMETERIVPROC glad_glSamplerParameteriv;
+#define glSamplerParameteriv glad_glSamplerParameteriv
+GLAD_API_CALL PFNGLSCISSORPROC glad_glScissor;
+#define glScissor glad_glScissor
+GLAD_API_CALL PFNGLSHADERBINARYPROC glad_glShaderBinary;
+#define glShaderBinary glad_glShaderBinary
+GLAD_API_CALL PFNGLSHADERSOURCEPROC glad_glShaderSource;
+#define glShaderSource glad_glShaderSource
+GLAD_API_CALL PFNGLSTENCILFUNCPROC glad_glStencilFunc;
+#define glStencilFunc glad_glStencilFunc
+GLAD_API_CALL PFNGLSTENCILFUNCSEPARATEPROC glad_glStencilFuncSeparate;
+#define glStencilFuncSeparate glad_glStencilFuncSeparate
+GLAD_API_CALL PFNGLSTENCILMASKPROC glad_glStencilMask;
+#define glStencilMask glad_glStencilMask
+GLAD_API_CALL PFNGLSTENCILMASKSEPARATEPROC glad_glStencilMaskSeparate;
+#define glStencilMaskSeparate glad_glStencilMaskSeparate
+GLAD_API_CALL PFNGLSTENCILOPPROC glad_glStencilOp;
+#define glStencilOp glad_glStencilOp
+GLAD_API_CALL PFNGLSTENCILOPSEPARATEPROC glad_glStencilOpSeparate;
+#define glStencilOpSeparate glad_glStencilOpSeparate
+GLAD_API_CALL PFNGLTEXBUFFERPROC glad_glTexBuffer;
+#define glTexBuffer glad_glTexBuffer
+GLAD_API_CALL PFNGLTEXBUFFERRANGEPROC glad_glTexBufferRange;
+#define glTexBufferRange glad_glTexBufferRange
+GLAD_API_CALL PFNGLTEXIMAGE2DPROC glad_glTexImage2D;
+#define glTexImage2D glad_glTexImage2D
+GLAD_API_CALL PFNGLTEXIMAGE3DPROC glad_glTexImage3D;
+#define glTexImage3D glad_glTexImage3D
+GLAD_API_CALL PFNGLTEXPARAMETERIIVPROC glad_glTexParameterIiv;
+#define glTexParameterIiv glad_glTexParameterIiv
+GLAD_API_CALL PFNGLTEXPARAMETERIUIVPROC glad_glTexParameterIuiv;
+#define glTexParameterIuiv glad_glTexParameterIuiv
+GLAD_API_CALL PFNGLTEXPARAMETERFPROC glad_glTexParameterf;
+#define glTexParameterf glad_glTexParameterf
+GLAD_API_CALL PFNGLTEXPARAMETERFVPROC glad_glTexParameterfv;
+#define glTexParameterfv glad_glTexParameterfv
+GLAD_API_CALL PFNGLTEXPARAMETERIPROC glad_glTexParameteri;
+#define glTexParameteri glad_glTexParameteri
+GLAD_API_CALL PFNGLTEXPARAMETERIVPROC glad_glTexParameteriv;
+#define glTexParameteriv glad_glTexParameteriv
+GLAD_API_CALL PFNGLTEXSTORAGE2DPROC glad_glTexStorage2D;
+#define glTexStorage2D glad_glTexStorage2D
+GLAD_API_CALL PFNGLTEXSTORAGE2DMULTISAMPLEPROC glad_glTexStorage2DMultisample;
+#define glTexStorage2DMultisample glad_glTexStorage2DMultisample
+GLAD_API_CALL PFNGLTEXSTORAGE3DPROC glad_glTexStorage3D;
+#define glTexStorage3D glad_glTexStorage3D
+GLAD_API_CALL PFNGLTEXSTORAGE3DMULTISAMPLEPROC glad_glTexStorage3DMultisample;
+#define glTexStorage3DMultisample glad_glTexStorage3DMultisample
+GLAD_API_CALL PFNGLTEXSUBIMAGE2DPROC glad_glTexSubImage2D;
+#define glTexSubImage2D glad_glTexSubImage2D
+GLAD_API_CALL PFNGLTEXSUBIMAGE3DPROC glad_glTexSubImage3D;
+#define glTexSubImage3D glad_glTexSubImage3D
+GLAD_API_CALL PFNGLTRANSFORMFEEDBACKVARYINGSPROC glad_glTransformFeedbackVaryings;
+#define glTransformFeedbackVaryings glad_glTransformFeedbackVaryings
+GLAD_API_CALL PFNGLUNIFORM1FPROC glad_glUniform1f;
+#define glUniform1f glad_glUniform1f
+GLAD_API_CALL PFNGLUNIFORM1FVPROC glad_glUniform1fv;
+#define glUniform1fv glad_glUniform1fv
+GLAD_API_CALL PFNGLUNIFORM1IPROC glad_glUniform1i;
+#define glUniform1i glad_glUniform1i
+GLAD_API_CALL PFNGLUNIFORM1IVPROC glad_glUniform1iv;
+#define glUniform1iv glad_glUniform1iv
+GLAD_API_CALL PFNGLUNIFORM1UIPROC glad_glUniform1ui;
+#define glUniform1ui glad_glUniform1ui
+GLAD_API_CALL PFNGLUNIFORM1UIVPROC glad_glUniform1uiv;
+#define glUniform1uiv glad_glUniform1uiv
+GLAD_API_CALL PFNGLUNIFORM2FPROC glad_glUniform2f;
+#define glUniform2f glad_glUniform2f
+GLAD_API_CALL PFNGLUNIFORM2FVPROC glad_glUniform2fv;
+#define glUniform2fv glad_glUniform2fv
+GLAD_API_CALL PFNGLUNIFORM2IPROC glad_glUniform2i;
+#define glUniform2i glad_glUniform2i
+GLAD_API_CALL PFNGLUNIFORM2IVPROC glad_glUniform2iv;
+#define glUniform2iv glad_glUniform2iv
+GLAD_API_CALL PFNGLUNIFORM2UIPROC glad_glUniform2ui;
+#define glUniform2ui glad_glUniform2ui
+GLAD_API_CALL PFNGLUNIFORM2UIVPROC glad_glUniform2uiv;
+#define glUniform2uiv glad_glUniform2uiv
+GLAD_API_CALL PFNGLUNIFORM3FPROC glad_glUniform3f;
+#define glUniform3f glad_glUniform3f
+GLAD_API_CALL PFNGLUNIFORM3FVPROC glad_glUniform3fv;
+#define glUniform3fv glad_glUniform3fv
+GLAD_API_CALL PFNGLUNIFORM3IPROC glad_glUniform3i;
+#define glUniform3i glad_glUniform3i
+GLAD_API_CALL PFNGLUNIFORM3IVPROC glad_glUniform3iv;
+#define glUniform3iv glad_glUniform3iv
+GLAD_API_CALL PFNGLUNIFORM3UIPROC glad_glUniform3ui;
+#define glUniform3ui glad_glUniform3ui
+GLAD_API_CALL PFNGLUNIFORM3UIVPROC glad_glUniform3uiv;
+#define glUniform3uiv glad_glUniform3uiv
+GLAD_API_CALL PFNGLUNIFORM4FPROC glad_glUniform4f;
+#define glUniform4f glad_glUniform4f
+GLAD_API_CALL PFNGLUNIFORM4FVPROC glad_glUniform4fv;
+#define glUniform4fv glad_glUniform4fv
+GLAD_API_CALL PFNGLUNIFORM4IPROC glad_glUniform4i;
+#define glUniform4i glad_glUniform4i
+GLAD_API_CALL PFNGLUNIFORM4IVPROC glad_glUniform4iv;
+#define glUniform4iv glad_glUniform4iv
+GLAD_API_CALL PFNGLUNIFORM4UIPROC glad_glUniform4ui;
+#define glUniform4ui glad_glUniform4ui
+GLAD_API_CALL PFNGLUNIFORM4UIVPROC glad_glUniform4uiv;
+#define glUniform4uiv glad_glUniform4uiv
+GLAD_API_CALL PFNGLUNIFORMBLOCKBINDINGPROC glad_glUniformBlockBinding;
+#define glUniformBlockBinding glad_glUniformBlockBinding
+GLAD_API_CALL PFNGLUNIFORMMATRIX2FVPROC glad_glUniformMatrix2fv;
+#define glUniformMatrix2fv glad_glUniformMatrix2fv
+GLAD_API_CALL PFNGLUNIFORMMATRIX2X3FVPROC glad_glUniformMatrix2x3fv;
+#define glUniformMatrix2x3fv glad_glUniformMatrix2x3fv
+GLAD_API_CALL PFNGLUNIFORMMATRIX2X4FVPROC glad_glUniformMatrix2x4fv;
+#define glUniformMatrix2x4fv glad_glUniformMatrix2x4fv
+GLAD_API_CALL PFNGLUNIFORMMATRIX3FVPROC glad_glUniformMatrix3fv;
+#define glUniformMatrix3fv glad_glUniformMatrix3fv
+GLAD_API_CALL PFNGLUNIFORMMATRIX3X2FVPROC glad_glUniformMatrix3x2fv;
+#define glUniformMatrix3x2fv glad_glUniformMatrix3x2fv
+GLAD_API_CALL PFNGLUNIFORMMATRIX3X4FVPROC glad_glUniformMatrix3x4fv;
+#define glUniformMatrix3x4fv glad_glUniformMatrix3x4fv
+GLAD_API_CALL PFNGLUNIFORMMATRIX4FVPROC glad_glUniformMatrix4fv;
+#define glUniformMatrix4fv glad_glUniformMatrix4fv
+GLAD_API_CALL PFNGLUNIFORMMATRIX4X2FVPROC glad_glUniformMatrix4x2fv;
+#define glUniformMatrix4x2fv glad_glUniformMatrix4x2fv
+GLAD_API_CALL PFNGLUNIFORMMATRIX4X3FVPROC glad_glUniformMatrix4x3fv;
+#define glUniformMatrix4x3fv glad_glUniformMatrix4x3fv
+GLAD_API_CALL PFNGLUNMAPBUFFERPROC glad_glUnmapBuffer;
+#define glUnmapBuffer glad_glUnmapBuffer
+GLAD_API_CALL PFNGLUSEPROGRAMPROC glad_glUseProgram;
+#define glUseProgram glad_glUseProgram
+GLAD_API_CALL PFNGLUSEPROGRAMSTAGESPROC glad_glUseProgramStages;
+#define glUseProgramStages glad_glUseProgramStages
+GLAD_API_CALL PFNGLVALIDATEPROGRAMPROC glad_glValidateProgram;
+#define glValidateProgram glad_glValidateProgram
+GLAD_API_CALL PFNGLVALIDATEPROGRAMPIPELINEPROC glad_glValidateProgramPipeline;
+#define glValidateProgramPipeline glad_glValidateProgramPipeline
+GLAD_API_CALL PFNGLVERTEXATTRIB1FPROC glad_glVertexAttrib1f;
+#define glVertexAttrib1f glad_glVertexAttrib1f
+GLAD_API_CALL PFNGLVERTEXATTRIB1FVPROC glad_glVertexAttrib1fv;
+#define glVertexAttrib1fv glad_glVertexAttrib1fv
+GLAD_API_CALL PFNGLVERTEXATTRIB2FPROC glad_glVertexAttrib2f;
+#define glVertexAttrib2f glad_glVertexAttrib2f
+GLAD_API_CALL PFNGLVERTEXATTRIB2FVPROC glad_glVertexAttrib2fv;
+#define glVertexAttrib2fv glad_glVertexAttrib2fv
+GLAD_API_CALL PFNGLVERTEXATTRIB3FPROC glad_glVertexAttrib3f;
+#define glVertexAttrib3f glad_glVertexAttrib3f
+GLAD_API_CALL PFNGLVERTEXATTRIB3FVPROC glad_glVertexAttrib3fv;
+#define glVertexAttrib3fv glad_glVertexAttrib3fv
+GLAD_API_CALL PFNGLVERTEXATTRIB4FPROC glad_glVertexAttrib4f;
+#define glVertexAttrib4f glad_glVertexAttrib4f
+GLAD_API_CALL PFNGLVERTEXATTRIB4FVPROC glad_glVertexAttrib4fv;
+#define glVertexAttrib4fv glad_glVertexAttrib4fv
+GLAD_API_CALL PFNGLVERTEXATTRIBBINDINGPROC glad_glVertexAttribBinding;
+#define glVertexAttribBinding glad_glVertexAttribBinding
+GLAD_API_CALL PFNGLVERTEXATTRIBDIVISORPROC glad_glVertexAttribDivisor;
+#define glVertexAttribDivisor glad_glVertexAttribDivisor
+GLAD_API_CALL PFNGLVERTEXATTRIBFORMATPROC glad_glVertexAttribFormat;
+#define glVertexAttribFormat glad_glVertexAttribFormat
+GLAD_API_CALL PFNGLVERTEXATTRIBI4IPROC glad_glVertexAttribI4i;
+#define glVertexAttribI4i glad_glVertexAttribI4i
+GLAD_API_CALL PFNGLVERTEXATTRIBI4IVPROC glad_glVertexAttribI4iv;
+#define glVertexAttribI4iv glad_glVertexAttribI4iv
+GLAD_API_CALL PFNGLVERTEXATTRIBI4UIPROC glad_glVertexAttribI4ui;
+#define glVertexAttribI4ui glad_glVertexAttribI4ui
+GLAD_API_CALL PFNGLVERTEXATTRIBI4UIVPROC glad_glVertexAttribI4uiv;
+#define glVertexAttribI4uiv glad_glVertexAttribI4uiv
+GLAD_API_CALL PFNGLVERTEXATTRIBIFORMATPROC glad_glVertexAttribIFormat;
+#define glVertexAttribIFormat glad_glVertexAttribIFormat
+GLAD_API_CALL PFNGLVERTEXATTRIBIPOINTERPROC glad_glVertexAttribIPointer;
+#define glVertexAttribIPointer glad_glVertexAttribIPointer
+GLAD_API_CALL PFNGLVERTEXATTRIBPOINTERPROC glad_glVertexAttribPointer;
+#define glVertexAttribPointer glad_glVertexAttribPointer
+GLAD_API_CALL PFNGLVERTEXBINDINGDIVISORPROC glad_glVertexBindingDivisor;
+#define glVertexBindingDivisor glad_glVertexBindingDivisor
+GLAD_API_CALL PFNGLVIEWPORTPROC glad_glViewport;
+#define glViewport glad_glViewport
+GLAD_API_CALL PFNGLWAITSYNCPROC glad_glWaitSync;
+#define glWaitSync glad_glWaitSync
+
+
+
+
+
+GLAD_API_CALL int gladLoadGLES2UserPtr( GLADuserptrloadfunc load, void *userptr);
+GLAD_API_CALL int gladLoadGLES2( GLADloadfunc load);
+
+
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/external/glad/src/gles2.c b/external/glad/src/gles2.c
new file mode 100644
index 000000000..9251e5ac7
--- /dev/null
+++ b/external/glad/src/gles2.c
@@ -0,0 +1,955 @@
+/**
+ * SPDX-License-Identifier: (WTFPL OR CC0-1.0) AND Apache-2.0
+ */
+#include
+#include
+#include
+#include
+
+#ifndef GLAD_IMPL_UTIL_C_
+#define GLAD_IMPL_UTIL_C_
+
+#ifdef _MSC_VER
+#define GLAD_IMPL_UTIL_SSCANF sscanf_s
+#else
+#define GLAD_IMPL_UTIL_SSCANF sscanf
+#endif
+
+#endif /* GLAD_IMPL_UTIL_C_ */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+
+int GLAD_GL_ES_VERSION_2_0 = 0;
+int GLAD_GL_ES_VERSION_3_0 = 0;
+int GLAD_GL_ES_VERSION_3_1 = 0;
+int GLAD_GL_ES_VERSION_3_2 = 0;
+int GLAD_GL_EXT_geometry_shader = 0;
+int GLAD_GL_EXT_texture_compression_dxt1 = 0;
+int GLAD_GL_EXT_texture_filter_anisotropic = 0;
+int GLAD_GL_OES_EGL_image = 0;
+int GLAD_GL_OES_EGL_image_external = 0;
+int GLAD_GL_OES_EGL_image_external_essl3 = 0;
+int GLAD_GL_OES_texture_compression_astc = 0;
+
+
+
+PFNGLACTIVESHADERPROGRAMPROC glad_glActiveShaderProgram = NULL;
+PFNGLACTIVETEXTUREPROC glad_glActiveTexture = NULL;
+PFNGLATTACHSHADERPROC glad_glAttachShader = NULL;
+PFNGLBEGINQUERYPROC glad_glBeginQuery = NULL;
+PFNGLBEGINTRANSFORMFEEDBACKPROC glad_glBeginTransformFeedback = NULL;
+PFNGLBINDATTRIBLOCATIONPROC glad_glBindAttribLocation = NULL;
+PFNGLBINDBUFFERPROC glad_glBindBuffer = NULL;
+PFNGLBINDBUFFERBASEPROC glad_glBindBufferBase = NULL;
+PFNGLBINDBUFFERRANGEPROC glad_glBindBufferRange = NULL;
+PFNGLBINDFRAMEBUFFERPROC glad_glBindFramebuffer = NULL;
+PFNGLBINDIMAGETEXTUREPROC glad_glBindImageTexture = NULL;
+PFNGLBINDPROGRAMPIPELINEPROC glad_glBindProgramPipeline = NULL;
+PFNGLBINDRENDERBUFFERPROC glad_glBindRenderbuffer = NULL;
+PFNGLBINDSAMPLERPROC glad_glBindSampler = NULL;
+PFNGLBINDTEXTUREPROC glad_glBindTexture = NULL;
+PFNGLBINDTRANSFORMFEEDBACKPROC glad_glBindTransformFeedback = NULL;
+PFNGLBINDVERTEXARRAYPROC glad_glBindVertexArray = NULL;
+PFNGLBINDVERTEXBUFFERPROC glad_glBindVertexBuffer = NULL;
+PFNGLBLENDBARRIERPROC glad_glBlendBarrier = NULL;
+PFNGLBLENDCOLORPROC glad_glBlendColor = NULL;
+PFNGLBLENDEQUATIONPROC glad_glBlendEquation = NULL;
+PFNGLBLENDEQUATIONSEPARATEPROC glad_glBlendEquationSeparate = NULL;
+PFNGLBLENDEQUATIONSEPARATEIPROC glad_glBlendEquationSeparatei = NULL;
+PFNGLBLENDEQUATIONIPROC glad_glBlendEquationi = NULL;
+PFNGLBLENDFUNCPROC glad_glBlendFunc = NULL;
+PFNGLBLENDFUNCSEPARATEPROC glad_glBlendFuncSeparate = NULL;
+PFNGLBLENDFUNCSEPARATEIPROC glad_glBlendFuncSeparatei = NULL;
+PFNGLBLENDFUNCIPROC glad_glBlendFunci = NULL;
+PFNGLBLITFRAMEBUFFERPROC glad_glBlitFramebuffer = NULL;
+PFNGLBUFFERDATAPROC glad_glBufferData = NULL;
+PFNGLBUFFERSUBDATAPROC glad_glBufferSubData = NULL;
+PFNGLCHECKFRAMEBUFFERSTATUSPROC glad_glCheckFramebufferStatus = NULL;
+PFNGLCLEARPROC glad_glClear = NULL;
+PFNGLCLEARBUFFERFIPROC glad_glClearBufferfi = NULL;
+PFNGLCLEARBUFFERFVPROC glad_glClearBufferfv = NULL;
+PFNGLCLEARBUFFERIVPROC glad_glClearBufferiv = NULL;
+PFNGLCLEARBUFFERUIVPROC glad_glClearBufferuiv = NULL;
+PFNGLCLEARCOLORPROC glad_glClearColor = NULL;
+PFNGLCLEARDEPTHFPROC glad_glClearDepthf = NULL;
+PFNGLCLEARSTENCILPROC glad_glClearStencil = NULL;
+PFNGLCLIENTWAITSYNCPROC glad_glClientWaitSync = NULL;
+PFNGLCOLORMASKPROC glad_glColorMask = NULL;
+PFNGLCOLORMASKIPROC glad_glColorMaski = NULL;
+PFNGLCOMPILESHADERPROC glad_glCompileShader = NULL;
+PFNGLCOMPRESSEDTEXIMAGE2DPROC glad_glCompressedTexImage2D = NULL;
+PFNGLCOMPRESSEDTEXIMAGE3DPROC glad_glCompressedTexImage3D = NULL;
+PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC glad_glCompressedTexSubImage2D = NULL;
+PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC glad_glCompressedTexSubImage3D = NULL;
+PFNGLCOPYBUFFERSUBDATAPROC glad_glCopyBufferSubData = NULL;
+PFNGLCOPYIMAGESUBDATAPROC glad_glCopyImageSubData = NULL;
+PFNGLCOPYTEXIMAGE2DPROC glad_glCopyTexImage2D = NULL;
+PFNGLCOPYTEXSUBIMAGE2DPROC glad_glCopyTexSubImage2D = NULL;
+PFNGLCOPYTEXSUBIMAGE3DPROC glad_glCopyTexSubImage3D = NULL;
+PFNGLCREATEPROGRAMPROC glad_glCreateProgram = NULL;
+PFNGLCREATESHADERPROC glad_glCreateShader = NULL;
+PFNGLCREATESHADERPROGRAMVPROC glad_glCreateShaderProgramv = NULL;
+PFNGLCULLFACEPROC glad_glCullFace = NULL;
+PFNGLDEBUGMESSAGECALLBACKPROC glad_glDebugMessageCallback = NULL;
+PFNGLDEBUGMESSAGECONTROLPROC glad_glDebugMessageControl = NULL;
+PFNGLDEBUGMESSAGEINSERTPROC glad_glDebugMessageInsert = NULL;
+PFNGLDELETEBUFFERSPROC glad_glDeleteBuffers = NULL;
+PFNGLDELETEFRAMEBUFFERSPROC glad_glDeleteFramebuffers = NULL;
+PFNGLDELETEPROGRAMPROC glad_glDeleteProgram = NULL;
+PFNGLDELETEPROGRAMPIPELINESPROC glad_glDeleteProgramPipelines = NULL;
+PFNGLDELETEQUERIESPROC glad_glDeleteQueries = NULL;
+PFNGLDELETERENDERBUFFERSPROC glad_glDeleteRenderbuffers = NULL;
+PFNGLDELETESAMPLERSPROC glad_glDeleteSamplers = NULL;
+PFNGLDELETESHADERPROC glad_glDeleteShader = NULL;
+PFNGLDELETESYNCPROC glad_glDeleteSync = NULL;
+PFNGLDELETETEXTURESPROC glad_glDeleteTextures = NULL;
+PFNGLDELETETRANSFORMFEEDBACKSPROC glad_glDeleteTransformFeedbacks = NULL;
+PFNGLDELETEVERTEXARRAYSPROC glad_glDeleteVertexArrays = NULL;
+PFNGLDEPTHFUNCPROC glad_glDepthFunc = NULL;
+PFNGLDEPTHMASKPROC glad_glDepthMask = NULL;
+PFNGLDEPTHRANGEFPROC glad_glDepthRangef = NULL;
+PFNGLDETACHSHADERPROC glad_glDetachShader = NULL;
+PFNGLDISABLEPROC glad_glDisable = NULL;
+PFNGLDISABLEVERTEXATTRIBARRAYPROC glad_glDisableVertexAttribArray = NULL;
+PFNGLDISABLEIPROC glad_glDisablei = NULL;
+PFNGLDISPATCHCOMPUTEPROC glad_glDispatchCompute = NULL;
+PFNGLDISPATCHCOMPUTEINDIRECTPROC glad_glDispatchComputeIndirect = NULL;
+PFNGLDRAWARRAYSPROC glad_glDrawArrays = NULL;
+PFNGLDRAWARRAYSINDIRECTPROC glad_glDrawArraysIndirect = NULL;
+PFNGLDRAWARRAYSINSTANCEDPROC glad_glDrawArraysInstanced = NULL;
+PFNGLDRAWBUFFERSPROC glad_glDrawBuffers = NULL;
+PFNGLDRAWELEMENTSPROC glad_glDrawElements = NULL;
+PFNGLDRAWELEMENTSBASEVERTEXPROC glad_glDrawElementsBaseVertex = NULL;
+PFNGLDRAWELEMENTSINDIRECTPROC glad_glDrawElementsIndirect = NULL;
+PFNGLDRAWELEMENTSINSTANCEDPROC glad_glDrawElementsInstanced = NULL;
+PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXPROC glad_glDrawElementsInstancedBaseVertex = NULL;
+PFNGLDRAWRANGEELEMENTSPROC glad_glDrawRangeElements = NULL;
+PFNGLDRAWRANGEELEMENTSBASEVERTEXPROC glad_glDrawRangeElementsBaseVertex = NULL;
+PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC glad_glEGLImageTargetRenderbufferStorageOES = NULL;
+PFNGLEGLIMAGETARGETTEXTURE2DOESPROC glad_glEGLImageTargetTexture2DOES = NULL;
+PFNGLENABLEPROC glad_glEnable = NULL;
+PFNGLENABLEVERTEXATTRIBARRAYPROC glad_glEnableVertexAttribArray = NULL;
+PFNGLENABLEIPROC glad_glEnablei = NULL;
+PFNGLENDQUERYPROC glad_glEndQuery = NULL;
+PFNGLENDTRANSFORMFEEDBACKPROC glad_glEndTransformFeedback = NULL;
+PFNGLFENCESYNCPROC glad_glFenceSync = NULL;
+PFNGLFINISHPROC glad_glFinish = NULL;
+PFNGLFLUSHPROC glad_glFlush = NULL;
+PFNGLFLUSHMAPPEDBUFFERRANGEPROC glad_glFlushMappedBufferRange = NULL;
+PFNGLFRAMEBUFFERPARAMETERIPROC glad_glFramebufferParameteri = NULL;
+PFNGLFRAMEBUFFERRENDERBUFFERPROC glad_glFramebufferRenderbuffer = NULL;
+PFNGLFRAMEBUFFERTEXTUREPROC glad_glFramebufferTexture = NULL;
+PFNGLFRAMEBUFFERTEXTURE2DPROC glad_glFramebufferTexture2D = NULL;
+PFNGLFRAMEBUFFERTEXTUREEXTPROC glad_glFramebufferTextureEXT = NULL;
+PFNGLFRAMEBUFFERTEXTURELAYERPROC glad_glFramebufferTextureLayer = NULL;
+PFNGLFRONTFACEPROC glad_glFrontFace = NULL;
+PFNGLGENBUFFERSPROC glad_glGenBuffers = NULL;
+PFNGLGENFRAMEBUFFERSPROC glad_glGenFramebuffers = NULL;
+PFNGLGENPROGRAMPIPELINESPROC glad_glGenProgramPipelines = NULL;
+PFNGLGENQUERIESPROC glad_glGenQueries = NULL;
+PFNGLGENRENDERBUFFERSPROC glad_glGenRenderbuffers = NULL;
+PFNGLGENSAMPLERSPROC glad_glGenSamplers = NULL;
+PFNGLGENTEXTURESPROC glad_glGenTextures = NULL;
+PFNGLGENTRANSFORMFEEDBACKSPROC glad_glGenTransformFeedbacks = NULL;
+PFNGLGENVERTEXARRAYSPROC glad_glGenVertexArrays = NULL;
+PFNGLGENERATEMIPMAPPROC glad_glGenerateMipmap = NULL;
+PFNGLGETACTIVEATTRIBPROC glad_glGetActiveAttrib = NULL;
+PFNGLGETACTIVEUNIFORMPROC glad_glGetActiveUniform = NULL;
+PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC glad_glGetActiveUniformBlockName = NULL;
+PFNGLGETACTIVEUNIFORMBLOCKIVPROC glad_glGetActiveUniformBlockiv = NULL;
+PFNGLGETACTIVEUNIFORMSIVPROC glad_glGetActiveUniformsiv = NULL;
+PFNGLGETATTACHEDSHADERSPROC glad_glGetAttachedShaders = NULL;
+PFNGLGETATTRIBLOCATIONPROC glad_glGetAttribLocation = NULL;
+PFNGLGETBOOLEANI_VPROC glad_glGetBooleani_v = NULL;
+PFNGLGETBOOLEANVPROC glad_glGetBooleanv = NULL;
+PFNGLGETBUFFERPARAMETERI64VPROC glad_glGetBufferParameteri64v = NULL;
+PFNGLGETBUFFERPARAMETERIVPROC glad_glGetBufferParameteriv = NULL;
+PFNGLGETBUFFERPOINTERVPROC glad_glGetBufferPointerv = NULL;
+PFNGLGETDEBUGMESSAGELOGPROC glad_glGetDebugMessageLog = NULL;
+PFNGLGETERRORPROC glad_glGetError = NULL;
+PFNGLGETFLOATVPROC glad_glGetFloatv = NULL;
+PFNGLGETFRAGDATALOCATIONPROC glad_glGetFragDataLocation = NULL;
+PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC glad_glGetFramebufferAttachmentParameteriv = NULL;
+PFNGLGETFRAMEBUFFERPARAMETERIVPROC glad_glGetFramebufferParameteriv = NULL;
+PFNGLGETGRAPHICSRESETSTATUSPROC glad_glGetGraphicsResetStatus = NULL;
+PFNGLGETINTEGER64I_VPROC glad_glGetInteger64i_v = NULL;
+PFNGLGETINTEGER64VPROC glad_glGetInteger64v = NULL;
+PFNGLGETINTEGERI_VPROC glad_glGetIntegeri_v = NULL;
+PFNGLGETINTEGERVPROC glad_glGetIntegerv = NULL;
+PFNGLGETINTERNALFORMATIVPROC glad_glGetInternalformativ = NULL;
+PFNGLGETMULTISAMPLEFVPROC glad_glGetMultisamplefv = NULL;
+PFNGLGETOBJECTLABELPROC glad_glGetObjectLabel = NULL;
+PFNGLGETOBJECTPTRLABELPROC glad_glGetObjectPtrLabel = NULL;
+PFNGLGETPOINTERVPROC glad_glGetPointerv = NULL;
+PFNGLGETPROGRAMBINARYPROC glad_glGetProgramBinary = NULL;
+PFNGLGETPROGRAMINFOLOGPROC glad_glGetProgramInfoLog = NULL;
+PFNGLGETPROGRAMINTERFACEIVPROC glad_glGetProgramInterfaceiv = NULL;
+PFNGLGETPROGRAMPIPELINEINFOLOGPROC glad_glGetProgramPipelineInfoLog = NULL;
+PFNGLGETPROGRAMPIPELINEIVPROC glad_glGetProgramPipelineiv = NULL;
+PFNGLGETPROGRAMRESOURCEINDEXPROC glad_glGetProgramResourceIndex = NULL;
+PFNGLGETPROGRAMRESOURCELOCATIONPROC glad_glGetProgramResourceLocation = NULL;
+PFNGLGETPROGRAMRESOURCENAMEPROC glad_glGetProgramResourceName = NULL;
+PFNGLGETPROGRAMRESOURCEIVPROC glad_glGetProgramResourceiv = NULL;
+PFNGLGETPROGRAMIVPROC glad_glGetProgramiv = NULL;
+PFNGLGETQUERYOBJECTUIVPROC glad_glGetQueryObjectuiv = NULL;
+PFNGLGETQUERYIVPROC glad_glGetQueryiv = NULL;
+PFNGLGETRENDERBUFFERPARAMETERIVPROC glad_glGetRenderbufferParameteriv = NULL;
+PFNGLGETSAMPLERPARAMETERIIVPROC glad_glGetSamplerParameterIiv = NULL;
+PFNGLGETSAMPLERPARAMETERIUIVPROC glad_glGetSamplerParameterIuiv = NULL;
+PFNGLGETSAMPLERPARAMETERFVPROC glad_glGetSamplerParameterfv = NULL;
+PFNGLGETSAMPLERPARAMETERIVPROC glad_glGetSamplerParameteriv = NULL;
+PFNGLGETSHADERINFOLOGPROC glad_glGetShaderInfoLog = NULL;
+PFNGLGETSHADERPRECISIONFORMATPROC glad_glGetShaderPrecisionFormat = NULL;
+PFNGLGETSHADERSOURCEPROC glad_glGetShaderSource = NULL;
+PFNGLGETSHADERIVPROC glad_glGetShaderiv = NULL;
+PFNGLGETSTRINGPROC glad_glGetString = NULL;
+PFNGLGETSTRINGIPROC glad_glGetStringi = NULL;
+PFNGLGETSYNCIVPROC glad_glGetSynciv = NULL;
+PFNGLGETTEXLEVELPARAMETERFVPROC glad_glGetTexLevelParameterfv = NULL;
+PFNGLGETTEXLEVELPARAMETERIVPROC glad_glGetTexLevelParameteriv = NULL;
+PFNGLGETTEXPARAMETERIIVPROC glad_glGetTexParameterIiv = NULL;
+PFNGLGETTEXPARAMETERIUIVPROC glad_glGetTexParameterIuiv = NULL;
+PFNGLGETTEXPARAMETERFVPROC glad_glGetTexParameterfv = NULL;
+PFNGLGETTEXPARAMETERIVPROC glad_glGetTexParameteriv = NULL;
+PFNGLGETTRANSFORMFEEDBACKVARYINGPROC glad_glGetTransformFeedbackVarying = NULL;
+PFNGLGETUNIFORMBLOCKINDEXPROC glad_glGetUniformBlockIndex = NULL;
+PFNGLGETUNIFORMINDICESPROC glad_glGetUniformIndices = NULL;
+PFNGLGETUNIFORMLOCATIONPROC glad_glGetUniformLocation = NULL;
+PFNGLGETUNIFORMFVPROC glad_glGetUniformfv = NULL;
+PFNGLGETUNIFORMIVPROC glad_glGetUniformiv = NULL;
+PFNGLGETUNIFORMUIVPROC glad_glGetUniformuiv = NULL;
+PFNGLGETVERTEXATTRIBIIVPROC glad_glGetVertexAttribIiv = NULL;
+PFNGLGETVERTEXATTRIBIUIVPROC glad_glGetVertexAttribIuiv = NULL;
+PFNGLGETVERTEXATTRIBPOINTERVPROC glad_glGetVertexAttribPointerv = NULL;
+PFNGLGETVERTEXATTRIBFVPROC glad_glGetVertexAttribfv = NULL;
+PFNGLGETVERTEXATTRIBIVPROC glad_glGetVertexAttribiv = NULL;
+PFNGLGETNUNIFORMFVPROC glad_glGetnUniformfv = NULL;
+PFNGLGETNUNIFORMIVPROC glad_glGetnUniformiv = NULL;
+PFNGLGETNUNIFORMUIVPROC glad_glGetnUniformuiv = NULL;
+PFNGLHINTPROC glad_glHint = NULL;
+PFNGLINVALIDATEFRAMEBUFFERPROC glad_glInvalidateFramebuffer = NULL;
+PFNGLINVALIDATESUBFRAMEBUFFERPROC glad_glInvalidateSubFramebuffer = NULL;
+PFNGLISBUFFERPROC glad_glIsBuffer = NULL;
+PFNGLISENABLEDPROC glad_glIsEnabled = NULL;
+PFNGLISENABLEDIPROC glad_glIsEnabledi = NULL;
+PFNGLISFRAMEBUFFERPROC glad_glIsFramebuffer = NULL;
+PFNGLISPROGRAMPROC glad_glIsProgram = NULL;
+PFNGLISPROGRAMPIPELINEPROC glad_glIsProgramPipeline = NULL;
+PFNGLISQUERYPROC glad_glIsQuery = NULL;
+PFNGLISRENDERBUFFERPROC glad_glIsRenderbuffer = NULL;
+PFNGLISSAMPLERPROC glad_glIsSampler = NULL;
+PFNGLISSHADERPROC glad_glIsShader = NULL;
+PFNGLISSYNCPROC glad_glIsSync = NULL;
+PFNGLISTEXTUREPROC glad_glIsTexture = NULL;
+PFNGLISTRANSFORMFEEDBACKPROC glad_glIsTransformFeedback = NULL;
+PFNGLISVERTEXARRAYPROC glad_glIsVertexArray = NULL;
+PFNGLLINEWIDTHPROC glad_glLineWidth = NULL;
+PFNGLLINKPROGRAMPROC glad_glLinkProgram = NULL;
+PFNGLMAPBUFFERRANGEPROC glad_glMapBufferRange = NULL;
+PFNGLMEMORYBARRIERPROC glad_glMemoryBarrier = NULL;
+PFNGLMEMORYBARRIERBYREGIONPROC glad_glMemoryBarrierByRegion = NULL;
+PFNGLMINSAMPLESHADINGPROC glad_glMinSampleShading = NULL;
+PFNGLOBJECTLABELPROC glad_glObjectLabel = NULL;
+PFNGLOBJECTPTRLABELPROC glad_glObjectPtrLabel = NULL;
+PFNGLPATCHPARAMETERIPROC glad_glPatchParameteri = NULL;
+PFNGLPAUSETRANSFORMFEEDBACKPROC glad_glPauseTransformFeedback = NULL;
+PFNGLPIXELSTOREIPROC glad_glPixelStorei = NULL;
+PFNGLPOLYGONOFFSETPROC glad_glPolygonOffset = NULL;
+PFNGLPOPDEBUGGROUPPROC glad_glPopDebugGroup = NULL;
+PFNGLPRIMITIVEBOUNDINGBOXPROC glad_glPrimitiveBoundingBox = NULL;
+PFNGLPROGRAMBINARYPROC glad_glProgramBinary = NULL;
+PFNGLPROGRAMPARAMETERIPROC glad_glProgramParameteri = NULL;
+PFNGLPROGRAMUNIFORM1FPROC glad_glProgramUniform1f = NULL;
+PFNGLPROGRAMUNIFORM1FVPROC glad_glProgramUniform1fv = NULL;
+PFNGLPROGRAMUNIFORM1IPROC glad_glProgramUniform1i = NULL;
+PFNGLPROGRAMUNIFORM1IVPROC glad_glProgramUniform1iv = NULL;
+PFNGLPROGRAMUNIFORM1UIPROC glad_glProgramUniform1ui = NULL;
+PFNGLPROGRAMUNIFORM1UIVPROC glad_glProgramUniform1uiv = NULL;
+PFNGLPROGRAMUNIFORM2FPROC glad_glProgramUniform2f = NULL;
+PFNGLPROGRAMUNIFORM2FVPROC glad_glProgramUniform2fv = NULL;
+PFNGLPROGRAMUNIFORM2IPROC glad_glProgramUniform2i = NULL;
+PFNGLPROGRAMUNIFORM2IVPROC glad_glProgramUniform2iv = NULL;
+PFNGLPROGRAMUNIFORM2UIPROC glad_glProgramUniform2ui = NULL;
+PFNGLPROGRAMUNIFORM2UIVPROC glad_glProgramUniform2uiv = NULL;
+PFNGLPROGRAMUNIFORM3FPROC glad_glProgramUniform3f = NULL;
+PFNGLPROGRAMUNIFORM3FVPROC glad_glProgramUniform3fv = NULL;
+PFNGLPROGRAMUNIFORM3IPROC glad_glProgramUniform3i = NULL;
+PFNGLPROGRAMUNIFORM3IVPROC glad_glProgramUniform3iv = NULL;
+PFNGLPROGRAMUNIFORM3UIPROC glad_glProgramUniform3ui = NULL;
+PFNGLPROGRAMUNIFORM3UIVPROC glad_glProgramUniform3uiv = NULL;
+PFNGLPROGRAMUNIFORM4FPROC glad_glProgramUniform4f = NULL;
+PFNGLPROGRAMUNIFORM4FVPROC glad_glProgramUniform4fv = NULL;
+PFNGLPROGRAMUNIFORM4IPROC glad_glProgramUniform4i = NULL;
+PFNGLPROGRAMUNIFORM4IVPROC glad_glProgramUniform4iv = NULL;
+PFNGLPROGRAMUNIFORM4UIPROC glad_glProgramUniform4ui = NULL;
+PFNGLPROGRAMUNIFORM4UIVPROC glad_glProgramUniform4uiv = NULL;
+PFNGLPROGRAMUNIFORMMATRIX2FVPROC glad_glProgramUniformMatrix2fv = NULL;
+PFNGLPROGRAMUNIFORMMATRIX2X3FVPROC glad_glProgramUniformMatrix2x3fv = NULL;
+PFNGLPROGRAMUNIFORMMATRIX2X4FVPROC glad_glProgramUniformMatrix2x4fv = NULL;
+PFNGLPROGRAMUNIFORMMATRIX3FVPROC glad_glProgramUniformMatrix3fv = NULL;
+PFNGLPROGRAMUNIFORMMATRIX3X2FVPROC glad_glProgramUniformMatrix3x2fv = NULL;
+PFNGLPROGRAMUNIFORMMATRIX3X4FVPROC glad_glProgramUniformMatrix3x4fv = NULL;
+PFNGLPROGRAMUNIFORMMATRIX4FVPROC glad_glProgramUniformMatrix4fv = NULL;
+PFNGLPROGRAMUNIFORMMATRIX4X2FVPROC glad_glProgramUniformMatrix4x2fv = NULL;
+PFNGLPROGRAMUNIFORMMATRIX4X3FVPROC glad_glProgramUniformMatrix4x3fv = NULL;
+PFNGLPUSHDEBUGGROUPPROC glad_glPushDebugGroup = NULL;
+PFNGLREADBUFFERPROC glad_glReadBuffer = NULL;
+PFNGLREADPIXELSPROC glad_glReadPixels = NULL;
+PFNGLREADNPIXELSPROC glad_glReadnPixels = NULL;
+PFNGLRELEASESHADERCOMPILERPROC glad_glReleaseShaderCompiler = NULL;
+PFNGLRENDERBUFFERSTORAGEPROC glad_glRenderbufferStorage = NULL;
+PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC glad_glRenderbufferStorageMultisample = NULL;
+PFNGLRESUMETRANSFORMFEEDBACKPROC glad_glResumeTransformFeedback = NULL;
+PFNGLSAMPLECOVERAGEPROC glad_glSampleCoverage = NULL;
+PFNGLSAMPLEMASKIPROC glad_glSampleMaski = NULL;
+PFNGLSAMPLERPARAMETERIIVPROC glad_glSamplerParameterIiv = NULL;
+PFNGLSAMPLERPARAMETERIUIVPROC glad_glSamplerParameterIuiv = NULL;
+PFNGLSAMPLERPARAMETERFPROC glad_glSamplerParameterf = NULL;
+PFNGLSAMPLERPARAMETERFVPROC glad_glSamplerParameterfv = NULL;
+PFNGLSAMPLERPARAMETERIPROC glad_glSamplerParameteri = NULL;
+PFNGLSAMPLERPARAMETERIVPROC glad_glSamplerParameteriv = NULL;
+PFNGLSCISSORPROC glad_glScissor = NULL;
+PFNGLSHADERBINARYPROC glad_glShaderBinary = NULL;
+PFNGLSHADERSOURCEPROC glad_glShaderSource = NULL;
+PFNGLSTENCILFUNCPROC glad_glStencilFunc = NULL;
+PFNGLSTENCILFUNCSEPARATEPROC glad_glStencilFuncSeparate = NULL;
+PFNGLSTENCILMASKPROC glad_glStencilMask = NULL;
+PFNGLSTENCILMASKSEPARATEPROC glad_glStencilMaskSeparate = NULL;
+PFNGLSTENCILOPPROC glad_glStencilOp = NULL;
+PFNGLSTENCILOPSEPARATEPROC glad_glStencilOpSeparate = NULL;
+PFNGLTEXBUFFERPROC glad_glTexBuffer = NULL;
+PFNGLTEXBUFFERRANGEPROC glad_glTexBufferRange = NULL;
+PFNGLTEXIMAGE2DPROC glad_glTexImage2D = NULL;
+PFNGLTEXIMAGE3DPROC glad_glTexImage3D = NULL;
+PFNGLTEXPARAMETERIIVPROC glad_glTexParameterIiv = NULL;
+PFNGLTEXPARAMETERIUIVPROC glad_glTexParameterIuiv = NULL;
+PFNGLTEXPARAMETERFPROC glad_glTexParameterf = NULL;
+PFNGLTEXPARAMETERFVPROC glad_glTexParameterfv = NULL;
+PFNGLTEXPARAMETERIPROC glad_glTexParameteri = NULL;
+PFNGLTEXPARAMETERIVPROC glad_glTexParameteriv = NULL;
+PFNGLTEXSTORAGE2DPROC glad_glTexStorage2D = NULL;
+PFNGLTEXSTORAGE2DMULTISAMPLEPROC glad_glTexStorage2DMultisample = NULL;
+PFNGLTEXSTORAGE3DPROC glad_glTexStorage3D = NULL;
+PFNGLTEXSTORAGE3DMULTISAMPLEPROC glad_glTexStorage3DMultisample = NULL;
+PFNGLTEXSUBIMAGE2DPROC glad_glTexSubImage2D = NULL;
+PFNGLTEXSUBIMAGE3DPROC glad_glTexSubImage3D = NULL;
+PFNGLTRANSFORMFEEDBACKVARYINGSPROC glad_glTransformFeedbackVaryings = NULL;
+PFNGLUNIFORM1FPROC glad_glUniform1f = NULL;
+PFNGLUNIFORM1FVPROC glad_glUniform1fv = NULL;
+PFNGLUNIFORM1IPROC glad_glUniform1i = NULL;
+PFNGLUNIFORM1IVPROC glad_glUniform1iv = NULL;
+PFNGLUNIFORM1UIPROC glad_glUniform1ui = NULL;
+PFNGLUNIFORM1UIVPROC glad_glUniform1uiv = NULL;
+PFNGLUNIFORM2FPROC glad_glUniform2f = NULL;
+PFNGLUNIFORM2FVPROC glad_glUniform2fv = NULL;
+PFNGLUNIFORM2IPROC glad_glUniform2i = NULL;
+PFNGLUNIFORM2IVPROC glad_glUniform2iv = NULL;
+PFNGLUNIFORM2UIPROC glad_glUniform2ui = NULL;
+PFNGLUNIFORM2UIVPROC glad_glUniform2uiv = NULL;
+PFNGLUNIFORM3FPROC glad_glUniform3f = NULL;
+PFNGLUNIFORM3FVPROC glad_glUniform3fv = NULL;
+PFNGLUNIFORM3IPROC glad_glUniform3i = NULL;
+PFNGLUNIFORM3IVPROC glad_glUniform3iv = NULL;
+PFNGLUNIFORM3UIPROC glad_glUniform3ui = NULL;
+PFNGLUNIFORM3UIVPROC glad_glUniform3uiv = NULL;
+PFNGLUNIFORM4FPROC glad_glUniform4f = NULL;
+PFNGLUNIFORM4FVPROC glad_glUniform4fv = NULL;
+PFNGLUNIFORM4IPROC glad_glUniform4i = NULL;
+PFNGLUNIFORM4IVPROC glad_glUniform4iv = NULL;
+PFNGLUNIFORM4UIPROC glad_glUniform4ui = NULL;
+PFNGLUNIFORM4UIVPROC glad_glUniform4uiv = NULL;
+PFNGLUNIFORMBLOCKBINDINGPROC glad_glUniformBlockBinding = NULL;
+PFNGLUNIFORMMATRIX2FVPROC glad_glUniformMatrix2fv = NULL;
+PFNGLUNIFORMMATRIX2X3FVPROC glad_glUniformMatrix2x3fv = NULL;
+PFNGLUNIFORMMATRIX2X4FVPROC glad_glUniformMatrix2x4fv = NULL;
+PFNGLUNIFORMMATRIX3FVPROC glad_glUniformMatrix3fv = NULL;
+PFNGLUNIFORMMATRIX3X2FVPROC glad_glUniformMatrix3x2fv = NULL;
+PFNGLUNIFORMMATRIX3X4FVPROC glad_glUniformMatrix3x4fv = NULL;
+PFNGLUNIFORMMATRIX4FVPROC glad_glUniformMatrix4fv = NULL;
+PFNGLUNIFORMMATRIX4X2FVPROC glad_glUniformMatrix4x2fv = NULL;
+PFNGLUNIFORMMATRIX4X3FVPROC glad_glUniformMatrix4x3fv = NULL;
+PFNGLUNMAPBUFFERPROC glad_glUnmapBuffer = NULL;
+PFNGLUSEPROGRAMPROC glad_glUseProgram = NULL;
+PFNGLUSEPROGRAMSTAGESPROC glad_glUseProgramStages = NULL;
+PFNGLVALIDATEPROGRAMPROC glad_glValidateProgram = NULL;
+PFNGLVALIDATEPROGRAMPIPELINEPROC glad_glValidateProgramPipeline = NULL;
+PFNGLVERTEXATTRIB1FPROC glad_glVertexAttrib1f = NULL;
+PFNGLVERTEXATTRIB1FVPROC glad_glVertexAttrib1fv = NULL;
+PFNGLVERTEXATTRIB2FPROC glad_glVertexAttrib2f = NULL;
+PFNGLVERTEXATTRIB2FVPROC glad_glVertexAttrib2fv = NULL;
+PFNGLVERTEXATTRIB3FPROC glad_glVertexAttrib3f = NULL;
+PFNGLVERTEXATTRIB3FVPROC glad_glVertexAttrib3fv = NULL;
+PFNGLVERTEXATTRIB4FPROC glad_glVertexAttrib4f = NULL;
+PFNGLVERTEXATTRIB4FVPROC glad_glVertexAttrib4fv = NULL;
+PFNGLVERTEXATTRIBBINDINGPROC glad_glVertexAttribBinding = NULL;
+PFNGLVERTEXATTRIBDIVISORPROC glad_glVertexAttribDivisor = NULL;
+PFNGLVERTEXATTRIBFORMATPROC glad_glVertexAttribFormat = NULL;
+PFNGLVERTEXATTRIBI4IPROC glad_glVertexAttribI4i = NULL;
+PFNGLVERTEXATTRIBI4IVPROC glad_glVertexAttribI4iv = NULL;
+PFNGLVERTEXATTRIBI4UIPROC glad_glVertexAttribI4ui = NULL;
+PFNGLVERTEXATTRIBI4UIVPROC glad_glVertexAttribI4uiv = NULL;
+PFNGLVERTEXATTRIBIFORMATPROC glad_glVertexAttribIFormat = NULL;
+PFNGLVERTEXATTRIBIPOINTERPROC glad_glVertexAttribIPointer = NULL;
+PFNGLVERTEXATTRIBPOINTERPROC glad_glVertexAttribPointer = NULL;
+PFNGLVERTEXBINDINGDIVISORPROC glad_glVertexBindingDivisor = NULL;
+PFNGLVIEWPORTPROC glad_glViewport = NULL;
+PFNGLWAITSYNCPROC glad_glWaitSync = NULL;
+
+
+static void glad_gl_load_GL_ES_VERSION_2_0( GLADuserptrloadfunc load, void* userptr) {
+ if(!GLAD_GL_ES_VERSION_2_0) return;
+ glad_glActiveTexture = (PFNGLACTIVETEXTUREPROC) load(userptr, "glActiveTexture");
+ glad_glAttachShader = (PFNGLATTACHSHADERPROC) load(userptr, "glAttachShader");
+ glad_glBindAttribLocation = (PFNGLBINDATTRIBLOCATIONPROC) load(userptr, "glBindAttribLocation");
+ glad_glBindBuffer = (PFNGLBINDBUFFERPROC) load(userptr, "glBindBuffer");
+ glad_glBindFramebuffer = (PFNGLBINDFRAMEBUFFERPROC) load(userptr, "glBindFramebuffer");
+ glad_glBindRenderbuffer = (PFNGLBINDRENDERBUFFERPROC) load(userptr, "glBindRenderbuffer");
+ glad_glBindTexture = (PFNGLBINDTEXTUREPROC) load(userptr, "glBindTexture");
+ glad_glBlendColor = (PFNGLBLENDCOLORPROC) load(userptr, "glBlendColor");
+ glad_glBlendEquation = (PFNGLBLENDEQUATIONPROC) load(userptr, "glBlendEquation");
+ glad_glBlendEquationSeparate = (PFNGLBLENDEQUATIONSEPARATEPROC) load(userptr, "glBlendEquationSeparate");
+ glad_glBlendFunc = (PFNGLBLENDFUNCPROC) load(userptr, "glBlendFunc");
+ glad_glBlendFuncSeparate = (PFNGLBLENDFUNCSEPARATEPROC) load(userptr, "glBlendFuncSeparate");
+ glad_glBufferData = (PFNGLBUFFERDATAPROC) load(userptr, "glBufferData");
+ glad_glBufferSubData = (PFNGLBUFFERSUBDATAPROC) load(userptr, "glBufferSubData");
+ glad_glCheckFramebufferStatus = (PFNGLCHECKFRAMEBUFFERSTATUSPROC) load(userptr, "glCheckFramebufferStatus");
+ glad_glClear = (PFNGLCLEARPROC) load(userptr, "glClear");
+ glad_glClearColor = (PFNGLCLEARCOLORPROC) load(userptr, "glClearColor");
+ glad_glClearDepthf = (PFNGLCLEARDEPTHFPROC) load(userptr, "glClearDepthf");
+ glad_glClearStencil = (PFNGLCLEARSTENCILPROC) load(userptr, "glClearStencil");
+ glad_glColorMask = (PFNGLCOLORMASKPROC) load(userptr, "glColorMask");
+ glad_glCompileShader = (PFNGLCOMPILESHADERPROC) load(userptr, "glCompileShader");
+ glad_glCompressedTexImage2D = (PFNGLCOMPRESSEDTEXIMAGE2DPROC) load(userptr, "glCompressedTexImage2D");
+ glad_glCompressedTexSubImage2D = (PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) load(userptr, "glCompressedTexSubImage2D");
+ glad_glCopyTexImage2D = (PFNGLCOPYTEXIMAGE2DPROC) load(userptr, "glCopyTexImage2D");
+ glad_glCopyTexSubImage2D = (PFNGLCOPYTEXSUBIMAGE2DPROC) load(userptr, "glCopyTexSubImage2D");
+ glad_glCreateProgram = (PFNGLCREATEPROGRAMPROC) load(userptr, "glCreateProgram");
+ glad_glCreateShader = (PFNGLCREATESHADERPROC) load(userptr, "glCreateShader");
+ glad_glCullFace = (PFNGLCULLFACEPROC) load(userptr, "glCullFace");
+ glad_glDeleteBuffers = (PFNGLDELETEBUFFERSPROC) load(userptr, "glDeleteBuffers");
+ glad_glDeleteFramebuffers = (PFNGLDELETEFRAMEBUFFERSPROC) load(userptr, "glDeleteFramebuffers");
+ glad_glDeleteProgram = (PFNGLDELETEPROGRAMPROC) load(userptr, "glDeleteProgram");
+ glad_glDeleteRenderbuffers = (PFNGLDELETERENDERBUFFERSPROC) load(userptr, "glDeleteRenderbuffers");
+ glad_glDeleteShader = (PFNGLDELETESHADERPROC) load(userptr, "glDeleteShader");
+ glad_glDeleteTextures = (PFNGLDELETETEXTURESPROC) load(userptr, "glDeleteTextures");
+ glad_glDepthFunc = (PFNGLDEPTHFUNCPROC) load(userptr, "glDepthFunc");
+ glad_glDepthMask = (PFNGLDEPTHMASKPROC) load(userptr, "glDepthMask");
+ glad_glDepthRangef = (PFNGLDEPTHRANGEFPROC) load(userptr, "glDepthRangef");
+ glad_glDetachShader = (PFNGLDETACHSHADERPROC) load(userptr, "glDetachShader");
+ glad_glDisable = (PFNGLDISABLEPROC) load(userptr, "glDisable");
+ glad_glDisableVertexAttribArray = (PFNGLDISABLEVERTEXATTRIBARRAYPROC) load(userptr, "glDisableVertexAttribArray");
+ glad_glDrawArrays = (PFNGLDRAWARRAYSPROC) load(userptr, "glDrawArrays");
+ glad_glDrawElements = (PFNGLDRAWELEMENTSPROC) load(userptr, "glDrawElements");
+ glad_glEnable = (PFNGLENABLEPROC) load(userptr, "glEnable");
+ glad_glEnableVertexAttribArray = (PFNGLENABLEVERTEXATTRIBARRAYPROC) load(userptr, "glEnableVertexAttribArray");
+ glad_glFinish = (PFNGLFINISHPROC) load(userptr, "glFinish");
+ glad_glFlush = (PFNGLFLUSHPROC) load(userptr, "glFlush");
+ glad_glFramebufferRenderbuffer = (PFNGLFRAMEBUFFERRENDERBUFFERPROC) load(userptr, "glFramebufferRenderbuffer");
+ glad_glFramebufferTexture2D = (PFNGLFRAMEBUFFERTEXTURE2DPROC) load(userptr, "glFramebufferTexture2D");
+ glad_glFrontFace = (PFNGLFRONTFACEPROC) load(userptr, "glFrontFace");
+ glad_glGenBuffers = (PFNGLGENBUFFERSPROC) load(userptr, "glGenBuffers");
+ glad_glGenFramebuffers = (PFNGLGENFRAMEBUFFERSPROC) load(userptr, "glGenFramebuffers");
+ glad_glGenRenderbuffers = (PFNGLGENRENDERBUFFERSPROC) load(userptr, "glGenRenderbuffers");
+ glad_glGenTextures = (PFNGLGENTEXTURESPROC) load(userptr, "glGenTextures");
+ glad_glGenerateMipmap = (PFNGLGENERATEMIPMAPPROC) load(userptr, "glGenerateMipmap");
+ glad_glGetActiveAttrib = (PFNGLGETACTIVEATTRIBPROC) load(userptr, "glGetActiveAttrib");
+ glad_glGetActiveUniform = (PFNGLGETACTIVEUNIFORMPROC) load(userptr, "glGetActiveUniform");
+ glad_glGetAttachedShaders = (PFNGLGETATTACHEDSHADERSPROC) load(userptr, "glGetAttachedShaders");
+ glad_glGetAttribLocation = (PFNGLGETATTRIBLOCATIONPROC) load(userptr, "glGetAttribLocation");
+ glad_glGetBooleanv = (PFNGLGETBOOLEANVPROC) load(userptr, "glGetBooleanv");
+ glad_glGetBufferParameteriv = (PFNGLGETBUFFERPARAMETERIVPROC) load(userptr, "glGetBufferParameteriv");
+ glad_glGetError = (PFNGLGETERRORPROC) load(userptr, "glGetError");
+ glad_glGetFloatv = (PFNGLGETFLOATVPROC) load(userptr, "glGetFloatv");
+ glad_glGetFramebufferAttachmentParameteriv = (PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC) load(userptr, "glGetFramebufferAttachmentParameteriv");
+ glad_glGetIntegerv = (PFNGLGETINTEGERVPROC) load(userptr, "glGetIntegerv");
+ glad_glGetProgramInfoLog = (PFNGLGETPROGRAMINFOLOGPROC) load(userptr, "glGetProgramInfoLog");
+ glad_glGetProgramiv = (PFNGLGETPROGRAMIVPROC) load(userptr, "glGetProgramiv");
+ glad_glGetRenderbufferParameteriv = (PFNGLGETRENDERBUFFERPARAMETERIVPROC) load(userptr, "glGetRenderbufferParameteriv");
+ glad_glGetShaderInfoLog = (PFNGLGETSHADERINFOLOGPROC) load(userptr, "glGetShaderInfoLog");
+ glad_glGetShaderPrecisionFormat = (PFNGLGETSHADERPRECISIONFORMATPROC) load(userptr, "glGetShaderPrecisionFormat");
+ glad_glGetShaderSource = (PFNGLGETSHADERSOURCEPROC) load(userptr, "glGetShaderSource");
+ glad_glGetShaderiv = (PFNGLGETSHADERIVPROC) load(userptr, "glGetShaderiv");
+ glad_glGetString = (PFNGLGETSTRINGPROC) load(userptr, "glGetString");
+ glad_glGetTexParameterfv = (PFNGLGETTEXPARAMETERFVPROC) load(userptr, "glGetTexParameterfv");
+ glad_glGetTexParameteriv = (PFNGLGETTEXPARAMETERIVPROC) load(userptr, "glGetTexParameteriv");
+ glad_glGetUniformLocation = (PFNGLGETUNIFORMLOCATIONPROC) load(userptr, "glGetUniformLocation");
+ glad_glGetUniformfv = (PFNGLGETUNIFORMFVPROC) load(userptr, "glGetUniformfv");
+ glad_glGetUniformiv = (PFNGLGETUNIFORMIVPROC) load(userptr, "glGetUniformiv");
+ glad_glGetVertexAttribPointerv = (PFNGLGETVERTEXATTRIBPOINTERVPROC) load(userptr, "glGetVertexAttribPointerv");
+ glad_glGetVertexAttribfv = (PFNGLGETVERTEXATTRIBFVPROC) load(userptr, "glGetVertexAttribfv");
+ glad_glGetVertexAttribiv = (PFNGLGETVERTEXATTRIBIVPROC) load(userptr, "glGetVertexAttribiv");
+ glad_glHint = (PFNGLHINTPROC) load(userptr, "glHint");
+ glad_glIsBuffer = (PFNGLISBUFFERPROC) load(userptr, "glIsBuffer");
+ glad_glIsEnabled = (PFNGLISENABLEDPROC) load(userptr, "glIsEnabled");
+ glad_glIsFramebuffer = (PFNGLISFRAMEBUFFERPROC) load(userptr, "glIsFramebuffer");
+ glad_glIsProgram = (PFNGLISPROGRAMPROC) load(userptr, "glIsProgram");
+ glad_glIsRenderbuffer = (PFNGLISRENDERBUFFERPROC) load(userptr, "glIsRenderbuffer");
+ glad_glIsShader = (PFNGLISSHADERPROC) load(userptr, "glIsShader");
+ glad_glIsTexture = (PFNGLISTEXTUREPROC) load(userptr, "glIsTexture");
+ glad_glLineWidth = (PFNGLLINEWIDTHPROC) load(userptr, "glLineWidth");
+ glad_glLinkProgram = (PFNGLLINKPROGRAMPROC) load(userptr, "glLinkProgram");
+ glad_glPixelStorei = (PFNGLPIXELSTOREIPROC) load(userptr, "glPixelStorei");
+ glad_glPolygonOffset = (PFNGLPOLYGONOFFSETPROC) load(userptr, "glPolygonOffset");
+ glad_glReadPixels = (PFNGLREADPIXELSPROC) load(userptr, "glReadPixels");
+ glad_glReleaseShaderCompiler = (PFNGLRELEASESHADERCOMPILERPROC) load(userptr, "glReleaseShaderCompiler");
+ glad_glRenderbufferStorage = (PFNGLRENDERBUFFERSTORAGEPROC) load(userptr, "glRenderbufferStorage");
+ glad_glSampleCoverage = (PFNGLSAMPLECOVERAGEPROC) load(userptr, "glSampleCoverage");
+ glad_glScissor = (PFNGLSCISSORPROC) load(userptr, "glScissor");
+ glad_glShaderBinary = (PFNGLSHADERBINARYPROC) load(userptr, "glShaderBinary");
+ glad_glShaderSource = (PFNGLSHADERSOURCEPROC) load(userptr, "glShaderSource");
+ glad_glStencilFunc = (PFNGLSTENCILFUNCPROC) load(userptr, "glStencilFunc");
+ glad_glStencilFuncSeparate = (PFNGLSTENCILFUNCSEPARATEPROC) load(userptr, "glStencilFuncSeparate");
+ glad_glStencilMask = (PFNGLSTENCILMASKPROC) load(userptr, "glStencilMask");
+ glad_glStencilMaskSeparate = (PFNGLSTENCILMASKSEPARATEPROC) load(userptr, "glStencilMaskSeparate");
+ glad_glStencilOp = (PFNGLSTENCILOPPROC) load(userptr, "glStencilOp");
+ glad_glStencilOpSeparate = (PFNGLSTENCILOPSEPARATEPROC) load(userptr, "glStencilOpSeparate");
+ glad_glTexImage2D = (PFNGLTEXIMAGE2DPROC) load(userptr, "glTexImage2D");
+ glad_glTexParameterf = (PFNGLTEXPARAMETERFPROC) load(userptr, "glTexParameterf");
+ glad_glTexParameterfv = (PFNGLTEXPARAMETERFVPROC) load(userptr, "glTexParameterfv");
+ glad_glTexParameteri = (PFNGLTEXPARAMETERIPROC) load(userptr, "glTexParameteri");
+ glad_glTexParameteriv = (PFNGLTEXPARAMETERIVPROC) load(userptr, "glTexParameteriv");
+ glad_glTexSubImage2D = (PFNGLTEXSUBIMAGE2DPROC) load(userptr, "glTexSubImage2D");
+ glad_glUniform1f = (PFNGLUNIFORM1FPROC) load(userptr, "glUniform1f");
+ glad_glUniform1fv = (PFNGLUNIFORM1FVPROC) load(userptr, "glUniform1fv");
+ glad_glUniform1i = (PFNGLUNIFORM1IPROC) load(userptr, "glUniform1i");
+ glad_glUniform1iv = (PFNGLUNIFORM1IVPROC) load(userptr, "glUniform1iv");
+ glad_glUniform2f = (PFNGLUNIFORM2FPROC) load(userptr, "glUniform2f");
+ glad_glUniform2fv = (PFNGLUNIFORM2FVPROC) load(userptr, "glUniform2fv");
+ glad_glUniform2i = (PFNGLUNIFORM2IPROC) load(userptr, "glUniform2i");
+ glad_glUniform2iv = (PFNGLUNIFORM2IVPROC) load(userptr, "glUniform2iv");
+ glad_glUniform3f = (PFNGLUNIFORM3FPROC) load(userptr, "glUniform3f");
+ glad_glUniform3fv = (PFNGLUNIFORM3FVPROC) load(userptr, "glUniform3fv");
+ glad_glUniform3i = (PFNGLUNIFORM3IPROC) load(userptr, "glUniform3i");
+ glad_glUniform3iv = (PFNGLUNIFORM3IVPROC) load(userptr, "glUniform3iv");
+ glad_glUniform4f = (PFNGLUNIFORM4FPROC) load(userptr, "glUniform4f");
+ glad_glUniform4fv = (PFNGLUNIFORM4FVPROC) load(userptr, "glUniform4fv");
+ glad_glUniform4i = (PFNGLUNIFORM4IPROC) load(userptr, "glUniform4i");
+ glad_glUniform4iv = (PFNGLUNIFORM4IVPROC) load(userptr, "glUniform4iv");
+ glad_glUniformMatrix2fv = (PFNGLUNIFORMMATRIX2FVPROC) load(userptr, "glUniformMatrix2fv");
+ glad_glUniformMatrix3fv = (PFNGLUNIFORMMATRIX3FVPROC) load(userptr, "glUniformMatrix3fv");
+ glad_glUniformMatrix4fv = (PFNGLUNIFORMMATRIX4FVPROC) load(userptr, "glUniformMatrix4fv");
+ glad_glUseProgram = (PFNGLUSEPROGRAMPROC) load(userptr, "glUseProgram");
+ glad_glValidateProgram = (PFNGLVALIDATEPROGRAMPROC) load(userptr, "glValidateProgram");
+ glad_glVertexAttrib1f = (PFNGLVERTEXATTRIB1FPROC) load(userptr, "glVertexAttrib1f");
+ glad_glVertexAttrib1fv = (PFNGLVERTEXATTRIB1FVPROC) load(userptr, "glVertexAttrib1fv");
+ glad_glVertexAttrib2f = (PFNGLVERTEXATTRIB2FPROC) load(userptr, "glVertexAttrib2f");
+ glad_glVertexAttrib2fv = (PFNGLVERTEXATTRIB2FVPROC) load(userptr, "glVertexAttrib2fv");
+ glad_glVertexAttrib3f = (PFNGLVERTEXATTRIB3FPROC) load(userptr, "glVertexAttrib3f");
+ glad_glVertexAttrib3fv = (PFNGLVERTEXATTRIB3FVPROC) load(userptr, "glVertexAttrib3fv");
+ glad_glVertexAttrib4f = (PFNGLVERTEXATTRIB4FPROC) load(userptr, "glVertexAttrib4f");
+ glad_glVertexAttrib4fv = (PFNGLVERTEXATTRIB4FVPROC) load(userptr, "glVertexAttrib4fv");
+ glad_glVertexAttribPointer = (PFNGLVERTEXATTRIBPOINTERPROC) load(userptr, "glVertexAttribPointer");
+ glad_glViewport = (PFNGLVIEWPORTPROC) load(userptr, "glViewport");
+}
+static void glad_gl_load_GL_ES_VERSION_3_0( GLADuserptrloadfunc load, void* userptr) {
+ if(!GLAD_GL_ES_VERSION_3_0) return;
+ glad_glBeginQuery = (PFNGLBEGINQUERYPROC) load(userptr, "glBeginQuery");
+ glad_glBeginTransformFeedback = (PFNGLBEGINTRANSFORMFEEDBACKPROC) load(userptr, "glBeginTransformFeedback");
+ glad_glBindBufferBase = (PFNGLBINDBUFFERBASEPROC) load(userptr, "glBindBufferBase");
+ glad_glBindBufferRange = (PFNGLBINDBUFFERRANGEPROC) load(userptr, "glBindBufferRange");
+ glad_glBindSampler = (PFNGLBINDSAMPLERPROC) load(userptr, "glBindSampler");
+ glad_glBindTransformFeedback = (PFNGLBINDTRANSFORMFEEDBACKPROC) load(userptr, "glBindTransformFeedback");
+ glad_glBindVertexArray = (PFNGLBINDVERTEXARRAYPROC) load(userptr, "glBindVertexArray");
+ glad_glBlitFramebuffer = (PFNGLBLITFRAMEBUFFERPROC) load(userptr, "glBlitFramebuffer");
+ glad_glClearBufferfi = (PFNGLCLEARBUFFERFIPROC) load(userptr, "glClearBufferfi");
+ glad_glClearBufferfv = (PFNGLCLEARBUFFERFVPROC) load(userptr, "glClearBufferfv");
+ glad_glClearBufferiv = (PFNGLCLEARBUFFERIVPROC) load(userptr, "glClearBufferiv");
+ glad_glClearBufferuiv = (PFNGLCLEARBUFFERUIVPROC) load(userptr, "glClearBufferuiv");
+ glad_glClientWaitSync = (PFNGLCLIENTWAITSYNCPROC) load(userptr, "glClientWaitSync");
+ glad_glCompressedTexImage3D = (PFNGLCOMPRESSEDTEXIMAGE3DPROC) load(userptr, "glCompressedTexImage3D");
+ glad_glCompressedTexSubImage3D = (PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC) load(userptr, "glCompressedTexSubImage3D");
+ glad_glCopyBufferSubData = (PFNGLCOPYBUFFERSUBDATAPROC) load(userptr, "glCopyBufferSubData");
+ glad_glCopyTexSubImage3D = (PFNGLCOPYTEXSUBIMAGE3DPROC) load(userptr, "glCopyTexSubImage3D");
+ glad_glDeleteQueries = (PFNGLDELETEQUERIESPROC) load(userptr, "glDeleteQueries");
+ glad_glDeleteSamplers = (PFNGLDELETESAMPLERSPROC) load(userptr, "glDeleteSamplers");
+ glad_glDeleteSync = (PFNGLDELETESYNCPROC) load(userptr, "glDeleteSync");
+ glad_glDeleteTransformFeedbacks = (PFNGLDELETETRANSFORMFEEDBACKSPROC) load(userptr, "glDeleteTransformFeedbacks");
+ glad_glDeleteVertexArrays = (PFNGLDELETEVERTEXARRAYSPROC) load(userptr, "glDeleteVertexArrays");
+ glad_glDrawArraysInstanced = (PFNGLDRAWARRAYSINSTANCEDPROC) load(userptr, "glDrawArraysInstanced");
+ glad_glDrawBuffers = (PFNGLDRAWBUFFERSPROC) load(userptr, "glDrawBuffers");
+ glad_glDrawElementsInstanced = (PFNGLDRAWELEMENTSINSTANCEDPROC) load(userptr, "glDrawElementsInstanced");
+ glad_glDrawRangeElements = (PFNGLDRAWRANGEELEMENTSPROC) load(userptr, "glDrawRangeElements");
+ glad_glEndQuery = (PFNGLENDQUERYPROC) load(userptr, "glEndQuery");
+ glad_glEndTransformFeedback = (PFNGLENDTRANSFORMFEEDBACKPROC) load(userptr, "glEndTransformFeedback");
+ glad_glFenceSync = (PFNGLFENCESYNCPROC) load(userptr, "glFenceSync");
+ glad_glFlushMappedBufferRange = (PFNGLFLUSHMAPPEDBUFFERRANGEPROC) load(userptr, "glFlushMappedBufferRange");
+ glad_glFramebufferTextureLayer = (PFNGLFRAMEBUFFERTEXTURELAYERPROC) load(userptr, "glFramebufferTextureLayer");
+ glad_glGenQueries = (PFNGLGENQUERIESPROC) load(userptr, "glGenQueries");
+ glad_glGenSamplers = (PFNGLGENSAMPLERSPROC) load(userptr, "glGenSamplers");
+ glad_glGenTransformFeedbacks = (PFNGLGENTRANSFORMFEEDBACKSPROC) load(userptr, "glGenTransformFeedbacks");
+ glad_glGenVertexArrays = (PFNGLGENVERTEXARRAYSPROC) load(userptr, "glGenVertexArrays");
+ glad_glGetActiveUniformBlockName = (PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC) load(userptr, "glGetActiveUniformBlockName");
+ glad_glGetActiveUniformBlockiv = (PFNGLGETACTIVEUNIFORMBLOCKIVPROC) load(userptr, "glGetActiveUniformBlockiv");
+ glad_glGetActiveUniformsiv = (PFNGLGETACTIVEUNIFORMSIVPROC) load(userptr, "glGetActiveUniformsiv");
+ glad_glGetBufferParameteri64v = (PFNGLGETBUFFERPARAMETERI64VPROC) load(userptr, "glGetBufferParameteri64v");
+ glad_glGetBufferPointerv = (PFNGLGETBUFFERPOINTERVPROC) load(userptr, "glGetBufferPointerv");
+ glad_glGetFragDataLocation = (PFNGLGETFRAGDATALOCATIONPROC) load(userptr, "glGetFragDataLocation");
+ glad_glGetInteger64i_v = (PFNGLGETINTEGER64I_VPROC) load(userptr, "glGetInteger64i_v");
+ glad_glGetInteger64v = (PFNGLGETINTEGER64VPROC) load(userptr, "glGetInteger64v");
+ glad_glGetIntegeri_v = (PFNGLGETINTEGERI_VPROC) load(userptr, "glGetIntegeri_v");
+ glad_glGetInternalformativ = (PFNGLGETINTERNALFORMATIVPROC) load(userptr, "glGetInternalformativ");
+ glad_glGetProgramBinary = (PFNGLGETPROGRAMBINARYPROC) load(userptr, "glGetProgramBinary");
+ glad_glGetQueryObjectuiv = (PFNGLGETQUERYOBJECTUIVPROC) load(userptr, "glGetQueryObjectuiv");
+ glad_glGetQueryiv = (PFNGLGETQUERYIVPROC) load(userptr, "glGetQueryiv");
+ glad_glGetSamplerParameterfv = (PFNGLGETSAMPLERPARAMETERFVPROC) load(userptr, "glGetSamplerParameterfv");
+ glad_glGetSamplerParameteriv = (PFNGLGETSAMPLERPARAMETERIVPROC) load(userptr, "glGetSamplerParameteriv");
+ glad_glGetStringi = (PFNGLGETSTRINGIPROC) load(userptr, "glGetStringi");
+ glad_glGetSynciv = (PFNGLGETSYNCIVPROC) load(userptr, "glGetSynciv");
+ glad_glGetTransformFeedbackVarying = (PFNGLGETTRANSFORMFEEDBACKVARYINGPROC) load(userptr, "glGetTransformFeedbackVarying");
+ glad_glGetUniformBlockIndex = (PFNGLGETUNIFORMBLOCKINDEXPROC) load(userptr, "glGetUniformBlockIndex");
+ glad_glGetUniformIndices = (PFNGLGETUNIFORMINDICESPROC) load(userptr, "glGetUniformIndices");
+ glad_glGetUniformuiv = (PFNGLGETUNIFORMUIVPROC) load(userptr, "glGetUniformuiv");
+ glad_glGetVertexAttribIiv = (PFNGLGETVERTEXATTRIBIIVPROC) load(userptr, "glGetVertexAttribIiv");
+ glad_glGetVertexAttribIuiv = (PFNGLGETVERTEXATTRIBIUIVPROC) load(userptr, "glGetVertexAttribIuiv");
+ glad_glInvalidateFramebuffer = (PFNGLINVALIDATEFRAMEBUFFERPROC) load(userptr, "glInvalidateFramebuffer");
+ glad_glInvalidateSubFramebuffer = (PFNGLINVALIDATESUBFRAMEBUFFERPROC) load(userptr, "glInvalidateSubFramebuffer");
+ glad_glIsQuery = (PFNGLISQUERYPROC) load(userptr, "glIsQuery");
+ glad_glIsSampler = (PFNGLISSAMPLERPROC) load(userptr, "glIsSampler");
+ glad_glIsSync = (PFNGLISSYNCPROC) load(userptr, "glIsSync");
+ glad_glIsTransformFeedback = (PFNGLISTRANSFORMFEEDBACKPROC) load(userptr, "glIsTransformFeedback");
+ glad_glIsVertexArray = (PFNGLISVERTEXARRAYPROC) load(userptr, "glIsVertexArray");
+ glad_glMapBufferRange = (PFNGLMAPBUFFERRANGEPROC) load(userptr, "glMapBufferRange");
+ glad_glPauseTransformFeedback = (PFNGLPAUSETRANSFORMFEEDBACKPROC) load(userptr, "glPauseTransformFeedback");
+ glad_glProgramBinary = (PFNGLPROGRAMBINARYPROC) load(userptr, "glProgramBinary");
+ glad_glProgramParameteri = (PFNGLPROGRAMPARAMETERIPROC) load(userptr, "glProgramParameteri");
+ glad_glReadBuffer = (PFNGLREADBUFFERPROC) load(userptr, "glReadBuffer");
+ glad_glRenderbufferStorageMultisample = (PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC) load(userptr, "glRenderbufferStorageMultisample");
+ glad_glResumeTransformFeedback = (PFNGLRESUMETRANSFORMFEEDBACKPROC) load(userptr, "glResumeTransformFeedback");
+ glad_glSamplerParameterf = (PFNGLSAMPLERPARAMETERFPROC) load(userptr, "glSamplerParameterf");
+ glad_glSamplerParameterfv = (PFNGLSAMPLERPARAMETERFVPROC) load(userptr, "glSamplerParameterfv");
+ glad_glSamplerParameteri = (PFNGLSAMPLERPARAMETERIPROC) load(userptr, "glSamplerParameteri");
+ glad_glSamplerParameteriv = (PFNGLSAMPLERPARAMETERIVPROC) load(userptr, "glSamplerParameteriv");
+ glad_glTexImage3D = (PFNGLTEXIMAGE3DPROC) load(userptr, "glTexImage3D");
+ glad_glTexStorage2D = (PFNGLTEXSTORAGE2DPROC) load(userptr, "glTexStorage2D");
+ glad_glTexStorage3D = (PFNGLTEXSTORAGE3DPROC) load(userptr, "glTexStorage3D");
+ glad_glTexSubImage3D = (PFNGLTEXSUBIMAGE3DPROC) load(userptr, "glTexSubImage3D");
+ glad_glTransformFeedbackVaryings = (PFNGLTRANSFORMFEEDBACKVARYINGSPROC) load(userptr, "glTransformFeedbackVaryings");
+ glad_glUniform1ui = (PFNGLUNIFORM1UIPROC) load(userptr, "glUniform1ui");
+ glad_glUniform1uiv = (PFNGLUNIFORM1UIVPROC) load(userptr, "glUniform1uiv");
+ glad_glUniform2ui = (PFNGLUNIFORM2UIPROC) load(userptr, "glUniform2ui");
+ glad_glUniform2uiv = (PFNGLUNIFORM2UIVPROC) load(userptr, "glUniform2uiv");
+ glad_glUniform3ui = (PFNGLUNIFORM3UIPROC) load(userptr, "glUniform3ui");
+ glad_glUniform3uiv = (PFNGLUNIFORM3UIVPROC) load(userptr, "glUniform3uiv");
+ glad_glUniform4ui = (PFNGLUNIFORM4UIPROC) load(userptr, "glUniform4ui");
+ glad_glUniform4uiv = (PFNGLUNIFORM4UIVPROC) load(userptr, "glUniform4uiv");
+ glad_glUniformBlockBinding = (PFNGLUNIFORMBLOCKBINDINGPROC) load(userptr, "glUniformBlockBinding");
+ glad_glUniformMatrix2x3fv = (PFNGLUNIFORMMATRIX2X3FVPROC) load(userptr, "glUniformMatrix2x3fv");
+ glad_glUniformMatrix2x4fv = (PFNGLUNIFORMMATRIX2X4FVPROC) load(userptr, "glUniformMatrix2x4fv");
+ glad_glUniformMatrix3x2fv = (PFNGLUNIFORMMATRIX3X2FVPROC) load(userptr, "glUniformMatrix3x2fv");
+ glad_glUniformMatrix3x4fv = (PFNGLUNIFORMMATRIX3X4FVPROC) load(userptr, "glUniformMatrix3x4fv");
+ glad_glUniformMatrix4x2fv = (PFNGLUNIFORMMATRIX4X2FVPROC) load(userptr, "glUniformMatrix4x2fv");
+ glad_glUniformMatrix4x3fv = (PFNGLUNIFORMMATRIX4X3FVPROC) load(userptr, "glUniformMatrix4x3fv");
+ glad_glUnmapBuffer = (PFNGLUNMAPBUFFERPROC) load(userptr, "glUnmapBuffer");
+ glad_glVertexAttribDivisor = (PFNGLVERTEXATTRIBDIVISORPROC) load(userptr, "glVertexAttribDivisor");
+ glad_glVertexAttribI4i = (PFNGLVERTEXATTRIBI4IPROC) load(userptr, "glVertexAttribI4i");
+ glad_glVertexAttribI4iv = (PFNGLVERTEXATTRIBI4IVPROC) load(userptr, "glVertexAttribI4iv");
+ glad_glVertexAttribI4ui = (PFNGLVERTEXATTRIBI4UIPROC) load(userptr, "glVertexAttribI4ui");
+ glad_glVertexAttribI4uiv = (PFNGLVERTEXATTRIBI4UIVPROC) load(userptr, "glVertexAttribI4uiv");
+ glad_glVertexAttribIPointer = (PFNGLVERTEXATTRIBIPOINTERPROC) load(userptr, "glVertexAttribIPointer");
+ glad_glWaitSync = (PFNGLWAITSYNCPROC) load(userptr, "glWaitSync");
+}
+static void glad_gl_load_GL_ES_VERSION_3_1( GLADuserptrloadfunc load, void* userptr) {
+ if(!GLAD_GL_ES_VERSION_3_1) return;
+ glad_glActiveShaderProgram = (PFNGLACTIVESHADERPROGRAMPROC) load(userptr, "glActiveShaderProgram");
+ glad_glBindImageTexture = (PFNGLBINDIMAGETEXTUREPROC) load(userptr, "glBindImageTexture");
+ glad_glBindProgramPipeline = (PFNGLBINDPROGRAMPIPELINEPROC) load(userptr, "glBindProgramPipeline");
+ glad_glBindVertexBuffer = (PFNGLBINDVERTEXBUFFERPROC) load(userptr, "glBindVertexBuffer");
+ glad_glCreateShaderProgramv = (PFNGLCREATESHADERPROGRAMVPROC) load(userptr, "glCreateShaderProgramv");
+ glad_glDeleteProgramPipelines = (PFNGLDELETEPROGRAMPIPELINESPROC) load(userptr, "glDeleteProgramPipelines");
+ glad_glDispatchCompute = (PFNGLDISPATCHCOMPUTEPROC) load(userptr, "glDispatchCompute");
+ glad_glDispatchComputeIndirect = (PFNGLDISPATCHCOMPUTEINDIRECTPROC) load(userptr, "glDispatchComputeIndirect");
+ glad_glDrawArraysIndirect = (PFNGLDRAWARRAYSINDIRECTPROC) load(userptr, "glDrawArraysIndirect");
+ glad_glDrawElementsIndirect = (PFNGLDRAWELEMENTSINDIRECTPROC) load(userptr, "glDrawElementsIndirect");
+ glad_glFramebufferParameteri = (PFNGLFRAMEBUFFERPARAMETERIPROC) load(userptr, "glFramebufferParameteri");
+ glad_glGenProgramPipelines = (PFNGLGENPROGRAMPIPELINESPROC) load(userptr, "glGenProgramPipelines");
+ glad_glGetBooleani_v = (PFNGLGETBOOLEANI_VPROC) load(userptr, "glGetBooleani_v");
+ glad_glGetFramebufferParameteriv = (PFNGLGETFRAMEBUFFERPARAMETERIVPROC) load(userptr, "glGetFramebufferParameteriv");
+ glad_glGetMultisamplefv = (PFNGLGETMULTISAMPLEFVPROC) load(userptr, "glGetMultisamplefv");
+ glad_glGetProgramInterfaceiv = (PFNGLGETPROGRAMINTERFACEIVPROC) load(userptr, "glGetProgramInterfaceiv");
+ glad_glGetProgramPipelineInfoLog = (PFNGLGETPROGRAMPIPELINEINFOLOGPROC) load(userptr, "glGetProgramPipelineInfoLog");
+ glad_glGetProgramPipelineiv = (PFNGLGETPROGRAMPIPELINEIVPROC) load(userptr, "glGetProgramPipelineiv");
+ glad_glGetProgramResourceIndex = (PFNGLGETPROGRAMRESOURCEINDEXPROC) load(userptr, "glGetProgramResourceIndex");
+ glad_glGetProgramResourceLocation = (PFNGLGETPROGRAMRESOURCELOCATIONPROC) load(userptr, "glGetProgramResourceLocation");
+ glad_glGetProgramResourceName = (PFNGLGETPROGRAMRESOURCENAMEPROC) load(userptr, "glGetProgramResourceName");
+ glad_glGetProgramResourceiv = (PFNGLGETPROGRAMRESOURCEIVPROC) load(userptr, "glGetProgramResourceiv");
+ glad_glGetTexLevelParameterfv = (PFNGLGETTEXLEVELPARAMETERFVPROC) load(userptr, "glGetTexLevelParameterfv");
+ glad_glGetTexLevelParameteriv = (PFNGLGETTEXLEVELPARAMETERIVPROC) load(userptr, "glGetTexLevelParameteriv");
+ glad_glIsProgramPipeline = (PFNGLISPROGRAMPIPELINEPROC) load(userptr, "glIsProgramPipeline");
+ glad_glMemoryBarrier = (PFNGLMEMORYBARRIERPROC) load(userptr, "glMemoryBarrier");
+ glad_glMemoryBarrierByRegion = (PFNGLMEMORYBARRIERBYREGIONPROC) load(userptr, "glMemoryBarrierByRegion");
+ glad_glProgramUniform1f = (PFNGLPROGRAMUNIFORM1FPROC) load(userptr, "glProgramUniform1f");
+ glad_glProgramUniform1fv = (PFNGLPROGRAMUNIFORM1FVPROC) load(userptr, "glProgramUniform1fv");
+ glad_glProgramUniform1i = (PFNGLPROGRAMUNIFORM1IPROC) load(userptr, "glProgramUniform1i");
+ glad_glProgramUniform1iv = (PFNGLPROGRAMUNIFORM1IVPROC) load(userptr, "glProgramUniform1iv");
+ glad_glProgramUniform1ui = (PFNGLPROGRAMUNIFORM1UIPROC) load(userptr, "glProgramUniform1ui");
+ glad_glProgramUniform1uiv = (PFNGLPROGRAMUNIFORM1UIVPROC) load(userptr, "glProgramUniform1uiv");
+ glad_glProgramUniform2f = (PFNGLPROGRAMUNIFORM2FPROC) load(userptr, "glProgramUniform2f");
+ glad_glProgramUniform2fv = (PFNGLPROGRAMUNIFORM2FVPROC) load(userptr, "glProgramUniform2fv");
+ glad_glProgramUniform2i = (PFNGLPROGRAMUNIFORM2IPROC) load(userptr, "glProgramUniform2i");
+ glad_glProgramUniform2iv = (PFNGLPROGRAMUNIFORM2IVPROC) load(userptr, "glProgramUniform2iv");
+ glad_glProgramUniform2ui = (PFNGLPROGRAMUNIFORM2UIPROC) load(userptr, "glProgramUniform2ui");
+ glad_glProgramUniform2uiv = (PFNGLPROGRAMUNIFORM2UIVPROC) load(userptr, "glProgramUniform2uiv");
+ glad_glProgramUniform3f = (PFNGLPROGRAMUNIFORM3FPROC) load(userptr, "glProgramUniform3f");
+ glad_glProgramUniform3fv = (PFNGLPROGRAMUNIFORM3FVPROC) load(userptr, "glProgramUniform3fv");
+ glad_glProgramUniform3i = (PFNGLPROGRAMUNIFORM3IPROC) load(userptr, "glProgramUniform3i");
+ glad_glProgramUniform3iv = (PFNGLPROGRAMUNIFORM3IVPROC) load(userptr, "glProgramUniform3iv");
+ glad_glProgramUniform3ui = (PFNGLPROGRAMUNIFORM3UIPROC) load(userptr, "glProgramUniform3ui");
+ glad_glProgramUniform3uiv = (PFNGLPROGRAMUNIFORM3UIVPROC) load(userptr, "glProgramUniform3uiv");
+ glad_glProgramUniform4f = (PFNGLPROGRAMUNIFORM4FPROC) load(userptr, "glProgramUniform4f");
+ glad_glProgramUniform4fv = (PFNGLPROGRAMUNIFORM4FVPROC) load(userptr, "glProgramUniform4fv");
+ glad_glProgramUniform4i = (PFNGLPROGRAMUNIFORM4IPROC) load(userptr, "glProgramUniform4i");
+ glad_glProgramUniform4iv = (PFNGLPROGRAMUNIFORM4IVPROC) load(userptr, "glProgramUniform4iv");
+ glad_glProgramUniform4ui = (PFNGLPROGRAMUNIFORM4UIPROC) load(userptr, "glProgramUniform4ui");
+ glad_glProgramUniform4uiv = (PFNGLPROGRAMUNIFORM4UIVPROC) load(userptr, "glProgramUniform4uiv");
+ glad_glProgramUniformMatrix2fv = (PFNGLPROGRAMUNIFORMMATRIX2FVPROC) load(userptr, "glProgramUniformMatrix2fv");
+ glad_glProgramUniformMatrix2x3fv = (PFNGLPROGRAMUNIFORMMATRIX2X3FVPROC) load(userptr, "glProgramUniformMatrix2x3fv");
+ glad_glProgramUniformMatrix2x4fv = (PFNGLPROGRAMUNIFORMMATRIX2X4FVPROC) load(userptr, "glProgramUniformMatrix2x4fv");
+ glad_glProgramUniformMatrix3fv = (PFNGLPROGRAMUNIFORMMATRIX3FVPROC) load(userptr, "glProgramUniformMatrix3fv");
+ glad_glProgramUniformMatrix3x2fv = (PFNGLPROGRAMUNIFORMMATRIX3X2FVPROC) load(userptr, "glProgramUniformMatrix3x2fv");
+ glad_glProgramUniformMatrix3x4fv = (PFNGLPROGRAMUNIFORMMATRIX3X4FVPROC) load(userptr, "glProgramUniformMatrix3x4fv");
+ glad_glProgramUniformMatrix4fv = (PFNGLPROGRAMUNIFORMMATRIX4FVPROC) load(userptr, "glProgramUniformMatrix4fv");
+ glad_glProgramUniformMatrix4x2fv = (PFNGLPROGRAMUNIFORMMATRIX4X2FVPROC) load(userptr, "glProgramUniformMatrix4x2fv");
+ glad_glProgramUniformMatrix4x3fv = (PFNGLPROGRAMUNIFORMMATRIX4X3FVPROC) load(userptr, "glProgramUniformMatrix4x3fv");
+ glad_glSampleMaski = (PFNGLSAMPLEMASKIPROC) load(userptr, "glSampleMaski");
+ glad_glTexStorage2DMultisample = (PFNGLTEXSTORAGE2DMULTISAMPLEPROC) load(userptr, "glTexStorage2DMultisample");
+ glad_glUseProgramStages = (PFNGLUSEPROGRAMSTAGESPROC) load(userptr, "glUseProgramStages");
+ glad_glValidateProgramPipeline = (PFNGLVALIDATEPROGRAMPIPELINEPROC) load(userptr, "glValidateProgramPipeline");
+ glad_glVertexAttribBinding = (PFNGLVERTEXATTRIBBINDINGPROC) load(userptr, "glVertexAttribBinding");
+ glad_glVertexAttribFormat = (PFNGLVERTEXATTRIBFORMATPROC) load(userptr, "glVertexAttribFormat");
+ glad_glVertexAttribIFormat = (PFNGLVERTEXATTRIBIFORMATPROC) load(userptr, "glVertexAttribIFormat");
+ glad_glVertexBindingDivisor = (PFNGLVERTEXBINDINGDIVISORPROC) load(userptr, "glVertexBindingDivisor");
+}
+static void glad_gl_load_GL_ES_VERSION_3_2( GLADuserptrloadfunc load, void* userptr) {
+ if(!GLAD_GL_ES_VERSION_3_2) return;
+ glad_glBlendBarrier = (PFNGLBLENDBARRIERPROC) load(userptr, "glBlendBarrier");
+ glad_glBlendEquationSeparatei = (PFNGLBLENDEQUATIONSEPARATEIPROC) load(userptr, "glBlendEquationSeparatei");
+ glad_glBlendEquationi = (PFNGLBLENDEQUATIONIPROC) load(userptr, "glBlendEquationi");
+ glad_glBlendFuncSeparatei = (PFNGLBLENDFUNCSEPARATEIPROC) load(userptr, "glBlendFuncSeparatei");
+ glad_glBlendFunci = (PFNGLBLENDFUNCIPROC) load(userptr, "glBlendFunci");
+ glad_glColorMaski = (PFNGLCOLORMASKIPROC) load(userptr, "glColorMaski");
+ glad_glCopyImageSubData = (PFNGLCOPYIMAGESUBDATAPROC) load(userptr, "glCopyImageSubData");
+ glad_glDebugMessageCallback = (PFNGLDEBUGMESSAGECALLBACKPROC) load(userptr, "glDebugMessageCallback");
+ glad_glDebugMessageControl = (PFNGLDEBUGMESSAGECONTROLPROC) load(userptr, "glDebugMessageControl");
+ glad_glDebugMessageInsert = (PFNGLDEBUGMESSAGEINSERTPROC) load(userptr, "glDebugMessageInsert");
+ glad_glDisablei = (PFNGLDISABLEIPROC) load(userptr, "glDisablei");
+ glad_glDrawElementsBaseVertex = (PFNGLDRAWELEMENTSBASEVERTEXPROC) load(userptr, "glDrawElementsBaseVertex");
+ glad_glDrawElementsInstancedBaseVertex = (PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXPROC) load(userptr, "glDrawElementsInstancedBaseVertex");
+ glad_glDrawRangeElementsBaseVertex = (PFNGLDRAWRANGEELEMENTSBASEVERTEXPROC) load(userptr, "glDrawRangeElementsBaseVertex");
+ glad_glEnablei = (PFNGLENABLEIPROC) load(userptr, "glEnablei");
+ glad_glFramebufferTexture = (PFNGLFRAMEBUFFERTEXTUREPROC) load(userptr, "glFramebufferTexture");
+ glad_glGetDebugMessageLog = (PFNGLGETDEBUGMESSAGELOGPROC) load(userptr, "glGetDebugMessageLog");
+ glad_glGetGraphicsResetStatus = (PFNGLGETGRAPHICSRESETSTATUSPROC) load(userptr, "glGetGraphicsResetStatus");
+ glad_glGetObjectLabel = (PFNGLGETOBJECTLABELPROC) load(userptr, "glGetObjectLabel");
+ glad_glGetObjectPtrLabel = (PFNGLGETOBJECTPTRLABELPROC) load(userptr, "glGetObjectPtrLabel");
+ glad_glGetPointerv = (PFNGLGETPOINTERVPROC) load(userptr, "glGetPointerv");
+ glad_glGetSamplerParameterIiv = (PFNGLGETSAMPLERPARAMETERIIVPROC) load(userptr, "glGetSamplerParameterIiv");
+ glad_glGetSamplerParameterIuiv = (PFNGLGETSAMPLERPARAMETERIUIVPROC) load(userptr, "glGetSamplerParameterIuiv");
+ glad_glGetTexParameterIiv = (PFNGLGETTEXPARAMETERIIVPROC) load(userptr, "glGetTexParameterIiv");
+ glad_glGetTexParameterIuiv = (PFNGLGETTEXPARAMETERIUIVPROC) load(userptr, "glGetTexParameterIuiv");
+ glad_glGetnUniformfv = (PFNGLGETNUNIFORMFVPROC) load(userptr, "glGetnUniformfv");
+ glad_glGetnUniformiv = (PFNGLGETNUNIFORMIVPROC) load(userptr, "glGetnUniformiv");
+ glad_glGetnUniformuiv = (PFNGLGETNUNIFORMUIVPROC) load(userptr, "glGetnUniformuiv");
+ glad_glIsEnabledi = (PFNGLISENABLEDIPROC) load(userptr, "glIsEnabledi");
+ glad_glMinSampleShading = (PFNGLMINSAMPLESHADINGPROC) load(userptr, "glMinSampleShading");
+ glad_glObjectLabel = (PFNGLOBJECTLABELPROC) load(userptr, "glObjectLabel");
+ glad_glObjectPtrLabel = (PFNGLOBJECTPTRLABELPROC) load(userptr, "glObjectPtrLabel");
+ glad_glPatchParameteri = (PFNGLPATCHPARAMETERIPROC) load(userptr, "glPatchParameteri");
+ glad_glPopDebugGroup = (PFNGLPOPDEBUGGROUPPROC) load(userptr, "glPopDebugGroup");
+ glad_glPrimitiveBoundingBox = (PFNGLPRIMITIVEBOUNDINGBOXPROC) load(userptr, "glPrimitiveBoundingBox");
+ glad_glPushDebugGroup = (PFNGLPUSHDEBUGGROUPPROC) load(userptr, "glPushDebugGroup");
+ glad_glReadnPixels = (PFNGLREADNPIXELSPROC) load(userptr, "glReadnPixels");
+ glad_glSamplerParameterIiv = (PFNGLSAMPLERPARAMETERIIVPROC) load(userptr, "glSamplerParameterIiv");
+ glad_glSamplerParameterIuiv = (PFNGLSAMPLERPARAMETERIUIVPROC) load(userptr, "glSamplerParameterIuiv");
+ glad_glTexBuffer = (PFNGLTEXBUFFERPROC) load(userptr, "glTexBuffer");
+ glad_glTexBufferRange = (PFNGLTEXBUFFERRANGEPROC) load(userptr, "glTexBufferRange");
+ glad_glTexParameterIiv = (PFNGLTEXPARAMETERIIVPROC) load(userptr, "glTexParameterIiv");
+ glad_glTexParameterIuiv = (PFNGLTEXPARAMETERIUIVPROC) load(userptr, "glTexParameterIuiv");
+ glad_glTexStorage3DMultisample = (PFNGLTEXSTORAGE3DMULTISAMPLEPROC) load(userptr, "glTexStorage3DMultisample");
+}
+static void glad_gl_load_GL_EXT_geometry_shader( GLADuserptrloadfunc load, void* userptr) {
+ if(!GLAD_GL_EXT_geometry_shader) return;
+ glad_glFramebufferTextureEXT = (PFNGLFRAMEBUFFERTEXTUREEXTPROC) load(userptr, "glFramebufferTextureEXT");
+}
+static void glad_gl_load_GL_OES_EGL_image( GLADuserptrloadfunc load, void* userptr) {
+ if(!GLAD_GL_OES_EGL_image) return;
+ glad_glEGLImageTargetRenderbufferStorageOES = (PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) load(userptr, "glEGLImageTargetRenderbufferStorageOES");
+ glad_glEGLImageTargetTexture2DOES = (PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) load(userptr, "glEGLImageTargetTexture2DOES");
+}
+
+
+
+static void glad_gl_free_extensions(char **exts_i) {
+ if (exts_i != NULL) {
+ unsigned int index;
+ for(index = 0; exts_i[index]; index++) {
+ free((void *) (exts_i[index]));
+ }
+ free((void *)exts_i);
+ exts_i = NULL;
+ }
+}
+static int glad_gl_get_extensions( const char **out_exts, char ***out_exts_i) {
+#if defined(GL_ES_VERSION_3_0) || defined(GL_VERSION_3_0)
+ if (glad_glGetStringi != NULL && glad_glGetIntegerv != NULL) {
+ unsigned int index = 0;
+ unsigned int num_exts_i = 0;
+ char **exts_i = NULL;
+ glad_glGetIntegerv(GL_NUM_EXTENSIONS, (int*) &num_exts_i);
+ exts_i = (char **) malloc((num_exts_i + 1) * (sizeof *exts_i));
+ if (exts_i == NULL) {
+ return 0;
+ }
+ for(index = 0; index < num_exts_i; index++) {
+ const char *gl_str_tmp = (const char*) glad_glGetStringi(GL_EXTENSIONS, index);
+ size_t len = strlen(gl_str_tmp) + 1;
+
+ char *local_str = (char*) malloc(len * sizeof(char));
+ if(local_str == NULL) {
+ exts_i[index] = NULL;
+ glad_gl_free_extensions(exts_i);
+ return 0;
+ }
+
+ memcpy(local_str, gl_str_tmp, len * sizeof(char));
+ exts_i[index] = local_str;
+ }
+ exts_i[index] = NULL;
+
+ *out_exts_i = exts_i;
+
+ return 1;
+ }
+#else
+ GLAD_UNUSED(out_exts_i);
+#endif
+ if (glad_glGetString == NULL) {
+ return 0;
+ }
+ *out_exts = (const char *)glad_glGetString(GL_EXTENSIONS);
+ return 1;
+}
+static int glad_gl_has_extension(const char *exts, char **exts_i, const char *ext) {
+ if(exts_i) {
+ unsigned int index;
+ for(index = 0; exts_i[index]; index++) {
+ const char *e = exts_i[index];
+ if(strcmp(e, ext) == 0) {
+ return 1;
+ }
+ }
+ } else {
+ const char *extensions;
+ const char *loc;
+ const char *terminator;
+ extensions = exts;
+ if(extensions == NULL || ext == NULL) {
+ return 0;
+ }
+ while(1) {
+ loc = strstr(extensions, ext);
+ if(loc == NULL) {
+ return 0;
+ }
+ terminator = loc + strlen(ext);
+ if((loc == extensions || *(loc - 1) == ' ') &&
+ (*terminator == ' ' || *terminator == '\0')) {
+ return 1;
+ }
+ extensions = terminator;
+ }
+ }
+ return 0;
+}
+
+static GLADapiproc glad_gl_get_proc_from_userptr(void *userptr, const char* name) {
+ return (GLAD_GNUC_EXTENSION (GLADapiproc (*)(const char *name)) userptr)(name);
+}
+
+static int glad_gl_find_extensions_gles2(void) {
+ const char *exts = NULL;
+ char **exts_i = NULL;
+ if (!glad_gl_get_extensions(&exts, &exts_i)) return 0;
+
+ GLAD_GL_EXT_geometry_shader = glad_gl_has_extension(exts, exts_i, "GL_EXT_geometry_shader");
+ GLAD_GL_EXT_texture_compression_dxt1 = glad_gl_has_extension(exts, exts_i, "GL_EXT_texture_compression_dxt1");
+ GLAD_GL_EXT_texture_filter_anisotropic = glad_gl_has_extension(exts, exts_i, "GL_EXT_texture_filter_anisotropic");
+ GLAD_GL_OES_EGL_image = glad_gl_has_extension(exts, exts_i, "GL_OES_EGL_image");
+ GLAD_GL_OES_EGL_image_external = glad_gl_has_extension(exts, exts_i, "GL_OES_EGL_image_external");
+ GLAD_GL_OES_EGL_image_external_essl3 = glad_gl_has_extension(exts, exts_i, "GL_OES_EGL_image_external_essl3");
+ GLAD_GL_OES_texture_compression_astc = glad_gl_has_extension(exts, exts_i, "GL_OES_texture_compression_astc");
+
+ glad_gl_free_extensions(exts_i);
+
+ return 1;
+}
+
+static int glad_gl_find_core_gles2(void) {
+ int i;
+ const char* version;
+ const char* prefixes[] = {
+ "OpenGL ES-CM ",
+ "OpenGL ES-CL ",
+ "OpenGL ES ",
+ "OpenGL SC ",
+ NULL
+ };
+ int major = 0;
+ int minor = 0;
+ version = (const char*) glad_glGetString(GL_VERSION);
+ if (!version) return 0;
+ for (i = 0; prefixes[i]; i++) {
+ const size_t length = strlen(prefixes[i]);
+ if (strncmp(version, prefixes[i], length) == 0) {
+ version += length;
+ break;
+ }
+ }
+
+ GLAD_IMPL_UTIL_SSCANF(version, "%d.%d", &major, &minor);
+
+ GLAD_GL_ES_VERSION_2_0 = (major == 2 && minor >= 0) || major > 2;
+ GLAD_GL_ES_VERSION_3_0 = (major == 3 && minor >= 0) || major > 3;
+ GLAD_GL_ES_VERSION_3_1 = (major == 3 && minor >= 1) || major > 3;
+ GLAD_GL_ES_VERSION_3_2 = (major == 3 && minor >= 2) || major > 3;
+
+ return GLAD_MAKE_VERSION(major, minor);
+}
+
+int gladLoadGLES2UserPtr( GLADuserptrloadfunc load, void *userptr) {
+ int version;
+
+ glad_glGetString = (PFNGLGETSTRINGPROC) load(userptr, "glGetString");
+ if(glad_glGetString == NULL) return 0;
+ version = glad_gl_find_core_gles2();
+
+ glad_gl_load_GL_ES_VERSION_2_0(load, userptr);
+ glad_gl_load_GL_ES_VERSION_3_0(load, userptr);
+ glad_gl_load_GL_ES_VERSION_3_1(load, userptr);
+ glad_gl_load_GL_ES_VERSION_3_2(load, userptr);
+
+ if (!glad_gl_find_extensions_gles2()) return 0;
+ glad_gl_load_GL_EXT_geometry_shader(load, userptr);
+ glad_gl_load_GL_OES_EGL_image(load, userptr);
+
+
+
+ return version;
+}
+
+
+int gladLoadGLES2( GLADloadfunc load) {
+ return gladLoadGLES2UserPtr( glad_gl_get_proc_from_userptr, GLAD_GNUC_EXTENSION (void*) load);
+}
+
+
+
+
+
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/external/glslang b/external/glslang
index bcf6a2430..ee2f5d09e 160000
--- a/external/glslang
+++ b/external/glslang
@@ -1 +1 @@
-Subproject commit bcf6a2430e99e8fc24f9f266e99316905e6d5134
+Subproject commit ee2f5d09eaf8f4e8d0d598bd2172fce290d4ca60
diff --git a/external/glslang-os-dep/GenericSingleThreaded/ossource.cpp b/external/glslang-os-dep/GenericSingleThreaded/ossource.cpp
deleted file mode 100644
index f1ab3b409..000000000
--- a/external/glslang-os-dep/GenericSingleThreaded/ossource.cpp
+++ /dev/null
@@ -1,96 +0,0 @@
-// -------------------------------------------------------------------------
-// Copyright (C) 2018 BMW Car IT GmbH
-// -------------------------------------------------------------------------
-// This Source Code Form is subject to the terms of the Mozilla Public
-// License, v. 2.0. If a copy of the MPL was not distributed with this
-// file, You can obtain one at https://mozilla.org/MPL/2.0/.
-// -------------------------------------------------------------------------
-
-#include "OSDependent/osinclude.h"
-#include "assert.h"
-#include "stdio.h"
-
-// arbitrary number of slots. should always be enough for anyone
-#define MAX_TLS_SLOTS ((size_t)10)
-static bool tls_slots_in_use[MAX_TLS_SLOTS] = {false};
-static void* tls_slots_values[MAX_TLS_SLOTS] = {0};
-
-namespace glslang {
-
-void OS_CleanupThreadData(void)
-{
-}
-
-OS_TLSIndex OS_AllocTLSIndex()
-{
- for (size_t idx = 0; idx < MAX_TLS_SLOTS; ++idx)
- if (!tls_slots_in_use[idx]) {
- tls_slots_in_use[idx] = true;
- return (void*)(idx + 1);
- }
- return OS_INVALID_TLS_INDEX;
-}
-
-bool OS_SetTLSValue(OS_TLSIndex nIndex, void *lpvValue)
-{
- size_t idx = (size_t)nIndex;
- if (nIndex == OS_INVALID_TLS_INDEX ||
- idx >= MAX_TLS_SLOTS ||
- !tls_slots_in_use[idx-1])
- return false;
- tls_slots_values[idx-1] = lpvValue;
- return true;
-}
-
-void* OS_GetTLSValue(OS_TLSIndex nIndex)
-{
- size_t idx = (size_t)nIndex;
- if (nIndex == OS_INVALID_TLS_INDEX ||
- idx >= MAX_TLS_SLOTS ||
- !tls_slots_in_use[idx-1])
- return 0;
- return tls_slots_values[idx-1];
-}
-
-bool OS_FreeTLSIndex(OS_TLSIndex nIndex)
-{
- size_t idx = (size_t)nIndex;
- if (nIndex == OS_INVALID_TLS_INDEX ||
- idx >= MAX_TLS_SLOTS ||
- !tls_slots_in_use[idx-1])
- return 0;
- tls_slots_in_use[idx-1] = false;
- return true;
-}
-
-void InitGlobalLock()
-{
-}
-
-void GetGlobalLock()
-{
-}
-
-void ReleaseGlobalLock()
-{
-}
-
-void* OS_CreateThread(TThreadEntrypoint /*entry*/)
-{
- return 0;
-}
-
-void OS_WaitForAllThreads(void* /*threads*/, int /*numThreads*/)
-{
-}
-
-void OS_Sleep(int /*milliseconds*/)
-{
-}
-
-void OS_DumpMemoryCounters()
-{
-}
-
-} // end namespace glslang
-
diff --git a/external/khronos/GLES2/gl2.h b/external/khronos/GLES2/gl2.h
deleted file mode 100644
index 8c5ae900e..000000000
--- a/external/khronos/GLES2/gl2.h
+++ /dev/null
@@ -1,525 +0,0 @@
-#ifndef __gl2_h_
-#define __gl2_h_ 1
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
-** Copyright (c) 2013-2014 The Khronos Group Inc.
-**
-** Permission is hereby granted, free of charge, to any person obtaining a
-** copy of this software and/or associated documentation files (the
-** "Materials"), to deal in the Materials without restriction, including
-** without limitation the rights to use, copy, modify, merge, publish,
-** distribute, sublicense, and/or sell copies of the Materials, and to
-** permit persons to whom the Materials are furnished to do so, subject to
-** the following conditions:
-**
-** The above copyright notice and this permission notice shall be included
-** in all copies or substantial portions of the Materials.
-**
-** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
-*/
-/*
-** This header is generated from the Khronos OpenGL / OpenGL ES XML
-** API Registry. The current version of the Registry, generator scripts
-** used to make the header, and the header can be found at
-** http://www.opengl.org/registry/
-**
-** Khronos $Revision$ on $Date$
-*/
-
-#include
-
-/* Generated on date 20141204 */
-
-/* Generated C header for:
- * API: gles2
- * Profile: common
- * Versions considered: 2\.[0-9]
- * Versions emitted: .*
- * Default extensions included: None
- * Additional extensions included: _nomatch_^
- * Extensions removed: _nomatch_^
- */
-
-#ifndef GL_ES_VERSION_2_0
-#define GL_ES_VERSION_2_0 1
-#include
-typedef khronos_int8_t GLbyte;
-typedef khronos_float_t GLclampf;
-typedef khronos_int32_t GLfixed;
-typedef short GLshort;
-typedef unsigned short GLushort;
-typedef void GLvoid;
-typedef struct __GLsync *GLsync;
-typedef khronos_int64_t GLint64;
-typedef khronos_uint64_t GLuint64;
-typedef unsigned int GLenum;
-typedef unsigned int GLuint;
-typedef char GLchar;
-typedef khronos_float_t GLfloat;
-typedef khronos_ssize_t GLsizeiptr;
-typedef khronos_intptr_t GLintptr;
-typedef unsigned int GLbitfield;
-typedef int GLint;
-typedef unsigned char GLboolean;
-typedef int GLsizei;
-typedef khronos_uint8_t GLubyte;
-#define GL_DEPTH_BUFFER_BIT 0x00000100
-#define GL_STENCIL_BUFFER_BIT 0x00000400
-#define GL_COLOR_BUFFER_BIT 0x00004000
-#define GL_FALSE 0
-#define GL_TRUE 1
-#define GL_POINTS 0x0000
-#define GL_LINES 0x0001
-#define GL_LINE_LOOP 0x0002
-#define GL_LINE_STRIP 0x0003
-#define GL_TRIANGLES 0x0004
-#define GL_TRIANGLE_STRIP 0x0005
-#define GL_TRIANGLE_FAN 0x0006
-#define GL_ZERO 0
-#define GL_ONE 1
-#define GL_SRC_COLOR 0x0300
-#define GL_ONE_MINUS_SRC_COLOR 0x0301
-#define GL_SRC_ALPHA 0x0302
-#define GL_ONE_MINUS_SRC_ALPHA 0x0303
-#define GL_DST_ALPHA 0x0304
-#define GL_ONE_MINUS_DST_ALPHA 0x0305
-#define GL_DST_COLOR 0x0306
-#define GL_ONE_MINUS_DST_COLOR 0x0307
-#define GL_SRC_ALPHA_SATURATE 0x0308
-#define GL_FUNC_ADD 0x8006
-#define GL_BLEND_EQUATION 0x8009
-#define GL_BLEND_EQUATION_RGB 0x8009
-#define GL_BLEND_EQUATION_ALPHA 0x883D
-#define GL_FUNC_SUBTRACT 0x800A
-#define GL_FUNC_REVERSE_SUBTRACT 0x800B
-#define GL_BLEND_DST_RGB 0x80C8
-#define GL_BLEND_SRC_RGB 0x80C9
-#define GL_BLEND_DST_ALPHA 0x80CA
-#define GL_BLEND_SRC_ALPHA 0x80CB
-#define GL_CONSTANT_COLOR 0x8001
-#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002
-#define GL_CONSTANT_ALPHA 0x8003
-#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004
-#define GL_BLEND_COLOR 0x8005
-#define GL_ARRAY_BUFFER 0x8892
-#define GL_ELEMENT_ARRAY_BUFFER 0x8893
-#define GL_ARRAY_BUFFER_BINDING 0x8894
-#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895
-#define GL_STREAM_DRAW 0x88E0
-#define GL_STATIC_DRAW 0x88E4
-#define GL_DYNAMIC_DRAW 0x88E8
-#define GL_BUFFER_SIZE 0x8764
-#define GL_BUFFER_USAGE 0x8765
-#define GL_CURRENT_VERTEX_ATTRIB 0x8626
-#define GL_FRONT 0x0404
-#define GL_BACK 0x0405
-#define GL_FRONT_AND_BACK 0x0408
-#define GL_TEXTURE_2D 0x0DE1
-#define GL_CULL_FACE 0x0B44
-#define GL_BLEND 0x0BE2
-#define GL_DITHER 0x0BD0
-#define GL_STENCIL_TEST 0x0B90
-#define GL_DEPTH_TEST 0x0B71
-#define GL_SCISSOR_TEST 0x0C11
-#define GL_POLYGON_OFFSET_FILL 0x8037
-#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E
-#define GL_SAMPLE_COVERAGE 0x80A0
-#define GL_NO_ERROR 0
-#define GL_INVALID_ENUM 0x0500
-#define GL_INVALID_VALUE 0x0501
-#define GL_INVALID_OPERATION 0x0502
-#define GL_OUT_OF_MEMORY 0x0505
-#define GL_CW 0x0900
-#define GL_CCW 0x0901
-#define GL_LINE_WIDTH 0x0B21
-#define GL_ALIASED_POINT_SIZE_RANGE 0x846D
-#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E
-#define GL_CULL_FACE_MODE 0x0B45
-#define GL_FRONT_FACE 0x0B46
-#define GL_DEPTH_RANGE 0x0B70
-#define GL_DEPTH_WRITEMASK 0x0B72
-#define GL_DEPTH_CLEAR_VALUE 0x0B73
-#define GL_DEPTH_FUNC 0x0B74
-#define GL_STENCIL_CLEAR_VALUE 0x0B91
-#define GL_STENCIL_FUNC 0x0B92
-#define GL_STENCIL_FAIL 0x0B94
-#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95
-#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96
-#define GL_STENCIL_REF 0x0B97
-#define GL_STENCIL_VALUE_MASK 0x0B93
-#define GL_STENCIL_WRITEMASK 0x0B98
-#define GL_STENCIL_BACK_FUNC 0x8800
-#define GL_STENCIL_BACK_FAIL 0x8801
-#define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802
-#define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803
-#define GL_STENCIL_BACK_REF 0x8CA3
-#define GL_STENCIL_BACK_VALUE_MASK 0x8CA4
-#define GL_STENCIL_BACK_WRITEMASK 0x8CA5
-#define GL_VIEWPORT 0x0BA2
-#define GL_SCISSOR_BOX 0x0C10
-#define GL_COLOR_CLEAR_VALUE 0x0C22
-#define GL_COLOR_WRITEMASK 0x0C23
-#define GL_UNPACK_ALIGNMENT 0x0CF5
-#define GL_PACK_ALIGNMENT 0x0D05
-#define GL_MAX_TEXTURE_SIZE 0x0D33
-#define GL_MAX_VIEWPORT_DIMS 0x0D3A
-#define GL_SUBPIXEL_BITS 0x0D50
-#define GL_RED_BITS 0x0D52
-#define GL_GREEN_BITS 0x0D53
-#define GL_BLUE_BITS 0x0D54
-#define GL_ALPHA_BITS 0x0D55
-#define GL_DEPTH_BITS 0x0D56
-#define GL_STENCIL_BITS 0x0D57
-#define GL_POLYGON_OFFSET_UNITS 0x2A00
-#define GL_POLYGON_OFFSET_FACTOR 0x8038
-#define GL_TEXTURE_BINDING_2D 0x8069
-#define GL_SAMPLE_BUFFERS 0x80A8
-#define GL_SAMPLES 0x80A9
-#define GL_SAMPLE_COVERAGE_VALUE 0x80AA
-#define GL_SAMPLE_COVERAGE_INVERT 0x80AB
-#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
-#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3
-#define GL_DONT_CARE 0x1100
-#define GL_FASTEST 0x1101
-#define GL_NICEST 0x1102
-#define GL_GENERATE_MIPMAP_HINT 0x8192
-#define GL_BYTE 0x1400
-#define GL_UNSIGNED_BYTE 0x1401
-#define GL_SHORT 0x1402
-#define GL_UNSIGNED_SHORT 0x1403
-#define GL_INT 0x1404
-#define GL_UNSIGNED_INT 0x1405
-#define GL_FLOAT 0x1406
-#define GL_FIXED 0x140C
-#define GL_DEPTH_COMPONENT 0x1902
-#define GL_ALPHA 0x1906
-#define GL_RGB 0x1907
-#define GL_RGBA 0x1908
-#define GL_LUMINANCE 0x1909
-#define GL_LUMINANCE_ALPHA 0x190A
-#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033
-#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034
-#define GL_UNSIGNED_SHORT_5_6_5 0x8363
-#define GL_FRAGMENT_SHADER 0x8B30
-#define GL_VERTEX_SHADER 0x8B31
-#define GL_MAX_VERTEX_ATTRIBS 0x8869
-#define GL_MAX_VERTEX_UNIFORM_VECTORS 0x8DFB
-#define GL_MAX_VARYING_VECTORS 0x8DFC
-#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D
-#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C
-#define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872
-#define GL_MAX_FRAGMENT_UNIFORM_VECTORS 0x8DFD
-#define GL_SHADER_TYPE 0x8B4F
-#define GL_DELETE_STATUS 0x8B80
-#define GL_LINK_STATUS 0x8B82
-#define GL_VALIDATE_STATUS 0x8B83
-#define GL_ATTACHED_SHADERS 0x8B85
-#define GL_ACTIVE_UNIFORMS 0x8B86
-#define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87
-#define GL_ACTIVE_ATTRIBUTES 0x8B89
-#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A
-#define GL_SHADING_LANGUAGE_VERSION 0x8B8C
-#define GL_CURRENT_PROGRAM 0x8B8D
-#define GL_NEVER 0x0200
-#define GL_LESS 0x0201
-#define GL_EQUAL 0x0202
-#define GL_LEQUAL 0x0203
-#define GL_GREATER 0x0204
-#define GL_NOTEQUAL 0x0205
-#define GL_GEQUAL 0x0206
-#define GL_ALWAYS 0x0207
-#define GL_KEEP 0x1E00
-#define GL_REPLACE 0x1E01
-#define GL_INCR 0x1E02
-#define GL_DECR 0x1E03
-#define GL_INVERT 0x150A
-#define GL_INCR_WRAP 0x8507
-#define GL_DECR_WRAP 0x8508
-#define GL_VENDOR 0x1F00
-#define GL_RENDERER 0x1F01
-#define GL_VERSION 0x1F02
-#define GL_EXTENSIONS 0x1F03
-#define GL_NEAREST 0x2600
-#define GL_LINEAR 0x2601
-#define GL_NEAREST_MIPMAP_NEAREST 0x2700
-#define GL_LINEAR_MIPMAP_NEAREST 0x2701
-#define GL_NEAREST_MIPMAP_LINEAR 0x2702
-#define GL_LINEAR_MIPMAP_LINEAR 0x2703
-#define GL_TEXTURE_MAG_FILTER 0x2800
-#define GL_TEXTURE_MIN_FILTER 0x2801
-#define GL_TEXTURE_WRAP_S 0x2802
-#define GL_TEXTURE_WRAP_T 0x2803
-#define GL_TEXTURE 0x1702
-#define GL_TEXTURE_CUBE_MAP 0x8513
-#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514
-#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515
-#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516
-#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517
-#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518
-#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519
-#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A
-#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C
-#define GL_TEXTURE0 0x84C0
-#define GL_TEXTURE1 0x84C1
-#define GL_TEXTURE2 0x84C2
-#define GL_TEXTURE3 0x84C3
-#define GL_TEXTURE4 0x84C4
-#define GL_TEXTURE5 0x84C5
-#define GL_TEXTURE6 0x84C6
-#define GL_TEXTURE7 0x84C7
-#define GL_TEXTURE8 0x84C8
-#define GL_TEXTURE9 0x84C9
-#define GL_TEXTURE10 0x84CA
-#define GL_TEXTURE11 0x84CB
-#define GL_TEXTURE12 0x84CC
-#define GL_TEXTURE13 0x84CD
-#define GL_TEXTURE14 0x84CE
-#define GL_TEXTURE15 0x84CF
-#define GL_TEXTURE16 0x84D0
-#define GL_TEXTURE17 0x84D1
-#define GL_TEXTURE18 0x84D2
-#define GL_TEXTURE19 0x84D3
-#define GL_TEXTURE20 0x84D4
-#define GL_TEXTURE21 0x84D5
-#define GL_TEXTURE22 0x84D6
-#define GL_TEXTURE23 0x84D7
-#define GL_TEXTURE24 0x84D8
-#define GL_TEXTURE25 0x84D9
-#define GL_TEXTURE26 0x84DA
-#define GL_TEXTURE27 0x84DB
-#define GL_TEXTURE28 0x84DC
-#define GL_TEXTURE29 0x84DD
-#define GL_TEXTURE30 0x84DE
-#define GL_TEXTURE31 0x84DF
-#define GL_ACTIVE_TEXTURE 0x84E0
-#define GL_REPEAT 0x2901
-#define GL_CLAMP_TO_EDGE 0x812F
-#define GL_MIRRORED_REPEAT 0x8370
-#define GL_FLOAT_VEC2 0x8B50
-#define GL_FLOAT_VEC3 0x8B51
-#define GL_FLOAT_VEC4 0x8B52
-#define GL_INT_VEC2 0x8B53
-#define GL_INT_VEC3 0x8B54
-#define GL_INT_VEC4 0x8B55
-#define GL_BOOL 0x8B56
-#define GL_BOOL_VEC2 0x8B57
-#define GL_BOOL_VEC3 0x8B58
-#define GL_BOOL_VEC4 0x8B59
-#define GL_FLOAT_MAT2 0x8B5A
-#define GL_FLOAT_MAT3 0x8B5B
-#define GL_FLOAT_MAT4 0x8B5C
-#define GL_SAMPLER_2D 0x8B5E
-#define GL_SAMPLER_CUBE 0x8B60
-#define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622
-#define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623
-#define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624
-#define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625
-#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A
-#define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645
-#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F
-#define GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A
-#define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B
-#define GL_COMPILE_STATUS 0x8B81
-#define GL_INFO_LOG_LENGTH 0x8B84
-#define GL_SHADER_SOURCE_LENGTH 0x8B88
-#define GL_SHADER_COMPILER 0x8DFA
-#define GL_SHADER_BINARY_FORMATS 0x8DF8
-#define GL_NUM_SHADER_BINARY_FORMATS 0x8DF9
-#define GL_LOW_FLOAT 0x8DF0
-#define GL_MEDIUM_FLOAT 0x8DF1
-#define GL_HIGH_FLOAT 0x8DF2
-#define GL_LOW_INT 0x8DF3
-#define GL_MEDIUM_INT 0x8DF4
-#define GL_HIGH_INT 0x8DF5
-#define GL_FRAMEBUFFER 0x8D40
-#define GL_RENDERBUFFER 0x8D41
-#define GL_RGBA4 0x8056
-#define GL_RGB5_A1 0x8057
-#define GL_RGB565 0x8D62
-#define GL_DEPTH_COMPONENT16 0x81A5
-#define GL_STENCIL_INDEX8 0x8D48
-#define GL_RENDERBUFFER_WIDTH 0x8D42
-#define GL_RENDERBUFFER_HEIGHT 0x8D43
-#define GL_RENDERBUFFER_INTERNAL_FORMAT 0x8D44
-#define GL_RENDERBUFFER_RED_SIZE 0x8D50
-#define GL_RENDERBUFFER_GREEN_SIZE 0x8D51
-#define GL_RENDERBUFFER_BLUE_SIZE 0x8D52
-#define GL_RENDERBUFFER_ALPHA_SIZE 0x8D53
-#define GL_RENDERBUFFER_DEPTH_SIZE 0x8D54
-#define GL_RENDERBUFFER_STENCIL_SIZE 0x8D55
-#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0
-#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1
-#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2
-#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3
-#define GL_COLOR_ATTACHMENT0 0x8CE0
-#define GL_DEPTH_ATTACHMENT 0x8D00
-#define GL_STENCIL_ATTACHMENT 0x8D20
-#define GL_NONE 0
-#define GL_FRAMEBUFFER_COMPLETE 0x8CD5
-#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6
-#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7
-#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS 0x8CD9
-#define GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD
-#define GL_FRAMEBUFFER_BINDING 0x8CA6
-#define GL_RENDERBUFFER_BINDING 0x8CA7
-#define GL_MAX_RENDERBUFFER_SIZE 0x84E8
-#define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506
-GL_APICALL void GL_APIENTRY glActiveTexture (GLenum texture);
-GL_APICALL void GL_APIENTRY glAttachShader (GLuint program, GLuint shader);
-GL_APICALL void GL_APIENTRY glBindAttribLocation (GLuint program, GLuint index, const GLchar *name);
-GL_APICALL void GL_APIENTRY glBindBuffer (GLenum target, GLuint buffer);
-GL_APICALL void GL_APIENTRY glBindFramebuffer (GLenum target, GLuint framebuffer);
-GL_APICALL void GL_APIENTRY glBindRenderbuffer (GLenum target, GLuint renderbuffer);
-GL_APICALL void GL_APIENTRY glBindTexture (GLenum target, GLuint texture);
-GL_APICALL void GL_APIENTRY glBlendColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
-GL_APICALL void GL_APIENTRY glBlendEquation (GLenum mode);
-GL_APICALL void GL_APIENTRY glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha);
-GL_APICALL void GL_APIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor);
-GL_APICALL void GL_APIENTRY glBlendFuncSeparate (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
-GL_APICALL void GL_APIENTRY glBufferData (GLenum target, GLsizeiptr size, const void *data, GLenum usage);
-GL_APICALL void GL_APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const void *data);
-GL_APICALL GLenum GL_APIENTRY glCheckFramebufferStatus (GLenum target);
-GL_APICALL void GL_APIENTRY glClear (GLbitfield mask);
-GL_APICALL void GL_APIENTRY glClearColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
-GL_APICALL void GL_APIENTRY glClearDepthf (GLfloat d);
-GL_APICALL void GL_APIENTRY glClearStencil (GLint s);
-GL_APICALL void GL_APIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
-GL_APICALL void GL_APIENTRY glCompileShader (GLuint shader);
-GL_APICALL void GL_APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data);
-GL_APICALL void GL_APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data);
-GL_APICALL void GL_APIENTRY glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
-GL_APICALL void GL_APIENTRY glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
-GL_APICALL GLuint GL_APIENTRY glCreateProgram (void);
-GL_APICALL GLuint GL_APIENTRY glCreateShader (GLenum type);
-GL_APICALL void GL_APIENTRY glCullFace (GLenum mode);
-GL_APICALL void GL_APIENTRY glDeleteBuffers (GLsizei n, const GLuint *buffers);
-GL_APICALL void GL_APIENTRY glDeleteFramebuffers (GLsizei n, const GLuint *framebuffers);
-GL_APICALL void GL_APIENTRY glDeleteProgram (GLuint program);
-GL_APICALL void GL_APIENTRY glDeleteRenderbuffers (GLsizei n, const GLuint *renderbuffers);
-GL_APICALL void GL_APIENTRY glDeleteShader (GLuint shader);
-GL_APICALL void GL_APIENTRY glDeleteTextures (GLsizei n, const GLuint *textures);
-GL_APICALL void GL_APIENTRY glDepthFunc (GLenum func);
-GL_APICALL void GL_APIENTRY glDepthMask (GLboolean flag);
-GL_APICALL void GL_APIENTRY glDepthRangef (GLfloat n, GLfloat f);
-GL_APICALL void GL_APIENTRY glDetachShader (GLuint program, GLuint shader);
-GL_APICALL void GL_APIENTRY glDisable (GLenum cap);
-GL_APICALL void GL_APIENTRY glDisableVertexAttribArray (GLuint index);
-GL_APICALL void GL_APIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count);
-GL_APICALL void GL_APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const void *indices);
-GL_APICALL void GL_APIENTRY glEnable (GLenum cap);
-GL_APICALL void GL_APIENTRY glEnableVertexAttribArray (GLuint index);
-GL_APICALL void GL_APIENTRY glFinish (void);
-GL_APICALL void GL_APIENTRY glFlush (void);
-GL_APICALL void GL_APIENTRY glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
-GL_APICALL void GL_APIENTRY glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
-GL_APICALL void GL_APIENTRY glFrontFace (GLenum mode);
-GL_APICALL void GL_APIENTRY glGenBuffers (GLsizei n, GLuint *buffers);
-GL_APICALL void GL_APIENTRY glGenerateMipmap (GLenum target);
-GL_APICALL void GL_APIENTRY glGenFramebuffers (GLsizei n, GLuint *framebuffers);
-GL_APICALL void GL_APIENTRY glGenRenderbuffers (GLsizei n, GLuint *renderbuffers);
-GL_APICALL void GL_APIENTRY glGenTextures (GLsizei n, GLuint *textures);
-GL_APICALL void GL_APIENTRY glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
-GL_APICALL void GL_APIENTRY glGetActiveUniform (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
-GL_APICALL void GL_APIENTRY glGetAttachedShaders (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders);
-GL_APICALL GLint GL_APIENTRY glGetAttribLocation (GLuint program, const GLchar *name);
-GL_APICALL void GL_APIENTRY glGetBooleanv (GLenum pname, GLboolean *data);
-GL_APICALL void GL_APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint *params);
-GL_APICALL GLenum GL_APIENTRY glGetError (void);
-GL_APICALL void GL_APIENTRY glGetFloatv (GLenum pname, GLfloat *data);
-GL_APICALL void GL_APIENTRY glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint *params);
-GL_APICALL void GL_APIENTRY glGetIntegerv (GLenum pname, GLint *data);
-GL_APICALL void GL_APIENTRY glGetProgramiv (GLuint program, GLenum pname, GLint *params);
-GL_APICALL void GL_APIENTRY glGetProgramInfoLog (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
-GL_APICALL void GL_APIENTRY glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint *params);
-GL_APICALL void GL_APIENTRY glGetShaderiv (GLuint shader, GLenum pname, GLint *params);
-GL_APICALL void GL_APIENTRY glGetShaderInfoLog (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
-GL_APICALL void GL_APIENTRY glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision);
-GL_APICALL void GL_APIENTRY glGetShaderSource (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source);
-GL_APICALL const GLubyte *GL_APIENTRY glGetString (GLenum name);
-GL_APICALL void GL_APIENTRY glGetTexParameterfv (GLenum target, GLenum pname, GLfloat *params);
-GL_APICALL void GL_APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, GLint *params);
-GL_APICALL void GL_APIENTRY glGetUniformfv (GLuint program, GLint location, GLfloat *params);
-GL_APICALL void GL_APIENTRY glGetUniformiv (GLuint program, GLint location, GLint *params);
-GL_APICALL GLint GL_APIENTRY glGetUniformLocation (GLuint program, const GLchar *name);
-GL_APICALL void GL_APIENTRY glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat *params);
-GL_APICALL void GL_APIENTRY glGetVertexAttribiv (GLuint index, GLenum pname, GLint *params);
-GL_APICALL void GL_APIENTRY glGetVertexAttribPointerv (GLuint index, GLenum pname, void **pointer);
-GL_APICALL void GL_APIENTRY glHint (GLenum target, GLenum mode);
-GL_APICALL GLboolean GL_APIENTRY glIsBuffer (GLuint buffer);
-GL_APICALL GLboolean GL_APIENTRY glIsEnabled (GLenum cap);
-GL_APICALL GLboolean GL_APIENTRY glIsFramebuffer (GLuint framebuffer);
-GL_APICALL GLboolean GL_APIENTRY glIsProgram (GLuint program);
-GL_APICALL GLboolean GL_APIENTRY glIsRenderbuffer (GLuint renderbuffer);
-GL_APICALL GLboolean GL_APIENTRY glIsShader (GLuint shader);
-GL_APICALL GLboolean GL_APIENTRY glIsTexture (GLuint texture);
-GL_APICALL void GL_APIENTRY glLineWidth (GLfloat width);
-GL_APICALL void GL_APIENTRY glLinkProgram (GLuint program);
-GL_APICALL void GL_APIENTRY glPixelStorei (GLenum pname, GLint param);
-GL_APICALL void GL_APIENTRY glPolygonOffset (GLfloat factor, GLfloat units);
-GL_APICALL void GL_APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels);
-GL_APICALL void GL_APIENTRY glReleaseShaderCompiler (void);
-GL_APICALL void GL_APIENTRY glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
-GL_APICALL void GL_APIENTRY glSampleCoverage (GLfloat value, GLboolean invert);
-GL_APICALL void GL_APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height);
-GL_APICALL void GL_APIENTRY glShaderBinary (GLsizei count, const GLuint *shaders, GLenum binaryformat, const void *binary, GLsizei length);
-GL_APICALL void GL_APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length);
-GL_APICALL void GL_APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask);
-GL_APICALL void GL_APIENTRY glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask);
-GL_APICALL void GL_APIENTRY glStencilMask (GLuint mask);
-GL_APICALL void GL_APIENTRY glStencilMaskSeparate (GLenum face, GLuint mask);
-GL_APICALL void GL_APIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass);
-GL_APICALL void GL_APIENTRY glStencilOpSeparate (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
-GL_APICALL void GL_APIENTRY glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels);
-GL_APICALL void GL_APIENTRY glTexParameterf (GLenum target, GLenum pname, GLfloat param);
-GL_APICALL void GL_APIENTRY glTexParameterfv (GLenum target, GLenum pname, const GLfloat *params);
-GL_APICALL void GL_APIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param);
-GL_APICALL void GL_APIENTRY glTexParameteriv (GLenum target, GLenum pname, const GLint *params);
-GL_APICALL void GL_APIENTRY glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);
-GL_APICALL void GL_APIENTRY glUniform1f (GLint location, GLfloat v0);
-GL_APICALL void GL_APIENTRY glUniform1fv (GLint location, GLsizei count, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glUniform1i (GLint location, GLint v0);
-GL_APICALL void GL_APIENTRY glUniform1iv (GLint location, GLsizei count, const GLint *value);
-GL_APICALL void GL_APIENTRY glUniform2f (GLint location, GLfloat v0, GLfloat v1);
-GL_APICALL void GL_APIENTRY glUniform2fv (GLint location, GLsizei count, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glUniform2i (GLint location, GLint v0, GLint v1);
-GL_APICALL void GL_APIENTRY glUniform2iv (GLint location, GLsizei count, const GLint *value);
-GL_APICALL void GL_APIENTRY glUniform3f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
-GL_APICALL void GL_APIENTRY glUniform3fv (GLint location, GLsizei count, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glUniform3i (GLint location, GLint v0, GLint v1, GLint v2);
-GL_APICALL void GL_APIENTRY glUniform3iv (GLint location, GLsizei count, const GLint *value);
-GL_APICALL void GL_APIENTRY glUniform4f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
-GL_APICALL void GL_APIENTRY glUniform4fv (GLint location, GLsizei count, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glUniform4i (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
-GL_APICALL void GL_APIENTRY glUniform4iv (GLint location, GLsizei count, const GLint *value);
-GL_APICALL void GL_APIENTRY glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glUseProgram (GLuint program);
-GL_APICALL void GL_APIENTRY glValidateProgram (GLuint program);
-GL_APICALL void GL_APIENTRY glVertexAttrib1f (GLuint index, GLfloat x);
-GL_APICALL void GL_APIENTRY glVertexAttrib1fv (GLuint index, const GLfloat *v);
-GL_APICALL void GL_APIENTRY glVertexAttrib2f (GLuint index, GLfloat x, GLfloat y);
-GL_APICALL void GL_APIENTRY glVertexAttrib2fv (GLuint index, const GLfloat *v);
-GL_APICALL void GL_APIENTRY glVertexAttrib3f (GLuint index, GLfloat x, GLfloat y, GLfloat z);
-GL_APICALL void GL_APIENTRY glVertexAttrib3fv (GLuint index, const GLfloat *v);
-GL_APICALL void GL_APIENTRY glVertexAttrib4f (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-GL_APICALL void GL_APIENTRY glVertexAttrib4fv (GLuint index, const GLfloat *v);
-GL_APICALL void GL_APIENTRY glVertexAttribPointer (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer);
-GL_APICALL void GL_APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height);
-#endif /* GL_ES_VERSION_2_0 */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/external/khronos/GLES2/gl2ext.h b/external/khronos/GLES2/gl2ext.h
deleted file mode 100644
index 7bf38d66e..000000000
--- a/external/khronos/GLES2/gl2ext.h
+++ /dev/null
@@ -1,2448 +0,0 @@
-#ifndef __gl2ext_h_
-#define __gl2ext_h_ 1
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
-** Copyright (c) 2013-2014 The Khronos Group Inc.
-**
-** Permission is hereby granted, free of charge, to any person obtaining a
-** copy of this software and/or associated documentation files (the
-** "Materials"), to deal in the Materials without restriction, including
-** without limitation the rights to use, copy, modify, merge, publish,
-** distribute, sublicense, and/or sell copies of the Materials, and to
-** permit persons to whom the Materials are furnished to do so, subject to
-** the following conditions:
-**
-** The above copyright notice and this permission notice shall be included
-** in all copies or substantial portions of the Materials.
-**
-** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
-*/
-/*
-** This header is generated from the Khronos OpenGL / OpenGL ES XML
-** API Registry. The current version of the Registry, generator scripts
-** used to make the header, and the header can be found at
-** http://www.opengl.org/registry/
-**
-** Khronos $Revision$ on $Date$
-*/
-
-#ifndef GL_APIENTRYP
-#define GL_APIENTRYP GL_APIENTRY*
-#endif
-
-/* Generated on date 20141204 */
-
-/* Generated C header for:
- * API: gles2
- * Profile: common
- * Versions considered: 2\.[0-9]
- * Versions emitted: _nomatch_^
- * Default extensions included: gles2
- * Additional extensions included: _nomatch_^
- * Extensions removed: _nomatch_^
- */
-
-#ifndef GL_KHR_blend_equation_advanced
-#define GL_KHR_blend_equation_advanced 1
-#define GL_MULTIPLY_KHR 0x9294
-#define GL_SCREEN_KHR 0x9295
-#define GL_OVERLAY_KHR 0x9296
-#define GL_DARKEN_KHR 0x9297
-#define GL_LIGHTEN_KHR 0x9298
-#define GL_COLORDODGE_KHR 0x9299
-#define GL_COLORBURN_KHR 0x929A
-#define GL_HARDLIGHT_KHR 0x929B
-#define GL_SOFTLIGHT_KHR 0x929C
-#define GL_DIFFERENCE_KHR 0x929E
-#define GL_EXCLUSION_KHR 0x92A0
-#define GL_HSL_HUE_KHR 0x92AD
-#define GL_HSL_SATURATION_KHR 0x92AE
-#define GL_HSL_COLOR_KHR 0x92AF
-#define GL_HSL_LUMINOSITY_KHR 0x92B0
-typedef void (GL_APIENTRYP PFNGLBLENDBARRIERKHRPROC) (void);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glBlendBarrierKHR (void);
-#endif
-#endif /* GL_KHR_blend_equation_advanced */
-
-#ifndef GL_KHR_blend_equation_advanced_coherent
-#define GL_KHR_blend_equation_advanced_coherent 1
-#define GL_BLEND_ADVANCED_COHERENT_KHR 0x9285
-#endif /* GL_KHR_blend_equation_advanced_coherent */
-
-#ifndef GL_KHR_context_flush_control
-#define GL_KHR_context_flush_control 1
-#define GL_CONTEXT_RELEASE_BEHAVIOR_KHR 0x82FB
-#define GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH_KHR 0x82FC
-#endif /* GL_KHR_context_flush_control */
-
-#ifndef GL_KHR_debug
-#define GL_KHR_debug 1
-typedef void (GL_APIENTRY *GLDEBUGPROCKHR)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam);
-#define GL_SAMPLER 0x82E6
-#define GL_DEBUG_OUTPUT_SYNCHRONOUS_KHR 0x8242
-#define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_KHR 0x8243
-#define GL_DEBUG_CALLBACK_FUNCTION_KHR 0x8244
-#define GL_DEBUG_CALLBACK_USER_PARAM_KHR 0x8245
-#define GL_DEBUG_SOURCE_API_KHR 0x8246
-#define GL_DEBUG_SOURCE_WINDOW_SYSTEM_KHR 0x8247
-#define GL_DEBUG_SOURCE_SHADER_COMPILER_KHR 0x8248
-#define GL_DEBUG_SOURCE_THIRD_PARTY_KHR 0x8249
-#define GL_DEBUG_SOURCE_APPLICATION_KHR 0x824A
-#define GL_DEBUG_SOURCE_OTHER_KHR 0x824B
-#define GL_DEBUG_TYPE_ERROR_KHR 0x824C
-#define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_KHR 0x824D
-#define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_KHR 0x824E
-#define GL_DEBUG_TYPE_PORTABILITY_KHR 0x824F
-#define GL_DEBUG_TYPE_PERFORMANCE_KHR 0x8250
-#define GL_DEBUG_TYPE_OTHER_KHR 0x8251
-#define GL_DEBUG_TYPE_MARKER_KHR 0x8268
-#define GL_DEBUG_TYPE_PUSH_GROUP_KHR 0x8269
-#define GL_DEBUG_TYPE_POP_GROUP_KHR 0x826A
-#define GL_DEBUG_SEVERITY_NOTIFICATION_KHR 0x826B
-#define GL_MAX_DEBUG_GROUP_STACK_DEPTH_KHR 0x826C
-#define GL_DEBUG_GROUP_STACK_DEPTH_KHR 0x826D
-#define GL_BUFFER_KHR 0x82E0
-#define GL_SHADER_KHR 0x82E1
-#define GL_PROGRAM_KHR 0x82E2
-#define GL_VERTEX_ARRAY_KHR 0x8074
-#define GL_QUERY_KHR 0x82E3
-#define GL_SAMPLER_KHR 0x82E6
-#define GL_MAX_LABEL_LENGTH_KHR 0x82E8
-#define GL_MAX_DEBUG_MESSAGE_LENGTH_KHR 0x9143
-#define GL_MAX_DEBUG_LOGGED_MESSAGES_KHR 0x9144
-#define GL_DEBUG_LOGGED_MESSAGES_KHR 0x9145
-#define GL_DEBUG_SEVERITY_HIGH_KHR 0x9146
-#define GL_DEBUG_SEVERITY_MEDIUM_KHR 0x9147
-#define GL_DEBUG_SEVERITY_LOW_KHR 0x9148
-#define GL_DEBUG_OUTPUT_KHR 0x92E0
-#define GL_CONTEXT_FLAG_DEBUG_BIT_KHR 0x00000002
-#define GL_STACK_OVERFLOW_KHR 0x0503
-#define GL_STACK_UNDERFLOW_KHR 0x0504
-typedef void (GL_APIENTRYP PFNGLDEBUGMESSAGECONTROLKHRPROC) (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);
-typedef void (GL_APIENTRYP PFNGLDEBUGMESSAGEINSERTKHRPROC) (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);
-typedef void (GL_APIENTRYP PFNGLDEBUGMESSAGECALLBACKKHRPROC) (GLDEBUGPROCKHR callback, const void *userParam);
-typedef GLuint (GL_APIENTRYP PFNGLGETDEBUGMESSAGELOGKHRPROC) (GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);
-typedef void (GL_APIENTRYP PFNGLPUSHDEBUGGROUPKHRPROC) (GLenum source, GLuint id, GLsizei length, const GLchar *message);
-typedef void (GL_APIENTRYP PFNGLPOPDEBUGGROUPKHRPROC) (void);
-typedef void (GL_APIENTRYP PFNGLOBJECTLABELKHRPROC) (GLenum identifier, GLuint name, GLsizei length, const GLchar *label);
-typedef void (GL_APIENTRYP PFNGLGETOBJECTLABELKHRPROC) (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label);
-typedef void (GL_APIENTRYP PFNGLOBJECTPTRLABELKHRPROC) (const void *ptr, GLsizei length, const GLchar *label);
-typedef void (GL_APIENTRYP PFNGLGETOBJECTPTRLABELKHRPROC) (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label);
-typedef void (GL_APIENTRYP PFNGLGETPOINTERVKHRPROC) (GLenum pname, void **params);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glDebugMessageControlKHR (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);
-GL_APICALL void GL_APIENTRY glDebugMessageInsertKHR (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);
-GL_APICALL void GL_APIENTRY glDebugMessageCallbackKHR (GLDEBUGPROCKHR callback, const void *userParam);
-GL_APICALL GLuint GL_APIENTRY glGetDebugMessageLogKHR (GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);
-GL_APICALL void GL_APIENTRY glPushDebugGroupKHR (GLenum source, GLuint id, GLsizei length, const GLchar *message);
-GL_APICALL void GL_APIENTRY glPopDebugGroupKHR (void);
-GL_APICALL void GL_APIENTRY glObjectLabelKHR (GLenum identifier, GLuint name, GLsizei length, const GLchar *label);
-GL_APICALL void GL_APIENTRY glGetObjectLabelKHR (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label);
-GL_APICALL void GL_APIENTRY glObjectPtrLabelKHR (const void *ptr, GLsizei length, const GLchar *label);
-GL_APICALL void GL_APIENTRY glGetObjectPtrLabelKHR (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label);
-GL_APICALL void GL_APIENTRY glGetPointervKHR (GLenum pname, void **params);
-#endif
-#endif /* GL_KHR_debug */
-
-#ifndef GL_KHR_robust_buffer_access_behavior
-#define GL_KHR_robust_buffer_access_behavior 1
-#endif /* GL_KHR_robust_buffer_access_behavior */
-
-#ifndef GL_KHR_robustness
-#define GL_KHR_robustness 1
-#define GL_CONTEXT_ROBUST_ACCESS_KHR 0x90F3
-#define GL_LOSE_CONTEXT_ON_RESET_KHR 0x8252
-#define GL_GUILTY_CONTEXT_RESET_KHR 0x8253
-#define GL_INNOCENT_CONTEXT_RESET_KHR 0x8254
-#define GL_UNKNOWN_CONTEXT_RESET_KHR 0x8255
-#define GL_RESET_NOTIFICATION_STRATEGY_KHR 0x8256
-#define GL_NO_RESET_NOTIFICATION_KHR 0x8261
-#define GL_CONTEXT_LOST_KHR 0x0507
-typedef GLenum (GL_APIENTRYP PFNGLGETGRAPHICSRESETSTATUSKHRPROC) (void);
-typedef void (GL_APIENTRYP PFNGLREADNPIXELSKHRPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data);
-typedef void (GL_APIENTRYP PFNGLGETNUNIFORMFVKHRPROC) (GLuint program, GLint location, GLsizei bufSize, GLfloat *params);
-typedef void (GL_APIENTRYP PFNGLGETNUNIFORMIVKHRPROC) (GLuint program, GLint location, GLsizei bufSize, GLint *params);
-typedef void (GL_APIENTRYP PFNGLGETNUNIFORMUIVKHRPROC) (GLuint program, GLint location, GLsizei bufSize, GLuint *params);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL GLenum GL_APIENTRY glGetGraphicsResetStatusKHR (void);
-GL_APICALL void GL_APIENTRY glReadnPixelsKHR (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data);
-GL_APICALL void GL_APIENTRY glGetnUniformfvKHR (GLuint program, GLint location, GLsizei bufSize, GLfloat *params);
-GL_APICALL void GL_APIENTRY glGetnUniformivKHR (GLuint program, GLint location, GLsizei bufSize, GLint *params);
-GL_APICALL void GL_APIENTRY glGetnUniformuivKHR (GLuint program, GLint location, GLsizei bufSize, GLuint *params);
-#endif
-#endif /* GL_KHR_robustness */
-
-#ifndef GL_KHR_texture_compression_astc_hdr
-#define GL_KHR_texture_compression_astc_hdr 1
-#define GL_COMPRESSED_RGBA_ASTC_4x4_KHR 0x93B0
-#define GL_COMPRESSED_RGBA_ASTC_5x4_KHR 0x93B1
-#define GL_COMPRESSED_RGBA_ASTC_5x5_KHR 0x93B2
-#define GL_COMPRESSED_RGBA_ASTC_6x5_KHR 0x93B3
-#define GL_COMPRESSED_RGBA_ASTC_6x6_KHR 0x93B4
-#define GL_COMPRESSED_RGBA_ASTC_8x5_KHR 0x93B5
-#define GL_COMPRESSED_RGBA_ASTC_8x6_KHR 0x93B6
-#define GL_COMPRESSED_RGBA_ASTC_8x8_KHR 0x93B7
-#define GL_COMPRESSED_RGBA_ASTC_10x5_KHR 0x93B8
-#define GL_COMPRESSED_RGBA_ASTC_10x6_KHR 0x93B9
-#define GL_COMPRESSED_RGBA_ASTC_10x8_KHR 0x93BA
-#define GL_COMPRESSED_RGBA_ASTC_10x10_KHR 0x93BB
-#define GL_COMPRESSED_RGBA_ASTC_12x10_KHR 0x93BC
-#define GL_COMPRESSED_RGBA_ASTC_12x12_KHR 0x93BD
-#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR 0x93D0
-#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR 0x93D1
-#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR 0x93D2
-#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR 0x93D3
-#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR 0x93D4
-#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR 0x93D5
-#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR 0x93D6
-#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR 0x93D7
-#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR 0x93D8
-#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR 0x93D9
-#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR 0x93DA
-#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR 0x93DB
-#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR 0x93DC
-#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR 0x93DD
-#endif /* GL_KHR_texture_compression_astc_hdr */
-
-#ifndef GL_KHR_texture_compression_astc_ldr
-#define GL_KHR_texture_compression_astc_ldr 1
-#endif /* GL_KHR_texture_compression_astc_ldr */
-
-#ifndef GL_OES_EGL_image
-#define GL_OES_EGL_image 1
-typedef void *GLeglImageOES;
-typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) (GLenum target, GLeglImageOES image);
-typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLeglImageOES image);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glEGLImageTargetTexture2DOES (GLenum target, GLeglImageOES image);
-GL_APICALL void GL_APIENTRY glEGLImageTargetRenderbufferStorageOES (GLenum target, GLeglImageOES image);
-#endif
-#endif /* GL_OES_EGL_image */
-
-#ifndef GL_OES_EGL_image_external
-#define GL_OES_EGL_image_external 1
-#define GL_TEXTURE_EXTERNAL_OES 0x8D65
-#define GL_TEXTURE_BINDING_EXTERNAL_OES 0x8D67
-#define GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES 0x8D68
-#define GL_SAMPLER_EXTERNAL_OES 0x8D66
-#endif /* GL_OES_EGL_image_external */
-
-#ifndef GL_OES_compressed_ETC1_RGB8_sub_texture
-#define GL_OES_compressed_ETC1_RGB8_sub_texture 1
-#endif /* GL_OES_compressed_ETC1_RGB8_sub_texture */
-
-#ifndef GL_OES_compressed_ETC1_RGB8_texture
-#define GL_OES_compressed_ETC1_RGB8_texture 1
-#define GL_ETC1_RGB8_OES 0x8D64
-#endif /* GL_OES_compressed_ETC1_RGB8_texture */
-
-#ifndef GL_OES_compressed_paletted_texture
-#define GL_OES_compressed_paletted_texture 1
-#define GL_PALETTE4_RGB8_OES 0x8B90
-#define GL_PALETTE4_RGBA8_OES 0x8B91
-#define GL_PALETTE4_R5_G6_B5_OES 0x8B92
-#define GL_PALETTE4_RGBA4_OES 0x8B93
-#define GL_PALETTE4_RGB5_A1_OES 0x8B94
-#define GL_PALETTE8_RGB8_OES 0x8B95
-#define GL_PALETTE8_RGBA8_OES 0x8B96
-#define GL_PALETTE8_R5_G6_B5_OES 0x8B97
-#define GL_PALETTE8_RGBA4_OES 0x8B98
-#define GL_PALETTE8_RGB5_A1_OES 0x8B99
-#endif /* GL_OES_compressed_paletted_texture */
-
-#ifndef GL_OES_depth24
-#define GL_OES_depth24 1
-#define GL_DEPTH_COMPONENT24_OES 0x81A6
-#endif /* GL_OES_depth24 */
-
-#ifndef GL_OES_depth32
-#define GL_OES_depth32 1
-#define GL_DEPTH_COMPONENT32_OES 0x81A7
-#endif /* GL_OES_depth32 */
-
-#ifndef GL_OES_depth_texture
-#define GL_OES_depth_texture 1
-#endif /* GL_OES_depth_texture */
-
-#ifndef GL_OES_element_index_uint
-#define GL_OES_element_index_uint 1
-#endif /* GL_OES_element_index_uint */
-
-#ifndef GL_OES_fbo_render_mipmap
-#define GL_OES_fbo_render_mipmap 1
-#endif /* GL_OES_fbo_render_mipmap */
-
-#ifndef GL_OES_fragment_precision_high
-#define GL_OES_fragment_precision_high 1
-#endif /* GL_OES_fragment_precision_high */
-
-#ifndef GL_OES_get_program_binary
-#define GL_OES_get_program_binary 1
-#define GL_PROGRAM_BINARY_LENGTH_OES 0x8741
-#define GL_NUM_PROGRAM_BINARY_FORMATS_OES 0x87FE
-#define GL_PROGRAM_BINARY_FORMATS_OES 0x87FF
-typedef void (GL_APIENTRYP PFNGLGETPROGRAMBINARYOESPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary);
-typedef void (GL_APIENTRYP PFNGLPROGRAMBINARYOESPROC) (GLuint program, GLenum binaryFormat, const void *binary, GLint length);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glGetProgramBinaryOES (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary);
-GL_APICALL void GL_APIENTRY glProgramBinaryOES (GLuint program, GLenum binaryFormat, const void *binary, GLint length);
-#endif
-#endif /* GL_OES_get_program_binary */
-
-#ifndef GL_OES_mapbuffer
-#define GL_OES_mapbuffer 1
-#define GL_WRITE_ONLY_OES 0x88B9
-#define GL_BUFFER_ACCESS_OES 0x88BB
-#define GL_BUFFER_MAPPED_OES 0x88BC
-#define GL_BUFFER_MAP_POINTER_OES 0x88BD
-typedef void *(GL_APIENTRYP PFNGLMAPBUFFEROESPROC) (GLenum target, GLenum access);
-typedef GLboolean (GL_APIENTRYP PFNGLUNMAPBUFFEROESPROC) (GLenum target);
-typedef void (GL_APIENTRYP PFNGLGETBUFFERPOINTERVOESPROC) (GLenum target, GLenum pname, void **params);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void *GL_APIENTRY glMapBufferOES (GLenum target, GLenum access);
-GL_APICALL GLboolean GL_APIENTRY glUnmapBufferOES (GLenum target);
-GL_APICALL void GL_APIENTRY glGetBufferPointervOES (GLenum target, GLenum pname, void **params);
-#endif
-#endif /* GL_OES_mapbuffer */
-
-#ifndef GL_OES_packed_depth_stencil
-#define GL_OES_packed_depth_stencil 1
-#define GL_DEPTH_STENCIL_OES 0x84F9
-#define GL_UNSIGNED_INT_24_8_OES 0x84FA
-#define GL_DEPTH24_STENCIL8_OES 0x88F0
-#endif /* GL_OES_packed_depth_stencil */
-
-#ifndef GL_OES_required_internalformat
-#define GL_OES_required_internalformat 1
-#define GL_ALPHA8_OES 0x803C
-#define GL_DEPTH_COMPONENT16_OES 0x81A5
-#define GL_LUMINANCE4_ALPHA4_OES 0x8043
-#define GL_LUMINANCE8_ALPHA8_OES 0x8045
-#define GL_LUMINANCE8_OES 0x8040
-#define GL_RGBA4_OES 0x8056
-#define GL_RGB5_A1_OES 0x8057
-#define GL_RGB565_OES 0x8D62
-#define GL_RGB8_OES 0x8051
-#define GL_RGBA8_OES 0x8058
-#define GL_RGB10_EXT 0x8052
-#define GL_RGB10_A2_EXT 0x8059
-#endif /* GL_OES_required_internalformat */
-
-#ifndef GL_OES_rgb8_rgba8
-#define GL_OES_rgb8_rgba8 1
-#endif /* GL_OES_rgb8_rgba8 */
-
-#ifndef GL_OES_sample_shading
-#define GL_OES_sample_shading 1
-#define GL_SAMPLE_SHADING_OES 0x8C36
-#define GL_MIN_SAMPLE_SHADING_VALUE_OES 0x8C37
-typedef void (GL_APIENTRYP PFNGLMINSAMPLESHADINGOESPROC) (GLfloat value);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glMinSampleShadingOES (GLfloat value);
-#endif
-#endif /* GL_OES_sample_shading */
-
-#ifndef GL_OES_sample_variables
-#define GL_OES_sample_variables 1
-#endif /* GL_OES_sample_variables */
-
-#ifndef GL_OES_shader_image_atomic
-#define GL_OES_shader_image_atomic 1
-#endif /* GL_OES_shader_image_atomic */
-
-#ifndef GL_OES_shader_multisample_interpolation
-#define GL_OES_shader_multisample_interpolation 1
-#define GL_MIN_FRAGMENT_INTERPOLATION_OFFSET_OES 0x8E5B
-#define GL_MAX_FRAGMENT_INTERPOLATION_OFFSET_OES 0x8E5C
-#define GL_FRAGMENT_INTERPOLATION_OFFSET_BITS_OES 0x8E5D
-#endif /* GL_OES_shader_multisample_interpolation */
-
-#ifndef GL_OES_standard_derivatives
-#define GL_OES_standard_derivatives 1
-#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES 0x8B8B
-#endif /* GL_OES_standard_derivatives */
-
-#ifndef GL_OES_stencil1
-#define GL_OES_stencil1 1
-#define GL_STENCIL_INDEX1_OES 0x8D46
-#endif /* GL_OES_stencil1 */
-
-#ifndef GL_OES_stencil4
-#define GL_OES_stencil4 1
-#define GL_STENCIL_INDEX4_OES 0x8D47
-#endif /* GL_OES_stencil4 */
-
-#ifndef GL_OES_surfaceless_context
-#define GL_OES_surfaceless_context 1
-#define GL_FRAMEBUFFER_UNDEFINED_OES 0x8219
-#endif /* GL_OES_surfaceless_context */
-
-#ifndef GL_OES_texture_3D
-#define GL_OES_texture_3D 1
-#define GL_TEXTURE_WRAP_R_OES 0x8072
-#define GL_TEXTURE_3D_OES 0x806F
-#define GL_TEXTURE_BINDING_3D_OES 0x806A
-#define GL_MAX_3D_TEXTURE_SIZE_OES 0x8073
-#define GL_SAMPLER_3D_OES 0x8B5F
-#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_OES 0x8CD4
-typedef void (GL_APIENTRYP PFNGLTEXIMAGE3DOESPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);
-typedef void (GL_APIENTRYP PFNGLTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);
-typedef void (GL_APIENTRYP PFNGLCOPYTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
-typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DOESPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data);
-typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data);
-typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DOESPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glTexImage3DOES (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);
-GL_APICALL void GL_APIENTRY glTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);
-GL_APICALL void GL_APIENTRY glCopyTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
-GL_APICALL void GL_APIENTRY glCompressedTexImage3DOES (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data);
-GL_APICALL void GL_APIENTRY glCompressedTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data);
-GL_APICALL void GL_APIENTRY glFramebufferTexture3DOES (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
-#endif
-#endif /* GL_OES_texture_3D */
-
-#ifndef GL_OES_texture_compression_astc
-#define GL_OES_texture_compression_astc 1
-#define GL_COMPRESSED_RGBA_ASTC_3x3x3_OES 0x93C0
-#define GL_COMPRESSED_RGBA_ASTC_4x3x3_OES 0x93C1
-#define GL_COMPRESSED_RGBA_ASTC_4x4x3_OES 0x93C2
-#define GL_COMPRESSED_RGBA_ASTC_4x4x4_OES 0x93C3
-#define GL_COMPRESSED_RGBA_ASTC_5x4x4_OES 0x93C4
-#define GL_COMPRESSED_RGBA_ASTC_5x5x4_OES 0x93C5
-#define GL_COMPRESSED_RGBA_ASTC_5x5x5_OES 0x93C6
-#define GL_COMPRESSED_RGBA_ASTC_6x5x5_OES 0x93C7
-#define GL_COMPRESSED_RGBA_ASTC_6x6x5_OES 0x93C8
-#define GL_COMPRESSED_RGBA_ASTC_6x6x6_OES 0x93C9
-#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_3x3x3_OES 0x93E0
-#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x3x3_OES 0x93E1
-#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4x3_OES 0x93E2
-#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4x4_OES 0x93E3
-#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4x4_OES 0x93E4
-#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5x4_OES 0x93E5
-#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5x5_OES 0x93E6
-#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5x5_OES 0x93E7
-#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6x5_OES 0x93E8
-#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6x6_OES 0x93E9
-#endif /* GL_OES_texture_compression_astc */
-
-#ifndef GL_OES_texture_float
-#define GL_OES_texture_float 1
-#endif /* GL_OES_texture_float */
-
-#ifndef GL_OES_texture_float_linear
-#define GL_OES_texture_float_linear 1
-#endif /* GL_OES_texture_float_linear */
-
-#ifndef GL_OES_texture_half_float
-#define GL_OES_texture_half_float 1
-#define GL_HALF_FLOAT_OES 0x8D61
-#endif /* GL_OES_texture_half_float */
-
-#ifndef GL_OES_texture_half_float_linear
-#define GL_OES_texture_half_float_linear 1
-#endif /* GL_OES_texture_half_float_linear */
-
-#ifndef GL_OES_texture_npot
-#define GL_OES_texture_npot 1
-#endif /* GL_OES_texture_npot */
-
-#ifndef GL_OES_texture_stencil8
-#define GL_OES_texture_stencil8 1
-#define GL_STENCIL_INDEX_OES 0x1901
-#define GL_STENCIL_INDEX8_OES 0x8D48
-#endif /* GL_OES_texture_stencil8 */
-
-#ifndef GL_OES_texture_storage_multisample_2d_array
-#define GL_OES_texture_storage_multisample_2d_array 1
-#define GL_TEXTURE_2D_MULTISAMPLE_ARRAY_OES 0x9102
-#define GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY_OES 0x9105
-#define GL_SAMPLER_2D_MULTISAMPLE_ARRAY_OES 0x910B
-#define GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY_OES 0x910C
-#define GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY_OES 0x910D
-typedef void (GL_APIENTRYP PFNGLTEXSTORAGE3DMULTISAMPLEOESPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glTexStorage3DMultisampleOES (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
-#endif
-#endif /* GL_OES_texture_storage_multisample_2d_array */
-
-#ifndef GL_OES_vertex_array_object
-#define GL_OES_vertex_array_object 1
-#define GL_VERTEX_ARRAY_BINDING_OES 0x85B5
-typedef void (GL_APIENTRYP PFNGLBINDVERTEXARRAYOESPROC) (GLuint array);
-typedef void (GL_APIENTRYP PFNGLDELETEVERTEXARRAYSOESPROC) (GLsizei n, const GLuint *arrays);
-typedef void (GL_APIENTRYP PFNGLGENVERTEXARRAYSOESPROC) (GLsizei n, GLuint *arrays);
-typedef GLboolean (GL_APIENTRYP PFNGLISVERTEXARRAYOESPROC) (GLuint array);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glBindVertexArrayOES (GLuint array);
-GL_APICALL void GL_APIENTRY glDeleteVertexArraysOES (GLsizei n, const GLuint *arrays);
-GL_APICALL void GL_APIENTRY glGenVertexArraysOES (GLsizei n, GLuint *arrays);
-GL_APICALL GLboolean GL_APIENTRY glIsVertexArrayOES (GLuint array);
-#endif
-#endif /* GL_OES_vertex_array_object */
-
-#ifndef GL_OES_vertex_half_float
-#define GL_OES_vertex_half_float 1
-#endif /* GL_OES_vertex_half_float */
-
-#ifndef GL_OES_vertex_type_10_10_10_2
-#define GL_OES_vertex_type_10_10_10_2 1
-#define GL_UNSIGNED_INT_10_10_10_2_OES 0x8DF6
-#define GL_INT_10_10_10_2_OES 0x8DF7
-#endif /* GL_OES_vertex_type_10_10_10_2 */
-
-#ifndef GL_AMD_compressed_3DC_texture
-#define GL_AMD_compressed_3DC_texture 1
-#define GL_3DC_X_AMD 0x87F9
-#define GL_3DC_XY_AMD 0x87FA
-#endif /* GL_AMD_compressed_3DC_texture */
-
-#ifndef GL_AMD_compressed_ATC_texture
-#define GL_AMD_compressed_ATC_texture 1
-#define GL_ATC_RGB_AMD 0x8C92
-#define GL_ATC_RGBA_EXPLICIT_ALPHA_AMD 0x8C93
-#define GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD 0x87EE
-#endif /* GL_AMD_compressed_ATC_texture */
-
-#ifndef GL_AMD_performance_monitor
-#define GL_AMD_performance_monitor 1
-#define GL_COUNTER_TYPE_AMD 0x8BC0
-#define GL_COUNTER_RANGE_AMD 0x8BC1
-#define GL_UNSIGNED_INT64_AMD 0x8BC2
-#define GL_PERCENTAGE_AMD 0x8BC3
-#define GL_PERFMON_RESULT_AVAILABLE_AMD 0x8BC4
-#define GL_PERFMON_RESULT_SIZE_AMD 0x8BC5
-#define GL_PERFMON_RESULT_AMD 0x8BC6
-typedef void (GL_APIENTRYP PFNGLGETPERFMONITORGROUPSAMDPROC) (GLint *numGroups, GLsizei groupsSize, GLuint *groups);
-typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERSAMDPROC) (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters);
-typedef void (GL_APIENTRYP PFNGLGETPERFMONITORGROUPSTRINGAMDPROC) (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString);
-typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERSTRINGAMDPROC) (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString);
-typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERINFOAMDPROC) (GLuint group, GLuint counter, GLenum pname, void *data);
-typedef void (GL_APIENTRYP PFNGLGENPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors);
-typedef void (GL_APIENTRYP PFNGLDELETEPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors);
-typedef void (GL_APIENTRYP PFNGLSELECTPERFMONITORCOUNTERSAMDPROC) (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *counterList);
-typedef void (GL_APIENTRYP PFNGLBEGINPERFMONITORAMDPROC) (GLuint monitor);
-typedef void (GL_APIENTRYP PFNGLENDPERFMONITORAMDPROC) (GLuint monitor);
-typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERDATAAMDPROC) (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glGetPerfMonitorGroupsAMD (GLint *numGroups, GLsizei groupsSize, GLuint *groups);
-GL_APICALL void GL_APIENTRY glGetPerfMonitorCountersAMD (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters);
-GL_APICALL void GL_APIENTRY glGetPerfMonitorGroupStringAMD (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString);
-GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterStringAMD (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString);
-GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterInfoAMD (GLuint group, GLuint counter, GLenum pname, void *data);
-GL_APICALL void GL_APIENTRY glGenPerfMonitorsAMD (GLsizei n, GLuint *monitors);
-GL_APICALL void GL_APIENTRY glDeletePerfMonitorsAMD (GLsizei n, GLuint *monitors);
-GL_APICALL void GL_APIENTRY glSelectPerfMonitorCountersAMD (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *counterList);
-GL_APICALL void GL_APIENTRY glBeginPerfMonitorAMD (GLuint monitor);
-GL_APICALL void GL_APIENTRY glEndPerfMonitorAMD (GLuint monitor);
-GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterDataAMD (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten);
-#endif
-#endif /* GL_AMD_performance_monitor */
-
-#ifndef GL_AMD_program_binary_Z400
-#define GL_AMD_program_binary_Z400 1
-#define GL_Z400_BINARY_AMD 0x8740
-#endif /* GL_AMD_program_binary_Z400 */
-
-#ifndef GL_ANDROID_extension_pack_es31a
-#define GL_ANDROID_extension_pack_es31a 1
-#endif /* GL_ANDROID_extension_pack_es31a */
-
-#ifndef GL_ANGLE_depth_texture
-#define GL_ANGLE_depth_texture 1
-#endif /* GL_ANGLE_depth_texture */
-
-#ifndef GL_ANGLE_framebuffer_blit
-#define GL_ANGLE_framebuffer_blit 1
-#define GL_READ_FRAMEBUFFER_ANGLE 0x8CA8
-#define GL_DRAW_FRAMEBUFFER_ANGLE 0x8CA9
-#define GL_DRAW_FRAMEBUFFER_BINDING_ANGLE 0x8CA6
-#define GL_READ_FRAMEBUFFER_BINDING_ANGLE 0x8CAA
-typedef void (GL_APIENTRYP PFNGLBLITFRAMEBUFFERANGLEPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glBlitFramebufferANGLE (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
-#endif
-#endif /* GL_ANGLE_framebuffer_blit */
-
-#ifndef GL_ANGLE_framebuffer_multisample
-#define GL_ANGLE_framebuffer_multisample 1
-#define GL_RENDERBUFFER_SAMPLES_ANGLE 0x8CAB
-#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_ANGLE 0x8D56
-#define GL_MAX_SAMPLES_ANGLE 0x8D57
-typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEANGLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleANGLE (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
-#endif
-#endif /* GL_ANGLE_framebuffer_multisample */
-
-#ifndef GL_ANGLE_instanced_arrays
-#define GL_ANGLE_instanced_arrays 1
-#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE 0x88FE
-typedef void (GL_APIENTRYP PFNGLDRAWARRAYSINSTANCEDANGLEPROC) (GLenum mode, GLint first, GLsizei count, GLsizei primcount);
-typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSINSTANCEDANGLEPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount);
-typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBDIVISORANGLEPROC) (GLuint index, GLuint divisor);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glDrawArraysInstancedANGLE (GLenum mode, GLint first, GLsizei count, GLsizei primcount);
-GL_APICALL void GL_APIENTRY glDrawElementsInstancedANGLE (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount);
-GL_APICALL void GL_APIENTRY glVertexAttribDivisorANGLE (GLuint index, GLuint divisor);
-#endif
-#endif /* GL_ANGLE_instanced_arrays */
-
-#ifndef GL_ANGLE_pack_reverse_row_order
-#define GL_ANGLE_pack_reverse_row_order 1
-#define GL_PACK_REVERSE_ROW_ORDER_ANGLE 0x93A4
-#endif /* GL_ANGLE_pack_reverse_row_order */
-
-#ifndef GL_ANGLE_program_binary
-#define GL_ANGLE_program_binary 1
-#define GL_PROGRAM_BINARY_ANGLE 0x93A6
-#endif /* GL_ANGLE_program_binary */
-
-#ifndef GL_ANGLE_texture_compression_dxt3
-#define GL_ANGLE_texture_compression_dxt3 1
-#define GL_COMPRESSED_RGBA_S3TC_DXT3_ANGLE 0x83F2
-#endif /* GL_ANGLE_texture_compression_dxt3 */
-
-#ifndef GL_ANGLE_texture_compression_dxt5
-#define GL_ANGLE_texture_compression_dxt5 1
-#define GL_COMPRESSED_RGBA_S3TC_DXT5_ANGLE 0x83F3
-#endif /* GL_ANGLE_texture_compression_dxt5 */
-
-#ifndef GL_ANGLE_texture_usage
-#define GL_ANGLE_texture_usage 1
-#define GL_TEXTURE_USAGE_ANGLE 0x93A2
-#define GL_FRAMEBUFFER_ATTACHMENT_ANGLE 0x93A3
-#endif /* GL_ANGLE_texture_usage */
-
-#ifndef GL_ANGLE_translated_shader_source
-#define GL_ANGLE_translated_shader_source 1
-#define GL_TRANSLATED_SHADER_SOURCE_LENGTH_ANGLE 0x93A0
-typedef void (GL_APIENTRYP PFNGLGETTRANSLATEDSHADERSOURCEANGLEPROC) (GLuint shader, GLsizei bufsize, GLsizei *length, GLchar *source);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glGetTranslatedShaderSourceANGLE (GLuint shader, GLsizei bufsize, GLsizei *length, GLchar *source);
-#endif
-#endif /* GL_ANGLE_translated_shader_source */
-
-#ifndef GL_APPLE_clip_distance
-#define GL_APPLE_clip_distance 1
-#define GL_MAX_CLIP_DISTANCES_APPLE 0x0D32
-#define GL_CLIP_DISTANCE0_APPLE 0x3000
-#define GL_CLIP_DISTANCE1_APPLE 0x3001
-#define GL_CLIP_DISTANCE2_APPLE 0x3002
-#define GL_CLIP_DISTANCE3_APPLE 0x3003
-#define GL_CLIP_DISTANCE4_APPLE 0x3004
-#define GL_CLIP_DISTANCE5_APPLE 0x3005
-#define GL_CLIP_DISTANCE6_APPLE 0x3006
-#define GL_CLIP_DISTANCE7_APPLE 0x3007
-#endif /* GL_APPLE_clip_distance */
-
-#ifndef GL_APPLE_color_buffer_packed_float
-#define GL_APPLE_color_buffer_packed_float 1
-#endif /* GL_APPLE_color_buffer_packed_float */
-
-#ifndef GL_APPLE_copy_texture_levels
-#define GL_APPLE_copy_texture_levels 1
-typedef void (GL_APIENTRYP PFNGLCOPYTEXTURELEVELSAPPLEPROC) (GLuint destinationTexture, GLuint sourceTexture, GLint sourceBaseLevel, GLsizei sourceLevelCount);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glCopyTextureLevelsAPPLE (GLuint destinationTexture, GLuint sourceTexture, GLint sourceBaseLevel, GLsizei sourceLevelCount);
-#endif
-#endif /* GL_APPLE_copy_texture_levels */
-
-#ifndef GL_APPLE_framebuffer_multisample
-#define GL_APPLE_framebuffer_multisample 1
-#define GL_RENDERBUFFER_SAMPLES_APPLE 0x8CAB
-#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_APPLE 0x8D56
-#define GL_MAX_SAMPLES_APPLE 0x8D57
-#define GL_READ_FRAMEBUFFER_APPLE 0x8CA8
-#define GL_DRAW_FRAMEBUFFER_APPLE 0x8CA9
-#define GL_DRAW_FRAMEBUFFER_BINDING_APPLE 0x8CA6
-#define GL_READ_FRAMEBUFFER_BINDING_APPLE 0x8CAA
-typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEAPPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
-typedef void (GL_APIENTRYP PFNGLRESOLVEMULTISAMPLEFRAMEBUFFERAPPLEPROC) (void);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleAPPLE (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
-GL_APICALL void GL_APIENTRY glResolveMultisampleFramebufferAPPLE (void);
-#endif
-#endif /* GL_APPLE_framebuffer_multisample */
-
-#ifndef GL_APPLE_rgb_422
-#define GL_APPLE_rgb_422 1
-#define GL_RGB_422_APPLE 0x8A1F
-#define GL_UNSIGNED_SHORT_8_8_APPLE 0x85BA
-#define GL_UNSIGNED_SHORT_8_8_REV_APPLE 0x85BB
-#define GL_RGB_RAW_422_APPLE 0x8A51
-#endif /* GL_APPLE_rgb_422 */
-
-#ifndef GL_APPLE_sync
-#define GL_APPLE_sync 1
-#define GL_SYNC_OBJECT_APPLE 0x8A53
-#define GL_MAX_SERVER_WAIT_TIMEOUT_APPLE 0x9111
-#define GL_OBJECT_TYPE_APPLE 0x9112
-#define GL_SYNC_CONDITION_APPLE 0x9113
-#define GL_SYNC_STATUS_APPLE 0x9114
-#define GL_SYNC_FLAGS_APPLE 0x9115
-#define GL_SYNC_FENCE_APPLE 0x9116
-#define GL_SYNC_GPU_COMMANDS_COMPLETE_APPLE 0x9117
-#define GL_UNSIGNALED_APPLE 0x9118
-#define GL_SIGNALED_APPLE 0x9119
-#define GL_ALREADY_SIGNALED_APPLE 0x911A
-#define GL_TIMEOUT_EXPIRED_APPLE 0x911B
-#define GL_CONDITION_SATISFIED_APPLE 0x911C
-#define GL_WAIT_FAILED_APPLE 0x911D
-#define GL_SYNC_FLUSH_COMMANDS_BIT_APPLE 0x00000001
-#define GL_TIMEOUT_IGNORED_APPLE 0xFFFFFFFFFFFFFFFFull
-typedef GLsync (GL_APIENTRYP PFNGLFENCESYNCAPPLEPROC) (GLenum condition, GLbitfield flags);
-typedef GLboolean (GL_APIENTRYP PFNGLISSYNCAPPLEPROC) (GLsync sync);
-typedef void (GL_APIENTRYP PFNGLDELETESYNCAPPLEPROC) (GLsync sync);
-typedef GLenum (GL_APIENTRYP PFNGLCLIENTWAITSYNCAPPLEPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout);
-typedef void (GL_APIENTRYP PFNGLWAITSYNCAPPLEPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout);
-typedef void (GL_APIENTRYP PFNGLGETINTEGER64VAPPLEPROC) (GLenum pname, GLint64 *params);
-typedef void (GL_APIENTRYP PFNGLGETSYNCIVAPPLEPROC) (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL GLsync GL_APIENTRY glFenceSyncAPPLE (GLenum condition, GLbitfield flags);
-GL_APICALL GLboolean GL_APIENTRY glIsSyncAPPLE (GLsync sync);
-GL_APICALL void GL_APIENTRY glDeleteSyncAPPLE (GLsync sync);
-GL_APICALL GLenum GL_APIENTRY glClientWaitSyncAPPLE (GLsync sync, GLbitfield flags, GLuint64 timeout);
-GL_APICALL void GL_APIENTRY glWaitSyncAPPLE (GLsync sync, GLbitfield flags, GLuint64 timeout);
-GL_APICALL void GL_APIENTRY glGetInteger64vAPPLE (GLenum pname, GLint64 *params);
-GL_APICALL void GL_APIENTRY glGetSyncivAPPLE (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);
-#endif
-#endif /* GL_APPLE_sync */
-
-#ifndef GL_APPLE_texture_format_BGRA8888
-#define GL_APPLE_texture_format_BGRA8888 1
-#define GL_BGRA_EXT 0x80E1
-#define GL_BGRA8_EXT 0x93A1
-#endif /* GL_APPLE_texture_format_BGRA8888 */
-
-#ifndef GL_APPLE_texture_max_level
-#define GL_APPLE_texture_max_level 1
-#define GL_TEXTURE_MAX_LEVEL_APPLE 0x813D
-#endif /* GL_APPLE_texture_max_level */
-
-#ifndef GL_APPLE_texture_packed_float
-#define GL_APPLE_texture_packed_float 1
-#define GL_UNSIGNED_INT_10F_11F_11F_REV_APPLE 0x8C3B
-#define GL_UNSIGNED_INT_5_9_9_9_REV_APPLE 0x8C3E
-#define GL_R11F_G11F_B10F_APPLE 0x8C3A
-#define GL_RGB9_E5_APPLE 0x8C3D
-#endif /* GL_APPLE_texture_packed_float */
-
-#ifndef GL_ARM_mali_program_binary
-#define GL_ARM_mali_program_binary 1
-#define GL_MALI_PROGRAM_BINARY_ARM 0x8F61
-#endif /* GL_ARM_mali_program_binary */
-
-#ifndef GL_ARM_mali_shader_binary
-#define GL_ARM_mali_shader_binary 1
-#define GL_MALI_SHADER_BINARY_ARM 0x8F60
-#endif /* GL_ARM_mali_shader_binary */
-
-#ifndef GL_ARM_rgba8
-#define GL_ARM_rgba8 1
-#endif /* GL_ARM_rgba8 */
-
-#ifndef GL_ARM_shader_framebuffer_fetch
-#define GL_ARM_shader_framebuffer_fetch 1
-#define GL_FETCH_PER_SAMPLE_ARM 0x8F65
-#define GL_FRAGMENT_SHADER_FRAMEBUFFER_FETCH_MRT_ARM 0x8F66
-#endif /* GL_ARM_shader_framebuffer_fetch */
-
-#ifndef GL_ARM_shader_framebuffer_fetch_depth_stencil
-#define GL_ARM_shader_framebuffer_fetch_depth_stencil 1
-#endif /* GL_ARM_shader_framebuffer_fetch_depth_stencil */
-
-#ifndef GL_DMP_program_binary
-#define GL_DMP_program_binary 1
-#define GL_SMAPHS30_PROGRAM_BINARY_DMP 0x9251
-#define GL_SMAPHS_PROGRAM_BINARY_DMP 0x9252
-#define GL_DMP_PROGRAM_BINARY_DMP 0x9253
-#endif /* GL_DMP_program_binary */
-
-#ifndef GL_DMP_shader_binary
-#define GL_DMP_shader_binary 1
-#define GL_SHADER_BINARY_DMP 0x9250
-#endif /* GL_DMP_shader_binary */
-
-#ifndef GL_EXT_base_instance
-#define GL_EXT_base_instance 1
-typedef void (GL_APIENTRYP PFNGLDRAWARRAYSINSTANCEDBASEINSTANCEEXTPROC) (GLenum mode, GLint first, GLsizei count, GLsizei instancecount, GLuint baseinstance);
-typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEINSTANCEEXTPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLuint baseinstance);
-typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCEEXTPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex, GLuint baseinstance);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glDrawArraysInstancedBaseInstanceEXT (GLenum mode, GLint first, GLsizei count, GLsizei instancecount, GLuint baseinstance);
-GL_APICALL void GL_APIENTRY glDrawElementsInstancedBaseInstanceEXT (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLuint baseinstance);
-GL_APICALL void GL_APIENTRY glDrawElementsInstancedBaseVertexBaseInstanceEXT (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex, GLuint baseinstance);
-#endif
-#endif /* GL_EXT_base_instance */
-
-#ifndef GL_EXT_blend_minmax
-#define GL_EXT_blend_minmax 1
-#define GL_MIN_EXT 0x8007
-#define GL_MAX_EXT 0x8008
-#endif /* GL_EXT_blend_minmax */
-
-#ifndef GL_EXT_color_buffer_half_float
-#define GL_EXT_color_buffer_half_float 1
-#define GL_RGBA16F_EXT 0x881A
-#define GL_RGB16F_EXT 0x881B
-#define GL_RG16F_EXT 0x822F
-#define GL_R16F_EXT 0x822D
-#define GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT 0x8211
-#define GL_UNSIGNED_NORMALIZED_EXT 0x8C17
-#endif /* GL_EXT_color_buffer_half_float */
-
-#ifndef GL_EXT_copy_image
-#define GL_EXT_copy_image 1
-typedef void (GL_APIENTRYP PFNGLCOPYIMAGESUBDATAEXTPROC) (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glCopyImageSubDataEXT (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth);
-#endif
-#endif /* GL_EXT_copy_image */
-
-#ifndef GL_EXT_debug_label
-#define GL_EXT_debug_label 1
-#define GL_PROGRAM_PIPELINE_OBJECT_EXT 0x8A4F
-#define GL_PROGRAM_OBJECT_EXT 0x8B40
-#define GL_SHADER_OBJECT_EXT 0x8B48
-#define GL_BUFFER_OBJECT_EXT 0x9151
-#define GL_QUERY_OBJECT_EXT 0x9153
-#define GL_VERTEX_ARRAY_OBJECT_EXT 0x9154
-#define GL_TRANSFORM_FEEDBACK 0x8E22
-typedef void (GL_APIENTRYP PFNGLLABELOBJECTEXTPROC) (GLenum type, GLuint object, GLsizei length, const GLchar *label);
-typedef void (GL_APIENTRYP PFNGLGETOBJECTLABELEXTPROC) (GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glLabelObjectEXT (GLenum type, GLuint object, GLsizei length, const GLchar *label);
-GL_APICALL void GL_APIENTRY glGetObjectLabelEXT (GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label);
-#endif
-#endif /* GL_EXT_debug_label */
-
-#ifndef GL_EXT_debug_marker
-#define GL_EXT_debug_marker 1
-typedef void (GL_APIENTRYP PFNGLINSERTEVENTMARKEREXTPROC) (GLsizei length, const GLchar *marker);
-typedef void (GL_APIENTRYP PFNGLPUSHGROUPMARKEREXTPROC) (GLsizei length, const GLchar *marker);
-typedef void (GL_APIENTRYP PFNGLPOPGROUPMARKEREXTPROC) (void);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glInsertEventMarkerEXT (GLsizei length, const GLchar *marker);
-GL_APICALL void GL_APIENTRY glPushGroupMarkerEXT (GLsizei length, const GLchar *marker);
-GL_APICALL void GL_APIENTRY glPopGroupMarkerEXT (void);
-#endif
-#endif /* GL_EXT_debug_marker */
-
-#ifndef GL_EXT_discard_framebuffer
-#define GL_EXT_discard_framebuffer 1
-#define GL_COLOR_EXT 0x1800
-#define GL_DEPTH_EXT 0x1801
-#define GL_STENCIL_EXT 0x1802
-typedef void (GL_APIENTRYP PFNGLDISCARDFRAMEBUFFEREXTPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glDiscardFramebufferEXT (GLenum target, GLsizei numAttachments, const GLenum *attachments);
-#endif
-#endif /* GL_EXT_discard_framebuffer */
-
-#ifndef GL_EXT_disjoint_timer_query
-#define GL_EXT_disjoint_timer_query 1
-#define GL_QUERY_COUNTER_BITS_EXT 0x8864
-#define GL_CURRENT_QUERY_EXT 0x8865
-#define GL_QUERY_RESULT_EXT 0x8866
-#define GL_QUERY_RESULT_AVAILABLE_EXT 0x8867
-#define GL_TIME_ELAPSED_EXT 0x88BF
-#define GL_TIMESTAMP_EXT 0x8E28
-#define GL_GPU_DISJOINT_EXT 0x8FBB
-typedef void (GL_APIENTRYP PFNGLGENQUERIESEXTPROC) (GLsizei n, GLuint *ids);
-typedef void (GL_APIENTRYP PFNGLDELETEQUERIESEXTPROC) (GLsizei n, const GLuint *ids);
-typedef GLboolean (GL_APIENTRYP PFNGLISQUERYEXTPROC) (GLuint id);
-typedef void (GL_APIENTRYP PFNGLBEGINQUERYEXTPROC) (GLenum target, GLuint id);
-typedef void (GL_APIENTRYP PFNGLENDQUERYEXTPROC) (GLenum target);
-typedef void (GL_APIENTRYP PFNGLQUERYCOUNTEREXTPROC) (GLuint id, GLenum target);
-typedef void (GL_APIENTRYP PFNGLGETQUERYIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
-typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTIVEXTPROC) (GLuint id, GLenum pname, GLint *params);
-typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTUIVEXTPROC) (GLuint id, GLenum pname, GLuint *params);
-typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTI64VEXTPROC) (GLuint id, GLenum pname, GLint64 *params);
-typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTUI64VEXTPROC) (GLuint id, GLenum pname, GLuint64 *params);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glGenQueriesEXT (GLsizei n, GLuint *ids);
-GL_APICALL void GL_APIENTRY glDeleteQueriesEXT (GLsizei n, const GLuint *ids);
-GL_APICALL GLboolean GL_APIENTRY glIsQueryEXT (GLuint id);
-GL_APICALL void GL_APIENTRY glBeginQueryEXT (GLenum target, GLuint id);
-GL_APICALL void GL_APIENTRY glEndQueryEXT (GLenum target);
-GL_APICALL void GL_APIENTRY glQueryCounterEXT (GLuint id, GLenum target);
-GL_APICALL void GL_APIENTRY glGetQueryivEXT (GLenum target, GLenum pname, GLint *params);
-GL_APICALL void GL_APIENTRY glGetQueryObjectivEXT (GLuint id, GLenum pname, GLint *params);
-GL_APICALL void GL_APIENTRY glGetQueryObjectuivEXT (GLuint id, GLenum pname, GLuint *params);
-GL_APICALL void GL_APIENTRY glGetQueryObjecti64vEXT (GLuint id, GLenum pname, GLint64 *params);
-GL_APICALL void GL_APIENTRY glGetQueryObjectui64vEXT (GLuint id, GLenum pname, GLuint64 *params);
-#endif
-#endif /* GL_EXT_disjoint_timer_query */
-
-#ifndef GL_EXT_draw_buffers
-#define GL_EXT_draw_buffers 1
-#define GL_MAX_COLOR_ATTACHMENTS_EXT 0x8CDF
-#define GL_MAX_DRAW_BUFFERS_EXT 0x8824
-#define GL_DRAW_BUFFER0_EXT 0x8825
-#define GL_DRAW_BUFFER1_EXT 0x8826
-#define GL_DRAW_BUFFER2_EXT 0x8827
-#define GL_DRAW_BUFFER3_EXT 0x8828
-#define GL_DRAW_BUFFER4_EXT 0x8829
-#define GL_DRAW_BUFFER5_EXT 0x882A
-#define GL_DRAW_BUFFER6_EXT 0x882B
-#define GL_DRAW_BUFFER7_EXT 0x882C
-#define GL_DRAW_BUFFER8_EXT 0x882D
-#define GL_DRAW_BUFFER9_EXT 0x882E
-#define GL_DRAW_BUFFER10_EXT 0x882F
-#define GL_DRAW_BUFFER11_EXT 0x8830
-#define GL_DRAW_BUFFER12_EXT 0x8831
-#define GL_DRAW_BUFFER13_EXT 0x8832
-#define GL_DRAW_BUFFER14_EXT 0x8833
-#define GL_DRAW_BUFFER15_EXT 0x8834
-#define GL_COLOR_ATTACHMENT0_EXT 0x8CE0
-#define GL_COLOR_ATTACHMENT1_EXT 0x8CE1
-#define GL_COLOR_ATTACHMENT2_EXT 0x8CE2
-#define GL_COLOR_ATTACHMENT3_EXT 0x8CE3
-#define GL_COLOR_ATTACHMENT4_EXT 0x8CE4
-#define GL_COLOR_ATTACHMENT5_EXT 0x8CE5
-#define GL_COLOR_ATTACHMENT6_EXT 0x8CE6
-#define GL_COLOR_ATTACHMENT7_EXT 0x8CE7
-#define GL_COLOR_ATTACHMENT8_EXT 0x8CE8
-#define GL_COLOR_ATTACHMENT9_EXT 0x8CE9
-#define GL_COLOR_ATTACHMENT10_EXT 0x8CEA
-#define GL_COLOR_ATTACHMENT11_EXT 0x8CEB
-#define GL_COLOR_ATTACHMENT12_EXT 0x8CEC
-#define GL_COLOR_ATTACHMENT13_EXT 0x8CED
-#define GL_COLOR_ATTACHMENT14_EXT 0x8CEE
-#define GL_COLOR_ATTACHMENT15_EXT 0x8CEF
-typedef void (GL_APIENTRYP PFNGLDRAWBUFFERSEXTPROC) (GLsizei n, const GLenum *bufs);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glDrawBuffersEXT (GLsizei n, const GLenum *bufs);
-#endif
-#endif /* GL_EXT_draw_buffers */
-
-#ifndef GL_EXT_draw_buffers_indexed
-#define GL_EXT_draw_buffers_indexed 1
-#define GL_MIN 0x8007
-#define GL_MAX 0x8008
-typedef void (GL_APIENTRYP PFNGLENABLEIEXTPROC) (GLenum target, GLuint index);
-typedef void (GL_APIENTRYP PFNGLDISABLEIEXTPROC) (GLenum target, GLuint index);
-typedef void (GL_APIENTRYP PFNGLBLENDEQUATIONIEXTPROC) (GLuint buf, GLenum mode);
-typedef void (GL_APIENTRYP PFNGLBLENDEQUATIONSEPARATEIEXTPROC) (GLuint buf, GLenum modeRGB, GLenum modeAlpha);
-typedef void (GL_APIENTRYP PFNGLBLENDFUNCIEXTPROC) (GLuint buf, GLenum src, GLenum dst);
-typedef void (GL_APIENTRYP PFNGLBLENDFUNCSEPARATEIEXTPROC) (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
-typedef void (GL_APIENTRYP PFNGLCOLORMASKIEXTPROC) (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a);
-typedef GLboolean (GL_APIENTRYP PFNGLISENABLEDIEXTPROC) (GLenum target, GLuint index);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glEnableiEXT (GLenum target, GLuint index);
-GL_APICALL void GL_APIENTRY glDisableiEXT (GLenum target, GLuint index);
-GL_APICALL void GL_APIENTRY glBlendEquationiEXT (GLuint buf, GLenum mode);
-GL_APICALL void GL_APIENTRY glBlendEquationSeparateiEXT (GLuint buf, GLenum modeRGB, GLenum modeAlpha);
-GL_APICALL void GL_APIENTRY glBlendFunciEXT (GLuint buf, GLenum src, GLenum dst);
-GL_APICALL void GL_APIENTRY glBlendFuncSeparateiEXT (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
-GL_APICALL void GL_APIENTRY glColorMaskiEXT (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a);
-GL_APICALL GLboolean GL_APIENTRY glIsEnablediEXT (GLenum target, GLuint index);
-#endif
-#endif /* GL_EXT_draw_buffers_indexed */
-
-#ifndef GL_EXT_draw_elements_base_vertex
-#define GL_EXT_draw_elements_base_vertex 1
-typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSBASEVERTEXEXTPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLint basevertex);
-typedef void (GL_APIENTRYP PFNGLDRAWRANGEELEMENTSBASEVERTEXEXTPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices, GLint basevertex);
-typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXEXTPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex);
-typedef void (GL_APIENTRYP PFNGLMULTIDRAWELEMENTSBASEVERTEXEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei primcount, const GLint *basevertex);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glDrawElementsBaseVertexEXT (GLenum mode, GLsizei count, GLenum type, const void *indices, GLint basevertex);
-GL_APICALL void GL_APIENTRY glDrawRangeElementsBaseVertexEXT (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices, GLint basevertex);
-GL_APICALL void GL_APIENTRY glDrawElementsInstancedBaseVertexEXT (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex);
-GL_APICALL void GL_APIENTRY glMultiDrawElementsBaseVertexEXT (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei primcount, const GLint *basevertex);
-#endif
-#endif /* GL_EXT_draw_elements_base_vertex */
-
-#ifndef GL_EXT_draw_instanced
-#define GL_EXT_draw_instanced 1
-typedef void (GL_APIENTRYP PFNGLDRAWARRAYSINSTANCEDEXTPROC) (GLenum mode, GLint start, GLsizei count, GLsizei primcount);
-typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSINSTANCEDEXTPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glDrawArraysInstancedEXT (GLenum mode, GLint start, GLsizei count, GLsizei primcount);
-GL_APICALL void GL_APIENTRY glDrawElementsInstancedEXT (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount);
-#endif
-#endif /* GL_EXT_draw_instanced */
-
-#ifndef GL_EXT_geometry_point_size
-#define GL_EXT_geometry_point_size 1
-#endif /* GL_EXT_geometry_point_size */
-
-#ifndef GL_EXT_geometry_shader
-#define GL_EXT_geometry_shader 1
-#define GL_GEOMETRY_SHADER_EXT 0x8DD9
-#define GL_GEOMETRY_SHADER_BIT_EXT 0x00000004
-#define GL_GEOMETRY_LINKED_VERTICES_OUT_EXT 0x8916
-#define GL_GEOMETRY_LINKED_INPUT_TYPE_EXT 0x8917
-#define GL_GEOMETRY_LINKED_OUTPUT_TYPE_EXT 0x8918
-#define GL_GEOMETRY_SHADER_INVOCATIONS_EXT 0x887F
-#define GL_LAYER_PROVOKING_VERTEX_EXT 0x825E
-#define GL_LINES_ADJACENCY_EXT 0x000A
-#define GL_LINE_STRIP_ADJACENCY_EXT 0x000B
-#define GL_TRIANGLES_ADJACENCY_EXT 0x000C
-#define GL_TRIANGLE_STRIP_ADJACENCY_EXT 0x000D
-#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_EXT 0x8DDF
-#define GL_MAX_GEOMETRY_UNIFORM_BLOCKS_EXT 0x8A2C
-#define GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS_EXT 0x8A32
-#define GL_MAX_GEOMETRY_INPUT_COMPONENTS_EXT 0x9123
-#define GL_MAX_GEOMETRY_OUTPUT_COMPONENTS_EXT 0x9124
-#define GL_MAX_GEOMETRY_OUTPUT_VERTICES_EXT 0x8DE0
-#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_EXT 0x8DE1
-#define GL_MAX_GEOMETRY_SHADER_INVOCATIONS_EXT 0x8E5A
-#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT 0x8C29
-#define GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS_EXT 0x92CF
-#define GL_MAX_GEOMETRY_ATOMIC_COUNTERS_EXT 0x92D5
-#define GL_MAX_GEOMETRY_IMAGE_UNIFORMS_EXT 0x90CD
-#define GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS_EXT 0x90D7
-#define GL_FIRST_VERTEX_CONVENTION_EXT 0x8E4D
-#define GL_LAST_VERTEX_CONVENTION_EXT 0x8E4E
-#define GL_UNDEFINED_VERTEX_EXT 0x8260
-#define GL_PRIMITIVES_GENERATED_EXT 0x8C87
-#define GL_FRAMEBUFFER_DEFAULT_LAYERS_EXT 0x9312
-#define GL_MAX_FRAMEBUFFER_LAYERS_EXT 0x9317
-#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT 0x8DA8
-#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED_EXT 0x8DA7
-#define GL_REFERENCED_BY_GEOMETRY_SHADER_EXT 0x9309
-typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTUREEXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glFramebufferTextureEXT (GLenum target, GLenum attachment, GLuint texture, GLint level);
-#endif
-#endif /* GL_EXT_geometry_shader */
-
-#ifndef GL_EXT_gpu_shader5
-#define GL_EXT_gpu_shader5 1
-#endif /* GL_EXT_gpu_shader5 */
-
-#ifndef GL_EXT_instanced_arrays
-#define GL_EXT_instanced_arrays 1
-#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR_EXT 0x88FE
-typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBDIVISOREXTPROC) (GLuint index, GLuint divisor);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glVertexAttribDivisorEXT (GLuint index, GLuint divisor);
-#endif
-#endif /* GL_EXT_instanced_arrays */
-
-#ifndef GL_EXT_map_buffer_range
-#define GL_EXT_map_buffer_range 1
-#define GL_MAP_READ_BIT_EXT 0x0001
-#define GL_MAP_WRITE_BIT_EXT 0x0002
-#define GL_MAP_INVALIDATE_RANGE_BIT_EXT 0x0004
-#define GL_MAP_INVALIDATE_BUFFER_BIT_EXT 0x0008
-#define GL_MAP_FLUSH_EXPLICIT_BIT_EXT 0x0010
-#define GL_MAP_UNSYNCHRONIZED_BIT_EXT 0x0020
-typedef void *(GL_APIENTRYP PFNGLMAPBUFFERRANGEEXTPROC) (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
-typedef void (GL_APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEEXTPROC) (GLenum target, GLintptr offset, GLsizeiptr length);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void *GL_APIENTRY glMapBufferRangeEXT (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
-GL_APICALL void GL_APIENTRY glFlushMappedBufferRangeEXT (GLenum target, GLintptr offset, GLsizeiptr length);
-#endif
-#endif /* GL_EXT_map_buffer_range */
-
-#ifndef GL_EXT_multi_draw_arrays
-#define GL_EXT_multi_draw_arrays 1
-typedef void (GL_APIENTRYP PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount);
-typedef void (GL_APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei primcount);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glMultiDrawArraysEXT (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount);
-GL_APICALL void GL_APIENTRY glMultiDrawElementsEXT (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei primcount);
-#endif
-#endif /* GL_EXT_multi_draw_arrays */
-
-#ifndef GL_EXT_multi_draw_indirect
-#define GL_EXT_multi_draw_indirect 1
-typedef void (GL_APIENTRYP PFNGLMULTIDRAWARRAYSINDIRECTEXTPROC) (GLenum mode, const void *indirect, GLsizei drawcount, GLsizei stride);
-typedef void (GL_APIENTRYP PFNGLMULTIDRAWELEMENTSINDIRECTEXTPROC) (GLenum mode, GLenum type, const void *indirect, GLsizei drawcount, GLsizei stride);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glMultiDrawArraysIndirectEXT (GLenum mode, const void *indirect, GLsizei drawcount, GLsizei stride);
-GL_APICALL void GL_APIENTRY glMultiDrawElementsIndirectEXT (GLenum mode, GLenum type, const void *indirect, GLsizei drawcount, GLsizei stride);
-#endif
-#endif /* GL_EXT_multi_draw_indirect */
-
-#ifndef GL_EXT_multisampled_render_to_texture
-#define GL_EXT_multisampled_render_to_texture 1
-#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_SAMPLES_EXT 0x8D6C
-#define GL_RENDERBUFFER_SAMPLES_EXT 0x8CAB
-#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT 0x8D56
-#define GL_MAX_SAMPLES_EXT 0x8D57
-typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
-typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleEXT (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
-GL_APICALL void GL_APIENTRY glFramebufferTexture2DMultisampleEXT (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);
-#endif
-#endif /* GL_EXT_multisampled_render_to_texture */
-
-#ifndef GL_EXT_multiview_draw_buffers
-#define GL_EXT_multiview_draw_buffers 1
-#define GL_COLOR_ATTACHMENT_EXT 0x90F0
-#define GL_MULTIVIEW_EXT 0x90F1
-#define GL_DRAW_BUFFER_EXT 0x0C01
-#define GL_READ_BUFFER_EXT 0x0C02
-#define GL_MAX_MULTIVIEW_BUFFERS_EXT 0x90F2
-typedef void (GL_APIENTRYP PFNGLREADBUFFERINDEXEDEXTPROC) (GLenum src, GLint index);
-typedef void (GL_APIENTRYP PFNGLDRAWBUFFERSINDEXEDEXTPROC) (GLint n, const GLenum *location, const GLint *indices);
-typedef void (GL_APIENTRYP PFNGLGETINTEGERI_VEXTPROC) (GLenum target, GLuint index, GLint *data);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glReadBufferIndexedEXT (GLenum src, GLint index);
-GL_APICALL void GL_APIENTRY glDrawBuffersIndexedEXT (GLint n, const GLenum *location, const GLint *indices);
-GL_APICALL void GL_APIENTRY glGetIntegeri_vEXT (GLenum target, GLuint index, GLint *data);
-#endif
-#endif /* GL_EXT_multiview_draw_buffers */
-
-#ifndef GL_EXT_occlusion_query_boolean
-#define GL_EXT_occlusion_query_boolean 1
-#define GL_ANY_SAMPLES_PASSED_EXT 0x8C2F
-#define GL_ANY_SAMPLES_PASSED_CONSERVATIVE_EXT 0x8D6A
-#endif /* GL_EXT_occlusion_query_boolean */
-
-#ifndef GL_EXT_primitive_bounding_box
-#define GL_EXT_primitive_bounding_box 1
-#define GL_PRIMITIVE_BOUNDING_BOX_EXT 0x92BE
-typedef void (GL_APIENTRYP PFNGLPRIMITIVEBOUNDINGBOXEXTPROC) (GLfloat minX, GLfloat minY, GLfloat minZ, GLfloat minW, GLfloat maxX, GLfloat maxY, GLfloat maxZ, GLfloat maxW);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glPrimitiveBoundingBoxEXT (GLfloat minX, GLfloat minY, GLfloat minZ, GLfloat minW, GLfloat maxX, GLfloat maxY, GLfloat maxZ, GLfloat maxW);
-#endif
-#endif /* GL_EXT_primitive_bounding_box */
-
-#ifndef GL_EXT_pvrtc_sRGB
-#define GL_EXT_pvrtc_sRGB 1
-#define GL_COMPRESSED_SRGB_PVRTC_2BPPV1_EXT 0x8A54
-#define GL_COMPRESSED_SRGB_PVRTC_4BPPV1_EXT 0x8A55
-#define GL_COMPRESSED_SRGB_ALPHA_PVRTC_2BPPV1_EXT 0x8A56
-#define GL_COMPRESSED_SRGB_ALPHA_PVRTC_4BPPV1_EXT 0x8A57
-#define GL_COMPRESSED_SRGB_ALPHA_PVRTC_2BPPV2_IMG 0x93F0
-#define GL_COMPRESSED_SRGB_ALPHA_PVRTC_4BPPV2_IMG 0x93F1
-#endif /* GL_EXT_pvrtc_sRGB */
-
-#ifndef GL_EXT_read_format_bgra
-#define GL_EXT_read_format_bgra 1
-#define GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT 0x8365
-#define GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT 0x8366
-#endif /* GL_EXT_read_format_bgra */
-
-#ifndef GL_EXT_render_snorm
-#define GL_EXT_render_snorm 1
-#define GL_R8_SNORM 0x8F94
-#define GL_RG8_SNORM 0x8F95
-#define GL_RGBA8_SNORM 0x8F97
-#define GL_R16_SNORM_EXT 0x8F98
-#define GL_RG16_SNORM_EXT 0x8F99
-#define GL_RGBA16_SNORM_EXT 0x8F9B
-#endif /* GL_EXT_render_snorm */
-
-#ifndef GL_EXT_robustness
-#define GL_EXT_robustness 1
-#define GL_GUILTY_CONTEXT_RESET_EXT 0x8253
-#define GL_INNOCENT_CONTEXT_RESET_EXT 0x8254
-#define GL_UNKNOWN_CONTEXT_RESET_EXT 0x8255
-#define GL_CONTEXT_ROBUST_ACCESS_EXT 0x90F3
-#define GL_RESET_NOTIFICATION_STRATEGY_EXT 0x8256
-#define GL_LOSE_CONTEXT_ON_RESET_EXT 0x8252
-#define GL_NO_RESET_NOTIFICATION_EXT 0x8261
-typedef GLenum (GL_APIENTRYP PFNGLGETGRAPHICSRESETSTATUSEXTPROC) (void);
-typedef void (GL_APIENTRYP PFNGLREADNPIXELSEXTPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data);
-typedef void (GL_APIENTRYP PFNGLGETNUNIFORMFVEXTPROC) (GLuint program, GLint location, GLsizei bufSize, GLfloat *params);
-typedef void (GL_APIENTRYP PFNGLGETNUNIFORMIVEXTPROC) (GLuint program, GLint location, GLsizei bufSize, GLint *params);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL GLenum GL_APIENTRY glGetGraphicsResetStatusEXT (void);
-GL_APICALL void GL_APIENTRY glReadnPixelsEXT (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data);
-GL_APICALL void GL_APIENTRY glGetnUniformfvEXT (GLuint program, GLint location, GLsizei bufSize, GLfloat *params);
-GL_APICALL void GL_APIENTRY glGetnUniformivEXT (GLuint program, GLint location, GLsizei bufSize, GLint *params);
-#endif
-#endif /* GL_EXT_robustness */
-
-#ifndef GL_EXT_sRGB
-#define GL_EXT_sRGB 1
-#define GL_SRGB_EXT 0x8C40
-#define GL_SRGB_ALPHA_EXT 0x8C42
-#define GL_SRGB8_ALPHA8_EXT 0x8C43
-#define GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT 0x8210
-#endif /* GL_EXT_sRGB */
-
-#ifndef GL_EXT_sRGB_write_control
-#define GL_EXT_sRGB_write_control 1
-#define GL_FRAMEBUFFER_SRGB_EXT 0x8DB9
-#endif /* GL_EXT_sRGB_write_control */
-
-#ifndef GL_EXT_separate_shader_objects
-#define GL_EXT_separate_shader_objects 1
-#define GL_ACTIVE_PROGRAM_EXT 0x8259
-#define GL_VERTEX_SHADER_BIT_EXT 0x00000001
-#define GL_FRAGMENT_SHADER_BIT_EXT 0x00000002
-#define GL_ALL_SHADER_BITS_EXT 0xFFFFFFFF
-#define GL_PROGRAM_SEPARABLE_EXT 0x8258
-#define GL_PROGRAM_PIPELINE_BINDING_EXT 0x825A
-typedef void (GL_APIENTRYP PFNGLACTIVESHADERPROGRAMEXTPROC) (GLuint pipeline, GLuint program);
-typedef void (GL_APIENTRYP PFNGLBINDPROGRAMPIPELINEEXTPROC) (GLuint pipeline);
-typedef GLuint (GL_APIENTRYP PFNGLCREATESHADERPROGRAMVEXTPROC) (GLenum type, GLsizei count, const GLchar **strings);
-typedef void (GL_APIENTRYP PFNGLDELETEPROGRAMPIPELINESEXTPROC) (GLsizei n, const GLuint *pipelines);
-typedef void (GL_APIENTRYP PFNGLGENPROGRAMPIPELINESEXTPROC) (GLsizei n, GLuint *pipelines);
-typedef void (GL_APIENTRYP PFNGLGETPROGRAMPIPELINEINFOLOGEXTPROC) (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
-typedef void (GL_APIENTRYP PFNGLGETPROGRAMPIPELINEIVEXTPROC) (GLuint pipeline, GLenum pname, GLint *params);
-typedef GLboolean (GL_APIENTRYP PFNGLISPROGRAMPIPELINEEXTPROC) (GLuint pipeline);
-typedef void (GL_APIENTRYP PFNGLPROGRAMPARAMETERIEXTPROC) (GLuint program, GLenum pname, GLint value);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1FEXTPROC) (GLuint program, GLint location, GLfloat v0);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1IEXTPROC) (GLuint program, GLint location, GLint v0);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-typedef void (GL_APIENTRYP PFNGLUSEPROGRAMSTAGESEXTPROC) (GLuint pipeline, GLbitfield stages, GLuint program);
-typedef void (GL_APIENTRYP PFNGLVALIDATEPROGRAMPIPELINEEXTPROC) (GLuint pipeline);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1UIEXTPROC) (GLuint program, GLint location, GLuint v0);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glActiveShaderProgramEXT (GLuint pipeline, GLuint program);
-GL_APICALL void GL_APIENTRY glBindProgramPipelineEXT (GLuint pipeline);
-GL_APICALL GLuint GL_APIENTRY glCreateShaderProgramvEXT (GLenum type, GLsizei count, const GLchar **strings);
-GL_APICALL void GL_APIENTRY glDeleteProgramPipelinesEXT (GLsizei n, const GLuint *pipelines);
-GL_APICALL void GL_APIENTRY glGenProgramPipelinesEXT (GLsizei n, GLuint *pipelines);
-GL_APICALL void GL_APIENTRY glGetProgramPipelineInfoLogEXT (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
-GL_APICALL void GL_APIENTRY glGetProgramPipelineivEXT (GLuint pipeline, GLenum pname, GLint *params);
-GL_APICALL GLboolean GL_APIENTRY glIsProgramPipelineEXT (GLuint pipeline);
-GL_APICALL void GL_APIENTRY glProgramParameteriEXT (GLuint program, GLenum pname, GLint value);
-GL_APICALL void GL_APIENTRY glProgramUniform1fEXT (GLuint program, GLint location, GLfloat v0);
-GL_APICALL void GL_APIENTRY glProgramUniform1fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glProgramUniform1iEXT (GLuint program, GLint location, GLint v0);
-GL_APICALL void GL_APIENTRY glProgramUniform1ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);
-GL_APICALL void GL_APIENTRY glProgramUniform2fEXT (GLuint program, GLint location, GLfloat v0, GLfloat v1);
-GL_APICALL void GL_APIENTRY glProgramUniform2fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glProgramUniform2iEXT (GLuint program, GLint location, GLint v0, GLint v1);
-GL_APICALL void GL_APIENTRY glProgramUniform2ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);
-GL_APICALL void GL_APIENTRY glProgramUniform3fEXT (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
-GL_APICALL void GL_APIENTRY glProgramUniform3fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glProgramUniform3iEXT (GLuint program, GLint location, GLint v0, GLint v1, GLint v2);
-GL_APICALL void GL_APIENTRY glProgramUniform3ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);
-GL_APICALL void GL_APIENTRY glProgramUniform4fEXT (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
-GL_APICALL void GL_APIENTRY glProgramUniform4fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glProgramUniform4iEXT (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
-GL_APICALL void GL_APIENTRY glProgramUniform4ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);
-GL_APICALL void GL_APIENTRY glProgramUniformMatrix2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glProgramUniformMatrix3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glProgramUniformMatrix4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glUseProgramStagesEXT (GLuint pipeline, GLbitfield stages, GLuint program);
-GL_APICALL void GL_APIENTRY glValidateProgramPipelineEXT (GLuint pipeline);
-GL_APICALL void GL_APIENTRY glProgramUniform1uiEXT (GLuint program, GLint location, GLuint v0);
-GL_APICALL void GL_APIENTRY glProgramUniform2uiEXT (GLuint program, GLint location, GLuint v0, GLuint v1);
-GL_APICALL void GL_APIENTRY glProgramUniform3uiEXT (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2);
-GL_APICALL void GL_APIENTRY glProgramUniform4uiEXT (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
-GL_APICALL void GL_APIENTRY glProgramUniform1uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value);
-GL_APICALL void GL_APIENTRY glProgramUniform2uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value);
-GL_APICALL void GL_APIENTRY glProgramUniform3uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value);
-GL_APICALL void GL_APIENTRY glProgramUniform4uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value);
-GL_APICALL void GL_APIENTRY glProgramUniformMatrix2x3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glProgramUniformMatrix3x2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glProgramUniformMatrix2x4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glProgramUniformMatrix4x2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glProgramUniformMatrix3x4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glProgramUniformMatrix4x3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-#endif
-#endif /* GL_EXT_separate_shader_objects */
-
-#ifndef GL_EXT_shader_framebuffer_fetch
-#define GL_EXT_shader_framebuffer_fetch 1
-#define GL_FRAGMENT_SHADER_DISCARDS_SAMPLES_EXT 0x8A52
-#endif /* GL_EXT_shader_framebuffer_fetch */
-
-#ifndef GL_EXT_shader_implicit_conversions
-#define GL_EXT_shader_implicit_conversions 1
-#endif /* GL_EXT_shader_implicit_conversions */
-
-#ifndef GL_EXT_shader_integer_mix
-#define GL_EXT_shader_integer_mix 1
-#endif /* GL_EXT_shader_integer_mix */
-
-#ifndef GL_EXT_shader_io_blocks
-#define GL_EXT_shader_io_blocks 1
-#endif /* GL_EXT_shader_io_blocks */
-
-#ifndef GL_EXT_shader_pixel_local_storage
-#define GL_EXT_shader_pixel_local_storage 1
-#define GL_MAX_SHADER_PIXEL_LOCAL_STORAGE_FAST_SIZE_EXT 0x8F63
-#define GL_MAX_SHADER_PIXEL_LOCAL_STORAGE_SIZE_EXT 0x8F67
-#define GL_SHADER_PIXEL_LOCAL_STORAGE_EXT 0x8F64
-#endif /* GL_EXT_shader_pixel_local_storage */
-
-#ifndef GL_EXT_shader_texture_lod
-#define GL_EXT_shader_texture_lod 1
-#endif /* GL_EXT_shader_texture_lod */
-
-#ifndef GL_EXT_shadow_samplers
-#define GL_EXT_shadow_samplers 1
-#define GL_TEXTURE_COMPARE_MODE_EXT 0x884C
-#define GL_TEXTURE_COMPARE_FUNC_EXT 0x884D
-#define GL_COMPARE_REF_TO_TEXTURE_EXT 0x884E
-#define GL_SAMPLER_2D_SHADOW_EXT 0x8B62
-#endif /* GL_EXT_shadow_samplers */
-
-#ifndef GL_EXT_tessellation_point_size
-#define GL_EXT_tessellation_point_size 1
-#endif /* GL_EXT_tessellation_point_size */
-
-#ifndef GL_EXT_tessellation_shader
-#define GL_EXT_tessellation_shader 1
-#define GL_PATCHES_EXT 0x000E
-#define GL_PATCH_VERTICES_EXT 0x8E72
-#define GL_TESS_CONTROL_OUTPUT_VERTICES_EXT 0x8E75
-#define GL_TESS_GEN_MODE_EXT 0x8E76
-#define GL_TESS_GEN_SPACING_EXT 0x8E77
-#define GL_TESS_GEN_VERTEX_ORDER_EXT 0x8E78
-#define GL_TESS_GEN_POINT_MODE_EXT 0x8E79
-#define GL_ISOLINES_EXT 0x8E7A
-#define GL_QUADS_EXT 0x0007
-#define GL_FRACTIONAL_ODD_EXT 0x8E7B
-#define GL_FRACTIONAL_EVEN_EXT 0x8E7C
-#define GL_MAX_PATCH_VERTICES_EXT 0x8E7D
-#define GL_MAX_TESS_GEN_LEVEL_EXT 0x8E7E
-#define GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS_EXT 0x8E7F
-#define GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS_EXT 0x8E80
-#define GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS_EXT 0x8E81
-#define GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS_EXT 0x8E82
-#define GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS_EXT 0x8E83
-#define GL_MAX_TESS_PATCH_COMPONENTS_EXT 0x8E84
-#define GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS_EXT 0x8E85
-#define GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS_EXT 0x8E86
-#define GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS_EXT 0x8E89
-#define GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS_EXT 0x8E8A
-#define GL_MAX_TESS_CONTROL_INPUT_COMPONENTS_EXT 0x886C
-#define GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS_EXT 0x886D
-#define GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS_EXT 0x8E1E
-#define GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS_EXT 0x8E1F
-#define GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS_EXT 0x92CD
-#define GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS_EXT 0x92CE
-#define GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS_EXT 0x92D3
-#define GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS_EXT 0x92D4
-#define GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS_EXT 0x90CB
-#define GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS_EXT 0x90CC
-#define GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS_EXT 0x90D8
-#define GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS_EXT 0x90D9
-#define GL_PRIMITIVE_RESTART_FOR_PATCHES_SUPPORTED 0x8221
-#define GL_IS_PER_PATCH_EXT 0x92E7
-#define GL_REFERENCED_BY_TESS_CONTROL_SHADER_EXT 0x9307
-#define GL_REFERENCED_BY_TESS_EVALUATION_SHADER_EXT 0x9308
-#define GL_TESS_CONTROL_SHADER_EXT 0x8E88
-#define GL_TESS_EVALUATION_SHADER_EXT 0x8E87
-#define GL_TESS_CONTROL_SHADER_BIT_EXT 0x00000008
-#define GL_TESS_EVALUATION_SHADER_BIT_EXT 0x00000010
-typedef void (GL_APIENTRYP PFNGLPATCHPARAMETERIEXTPROC) (GLenum pname, GLint value);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glPatchParameteriEXT (GLenum pname, GLint value);
-#endif
-#endif /* GL_EXT_tessellation_shader */
-
-#ifndef GL_EXT_texture_border_clamp
-#define GL_EXT_texture_border_clamp 1
-#define GL_TEXTURE_BORDER_COLOR_EXT 0x1004
-#define GL_CLAMP_TO_BORDER_EXT 0x812D
-typedef void (GL_APIENTRYP PFNGLTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, const GLint *params);
-typedef void (GL_APIENTRYP PFNGLTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, const GLuint *params);
-typedef void (GL_APIENTRYP PFNGLGETTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
-typedef void (GL_APIENTRYP PFNGLGETTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, GLuint *params);
-typedef void (GL_APIENTRYP PFNGLSAMPLERPARAMETERIIVEXTPROC) (GLuint sampler, GLenum pname, const GLint *param);
-typedef void (GL_APIENTRYP PFNGLSAMPLERPARAMETERIUIVEXTPROC) (GLuint sampler, GLenum pname, const GLuint *param);
-typedef void (GL_APIENTRYP PFNGLGETSAMPLERPARAMETERIIVEXTPROC) (GLuint sampler, GLenum pname, GLint *params);
-typedef void (GL_APIENTRYP PFNGLGETSAMPLERPARAMETERIUIVEXTPROC) (GLuint sampler, GLenum pname, GLuint *params);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glTexParameterIivEXT (GLenum target, GLenum pname, const GLint *params);
-GL_APICALL void GL_APIENTRY glTexParameterIuivEXT (GLenum target, GLenum pname, const GLuint *params);
-GL_APICALL void GL_APIENTRY glGetTexParameterIivEXT (GLenum target, GLenum pname, GLint *params);
-GL_APICALL void GL_APIENTRY glGetTexParameterIuivEXT (GLenum target, GLenum pname, GLuint *params);
-GL_APICALL void GL_APIENTRY glSamplerParameterIivEXT (GLuint sampler, GLenum pname, const GLint *param);
-GL_APICALL void GL_APIENTRY glSamplerParameterIuivEXT (GLuint sampler, GLenum pname, const GLuint *param);
-GL_APICALL void GL_APIENTRY glGetSamplerParameterIivEXT (GLuint sampler, GLenum pname, GLint *params);
-GL_APICALL void GL_APIENTRY glGetSamplerParameterIuivEXT (GLuint sampler, GLenum pname, GLuint *params);
-#endif
-#endif /* GL_EXT_texture_border_clamp */
-
-#ifndef GL_EXT_texture_buffer
-#define GL_EXT_texture_buffer 1
-#define GL_TEXTURE_BUFFER_EXT 0x8C2A
-#define GL_TEXTURE_BUFFER_BINDING_EXT 0x8C2A
-#define GL_MAX_TEXTURE_BUFFER_SIZE_EXT 0x8C2B
-#define GL_TEXTURE_BINDING_BUFFER_EXT 0x8C2C
-#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING_EXT 0x8C2D
-#define GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT_EXT 0x919F
-#define GL_SAMPLER_BUFFER_EXT 0x8DC2
-#define GL_INT_SAMPLER_BUFFER_EXT 0x8DD0
-#define GL_UNSIGNED_INT_SAMPLER_BUFFER_EXT 0x8DD8
-#define GL_IMAGE_BUFFER_EXT 0x9051
-#define GL_INT_IMAGE_BUFFER_EXT 0x905C
-#define GL_UNSIGNED_INT_IMAGE_BUFFER_EXT 0x9067
-#define GL_TEXTURE_BUFFER_OFFSET_EXT 0x919D
-#define GL_TEXTURE_BUFFER_SIZE_EXT 0x919E
-typedef void (GL_APIENTRYP PFNGLTEXBUFFEREXTPROC) (GLenum target, GLenum internalformat, GLuint buffer);
-typedef void (GL_APIENTRYP PFNGLTEXBUFFERRANGEEXTPROC) (GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glTexBufferEXT (GLenum target, GLenum internalformat, GLuint buffer);
-GL_APICALL void GL_APIENTRY glTexBufferRangeEXT (GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size);
-#endif
-#endif /* GL_EXT_texture_buffer */
-
-#ifndef GL_EXT_texture_compression_dxt1
-#define GL_EXT_texture_compression_dxt1 1
-#define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0
-#define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1
-#endif /* GL_EXT_texture_compression_dxt1 */
-
-#ifndef GL_EXT_texture_compression_s3tc
-#define GL_EXT_texture_compression_s3tc 1
-#define GL_COMPRESSED_RGBA_S3TC_DXT3_EXT 0x83F2
-#define GL_COMPRESSED_RGBA_S3TC_DXT5_EXT 0x83F3
-#endif /* GL_EXT_texture_compression_s3tc */
-
-#ifndef GL_EXT_texture_cube_map_array
-#define GL_EXT_texture_cube_map_array 1
-#define GL_TEXTURE_CUBE_MAP_ARRAY_EXT 0x9009
-#define GL_TEXTURE_BINDING_CUBE_MAP_ARRAY_EXT 0x900A
-#define GL_SAMPLER_CUBE_MAP_ARRAY_EXT 0x900C
-#define GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW_EXT 0x900D
-#define GL_INT_SAMPLER_CUBE_MAP_ARRAY_EXT 0x900E
-#define GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY_EXT 0x900F
-#define GL_IMAGE_CUBE_MAP_ARRAY_EXT 0x9054
-#define GL_INT_IMAGE_CUBE_MAP_ARRAY_EXT 0x905F
-#define GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY_EXT 0x906A
-#endif /* GL_EXT_texture_cube_map_array */
-
-#ifndef GL_EXT_texture_filter_anisotropic
-#define GL_EXT_texture_filter_anisotropic 1
-#define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE
-#define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF
-#endif /* GL_EXT_texture_filter_anisotropic */
-
-#ifndef GL_EXT_texture_format_BGRA8888
-#define GL_EXT_texture_format_BGRA8888 1
-#endif /* GL_EXT_texture_format_BGRA8888 */
-
-#ifndef GL_EXT_texture_norm16
-#define GL_EXT_texture_norm16 1
-#define GL_R16_EXT 0x822A
-#define GL_RG16_EXT 0x822C
-#define GL_RGBA16_EXT 0x805B
-#define GL_RGB16_EXT 0x8054
-#define GL_RGB16_SNORM_EXT 0x8F9A
-#endif /* GL_EXT_texture_norm16 */
-
-#ifndef GL_EXT_texture_rg
-#define GL_EXT_texture_rg 1
-#define GL_RED_EXT 0x1903
-#define GL_RG_EXT 0x8227
-#define GL_R8_EXT 0x8229
-#define GL_RG8_EXT 0x822B
-#endif /* GL_EXT_texture_rg */
-
-#ifndef GL_EXT_texture_sRGB_decode
-#define GL_EXT_texture_sRGB_decode 1
-#define GL_TEXTURE_SRGB_DECODE_EXT 0x8A48
-#define GL_DECODE_EXT 0x8A49
-#define GL_SKIP_DECODE_EXT 0x8A4A
-#endif /* GL_EXT_texture_sRGB_decode */
-
-#ifndef GL_EXT_texture_storage
-#define GL_EXT_texture_storage 1
-#define GL_TEXTURE_IMMUTABLE_FORMAT_EXT 0x912F
-#define GL_ALPHA8_EXT 0x803C
-#define GL_LUMINANCE8_EXT 0x8040
-#define GL_LUMINANCE8_ALPHA8_EXT 0x8045
-#define GL_RGBA32F_EXT 0x8814
-#define GL_RGB32F_EXT 0x8815
-#define GL_ALPHA32F_EXT 0x8816
-#define GL_LUMINANCE32F_EXT 0x8818
-#define GL_LUMINANCE_ALPHA32F_EXT 0x8819
-#define GL_ALPHA16F_EXT 0x881C
-#define GL_LUMINANCE16F_EXT 0x881E
-#define GL_LUMINANCE_ALPHA16F_EXT 0x881F
-#define GL_R32F_EXT 0x822E
-#define GL_RG32F_EXT 0x8230
-typedef void (GL_APIENTRYP PFNGLTEXSTORAGE1DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
-typedef void (GL_APIENTRYP PFNGLTEXSTORAGE2DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
-typedef void (GL_APIENTRYP PFNGLTEXSTORAGE3DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
-typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE1DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
-typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE2DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
-typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE3DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glTexStorage1DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
-GL_APICALL void GL_APIENTRY glTexStorage2DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
-GL_APICALL void GL_APIENTRY glTexStorage3DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
-GL_APICALL void GL_APIENTRY glTextureStorage1DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
-GL_APICALL void GL_APIENTRY glTextureStorage2DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
-GL_APICALL void GL_APIENTRY glTextureStorage3DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
-#endif
-#endif /* GL_EXT_texture_storage */
-
-#ifndef GL_EXT_texture_type_2_10_10_10_REV
-#define GL_EXT_texture_type_2_10_10_10_REV 1
-#define GL_UNSIGNED_INT_2_10_10_10_REV_EXT 0x8368
-#endif /* GL_EXT_texture_type_2_10_10_10_REV */
-
-#ifndef GL_EXT_texture_view
-#define GL_EXT_texture_view 1
-#define GL_TEXTURE_VIEW_MIN_LEVEL_EXT 0x82DB
-#define GL_TEXTURE_VIEW_NUM_LEVELS_EXT 0x82DC
-#define GL_TEXTURE_VIEW_MIN_LAYER_EXT 0x82DD
-#define GL_TEXTURE_VIEW_NUM_LAYERS_EXT 0x82DE
-#define GL_TEXTURE_IMMUTABLE_LEVELS 0x82DF
-typedef void (GL_APIENTRYP PFNGLTEXTUREVIEWEXTPROC) (GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glTextureViewEXT (GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers);
-#endif
-#endif /* GL_EXT_texture_view */
-
-#ifndef GL_EXT_unpack_subimage
-#define GL_EXT_unpack_subimage 1
-#define GL_UNPACK_ROW_LENGTH_EXT 0x0CF2
-#define GL_UNPACK_SKIP_ROWS_EXT 0x0CF3
-#define GL_UNPACK_SKIP_PIXELS_EXT 0x0CF4
-#endif /* GL_EXT_unpack_subimage */
-
-#ifndef GL_FJ_shader_binary_GCCSO
-#define GL_FJ_shader_binary_GCCSO 1
-#define GL_GCCSO_SHADER_BINARY_FJ 0x9260
-#endif /* GL_FJ_shader_binary_GCCSO */
-
-#ifndef GL_IMG_multisampled_render_to_texture
-#define GL_IMG_multisampled_render_to_texture 1
-#define GL_RENDERBUFFER_SAMPLES_IMG 0x9133
-#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_IMG 0x9134
-#define GL_MAX_SAMPLES_IMG 0x9135
-#define GL_TEXTURE_SAMPLES_IMG 0x9136
-typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEIMGPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
-typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEIMGPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleIMG (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
-GL_APICALL void GL_APIENTRY glFramebufferTexture2DMultisampleIMG (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);
-#endif
-#endif /* GL_IMG_multisampled_render_to_texture */
-
-#ifndef GL_IMG_program_binary
-#define GL_IMG_program_binary 1
-#define GL_SGX_PROGRAM_BINARY_IMG 0x9130
-#endif /* GL_IMG_program_binary */
-
-#ifndef GL_IMG_read_format
-#define GL_IMG_read_format 1
-#define GL_BGRA_IMG 0x80E1
-#define GL_UNSIGNED_SHORT_4_4_4_4_REV_IMG 0x8365
-#endif /* GL_IMG_read_format */
-
-#ifndef GL_IMG_shader_binary
-#define GL_IMG_shader_binary 1
-#define GL_SGX_BINARY_IMG 0x8C0A
-#endif /* GL_IMG_shader_binary */
-
-#ifndef GL_IMG_texture_compression_pvrtc
-#define GL_IMG_texture_compression_pvrtc 1
-#define GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG 0x8C00
-#define GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG 0x8C01
-#define GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG 0x8C02
-#define GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG 0x8C03
-#endif /* GL_IMG_texture_compression_pvrtc */
-
-#ifndef GL_IMG_texture_compression_pvrtc2
-#define GL_IMG_texture_compression_pvrtc2 1
-#define GL_COMPRESSED_RGBA_PVRTC_2BPPV2_IMG 0x9137
-#define GL_COMPRESSED_RGBA_PVRTC_4BPPV2_IMG 0x9138
-#endif /* GL_IMG_texture_compression_pvrtc2 */
-
-#ifndef GL_INTEL_performance_query
-#define GL_INTEL_performance_query 1
-#define GL_PERFQUERY_SINGLE_CONTEXT_INTEL 0x00000000
-#define GL_PERFQUERY_GLOBAL_CONTEXT_INTEL 0x00000001
-#define GL_PERFQUERY_WAIT_INTEL 0x83FB
-#define GL_PERFQUERY_FLUSH_INTEL 0x83FA
-#define GL_PERFQUERY_DONOT_FLUSH_INTEL 0x83F9
-#define GL_PERFQUERY_COUNTER_EVENT_INTEL 0x94F0
-#define GL_PERFQUERY_COUNTER_DURATION_NORM_INTEL 0x94F1
-#define GL_PERFQUERY_COUNTER_DURATION_RAW_INTEL 0x94F2
-#define GL_PERFQUERY_COUNTER_THROUGHPUT_INTEL 0x94F3
-#define GL_PERFQUERY_COUNTER_RAW_INTEL 0x94F4
-#define GL_PERFQUERY_COUNTER_TIMESTAMP_INTEL 0x94F5
-#define GL_PERFQUERY_COUNTER_DATA_UINT32_INTEL 0x94F8
-#define GL_PERFQUERY_COUNTER_DATA_UINT64_INTEL 0x94F9
-#define GL_PERFQUERY_COUNTER_DATA_FLOAT_INTEL 0x94FA
-#define GL_PERFQUERY_COUNTER_DATA_DOUBLE_INTEL 0x94FB
-#define GL_PERFQUERY_COUNTER_DATA_BOOL32_INTEL 0x94FC
-#define GL_PERFQUERY_QUERY_NAME_LENGTH_MAX_INTEL 0x94FD
-#define GL_PERFQUERY_COUNTER_NAME_LENGTH_MAX_INTEL 0x94FE
-#define GL_PERFQUERY_COUNTER_DESC_LENGTH_MAX_INTEL 0x94FF
-#define GL_PERFQUERY_GPA_EXTENDED_COUNTERS_INTEL 0x9500
-typedef void (GL_APIENTRYP PFNGLBEGINPERFQUERYINTELPROC) (GLuint queryHandle);
-typedef void (GL_APIENTRYP PFNGLCREATEPERFQUERYINTELPROC) (GLuint queryId, GLuint *queryHandle);
-typedef void (GL_APIENTRYP PFNGLDELETEPERFQUERYINTELPROC) (GLuint queryHandle);
-typedef void (GL_APIENTRYP PFNGLENDPERFQUERYINTELPROC) (GLuint queryHandle);
-typedef void (GL_APIENTRYP PFNGLGETFIRSTPERFQUERYIDINTELPROC) (GLuint *queryId);
-typedef void (GL_APIENTRYP PFNGLGETNEXTPERFQUERYIDINTELPROC) (GLuint queryId, GLuint *nextQueryId);
-typedef void (GL_APIENTRYP PFNGLGETPERFCOUNTERINFOINTELPROC) (GLuint queryId, GLuint counterId, GLuint counterNameLength, GLchar *counterName, GLuint counterDescLength, GLchar *counterDesc, GLuint *counterOffset, GLuint *counterDataSize, GLuint *counterTypeEnum, GLuint *counterDataTypeEnum, GLuint64 *rawCounterMaxValue);
-typedef void (GL_APIENTRYP PFNGLGETPERFQUERYDATAINTELPROC) (GLuint queryHandle, GLuint flags, GLsizei dataSize, GLvoid *data, GLuint *bytesWritten);
-typedef void (GL_APIENTRYP PFNGLGETPERFQUERYIDBYNAMEINTELPROC) (GLchar *queryName, GLuint *queryId);
-typedef void (GL_APIENTRYP PFNGLGETPERFQUERYINFOINTELPROC) (GLuint queryId, GLuint queryNameLength, GLchar *queryName, GLuint *dataSize, GLuint *noCounters, GLuint *noInstances, GLuint *capsMask);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glBeginPerfQueryINTEL (GLuint queryHandle);
-GL_APICALL void GL_APIENTRY glCreatePerfQueryINTEL (GLuint queryId, GLuint *queryHandle);
-GL_APICALL void GL_APIENTRY glDeletePerfQueryINTEL (GLuint queryHandle);
-GL_APICALL void GL_APIENTRY glEndPerfQueryINTEL (GLuint queryHandle);
-GL_APICALL void GL_APIENTRY glGetFirstPerfQueryIdINTEL (GLuint *queryId);
-GL_APICALL void GL_APIENTRY glGetNextPerfQueryIdINTEL (GLuint queryId, GLuint *nextQueryId);
-GL_APICALL void GL_APIENTRY glGetPerfCounterInfoINTEL (GLuint queryId, GLuint counterId, GLuint counterNameLength, GLchar *counterName, GLuint counterDescLength, GLchar *counterDesc, GLuint *counterOffset, GLuint *counterDataSize, GLuint *counterTypeEnum, GLuint *counterDataTypeEnum, GLuint64 *rawCounterMaxValue);
-GL_APICALL void GL_APIENTRY glGetPerfQueryDataINTEL (GLuint queryHandle, GLuint flags, GLsizei dataSize, GLvoid *data, GLuint *bytesWritten);
-GL_APICALL void GL_APIENTRY glGetPerfQueryIdByNameINTEL (GLchar *queryName, GLuint *queryId);
-GL_APICALL void GL_APIENTRY glGetPerfQueryInfoINTEL (GLuint queryId, GLuint queryNameLength, GLchar *queryName, GLuint *dataSize, GLuint *noCounters, GLuint *noInstances, GLuint *capsMask);
-#endif
-#endif /* GL_INTEL_performance_query */
-
-#ifndef GL_NV_bindless_texture
-#define GL_NV_bindless_texture 1
-typedef GLuint64 (GL_APIENTRYP PFNGLGETTEXTUREHANDLENVPROC) (GLuint texture);
-typedef GLuint64 (GL_APIENTRYP PFNGLGETTEXTURESAMPLERHANDLENVPROC) (GLuint texture, GLuint sampler);
-typedef void (GL_APIENTRYP PFNGLMAKETEXTUREHANDLERESIDENTNVPROC) (GLuint64 handle);
-typedef void (GL_APIENTRYP PFNGLMAKETEXTUREHANDLENONRESIDENTNVPROC) (GLuint64 handle);
-typedef GLuint64 (GL_APIENTRYP PFNGLGETIMAGEHANDLENVPROC) (GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum format);
-typedef void (GL_APIENTRYP PFNGLMAKEIMAGEHANDLERESIDENTNVPROC) (GLuint64 handle, GLenum access);
-typedef void (GL_APIENTRYP PFNGLMAKEIMAGEHANDLENONRESIDENTNVPROC) (GLuint64 handle);
-typedef void (GL_APIENTRYP PFNGLUNIFORMHANDLEUI64NVPROC) (GLint location, GLuint64 value);
-typedef void (GL_APIENTRYP PFNGLUNIFORMHANDLEUI64VNVPROC) (GLint location, GLsizei count, const GLuint64 *value);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMHANDLEUI64NVPROC) (GLuint program, GLint location, GLuint64 value);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMHANDLEUI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64 *values);
-typedef GLboolean (GL_APIENTRYP PFNGLISTEXTUREHANDLERESIDENTNVPROC) (GLuint64 handle);
-typedef GLboolean (GL_APIENTRYP PFNGLISIMAGEHANDLERESIDENTNVPROC) (GLuint64 handle);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL GLuint64 GL_APIENTRY glGetTextureHandleNV (GLuint texture);
-GL_APICALL GLuint64 GL_APIENTRY glGetTextureSamplerHandleNV (GLuint texture, GLuint sampler);
-GL_APICALL void GL_APIENTRY glMakeTextureHandleResidentNV (GLuint64 handle);
-GL_APICALL void GL_APIENTRY glMakeTextureHandleNonResidentNV (GLuint64 handle);
-GL_APICALL GLuint64 GL_APIENTRY glGetImageHandleNV (GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum format);
-GL_APICALL void GL_APIENTRY glMakeImageHandleResidentNV (GLuint64 handle, GLenum access);
-GL_APICALL void GL_APIENTRY glMakeImageHandleNonResidentNV (GLuint64 handle);
-GL_APICALL void GL_APIENTRY glUniformHandleui64NV (GLint location, GLuint64 value);
-GL_APICALL void GL_APIENTRY glUniformHandleui64vNV (GLint location, GLsizei count, const GLuint64 *value);
-GL_APICALL void GL_APIENTRY glProgramUniformHandleui64NV (GLuint program, GLint location, GLuint64 value);
-GL_APICALL void GL_APIENTRY glProgramUniformHandleui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64 *values);
-GL_APICALL GLboolean GL_APIENTRY glIsTextureHandleResidentNV (GLuint64 handle);
-GL_APICALL GLboolean GL_APIENTRY glIsImageHandleResidentNV (GLuint64 handle);
-#endif
-#endif /* GL_NV_bindless_texture */
-
-#ifndef GL_NV_blend_equation_advanced
-#define GL_NV_blend_equation_advanced 1
-#define GL_BLEND_OVERLAP_NV 0x9281
-#define GL_BLEND_PREMULTIPLIED_SRC_NV 0x9280
-#define GL_BLUE_NV 0x1905
-#define GL_COLORBURN_NV 0x929A
-#define GL_COLORDODGE_NV 0x9299
-#define GL_CONJOINT_NV 0x9284
-#define GL_CONTRAST_NV 0x92A1
-#define GL_DARKEN_NV 0x9297
-#define GL_DIFFERENCE_NV 0x929E
-#define GL_DISJOINT_NV 0x9283
-#define GL_DST_ATOP_NV 0x928F
-#define GL_DST_IN_NV 0x928B
-#define GL_DST_NV 0x9287
-#define GL_DST_OUT_NV 0x928D
-#define GL_DST_OVER_NV 0x9289
-#define GL_EXCLUSION_NV 0x92A0
-#define GL_GREEN_NV 0x1904
-#define GL_HARDLIGHT_NV 0x929B
-#define GL_HARDMIX_NV 0x92A9
-#define GL_HSL_COLOR_NV 0x92AF
-#define GL_HSL_HUE_NV 0x92AD
-#define GL_HSL_LUMINOSITY_NV 0x92B0
-#define GL_HSL_SATURATION_NV 0x92AE
-#define GL_INVERT_OVG_NV 0x92B4
-#define GL_INVERT_RGB_NV 0x92A3
-#define GL_LIGHTEN_NV 0x9298
-#define GL_LINEARBURN_NV 0x92A5
-#define GL_LINEARDODGE_NV 0x92A4
-#define GL_LINEARLIGHT_NV 0x92A7
-#define GL_MINUS_CLAMPED_NV 0x92B3
-#define GL_MINUS_NV 0x929F
-#define GL_MULTIPLY_NV 0x9294
-#define GL_OVERLAY_NV 0x9296
-#define GL_PINLIGHT_NV 0x92A8
-#define GL_PLUS_CLAMPED_ALPHA_NV 0x92B2
-#define GL_PLUS_CLAMPED_NV 0x92B1
-#define GL_PLUS_DARKER_NV 0x9292
-#define GL_PLUS_NV 0x9291
-#define GL_RED_NV 0x1903
-#define GL_SCREEN_NV 0x9295
-#define GL_SOFTLIGHT_NV 0x929C
-#define GL_SRC_ATOP_NV 0x928E
-#define GL_SRC_IN_NV 0x928A
-#define GL_SRC_NV 0x9286
-#define GL_SRC_OUT_NV 0x928C
-#define GL_SRC_OVER_NV 0x9288
-#define GL_UNCORRELATED_NV 0x9282
-#define GL_VIVIDLIGHT_NV 0x92A6
-#define GL_XOR_NV 0x1506
-typedef void (GL_APIENTRYP PFNGLBLENDPARAMETERINVPROC) (GLenum pname, GLint value);
-typedef void (GL_APIENTRYP PFNGLBLENDBARRIERNVPROC) (void);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glBlendParameteriNV (GLenum pname, GLint value);
-GL_APICALL void GL_APIENTRY glBlendBarrierNV (void);
-#endif
-#endif /* GL_NV_blend_equation_advanced */
-
-#ifndef GL_NV_blend_equation_advanced_coherent
-#define GL_NV_blend_equation_advanced_coherent 1
-#define GL_BLEND_ADVANCED_COHERENT_NV 0x9285
-#endif /* GL_NV_blend_equation_advanced_coherent */
-
-#ifndef GL_NV_conditional_render
-#define GL_NV_conditional_render 1
-#define GL_QUERY_WAIT_NV 0x8E13
-#define GL_QUERY_NO_WAIT_NV 0x8E14
-#define GL_QUERY_BY_REGION_WAIT_NV 0x8E15
-#define GL_QUERY_BY_REGION_NO_WAIT_NV 0x8E16
-typedef void (GL_APIENTRYP PFNGLBEGINCONDITIONALRENDERNVPROC) (GLuint id, GLenum mode);
-typedef void (GL_APIENTRYP PFNGLENDCONDITIONALRENDERNVPROC) (void);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glBeginConditionalRenderNV (GLuint id, GLenum mode);
-GL_APICALL void GL_APIENTRY glEndConditionalRenderNV (void);
-#endif
-#endif /* GL_NV_conditional_render */
-
-#ifndef GL_NV_copy_buffer
-#define GL_NV_copy_buffer 1
-#define GL_COPY_READ_BUFFER_NV 0x8F36
-#define GL_COPY_WRITE_BUFFER_NV 0x8F37
-typedef void (GL_APIENTRYP PFNGLCOPYBUFFERSUBDATANVPROC) (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glCopyBufferSubDataNV (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
-#endif
-#endif /* GL_NV_copy_buffer */
-
-#ifndef GL_NV_coverage_sample
-#define GL_NV_coverage_sample 1
-#define GL_COVERAGE_COMPONENT_NV 0x8ED0
-#define GL_COVERAGE_COMPONENT4_NV 0x8ED1
-#define GL_COVERAGE_ATTACHMENT_NV 0x8ED2
-#define GL_COVERAGE_BUFFERS_NV 0x8ED3
-#define GL_COVERAGE_SAMPLES_NV 0x8ED4
-#define GL_COVERAGE_ALL_FRAGMENTS_NV 0x8ED5
-#define GL_COVERAGE_EDGE_FRAGMENTS_NV 0x8ED6
-#define GL_COVERAGE_AUTOMATIC_NV 0x8ED7
-#define GL_COVERAGE_BUFFER_BIT_NV 0x00008000
-typedef void (GL_APIENTRYP PFNGLCOVERAGEMASKNVPROC) (GLboolean mask);
-typedef void (GL_APIENTRYP PFNGLCOVERAGEOPERATIONNVPROC) (GLenum operation);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glCoverageMaskNV (GLboolean mask);
-GL_APICALL void GL_APIENTRY glCoverageOperationNV (GLenum operation);
-#endif
-#endif /* GL_NV_coverage_sample */
-
-#ifndef GL_NV_depth_nonlinear
-#define GL_NV_depth_nonlinear 1
-#define GL_DEPTH_COMPONENT16_NONLINEAR_NV 0x8E2C
-#endif /* GL_NV_depth_nonlinear */
-
-#ifndef GL_NV_draw_buffers
-#define GL_NV_draw_buffers 1
-#define GL_MAX_DRAW_BUFFERS_NV 0x8824
-#define GL_DRAW_BUFFER0_NV 0x8825
-#define GL_DRAW_BUFFER1_NV 0x8826
-#define GL_DRAW_BUFFER2_NV 0x8827
-#define GL_DRAW_BUFFER3_NV 0x8828
-#define GL_DRAW_BUFFER4_NV 0x8829
-#define GL_DRAW_BUFFER5_NV 0x882A
-#define GL_DRAW_BUFFER6_NV 0x882B
-#define GL_DRAW_BUFFER7_NV 0x882C
-#define GL_DRAW_BUFFER8_NV 0x882D
-#define GL_DRAW_BUFFER9_NV 0x882E
-#define GL_DRAW_BUFFER10_NV 0x882F
-#define GL_DRAW_BUFFER11_NV 0x8830
-#define GL_DRAW_BUFFER12_NV 0x8831
-#define GL_DRAW_BUFFER13_NV 0x8832
-#define GL_DRAW_BUFFER14_NV 0x8833
-#define GL_DRAW_BUFFER15_NV 0x8834
-#define GL_COLOR_ATTACHMENT0_NV 0x8CE0
-#define GL_COLOR_ATTACHMENT1_NV 0x8CE1
-#define GL_COLOR_ATTACHMENT2_NV 0x8CE2
-#define GL_COLOR_ATTACHMENT3_NV 0x8CE3
-#define GL_COLOR_ATTACHMENT4_NV 0x8CE4
-#define GL_COLOR_ATTACHMENT5_NV 0x8CE5
-#define GL_COLOR_ATTACHMENT6_NV 0x8CE6
-#define GL_COLOR_ATTACHMENT7_NV 0x8CE7
-#define GL_COLOR_ATTACHMENT8_NV 0x8CE8
-#define GL_COLOR_ATTACHMENT9_NV 0x8CE9
-#define GL_COLOR_ATTACHMENT10_NV 0x8CEA
-#define GL_COLOR_ATTACHMENT11_NV 0x8CEB
-#define GL_COLOR_ATTACHMENT12_NV 0x8CEC
-#define GL_COLOR_ATTACHMENT13_NV 0x8CED
-#define GL_COLOR_ATTACHMENT14_NV 0x8CEE
-#define GL_COLOR_ATTACHMENT15_NV 0x8CEF
-typedef void (GL_APIENTRYP PFNGLDRAWBUFFERSNVPROC) (GLsizei n, const GLenum *bufs);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glDrawBuffersNV (GLsizei n, const GLenum *bufs);
-#endif
-#endif /* GL_NV_draw_buffers */
-
-#ifndef GL_NV_draw_instanced
-#define GL_NV_draw_instanced 1
-typedef void (GL_APIENTRYP PFNGLDRAWARRAYSINSTANCEDNVPROC) (GLenum mode, GLint first, GLsizei count, GLsizei primcount);
-typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSINSTANCEDNVPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glDrawArraysInstancedNV (GLenum mode, GLint first, GLsizei count, GLsizei primcount);
-GL_APICALL void GL_APIENTRY glDrawElementsInstancedNV (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount);
-#endif
-#endif /* GL_NV_draw_instanced */
-
-#ifndef GL_NV_explicit_attrib_location
-#define GL_NV_explicit_attrib_location 1
-#endif /* GL_NV_explicit_attrib_location */
-
-#ifndef GL_NV_fbo_color_attachments
-#define GL_NV_fbo_color_attachments 1
-#define GL_MAX_COLOR_ATTACHMENTS_NV 0x8CDF
-#endif /* GL_NV_fbo_color_attachments */
-
-#ifndef GL_NV_fence
-#define GL_NV_fence 1
-#define GL_ALL_COMPLETED_NV 0x84F2
-#define GL_FENCE_STATUS_NV 0x84F3
-#define GL_FENCE_CONDITION_NV 0x84F4
-typedef void (GL_APIENTRYP PFNGLDELETEFENCESNVPROC) (GLsizei n, const GLuint *fences);
-typedef void (GL_APIENTRYP PFNGLGENFENCESNVPROC) (GLsizei n, GLuint *fences);
-typedef GLboolean (GL_APIENTRYP PFNGLISFENCENVPROC) (GLuint fence);
-typedef GLboolean (GL_APIENTRYP PFNGLTESTFENCENVPROC) (GLuint fence);
-typedef void (GL_APIENTRYP PFNGLGETFENCEIVNVPROC) (GLuint fence, GLenum pname, GLint *params);
-typedef void (GL_APIENTRYP PFNGLFINISHFENCENVPROC) (GLuint fence);
-typedef void (GL_APIENTRYP PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glDeleteFencesNV (GLsizei n, const GLuint *fences);
-GL_APICALL void GL_APIENTRY glGenFencesNV (GLsizei n, GLuint *fences);
-GL_APICALL GLboolean GL_APIENTRY glIsFenceNV (GLuint fence);
-GL_APICALL GLboolean GL_APIENTRY glTestFenceNV (GLuint fence);
-GL_APICALL void GL_APIENTRY glGetFenceivNV (GLuint fence, GLenum pname, GLint *params);
-GL_APICALL void GL_APIENTRY glFinishFenceNV (GLuint fence);
-GL_APICALL void GL_APIENTRY glSetFenceNV (GLuint fence, GLenum condition);
-#endif
-#endif /* GL_NV_fence */
-
-#ifndef GL_NV_framebuffer_blit
-#define GL_NV_framebuffer_blit 1
-#define GL_READ_FRAMEBUFFER_NV 0x8CA8
-#define GL_DRAW_FRAMEBUFFER_NV 0x8CA9
-#define GL_DRAW_FRAMEBUFFER_BINDING_NV 0x8CA6
-#define GL_READ_FRAMEBUFFER_BINDING_NV 0x8CAA
-typedef void (GL_APIENTRYP PFNGLBLITFRAMEBUFFERNVPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glBlitFramebufferNV (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
-#endif
-#endif /* GL_NV_framebuffer_blit */
-
-#ifndef GL_NV_framebuffer_multisample
-#define GL_NV_framebuffer_multisample 1
-#define GL_RENDERBUFFER_SAMPLES_NV 0x8CAB
-#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_NV 0x8D56
-#define GL_MAX_SAMPLES_NV 0x8D57
-typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLENVPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleNV (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
-#endif
-#endif /* GL_NV_framebuffer_multisample */
-
-#ifndef GL_NV_generate_mipmap_sRGB
-#define GL_NV_generate_mipmap_sRGB 1
-#endif /* GL_NV_generate_mipmap_sRGB */
-
-#ifndef GL_NV_image_formats
-#define GL_NV_image_formats 1
-#endif /* GL_NV_image_formats */
-
-#ifndef GL_NV_instanced_arrays
-#define GL_NV_instanced_arrays 1
-#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR_NV 0x88FE
-typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBDIVISORNVPROC) (GLuint index, GLuint divisor);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glVertexAttribDivisorNV (GLuint index, GLuint divisor);
-#endif
-#endif /* GL_NV_instanced_arrays */
-
-#ifndef GL_NV_internalformat_sample_query
-#define GL_NV_internalformat_sample_query 1
-#define GL_TEXTURE_2D_MULTISAMPLE 0x9100
-#define GL_TEXTURE_2D_MULTISAMPLE_ARRAY 0x9102
-#define GL_MULTISAMPLES_NV 0x9371
-#define GL_SUPERSAMPLE_SCALE_X_NV 0x9372
-#define GL_SUPERSAMPLE_SCALE_Y_NV 0x9373
-#define GL_CONFORMANT_NV 0x9374
-typedef void (GL_APIENTRYP PFNGLGETINTERNALFORMATSAMPLEIVNVPROC) (GLenum target, GLenum internalformat, GLsizei samples, GLenum pname, GLsizei bufSize, GLint *params);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glGetInternalformatSampleivNV (GLenum target, GLenum internalformat, GLsizei samples, GLenum pname, GLsizei bufSize, GLint *params);
-#endif
-#endif /* GL_NV_internalformat_sample_query */
-
-#ifndef GL_NV_non_square_matrices
-#define GL_NV_non_square_matrices 1
-#define GL_FLOAT_MAT2x3_NV 0x8B65
-#define GL_FLOAT_MAT2x4_NV 0x8B66
-#define GL_FLOAT_MAT3x2_NV 0x8B67
-#define GL_FLOAT_MAT3x4_NV 0x8B68
-#define GL_FLOAT_MAT4x2_NV 0x8B69
-#define GL_FLOAT_MAT4x3_NV 0x8B6A
-typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX2X3FVNVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX3X2FVNVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX2X4FVNVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX4X2FVNVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX3X4FVNVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX4X3FVNVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glUniformMatrix2x3fvNV (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glUniformMatrix3x2fvNV (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glUniformMatrix2x4fvNV (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glUniformMatrix4x2fvNV (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glUniformMatrix3x4fvNV (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glUniformMatrix4x3fvNV (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-#endif
-#endif /* GL_NV_non_square_matrices */
-
-#ifndef GL_NV_path_rendering
-#define GL_NV_path_rendering 1
-#define GL_PATH_FORMAT_SVG_NV 0x9070
-#define GL_PATH_FORMAT_PS_NV 0x9071
-#define GL_STANDARD_FONT_NAME_NV 0x9072
-#define GL_SYSTEM_FONT_NAME_NV 0x9073
-#define GL_FILE_NAME_NV 0x9074
-#define GL_PATH_STROKE_WIDTH_NV 0x9075
-#define GL_PATH_END_CAPS_NV 0x9076
-#define GL_PATH_INITIAL_END_CAP_NV 0x9077
-#define GL_PATH_TERMINAL_END_CAP_NV 0x9078
-#define GL_PATH_JOIN_STYLE_NV 0x9079
-#define GL_PATH_MITER_LIMIT_NV 0x907A
-#define GL_PATH_DASH_CAPS_NV 0x907B
-#define GL_PATH_INITIAL_DASH_CAP_NV 0x907C
-#define GL_PATH_TERMINAL_DASH_CAP_NV 0x907D
-#define GL_PATH_DASH_OFFSET_NV 0x907E
-#define GL_PATH_CLIENT_LENGTH_NV 0x907F
-#define GL_PATH_FILL_MODE_NV 0x9080
-#define GL_PATH_FILL_MASK_NV 0x9081
-#define GL_PATH_FILL_COVER_MODE_NV 0x9082
-#define GL_PATH_STROKE_COVER_MODE_NV 0x9083
-#define GL_PATH_STROKE_MASK_NV 0x9084
-#define GL_COUNT_UP_NV 0x9088
-#define GL_COUNT_DOWN_NV 0x9089
-#define GL_PATH_OBJECT_BOUNDING_BOX_NV 0x908A
-#define GL_CONVEX_HULL_NV 0x908B
-#define GL_BOUNDING_BOX_NV 0x908D
-#define GL_TRANSLATE_X_NV 0x908E
-#define GL_TRANSLATE_Y_NV 0x908F
-#define GL_TRANSLATE_2D_NV 0x9090
-#define GL_TRANSLATE_3D_NV 0x9091
-#define GL_AFFINE_2D_NV 0x9092
-#define GL_AFFINE_3D_NV 0x9094
-#define GL_TRANSPOSE_AFFINE_2D_NV 0x9096
-#define GL_TRANSPOSE_AFFINE_3D_NV 0x9098
-#define GL_UTF8_NV 0x909A
-#define GL_UTF16_NV 0x909B
-#define GL_BOUNDING_BOX_OF_BOUNDING_BOXES_NV 0x909C
-#define GL_PATH_COMMAND_COUNT_NV 0x909D
-#define GL_PATH_COORD_COUNT_NV 0x909E
-#define GL_PATH_DASH_ARRAY_COUNT_NV 0x909F
-#define GL_PATH_COMPUTED_LENGTH_NV 0x90A0
-#define GL_PATH_FILL_BOUNDING_BOX_NV 0x90A1
-#define GL_PATH_STROKE_BOUNDING_BOX_NV 0x90A2
-#define GL_SQUARE_NV 0x90A3
-#define GL_ROUND_NV 0x90A4
-#define GL_TRIANGULAR_NV 0x90A5
-#define GL_BEVEL_NV 0x90A6
-#define GL_MITER_REVERT_NV 0x90A7
-#define GL_MITER_TRUNCATE_NV 0x90A8
-#define GL_SKIP_MISSING_GLYPH_NV 0x90A9
-#define GL_USE_MISSING_GLYPH_NV 0x90AA
-#define GL_PATH_ERROR_POSITION_NV 0x90AB
-#define GL_ACCUM_ADJACENT_PAIRS_NV 0x90AD
-#define GL_ADJACENT_PAIRS_NV 0x90AE
-#define GL_FIRST_TO_REST_NV 0x90AF
-#define GL_PATH_GEN_MODE_NV 0x90B0
-#define GL_PATH_GEN_COEFF_NV 0x90B1
-#define GL_PATH_GEN_COMPONENTS_NV 0x90B3
-#define GL_PATH_STENCIL_FUNC_NV 0x90B7
-#define GL_PATH_STENCIL_REF_NV 0x90B8
-#define GL_PATH_STENCIL_VALUE_MASK_NV 0x90B9
-#define GL_PATH_STENCIL_DEPTH_OFFSET_FACTOR_NV 0x90BD
-#define GL_PATH_STENCIL_DEPTH_OFFSET_UNITS_NV 0x90BE
-#define GL_PATH_COVER_DEPTH_FUNC_NV 0x90BF
-#define GL_PATH_DASH_OFFSET_RESET_NV 0x90B4
-#define GL_MOVE_TO_RESETS_NV 0x90B5
-#define GL_MOVE_TO_CONTINUES_NV 0x90B6
-#define GL_CLOSE_PATH_NV 0x00
-#define GL_MOVE_TO_NV 0x02
-#define GL_RELATIVE_MOVE_TO_NV 0x03
-#define GL_LINE_TO_NV 0x04
-#define GL_RELATIVE_LINE_TO_NV 0x05
-#define GL_HORIZONTAL_LINE_TO_NV 0x06
-#define GL_RELATIVE_HORIZONTAL_LINE_TO_NV 0x07
-#define GL_VERTICAL_LINE_TO_NV 0x08
-#define GL_RELATIVE_VERTICAL_LINE_TO_NV 0x09
-#define GL_QUADRATIC_CURVE_TO_NV 0x0A
-#define GL_RELATIVE_QUADRATIC_CURVE_TO_NV 0x0B
-#define GL_CUBIC_CURVE_TO_NV 0x0C
-#define GL_RELATIVE_CUBIC_CURVE_TO_NV 0x0D
-#define GL_SMOOTH_QUADRATIC_CURVE_TO_NV 0x0E
-#define GL_RELATIVE_SMOOTH_QUADRATIC_CURVE_TO_NV 0x0F
-#define GL_SMOOTH_CUBIC_CURVE_TO_NV 0x10
-#define GL_RELATIVE_SMOOTH_CUBIC_CURVE_TO_NV 0x11
-#define GL_SMALL_CCW_ARC_TO_NV 0x12
-#define GL_RELATIVE_SMALL_CCW_ARC_TO_NV 0x13
-#define GL_SMALL_CW_ARC_TO_NV 0x14
-#define GL_RELATIVE_SMALL_CW_ARC_TO_NV 0x15
-#define GL_LARGE_CCW_ARC_TO_NV 0x16
-#define GL_RELATIVE_LARGE_CCW_ARC_TO_NV 0x17
-#define GL_LARGE_CW_ARC_TO_NV 0x18
-#define GL_RELATIVE_LARGE_CW_ARC_TO_NV 0x19
-#define GL_RESTART_PATH_NV 0xF0
-#define GL_DUP_FIRST_CUBIC_CURVE_TO_NV 0xF2
-#define GL_DUP_LAST_CUBIC_CURVE_TO_NV 0xF4
-#define GL_RECT_NV 0xF6
-#define GL_CIRCULAR_CCW_ARC_TO_NV 0xF8
-#define GL_CIRCULAR_CW_ARC_TO_NV 0xFA
-#define GL_CIRCULAR_TANGENT_ARC_TO_NV 0xFC
-#define GL_ARC_TO_NV 0xFE
-#define GL_RELATIVE_ARC_TO_NV 0xFF
-#define GL_BOLD_BIT_NV 0x01
-#define GL_ITALIC_BIT_NV 0x02
-#define GL_GLYPH_WIDTH_BIT_NV 0x01
-#define GL_GLYPH_HEIGHT_BIT_NV 0x02
-#define GL_GLYPH_HORIZONTAL_BEARING_X_BIT_NV 0x04
-#define GL_GLYPH_HORIZONTAL_BEARING_Y_BIT_NV 0x08
-#define GL_GLYPH_HORIZONTAL_BEARING_ADVANCE_BIT_NV 0x10
-#define GL_GLYPH_VERTICAL_BEARING_X_BIT_NV 0x20
-#define GL_GLYPH_VERTICAL_BEARING_Y_BIT_NV 0x40
-#define GL_GLYPH_VERTICAL_BEARING_ADVANCE_BIT_NV 0x80
-#define GL_GLYPH_HAS_KERNING_BIT_NV 0x100
-#define GL_FONT_X_MIN_BOUNDS_BIT_NV 0x00010000
-#define GL_FONT_Y_MIN_BOUNDS_BIT_NV 0x00020000
-#define GL_FONT_X_MAX_BOUNDS_BIT_NV 0x00040000
-#define GL_FONT_Y_MAX_BOUNDS_BIT_NV 0x00080000
-#define GL_FONT_UNITS_PER_EM_BIT_NV 0x00100000
-#define GL_FONT_ASCENDER_BIT_NV 0x00200000
-#define GL_FONT_DESCENDER_BIT_NV 0x00400000
-#define GL_FONT_HEIGHT_BIT_NV 0x00800000
-#define GL_FONT_MAX_ADVANCE_WIDTH_BIT_NV 0x01000000
-#define GL_FONT_MAX_ADVANCE_HEIGHT_BIT_NV 0x02000000
-#define GL_FONT_UNDERLINE_POSITION_BIT_NV 0x04000000
-#define GL_FONT_UNDERLINE_THICKNESS_BIT_NV 0x08000000
-#define GL_FONT_HAS_KERNING_BIT_NV 0x10000000
-#define GL_ROUNDED_RECT_NV 0xE8
-#define GL_RELATIVE_ROUNDED_RECT_NV 0xE9
-#define GL_ROUNDED_RECT2_NV 0xEA
-#define GL_RELATIVE_ROUNDED_RECT2_NV 0xEB
-#define GL_ROUNDED_RECT4_NV 0xEC
-#define GL_RELATIVE_ROUNDED_RECT4_NV 0xED
-#define GL_ROUNDED_RECT8_NV 0xEE
-#define GL_RELATIVE_ROUNDED_RECT8_NV 0xEF
-#define GL_RELATIVE_RECT_NV 0xF7
-#define GL_FONT_GLYPHS_AVAILABLE_NV 0x9368
-#define GL_FONT_TARGET_UNAVAILABLE_NV 0x9369
-#define GL_FONT_UNAVAILABLE_NV 0x936A
-#define GL_FONT_UNINTELLIGIBLE_NV 0x936B
-#define GL_CONIC_CURVE_TO_NV 0x1A
-#define GL_RELATIVE_CONIC_CURVE_TO_NV 0x1B
-#define GL_FONT_NUM_GLYPH_INDICES_BIT_NV 0x20000000
-#define GL_STANDARD_FONT_FORMAT_NV 0x936C
-#define GL_PATH_PROJECTION_NV 0x1701
-#define GL_PATH_MODELVIEW_NV 0x1700
-#define GL_PATH_MODELVIEW_STACK_DEPTH_NV 0x0BA3
-#define GL_PATH_MODELVIEW_MATRIX_NV 0x0BA6
-#define GL_PATH_MAX_MODELVIEW_STACK_DEPTH_NV 0x0D36
-#define GL_PATH_TRANSPOSE_MODELVIEW_MATRIX_NV 0x84E3
-#define GL_PATH_PROJECTION_STACK_DEPTH_NV 0x0BA4
-#define GL_PATH_PROJECTION_MATRIX_NV 0x0BA7
-#define GL_PATH_MAX_PROJECTION_STACK_DEPTH_NV 0x0D38
-#define GL_PATH_TRANSPOSE_PROJECTION_MATRIX_NV 0x84E4
-#define GL_FRAGMENT_INPUT_NV 0x936D
-typedef GLuint (GL_APIENTRYP PFNGLGENPATHSNVPROC) (GLsizei range);
-typedef void (GL_APIENTRYP PFNGLDELETEPATHSNVPROC) (GLuint path, GLsizei range);
-typedef GLboolean (GL_APIENTRYP PFNGLISPATHNVPROC) (GLuint path);
-typedef void (GL_APIENTRYP PFNGLPATHCOMMANDSNVPROC) (GLuint path, GLsizei numCommands, const GLubyte *commands, GLsizei numCoords, GLenum coordType, const void *coords);
-typedef void (GL_APIENTRYP PFNGLPATHCOORDSNVPROC) (GLuint path, GLsizei numCoords, GLenum coordType, const void *coords);
-typedef void (GL_APIENTRYP PFNGLPATHSUBCOMMANDSNVPROC) (GLuint path, GLsizei commandStart, GLsizei commandsToDelete, GLsizei numCommands, const GLubyte *commands, GLsizei numCoords, GLenum coordType, const void *coords);
-typedef void (GL_APIENTRYP PFNGLPATHSUBCOORDSNVPROC) (GLuint path, GLsizei coordStart, GLsizei numCoords, GLenum coordType, const void *coords);
-typedef void (GL_APIENTRYP PFNGLPATHSTRINGNVPROC) (GLuint path, GLenum format, GLsizei length, const void *pathString);
-typedef void (GL_APIENTRYP PFNGLPATHGLYPHSNVPROC) (GLuint firstPathName, GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLsizei numGlyphs, GLenum type, const void *charcodes, GLenum handleMissingGlyphs, GLuint pathParameterTemplate, GLfloat emScale);
-typedef void (GL_APIENTRYP PFNGLPATHGLYPHRANGENVPROC) (GLuint firstPathName, GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLuint firstGlyph, GLsizei numGlyphs, GLenum handleMissingGlyphs, GLuint pathParameterTemplate, GLfloat emScale);
-typedef void (GL_APIENTRYP PFNGLWEIGHTPATHSNVPROC) (GLuint resultPath, GLsizei numPaths, const GLuint *paths, const GLfloat *weights);
-typedef void (GL_APIENTRYP PFNGLCOPYPATHNVPROC) (GLuint resultPath, GLuint srcPath);
-typedef void (GL_APIENTRYP PFNGLINTERPOLATEPATHSNVPROC) (GLuint resultPath, GLuint pathA, GLuint pathB, GLfloat weight);
-typedef void (GL_APIENTRYP PFNGLTRANSFORMPATHNVPROC) (GLuint resultPath, GLuint srcPath, GLenum transformType, const GLfloat *transformValues);
-typedef void (GL_APIENTRYP PFNGLPATHPARAMETERIVNVPROC) (GLuint path, GLenum pname, const GLint *value);
-typedef void (GL_APIENTRYP PFNGLPATHPARAMETERINVPROC) (GLuint path, GLenum pname, GLint value);
-typedef void (GL_APIENTRYP PFNGLPATHPARAMETERFVNVPROC) (GLuint path, GLenum pname, const GLfloat *value);
-typedef void (GL_APIENTRYP PFNGLPATHPARAMETERFNVPROC) (GLuint path, GLenum pname, GLfloat value);
-typedef void (GL_APIENTRYP PFNGLPATHDASHARRAYNVPROC) (GLuint path, GLsizei dashCount, const GLfloat *dashArray);
-typedef void (GL_APIENTRYP PFNGLPATHSTENCILFUNCNVPROC) (GLenum func, GLint ref, GLuint mask);
-typedef void (GL_APIENTRYP PFNGLPATHSTENCILDEPTHOFFSETNVPROC) (GLfloat factor, GLfloat units);
-typedef void (GL_APIENTRYP PFNGLSTENCILFILLPATHNVPROC) (GLuint path, GLenum fillMode, GLuint mask);
-typedef void (GL_APIENTRYP PFNGLSTENCILSTROKEPATHNVPROC) (GLuint path, GLint reference, GLuint mask);
-typedef void (GL_APIENTRYP PFNGLSTENCILFILLPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum fillMode, GLuint mask, GLenum transformType, const GLfloat *transformValues);
-typedef void (GL_APIENTRYP PFNGLSTENCILSTROKEPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLint reference, GLuint mask, GLenum transformType, const GLfloat *transformValues);
-typedef void (GL_APIENTRYP PFNGLPATHCOVERDEPTHFUNCNVPROC) (GLenum func);
-typedef void (GL_APIENTRYP PFNGLCOVERFILLPATHNVPROC) (GLuint path, GLenum coverMode);
-typedef void (GL_APIENTRYP PFNGLCOVERSTROKEPATHNVPROC) (GLuint path, GLenum coverMode);
-typedef void (GL_APIENTRYP PFNGLCOVERFILLPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues);
-typedef void (GL_APIENTRYP PFNGLCOVERSTROKEPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues);
-typedef void (GL_APIENTRYP PFNGLGETPATHPARAMETERIVNVPROC) (GLuint path, GLenum pname, GLint *value);
-typedef void (GL_APIENTRYP PFNGLGETPATHPARAMETERFVNVPROC) (GLuint path, GLenum pname, GLfloat *value);
-typedef void (GL_APIENTRYP PFNGLGETPATHCOMMANDSNVPROC) (GLuint path, GLubyte *commands);
-typedef void (GL_APIENTRYP PFNGLGETPATHCOORDSNVPROC) (GLuint path, GLfloat *coords);
-typedef void (GL_APIENTRYP PFNGLGETPATHDASHARRAYNVPROC) (GLuint path, GLfloat *dashArray);
-typedef void (GL_APIENTRYP PFNGLGETPATHMETRICSNVPROC) (GLbitfield metricQueryMask, GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLsizei stride, GLfloat *metrics);
-typedef void (GL_APIENTRYP PFNGLGETPATHMETRICRANGENVPROC) (GLbitfield metricQueryMask, GLuint firstPathName, GLsizei numPaths, GLsizei stride, GLfloat *metrics);
-typedef void (GL_APIENTRYP PFNGLGETPATHSPACINGNVPROC) (GLenum pathListMode, GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLfloat advanceScale, GLfloat kerningScale, GLenum transformType, GLfloat *returnedSpacing);
-typedef GLboolean (GL_APIENTRYP PFNGLISPOINTINFILLPATHNVPROC) (GLuint path, GLuint mask, GLfloat x, GLfloat y);
-typedef GLboolean (GL_APIENTRYP PFNGLISPOINTINSTROKEPATHNVPROC) (GLuint path, GLfloat x, GLfloat y);
-typedef GLfloat (GL_APIENTRYP PFNGLGETPATHLENGTHNVPROC) (GLuint path, GLsizei startSegment, GLsizei numSegments);
-typedef GLboolean (GL_APIENTRYP PFNGLPOINTALONGPATHNVPROC) (GLuint path, GLsizei startSegment, GLsizei numSegments, GLfloat distance, GLfloat *x, GLfloat *y, GLfloat *tangentX, GLfloat *tangentY);
-typedef void (GL_APIENTRYP PFNGLMATRIXLOAD3X2FNVPROC) (GLenum matrixMode, const GLfloat *m);
-typedef void (GL_APIENTRYP PFNGLMATRIXLOAD3X3FNVPROC) (GLenum matrixMode, const GLfloat *m);
-typedef void (GL_APIENTRYP PFNGLMATRIXLOADTRANSPOSE3X3FNVPROC) (GLenum matrixMode, const GLfloat *m);
-typedef void (GL_APIENTRYP PFNGLMATRIXMULT3X2FNVPROC) (GLenum matrixMode, const GLfloat *m);
-typedef void (GL_APIENTRYP PFNGLMATRIXMULT3X3FNVPROC) (GLenum matrixMode, const GLfloat *m);
-typedef void (GL_APIENTRYP PFNGLMATRIXMULTTRANSPOSE3X3FNVPROC) (GLenum matrixMode, const GLfloat *m);
-typedef void (GL_APIENTRYP PFNGLSTENCILTHENCOVERFILLPATHNVPROC) (GLuint path, GLenum fillMode, GLuint mask, GLenum coverMode);
-typedef void (GL_APIENTRYP PFNGLSTENCILTHENCOVERSTROKEPATHNVPROC) (GLuint path, GLint reference, GLuint mask, GLenum coverMode);
-typedef void (GL_APIENTRYP PFNGLSTENCILTHENCOVERFILLPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum fillMode, GLuint mask, GLenum coverMode, GLenum transformType, const GLfloat *transformValues);
-typedef void (GL_APIENTRYP PFNGLSTENCILTHENCOVERSTROKEPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLint reference, GLuint mask, GLenum coverMode, GLenum transformType, const GLfloat *transformValues);
-typedef GLenum (GL_APIENTRYP PFNGLPATHGLYPHINDEXRANGENVPROC) (GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLuint pathParameterTemplate, GLfloat emScale, GLuint baseAndCount[2]);
-typedef GLenum (GL_APIENTRYP PFNGLPATHGLYPHINDEXARRAYNVPROC) (GLuint firstPathName, GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLuint firstGlyphIndex, GLsizei numGlyphs, GLuint pathParameterTemplate, GLfloat emScale);
-typedef GLenum (GL_APIENTRYP PFNGLPATHMEMORYGLYPHINDEXARRAYNVPROC) (GLuint firstPathName, GLenum fontTarget, GLsizeiptr fontSize, const void *fontData, GLsizei faceIndex, GLuint firstGlyphIndex, GLsizei numGlyphs, GLuint pathParameterTemplate, GLfloat emScale);
-typedef void (GL_APIENTRYP PFNGLPROGRAMPATHFRAGMENTINPUTGENNVPROC) (GLuint program, GLint location, GLenum genMode, GLint components, const GLfloat *coeffs);
-typedef void (GL_APIENTRYP PFNGLGETPROGRAMRESOURCEFVNVPROC) (GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLfloat *params);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL GLuint GL_APIENTRY glGenPathsNV (GLsizei range);
-GL_APICALL void GL_APIENTRY glDeletePathsNV (GLuint path, GLsizei range);
-GL_APICALL GLboolean GL_APIENTRY glIsPathNV (GLuint path);
-GL_APICALL void GL_APIENTRY glPathCommandsNV (GLuint path, GLsizei numCommands, const GLubyte *commands, GLsizei numCoords, GLenum coordType, const void *coords);
-GL_APICALL void GL_APIENTRY glPathCoordsNV (GLuint path, GLsizei numCoords, GLenum coordType, const void *coords);
-GL_APICALL void GL_APIENTRY glPathSubCommandsNV (GLuint path, GLsizei commandStart, GLsizei commandsToDelete, GLsizei numCommands, const GLubyte *commands, GLsizei numCoords, GLenum coordType, const void *coords);
-GL_APICALL void GL_APIENTRY glPathSubCoordsNV (GLuint path, GLsizei coordStart, GLsizei numCoords, GLenum coordType, const void *coords);
-GL_APICALL void GL_APIENTRY glPathStringNV (GLuint path, GLenum format, GLsizei length, const void *pathString);
-GL_APICALL void GL_APIENTRY glPathGlyphsNV (GLuint firstPathName, GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLsizei numGlyphs, GLenum type, const void *charcodes, GLenum handleMissingGlyphs, GLuint pathParameterTemplate, GLfloat emScale);
-GL_APICALL void GL_APIENTRY glPathGlyphRangeNV (GLuint firstPathName, GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLuint firstGlyph, GLsizei numGlyphs, GLenum handleMissingGlyphs, GLuint pathParameterTemplate, GLfloat emScale);
-GL_APICALL void GL_APIENTRY glWeightPathsNV (GLuint resultPath, GLsizei numPaths, const GLuint *paths, const GLfloat *weights);
-GL_APICALL void GL_APIENTRY glCopyPathNV (GLuint resultPath, GLuint srcPath);
-GL_APICALL void GL_APIENTRY glInterpolatePathsNV (GLuint resultPath, GLuint pathA, GLuint pathB, GLfloat weight);
-GL_APICALL void GL_APIENTRY glTransformPathNV (GLuint resultPath, GLuint srcPath, GLenum transformType, const GLfloat *transformValues);
-GL_APICALL void GL_APIENTRY glPathParameterivNV (GLuint path, GLenum pname, const GLint *value);
-GL_APICALL void GL_APIENTRY glPathParameteriNV (GLuint path, GLenum pname, GLint value);
-GL_APICALL void GL_APIENTRY glPathParameterfvNV (GLuint path, GLenum pname, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glPathParameterfNV (GLuint path, GLenum pname, GLfloat value);
-GL_APICALL void GL_APIENTRY glPathDashArrayNV (GLuint path, GLsizei dashCount, const GLfloat *dashArray);
-GL_APICALL void GL_APIENTRY glPathStencilFuncNV (GLenum func, GLint ref, GLuint mask);
-GL_APICALL void GL_APIENTRY glPathStencilDepthOffsetNV (GLfloat factor, GLfloat units);
-GL_APICALL void GL_APIENTRY glStencilFillPathNV (GLuint path, GLenum fillMode, GLuint mask);
-GL_APICALL void GL_APIENTRY glStencilStrokePathNV (GLuint path, GLint reference, GLuint mask);
-GL_APICALL void GL_APIENTRY glStencilFillPathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum fillMode, GLuint mask, GLenum transformType, const GLfloat *transformValues);
-GL_APICALL void GL_APIENTRY glStencilStrokePathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLint reference, GLuint mask, GLenum transformType, const GLfloat *transformValues);
-GL_APICALL void GL_APIENTRY glPathCoverDepthFuncNV (GLenum func);
-GL_APICALL void GL_APIENTRY glCoverFillPathNV (GLuint path, GLenum coverMode);
-GL_APICALL void GL_APIENTRY glCoverStrokePathNV (GLuint path, GLenum coverMode);
-GL_APICALL void GL_APIENTRY glCoverFillPathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues);
-GL_APICALL void GL_APIENTRY glCoverStrokePathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues);
-GL_APICALL void GL_APIENTRY glGetPathParameterivNV (GLuint path, GLenum pname, GLint *value);
-GL_APICALL void GL_APIENTRY glGetPathParameterfvNV (GLuint path, GLenum pname, GLfloat *value);
-GL_APICALL void GL_APIENTRY glGetPathCommandsNV (GLuint path, GLubyte *commands);
-GL_APICALL void GL_APIENTRY glGetPathCoordsNV (GLuint path, GLfloat *coords);
-GL_APICALL void GL_APIENTRY glGetPathDashArrayNV (GLuint path, GLfloat *dashArray);
-GL_APICALL void GL_APIENTRY glGetPathMetricsNV (GLbitfield metricQueryMask, GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLsizei stride, GLfloat *metrics);
-GL_APICALL void GL_APIENTRY glGetPathMetricRangeNV (GLbitfield metricQueryMask, GLuint firstPathName, GLsizei numPaths, GLsizei stride, GLfloat *metrics);
-GL_APICALL void GL_APIENTRY glGetPathSpacingNV (GLenum pathListMode, GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLfloat advanceScale, GLfloat kerningScale, GLenum transformType, GLfloat *returnedSpacing);
-GL_APICALL GLboolean GL_APIENTRY glIsPointInFillPathNV (GLuint path, GLuint mask, GLfloat x, GLfloat y);
-GL_APICALL GLboolean GL_APIENTRY glIsPointInStrokePathNV (GLuint path, GLfloat x, GLfloat y);
-GL_APICALL GLfloat GL_APIENTRY glGetPathLengthNV (GLuint path, GLsizei startSegment, GLsizei numSegments);
-GL_APICALL GLboolean GL_APIENTRY glPointAlongPathNV (GLuint path, GLsizei startSegment, GLsizei numSegments, GLfloat distance, GLfloat *x, GLfloat *y, GLfloat *tangentX, GLfloat *tangentY);
-GL_APICALL void GL_APIENTRY glMatrixLoad3x2fNV (GLenum matrixMode, const GLfloat *m);
-GL_APICALL void GL_APIENTRY glMatrixLoad3x3fNV (GLenum matrixMode, const GLfloat *m);
-GL_APICALL void GL_APIENTRY glMatrixLoadTranspose3x3fNV (GLenum matrixMode, const GLfloat *m);
-GL_APICALL void GL_APIENTRY glMatrixMult3x2fNV (GLenum matrixMode, const GLfloat *m);
-GL_APICALL void GL_APIENTRY glMatrixMult3x3fNV (GLenum matrixMode, const GLfloat *m);
-GL_APICALL void GL_APIENTRY glMatrixMultTranspose3x3fNV (GLenum matrixMode, const GLfloat *m);
-GL_APICALL void GL_APIENTRY glStencilThenCoverFillPathNV (GLuint path, GLenum fillMode, GLuint mask, GLenum coverMode);
-GL_APICALL void GL_APIENTRY glStencilThenCoverStrokePathNV (GLuint path, GLint reference, GLuint mask, GLenum coverMode);
-GL_APICALL void GL_APIENTRY glStencilThenCoverFillPathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum fillMode, GLuint mask, GLenum coverMode, GLenum transformType, const GLfloat *transformValues);
-GL_APICALL void GL_APIENTRY glStencilThenCoverStrokePathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLint reference, GLuint mask, GLenum coverMode, GLenum transformType, const GLfloat *transformValues);
-GL_APICALL GLenum GL_APIENTRY glPathGlyphIndexRangeNV (GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLuint pathParameterTemplate, GLfloat emScale, GLuint baseAndCount[2]);
-GL_APICALL GLenum GL_APIENTRY glPathGlyphIndexArrayNV (GLuint firstPathName, GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLuint firstGlyphIndex, GLsizei numGlyphs, GLuint pathParameterTemplate, GLfloat emScale);
-GL_APICALL GLenum GL_APIENTRY glPathMemoryGlyphIndexArrayNV (GLuint firstPathName, GLenum fontTarget, GLsizeiptr fontSize, const void *fontData, GLsizei faceIndex, GLuint firstGlyphIndex, GLsizei numGlyphs, GLuint pathParameterTemplate, GLfloat emScale);
-GL_APICALL void GL_APIENTRY glProgramPathFragmentInputGenNV (GLuint program, GLint location, GLenum genMode, GLint components, const GLfloat *coeffs);
-GL_APICALL void GL_APIENTRY glGetProgramResourcefvNV (GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLfloat *params);
-#endif
-#endif /* GL_NV_path_rendering */
-
-#ifndef GL_NV_read_buffer
-#define GL_NV_read_buffer 1
-#define GL_READ_BUFFER_NV 0x0C02
-typedef void (GL_APIENTRYP PFNGLREADBUFFERNVPROC) (GLenum mode);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glReadBufferNV (GLenum mode);
-#endif
-#endif /* GL_NV_read_buffer */
-
-#ifndef GL_NV_read_buffer_front
-#define GL_NV_read_buffer_front 1
-#endif /* GL_NV_read_buffer_front */
-
-#ifndef GL_NV_read_depth
-#define GL_NV_read_depth 1
-#endif /* GL_NV_read_depth */
-
-#ifndef GL_NV_read_depth_stencil
-#define GL_NV_read_depth_stencil 1
-#endif /* GL_NV_read_depth_stencil */
-
-#ifndef GL_NV_read_stencil
-#define GL_NV_read_stencil 1
-#endif /* GL_NV_read_stencil */
-
-#ifndef GL_NV_sRGB_formats
-#define GL_NV_sRGB_formats 1
-#define GL_SLUMINANCE_NV 0x8C46
-#define GL_SLUMINANCE_ALPHA_NV 0x8C44
-#define GL_SRGB8_NV 0x8C41
-#define GL_SLUMINANCE8_NV 0x8C47
-#define GL_SLUMINANCE8_ALPHA8_NV 0x8C45
-#define GL_COMPRESSED_SRGB_S3TC_DXT1_NV 0x8C4C
-#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_NV 0x8C4D
-#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_NV 0x8C4E
-#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_NV 0x8C4F
-#define GL_ETC1_SRGB8_NV 0x88EE
-#endif /* GL_NV_sRGB_formats */
-
-#ifndef GL_NV_shader_noperspective_interpolation
-#define GL_NV_shader_noperspective_interpolation 1
-#endif /* GL_NV_shader_noperspective_interpolation */
-
-#ifndef GL_NV_shadow_samplers_array
-#define GL_NV_shadow_samplers_array 1
-#define GL_SAMPLER_2D_ARRAY_SHADOW_NV 0x8DC4
-#endif /* GL_NV_shadow_samplers_array */
-
-#ifndef GL_NV_shadow_samplers_cube
-#define GL_NV_shadow_samplers_cube 1
-#define GL_SAMPLER_CUBE_SHADOW_NV 0x8DC5
-#endif /* GL_NV_shadow_samplers_cube */
-
-#ifndef GL_NV_texture_border_clamp
-#define GL_NV_texture_border_clamp 1
-#define GL_TEXTURE_BORDER_COLOR_NV 0x1004
-#define GL_CLAMP_TO_BORDER_NV 0x812D
-#endif /* GL_NV_texture_border_clamp */
-
-#ifndef GL_NV_texture_compression_s3tc_update
-#define GL_NV_texture_compression_s3tc_update 1
-#endif /* GL_NV_texture_compression_s3tc_update */
-
-#ifndef GL_NV_texture_npot_2D_mipmap
-#define GL_NV_texture_npot_2D_mipmap 1
-#endif /* GL_NV_texture_npot_2D_mipmap */
-
-#ifndef GL_NV_viewport_array
-#define GL_NV_viewport_array 1
-#define GL_MAX_VIEWPORTS_NV 0x825B
-#define GL_VIEWPORT_SUBPIXEL_BITS_NV 0x825C
-#define GL_VIEWPORT_BOUNDS_RANGE_NV 0x825D
-#define GL_VIEWPORT_INDEX_PROVOKING_VERTEX_NV 0x825F
-typedef void (GL_APIENTRYP PFNGLVIEWPORTARRAYVNVPROC) (GLuint first, GLsizei count, const GLfloat *v);
-typedef void (GL_APIENTRYP PFNGLVIEWPORTINDEXEDFNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h);
-typedef void (GL_APIENTRYP PFNGLVIEWPORTINDEXEDFVNVPROC) (GLuint index, const GLfloat *v);
-typedef void (GL_APIENTRYP PFNGLSCISSORARRAYVNVPROC) (GLuint first, GLsizei count, const GLint *v);
-typedef void (GL_APIENTRYP PFNGLSCISSORINDEXEDNVPROC) (GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height);
-typedef void (GL_APIENTRYP PFNGLSCISSORINDEXEDVNVPROC) (GLuint index, const GLint *v);
-typedef void (GL_APIENTRYP PFNGLDEPTHRANGEARRAYFVNVPROC) (GLuint first, GLsizei count, const GLfloat *v);
-typedef void (GL_APIENTRYP PFNGLDEPTHRANGEINDEXEDFNVPROC) (GLuint index, GLfloat n, GLfloat f);
-typedef void (GL_APIENTRYP PFNGLGETFLOATI_VNVPROC) (GLenum target, GLuint index, GLfloat *data);
-typedef void (GL_APIENTRYP PFNGLENABLEINVPROC) (GLenum target, GLuint index);
-typedef void (GL_APIENTRYP PFNGLDISABLEINVPROC) (GLenum target, GLuint index);
-typedef GLboolean (GL_APIENTRYP PFNGLISENABLEDINVPROC) (GLenum target, GLuint index);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glViewportArrayvNV (GLuint first, GLsizei count, const GLfloat *v);
-GL_APICALL void GL_APIENTRY glViewportIndexedfNV (GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h);
-GL_APICALL void GL_APIENTRY glViewportIndexedfvNV (GLuint index, const GLfloat *v);
-GL_APICALL void GL_APIENTRY glScissorArrayvNV (GLuint first, GLsizei count, const GLint *v);
-GL_APICALL void GL_APIENTRY glScissorIndexedNV (GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height);
-GL_APICALL void GL_APIENTRY glScissorIndexedvNV (GLuint index, const GLint *v);
-GL_APICALL void GL_APIENTRY glDepthRangeArrayfvNV (GLuint first, GLsizei count, const GLfloat *v);
-GL_APICALL void GL_APIENTRY glDepthRangeIndexedfNV (GLuint index, GLfloat n, GLfloat f);
-GL_APICALL void GL_APIENTRY glGetFloati_vNV (GLenum target, GLuint index, GLfloat *data);
-GL_APICALL void GL_APIENTRY glEnableiNV (GLenum target, GLuint index);
-GL_APICALL void GL_APIENTRY glDisableiNV (GLenum target, GLuint index);
-GL_APICALL GLboolean GL_APIENTRY glIsEnablediNV (GLenum target, GLuint index);
-#endif
-#endif /* GL_NV_viewport_array */
-
-#ifndef GL_QCOM_alpha_test
-#define GL_QCOM_alpha_test 1
-#define GL_ALPHA_TEST_QCOM 0x0BC0
-#define GL_ALPHA_TEST_FUNC_QCOM 0x0BC1
-#define GL_ALPHA_TEST_REF_QCOM 0x0BC2
-typedef void (GL_APIENTRYP PFNGLALPHAFUNCQCOMPROC) (GLenum func, GLclampf ref);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glAlphaFuncQCOM (GLenum func, GLclampf ref);
-#endif
-#endif /* GL_QCOM_alpha_test */
-
-#ifndef GL_QCOM_binning_control
-#define GL_QCOM_binning_control 1
-#define GL_BINNING_CONTROL_HINT_QCOM 0x8FB0
-#define GL_CPU_OPTIMIZED_QCOM 0x8FB1
-#define GL_GPU_OPTIMIZED_QCOM 0x8FB2
-#define GL_RENDER_DIRECT_TO_FRAMEBUFFER_QCOM 0x8FB3
-#endif /* GL_QCOM_binning_control */
-
-#ifndef GL_QCOM_driver_control
-#define GL_QCOM_driver_control 1
-typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSQCOMPROC) (GLint *num, GLsizei size, GLuint *driverControls);
-typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSTRINGQCOMPROC) (GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString);
-typedef void (GL_APIENTRYP PFNGLENABLEDRIVERCONTROLQCOMPROC) (GLuint driverControl);
-typedef void (GL_APIENTRYP PFNGLDISABLEDRIVERCONTROLQCOMPROC) (GLuint driverControl);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glGetDriverControlsQCOM (GLint *num, GLsizei size, GLuint *driverControls);
-GL_APICALL void GL_APIENTRY glGetDriverControlStringQCOM (GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString);
-GL_APICALL void GL_APIENTRY glEnableDriverControlQCOM (GLuint driverControl);
-GL_APICALL void GL_APIENTRY glDisableDriverControlQCOM (GLuint driverControl);
-#endif
-#endif /* GL_QCOM_driver_control */
-
-#ifndef GL_QCOM_extended_get
-#define GL_QCOM_extended_get 1
-#define GL_TEXTURE_WIDTH_QCOM 0x8BD2
-#define GL_TEXTURE_HEIGHT_QCOM 0x8BD3
-#define GL_TEXTURE_DEPTH_QCOM 0x8BD4
-#define GL_TEXTURE_INTERNAL_FORMAT_QCOM 0x8BD5
-#define GL_TEXTURE_FORMAT_QCOM 0x8BD6
-#define GL_TEXTURE_TYPE_QCOM 0x8BD7
-#define GL_TEXTURE_IMAGE_VALID_QCOM 0x8BD8
-#define GL_TEXTURE_NUM_LEVELS_QCOM 0x8BD9
-#define GL_TEXTURE_TARGET_QCOM 0x8BDA
-#define GL_TEXTURE_OBJECT_VALID_QCOM 0x8BDB
-#define GL_STATE_RESTORE 0x8BDC
-typedef void (GL_APIENTRYP PFNGLEXTGETTEXTURESQCOMPROC) (GLuint *textures, GLint maxTextures, GLint *numTextures);
-typedef void (GL_APIENTRYP PFNGLEXTGETBUFFERSQCOMPROC) (GLuint *buffers, GLint maxBuffers, GLint *numBuffers);
-typedef void (GL_APIENTRYP PFNGLEXTGETRENDERBUFFERSQCOMPROC) (GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers);
-typedef void (GL_APIENTRYP PFNGLEXTGETFRAMEBUFFERSQCOMPROC) (GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers);
-typedef void (GL_APIENTRYP PFNGLEXTGETTEXLEVELPARAMETERIVQCOMPROC) (GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params);
-typedef void (GL_APIENTRYP PFNGLEXTTEXOBJECTSTATEOVERRIDEIQCOMPROC) (GLenum target, GLenum pname, GLint param);
-typedef void (GL_APIENTRYP PFNGLEXTGETTEXSUBIMAGEQCOMPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, void *texels);
-typedef void (GL_APIENTRYP PFNGLEXTGETBUFFERPOINTERVQCOMPROC) (GLenum target, void **params);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glExtGetTexturesQCOM (GLuint *textures, GLint maxTextures, GLint *numTextures);
-GL_APICALL void GL_APIENTRY glExtGetBuffersQCOM (GLuint *buffers, GLint maxBuffers, GLint *numBuffers);
-GL_APICALL void GL_APIENTRY glExtGetRenderbuffersQCOM (GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers);
-GL_APICALL void GL_APIENTRY glExtGetFramebuffersQCOM (GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers);
-GL_APICALL void GL_APIENTRY glExtGetTexLevelParameterivQCOM (GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params);
-GL_APICALL void GL_APIENTRY glExtTexObjectStateOverrideiQCOM (GLenum target, GLenum pname, GLint param);
-GL_APICALL void GL_APIENTRY glExtGetTexSubImageQCOM (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, void *texels);
-GL_APICALL void GL_APIENTRY glExtGetBufferPointervQCOM (GLenum target, void **params);
-#endif
-#endif /* GL_QCOM_extended_get */
-
-#ifndef GL_QCOM_extended_get2
-#define GL_QCOM_extended_get2 1
-typedef void (GL_APIENTRYP PFNGLEXTGETSHADERSQCOMPROC) (GLuint *shaders, GLint maxShaders, GLint *numShaders);
-typedef void (GL_APIENTRYP PFNGLEXTGETPROGRAMSQCOMPROC) (GLuint *programs, GLint maxPrograms, GLint *numPrograms);
-typedef GLboolean (GL_APIENTRYP PFNGLEXTISPROGRAMBINARYQCOMPROC) (GLuint program);
-typedef void (GL_APIENTRYP PFNGLEXTGETPROGRAMBINARYSOURCEQCOMPROC) (GLuint program, GLenum shadertype, GLchar *source, GLint *length);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glExtGetShadersQCOM (GLuint *shaders, GLint maxShaders, GLint *numShaders);
-GL_APICALL void GL_APIENTRY glExtGetProgramsQCOM (GLuint *programs, GLint maxPrograms, GLint *numPrograms);
-GL_APICALL GLboolean GL_APIENTRY glExtIsProgramBinaryQCOM (GLuint program);
-GL_APICALL void GL_APIENTRY glExtGetProgramBinarySourceQCOM (GLuint program, GLenum shadertype, GLchar *source, GLint *length);
-#endif
-#endif /* GL_QCOM_extended_get2 */
-
-#ifndef GL_QCOM_perfmon_global_mode
-#define GL_QCOM_perfmon_global_mode 1
-#define GL_PERFMON_GLOBAL_MODE_QCOM 0x8FA0
-#endif /* GL_QCOM_perfmon_global_mode */
-
-#ifndef GL_QCOM_tiled_rendering
-#define GL_QCOM_tiled_rendering 1
-#define GL_COLOR_BUFFER_BIT0_QCOM 0x00000001
-#define GL_COLOR_BUFFER_BIT1_QCOM 0x00000002
-#define GL_COLOR_BUFFER_BIT2_QCOM 0x00000004
-#define GL_COLOR_BUFFER_BIT3_QCOM 0x00000008
-#define GL_COLOR_BUFFER_BIT4_QCOM 0x00000010
-#define GL_COLOR_BUFFER_BIT5_QCOM 0x00000020
-#define GL_COLOR_BUFFER_BIT6_QCOM 0x00000040
-#define GL_COLOR_BUFFER_BIT7_QCOM 0x00000080
-#define GL_DEPTH_BUFFER_BIT0_QCOM 0x00000100
-#define GL_DEPTH_BUFFER_BIT1_QCOM 0x00000200
-#define GL_DEPTH_BUFFER_BIT2_QCOM 0x00000400
-#define GL_DEPTH_BUFFER_BIT3_QCOM 0x00000800
-#define GL_DEPTH_BUFFER_BIT4_QCOM 0x00001000
-#define GL_DEPTH_BUFFER_BIT5_QCOM 0x00002000
-#define GL_DEPTH_BUFFER_BIT6_QCOM 0x00004000
-#define GL_DEPTH_BUFFER_BIT7_QCOM 0x00008000
-#define GL_STENCIL_BUFFER_BIT0_QCOM 0x00010000
-#define GL_STENCIL_BUFFER_BIT1_QCOM 0x00020000
-#define GL_STENCIL_BUFFER_BIT2_QCOM 0x00040000
-#define GL_STENCIL_BUFFER_BIT3_QCOM 0x00080000
-#define GL_STENCIL_BUFFER_BIT4_QCOM 0x00100000
-#define GL_STENCIL_BUFFER_BIT5_QCOM 0x00200000
-#define GL_STENCIL_BUFFER_BIT6_QCOM 0x00400000
-#define GL_STENCIL_BUFFER_BIT7_QCOM 0x00800000
-#define GL_MULTISAMPLE_BUFFER_BIT0_QCOM 0x01000000
-#define GL_MULTISAMPLE_BUFFER_BIT1_QCOM 0x02000000
-#define GL_MULTISAMPLE_BUFFER_BIT2_QCOM 0x04000000
-#define GL_MULTISAMPLE_BUFFER_BIT3_QCOM 0x08000000
-#define GL_MULTISAMPLE_BUFFER_BIT4_QCOM 0x10000000
-#define GL_MULTISAMPLE_BUFFER_BIT5_QCOM 0x20000000
-#define GL_MULTISAMPLE_BUFFER_BIT6_QCOM 0x40000000
-#define GL_MULTISAMPLE_BUFFER_BIT7_QCOM 0x80000000
-typedef void (GL_APIENTRYP PFNGLSTARTTILINGQCOMPROC) (GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask);
-typedef void (GL_APIENTRYP PFNGLENDTILINGQCOMPROC) (GLbitfield preserveMask);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glStartTilingQCOM (GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask);
-GL_APICALL void GL_APIENTRY glEndTilingQCOM (GLbitfield preserveMask);
-#endif
-#endif /* GL_QCOM_tiled_rendering */
-
-#ifndef GL_QCOM_writeonly_rendering
-#define GL_QCOM_writeonly_rendering 1
-#define GL_WRITEONLY_RENDERING_QCOM 0x8823
-#endif /* GL_QCOM_writeonly_rendering */
-
-#ifndef GL_VIV_shader_binary
-#define GL_VIV_shader_binary 1
-#define GL_SHADER_BINARY_VIV 0x8FC4
-#endif /* GL_VIV_shader_binary */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/external/khronos/GLES3/gl3.h b/external/khronos/GLES3/gl3.h
deleted file mode 100644
index cc80e1067..000000000
--- a/external/khronos/GLES3/gl3.h
+++ /dev/null
@@ -1,939 +0,0 @@
-#ifndef __gl3_h_
-#define __gl3_h_ 1
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
-** Copyright (c) 2013-2014 The Khronos Group Inc.
-**
-** Permission is hereby granted, free of charge, to any person obtaining a
-** copy of this software and/or associated documentation files (the
-** "Materials"), to deal in the Materials without restriction, including
-** without limitation the rights to use, copy, modify, merge, publish,
-** distribute, sublicense, and/or sell copies of the Materials, and to
-** permit persons to whom the Materials are furnished to do so, subject to
-** the following conditions:
-**
-** The above copyright notice and this permission notice shall be included
-** in all copies or substantial portions of the Materials.
-**
-** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
-*/
-/*
-** This header is generated from the Khronos OpenGL / OpenGL ES XML
-** API Registry. The current version of the Registry, generator scripts
-** used to make the header, and the header can be found at
-** http://www.opengl.org/registry/
-**
-** Khronos $Revision$ on $Date$
-*/
-
-#include
-
-/* Generated on date 20141204 */
-
-/* Generated C header for:
- * API: gles2
- * Profile: common
- * Versions considered: 2\.[0-9]|3.0
- * Versions emitted: .*
- * Default extensions included: None
- * Additional extensions included: _nomatch_^
- * Extensions removed: _nomatch_^
- */
-
-#ifndef GL_ES_VERSION_2_0
-#define GL_ES_VERSION_2_0 1
-#include
-typedef khronos_int8_t GLbyte;
-typedef khronos_float_t GLclampf;
-typedef khronos_int32_t GLfixed;
-typedef short GLshort;
-typedef unsigned short GLushort;
-typedef void GLvoid;
-typedef struct __GLsync *GLsync;
-typedef khronos_int64_t GLint64;
-typedef khronos_uint64_t GLuint64;
-typedef unsigned int GLenum;
-typedef unsigned int GLuint;
-typedef char GLchar;
-typedef khronos_float_t GLfloat;
-typedef khronos_ssize_t GLsizeiptr;
-typedef khronos_intptr_t GLintptr;
-typedef unsigned int GLbitfield;
-typedef int GLint;
-typedef unsigned char GLboolean;
-typedef int GLsizei;
-typedef khronos_uint8_t GLubyte;
-#define GL_DEPTH_BUFFER_BIT 0x00000100
-#define GL_STENCIL_BUFFER_BIT 0x00000400
-#define GL_COLOR_BUFFER_BIT 0x00004000
-#define GL_FALSE 0
-#define GL_TRUE 1
-#define GL_POINTS 0x0000
-#define GL_LINES 0x0001
-#define GL_LINE_LOOP 0x0002
-#define GL_LINE_STRIP 0x0003
-#define GL_TRIANGLES 0x0004
-#define GL_TRIANGLE_STRIP 0x0005
-#define GL_TRIANGLE_FAN 0x0006
-#define GL_ZERO 0
-#define GL_ONE 1
-#define GL_SRC_COLOR 0x0300
-#define GL_ONE_MINUS_SRC_COLOR 0x0301
-#define GL_SRC_ALPHA 0x0302
-#define GL_ONE_MINUS_SRC_ALPHA 0x0303
-#define GL_DST_ALPHA 0x0304
-#define GL_ONE_MINUS_DST_ALPHA 0x0305
-#define GL_DST_COLOR 0x0306
-#define GL_ONE_MINUS_DST_COLOR 0x0307
-#define GL_SRC_ALPHA_SATURATE 0x0308
-#define GL_FUNC_ADD 0x8006
-#define GL_BLEND_EQUATION 0x8009
-#define GL_BLEND_EQUATION_RGB 0x8009
-#define GL_BLEND_EQUATION_ALPHA 0x883D
-#define GL_FUNC_SUBTRACT 0x800A
-#define GL_FUNC_REVERSE_SUBTRACT 0x800B
-#define GL_BLEND_DST_RGB 0x80C8
-#define GL_BLEND_SRC_RGB 0x80C9
-#define GL_BLEND_DST_ALPHA 0x80CA
-#define GL_BLEND_SRC_ALPHA 0x80CB
-#define GL_CONSTANT_COLOR 0x8001
-#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002
-#define GL_CONSTANT_ALPHA 0x8003
-#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004
-#define GL_BLEND_COLOR 0x8005
-#define GL_ARRAY_BUFFER 0x8892
-#define GL_ELEMENT_ARRAY_BUFFER 0x8893
-#define GL_ARRAY_BUFFER_BINDING 0x8894
-#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895
-#define GL_STREAM_DRAW 0x88E0
-#define GL_STATIC_DRAW 0x88E4
-#define GL_DYNAMIC_DRAW 0x88E8
-#define GL_BUFFER_SIZE 0x8764
-#define GL_BUFFER_USAGE 0x8765
-#define GL_CURRENT_VERTEX_ATTRIB 0x8626
-#define GL_FRONT 0x0404
-#define GL_BACK 0x0405
-#define GL_FRONT_AND_BACK 0x0408
-#define GL_TEXTURE_2D 0x0DE1
-#define GL_CULL_FACE 0x0B44
-#define GL_BLEND 0x0BE2
-#define GL_DITHER 0x0BD0
-#define GL_STENCIL_TEST 0x0B90
-#define GL_DEPTH_TEST 0x0B71
-#define GL_SCISSOR_TEST 0x0C11
-#define GL_POLYGON_OFFSET_FILL 0x8037
-#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E
-#define GL_SAMPLE_COVERAGE 0x80A0
-#define GL_NO_ERROR 0
-#define GL_INVALID_ENUM 0x0500
-#define GL_INVALID_VALUE 0x0501
-#define GL_INVALID_OPERATION 0x0502
-#define GL_OUT_OF_MEMORY 0x0505
-#define GL_CW 0x0900
-#define GL_CCW 0x0901
-#define GL_LINE_WIDTH 0x0B21
-#define GL_ALIASED_POINT_SIZE_RANGE 0x846D
-#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E
-#define GL_CULL_FACE_MODE 0x0B45
-#define GL_FRONT_FACE 0x0B46
-#define GL_DEPTH_RANGE 0x0B70
-#define GL_DEPTH_WRITEMASK 0x0B72
-#define GL_DEPTH_CLEAR_VALUE 0x0B73
-#define GL_DEPTH_FUNC 0x0B74
-#define GL_STENCIL_CLEAR_VALUE 0x0B91
-#define GL_STENCIL_FUNC 0x0B92
-#define GL_STENCIL_FAIL 0x0B94
-#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95
-#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96
-#define GL_STENCIL_REF 0x0B97
-#define GL_STENCIL_VALUE_MASK 0x0B93
-#define GL_STENCIL_WRITEMASK 0x0B98
-#define GL_STENCIL_BACK_FUNC 0x8800
-#define GL_STENCIL_BACK_FAIL 0x8801
-#define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802
-#define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803
-#define GL_STENCIL_BACK_REF 0x8CA3
-#define GL_STENCIL_BACK_VALUE_MASK 0x8CA4
-#define GL_STENCIL_BACK_WRITEMASK 0x8CA5
-#define GL_VIEWPORT 0x0BA2
-#define GL_SCISSOR_BOX 0x0C10
-#define GL_COLOR_CLEAR_VALUE 0x0C22
-#define GL_COLOR_WRITEMASK 0x0C23
-#define GL_UNPACK_ALIGNMENT 0x0CF5
-#define GL_PACK_ALIGNMENT 0x0D05
-#define GL_MAX_TEXTURE_SIZE 0x0D33
-#define GL_MAX_VIEWPORT_DIMS 0x0D3A
-#define GL_SUBPIXEL_BITS 0x0D50
-#define GL_RED_BITS 0x0D52
-#define GL_GREEN_BITS 0x0D53
-#define GL_BLUE_BITS 0x0D54
-#define GL_ALPHA_BITS 0x0D55
-#define GL_DEPTH_BITS 0x0D56
-#define GL_STENCIL_BITS 0x0D57
-#define GL_POLYGON_OFFSET_UNITS 0x2A00
-#define GL_POLYGON_OFFSET_FACTOR 0x8038
-#define GL_TEXTURE_BINDING_2D 0x8069
-#define GL_SAMPLE_BUFFERS 0x80A8
-#define GL_SAMPLES 0x80A9
-#define GL_SAMPLE_COVERAGE_VALUE 0x80AA
-#define GL_SAMPLE_COVERAGE_INVERT 0x80AB
-#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
-#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3
-#define GL_DONT_CARE 0x1100
-#define GL_FASTEST 0x1101
-#define GL_NICEST 0x1102
-#define GL_GENERATE_MIPMAP_HINT 0x8192
-#define GL_BYTE 0x1400
-#define GL_UNSIGNED_BYTE 0x1401
-#define GL_SHORT 0x1402
-#define GL_UNSIGNED_SHORT 0x1403
-#define GL_INT 0x1404
-#define GL_UNSIGNED_INT 0x1405
-#define GL_FLOAT 0x1406
-#define GL_FIXED 0x140C
-#define GL_DEPTH_COMPONENT 0x1902
-#define GL_ALPHA 0x1906
-#define GL_RGB 0x1907
-#define GL_RGBA 0x1908
-#define GL_LUMINANCE 0x1909
-#define GL_LUMINANCE_ALPHA 0x190A
-#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033
-#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034
-#define GL_UNSIGNED_SHORT_5_6_5 0x8363
-#define GL_FRAGMENT_SHADER 0x8B30
-#define GL_VERTEX_SHADER 0x8B31
-#define GL_MAX_VERTEX_ATTRIBS 0x8869
-#define GL_MAX_VERTEX_UNIFORM_VECTORS 0x8DFB
-#define GL_MAX_VARYING_VECTORS 0x8DFC
-#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D
-#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C
-#define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872
-#define GL_MAX_FRAGMENT_UNIFORM_VECTORS 0x8DFD
-#define GL_SHADER_TYPE 0x8B4F
-#define GL_DELETE_STATUS 0x8B80
-#define GL_LINK_STATUS 0x8B82
-#define GL_VALIDATE_STATUS 0x8B83
-#define GL_ATTACHED_SHADERS 0x8B85
-#define GL_ACTIVE_UNIFORMS 0x8B86
-#define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87
-#define GL_ACTIVE_ATTRIBUTES 0x8B89
-#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A
-#define GL_SHADING_LANGUAGE_VERSION 0x8B8C
-#define GL_CURRENT_PROGRAM 0x8B8D
-#define GL_NEVER 0x0200
-#define GL_LESS 0x0201
-#define GL_EQUAL 0x0202
-#define GL_LEQUAL 0x0203
-#define GL_GREATER 0x0204
-#define GL_NOTEQUAL 0x0205
-#define GL_GEQUAL 0x0206
-#define GL_ALWAYS 0x0207
-#define GL_KEEP 0x1E00
-#define GL_REPLACE 0x1E01
-#define GL_INCR 0x1E02
-#define GL_DECR 0x1E03
-#define GL_INVERT 0x150A
-#define GL_INCR_WRAP 0x8507
-#define GL_DECR_WRAP 0x8508
-#define GL_VENDOR 0x1F00
-#define GL_RENDERER 0x1F01
-#define GL_VERSION 0x1F02
-#define GL_EXTENSIONS 0x1F03
-#define GL_NEAREST 0x2600
-#define GL_LINEAR 0x2601
-#define GL_NEAREST_MIPMAP_NEAREST 0x2700
-#define GL_LINEAR_MIPMAP_NEAREST 0x2701
-#define GL_NEAREST_MIPMAP_LINEAR 0x2702
-#define GL_LINEAR_MIPMAP_LINEAR 0x2703
-#define GL_TEXTURE_MAG_FILTER 0x2800
-#define GL_TEXTURE_MIN_FILTER 0x2801
-#define GL_TEXTURE_WRAP_S 0x2802
-#define GL_TEXTURE_WRAP_T 0x2803
-#define GL_TEXTURE 0x1702
-#define GL_TEXTURE_CUBE_MAP 0x8513
-#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514
-#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515
-#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516
-#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517
-#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518
-#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519
-#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A
-#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C
-#define GL_TEXTURE0 0x84C0
-#define GL_TEXTURE1 0x84C1
-#define GL_TEXTURE2 0x84C2
-#define GL_TEXTURE3 0x84C3
-#define GL_TEXTURE4 0x84C4
-#define GL_TEXTURE5 0x84C5
-#define GL_TEXTURE6 0x84C6
-#define GL_TEXTURE7 0x84C7
-#define GL_TEXTURE8 0x84C8
-#define GL_TEXTURE9 0x84C9
-#define GL_TEXTURE10 0x84CA
-#define GL_TEXTURE11 0x84CB
-#define GL_TEXTURE12 0x84CC
-#define GL_TEXTURE13 0x84CD
-#define GL_TEXTURE14 0x84CE
-#define GL_TEXTURE15 0x84CF
-#define GL_TEXTURE16 0x84D0
-#define GL_TEXTURE17 0x84D1
-#define GL_TEXTURE18 0x84D2
-#define GL_TEXTURE19 0x84D3
-#define GL_TEXTURE20 0x84D4
-#define GL_TEXTURE21 0x84D5
-#define GL_TEXTURE22 0x84D6
-#define GL_TEXTURE23 0x84D7
-#define GL_TEXTURE24 0x84D8
-#define GL_TEXTURE25 0x84D9
-#define GL_TEXTURE26 0x84DA
-#define GL_TEXTURE27 0x84DB
-#define GL_TEXTURE28 0x84DC
-#define GL_TEXTURE29 0x84DD
-#define GL_TEXTURE30 0x84DE
-#define GL_TEXTURE31 0x84DF
-#define GL_ACTIVE_TEXTURE 0x84E0
-#define GL_REPEAT 0x2901
-#define GL_CLAMP_TO_EDGE 0x812F
-#define GL_MIRRORED_REPEAT 0x8370
-#define GL_FLOAT_VEC2 0x8B50
-#define GL_FLOAT_VEC3 0x8B51
-#define GL_FLOAT_VEC4 0x8B52
-#define GL_INT_VEC2 0x8B53
-#define GL_INT_VEC3 0x8B54
-#define GL_INT_VEC4 0x8B55
-#define GL_BOOL 0x8B56
-#define GL_BOOL_VEC2 0x8B57
-#define GL_BOOL_VEC3 0x8B58
-#define GL_BOOL_VEC4 0x8B59
-#define GL_FLOAT_MAT2 0x8B5A
-#define GL_FLOAT_MAT3 0x8B5B
-#define GL_FLOAT_MAT4 0x8B5C
-#define GL_SAMPLER_2D 0x8B5E
-#define GL_SAMPLER_CUBE 0x8B60
-#define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622
-#define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623
-#define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624
-#define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625
-#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A
-#define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645
-#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F
-#define GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A
-#define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B
-#define GL_COMPILE_STATUS 0x8B81
-#define GL_INFO_LOG_LENGTH 0x8B84
-#define GL_SHADER_SOURCE_LENGTH 0x8B88
-#define GL_SHADER_COMPILER 0x8DFA
-#define GL_SHADER_BINARY_FORMATS 0x8DF8
-#define GL_NUM_SHADER_BINARY_FORMATS 0x8DF9
-#define GL_LOW_FLOAT 0x8DF0
-#define GL_MEDIUM_FLOAT 0x8DF1
-#define GL_HIGH_FLOAT 0x8DF2
-#define GL_LOW_INT 0x8DF3
-#define GL_MEDIUM_INT 0x8DF4
-#define GL_HIGH_INT 0x8DF5
-#define GL_FRAMEBUFFER 0x8D40
-#define GL_RENDERBUFFER 0x8D41
-#define GL_RGBA4 0x8056
-#define GL_RGB5_A1 0x8057
-#define GL_RGB565 0x8D62
-#define GL_DEPTH_COMPONENT16 0x81A5
-#define GL_STENCIL_INDEX8 0x8D48
-#define GL_RENDERBUFFER_WIDTH 0x8D42
-#define GL_RENDERBUFFER_HEIGHT 0x8D43
-#define GL_RENDERBUFFER_INTERNAL_FORMAT 0x8D44
-#define GL_RENDERBUFFER_RED_SIZE 0x8D50
-#define GL_RENDERBUFFER_GREEN_SIZE 0x8D51
-#define GL_RENDERBUFFER_BLUE_SIZE 0x8D52
-#define GL_RENDERBUFFER_ALPHA_SIZE 0x8D53
-#define GL_RENDERBUFFER_DEPTH_SIZE 0x8D54
-#define GL_RENDERBUFFER_STENCIL_SIZE 0x8D55
-#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0
-#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1
-#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2
-#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3
-#define GL_COLOR_ATTACHMENT0 0x8CE0
-#define GL_DEPTH_ATTACHMENT 0x8D00
-#define GL_STENCIL_ATTACHMENT 0x8D20
-#define GL_NONE 0
-#define GL_FRAMEBUFFER_COMPLETE 0x8CD5
-#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6
-#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7
-#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS 0x8CD9
-#define GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD
-#define GL_FRAMEBUFFER_BINDING 0x8CA6
-#define GL_RENDERBUFFER_BINDING 0x8CA7
-#define GL_MAX_RENDERBUFFER_SIZE 0x84E8
-#define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506
-GL_APICALL void GL_APIENTRY glActiveTexture (GLenum texture);
-GL_APICALL void GL_APIENTRY glAttachShader (GLuint program, GLuint shader);
-GL_APICALL void GL_APIENTRY glBindAttribLocation (GLuint program, GLuint index, const GLchar *name);
-GL_APICALL void GL_APIENTRY glBindBuffer (GLenum target, GLuint buffer);
-GL_APICALL void GL_APIENTRY glBindFramebuffer (GLenum target, GLuint framebuffer);
-GL_APICALL void GL_APIENTRY glBindRenderbuffer (GLenum target, GLuint renderbuffer);
-GL_APICALL void GL_APIENTRY glBindTexture (GLenum target, GLuint texture);
-GL_APICALL void GL_APIENTRY glBlendColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
-GL_APICALL void GL_APIENTRY glBlendEquation (GLenum mode);
-GL_APICALL void GL_APIENTRY glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha);
-GL_APICALL void GL_APIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor);
-GL_APICALL void GL_APIENTRY glBlendFuncSeparate (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
-GL_APICALL void GL_APIENTRY glBufferData (GLenum target, GLsizeiptr size, const void *data, GLenum usage);
-GL_APICALL void GL_APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const void *data);
-GL_APICALL GLenum GL_APIENTRY glCheckFramebufferStatus (GLenum target);
-GL_APICALL void GL_APIENTRY glClear (GLbitfield mask);
-GL_APICALL void GL_APIENTRY glClearColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
-GL_APICALL void GL_APIENTRY glClearDepthf (GLfloat d);
-GL_APICALL void GL_APIENTRY glClearStencil (GLint s);
-GL_APICALL void GL_APIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
-GL_APICALL void GL_APIENTRY glCompileShader (GLuint shader);
-GL_APICALL void GL_APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data);
-GL_APICALL void GL_APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data);
-GL_APICALL void GL_APIENTRY glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
-GL_APICALL void GL_APIENTRY glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
-GL_APICALL GLuint GL_APIENTRY glCreateProgram (void);
-GL_APICALL GLuint GL_APIENTRY glCreateShader (GLenum type);
-GL_APICALL void GL_APIENTRY glCullFace (GLenum mode);
-GL_APICALL void GL_APIENTRY glDeleteBuffers (GLsizei n, const GLuint *buffers);
-GL_APICALL void GL_APIENTRY glDeleteFramebuffers (GLsizei n, const GLuint *framebuffers);
-GL_APICALL void GL_APIENTRY glDeleteProgram (GLuint program);
-GL_APICALL void GL_APIENTRY glDeleteRenderbuffers (GLsizei n, const GLuint *renderbuffers);
-GL_APICALL void GL_APIENTRY glDeleteShader (GLuint shader);
-GL_APICALL void GL_APIENTRY glDeleteTextures (GLsizei n, const GLuint *textures);
-GL_APICALL void GL_APIENTRY glDepthFunc (GLenum func);
-GL_APICALL void GL_APIENTRY glDepthMask (GLboolean flag);
-GL_APICALL void GL_APIENTRY glDepthRangef (GLfloat n, GLfloat f);
-GL_APICALL void GL_APIENTRY glDetachShader (GLuint program, GLuint shader);
-GL_APICALL void GL_APIENTRY glDisable (GLenum cap);
-GL_APICALL void GL_APIENTRY glDisableVertexAttribArray (GLuint index);
-GL_APICALL void GL_APIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count);
-GL_APICALL void GL_APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const void *indices);
-GL_APICALL void GL_APIENTRY glEnable (GLenum cap);
-GL_APICALL void GL_APIENTRY glEnableVertexAttribArray (GLuint index);
-GL_APICALL void GL_APIENTRY glFinish (void);
-GL_APICALL void GL_APIENTRY glFlush (void);
-GL_APICALL void GL_APIENTRY glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
-GL_APICALL void GL_APIENTRY glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
-GL_APICALL void GL_APIENTRY glFrontFace (GLenum mode);
-GL_APICALL void GL_APIENTRY glGenBuffers (GLsizei n, GLuint *buffers);
-GL_APICALL void GL_APIENTRY glGenerateMipmap (GLenum target);
-GL_APICALL void GL_APIENTRY glGenFramebuffers (GLsizei n, GLuint *framebuffers);
-GL_APICALL void GL_APIENTRY glGenRenderbuffers (GLsizei n, GLuint *renderbuffers);
-GL_APICALL void GL_APIENTRY glGenTextures (GLsizei n, GLuint *textures);
-GL_APICALL void GL_APIENTRY glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
-GL_APICALL void GL_APIENTRY glGetActiveUniform (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
-GL_APICALL void GL_APIENTRY glGetAttachedShaders (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders);
-GL_APICALL GLint GL_APIENTRY glGetAttribLocation (GLuint program, const GLchar *name);
-GL_APICALL void GL_APIENTRY glGetBooleanv (GLenum pname, GLboolean *data);
-GL_APICALL void GL_APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint *params);
-GL_APICALL GLenum GL_APIENTRY glGetError (void);
-GL_APICALL void GL_APIENTRY glGetFloatv (GLenum pname, GLfloat *data);
-GL_APICALL void GL_APIENTRY glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint *params);
-GL_APICALL void GL_APIENTRY glGetIntegerv (GLenum pname, GLint *data);
-GL_APICALL void GL_APIENTRY glGetProgramiv (GLuint program, GLenum pname, GLint *params);
-GL_APICALL void GL_APIENTRY glGetProgramInfoLog (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
-GL_APICALL void GL_APIENTRY glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint *params);
-GL_APICALL void GL_APIENTRY glGetShaderiv (GLuint shader, GLenum pname, GLint *params);
-GL_APICALL void GL_APIENTRY glGetShaderInfoLog (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
-GL_APICALL void GL_APIENTRY glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision);
-GL_APICALL void GL_APIENTRY glGetShaderSource (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source);
-GL_APICALL const GLubyte *GL_APIENTRY glGetString (GLenum name);
-GL_APICALL void GL_APIENTRY glGetTexParameterfv (GLenum target, GLenum pname, GLfloat *params);
-GL_APICALL void GL_APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, GLint *params);
-GL_APICALL void GL_APIENTRY glGetUniformfv (GLuint program, GLint location, GLfloat *params);
-GL_APICALL void GL_APIENTRY glGetUniformiv (GLuint program, GLint location, GLint *params);
-GL_APICALL GLint GL_APIENTRY glGetUniformLocation (GLuint program, const GLchar *name);
-GL_APICALL void GL_APIENTRY glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat *params);
-GL_APICALL void GL_APIENTRY glGetVertexAttribiv (GLuint index, GLenum pname, GLint *params);
-GL_APICALL void GL_APIENTRY glGetVertexAttribPointerv (GLuint index, GLenum pname, void **pointer);
-GL_APICALL void GL_APIENTRY glHint (GLenum target, GLenum mode);
-GL_APICALL GLboolean GL_APIENTRY glIsBuffer (GLuint buffer);
-GL_APICALL GLboolean GL_APIENTRY glIsEnabled (GLenum cap);
-GL_APICALL GLboolean GL_APIENTRY glIsFramebuffer (GLuint framebuffer);
-GL_APICALL GLboolean GL_APIENTRY glIsProgram (GLuint program);
-GL_APICALL GLboolean GL_APIENTRY glIsRenderbuffer (GLuint renderbuffer);
-GL_APICALL GLboolean GL_APIENTRY glIsShader (GLuint shader);
-GL_APICALL GLboolean GL_APIENTRY glIsTexture (GLuint texture);
-GL_APICALL void GL_APIENTRY glLineWidth (GLfloat width);
-GL_APICALL void GL_APIENTRY glLinkProgram (GLuint program);
-GL_APICALL void GL_APIENTRY glPixelStorei (GLenum pname, GLint param);
-GL_APICALL void GL_APIENTRY glPolygonOffset (GLfloat factor, GLfloat units);
-GL_APICALL void GL_APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels);
-GL_APICALL void GL_APIENTRY glReleaseShaderCompiler (void);
-GL_APICALL void GL_APIENTRY glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
-GL_APICALL void GL_APIENTRY glSampleCoverage (GLfloat value, GLboolean invert);
-GL_APICALL void GL_APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height);
-GL_APICALL void GL_APIENTRY glShaderBinary (GLsizei count, const GLuint *shaders, GLenum binaryformat, const void *binary, GLsizei length);
-GL_APICALL void GL_APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length);
-GL_APICALL void GL_APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask);
-GL_APICALL void GL_APIENTRY glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask);
-GL_APICALL void GL_APIENTRY glStencilMask (GLuint mask);
-GL_APICALL void GL_APIENTRY glStencilMaskSeparate (GLenum face, GLuint mask);
-GL_APICALL void GL_APIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass);
-GL_APICALL void GL_APIENTRY glStencilOpSeparate (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
-GL_APICALL void GL_APIENTRY glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels);
-GL_APICALL void GL_APIENTRY glTexParameterf (GLenum target, GLenum pname, GLfloat param);
-GL_APICALL void GL_APIENTRY glTexParameterfv (GLenum target, GLenum pname, const GLfloat *params);
-GL_APICALL void GL_APIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param);
-GL_APICALL void GL_APIENTRY glTexParameteriv (GLenum target, GLenum pname, const GLint *params);
-GL_APICALL void GL_APIENTRY glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);
-GL_APICALL void GL_APIENTRY glUniform1f (GLint location, GLfloat v0);
-GL_APICALL void GL_APIENTRY glUniform1fv (GLint location, GLsizei count, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glUniform1i (GLint location, GLint v0);
-GL_APICALL void GL_APIENTRY glUniform1iv (GLint location, GLsizei count, const GLint *value);
-GL_APICALL void GL_APIENTRY glUniform2f (GLint location, GLfloat v0, GLfloat v1);
-GL_APICALL void GL_APIENTRY glUniform2fv (GLint location, GLsizei count, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glUniform2i (GLint location, GLint v0, GLint v1);
-GL_APICALL void GL_APIENTRY glUniform2iv (GLint location, GLsizei count, const GLint *value);
-GL_APICALL void GL_APIENTRY glUniform3f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
-GL_APICALL void GL_APIENTRY glUniform3fv (GLint location, GLsizei count, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glUniform3i (GLint location, GLint v0, GLint v1, GLint v2);
-GL_APICALL void GL_APIENTRY glUniform3iv (GLint location, GLsizei count, const GLint *value);
-GL_APICALL void GL_APIENTRY glUniform4f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
-GL_APICALL void GL_APIENTRY glUniform4fv (GLint location, GLsizei count, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glUniform4i (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
-GL_APICALL void GL_APIENTRY glUniform4iv (GLint location, GLsizei count, const GLint *value);
-GL_APICALL void GL_APIENTRY glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glUseProgram (GLuint program);
-GL_APICALL void GL_APIENTRY glValidateProgram (GLuint program);
-GL_APICALL void GL_APIENTRY glVertexAttrib1f (GLuint index, GLfloat x);
-GL_APICALL void GL_APIENTRY glVertexAttrib1fv (GLuint index, const GLfloat *v);
-GL_APICALL void GL_APIENTRY glVertexAttrib2f (GLuint index, GLfloat x, GLfloat y);
-GL_APICALL void GL_APIENTRY glVertexAttrib2fv (GLuint index, const GLfloat *v);
-GL_APICALL void GL_APIENTRY glVertexAttrib3f (GLuint index, GLfloat x, GLfloat y, GLfloat z);
-GL_APICALL void GL_APIENTRY glVertexAttrib3fv (GLuint index, const GLfloat *v);
-GL_APICALL void GL_APIENTRY glVertexAttrib4f (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-GL_APICALL void GL_APIENTRY glVertexAttrib4fv (GLuint index, const GLfloat *v);
-GL_APICALL void GL_APIENTRY glVertexAttribPointer (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer);
-GL_APICALL void GL_APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height);
-#endif /* GL_ES_VERSION_2_0 */
-
-#ifndef GL_ES_VERSION_3_0
-#define GL_ES_VERSION_3_0 1
-typedef unsigned short GLhalf;
-#define GL_READ_BUFFER 0x0C02
-#define GL_UNPACK_ROW_LENGTH 0x0CF2
-#define GL_UNPACK_SKIP_ROWS 0x0CF3
-#define GL_UNPACK_SKIP_PIXELS 0x0CF4
-#define GL_PACK_ROW_LENGTH 0x0D02
-#define GL_PACK_SKIP_ROWS 0x0D03
-#define GL_PACK_SKIP_PIXELS 0x0D04
-#define GL_COLOR 0x1800
-#define GL_DEPTH 0x1801
-#define GL_STENCIL 0x1802
-#define GL_RED 0x1903
-#define GL_RGB8 0x8051
-#define GL_RGBA8 0x8058
-#define GL_RGB10_A2 0x8059
-#define GL_TEXTURE_BINDING_3D 0x806A
-#define GL_UNPACK_SKIP_IMAGES 0x806D
-#define GL_UNPACK_IMAGE_HEIGHT 0x806E
-#define GL_TEXTURE_3D 0x806F
-#define GL_TEXTURE_WRAP_R 0x8072
-#define GL_MAX_3D_TEXTURE_SIZE 0x8073
-#define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368
-#define GL_MAX_ELEMENTS_VERTICES 0x80E8
-#define GL_MAX_ELEMENTS_INDICES 0x80E9
-#define GL_TEXTURE_MIN_LOD 0x813A
-#define GL_TEXTURE_MAX_LOD 0x813B
-#define GL_TEXTURE_BASE_LEVEL 0x813C
-#define GL_TEXTURE_MAX_LEVEL 0x813D
-#define GL_MIN 0x8007
-#define GL_MAX 0x8008
-#define GL_DEPTH_COMPONENT24 0x81A6
-#define GL_MAX_TEXTURE_LOD_BIAS 0x84FD
-#define GL_TEXTURE_COMPARE_MODE 0x884C
-#define GL_TEXTURE_COMPARE_FUNC 0x884D
-#define GL_CURRENT_QUERY 0x8865
-#define GL_QUERY_RESULT 0x8866
-#define GL_QUERY_RESULT_AVAILABLE 0x8867
-#define GL_BUFFER_MAPPED 0x88BC
-#define GL_BUFFER_MAP_POINTER 0x88BD
-#define GL_STREAM_READ 0x88E1
-#define GL_STREAM_COPY 0x88E2
-#define GL_STATIC_READ 0x88E5
-#define GL_STATIC_COPY 0x88E6
-#define GL_DYNAMIC_READ 0x88E9
-#define GL_DYNAMIC_COPY 0x88EA
-#define GL_MAX_DRAW_BUFFERS 0x8824
-#define GL_DRAW_BUFFER0 0x8825
-#define GL_DRAW_BUFFER1 0x8826
-#define GL_DRAW_BUFFER2 0x8827
-#define GL_DRAW_BUFFER3 0x8828
-#define GL_DRAW_BUFFER4 0x8829
-#define GL_DRAW_BUFFER5 0x882A
-#define GL_DRAW_BUFFER6 0x882B
-#define GL_DRAW_BUFFER7 0x882C
-#define GL_DRAW_BUFFER8 0x882D
-#define GL_DRAW_BUFFER9 0x882E
-#define GL_DRAW_BUFFER10 0x882F
-#define GL_DRAW_BUFFER11 0x8830
-#define GL_DRAW_BUFFER12 0x8831
-#define GL_DRAW_BUFFER13 0x8832
-#define GL_DRAW_BUFFER14 0x8833
-#define GL_DRAW_BUFFER15 0x8834
-#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS 0x8B49
-#define GL_MAX_VERTEX_UNIFORM_COMPONENTS 0x8B4A
-#define GL_SAMPLER_3D 0x8B5F
-#define GL_SAMPLER_2D_SHADOW 0x8B62
-#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT 0x8B8B
-#define GL_PIXEL_PACK_BUFFER 0x88EB
-#define GL_PIXEL_UNPACK_BUFFER 0x88EC
-#define GL_PIXEL_PACK_BUFFER_BINDING 0x88ED
-#define GL_PIXEL_UNPACK_BUFFER_BINDING 0x88EF
-#define GL_FLOAT_MAT2x3 0x8B65
-#define GL_FLOAT_MAT2x4 0x8B66
-#define GL_FLOAT_MAT3x2 0x8B67
-#define GL_FLOAT_MAT3x4 0x8B68
-#define GL_FLOAT_MAT4x2 0x8B69
-#define GL_FLOAT_MAT4x3 0x8B6A
-#define GL_SRGB 0x8C40
-#define GL_SRGB8 0x8C41
-#define GL_SRGB8_ALPHA8 0x8C43
-#define GL_COMPARE_REF_TO_TEXTURE 0x884E
-#define GL_MAJOR_VERSION 0x821B
-#define GL_MINOR_VERSION 0x821C
-#define GL_NUM_EXTENSIONS 0x821D
-#define GL_RGBA32F 0x8814
-#define GL_RGB32F 0x8815
-#define GL_RGBA16F 0x881A
-#define GL_RGB16F 0x881B
-#define GL_VERTEX_ATTRIB_ARRAY_INTEGER 0x88FD
-#define GL_MAX_ARRAY_TEXTURE_LAYERS 0x88FF
-#define GL_MIN_PROGRAM_TEXEL_OFFSET 0x8904
-#define GL_MAX_PROGRAM_TEXEL_OFFSET 0x8905
-#define GL_MAX_VARYING_COMPONENTS 0x8B4B
-#define GL_TEXTURE_2D_ARRAY 0x8C1A
-#define GL_TEXTURE_BINDING_2D_ARRAY 0x8C1D
-#define GL_R11F_G11F_B10F 0x8C3A
-#define GL_UNSIGNED_INT_10F_11F_11F_REV 0x8C3B
-#define GL_RGB9_E5 0x8C3D
-#define GL_UNSIGNED_INT_5_9_9_9_REV 0x8C3E
-#define GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH 0x8C76
-#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE 0x8C7F
-#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS 0x8C80
-#define GL_TRANSFORM_FEEDBACK_VARYINGS 0x8C83
-#define GL_TRANSFORM_FEEDBACK_BUFFER_START 0x8C84
-#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE 0x8C85
-#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN 0x8C88
-#define GL_RASTERIZER_DISCARD 0x8C89
-#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS 0x8C8A
-#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS 0x8C8B
-#define GL_INTERLEAVED_ATTRIBS 0x8C8C
-#define GL_SEPARATE_ATTRIBS 0x8C8D
-#define GL_TRANSFORM_FEEDBACK_BUFFER 0x8C8E
-#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING 0x8C8F
-#define GL_RGBA32UI 0x8D70
-#define GL_RGB32UI 0x8D71
-#define GL_RGBA16UI 0x8D76
-#define GL_RGB16UI 0x8D77
-#define GL_RGBA8UI 0x8D7C
-#define GL_RGB8UI 0x8D7D
-#define GL_RGBA32I 0x8D82
-#define GL_RGB32I 0x8D83
-#define GL_RGBA16I 0x8D88
-#define GL_RGB16I 0x8D89
-#define GL_RGBA8I 0x8D8E
-#define GL_RGB8I 0x8D8F
-#define GL_RED_INTEGER 0x8D94
-#define GL_RGB_INTEGER 0x8D98
-#define GL_RGBA_INTEGER 0x8D99
-#define GL_SAMPLER_2D_ARRAY 0x8DC1
-#define GL_SAMPLER_2D_ARRAY_SHADOW 0x8DC4
-#define GL_SAMPLER_CUBE_SHADOW 0x8DC5
-#define GL_UNSIGNED_INT_VEC2 0x8DC6
-#define GL_UNSIGNED_INT_VEC3 0x8DC7
-#define GL_UNSIGNED_INT_VEC4 0x8DC8
-#define GL_INT_SAMPLER_2D 0x8DCA
-#define GL_INT_SAMPLER_3D 0x8DCB
-#define GL_INT_SAMPLER_CUBE 0x8DCC
-#define GL_INT_SAMPLER_2D_ARRAY 0x8DCF
-#define GL_UNSIGNED_INT_SAMPLER_2D 0x8DD2
-#define GL_UNSIGNED_INT_SAMPLER_3D 0x8DD3
-#define GL_UNSIGNED_INT_SAMPLER_CUBE 0x8DD4
-#define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY 0x8DD7
-#define GL_BUFFER_ACCESS_FLAGS 0x911F
-#define GL_BUFFER_MAP_LENGTH 0x9120
-#define GL_BUFFER_MAP_OFFSET 0x9121
-#define GL_DEPTH_COMPONENT32F 0x8CAC
-#define GL_DEPTH32F_STENCIL8 0x8CAD
-#define GL_FLOAT_32_UNSIGNED_INT_24_8_REV 0x8DAD
-#define GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING 0x8210
-#define GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE 0x8211
-#define GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE 0x8212
-#define GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE 0x8213
-#define GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE 0x8214
-#define GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE 0x8215
-#define GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE 0x8216
-#define GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE 0x8217
-#define GL_FRAMEBUFFER_DEFAULT 0x8218
-#define GL_FRAMEBUFFER_UNDEFINED 0x8219
-#define GL_DEPTH_STENCIL_ATTACHMENT 0x821A
-#define GL_DEPTH_STENCIL 0x84F9
-#define GL_UNSIGNED_INT_24_8 0x84FA
-#define GL_DEPTH24_STENCIL8 0x88F0
-#define GL_UNSIGNED_NORMALIZED 0x8C17
-#define GL_DRAW_FRAMEBUFFER_BINDING 0x8CA6
-#define GL_READ_FRAMEBUFFER 0x8CA8
-#define GL_DRAW_FRAMEBUFFER 0x8CA9
-#define GL_READ_FRAMEBUFFER_BINDING 0x8CAA
-#define GL_RENDERBUFFER_SAMPLES 0x8CAB
-#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER 0x8CD4
-#define GL_MAX_COLOR_ATTACHMENTS 0x8CDF
-#define GL_COLOR_ATTACHMENT1 0x8CE1
-#define GL_COLOR_ATTACHMENT2 0x8CE2
-#define GL_COLOR_ATTACHMENT3 0x8CE3
-#define GL_COLOR_ATTACHMENT4 0x8CE4
-#define GL_COLOR_ATTACHMENT5 0x8CE5
-#define GL_COLOR_ATTACHMENT6 0x8CE6
-#define GL_COLOR_ATTACHMENT7 0x8CE7
-#define GL_COLOR_ATTACHMENT8 0x8CE8
-#define GL_COLOR_ATTACHMENT9 0x8CE9
-#define GL_COLOR_ATTACHMENT10 0x8CEA
-#define GL_COLOR_ATTACHMENT11 0x8CEB
-#define GL_COLOR_ATTACHMENT12 0x8CEC
-#define GL_COLOR_ATTACHMENT13 0x8CED
-#define GL_COLOR_ATTACHMENT14 0x8CEE
-#define GL_COLOR_ATTACHMENT15 0x8CEF
-#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE 0x8D56
-#define GL_MAX_SAMPLES 0x8D57
-#define GL_HALF_FLOAT 0x140B
-#define GL_MAP_READ_BIT 0x0001
-#define GL_MAP_WRITE_BIT 0x0002
-#define GL_MAP_INVALIDATE_RANGE_BIT 0x0004
-#define GL_MAP_INVALIDATE_BUFFER_BIT 0x0008
-#define GL_MAP_FLUSH_EXPLICIT_BIT 0x0010
-#define GL_MAP_UNSYNCHRONIZED_BIT 0x0020
-#define GL_RG 0x8227
-#define GL_RG_INTEGER 0x8228
-#define GL_R8 0x8229
-#define GL_RG8 0x822B
-#define GL_R16F 0x822D
-#define GL_R32F 0x822E
-#define GL_RG16F 0x822F
-#define GL_RG32F 0x8230
-#define GL_R8I 0x8231
-#define GL_R8UI 0x8232
-#define GL_R16I 0x8233
-#define GL_R16UI 0x8234
-#define GL_R32I 0x8235
-#define GL_R32UI 0x8236
-#define GL_RG8I 0x8237
-#define GL_RG8UI 0x8238
-#define GL_RG16I 0x8239
-#define GL_RG16UI 0x823A
-#define GL_RG32I 0x823B
-#define GL_RG32UI 0x823C
-#define GL_VERTEX_ARRAY_BINDING 0x85B5
-#define GL_R8_SNORM 0x8F94
-#define GL_RG8_SNORM 0x8F95
-#define GL_RGB8_SNORM 0x8F96
-#define GL_RGBA8_SNORM 0x8F97
-#define GL_SIGNED_NORMALIZED 0x8F9C
-#define GL_PRIMITIVE_RESTART_FIXED_INDEX 0x8D69
-#define GL_COPY_READ_BUFFER 0x8F36
-#define GL_COPY_WRITE_BUFFER 0x8F37
-#define GL_COPY_READ_BUFFER_BINDING 0x8F36
-#define GL_COPY_WRITE_BUFFER_BINDING 0x8F37
-#define GL_UNIFORM_BUFFER 0x8A11
-#define GL_UNIFORM_BUFFER_BINDING 0x8A28
-#define GL_UNIFORM_BUFFER_START 0x8A29
-#define GL_UNIFORM_BUFFER_SIZE 0x8A2A
-#define GL_MAX_VERTEX_UNIFORM_BLOCKS 0x8A2B
-#define GL_MAX_FRAGMENT_UNIFORM_BLOCKS 0x8A2D
-#define GL_MAX_COMBINED_UNIFORM_BLOCKS 0x8A2E
-#define GL_MAX_UNIFORM_BUFFER_BINDINGS 0x8A2F
-#define GL_MAX_UNIFORM_BLOCK_SIZE 0x8A30
-#define GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS 0x8A31
-#define GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS 0x8A33
-#define GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT 0x8A34
-#define GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH 0x8A35
-#define GL_ACTIVE_UNIFORM_BLOCKS 0x8A36
-#define GL_UNIFORM_TYPE 0x8A37
-#define GL_UNIFORM_SIZE 0x8A38
-#define GL_UNIFORM_NAME_LENGTH 0x8A39
-#define GL_UNIFORM_BLOCK_INDEX 0x8A3A
-#define GL_UNIFORM_OFFSET 0x8A3B
-#define GL_UNIFORM_ARRAY_STRIDE 0x8A3C
-#define GL_UNIFORM_MATRIX_STRIDE 0x8A3D
-#define GL_UNIFORM_IS_ROW_MAJOR 0x8A3E
-#define GL_UNIFORM_BLOCK_BINDING 0x8A3F
-#define GL_UNIFORM_BLOCK_DATA_SIZE 0x8A40
-#define GL_UNIFORM_BLOCK_NAME_LENGTH 0x8A41
-#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS 0x8A42
-#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES 0x8A43
-#define GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER 0x8A44
-#define GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER 0x8A46
-#define GL_INVALID_INDEX 0xFFFFFFFFu
-#define GL_MAX_VERTEX_OUTPUT_COMPONENTS 0x9122
-#define GL_MAX_FRAGMENT_INPUT_COMPONENTS 0x9125
-#define GL_MAX_SERVER_WAIT_TIMEOUT 0x9111
-#define GL_OBJECT_TYPE 0x9112
-#define GL_SYNC_CONDITION 0x9113
-#define GL_SYNC_STATUS 0x9114
-#define GL_SYNC_FLAGS 0x9115
-#define GL_SYNC_FENCE 0x9116
-#define GL_SYNC_GPU_COMMANDS_COMPLETE 0x9117
-#define GL_UNSIGNALED 0x9118
-#define GL_SIGNALED 0x9119
-#define GL_ALREADY_SIGNALED 0x911A
-#define GL_TIMEOUT_EXPIRED 0x911B
-#define GL_CONDITION_SATISFIED 0x911C
-#define GL_WAIT_FAILED 0x911D
-#define GL_SYNC_FLUSH_COMMANDS_BIT 0x00000001
-#define GL_TIMEOUT_IGNORED 0xFFFFFFFFFFFFFFFFull
-#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR 0x88FE
-#define GL_ANY_SAMPLES_PASSED 0x8C2F
-#define GL_ANY_SAMPLES_PASSED_CONSERVATIVE 0x8D6A
-#define GL_SAMPLER_BINDING 0x8919
-#define GL_RGB10_A2UI 0x906F
-#define GL_TEXTURE_SWIZZLE_R 0x8E42
-#define GL_TEXTURE_SWIZZLE_G 0x8E43
-#define GL_TEXTURE_SWIZZLE_B 0x8E44
-#define GL_TEXTURE_SWIZZLE_A 0x8E45
-#define GL_GREEN 0x1904
-#define GL_BLUE 0x1905
-#define GL_INT_2_10_10_10_REV 0x8D9F
-#define GL_TRANSFORM_FEEDBACK 0x8E22
-#define GL_TRANSFORM_FEEDBACK_PAUSED 0x8E23
-#define GL_TRANSFORM_FEEDBACK_ACTIVE 0x8E24
-#define GL_TRANSFORM_FEEDBACK_BINDING 0x8E25
-#define GL_PROGRAM_BINARY_RETRIEVABLE_HINT 0x8257
-#define GL_PROGRAM_BINARY_LENGTH 0x8741
-#define GL_NUM_PROGRAM_BINARY_FORMATS 0x87FE
-#define GL_PROGRAM_BINARY_FORMATS 0x87FF
-#define GL_COMPRESSED_R11_EAC 0x9270
-#define GL_COMPRESSED_SIGNED_R11_EAC 0x9271
-#define GL_COMPRESSED_RG11_EAC 0x9272
-#define GL_COMPRESSED_SIGNED_RG11_EAC 0x9273
-#define GL_COMPRESSED_RGB8_ETC2 0x9274
-#define GL_COMPRESSED_SRGB8_ETC2 0x9275
-#define GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9276
-#define GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9277
-#define GL_COMPRESSED_RGBA8_ETC2_EAC 0x9278
-#define GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC 0x9279
-#define GL_TEXTURE_IMMUTABLE_FORMAT 0x912F
-#define GL_MAX_ELEMENT_INDEX 0x8D6B
-#define GL_NUM_SAMPLE_COUNTS 0x9380
-#define GL_TEXTURE_IMMUTABLE_LEVELS 0x82DF
-GL_APICALL void GL_APIENTRY glReadBuffer (GLenum src);
-GL_APICALL void GL_APIENTRY glDrawRangeElements (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices);
-GL_APICALL void GL_APIENTRY glTexImage3D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);
-GL_APICALL void GL_APIENTRY glTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);
-GL_APICALL void GL_APIENTRY glCopyTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
-GL_APICALL void GL_APIENTRY glCompressedTexImage3D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data);
-GL_APICALL void GL_APIENTRY glCompressedTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data);
-GL_APICALL void GL_APIENTRY glGenQueries (GLsizei n, GLuint *ids);
-GL_APICALL void GL_APIENTRY glDeleteQueries (GLsizei n, const GLuint *ids);
-GL_APICALL GLboolean GL_APIENTRY glIsQuery (GLuint id);
-GL_APICALL void GL_APIENTRY glBeginQuery (GLenum target, GLuint id);
-GL_APICALL void GL_APIENTRY glEndQuery (GLenum target);
-GL_APICALL void GL_APIENTRY glGetQueryiv (GLenum target, GLenum pname, GLint *params);
-GL_APICALL void GL_APIENTRY glGetQueryObjectuiv (GLuint id, GLenum pname, GLuint *params);
-GL_APICALL GLboolean GL_APIENTRY glUnmapBuffer (GLenum target);
-GL_APICALL void GL_APIENTRY glGetBufferPointerv (GLenum target, GLenum pname, void **params);
-GL_APICALL void GL_APIENTRY glDrawBuffers (GLsizei n, const GLenum *bufs);
-GL_APICALL void GL_APIENTRY glUniformMatrix2x3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glUniformMatrix3x2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glUniformMatrix2x4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glUniformMatrix4x2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glUniformMatrix3x4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glUniformMatrix4x3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glBlitFramebuffer (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
-GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
-GL_APICALL void GL_APIENTRY glFramebufferTextureLayer (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
-GL_APICALL void *GL_APIENTRY glMapBufferRange (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
-GL_APICALL void GL_APIENTRY glFlushMappedBufferRange (GLenum target, GLintptr offset, GLsizeiptr length);
-GL_APICALL void GL_APIENTRY glBindVertexArray (GLuint array);
-GL_APICALL void GL_APIENTRY glDeleteVertexArrays (GLsizei n, const GLuint *arrays);
-GL_APICALL void GL_APIENTRY glGenVertexArrays (GLsizei n, GLuint *arrays);
-GL_APICALL GLboolean GL_APIENTRY glIsVertexArray (GLuint array);
-GL_APICALL void GL_APIENTRY glGetIntegeri_v (GLenum target, GLuint index, GLint *data);
-GL_APICALL void GL_APIENTRY glBeginTransformFeedback (GLenum primitiveMode);
-GL_APICALL void GL_APIENTRY glEndTransformFeedback (void);
-GL_APICALL void GL_APIENTRY glBindBufferRange (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
-GL_APICALL void GL_APIENTRY glBindBufferBase (GLenum target, GLuint index, GLuint buffer);
-GL_APICALL void GL_APIENTRY glTransformFeedbackVaryings (GLuint program, GLsizei count, const GLchar *const*varyings, GLenum bufferMode);
-GL_APICALL void GL_APIENTRY glGetTransformFeedbackVarying (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);
-GL_APICALL void GL_APIENTRY glVertexAttribIPointer (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer);
-GL_APICALL void GL_APIENTRY glGetVertexAttribIiv (GLuint index, GLenum pname, GLint *params);
-GL_APICALL void GL_APIENTRY glGetVertexAttribIuiv (GLuint index, GLenum pname, GLuint *params);
-GL_APICALL void GL_APIENTRY glVertexAttribI4i (GLuint index, GLint x, GLint y, GLint z, GLint w);
-GL_APICALL void GL_APIENTRY glVertexAttribI4ui (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
-GL_APICALL void GL_APIENTRY glVertexAttribI4iv (GLuint index, const GLint *v);
-GL_APICALL void GL_APIENTRY glVertexAttribI4uiv (GLuint index, const GLuint *v);
-GL_APICALL void GL_APIENTRY glGetUniformuiv (GLuint program, GLint location, GLuint *params);
-GL_APICALL GLint GL_APIENTRY glGetFragDataLocation (GLuint program, const GLchar *name);
-GL_APICALL void GL_APIENTRY glUniform1ui (GLint location, GLuint v0);
-GL_APICALL void GL_APIENTRY glUniform2ui (GLint location, GLuint v0, GLuint v1);
-GL_APICALL void GL_APIENTRY glUniform3ui (GLint location, GLuint v0, GLuint v1, GLuint v2);
-GL_APICALL void GL_APIENTRY glUniform4ui (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
-GL_APICALL void GL_APIENTRY glUniform1uiv (GLint location, GLsizei count, const GLuint *value);
-GL_APICALL void GL_APIENTRY glUniform2uiv (GLint location, GLsizei count, const GLuint *value);
-GL_APICALL void GL_APIENTRY glUniform3uiv (GLint location, GLsizei count, const GLuint *value);
-GL_APICALL void GL_APIENTRY glUniform4uiv (GLint location, GLsizei count, const GLuint *value);
-GL_APICALL void GL_APIENTRY glClearBufferiv (GLenum buffer, GLint drawbuffer, const GLint *value);
-GL_APICALL void GL_APIENTRY glClearBufferuiv (GLenum buffer, GLint drawbuffer, const GLuint *value);
-GL_APICALL void GL_APIENTRY glClearBufferfv (GLenum buffer, GLint drawbuffer, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glClearBufferfi (GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil);
-GL_APICALL const GLubyte *GL_APIENTRY glGetStringi (GLenum name, GLuint index);
-GL_APICALL void GL_APIENTRY glCopyBufferSubData (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
-GL_APICALL void GL_APIENTRY glGetUniformIndices (GLuint program, GLsizei uniformCount, const GLchar *const*uniformNames, GLuint *uniformIndices);
-GL_APICALL void GL_APIENTRY glGetActiveUniformsiv (GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params);
-GL_APICALL GLuint GL_APIENTRY glGetUniformBlockIndex (GLuint program, const GLchar *uniformBlockName);
-GL_APICALL void GL_APIENTRY glGetActiveUniformBlockiv (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params);
-GL_APICALL void GL_APIENTRY glGetActiveUniformBlockName (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName);
-GL_APICALL void GL_APIENTRY glUniformBlockBinding (GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding);
-GL_APICALL void GL_APIENTRY glDrawArraysInstanced (GLenum mode, GLint first, GLsizei count, GLsizei instancecount);
-GL_APICALL void GL_APIENTRY glDrawElementsInstanced (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount);
-GL_APICALL GLsync GL_APIENTRY glFenceSync (GLenum condition, GLbitfield flags);
-GL_APICALL GLboolean GL_APIENTRY glIsSync (GLsync sync);
-GL_APICALL void GL_APIENTRY glDeleteSync (GLsync sync);
-GL_APICALL GLenum GL_APIENTRY glClientWaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout);
-GL_APICALL void GL_APIENTRY glWaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout);
-GL_APICALL void GL_APIENTRY glGetInteger64v (GLenum pname, GLint64 *data);
-GL_APICALL void GL_APIENTRY glGetSynciv (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);
-GL_APICALL void GL_APIENTRY glGetInteger64i_v (GLenum target, GLuint index, GLint64 *data);
-GL_APICALL void GL_APIENTRY glGetBufferParameteri64v (GLenum target, GLenum pname, GLint64 *params);
-GL_APICALL void GL_APIENTRY glGenSamplers (GLsizei count, GLuint *samplers);
-GL_APICALL void GL_APIENTRY glDeleteSamplers (GLsizei count, const GLuint *samplers);
-GL_APICALL GLboolean GL_APIENTRY glIsSampler (GLuint sampler);
-GL_APICALL void GL_APIENTRY glBindSampler (GLuint unit, GLuint sampler);
-GL_APICALL void GL_APIENTRY glSamplerParameteri (GLuint sampler, GLenum pname, GLint param);
-GL_APICALL void GL_APIENTRY glSamplerParameteriv (GLuint sampler, GLenum pname, const GLint *param);
-GL_APICALL void GL_APIENTRY glSamplerParameterf (GLuint sampler, GLenum pname, GLfloat param);
-GL_APICALL void GL_APIENTRY glSamplerParameterfv (GLuint sampler, GLenum pname, const GLfloat *param);
-GL_APICALL void GL_APIENTRY glGetSamplerParameteriv (GLuint sampler, GLenum pname, GLint *params);
-GL_APICALL void GL_APIENTRY glGetSamplerParameterfv (GLuint sampler, GLenum pname, GLfloat *params);
-GL_APICALL void GL_APIENTRY glVertexAttribDivisor (GLuint index, GLuint divisor);
-GL_APICALL void GL_APIENTRY glBindTransformFeedback (GLenum target, GLuint id);
-GL_APICALL void GL_APIENTRY glDeleteTransformFeedbacks (GLsizei n, const GLuint *ids);
-GL_APICALL void GL_APIENTRY glGenTransformFeedbacks (GLsizei n, GLuint *ids);
-GL_APICALL GLboolean GL_APIENTRY glIsTransformFeedback (GLuint id);
-GL_APICALL void GL_APIENTRY glPauseTransformFeedback (void);
-GL_APICALL void GL_APIENTRY glResumeTransformFeedback (void);
-GL_APICALL void GL_APIENTRY glGetProgramBinary (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary);
-GL_APICALL void GL_APIENTRY glProgramBinary (GLuint program, GLenum binaryFormat, const void *binary, GLsizei length);
-GL_APICALL void GL_APIENTRY glProgramParameteri (GLuint program, GLenum pname, GLint value);
-GL_APICALL void GL_APIENTRY glInvalidateFramebuffer (GLenum target, GLsizei numAttachments, const GLenum *attachments);
-GL_APICALL void GL_APIENTRY glInvalidateSubFramebuffer (GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height);
-GL_APICALL void GL_APIENTRY glTexStorage2D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
-GL_APICALL void GL_APIENTRY glTexStorage3D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
-GL_APICALL void GL_APIENTRY glGetInternalformativ (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params);
-#endif /* GL_ES_VERSION_3_0 */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/external/khronos/GLES3/gl31.h b/external/khronos/GLES3/gl31.h
deleted file mode 100644
index 72c6498e7..000000000
--- a/external/khronos/GLES3/gl31.h
+++ /dev/null
@@ -1,1184 +0,0 @@
-#ifndef __gl31_h_
-#define __gl31_h_ 1
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
-** Copyright (c) 2013-2014 The Khronos Group Inc.
-**
-** Permission is hereby granted, free of charge, to any person obtaining a
-** copy of this software and/or associated documentation files (the
-** "Materials"), to deal in the Materials without restriction, including
-** without limitation the rights to use, copy, modify, merge, publish,
-** distribute, sublicense, and/or sell copies of the Materials, and to
-** permit persons to whom the Materials are furnished to do so, subject to
-** the following conditions:
-**
-** The above copyright notice and this permission notice shall be included
-** in all copies or substantial portions of the Materials.
-**
-** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
-*/
-/*
-** This header is generated from the Khronos OpenGL / OpenGL ES XML
-** API Registry. The current version of the Registry, generator scripts
-** used to make the header, and the header can be found at
-** http://www.opengl.org/registry/
-**
-** Khronos $Revision$ on $Date$
-*/
-
-#include
-
-/* Generated on date 20141204 */
-
-/* Generated C header for:
- * API: gles2
- * Profile: common
- * Versions considered: 2.[0-9]|3.[01]
- * Versions emitted: .*
- * Default extensions included: None
- * Additional extensions included: _nomatch_^
- * Extensions removed: _nomatch_^
- */
-
-#ifndef GL_ES_VERSION_2_0
-#define GL_ES_VERSION_2_0 1
-#include
-typedef khronos_int8_t GLbyte;
-typedef khronos_float_t GLclampf;
-typedef khronos_int32_t GLfixed;
-typedef short GLshort;
-typedef unsigned short GLushort;
-typedef void GLvoid;
-typedef struct __GLsync *GLsync;
-typedef khronos_int64_t GLint64;
-typedef khronos_uint64_t GLuint64;
-typedef unsigned int GLenum;
-typedef unsigned int GLuint;
-typedef char GLchar;
-typedef khronos_float_t GLfloat;
-typedef khronos_ssize_t GLsizeiptr;
-typedef khronos_intptr_t GLintptr;
-typedef unsigned int GLbitfield;
-typedef int GLint;
-typedef unsigned char GLboolean;
-typedef int GLsizei;
-typedef khronos_uint8_t GLubyte;
-#define GL_DEPTH_BUFFER_BIT 0x00000100
-#define GL_STENCIL_BUFFER_BIT 0x00000400
-#define GL_COLOR_BUFFER_BIT 0x00004000
-#define GL_FALSE 0
-#define GL_TRUE 1
-#define GL_POINTS 0x0000
-#define GL_LINES 0x0001
-#define GL_LINE_LOOP 0x0002
-#define GL_LINE_STRIP 0x0003
-#define GL_TRIANGLES 0x0004
-#define GL_TRIANGLE_STRIP 0x0005
-#define GL_TRIANGLE_FAN 0x0006
-#define GL_ZERO 0
-#define GL_ONE 1
-#define GL_SRC_COLOR 0x0300
-#define GL_ONE_MINUS_SRC_COLOR 0x0301
-#define GL_SRC_ALPHA 0x0302
-#define GL_ONE_MINUS_SRC_ALPHA 0x0303
-#define GL_DST_ALPHA 0x0304
-#define GL_ONE_MINUS_DST_ALPHA 0x0305
-#define GL_DST_COLOR 0x0306
-#define GL_ONE_MINUS_DST_COLOR 0x0307
-#define GL_SRC_ALPHA_SATURATE 0x0308
-#define GL_FUNC_ADD 0x8006
-#define GL_BLEND_EQUATION 0x8009
-#define GL_BLEND_EQUATION_RGB 0x8009
-#define GL_BLEND_EQUATION_ALPHA 0x883D
-#define GL_FUNC_SUBTRACT 0x800A
-#define GL_FUNC_REVERSE_SUBTRACT 0x800B
-#define GL_BLEND_DST_RGB 0x80C8
-#define GL_BLEND_SRC_RGB 0x80C9
-#define GL_BLEND_DST_ALPHA 0x80CA
-#define GL_BLEND_SRC_ALPHA 0x80CB
-#define GL_CONSTANT_COLOR 0x8001
-#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002
-#define GL_CONSTANT_ALPHA 0x8003
-#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004
-#define GL_BLEND_COLOR 0x8005
-#define GL_ARRAY_BUFFER 0x8892
-#define GL_ELEMENT_ARRAY_BUFFER 0x8893
-#define GL_ARRAY_BUFFER_BINDING 0x8894
-#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895
-#define GL_STREAM_DRAW 0x88E0
-#define GL_STATIC_DRAW 0x88E4
-#define GL_DYNAMIC_DRAW 0x88E8
-#define GL_BUFFER_SIZE 0x8764
-#define GL_BUFFER_USAGE 0x8765
-#define GL_CURRENT_VERTEX_ATTRIB 0x8626
-#define GL_FRONT 0x0404
-#define GL_BACK 0x0405
-#define GL_FRONT_AND_BACK 0x0408
-#define GL_TEXTURE_2D 0x0DE1
-#define GL_CULL_FACE 0x0B44
-#define GL_BLEND 0x0BE2
-#define GL_DITHER 0x0BD0
-#define GL_STENCIL_TEST 0x0B90
-#define GL_DEPTH_TEST 0x0B71
-#define GL_SCISSOR_TEST 0x0C11
-#define GL_POLYGON_OFFSET_FILL 0x8037
-#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E
-#define GL_SAMPLE_COVERAGE 0x80A0
-#define GL_NO_ERROR 0
-#define GL_INVALID_ENUM 0x0500
-#define GL_INVALID_VALUE 0x0501
-#define GL_INVALID_OPERATION 0x0502
-#define GL_OUT_OF_MEMORY 0x0505
-#define GL_CW 0x0900
-#define GL_CCW 0x0901
-#define GL_LINE_WIDTH 0x0B21
-#define GL_ALIASED_POINT_SIZE_RANGE 0x846D
-#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E
-#define GL_CULL_FACE_MODE 0x0B45
-#define GL_FRONT_FACE 0x0B46
-#define GL_DEPTH_RANGE 0x0B70
-#define GL_DEPTH_WRITEMASK 0x0B72
-#define GL_DEPTH_CLEAR_VALUE 0x0B73
-#define GL_DEPTH_FUNC 0x0B74
-#define GL_STENCIL_CLEAR_VALUE 0x0B91
-#define GL_STENCIL_FUNC 0x0B92
-#define GL_STENCIL_FAIL 0x0B94
-#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95
-#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96
-#define GL_STENCIL_REF 0x0B97
-#define GL_STENCIL_VALUE_MASK 0x0B93
-#define GL_STENCIL_WRITEMASK 0x0B98
-#define GL_STENCIL_BACK_FUNC 0x8800
-#define GL_STENCIL_BACK_FAIL 0x8801
-#define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802
-#define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803
-#define GL_STENCIL_BACK_REF 0x8CA3
-#define GL_STENCIL_BACK_VALUE_MASK 0x8CA4
-#define GL_STENCIL_BACK_WRITEMASK 0x8CA5
-#define GL_VIEWPORT 0x0BA2
-#define GL_SCISSOR_BOX 0x0C10
-#define GL_COLOR_CLEAR_VALUE 0x0C22
-#define GL_COLOR_WRITEMASK 0x0C23
-#define GL_UNPACK_ALIGNMENT 0x0CF5
-#define GL_PACK_ALIGNMENT 0x0D05
-#define GL_MAX_TEXTURE_SIZE 0x0D33
-#define GL_MAX_VIEWPORT_DIMS 0x0D3A
-#define GL_SUBPIXEL_BITS 0x0D50
-#define GL_RED_BITS 0x0D52
-#define GL_GREEN_BITS 0x0D53
-#define GL_BLUE_BITS 0x0D54
-#define GL_ALPHA_BITS 0x0D55
-#define GL_DEPTH_BITS 0x0D56
-#define GL_STENCIL_BITS 0x0D57
-#define GL_POLYGON_OFFSET_UNITS 0x2A00
-#define GL_POLYGON_OFFSET_FACTOR 0x8038
-#define GL_TEXTURE_BINDING_2D 0x8069
-#define GL_SAMPLE_BUFFERS 0x80A8
-#define GL_SAMPLES 0x80A9
-#define GL_SAMPLE_COVERAGE_VALUE 0x80AA
-#define GL_SAMPLE_COVERAGE_INVERT 0x80AB
-#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
-#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3
-#define GL_DONT_CARE 0x1100
-#define GL_FASTEST 0x1101
-#define GL_NICEST 0x1102
-#define GL_GENERATE_MIPMAP_HINT 0x8192
-#define GL_BYTE 0x1400
-#define GL_UNSIGNED_BYTE 0x1401
-#define GL_SHORT 0x1402
-#define GL_UNSIGNED_SHORT 0x1403
-#define GL_INT 0x1404
-#define GL_UNSIGNED_INT 0x1405
-#define GL_FLOAT 0x1406
-#define GL_FIXED 0x140C
-#define GL_DEPTH_COMPONENT 0x1902
-#define GL_ALPHA 0x1906
-#define GL_RGB 0x1907
-#define GL_RGBA 0x1908
-#define GL_LUMINANCE 0x1909
-#define GL_LUMINANCE_ALPHA 0x190A
-#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033
-#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034
-#define GL_UNSIGNED_SHORT_5_6_5 0x8363
-#define GL_FRAGMENT_SHADER 0x8B30
-#define GL_VERTEX_SHADER 0x8B31
-#define GL_MAX_VERTEX_ATTRIBS 0x8869
-#define GL_MAX_VERTEX_UNIFORM_VECTORS 0x8DFB
-#define GL_MAX_VARYING_VECTORS 0x8DFC
-#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D
-#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C
-#define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872
-#define GL_MAX_FRAGMENT_UNIFORM_VECTORS 0x8DFD
-#define GL_SHADER_TYPE 0x8B4F
-#define GL_DELETE_STATUS 0x8B80
-#define GL_LINK_STATUS 0x8B82
-#define GL_VALIDATE_STATUS 0x8B83
-#define GL_ATTACHED_SHADERS 0x8B85
-#define GL_ACTIVE_UNIFORMS 0x8B86
-#define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87
-#define GL_ACTIVE_ATTRIBUTES 0x8B89
-#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A
-#define GL_SHADING_LANGUAGE_VERSION 0x8B8C
-#define GL_CURRENT_PROGRAM 0x8B8D
-#define GL_NEVER 0x0200
-#define GL_LESS 0x0201
-#define GL_EQUAL 0x0202
-#define GL_LEQUAL 0x0203
-#define GL_GREATER 0x0204
-#define GL_NOTEQUAL 0x0205
-#define GL_GEQUAL 0x0206
-#define GL_ALWAYS 0x0207
-#define GL_KEEP 0x1E00
-#define GL_REPLACE 0x1E01
-#define GL_INCR 0x1E02
-#define GL_DECR 0x1E03
-#define GL_INVERT 0x150A
-#define GL_INCR_WRAP 0x8507
-#define GL_DECR_WRAP 0x8508
-#define GL_VENDOR 0x1F00
-#define GL_RENDERER 0x1F01
-#define GL_VERSION 0x1F02
-#define GL_EXTENSIONS 0x1F03
-#define GL_NEAREST 0x2600
-#define GL_LINEAR 0x2601
-#define GL_NEAREST_MIPMAP_NEAREST 0x2700
-#define GL_LINEAR_MIPMAP_NEAREST 0x2701
-#define GL_NEAREST_MIPMAP_LINEAR 0x2702
-#define GL_LINEAR_MIPMAP_LINEAR 0x2703
-#define GL_TEXTURE_MAG_FILTER 0x2800
-#define GL_TEXTURE_MIN_FILTER 0x2801
-#define GL_TEXTURE_WRAP_S 0x2802
-#define GL_TEXTURE_WRAP_T 0x2803
-#define GL_TEXTURE 0x1702
-#define GL_TEXTURE_CUBE_MAP 0x8513
-#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514
-#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515
-#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516
-#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517
-#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518
-#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519
-#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A
-#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C
-#define GL_TEXTURE0 0x84C0
-#define GL_TEXTURE1 0x84C1
-#define GL_TEXTURE2 0x84C2
-#define GL_TEXTURE3 0x84C3
-#define GL_TEXTURE4 0x84C4
-#define GL_TEXTURE5 0x84C5
-#define GL_TEXTURE6 0x84C6
-#define GL_TEXTURE7 0x84C7
-#define GL_TEXTURE8 0x84C8
-#define GL_TEXTURE9 0x84C9
-#define GL_TEXTURE10 0x84CA
-#define GL_TEXTURE11 0x84CB
-#define GL_TEXTURE12 0x84CC
-#define GL_TEXTURE13 0x84CD
-#define GL_TEXTURE14 0x84CE
-#define GL_TEXTURE15 0x84CF
-#define GL_TEXTURE16 0x84D0
-#define GL_TEXTURE17 0x84D1
-#define GL_TEXTURE18 0x84D2
-#define GL_TEXTURE19 0x84D3
-#define GL_TEXTURE20 0x84D4
-#define GL_TEXTURE21 0x84D5
-#define GL_TEXTURE22 0x84D6
-#define GL_TEXTURE23 0x84D7
-#define GL_TEXTURE24 0x84D8
-#define GL_TEXTURE25 0x84D9
-#define GL_TEXTURE26 0x84DA
-#define GL_TEXTURE27 0x84DB
-#define GL_TEXTURE28 0x84DC
-#define GL_TEXTURE29 0x84DD
-#define GL_TEXTURE30 0x84DE
-#define GL_TEXTURE31 0x84DF
-#define GL_ACTIVE_TEXTURE 0x84E0
-#define GL_REPEAT 0x2901
-#define GL_CLAMP_TO_EDGE 0x812F
-#define GL_MIRRORED_REPEAT 0x8370
-#define GL_FLOAT_VEC2 0x8B50
-#define GL_FLOAT_VEC3 0x8B51
-#define GL_FLOAT_VEC4 0x8B52
-#define GL_INT_VEC2 0x8B53
-#define GL_INT_VEC3 0x8B54
-#define GL_INT_VEC4 0x8B55
-#define GL_BOOL 0x8B56
-#define GL_BOOL_VEC2 0x8B57
-#define GL_BOOL_VEC3 0x8B58
-#define GL_BOOL_VEC4 0x8B59
-#define GL_FLOAT_MAT2 0x8B5A
-#define GL_FLOAT_MAT3 0x8B5B
-#define GL_FLOAT_MAT4 0x8B5C
-#define GL_SAMPLER_2D 0x8B5E
-#define GL_SAMPLER_CUBE 0x8B60
-#define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622
-#define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623
-#define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624
-#define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625
-#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A
-#define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645
-#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F
-#define GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A
-#define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B
-#define GL_COMPILE_STATUS 0x8B81
-#define GL_INFO_LOG_LENGTH 0x8B84
-#define GL_SHADER_SOURCE_LENGTH 0x8B88
-#define GL_SHADER_COMPILER 0x8DFA
-#define GL_SHADER_BINARY_FORMATS 0x8DF8
-#define GL_NUM_SHADER_BINARY_FORMATS 0x8DF9
-#define GL_LOW_FLOAT 0x8DF0
-#define GL_MEDIUM_FLOAT 0x8DF1
-#define GL_HIGH_FLOAT 0x8DF2
-#define GL_LOW_INT 0x8DF3
-#define GL_MEDIUM_INT 0x8DF4
-#define GL_HIGH_INT 0x8DF5
-#define GL_FRAMEBUFFER 0x8D40
-#define GL_RENDERBUFFER 0x8D41
-#define GL_RGBA4 0x8056
-#define GL_RGB5_A1 0x8057
-#define GL_RGB565 0x8D62
-#define GL_DEPTH_COMPONENT16 0x81A5
-#define GL_STENCIL_INDEX8 0x8D48
-#define GL_RENDERBUFFER_WIDTH 0x8D42
-#define GL_RENDERBUFFER_HEIGHT 0x8D43
-#define GL_RENDERBUFFER_INTERNAL_FORMAT 0x8D44
-#define GL_RENDERBUFFER_RED_SIZE 0x8D50
-#define GL_RENDERBUFFER_GREEN_SIZE 0x8D51
-#define GL_RENDERBUFFER_BLUE_SIZE 0x8D52
-#define GL_RENDERBUFFER_ALPHA_SIZE 0x8D53
-#define GL_RENDERBUFFER_DEPTH_SIZE 0x8D54
-#define GL_RENDERBUFFER_STENCIL_SIZE 0x8D55
-#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0
-#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1
-#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2
-#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3
-#define GL_COLOR_ATTACHMENT0 0x8CE0
-#define GL_DEPTH_ATTACHMENT 0x8D00
-#define GL_STENCIL_ATTACHMENT 0x8D20
-#define GL_NONE 0
-#define GL_FRAMEBUFFER_COMPLETE 0x8CD5
-#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6
-#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7
-#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS 0x8CD9
-#define GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD
-#define GL_FRAMEBUFFER_BINDING 0x8CA6
-#define GL_RENDERBUFFER_BINDING 0x8CA7
-#define GL_MAX_RENDERBUFFER_SIZE 0x84E8
-#define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506
-GL_APICALL void GL_APIENTRY glActiveTexture (GLenum texture);
-GL_APICALL void GL_APIENTRY glAttachShader (GLuint program, GLuint shader);
-GL_APICALL void GL_APIENTRY glBindAttribLocation (GLuint program, GLuint index, const GLchar *name);
-GL_APICALL void GL_APIENTRY glBindBuffer (GLenum target, GLuint buffer);
-GL_APICALL void GL_APIENTRY glBindFramebuffer (GLenum target, GLuint framebuffer);
-GL_APICALL void GL_APIENTRY glBindRenderbuffer (GLenum target, GLuint renderbuffer);
-GL_APICALL void GL_APIENTRY glBindTexture (GLenum target, GLuint texture);
-GL_APICALL void GL_APIENTRY glBlendColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
-GL_APICALL void GL_APIENTRY glBlendEquation (GLenum mode);
-GL_APICALL void GL_APIENTRY glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha);
-GL_APICALL void GL_APIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor);
-GL_APICALL void GL_APIENTRY glBlendFuncSeparate (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
-GL_APICALL void GL_APIENTRY glBufferData (GLenum target, GLsizeiptr size, const void *data, GLenum usage);
-GL_APICALL void GL_APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const void *data);
-GL_APICALL GLenum GL_APIENTRY glCheckFramebufferStatus (GLenum target);
-GL_APICALL void GL_APIENTRY glClear (GLbitfield mask);
-GL_APICALL void GL_APIENTRY glClearColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
-GL_APICALL void GL_APIENTRY glClearDepthf (GLfloat d);
-GL_APICALL void GL_APIENTRY glClearStencil (GLint s);
-GL_APICALL void GL_APIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
-GL_APICALL void GL_APIENTRY glCompileShader (GLuint shader);
-GL_APICALL void GL_APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data);
-GL_APICALL void GL_APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data);
-GL_APICALL void GL_APIENTRY glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
-GL_APICALL void GL_APIENTRY glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
-GL_APICALL GLuint GL_APIENTRY glCreateProgram (void);
-GL_APICALL GLuint GL_APIENTRY glCreateShader (GLenum type);
-GL_APICALL void GL_APIENTRY glCullFace (GLenum mode);
-GL_APICALL void GL_APIENTRY glDeleteBuffers (GLsizei n, const GLuint *buffers);
-GL_APICALL void GL_APIENTRY glDeleteFramebuffers (GLsizei n, const GLuint *framebuffers);
-GL_APICALL void GL_APIENTRY glDeleteProgram (GLuint program);
-GL_APICALL void GL_APIENTRY glDeleteRenderbuffers (GLsizei n, const GLuint *renderbuffers);
-GL_APICALL void GL_APIENTRY glDeleteShader (GLuint shader);
-GL_APICALL void GL_APIENTRY glDeleteTextures (GLsizei n, const GLuint *textures);
-GL_APICALL void GL_APIENTRY glDepthFunc (GLenum func);
-GL_APICALL void GL_APIENTRY glDepthMask (GLboolean flag);
-GL_APICALL void GL_APIENTRY glDepthRangef (GLfloat n, GLfloat f);
-GL_APICALL void GL_APIENTRY glDetachShader (GLuint program, GLuint shader);
-GL_APICALL void GL_APIENTRY glDisable (GLenum cap);
-GL_APICALL void GL_APIENTRY glDisableVertexAttribArray (GLuint index);
-GL_APICALL void GL_APIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count);
-GL_APICALL void GL_APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const void *indices);
-GL_APICALL void GL_APIENTRY glEnable (GLenum cap);
-GL_APICALL void GL_APIENTRY glEnableVertexAttribArray (GLuint index);
-GL_APICALL void GL_APIENTRY glFinish (void);
-GL_APICALL void GL_APIENTRY glFlush (void);
-GL_APICALL void GL_APIENTRY glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
-GL_APICALL void GL_APIENTRY glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
-GL_APICALL void GL_APIENTRY glFrontFace (GLenum mode);
-GL_APICALL void GL_APIENTRY glGenBuffers (GLsizei n, GLuint *buffers);
-GL_APICALL void GL_APIENTRY glGenerateMipmap (GLenum target);
-GL_APICALL void GL_APIENTRY glGenFramebuffers (GLsizei n, GLuint *framebuffers);
-GL_APICALL void GL_APIENTRY glGenRenderbuffers (GLsizei n, GLuint *renderbuffers);
-GL_APICALL void GL_APIENTRY glGenTextures (GLsizei n, GLuint *textures);
-GL_APICALL void GL_APIENTRY glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
-GL_APICALL void GL_APIENTRY glGetActiveUniform (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
-GL_APICALL void GL_APIENTRY glGetAttachedShaders (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders);
-GL_APICALL GLint GL_APIENTRY glGetAttribLocation (GLuint program, const GLchar *name);
-GL_APICALL void GL_APIENTRY glGetBooleanv (GLenum pname, GLboolean *data);
-GL_APICALL void GL_APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint *params);
-GL_APICALL GLenum GL_APIENTRY glGetError (void);
-GL_APICALL void GL_APIENTRY glGetFloatv (GLenum pname, GLfloat *data);
-GL_APICALL void GL_APIENTRY glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint *params);
-GL_APICALL void GL_APIENTRY glGetIntegerv (GLenum pname, GLint *data);
-GL_APICALL void GL_APIENTRY glGetProgramiv (GLuint program, GLenum pname, GLint *params);
-GL_APICALL void GL_APIENTRY glGetProgramInfoLog (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
-GL_APICALL void GL_APIENTRY glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint *params);
-GL_APICALL void GL_APIENTRY glGetShaderiv (GLuint shader, GLenum pname, GLint *params);
-GL_APICALL void GL_APIENTRY glGetShaderInfoLog (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
-GL_APICALL void GL_APIENTRY glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision);
-GL_APICALL void GL_APIENTRY glGetShaderSource (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source);
-GL_APICALL const GLubyte *GL_APIENTRY glGetString (GLenum name);
-GL_APICALL void GL_APIENTRY glGetTexParameterfv (GLenum target, GLenum pname, GLfloat *params);
-GL_APICALL void GL_APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, GLint *params);
-GL_APICALL void GL_APIENTRY glGetUniformfv (GLuint program, GLint location, GLfloat *params);
-GL_APICALL void GL_APIENTRY glGetUniformiv (GLuint program, GLint location, GLint *params);
-GL_APICALL GLint GL_APIENTRY glGetUniformLocation (GLuint program, const GLchar *name);
-GL_APICALL void GL_APIENTRY glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat *params);
-GL_APICALL void GL_APIENTRY glGetVertexAttribiv (GLuint index, GLenum pname, GLint *params);
-GL_APICALL void GL_APIENTRY glGetVertexAttribPointerv (GLuint index, GLenum pname, void **pointer);
-GL_APICALL void GL_APIENTRY glHint (GLenum target, GLenum mode);
-GL_APICALL GLboolean GL_APIENTRY glIsBuffer (GLuint buffer);
-GL_APICALL GLboolean GL_APIENTRY glIsEnabled (GLenum cap);
-GL_APICALL GLboolean GL_APIENTRY glIsFramebuffer (GLuint framebuffer);
-GL_APICALL GLboolean GL_APIENTRY glIsProgram (GLuint program);
-GL_APICALL GLboolean GL_APIENTRY glIsRenderbuffer (GLuint renderbuffer);
-GL_APICALL GLboolean GL_APIENTRY glIsShader (GLuint shader);
-GL_APICALL GLboolean GL_APIENTRY glIsTexture (GLuint texture);
-GL_APICALL void GL_APIENTRY glLineWidth (GLfloat width);
-GL_APICALL void GL_APIENTRY glLinkProgram (GLuint program);
-GL_APICALL void GL_APIENTRY glPixelStorei (GLenum pname, GLint param);
-GL_APICALL void GL_APIENTRY glPolygonOffset (GLfloat factor, GLfloat units);
-GL_APICALL void GL_APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels);
-GL_APICALL void GL_APIENTRY glReleaseShaderCompiler (void);
-GL_APICALL void GL_APIENTRY glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
-GL_APICALL void GL_APIENTRY glSampleCoverage (GLfloat value, GLboolean invert);
-GL_APICALL void GL_APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height);
-GL_APICALL void GL_APIENTRY glShaderBinary (GLsizei count, const GLuint *shaders, GLenum binaryformat, const void *binary, GLsizei length);
-GL_APICALL void GL_APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length);
-GL_APICALL void GL_APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask);
-GL_APICALL void GL_APIENTRY glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask);
-GL_APICALL void GL_APIENTRY glStencilMask (GLuint mask);
-GL_APICALL void GL_APIENTRY glStencilMaskSeparate (GLenum face, GLuint mask);
-GL_APICALL void GL_APIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass);
-GL_APICALL void GL_APIENTRY glStencilOpSeparate (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
-GL_APICALL void GL_APIENTRY glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels);
-GL_APICALL void GL_APIENTRY glTexParameterf (GLenum target, GLenum pname, GLfloat param);
-GL_APICALL void GL_APIENTRY glTexParameterfv (GLenum target, GLenum pname, const GLfloat *params);
-GL_APICALL void GL_APIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param);
-GL_APICALL void GL_APIENTRY glTexParameteriv (GLenum target, GLenum pname, const GLint *params);
-GL_APICALL void GL_APIENTRY glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);
-GL_APICALL void GL_APIENTRY glUniform1f (GLint location, GLfloat v0);
-GL_APICALL void GL_APIENTRY glUniform1fv (GLint location, GLsizei count, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glUniform1i (GLint location, GLint v0);
-GL_APICALL void GL_APIENTRY glUniform1iv (GLint location, GLsizei count, const GLint *value);
-GL_APICALL void GL_APIENTRY glUniform2f (GLint location, GLfloat v0, GLfloat v1);
-GL_APICALL void GL_APIENTRY glUniform2fv (GLint location, GLsizei count, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glUniform2i (GLint location, GLint v0, GLint v1);
-GL_APICALL void GL_APIENTRY glUniform2iv (GLint location, GLsizei count, const GLint *value);
-GL_APICALL void GL_APIENTRY glUniform3f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
-GL_APICALL void GL_APIENTRY glUniform3fv (GLint location, GLsizei count, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glUniform3i (GLint location, GLint v0, GLint v1, GLint v2);
-GL_APICALL void GL_APIENTRY glUniform3iv (GLint location, GLsizei count, const GLint *value);
-GL_APICALL void GL_APIENTRY glUniform4f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
-GL_APICALL void GL_APIENTRY glUniform4fv (GLint location, GLsizei count, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glUniform4i (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
-GL_APICALL void GL_APIENTRY glUniform4iv (GLint location, GLsizei count, const GLint *value);
-GL_APICALL void GL_APIENTRY glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glUseProgram (GLuint program);
-GL_APICALL void GL_APIENTRY glValidateProgram (GLuint program);
-GL_APICALL void GL_APIENTRY glVertexAttrib1f (GLuint index, GLfloat x);
-GL_APICALL void GL_APIENTRY glVertexAttrib1fv (GLuint index, const GLfloat *v);
-GL_APICALL void GL_APIENTRY glVertexAttrib2f (GLuint index, GLfloat x, GLfloat y);
-GL_APICALL void GL_APIENTRY glVertexAttrib2fv (GLuint index, const GLfloat *v);
-GL_APICALL void GL_APIENTRY glVertexAttrib3f (GLuint index, GLfloat x, GLfloat y, GLfloat z);
-GL_APICALL void GL_APIENTRY glVertexAttrib3fv (GLuint index, const GLfloat *v);
-GL_APICALL void GL_APIENTRY glVertexAttrib4f (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-GL_APICALL void GL_APIENTRY glVertexAttrib4fv (GLuint index, const GLfloat *v);
-GL_APICALL void GL_APIENTRY glVertexAttribPointer (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer);
-GL_APICALL void GL_APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height);
-#endif /* GL_ES_VERSION_2_0 */
-
-#ifndef GL_ES_VERSION_3_0
-#define GL_ES_VERSION_3_0 1
-typedef unsigned short GLhalf;
-#define GL_READ_BUFFER 0x0C02
-#define GL_UNPACK_ROW_LENGTH 0x0CF2
-#define GL_UNPACK_SKIP_ROWS 0x0CF3
-#define GL_UNPACK_SKIP_PIXELS 0x0CF4
-#define GL_PACK_ROW_LENGTH 0x0D02
-#define GL_PACK_SKIP_ROWS 0x0D03
-#define GL_PACK_SKIP_PIXELS 0x0D04
-#define GL_COLOR 0x1800
-#define GL_DEPTH 0x1801
-#define GL_STENCIL 0x1802
-#define GL_RED 0x1903
-#define GL_RGB8 0x8051
-#define GL_RGBA8 0x8058
-#define GL_RGB10_A2 0x8059
-#define GL_TEXTURE_BINDING_3D 0x806A
-#define GL_UNPACK_SKIP_IMAGES 0x806D
-#define GL_UNPACK_IMAGE_HEIGHT 0x806E
-#define GL_TEXTURE_3D 0x806F
-#define GL_TEXTURE_WRAP_R 0x8072
-#define GL_MAX_3D_TEXTURE_SIZE 0x8073
-#define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368
-#define GL_MAX_ELEMENTS_VERTICES 0x80E8
-#define GL_MAX_ELEMENTS_INDICES 0x80E9
-#define GL_TEXTURE_MIN_LOD 0x813A
-#define GL_TEXTURE_MAX_LOD 0x813B
-#define GL_TEXTURE_BASE_LEVEL 0x813C
-#define GL_TEXTURE_MAX_LEVEL 0x813D
-#define GL_MIN 0x8007
-#define GL_MAX 0x8008
-#define GL_DEPTH_COMPONENT24 0x81A6
-#define GL_MAX_TEXTURE_LOD_BIAS 0x84FD
-#define GL_TEXTURE_COMPARE_MODE 0x884C
-#define GL_TEXTURE_COMPARE_FUNC 0x884D
-#define GL_CURRENT_QUERY 0x8865
-#define GL_QUERY_RESULT 0x8866
-#define GL_QUERY_RESULT_AVAILABLE 0x8867
-#define GL_BUFFER_MAPPED 0x88BC
-#define GL_BUFFER_MAP_POINTER 0x88BD
-#define GL_STREAM_READ 0x88E1
-#define GL_STREAM_COPY 0x88E2
-#define GL_STATIC_READ 0x88E5
-#define GL_STATIC_COPY 0x88E6
-#define GL_DYNAMIC_READ 0x88E9
-#define GL_DYNAMIC_COPY 0x88EA
-#define GL_MAX_DRAW_BUFFERS 0x8824
-#define GL_DRAW_BUFFER0 0x8825
-#define GL_DRAW_BUFFER1 0x8826
-#define GL_DRAW_BUFFER2 0x8827
-#define GL_DRAW_BUFFER3 0x8828
-#define GL_DRAW_BUFFER4 0x8829
-#define GL_DRAW_BUFFER5 0x882A
-#define GL_DRAW_BUFFER6 0x882B
-#define GL_DRAW_BUFFER7 0x882C
-#define GL_DRAW_BUFFER8 0x882D
-#define GL_DRAW_BUFFER9 0x882E
-#define GL_DRAW_BUFFER10 0x882F
-#define GL_DRAW_BUFFER11 0x8830
-#define GL_DRAW_BUFFER12 0x8831
-#define GL_DRAW_BUFFER13 0x8832
-#define GL_DRAW_BUFFER14 0x8833
-#define GL_DRAW_BUFFER15 0x8834
-#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS 0x8B49
-#define GL_MAX_VERTEX_UNIFORM_COMPONENTS 0x8B4A
-#define GL_SAMPLER_3D 0x8B5F
-#define GL_SAMPLER_2D_SHADOW 0x8B62
-#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT 0x8B8B
-#define GL_PIXEL_PACK_BUFFER 0x88EB
-#define GL_PIXEL_UNPACK_BUFFER 0x88EC
-#define GL_PIXEL_PACK_BUFFER_BINDING 0x88ED
-#define GL_PIXEL_UNPACK_BUFFER_BINDING 0x88EF
-#define GL_FLOAT_MAT2x3 0x8B65
-#define GL_FLOAT_MAT2x4 0x8B66
-#define GL_FLOAT_MAT3x2 0x8B67
-#define GL_FLOAT_MAT3x4 0x8B68
-#define GL_FLOAT_MAT4x2 0x8B69
-#define GL_FLOAT_MAT4x3 0x8B6A
-#define GL_SRGB 0x8C40
-#define GL_SRGB8 0x8C41
-#define GL_SRGB8_ALPHA8 0x8C43
-#define GL_COMPARE_REF_TO_TEXTURE 0x884E
-#define GL_MAJOR_VERSION 0x821B
-#define GL_MINOR_VERSION 0x821C
-#define GL_NUM_EXTENSIONS 0x821D
-#define GL_RGBA32F 0x8814
-#define GL_RGB32F 0x8815
-#define GL_RGBA16F 0x881A
-#define GL_RGB16F 0x881B
-#define GL_VERTEX_ATTRIB_ARRAY_INTEGER 0x88FD
-#define GL_MAX_ARRAY_TEXTURE_LAYERS 0x88FF
-#define GL_MIN_PROGRAM_TEXEL_OFFSET 0x8904
-#define GL_MAX_PROGRAM_TEXEL_OFFSET 0x8905
-#define GL_MAX_VARYING_COMPONENTS 0x8B4B
-#define GL_TEXTURE_2D_ARRAY 0x8C1A
-#define GL_TEXTURE_BINDING_2D_ARRAY 0x8C1D
-#define GL_R11F_G11F_B10F 0x8C3A
-#define GL_UNSIGNED_INT_10F_11F_11F_REV 0x8C3B
-#define GL_RGB9_E5 0x8C3D
-#define GL_UNSIGNED_INT_5_9_9_9_REV 0x8C3E
-#define GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH 0x8C76
-#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE 0x8C7F
-#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS 0x8C80
-#define GL_TRANSFORM_FEEDBACK_VARYINGS 0x8C83
-#define GL_TRANSFORM_FEEDBACK_BUFFER_START 0x8C84
-#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE 0x8C85
-#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN 0x8C88
-#define GL_RASTERIZER_DISCARD 0x8C89
-#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS 0x8C8A
-#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS 0x8C8B
-#define GL_INTERLEAVED_ATTRIBS 0x8C8C
-#define GL_SEPARATE_ATTRIBS 0x8C8D
-#define GL_TRANSFORM_FEEDBACK_BUFFER 0x8C8E
-#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING 0x8C8F
-#define GL_RGBA32UI 0x8D70
-#define GL_RGB32UI 0x8D71
-#define GL_RGBA16UI 0x8D76
-#define GL_RGB16UI 0x8D77
-#define GL_RGBA8UI 0x8D7C
-#define GL_RGB8UI 0x8D7D
-#define GL_RGBA32I 0x8D82
-#define GL_RGB32I 0x8D83
-#define GL_RGBA16I 0x8D88
-#define GL_RGB16I 0x8D89
-#define GL_RGBA8I 0x8D8E
-#define GL_RGB8I 0x8D8F
-#define GL_RED_INTEGER 0x8D94
-#define GL_RGB_INTEGER 0x8D98
-#define GL_RGBA_INTEGER 0x8D99
-#define GL_SAMPLER_2D_ARRAY 0x8DC1
-#define GL_SAMPLER_2D_ARRAY_SHADOW 0x8DC4
-#define GL_SAMPLER_CUBE_SHADOW 0x8DC5
-#define GL_UNSIGNED_INT_VEC2 0x8DC6
-#define GL_UNSIGNED_INT_VEC3 0x8DC7
-#define GL_UNSIGNED_INT_VEC4 0x8DC8
-#define GL_INT_SAMPLER_2D 0x8DCA
-#define GL_INT_SAMPLER_3D 0x8DCB
-#define GL_INT_SAMPLER_CUBE 0x8DCC
-#define GL_INT_SAMPLER_2D_ARRAY 0x8DCF
-#define GL_UNSIGNED_INT_SAMPLER_2D 0x8DD2
-#define GL_UNSIGNED_INT_SAMPLER_3D 0x8DD3
-#define GL_UNSIGNED_INT_SAMPLER_CUBE 0x8DD4
-#define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY 0x8DD7
-#define GL_BUFFER_ACCESS_FLAGS 0x911F
-#define GL_BUFFER_MAP_LENGTH 0x9120
-#define GL_BUFFER_MAP_OFFSET 0x9121
-#define GL_DEPTH_COMPONENT32F 0x8CAC
-#define GL_DEPTH32F_STENCIL8 0x8CAD
-#define GL_FLOAT_32_UNSIGNED_INT_24_8_REV 0x8DAD
-#define GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING 0x8210
-#define GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE 0x8211
-#define GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE 0x8212
-#define GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE 0x8213
-#define GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE 0x8214
-#define GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE 0x8215
-#define GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE 0x8216
-#define GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE 0x8217
-#define GL_FRAMEBUFFER_DEFAULT 0x8218
-#define GL_FRAMEBUFFER_UNDEFINED 0x8219
-#define GL_DEPTH_STENCIL_ATTACHMENT 0x821A
-#define GL_DEPTH_STENCIL 0x84F9
-#define GL_UNSIGNED_INT_24_8 0x84FA
-#define GL_DEPTH24_STENCIL8 0x88F0
-#define GL_UNSIGNED_NORMALIZED 0x8C17
-#define GL_DRAW_FRAMEBUFFER_BINDING 0x8CA6
-#define GL_READ_FRAMEBUFFER 0x8CA8
-#define GL_DRAW_FRAMEBUFFER 0x8CA9
-#define GL_READ_FRAMEBUFFER_BINDING 0x8CAA
-#define GL_RENDERBUFFER_SAMPLES 0x8CAB
-#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER 0x8CD4
-#define GL_MAX_COLOR_ATTACHMENTS 0x8CDF
-#define GL_COLOR_ATTACHMENT1 0x8CE1
-#define GL_COLOR_ATTACHMENT2 0x8CE2
-#define GL_COLOR_ATTACHMENT3 0x8CE3
-#define GL_COLOR_ATTACHMENT4 0x8CE4
-#define GL_COLOR_ATTACHMENT5 0x8CE5
-#define GL_COLOR_ATTACHMENT6 0x8CE6
-#define GL_COLOR_ATTACHMENT7 0x8CE7
-#define GL_COLOR_ATTACHMENT8 0x8CE8
-#define GL_COLOR_ATTACHMENT9 0x8CE9
-#define GL_COLOR_ATTACHMENT10 0x8CEA
-#define GL_COLOR_ATTACHMENT11 0x8CEB
-#define GL_COLOR_ATTACHMENT12 0x8CEC
-#define GL_COLOR_ATTACHMENT13 0x8CED
-#define GL_COLOR_ATTACHMENT14 0x8CEE
-#define GL_COLOR_ATTACHMENT15 0x8CEF
-#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE 0x8D56
-#define GL_MAX_SAMPLES 0x8D57
-#define GL_HALF_FLOAT 0x140B
-#define GL_MAP_READ_BIT 0x0001
-#define GL_MAP_WRITE_BIT 0x0002
-#define GL_MAP_INVALIDATE_RANGE_BIT 0x0004
-#define GL_MAP_INVALIDATE_BUFFER_BIT 0x0008
-#define GL_MAP_FLUSH_EXPLICIT_BIT 0x0010
-#define GL_MAP_UNSYNCHRONIZED_BIT 0x0020
-#define GL_RG 0x8227
-#define GL_RG_INTEGER 0x8228
-#define GL_R8 0x8229
-#define GL_RG8 0x822B
-#define GL_R16F 0x822D
-#define GL_R32F 0x822E
-#define GL_RG16F 0x822F
-#define GL_RG32F 0x8230
-#define GL_R8I 0x8231
-#define GL_R8UI 0x8232
-#define GL_R16I 0x8233
-#define GL_R16UI 0x8234
-#define GL_R32I 0x8235
-#define GL_R32UI 0x8236
-#define GL_RG8I 0x8237
-#define GL_RG8UI 0x8238
-#define GL_RG16I 0x8239
-#define GL_RG16UI 0x823A
-#define GL_RG32I 0x823B
-#define GL_RG32UI 0x823C
-#define GL_VERTEX_ARRAY_BINDING 0x85B5
-#define GL_R8_SNORM 0x8F94
-#define GL_RG8_SNORM 0x8F95
-#define GL_RGB8_SNORM 0x8F96
-#define GL_RGBA8_SNORM 0x8F97
-#define GL_SIGNED_NORMALIZED 0x8F9C
-#define GL_PRIMITIVE_RESTART_FIXED_INDEX 0x8D69
-#define GL_COPY_READ_BUFFER 0x8F36
-#define GL_COPY_WRITE_BUFFER 0x8F37
-#define GL_COPY_READ_BUFFER_BINDING 0x8F36
-#define GL_COPY_WRITE_BUFFER_BINDING 0x8F37
-#define GL_UNIFORM_BUFFER 0x8A11
-#define GL_UNIFORM_BUFFER_BINDING 0x8A28
-#define GL_UNIFORM_BUFFER_START 0x8A29
-#define GL_UNIFORM_BUFFER_SIZE 0x8A2A
-#define GL_MAX_VERTEX_UNIFORM_BLOCKS 0x8A2B
-#define GL_MAX_FRAGMENT_UNIFORM_BLOCKS 0x8A2D
-#define GL_MAX_COMBINED_UNIFORM_BLOCKS 0x8A2E
-#define GL_MAX_UNIFORM_BUFFER_BINDINGS 0x8A2F
-#define GL_MAX_UNIFORM_BLOCK_SIZE 0x8A30
-#define GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS 0x8A31
-#define GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS 0x8A33
-#define GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT 0x8A34
-#define GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH 0x8A35
-#define GL_ACTIVE_UNIFORM_BLOCKS 0x8A36
-#define GL_UNIFORM_TYPE 0x8A37
-#define GL_UNIFORM_SIZE 0x8A38
-#define GL_UNIFORM_NAME_LENGTH 0x8A39
-#define GL_UNIFORM_BLOCK_INDEX 0x8A3A
-#define GL_UNIFORM_OFFSET 0x8A3B
-#define GL_UNIFORM_ARRAY_STRIDE 0x8A3C
-#define GL_UNIFORM_MATRIX_STRIDE 0x8A3D
-#define GL_UNIFORM_IS_ROW_MAJOR 0x8A3E
-#define GL_UNIFORM_BLOCK_BINDING 0x8A3F
-#define GL_UNIFORM_BLOCK_DATA_SIZE 0x8A40
-#define GL_UNIFORM_BLOCK_NAME_LENGTH 0x8A41
-#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS 0x8A42
-#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES 0x8A43
-#define GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER 0x8A44
-#define GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER 0x8A46
-#define GL_INVALID_INDEX 0xFFFFFFFFu
-#define GL_MAX_VERTEX_OUTPUT_COMPONENTS 0x9122
-#define GL_MAX_FRAGMENT_INPUT_COMPONENTS 0x9125
-#define GL_MAX_SERVER_WAIT_TIMEOUT 0x9111
-#define GL_OBJECT_TYPE 0x9112
-#define GL_SYNC_CONDITION 0x9113
-#define GL_SYNC_STATUS 0x9114
-#define GL_SYNC_FLAGS 0x9115
-#define GL_SYNC_FENCE 0x9116
-#define GL_SYNC_GPU_COMMANDS_COMPLETE 0x9117
-#define GL_UNSIGNALED 0x9118
-#define GL_SIGNALED 0x9119
-#define GL_ALREADY_SIGNALED 0x911A
-#define GL_TIMEOUT_EXPIRED 0x911B
-#define GL_CONDITION_SATISFIED 0x911C
-#define GL_WAIT_FAILED 0x911D
-#define GL_SYNC_FLUSH_COMMANDS_BIT 0x00000001
-#define GL_TIMEOUT_IGNORED 0xFFFFFFFFFFFFFFFFull
-#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR 0x88FE
-#define GL_ANY_SAMPLES_PASSED 0x8C2F
-#define GL_ANY_SAMPLES_PASSED_CONSERVATIVE 0x8D6A
-#define GL_SAMPLER_BINDING 0x8919
-#define GL_RGB10_A2UI 0x906F
-#define GL_TEXTURE_SWIZZLE_R 0x8E42
-#define GL_TEXTURE_SWIZZLE_G 0x8E43
-#define GL_TEXTURE_SWIZZLE_B 0x8E44
-#define GL_TEXTURE_SWIZZLE_A 0x8E45
-#define GL_GREEN 0x1904
-#define GL_BLUE 0x1905
-#define GL_INT_2_10_10_10_REV 0x8D9F
-#define GL_TRANSFORM_FEEDBACK 0x8E22
-#define GL_TRANSFORM_FEEDBACK_PAUSED 0x8E23
-#define GL_TRANSFORM_FEEDBACK_ACTIVE 0x8E24
-#define GL_TRANSFORM_FEEDBACK_BINDING 0x8E25
-#define GL_PROGRAM_BINARY_RETRIEVABLE_HINT 0x8257
-#define GL_PROGRAM_BINARY_LENGTH 0x8741
-#define GL_NUM_PROGRAM_BINARY_FORMATS 0x87FE
-#define GL_PROGRAM_BINARY_FORMATS 0x87FF
-#define GL_COMPRESSED_R11_EAC 0x9270
-#define GL_COMPRESSED_SIGNED_R11_EAC 0x9271
-#define GL_COMPRESSED_RG11_EAC 0x9272
-#define GL_COMPRESSED_SIGNED_RG11_EAC 0x9273
-#define GL_COMPRESSED_RGB8_ETC2 0x9274
-#define GL_COMPRESSED_SRGB8_ETC2 0x9275
-#define GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9276
-#define GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9277
-#define GL_COMPRESSED_RGBA8_ETC2_EAC 0x9278
-#define GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC 0x9279
-#define GL_TEXTURE_IMMUTABLE_FORMAT 0x912F
-#define GL_MAX_ELEMENT_INDEX 0x8D6B
-#define GL_NUM_SAMPLE_COUNTS 0x9380
-#define GL_TEXTURE_IMMUTABLE_LEVELS 0x82DF
-GL_APICALL void GL_APIENTRY glReadBuffer (GLenum src);
-GL_APICALL void GL_APIENTRY glDrawRangeElements (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices);
-GL_APICALL void GL_APIENTRY glTexImage3D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);
-GL_APICALL void GL_APIENTRY glTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);
-GL_APICALL void GL_APIENTRY glCopyTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
-GL_APICALL void GL_APIENTRY glCompressedTexImage3D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data);
-GL_APICALL void GL_APIENTRY glCompressedTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data);
-GL_APICALL void GL_APIENTRY glGenQueries (GLsizei n, GLuint *ids);
-GL_APICALL void GL_APIENTRY glDeleteQueries (GLsizei n, const GLuint *ids);
-GL_APICALL GLboolean GL_APIENTRY glIsQuery (GLuint id);
-GL_APICALL void GL_APIENTRY glBeginQuery (GLenum target, GLuint id);
-GL_APICALL void GL_APIENTRY glEndQuery (GLenum target);
-GL_APICALL void GL_APIENTRY glGetQueryiv (GLenum target, GLenum pname, GLint *params);
-GL_APICALL void GL_APIENTRY glGetQueryObjectuiv (GLuint id, GLenum pname, GLuint *params);
-GL_APICALL GLboolean GL_APIENTRY glUnmapBuffer (GLenum target);
-GL_APICALL void GL_APIENTRY glGetBufferPointerv (GLenum target, GLenum pname, void **params);
-GL_APICALL void GL_APIENTRY glDrawBuffers (GLsizei n, const GLenum *bufs);
-GL_APICALL void GL_APIENTRY glUniformMatrix2x3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glUniformMatrix3x2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glUniformMatrix2x4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glUniformMatrix4x2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glUniformMatrix3x4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glUniformMatrix4x3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glBlitFramebuffer (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
-GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
-GL_APICALL void GL_APIENTRY glFramebufferTextureLayer (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
-GL_APICALL void *GL_APIENTRY glMapBufferRange (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
-GL_APICALL void GL_APIENTRY glFlushMappedBufferRange (GLenum target, GLintptr offset, GLsizeiptr length);
-GL_APICALL void GL_APIENTRY glBindVertexArray (GLuint array);
-GL_APICALL void GL_APIENTRY glDeleteVertexArrays (GLsizei n, const GLuint *arrays);
-GL_APICALL void GL_APIENTRY glGenVertexArrays (GLsizei n, GLuint *arrays);
-GL_APICALL GLboolean GL_APIENTRY glIsVertexArray (GLuint array);
-GL_APICALL void GL_APIENTRY glGetIntegeri_v (GLenum target, GLuint index, GLint *data);
-GL_APICALL void GL_APIENTRY glBeginTransformFeedback (GLenum primitiveMode);
-GL_APICALL void GL_APIENTRY glEndTransformFeedback (void);
-GL_APICALL void GL_APIENTRY glBindBufferRange (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
-GL_APICALL void GL_APIENTRY glBindBufferBase (GLenum target, GLuint index, GLuint buffer);
-GL_APICALL void GL_APIENTRY glTransformFeedbackVaryings (GLuint program, GLsizei count, const GLchar *const*varyings, GLenum bufferMode);
-GL_APICALL void GL_APIENTRY glGetTransformFeedbackVarying (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);
-GL_APICALL void GL_APIENTRY glVertexAttribIPointer (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer);
-GL_APICALL void GL_APIENTRY glGetVertexAttribIiv (GLuint index, GLenum pname, GLint *params);
-GL_APICALL void GL_APIENTRY glGetVertexAttribIuiv (GLuint index, GLenum pname, GLuint *params);
-GL_APICALL void GL_APIENTRY glVertexAttribI4i (GLuint index, GLint x, GLint y, GLint z, GLint w);
-GL_APICALL void GL_APIENTRY glVertexAttribI4ui (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
-GL_APICALL void GL_APIENTRY glVertexAttribI4iv (GLuint index, const GLint *v);
-GL_APICALL void GL_APIENTRY glVertexAttribI4uiv (GLuint index, const GLuint *v);
-GL_APICALL void GL_APIENTRY glGetUniformuiv (GLuint program, GLint location, GLuint *params);
-GL_APICALL GLint GL_APIENTRY glGetFragDataLocation (GLuint program, const GLchar *name);
-GL_APICALL void GL_APIENTRY glUniform1ui (GLint location, GLuint v0);
-GL_APICALL void GL_APIENTRY glUniform2ui (GLint location, GLuint v0, GLuint v1);
-GL_APICALL void GL_APIENTRY glUniform3ui (GLint location, GLuint v0, GLuint v1, GLuint v2);
-GL_APICALL void GL_APIENTRY glUniform4ui (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
-GL_APICALL void GL_APIENTRY glUniform1uiv (GLint location, GLsizei count, const GLuint *value);
-GL_APICALL void GL_APIENTRY glUniform2uiv (GLint location, GLsizei count, const GLuint *value);
-GL_APICALL void GL_APIENTRY glUniform3uiv (GLint location, GLsizei count, const GLuint *value);
-GL_APICALL void GL_APIENTRY glUniform4uiv (GLint location, GLsizei count, const GLuint *value);
-GL_APICALL void GL_APIENTRY glClearBufferiv (GLenum buffer, GLint drawbuffer, const GLint *value);
-GL_APICALL void GL_APIENTRY glClearBufferuiv (GLenum buffer, GLint drawbuffer, const GLuint *value);
-GL_APICALL void GL_APIENTRY glClearBufferfv (GLenum buffer, GLint drawbuffer, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glClearBufferfi (GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil);
-GL_APICALL const GLubyte *GL_APIENTRY glGetStringi (GLenum name, GLuint index);
-GL_APICALL void GL_APIENTRY glCopyBufferSubData (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
-GL_APICALL void GL_APIENTRY glGetUniformIndices (GLuint program, GLsizei uniformCount, const GLchar *const*uniformNames, GLuint *uniformIndices);
-GL_APICALL void GL_APIENTRY glGetActiveUniformsiv (GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params);
-GL_APICALL GLuint GL_APIENTRY glGetUniformBlockIndex (GLuint program, const GLchar *uniformBlockName);
-GL_APICALL void GL_APIENTRY glGetActiveUniformBlockiv (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params);
-GL_APICALL void GL_APIENTRY glGetActiveUniformBlockName (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName);
-GL_APICALL void GL_APIENTRY glUniformBlockBinding (GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding);
-GL_APICALL void GL_APIENTRY glDrawArraysInstanced (GLenum mode, GLint first, GLsizei count, GLsizei instancecount);
-GL_APICALL void GL_APIENTRY glDrawElementsInstanced (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount);
-GL_APICALL GLsync GL_APIENTRY glFenceSync (GLenum condition, GLbitfield flags);
-GL_APICALL GLboolean GL_APIENTRY glIsSync (GLsync sync);
-GL_APICALL void GL_APIENTRY glDeleteSync (GLsync sync);
-GL_APICALL GLenum GL_APIENTRY glClientWaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout);
-GL_APICALL void GL_APIENTRY glWaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout);
-GL_APICALL void GL_APIENTRY glGetInteger64v (GLenum pname, GLint64 *data);
-GL_APICALL void GL_APIENTRY glGetSynciv (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);
-GL_APICALL void GL_APIENTRY glGetInteger64i_v (GLenum target, GLuint index, GLint64 *data);
-GL_APICALL void GL_APIENTRY glGetBufferParameteri64v (GLenum target, GLenum pname, GLint64 *params);
-GL_APICALL void GL_APIENTRY glGenSamplers (GLsizei count, GLuint *samplers);
-GL_APICALL void GL_APIENTRY glDeleteSamplers (GLsizei count, const GLuint *samplers);
-GL_APICALL GLboolean GL_APIENTRY glIsSampler (GLuint sampler);
-GL_APICALL void GL_APIENTRY glBindSampler (GLuint unit, GLuint sampler);
-GL_APICALL void GL_APIENTRY glSamplerParameteri (GLuint sampler, GLenum pname, GLint param);
-GL_APICALL void GL_APIENTRY glSamplerParameteriv (GLuint sampler, GLenum pname, const GLint *param);
-GL_APICALL void GL_APIENTRY glSamplerParameterf (GLuint sampler, GLenum pname, GLfloat param);
-GL_APICALL void GL_APIENTRY glSamplerParameterfv (GLuint sampler, GLenum pname, const GLfloat *param);
-GL_APICALL void GL_APIENTRY glGetSamplerParameteriv (GLuint sampler, GLenum pname, GLint *params);
-GL_APICALL void GL_APIENTRY glGetSamplerParameterfv (GLuint sampler, GLenum pname, GLfloat *params);
-GL_APICALL void GL_APIENTRY glVertexAttribDivisor (GLuint index, GLuint divisor);
-GL_APICALL void GL_APIENTRY glBindTransformFeedback (GLenum target, GLuint id);
-GL_APICALL void GL_APIENTRY glDeleteTransformFeedbacks (GLsizei n, const GLuint *ids);
-GL_APICALL void GL_APIENTRY glGenTransformFeedbacks (GLsizei n, GLuint *ids);
-GL_APICALL GLboolean GL_APIENTRY glIsTransformFeedback (GLuint id);
-GL_APICALL void GL_APIENTRY glPauseTransformFeedback (void);
-GL_APICALL void GL_APIENTRY glResumeTransformFeedback (void);
-GL_APICALL void GL_APIENTRY glGetProgramBinary (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary);
-GL_APICALL void GL_APIENTRY glProgramBinary (GLuint program, GLenum binaryFormat, const void *binary, GLsizei length);
-GL_APICALL void GL_APIENTRY glProgramParameteri (GLuint program, GLenum pname, GLint value);
-GL_APICALL void GL_APIENTRY glInvalidateFramebuffer (GLenum target, GLsizei numAttachments, const GLenum *attachments);
-GL_APICALL void GL_APIENTRY glInvalidateSubFramebuffer (GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height);
-GL_APICALL void GL_APIENTRY glTexStorage2D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
-GL_APICALL void GL_APIENTRY glTexStorage3D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
-GL_APICALL void GL_APIENTRY glGetInternalformativ (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params);
-#endif /* GL_ES_VERSION_3_0 */
-
-#ifndef GL_ES_VERSION_3_1
-#define GL_ES_VERSION_3_1 1
-#define GL_COMPUTE_SHADER 0x91B9
-#define GL_MAX_COMPUTE_UNIFORM_BLOCKS 0x91BB
-#define GL_MAX_COMPUTE_TEXTURE_IMAGE_UNITS 0x91BC
-#define GL_MAX_COMPUTE_IMAGE_UNIFORMS 0x91BD
-#define GL_MAX_COMPUTE_SHARED_MEMORY_SIZE 0x8262
-#define GL_MAX_COMPUTE_UNIFORM_COMPONENTS 0x8263
-#define GL_MAX_COMPUTE_ATOMIC_COUNTER_BUFFERS 0x8264
-#define GL_MAX_COMPUTE_ATOMIC_COUNTERS 0x8265
-#define GL_MAX_COMBINED_COMPUTE_UNIFORM_COMPONENTS 0x8266
-#define GL_MAX_COMPUTE_WORK_GROUP_INVOCATIONS 0x90EB
-#define GL_MAX_COMPUTE_WORK_GROUP_COUNT 0x91BE
-#define GL_MAX_COMPUTE_WORK_GROUP_SIZE 0x91BF
-#define GL_COMPUTE_WORK_GROUP_SIZE 0x8267
-#define GL_DISPATCH_INDIRECT_BUFFER 0x90EE
-#define GL_DISPATCH_INDIRECT_BUFFER_BINDING 0x90EF
-#define GL_COMPUTE_SHADER_BIT 0x00000020
-#define GL_DRAW_INDIRECT_BUFFER 0x8F3F
-#define GL_DRAW_INDIRECT_BUFFER_BINDING 0x8F43
-#define GL_MAX_UNIFORM_LOCATIONS 0x826E
-#define GL_FRAMEBUFFER_DEFAULT_WIDTH 0x9310
-#define GL_FRAMEBUFFER_DEFAULT_HEIGHT 0x9311
-#define GL_FRAMEBUFFER_DEFAULT_SAMPLES 0x9313
-#define GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS 0x9314
-#define GL_MAX_FRAMEBUFFER_WIDTH 0x9315
-#define GL_MAX_FRAMEBUFFER_HEIGHT 0x9316
-#define GL_MAX_FRAMEBUFFER_SAMPLES 0x9318
-#define GL_UNIFORM 0x92E1
-#define GL_UNIFORM_BLOCK 0x92E2
-#define GL_PROGRAM_INPUT 0x92E3
-#define GL_PROGRAM_OUTPUT 0x92E4
-#define GL_BUFFER_VARIABLE 0x92E5
-#define GL_SHADER_STORAGE_BLOCK 0x92E6
-#define GL_ATOMIC_COUNTER_BUFFER 0x92C0
-#define GL_TRANSFORM_FEEDBACK_VARYING 0x92F4
-#define GL_ACTIVE_RESOURCES 0x92F5
-#define GL_MAX_NAME_LENGTH 0x92F6
-#define GL_MAX_NUM_ACTIVE_VARIABLES 0x92F7
-#define GL_NAME_LENGTH 0x92F9
-#define GL_TYPE 0x92FA
-#define GL_ARRAY_SIZE 0x92FB
-#define GL_OFFSET 0x92FC
-#define GL_BLOCK_INDEX 0x92FD
-#define GL_ARRAY_STRIDE 0x92FE
-#define GL_MATRIX_STRIDE 0x92FF
-#define GL_IS_ROW_MAJOR 0x9300
-#define GL_ATOMIC_COUNTER_BUFFER_INDEX 0x9301
-#define GL_BUFFER_BINDING 0x9302
-#define GL_BUFFER_DATA_SIZE 0x9303
-#define GL_NUM_ACTIVE_VARIABLES 0x9304
-#define GL_ACTIVE_VARIABLES 0x9305
-#define GL_REFERENCED_BY_VERTEX_SHADER 0x9306
-#define GL_REFERENCED_BY_FRAGMENT_SHADER 0x930A
-#define GL_REFERENCED_BY_COMPUTE_SHADER 0x930B
-#define GL_TOP_LEVEL_ARRAY_SIZE 0x930C
-#define GL_TOP_LEVEL_ARRAY_STRIDE 0x930D
-#define GL_LOCATION 0x930E
-#define GL_VERTEX_SHADER_BIT 0x00000001
-#define GL_FRAGMENT_SHADER_BIT 0x00000002
-#define GL_ALL_SHADER_BITS 0xFFFFFFFF
-#define GL_PROGRAM_SEPARABLE 0x8258
-#define GL_ACTIVE_PROGRAM 0x8259
-#define GL_PROGRAM_PIPELINE_BINDING 0x825A
-#define GL_ATOMIC_COUNTER_BUFFER_BINDING 0x92C1
-#define GL_ATOMIC_COUNTER_BUFFER_START 0x92C2
-#define GL_ATOMIC_COUNTER_BUFFER_SIZE 0x92C3
-#define GL_MAX_VERTEX_ATOMIC_COUNTER_BUFFERS 0x92CC
-#define GL_MAX_FRAGMENT_ATOMIC_COUNTER_BUFFERS 0x92D0
-#define GL_MAX_COMBINED_ATOMIC_COUNTER_BUFFERS 0x92D1
-#define GL_MAX_VERTEX_ATOMIC_COUNTERS 0x92D2
-#define GL_MAX_FRAGMENT_ATOMIC_COUNTERS 0x92D6
-#define GL_MAX_COMBINED_ATOMIC_COUNTERS 0x92D7
-#define GL_MAX_ATOMIC_COUNTER_BUFFER_SIZE 0x92D8
-#define GL_MAX_ATOMIC_COUNTER_BUFFER_BINDINGS 0x92DC
-#define GL_ACTIVE_ATOMIC_COUNTER_BUFFERS 0x92D9
-#define GL_UNSIGNED_INT_ATOMIC_COUNTER 0x92DB
-#define GL_MAX_IMAGE_UNITS 0x8F38
-#define GL_MAX_VERTEX_IMAGE_UNIFORMS 0x90CA
-#define GL_MAX_FRAGMENT_IMAGE_UNIFORMS 0x90CE
-#define GL_MAX_COMBINED_IMAGE_UNIFORMS 0x90CF
-#define GL_IMAGE_BINDING_NAME 0x8F3A
-#define GL_IMAGE_BINDING_LEVEL 0x8F3B
-#define GL_IMAGE_BINDING_LAYERED 0x8F3C
-#define GL_IMAGE_BINDING_LAYER 0x8F3D
-#define GL_IMAGE_BINDING_ACCESS 0x8F3E
-#define GL_IMAGE_BINDING_FORMAT 0x906E
-#define GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT 0x00000001
-#define GL_ELEMENT_ARRAY_BARRIER_BIT 0x00000002
-#define GL_UNIFORM_BARRIER_BIT 0x00000004
-#define GL_TEXTURE_FETCH_BARRIER_BIT 0x00000008
-#define GL_SHADER_IMAGE_ACCESS_BARRIER_BIT 0x00000020
-#define GL_COMMAND_BARRIER_BIT 0x00000040
-#define GL_PIXEL_BUFFER_BARRIER_BIT 0x00000080
-#define GL_TEXTURE_UPDATE_BARRIER_BIT 0x00000100
-#define GL_BUFFER_UPDATE_BARRIER_BIT 0x00000200
-#define GL_FRAMEBUFFER_BARRIER_BIT 0x00000400
-#define GL_TRANSFORM_FEEDBACK_BARRIER_BIT 0x00000800
-#define GL_ATOMIC_COUNTER_BARRIER_BIT 0x00001000
-#define GL_ALL_BARRIER_BITS 0xFFFFFFFF
-#define GL_IMAGE_2D 0x904D
-#define GL_IMAGE_3D 0x904E
-#define GL_IMAGE_CUBE 0x9050
-#define GL_IMAGE_2D_ARRAY 0x9053
-#define GL_INT_IMAGE_2D 0x9058
-#define GL_INT_IMAGE_3D 0x9059
-#define GL_INT_IMAGE_CUBE 0x905B
-#define GL_INT_IMAGE_2D_ARRAY 0x905E
-#define GL_UNSIGNED_INT_IMAGE_2D 0x9063
-#define GL_UNSIGNED_INT_IMAGE_3D 0x9064
-#define GL_UNSIGNED_INT_IMAGE_CUBE 0x9066
-#define GL_UNSIGNED_INT_IMAGE_2D_ARRAY 0x9069
-#define GL_IMAGE_FORMAT_COMPATIBILITY_TYPE 0x90C7
-#define GL_IMAGE_FORMAT_COMPATIBILITY_BY_SIZE 0x90C8
-#define GL_IMAGE_FORMAT_COMPATIBILITY_BY_CLASS 0x90C9
-#define GL_READ_ONLY 0x88B8
-#define GL_WRITE_ONLY 0x88B9
-#define GL_READ_WRITE 0x88BA
-#define GL_SHADER_STORAGE_BUFFER 0x90D2
-#define GL_SHADER_STORAGE_BUFFER_BINDING 0x90D3
-#define GL_SHADER_STORAGE_BUFFER_START 0x90D4
-#define GL_SHADER_STORAGE_BUFFER_SIZE 0x90D5
-#define GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS 0x90D6
-#define GL_MAX_FRAGMENT_SHADER_STORAGE_BLOCKS 0x90DA
-#define GL_MAX_COMPUTE_SHADER_STORAGE_BLOCKS 0x90DB
-#define GL_MAX_COMBINED_SHADER_STORAGE_BLOCKS 0x90DC
-#define GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS 0x90DD
-#define GL_MAX_SHADER_STORAGE_BLOCK_SIZE 0x90DE
-#define GL_SHADER_STORAGE_BUFFER_OFFSET_ALIGNMENT 0x90DF
-#define GL_SHADER_STORAGE_BARRIER_BIT 0x00002000
-#define GL_MAX_COMBINED_SHADER_OUTPUT_RESOURCES 0x8F39
-#define GL_DEPTH_STENCIL_TEXTURE_MODE 0x90EA
-#define GL_STENCIL_INDEX 0x1901
-#define GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET 0x8E5E
-#define GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET 0x8E5F
-#define GL_SAMPLE_POSITION 0x8E50
-#define GL_SAMPLE_MASK 0x8E51
-#define GL_SAMPLE_MASK_VALUE 0x8E52
-#define GL_TEXTURE_2D_MULTISAMPLE 0x9100
-#define GL_MAX_SAMPLE_MASK_WORDS 0x8E59
-#define GL_MAX_COLOR_TEXTURE_SAMPLES 0x910E
-#define GL_MAX_DEPTH_TEXTURE_SAMPLES 0x910F
-#define GL_MAX_INTEGER_SAMPLES 0x9110
-#define GL_TEXTURE_BINDING_2D_MULTISAMPLE 0x9104
-#define GL_TEXTURE_SAMPLES 0x9106
-#define GL_TEXTURE_FIXED_SAMPLE_LOCATIONS 0x9107
-#define GL_TEXTURE_WIDTH 0x1000
-#define GL_TEXTURE_HEIGHT 0x1001
-#define GL_TEXTURE_DEPTH 0x8071
-#define GL_TEXTURE_INTERNAL_FORMAT 0x1003
-#define GL_TEXTURE_RED_SIZE 0x805C
-#define GL_TEXTURE_GREEN_SIZE 0x805D
-#define GL_TEXTURE_BLUE_SIZE 0x805E
-#define GL_TEXTURE_ALPHA_SIZE 0x805F
-#define GL_TEXTURE_DEPTH_SIZE 0x884A
-#define GL_TEXTURE_STENCIL_SIZE 0x88F1
-#define GL_TEXTURE_SHARED_SIZE 0x8C3F
-#define GL_TEXTURE_RED_TYPE 0x8C10
-#define GL_TEXTURE_GREEN_TYPE 0x8C11
-#define GL_TEXTURE_BLUE_TYPE 0x8C12
-#define GL_TEXTURE_ALPHA_TYPE 0x8C13
-#define GL_TEXTURE_DEPTH_TYPE 0x8C16
-#define GL_TEXTURE_COMPRESSED 0x86A1
-#define GL_SAMPLER_2D_MULTISAMPLE 0x9108
-#define GL_INT_SAMPLER_2D_MULTISAMPLE 0x9109
-#define GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE 0x910A
-#define GL_VERTEX_ATTRIB_BINDING 0x82D4
-#define GL_VERTEX_ATTRIB_RELATIVE_OFFSET 0x82D5
-#define GL_VERTEX_BINDING_DIVISOR 0x82D6
-#define GL_VERTEX_BINDING_OFFSET 0x82D7
-#define GL_VERTEX_BINDING_STRIDE 0x82D8
-#define GL_VERTEX_BINDING_BUFFER 0x8F4F
-#define GL_MAX_VERTEX_ATTRIB_RELATIVE_OFFSET 0x82D9
-#define GL_MAX_VERTEX_ATTRIB_BINDINGS 0x82DA
-#define GL_MAX_VERTEX_ATTRIB_STRIDE 0x82E5
-GL_APICALL void GL_APIENTRY glDispatchCompute (GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z);
-GL_APICALL void GL_APIENTRY glDispatchComputeIndirect (GLintptr indirect);
-GL_APICALL void GL_APIENTRY glDrawArraysIndirect (GLenum mode, const void *indirect);
-GL_APICALL void GL_APIENTRY glDrawElementsIndirect (GLenum mode, GLenum type, const void *indirect);
-GL_APICALL void GL_APIENTRY glFramebufferParameteri (GLenum target, GLenum pname, GLint param);
-GL_APICALL void GL_APIENTRY glGetFramebufferParameteriv (GLenum target, GLenum pname, GLint *params);
-GL_APICALL void GL_APIENTRY glGetProgramInterfaceiv (GLuint program, GLenum programInterface, GLenum pname, GLint *params);
-GL_APICALL GLuint GL_APIENTRY glGetProgramResourceIndex (GLuint program, GLenum programInterface, const GLchar *name);
-GL_APICALL void GL_APIENTRY glGetProgramResourceName (GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name);
-GL_APICALL void GL_APIENTRY glGetProgramResourceiv (GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLint *params);
-GL_APICALL GLint GL_APIENTRY glGetProgramResourceLocation (GLuint program, GLenum programInterface, const GLchar *name);
-GL_APICALL void GL_APIENTRY glUseProgramStages (GLuint pipeline, GLbitfield stages, GLuint program);
-GL_APICALL void GL_APIENTRY glActiveShaderProgram (GLuint pipeline, GLuint program);
-GL_APICALL GLuint GL_APIENTRY glCreateShaderProgramv (GLenum type, GLsizei count, const GLchar *const*strings);
-GL_APICALL void GL_APIENTRY glBindProgramPipeline (GLuint pipeline);
-GL_APICALL void GL_APIENTRY glDeleteProgramPipelines (GLsizei n, const GLuint *pipelines);
-GL_APICALL void GL_APIENTRY glGenProgramPipelines (GLsizei n, GLuint *pipelines);
-GL_APICALL GLboolean GL_APIENTRY glIsProgramPipeline (GLuint pipeline);
-GL_APICALL void GL_APIENTRY glGetProgramPipelineiv (GLuint pipeline, GLenum pname, GLint *params);
-GL_APICALL void GL_APIENTRY glProgramUniform1i (GLuint program, GLint location, GLint v0);
-GL_APICALL void GL_APIENTRY glProgramUniform2i (GLuint program, GLint location, GLint v0, GLint v1);
-GL_APICALL void GL_APIENTRY glProgramUniform3i (GLuint program, GLint location, GLint v0, GLint v1, GLint v2);
-GL_APICALL void GL_APIENTRY glProgramUniform4i (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
-GL_APICALL void GL_APIENTRY glProgramUniform1ui (GLuint program, GLint location, GLuint v0);
-GL_APICALL void GL_APIENTRY glProgramUniform2ui (GLuint program, GLint location, GLuint v0, GLuint v1);
-GL_APICALL void GL_APIENTRY glProgramUniform3ui (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2);
-GL_APICALL void GL_APIENTRY glProgramUniform4ui (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
-GL_APICALL void GL_APIENTRY glProgramUniform1f (GLuint program, GLint location, GLfloat v0);
-GL_APICALL void GL_APIENTRY glProgramUniform2f (GLuint program, GLint location, GLfloat v0, GLfloat v1);
-GL_APICALL void GL_APIENTRY glProgramUniform3f (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
-GL_APICALL void GL_APIENTRY glProgramUniform4f (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
-GL_APICALL void GL_APIENTRY glProgramUniform1iv (GLuint program, GLint location, GLsizei count, const GLint *value);
-GL_APICALL void GL_APIENTRY glProgramUniform2iv (GLuint program, GLint location, GLsizei count, const GLint *value);
-GL_APICALL void GL_APIENTRY glProgramUniform3iv (GLuint program, GLint location, GLsizei count, const GLint *value);
-GL_APICALL void GL_APIENTRY glProgramUniform4iv (GLuint program, GLint location, GLsizei count, const GLint *value);
-GL_APICALL void GL_APIENTRY glProgramUniform1uiv (GLuint program, GLint location, GLsizei count, const GLuint *value);
-GL_APICALL void GL_APIENTRY glProgramUniform2uiv (GLuint program, GLint location, GLsizei count, const GLuint *value);
-GL_APICALL void GL_APIENTRY glProgramUniform3uiv (GLuint program, GLint location, GLsizei count, const GLuint *value);
-GL_APICALL void GL_APIENTRY glProgramUniform4uiv (GLuint program, GLint location, GLsizei count, const GLuint *value);
-GL_APICALL void GL_APIENTRY glProgramUniform1fv (GLuint program, GLint location, GLsizei count, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glProgramUniform2fv (GLuint program, GLint location, GLsizei count, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glProgramUniform3fv (GLuint program, GLint location, GLsizei count, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glProgramUniform4fv (GLuint program, GLint location, GLsizei count, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glProgramUniformMatrix2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glProgramUniformMatrix3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glProgramUniformMatrix4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glProgramUniformMatrix2x3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glProgramUniformMatrix3x2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glProgramUniformMatrix2x4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glProgramUniformMatrix4x2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glProgramUniformMatrix3x4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glProgramUniformMatrix4x3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glValidateProgramPipeline (GLuint pipeline);
-GL_APICALL void GL_APIENTRY glGetProgramPipelineInfoLog (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
-GL_APICALL void GL_APIENTRY glBindImageTexture (GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format);
-GL_APICALL void GL_APIENTRY glGetBooleani_v (GLenum target, GLuint index, GLboolean *data);
-GL_APICALL void GL_APIENTRY glMemoryBarrier (GLbitfield barriers);
-GL_APICALL void GL_APIENTRY glMemoryBarrierByRegion (GLbitfield barriers);
-GL_APICALL void GL_APIENTRY glTexStorage2DMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
-GL_APICALL void GL_APIENTRY glGetMultisamplefv (GLenum pname, GLuint index, GLfloat *val);
-GL_APICALL void GL_APIENTRY glSampleMaski (GLuint maskNumber, GLbitfield mask);
-GL_APICALL void GL_APIENTRY glGetTexLevelParameteriv (GLenum target, GLint level, GLenum pname, GLint *params);
-GL_APICALL void GL_APIENTRY glGetTexLevelParameterfv (GLenum target, GLint level, GLenum pname, GLfloat *params);
-GL_APICALL void GL_APIENTRY glBindVertexBuffer (GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride);
-GL_APICALL void GL_APIENTRY glVertexAttribFormat (GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset);
-GL_APICALL void GL_APIENTRY glVertexAttribIFormat (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
-GL_APICALL void GL_APIENTRY glVertexAttribBinding (GLuint attribindex, GLuint bindingindex);
-GL_APICALL void GL_APIENTRY glVertexBindingDivisor (GLuint bindingindex, GLuint divisor);
-#endif /* GL_ES_VERSION_3_1 */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/external/khronos/GLES3/gl3ext.h b/external/khronos/GLES3/gl3ext.h
deleted file mode 100644
index 8fb0924db..000000000
--- a/external/khronos/GLES3/gl3ext.h
+++ /dev/null
@@ -1 +0,0 @@
-// this file is intentionally left blank
\ No newline at end of file
diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt
index 88f85e506..bf07ca7a8 100644
--- a/include/CMakeLists.txt
+++ b/include/CMakeLists.txt
@@ -32,11 +32,9 @@ if(ramses-sdk_TEXT_SUPPORT)
target_compile_definitions(ramses-api INTERFACE RAMSES_TEXT_ENABLED)
endif()
-if(ramses-sdk_ENABLE_LOGIC)
- file(GLOB
- RAMSES_CLIENT_LOGIC_API_FILES_HEADER
- ramses/client/logic/*.h)
-endif()
+file(GLOB
+ RAMSES_CLIENT_LOGIC_API_FILES_HEADER
+ ramses/client/logic/*.h)
# renderer
if(ANY_WINDOW_TYPE_ENABLED)
@@ -66,9 +64,7 @@ if(ramses-sdk_ENABLE_INSTALL)
if(ramses-sdk_TEXT_SUPPORT)
install(FILES ${RAMSES_CLIENT_TEXT_API_FILES_HEADER} DESTINATION "${RAMSES_INSTALL_HEADERS_PATH}/ramses/client/text" COMPONENT ramses-sdk-devel)
endif()
- if(ramses-sdk_ENABLE_LOGIC)
- install(FILES ${RAMSES_CLIENT_LOGIC_API_FILES_HEADER} DESTINATION "${RAMSES_INSTALL_HEADERS_PATH}/ramses/client/logic" COMPONENT ramses-sdk-devel)
- endif()
+ install(FILES ${RAMSES_CLIENT_LOGIC_API_FILES_HEADER} DESTINATION "${RAMSES_INSTALL_HEADERS_PATH}/ramses/client/logic" COMPONENT ramses-sdk-devel)
if(ANY_WINDOW_TYPE_ENABLED)
install(FILES ${RAMSES_RENDERER_API_FILES_HEADER} DESTINATION "${RAMSES_INSTALL_HEADERS_PATH}/ramses/renderer" COMPONENT ramses-sdk-devel)
diff --git a/include/ramses/client/Effect.h b/include/ramses/client/Effect.h
index 357e164e8..888aadfd6 100644
--- a/include/ramses/client/Effect.h
+++ b/include/ramses/client/Effect.h
@@ -95,6 +95,14 @@ namespace ramses
*/
[[nodiscard]] std::optional findAttributeInput(EEffectAttributeSemantic attributeSemantic) const;
+ /**
+ * @brief Finds uniform input for a uniform buffer using binding.
+ *
+ * @param[in] uniformBufferBinding Binding specified in the layout of the uniform buffer in the shader
+ * @return #ramses::UniformInput if successful, otherwise, std::nullopt
+ */
+ [[nodiscard]] std::optional findUniformInputAtBinding(uint32_t uniformBufferBinding) const;
+
/**
* @brief Checks if the \p effect has a geometry shader attached to it.
*
diff --git a/include/ramses/client/EffectDescription.h b/include/ramses/client/EffectDescription.h
index 7b94b31d1..42b3d39b1 100644
--- a/include/ramses/client/EffectDescription.h
+++ b/include/ramses/client/EffectDescription.h
@@ -82,7 +82,7 @@ namespace ramses
bool addCompilerDefine(std::string_view define);
/**
- * @brief Sets an uniform semantic.
+ * @brief Sets a uniform semantic.
* Used for uniforms which are not locally available
* on the client, such as projection matrix, framebuffer resolution etc.
* Value of an uniform corresponding to the given semantic name
@@ -93,6 +93,18 @@ namespace ramses
*/
bool setUniformSemantic(std::string_view inputName, EEffectUniformSemantic semanticType);
+ /**
+ * @brief Sets a uniform semantic on a uniform buffer using layout binding.
+ * Used for uniform buffers that represent values that are not locally available
+ * on the client, such as model block, camera block...etc.
+ * Values of a uniform buffer corresponding to the given semantic
+ * will be automatically set based on its semantic type.
+ * @param[in] uniformBufferBinding Binding specified in the shader source code in the definition of a uniform buffer's layout.
+ * @param[in] semanticType Semantic type to be used for given input.
+ * @return true on success, false if an error occurred (error is logged)
+ */
+ bool setUniformSemantic(uint32_t uniformBufferBinding, EEffectUniformSemantic semanticType);
+
/**
* @brief Sets an attribute semantic.
* Used to mark attributes as special inputs (eg. text specific inputs).
diff --git a/include/ramses/client/EffectInputSemantic.h b/include/ramses/client/EffectInputSemantic.h
index 4b1c54e3d..f38d87291 100644
--- a/include/ramses/client/EffectInputSemantic.h
+++ b/include/ramses/client/EffectInputSemantic.h
@@ -16,23 +16,65 @@ namespace ramses
*/
enum class EEffectUniformSemantic
{
- Invalid = 0, ///< Invalid semantic
- ProjectionMatrix, ///< Projection matrix 4x4
- ModelMatrix, ///< Mesh model matrix 4x4
- CameraWorldPosition, ///< Camera position vector 3
- ///< ^ Position, from where the renderer eye looks at the scene in world coordinates
- ViewMatrix, ///< View matrix 4x4
- ModelViewMatrix, ///< Model-view matrix 4x4
- ModelViewMatrix33, ///< Model-view matrix 3x3
- ModelViewProjectionMatrix, ///< Model-view-projection matrix 4x4
- NormalMatrix, ///< Transposed and inversed MVP matrix for vertex normals
- DisplayBufferResolution, ///< Resolution of currently set destination display buffer (either display framebuffer or offscreen buffer, does not give RenderTarget resolution)
-
- TextTexture, ///< Text specific
+ Invalid = 0, ///< Invalid semantic
+ ProjectionMatrix, ///< Projection matrix 4x4
+ ModelMatrix, ///< Mesh model matrix 4x4
+ CameraWorldPosition, ///< Camera position vector 3 (camera world position of the camera used in current render pass)
+ ViewMatrix, ///< View matrix 4x4
+ ModelViewMatrix, ///< Model-view matrix 4x4
+ ModelViewMatrix33, ///< Model-view matrix 3x3
+ ModelViewProjectionMatrix, ///< Model-view-projection matrix 4x4
+ NormalMatrix, ///< Transposed and inversed MVP matrix for vertex normals
+ DisplayBufferResolution, ///< Resolution of currently set destination display buffer (either display framebuffer or offscreen buffer, does not give RenderTarget resolution)
+ TextTexture, ///< Text specific
TimeMs, ///< synchronized clock in milliseconds, resets to 0 every ~24 days, i.e. value range is: 0 .. std::numeric_limits::max().
///< In order to avoid handling the wrap in the shader code or potential overflow issues the value should be reset using #ramses::Scene::resetUniformTimeMs().
///< The value is not reset automatically at startup, but contains the time elapsed since clock epoch.
+
+ ModelBlock, ///< Uniform buffer containing: ModelMatrix (mat44)
+ ///< - exists per MeshNode and is updated whenever MeshNode transformation changes
+ ///< Declaration example in shader:
+ ///< layout(std140, binding = 1) uniform uniformBlock_t
+ ///< {
+ ///< mat4 modelMat;
+ ///< } myModelUBO;
+
+ CameraBlock, ///< Uniform buffer containing (in this order): ProjectionMatrix(mat44), ViewMatrix(mat44), CameraWorldPosition(vec3)
+ ///< - exists per Camera and is updated whenever Camera transformation or view/projection parameters change
+ ///< Declaration example in shader:
+ ///< layout(std140, binding = 1) uniform uniformBlock_t
+ ///< {
+ ///< mat4 projMat;
+ ///< mat4 viewMat;
+ ///< vec3 camPos;
+ ///< } myCameraUBO;
+
+ ModelCameraBlock, ///< Uniform buffer containing (in this order): ModelViewProjectionMatrix(mat44), ModelViewMatrix(mat44), NormalMatrix(mat44)
+ ///< - exists per every Camera/MeshNode combination in render passes and is updated whenever Camera or MeshNode transformation changes or Camera view/projection parameters change
+ ///< Declaration example in shader:
+ ///< layout(std140, binding = 1) uniform uniformBlock_t
+ ///< {
+ ///< mat4 mvpMat;
+ ///< mat4 mvMat;
+ ///< mat4 normalMat;
+ ///< } myModelCameraUBO;
+
+ FramebufferBlock, ///< Uniform buffer containing: FramebufferResolution(vec2)
+ ///< - exists per RenderTarget and is never updated
+ ///< Declaration example in shader:
+ ///< layout(std140, binding = 1) uniform uniformBlock_t
+ ///< {
+ ///< vec2 resolution;
+ ///< } myFramebufferInfoUBO;
+
+ SceneBlock, ///< Uniform buffer containing: TimeMs(int)
+ ///< - exists per Scene and is updated once per frame
+ ///< Declaration example in shader:
+ ///< layout(std140, binding = 1) uniform uniformBlock_t
+ ///< {
+ ///< int time;
+ ///< } mySceneInfoUBO;
};
/**
diff --git a/include/ramses/client/RamsesClient.h b/include/ramses/client/RamsesClient.h
index a6ebe7f7c..8c156007b 100644
--- a/include/ramses/client/RamsesClient.h
+++ b/include/ramses/client/RamsesClient.h
@@ -134,6 +134,59 @@ namespace ramses
*/
bool loadSceneFromFileAsync(std::string_view fileName, const SceneConfig& config = {});
+ /**
+ * @brief Loads scene contents and resources from a file and merges them into an existing scene.
+ *
+ * Same rules apply as for loading a scene from file - Ramses SDK major version and #ramses::EFeatureLevel must match.
+ *
+ * @param[in] scene Scene that all new content from file is going to be merged into.
+ * @param[in] fileName File name to load the scene from.
+ * @return True if loading and merging was successful.
+ */
+ bool mergeSceneFromFile(Scene& scene, std::string_view fileName);
+
+ /**
+ * @brief Loads scene contents and resources from a memory buffer and merges them into an existing scene.
+ *
+ * Same rules apply as for loading a scene from file - Ramses SDK major version and #ramses::EFeatureLevel must match.
+ *
+ * Ramses takes ownership of the memory buffer passed in via data and will delete it via the provided deleter from
+ * unique_ptr when not used anymore. The caller may not modify the referenced memory anymore after this call.
+ * The behavior is undefined if data does not contain a complete serialized ramses scene or if size does not
+ * match the size of the scene data in bytes.
+ *
+ * The deleter on data allows safe memory ownership passing on windows when ramses is used as dll. For more
+ * details and a convenience wrapper see #ramses::RamsesUtils::LoadSceneFromMemory.
+ *
+ * @param[in] scene Scene that all new content from file is going to be merged into.
+ * @param[in] data Memory buffer to load the scene from.
+ * @param[in] size The size in bytes of the data memory.
+ * @return True if loading and merging was successful.
+ */
+ // NOLINTNEXTLINE(modernize-avoid-c-arrays)
+ bool mergeSceneFromMemory(Scene& scene, std::unique_ptr data, size_t size);
+
+ /**
+ * @brief Loads scene contents and resources from an open file descriptor and merges them info an existing scene.
+ *
+ * Same rules apply as for loading a scene from file - Ramses SDK major version and #ramses::EFeatureLevel must match.
+ *
+ * The ramses scene must be in the already opened filedescriptor at absolute position offset within
+ * the file. The filedescriptor must be opened for read access and may not be modified anymore after
+ * this call. The filedescriptor must support seeking.
+ * Ramses takes ownership of the filedescriptor and will close it when not needed anymore.
+ *
+ * The behavior is undefined if the filedescriptor does not contain a complete serialized ramses scene
+ * at offset.
+ *
+ * @param[in] scene Scene that all new content from file is going to merged into.
+ * @param[in] fd Open and readable filedescriptor.
+ * @param[in] offset Absolute starting position of ramses scene within fd.
+ * @param[in] length Size of the scene data within fd.
+ * @return True if loading and merging was successful.
+ */
+ bool mergeSceneFromFileDescriptor(Scene& scene, int fd, size_t offset, size_t length);
+
/**
* Attempts to parse feature level from a Ramses scene file.
*
diff --git a/include/ramses/client/Scene.h b/include/ramses/client/Scene.h
index a732747f8..45c0feceb 100644
--- a/include/ramses/client/Scene.h
+++ b/include/ramses/client/Scene.h
@@ -214,6 +214,7 @@ namespace ramses
bool destroy(SceneObject& object);
/**
+ * \deprecated { This feature will not be available in next major release, contact developer team immediately if you plan on using it }
* @brief Expiration timestamp is a point in time till which the scene is considered to be up-to-date.
* @details Logic on renderer side will check the time every frame and in case it detects the scene
* to be rendered after its expiration timestamp it will generate an event (#ramses::IRendererSceneControlEventHandler::sceneExpired).
@@ -234,7 +235,7 @@ namespace ramses
*
* @return true for success, false otherwise (check log or #ramses::RamsesFramework::getLastError for details).
*/
- bool setExpirationTimestamp(uint64_t ptpExpirationTimestampInMilliseconds);
+ [[deprecated]] bool setExpirationTimestamp(uint64_t ptpExpirationTimestampInMilliseconds);
/**
* @brief Commits all changes done to the scene since the last flush or since scene creation.
@@ -776,6 +777,7 @@ namespace ramses
bool createTextureConsumer(const TextureSamplerExternal& sampler, dataConsumerId_t dataId);
/**
+ * \deprecated { This feature will not be available in next major release, contact developer team immediately if you plan on using it }
* @brief Creates a new SceneReference object.
* @details The SceneReference object references a scene, which might be unknown
* to this RamsesClient, but is or expected to be known to the RamsesRenderer subscribed to this scene.
@@ -793,7 +795,7 @@ namespace ramses
* @param[in] name The optional name of the created SceneReference.
* @return A pointer to the created SceneReference.
*/
- SceneReference* createSceneReference(sceneId_t referencedScene, std::string_view name = {});
+ [[deprecated]] SceneReference* createSceneReference(sceneId_t referencedScene, std::string_view name = {});
/**
* @brief Tell the RamsesRenderer to link a data provider to a data consumer across two scenes.
diff --git a/include/ramses/client/SceneConfig.h b/include/ramses/client/SceneConfig.h
index 972eeef9b..0f282f337 100644
--- a/include/ramses/client/SceneConfig.h
+++ b/include/ramses/client/SceneConfig.h
@@ -11,6 +11,7 @@
#include "ramses/framework/APIExport.h"
#include "ramses/framework/RamsesFrameworkTypes.h"
#include "ramses/framework/EScenePublicationMode.h"
+#include "ramses/framework/ERenderBackendCompatibility.h"
#include
@@ -40,8 +41,9 @@ namespace ramses
* @param sceneId Each scene requires a sceneId for global identification (sceneId is used for scene mapping on renderer side).
* If no sceneId is provided Ramses will use the sceneId stored in the serialized file or raise an error if the scene is created at runtime.
* @param publicationMode see #ramses::SceneConfig::setPublicationMode for details
+ * @param renderBackendCompatibility see #ramses::SceneConfig::setRenderBackendCompatibility for details
*/
- explicit SceneConfig(sceneId_t sceneId, EScenePublicationMode publicationMode = EScenePublicationMode::LocalOnly);
+ explicit SceneConfig(sceneId_t sceneId, EScenePublicationMode publicationMode = EScenePublicationMode::LocalOnly, ERenderBackendCompatibility renderBackendCompatibility = ERenderBackendCompatibility::OpenGL);
/**
* @brief Destructor of SceneConfig
@@ -74,6 +76,15 @@ namespace ramses
*/
void setMemoryVerificationEnabled(bool enabled);
+ /**
+ * Set compatibility of scene and its resources to render backend devices available on the renderer.
+ * If a scene object or a resource is created in the scene and it is not compatible
+ * with the selected render backend device on the renderer side, the scene will be rejected and cannot be rendered.
+ *
+ * @param renderBackendCompatibility Render backend compatibility of scene and its resources.
+ */
+ void setRenderBackendCompatibility(ERenderBackendCompatibility renderBackendCompatibility);
+
/**
* @brief Copy constructor
* @param other source to copy from
diff --git a/include/ramses/client/UniformInput.h b/include/ramses/client/UniformInput.h
index 263f02b03..f92155ba4 100644
--- a/include/ramses/client/UniformInput.h
+++ b/include/ramses/client/UniformInput.h
@@ -38,6 +38,15 @@ namespace ramses
*/
[[nodiscard]] size_t getElementCount() const;
+ /**
+ * @brief Returns the binding specified in the layout for uniform buffer declaration in the shader.
+ * @details If the uniform object input reports to either a uniform buffer or a uniform buffer field/item,
+ * then the binding specified for the uniform buffer in layout is returned. Same value is returned
+ * for inputs representing a uniform buffer and all its fields.
+ * @return the uniform buffer binding or nullopt if the input is neither a uniform buffer nor a field within a uniform buffer
+ */
+ [[nodiscard]] std::optional getUniformBufferBinding() const;
+
/**
* @brief Destructor of UniformInput.
*/
diff --git a/include/ramses/framework/DataTypes.h b/include/ramses/framework/DataTypes.h
index d23508408..95896efdd 100644
--- a/include/ramses/framework/DataTypes.h
+++ b/include/ramses/framework/DataTypes.h
@@ -96,6 +96,7 @@ namespace ramses
case EDataType::TextureSampler3D:
case EDataType::TextureSamplerCube:
case EDataType::TextureSamplerExternal:
+ case EDataType::UniformBuffer:
return false;
}
@@ -133,6 +134,7 @@ namespace ramses
case EDataType::TextureSampler3D:
case EDataType::TextureSamplerCube:
case EDataType::TextureSamplerExternal:
+ case EDataType::UniformBuffer:
return false;
}
diff --git a/include/ramses/framework/EDataType.h b/include/ramses/framework/EDataType.h
index e26cd3f27..8d8eff839 100644
--- a/include/ramses/framework/EDataType.h
+++ b/include/ramses/framework/EDataType.h
@@ -41,6 +41,8 @@ namespace ramses
TextureSampler3D, ///< 3D Texture sampler data type
TextureSamplerCube, ///< Cube Texture sampler data type
TextureSamplerExternal, ///< External Texture sampler data type
+
+ UniformBuffer, ///< Uniform buffer object data type
};
/**
@@ -80,6 +82,7 @@ namespace ramses
case EDataType::TextureSampler3D:
case EDataType::TextureSamplerCube:
case EDataType::TextureSamplerExternal:
+ case EDataType::UniformBuffer:
return 0u;
}
@@ -126,6 +129,7 @@ namespace ramses
case EDataType::TextureSampler3D:
case EDataType::TextureSamplerCube:
case EDataType::TextureSamplerExternal:
+ case EDataType::UniformBuffer:
return 0u;
}
diff --git a/include/ramses/framework/EFeatureLevel.h b/include/ramses/framework/EFeatureLevel.h
index 5be34d1b5..d55e4152f 100644
--- a/include/ramses/framework/EFeatureLevel.h
+++ b/include/ramses/framework/EFeatureLevel.h
@@ -49,7 +49,12 @@ namespace ramses
/// Base level of features released with version 28.0
EFeatureLevel_01 = 1,
+ /// Added features: Uniform buffer objects
+ EFeatureLevel_02 = 2,
+
/// Equals to the latest feature level
- EFeatureLevel_Latest = EFeatureLevel_01
+ /// Avoid using this enum in application code because it will change also in minor releases when new feature level is added!
+ /// Use concrete feature level when instantiating Ramses framework, level which matches desired use case or supports certain asset.
+ EFeatureLevel_Latest = EFeatureLevel_02
};
}
diff --git a/include/ramses/framework/ERenderBackendCompatibility.h b/include/ramses/framework/ERenderBackendCompatibility.h
new file mode 100644
index 000000000..5534e62a3
--- /dev/null
+++ b/include/ramses/framework/ERenderBackendCompatibility.h
@@ -0,0 +1,24 @@
+// -------------------------------------------------------------------------
+// Copyright (C) 2024 BMW AG
+// -------------------------------------------------------------------------
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this
+// file, You can obtain one at https://mozilla.org/MPL/2.0/.
+// -------------------------------------------------------------------------
+
+#pragma once
+
+#include
+
+namespace ramses
+{
+ /**
+ * @ingroup CoreAPI
+ * Specifies compatibility of scene and its resources with the different renderer devices.
+ */
+ enum class ERenderBackendCompatibility : uint8_t
+ {
+ OpenGL,
+ VulkanAndOpenGL
+ };
+}
diff --git a/include/ramses/renderer/DisplayConfig.h b/include/ramses/renderer/DisplayConfig.h
index cd71aea40..d229fc4f2 100644
--- a/include/ramses/renderer/DisplayConfig.h
+++ b/include/ramses/renderer/DisplayConfig.h
@@ -75,6 +75,14 @@ namespace ramses
*/
[[nodiscard]] EWindowType getWindowType() const;
+ /**
+ * @brief Sets the window title
+ *
+ * @param[in] windowTitle window title.
+ * @return true on success, false if an error occurred (error is logged)
+ */
+ bool setWindowTitle(std::string_view windowTitle);
+
/**
* @brief Sets the window size and position in display pixel space.
* This is ignored if window is set fullscreen.
diff --git a/include/ramses/renderer/RamsesRenderer.h b/include/ramses/renderer/RamsesRenderer.h
index 8af8e96a8..a8556c666 100644
--- a/include/ramses/renderer/RamsesRenderer.h
+++ b/include/ramses/renderer/RamsesRenderer.h
@@ -521,7 +521,7 @@ namespace ramses
* @param visibility visibility to set
* @return true for success, false otherwise (check log or #ramses::RamsesFramework::getLastError for details).
**/
- bool setSurfaceVisibility(uint32_t surfaceId, bool visibility);
+ [[deprecated]] bool setSurfaceVisibility(uint32_t surfaceId, bool visibility);
/**
* @brief Set opacity of given surface at the system compositor
@@ -529,7 +529,7 @@ namespace ramses
* @param opacity Opacity in the range 0.0 (fully transparent) to 1.0 (fully opaque)
* @return true for success, false otherwise (check log or #ramses::RamsesFramework::getLastError for details).
**/
- bool setSurfaceOpacity(uint32_t surfaceId, float opacity);
+ [[deprecated]] bool setSurfaceOpacity(uint32_t surfaceId, float opacity);
/**
* @brief Set output rectangle of given surface at the system compositor
@@ -540,7 +540,7 @@ namespace ramses
* @param height Output height of surface
* @return true for success, false otherwise (check log or #ramses::RamsesFramework::getLastError for details).
*/
- bool setSurfaceRectangle(uint32_t surfaceId, int32_t x, int32_t y, int32_t width, int32_t height);
+ [[deprecated]] bool setSurfaceRectangle(uint32_t surfaceId, int32_t x, int32_t y, int32_t width, int32_t height);
/**
* @brief Set visibility of given layer at the system compositor
@@ -548,7 +548,7 @@ namespace ramses
* @param visibility If \c true the layer's visibility will be enabled, otherwise disabled
* @return true for success, false otherwise (check log or #ramses::RamsesFramework::getLastError for details).
**/
- bool setLayerVisibility(uint32_t layerId, bool visibility);
+ [[deprecated]] bool setLayerVisibility(uint32_t layerId, bool visibility);
/**
* @brief Trigger the System Compositor to take a screenshot and store it in a file.
@@ -557,7 +557,7 @@ namespace ramses
* on a single existing screen (fails asynchronously if more than one screen exists)
* @return true for success, false otherwise (check log or #ramses::RamsesFramework::getLastError for details).
*/
- bool takeSystemCompositorScreenshot(std::string_view fileName, int32_t screenIviId);
+ [[deprecated]] bool takeSystemCompositorScreenshot(std::string_view fileName, int32_t screenIviId);
/////////////////////////////////////////////////
// End of System Compositor API
diff --git a/include/ramses/renderer/RendererConfig.h b/include/ramses/renderer/RendererConfig.h
index e5cb143fb..c37118252 100644
--- a/include/ramses/renderer/RendererConfig.h
+++ b/include/ramses/renderer/RendererConfig.h
@@ -53,7 +53,7 @@ namespace ramses
*
* @return true on success, false if an error occurred (error is logged)
*/
- bool enableSystemCompositorControl();
+ [[deprecated]] bool enableSystemCompositorControl();
/**
* @brief Set the maximum time to wait for the system compositor frame callback
@@ -76,14 +76,14 @@ namespace ramses
* @param[in] waylandDisplay Wayland display name to use for connection
* @return true on success, false if an error occurred (error is logged)
*/
- bool setSystemCompositorWaylandDisplay(std::string_view waylandDisplay);
+ [[deprecated]] bool setSystemCompositorWaylandDisplay(std::string_view waylandDisplay);
/**
* @brief Get the current setting of Wayland display name
*
* @return Wayland display name to use for connection, empty means default
*/
- [[nodiscard]] std::string_view getSystemCompositorWaylandDisplay() const;
+ [[deprecated]] [[nodiscard]] std::string_view getSystemCompositorWaylandDisplay() const;
/**
* @brief Set the desired reporting period for first display loop timings.
diff --git a/include/ramses/renderer/Types.h b/include/ramses/renderer/Types.h
index 87921b6d0..9c917161d 100644
--- a/include/ramses/renderer/Types.h
+++ b/include/ramses/renderer/Types.h
@@ -293,7 +293,8 @@ namespace ramses
{
GLES_3_0,
GL_4_2,
- GL_4_5
+ GL_4_5,
+ Vulkan
};
/**
diff --git a/scripts/ci/build/build.py b/scripts/ci/build/build.py
index 71346631f..b1b5689c8 100644
--- a/scripts/ci/build/build.py
+++ b/scripts/ci/build/build.py
@@ -31,8 +31,8 @@ def __init__(self, compiler, config, build_dir):
super(BuildConfig, self).__init__(compiler, config, build_dir)
def cmake_configure(self,
- disable_default_window_type, enable_x11, enable_android, enable_wayland_ivi, enable_wayland_wl_shell,
- flatbuf_gen, android_abi, disable_logic, use_imagemagick,
+ disable_default_window_type, enable_x11, enable_android, enable_wayland_ivi, enable_wayland_wl_shell, enable_vulkan,
+ flatbuf_gen, android_abi, use_imagemagick,
no_full_shared_lib,
no_examples, no_demos, no_tests, no_tools, generator,
enable_dlt, enable_lto, test_coverage, enable_coverage, sanitizer_name,
@@ -73,9 +73,6 @@ def cmake_configure(self,
if no_full_shared_lib:
optional_args.append('-Dramses-sdk_BUILD_FULL_SHARED_LIB=0')
- if disable_logic:
- optional_args.append('-Dramses-sdk_ENABLE_LOGIC=OFF')
-
if disable_default_window_type:
optional_args.append('-Dramses-sdk_ENABLE_DEFAULT_WINDOW_TYPE=0')
@@ -109,6 +106,7 @@ def cmake_configure(self,
f'-Dramses-sdk_ENABLE_WINDOW_TYPE_ANDROID={to_cmake(enable_android)}',
f'-Dramses-sdk_ENABLE_WINDOW_TYPE_WAYLAND_IVI={to_cmake(enable_wayland_ivi)}',
f'-Dramses-sdk_ENABLE_WINDOW_TYPE_WAYLAND_WL_SHELL={to_cmake(enable_wayland_wl_shell)}',
+ f'-Dramses-sdk_ENABLE_DEVICE_TYPE_VULKAN={to_cmake(enable_vulkan)}',
f'-Dramses-sdk_ENABLE_DLT={to_cmake(enable_dlt)}',
f'-Dramses-sdk_ENABLE_FLATBUFFERS_GENERATION={to_cmake(flatbuf_gen)}',
f'-Dramses-sdk_BUILD_WITH_LTO={to_cmake(enable_lto)}',
@@ -153,6 +151,7 @@ def copy_package(self, package_target):
@click.option('--enable-android', is_flag=True, default=False, help='Enable building for creating android window')
@click.option('--enable-wayland-ivi', is_flag=True, default=False, help='Enable building for creating wayland windows that use ivi_shell')
@click.option('--enable-wayland-wl-shell', is_flag=True, default=False, help='Enable building for creating wayland windows that use wl_shell')
+@click.option('--enable-vulkan', is_flag=True, default=False, help='Enable building for creating vulkan device')
@click.option('--build-target', default='install', help='What CMake target to build')
@click.option('--flatbuf-gen', is_flag=True, default=False, help='Generate flatbuffer file headers')
@click.option('--android-abi', help='Set ABI when building on Android')
@@ -172,7 +171,6 @@ def copy_package(self, package_target):
@click.option('--package-name', default="", help='Use a different package name for CPack than the default')
@click.option('--package-destination', type=click.Path(exists=True, file_okay=False), help='Specify a folder where the package shall be copied')
@click.option('--cpp-std', type=click.Choice(CPP_STANDARDS), default=CPP_STANDARDS[0])
-@click.option('--disable-logic', is_flag=True, default=False, help='Disable building ramses logic')
@click.option('--use-imagemagick', is_flag=True, default=False, help='Build tests that use imagemagick')
@click.option('--cmake-modules', help='Sets cmake module path')
def build(compiler, config, build_dir, configure_only, build_target, package_destination, **kwargs):
diff --git a/scripts/ci/build/common.py b/scripts/ci/build/common.py
index 970ec3c0d..1065ea6a4 100755
--- a/scripts/ci/build/common.py
+++ b/scripts/ci/build/common.py
@@ -17,6 +17,7 @@
'gcc',
'llvm',
'clang-tidy',
+ 'clang15'
]
# Default is the first entry
@@ -48,5 +49,7 @@ def get_toolchain(self):
return self.src_dir / 'cmake/toolchain/Linux_X86_64.toolchain'
elif self.compiler in ['llvm', 'clang-tidy']:
return self.src_dir / 'cmake/toolchain/Linux_X86_64_llvm.toolchain'
+ elif self.compiler in ['clang15']:
+ return self.src_dir / 'cmake/toolchain/Linux_X86_64_clang15.toolchain'
else:
return None
diff --git a/scripts/ci/build/test-cmake-configurations.py b/scripts/ci/build/test-cmake-configurations.py
index c16211aad..798b07c41 100755
--- a/scripts/ci/build/test-cmake-configurations.py
+++ b/scripts/ci/build/test-cmake-configurations.py
@@ -56,10 +56,10 @@ def check_expectations(condition, *expectations):
x11 = "enable_x11" in cmake_options
wayland_ivi = "enable_wayland_ivi" in cmake_options
wayland_shell = "enable_wayland_wl_shell" in cmake_options
+ vulkan = "enable_vulkan" in cmake_options
tests = "no_tests" not in cmake_options
examples = "no_examples" not in cmake_options
tools = "no_tools" not in cmake_options
- logic = "disable_logic" not in cmake_options
use_imagemagick = "use_imagemagick" in cmake_options
luajit = "enable_luajit" in cmake_options
@@ -72,7 +72,7 @@ def check_expectations(condition, *expectations):
check_expectations(True, "ramses-client")
# expect internal lua target unless luajit is configured
- check_expectations(logic and not luajit, "lua (internal)")
+ check_expectations(not luajit, "lua (internal)")
if luajit:
assert "Found LuaJIT" in process_output
@@ -81,34 +81,35 @@ def check_expectations(condition, *expectations):
check_expectations(full_shared_lib, "ramses-shared-lib")
# renderer
- check_expectations(x11, "X11")
- check_expectations(wayland_ivi, "Wayland ivi")
- check_expectations(wayland_shell, "Wayland wl_shell")
+ check_expectations(x11, "Window Type: X11")
+ check_expectations(wayland_ivi, "Window Type: Wayland ivi")
+ check_expectations(wayland_shell, "Window Type: Wayland wl_shell")
+ check_expectations(vulkan, "Vulkan")
check_expectations(renderer, "ramses-renderer-internal", "ramses-renderer")
# tools
check_expectations(tools, "ivi-gears", "ivi-simple-dmabuf-egl", "ramses-daemon")
check_expectations(tools and renderer, "ramses-renderer-standalone", "ramses-stream-viewer", "ramses-imgui")
- check_expectations(tools and logic, "ramses-viewer-headless", "test-asset-producer")
- check_expectations(tools and logic and renderer, "ramses-viewer")
+ check_expectations(tools, "ramses-viewer-headless", "test-asset-producer")
+ check_expectations(tools and renderer, "ramses-viewer")
# tests
check_expectations(tests, "ramses-framework-test", "ramses-client-test")
check_expectations(tests and renderer, "ramses-renderer-internal-test", "ramses-renderer-test", "rendering-tests", "ramses-test-client")
- check_expectations(tests and logic, "ramses-logic-benchmarks")
+ check_expectations(tests, "ramses-logic-benchmarks")
check_expectations(x11 and tests, "window-x11-test")
check_expectations(wayland_ivi and tests, "window-wayland-ivi-test")
check_expectations(wayland_shell and tests, "window-wayland-wl-shell-test")
# tool tests
- check_expectations(tests and tools and logic, "ramses-viewer-test")
- check_expectations(tests and tools and logic and renderer and use_imagemagick, "ramses-viewer-gui-test")
+ check_expectations(tests and tools, "ramses-viewer-test")
+ check_expectations(tests and tools and renderer and use_imagemagick, "ramses-viewer-gui-test")
# examples
check_expectations(examples, "ramses-example-basic-geometry")
check_expectations(examples and full_shared_lib, "ramses-example-local-client")
- check_expectations(examples and logic, "00_minimal")
- check_expectations(examples and full_shared_lib and logic, "13_render_order")
+ check_expectations(examples, "00_minimal")
+ check_expectations(examples and full_shared_lib, "13_render_order")
if tests:
ctestProcessResult = subprocess.run(["ctest", "--show-only"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT, cwd=test_dir)
@@ -132,7 +133,7 @@ def check_expectations(condition, *expectations):
if full_shared_lib:
expected_tests += ['ramses-shared-lib-tests_RNDSANDWICHTEST_SWRAST']
- if examples and logic:
+ if examples:
expected_tests += [
'00_minimal_UNITTEST',
'01a_primitive_properties_UNITTEST',
@@ -190,12 +191,15 @@ def check_expectations(condition, *expectations):
'rendering-tests_wayland-wl-shell-gles30_RNDSANDWICHTEST',
'render-backend-tests_wayland-wl-shell-gles30_RNDSANDWICHTEST',
'resource-stress-tests_wayland-wl-shell-gles30_RNDSANDWICHTEST']
+ if vulkan:
+ expected_tests += [
+ 'render-backend-tests_x11-vulkan_RNDSANDWICHTEST_SWRAST']
- if logic and tools:
+ if tools:
expected_tests += [
'ramses-viewer-test_UNITTEST']
- if logic and tools and renderer and use_imagemagick:
+ if tools and renderer and use_imagemagick:
expected_tests += [
'ramses-viewer-gui-test_RNDSANDWICHTEST_SWRAST']
@@ -243,6 +247,9 @@ def main(cli_context, build_dir):
test_cmake_configuration(cli_context, build_dir, True, enable_wayland_ivi=True)
test_cmake_configuration(cli_context, build_dir, True, enable_wayland_wl_shell=True)
+ # can configure with vulkan
+ test_cmake_configuration(cli_context, build_dir, True, enable_x11=True, enable_vulkan=True)
+
# can configure with any of examples, demos, tests or tool disabled
test_cmake_configuration(cli_context, build_dir, True, enable_x11=True, no_examples=True)
test_cmake_configuration(cli_context, build_dir, True, enable_x11=True, no_demos=True)
@@ -257,10 +264,6 @@ def main(cli_context, build_dir):
test_cmake_configuration(cli_context, build_dir, True, no_full_shared_lib=True, use_imagemagick=True)
test_cmake_configuration(cli_context, build_dir, True, enable_x11=True, no_full_shared_lib=True, use_imagemagick=True)
- # can configure with ramses logic disabled
- test_cmake_configuration(cli_context, build_dir, True, disable_logic=True, no_full_shared_lib=True)
- test_cmake_configuration(cli_context, build_dir, True, disable_logic=True, no_full_shared_lib=True, use_imagemagick=True)
-
elapsed_time = time.time() - start_time
print(f"Tests finished SUCCESSFULLY...Elapsed time to run cmake configuration tests : {elapsed_time:.2f} seconds")
diff --git a/scripts/ci/collect-coverage.py b/scripts/ci/collect-coverage.py
index ae9d29f74..6b2893871 100755
--- a/scripts/ci/collect-coverage.py
+++ b/scripts/ci/collect-coverage.py
@@ -43,7 +43,10 @@ def main():
if not profdir.is_dir():
raise Exception(f'profdir does not exist {profdir}')
- prof_files = [e.name for e in profdir.glob(f'{allowed_selections[args.select]}.profraw')]
+ # filter out embedded compositing rendering tests since they break coverage collection
+ execlude_files = [e.name for e in profdir.glob('embedded-compositing-rendering-tests_RNDSANDWICHTEST_SWRAST*.profraw')]
+ prof_files = [e.name for e in profdir.glob(f'{allowed_selections[args.select]}.profraw') if e.name not in execlude_files]
+
if not prof_files:
raise Exception('No profraw files match filter')
@@ -55,15 +58,10 @@ def main():
merged_data = f'coverage-merged-{args.select}.profdata'
print(f'Generate {merged_data}')
- for attempt in range(3):
- try:
- subprocess.check_call(['llvm-profdata', 'merge', '-o', merged_data] + prof_files, shell=False, cwd=profdir)
- except subprocess.CalledProcessError as e:
- print(f'Attempt {attempt} failed: {e}')
- else:
- break
- else:
- raise Exception(f'Generate {merged_data} failed')
+ try:
+ subprocess.check_call(['llvm-profdata', 'merge', '-o', merged_data] + prof_files, shell=False, cwd=profdir)
+ except subprocess.CalledProcessError as e:
+ raise Exception(f'Generate {merged_data} failed with exception {e}')
merged_executable = f'merge-executable-{args.select}'
print(f'Generate {merged_executable}')
diff --git a/scripts/ci/common/compilationdb.py b/scripts/ci/common/compilationdb.py
index ca0aa664b..9f53025ca 100644
--- a/scripts/ci/common/compilationdb.py
+++ b/scripts/ci/common/compilationdb.py
@@ -41,7 +41,10 @@ def file(self):
def relative_file(self):
if not self._project_root:
raise RuntimeError('project_root not set')
- return str(Path(self.file).relative_to(self._project_root))
+ try:
+ return str(Path(self.file).relative_to(self._project_root))
+ except Exception:
+ return self.file
@property
def includes(self):
diff --git a/scripts/ci/config/clang-tidy-wrapper.yaml b/scripts/ci/config/clang-tidy-wrapper.yaml
index 1a3c1f77e..5d653b551 100644
--- a/scripts/ci/config/clang-tidy-wrapper.yaml
+++ b/scripts/ci/config/clang-tidy-wrapper.yaml
@@ -13,6 +13,8 @@ include:
exclude:
# exclude all external
- ^external/
+ # exclude generated file by glslang
+ - .*/external/glslang/.*\.hxx\.cxx
# exclude generated flatbuffers files
- ^src/client/internal/logic/flatbuffers/
@@ -44,6 +46,11 @@ check-filter:
exclude:
- ^examples/ramses-example-local-dma-offscreenbuffer/src/main.cpp$
- ^tests/integration/renderer-tests/dma-offscreen-buffer-rendering-tests/DmaOffscreenBufferTests.cpp$
+ - ^src/renderer/internal/Platform/Vulkan/Context_Vulkan_Base.cpp$
+ - check: modernize-avoid-bind
+ exclude:
+ - ^src/renderer/internal/Platform/Vulkan/Context_Vulkan_Base.cpp$
+
- check: modernize-avoid-c-arrays
exclude:
- ^tests/.*
diff --git a/scripts/ci/config/sanitizer/tsan_blacklist.txt b/scripts/ci/config/sanitizer/tsan_blacklist.txt
index 557e10583..103027b5d 100644
--- a/scripts/ci/config/sanitizer/tsan_blacklist.txt
+++ b/scripts/ci/config/sanitizer/tsan_blacklist.txt
@@ -4,3 +4,10 @@ mutex:dlt_free
# EGL de/init in mesa swrast EGL implementation causes both leak (lsan, valgrind) and data race (tsan),
# it might be worth to check if still happening on future driver versions
race:~Context_EGL()
+race:Context_EGL::init()
+# XauFileName in Xlib seems not thread safe, race when initialzing window from multiple ramses instances in parallel
+race:XauFileName
+# Data race of static string storage in swrast, reading via glGetString during device init (should be harmless).
+# Given the tsan suppression format and race callstack sadly it cannot be narrowed down to more concrete filter
+# than filtering the whole swrast lib
+race:swrast_dri.so
diff --git a/scripts/ci/config/sanitizer/ubsan_blacklist.txt b/scripts/ci/config/sanitizer/ubsan_blacklist.txt
index 1b9cbc445..b896016cc 100644
--- a/scripts/ci/config/sanitizer/ubsan_blacklist.txt
+++ b/scripts/ci/config/sanitizer/ubsan_blacklist.txt
@@ -1,2 +1,3 @@
-#glslang uses EShLanguageMask enum as bitfield
+# glslang uses EShLanguageMask enum as bitfield
fun:_ZN7glslang14TParseVersions12requireStageERKNS_10TSourceLocE15EShLanguageMaskPKc
+src:*/glslang/SPIRV/spirv.hpp
diff --git a/src/client/CMakeLists.txt b/src/client/CMakeLists.txt
index cdc1c26cb..07f56c663 100644
--- a/src/client/CMakeLists.txt
+++ b/src/client/CMakeLists.txt
@@ -9,22 +9,19 @@
add_subdirectory(internal)
if(ramses-sdk_TEXT_SUPPORT)
- list(APPEND CLIENT_IMPL_SOURCES impl/text/*.h
+ list(APPEND TEXT_IMPL_SOURCES impl/text/*.h
impl/text/*.cpp)
endif()
-if(ramses-sdk_ENABLE_LOGIC)
- list(APPEND CLIENT_IMPL_SOURCES impl/logic/*.h
- impl/logic/*.cpp)
-endif()
-
createModule(
NAME ramses-client
TYPE STATIC_LIBRARY
ENABLE_INSTALL OFF
SRC_FILES impl/*.h
impl/*.cpp
- ${CLIENT_IMPL_SOURCES}
+ impl/logic/*.h
+ impl/logic/*.cpp
+ ${TEXT_IMPL_SOURCES}
DEPENDENCIES ramses-client-internal
ramses-framework
)
diff --git a/src/client/impl/AppearanceImpl.cpp b/src/client/impl/AppearanceImpl.cpp
index 778e718d8..f42fb76b1 100644
--- a/src/client/impl/AppearanceImpl.cpp
+++ b/src/client/impl/AppearanceImpl.cpp
@@ -30,6 +30,7 @@
#include "internal/SceneGraph/SceneUtils/DataLayoutCreationHelper.h"
#include "internal/SceneGraph/SceneUtils/ISceneDataArrayAccessor.h"
#include "internal/SceneGraph/SceneUtils/DataInstanceHelper.h"
+#include "internal/SceneGraph/SceneUtils/UniformBufferUtils.h"
#include "internal/SceneGraph/SceneAPI/EDataType.h"
#include
@@ -254,9 +255,9 @@ namespace ramses::internal
DeserializationContext::ReadDependentPointerAndStoreAsID(inStream, m_effectImpl);
- inStream >> m_renderStateHandle;
- inStream >> m_uniformLayout;
- inStream >> m_uniformInstance;
+ serializationContext.deserializeAndMap(inStream, m_renderStateHandle);
+ serializationContext.deserializeAndMap(inStream, m_uniformLayout);
+ serializationContext.deserializeAndMap(inStream, m_uniformInstance);
uint32_t bindableInputCount = 0u;
inStream >> bindableInputCount;
@@ -270,7 +271,7 @@ namespace ramses::internal
BindableInput bindableInput;
DeserializationContext::ReadDependentPointerAndStoreAsID(inStream, bindableInput.externallyBoundDataObject);
- inStream >> bindableInput.dataReference;
+ serializationContext.deserializeAndMap(inStream, bindableInput.dataReference);
m_bindableInputs.put(inputIndex, bindableInput);
}
@@ -385,6 +386,17 @@ namespace ramses::internal
void AppearanceImpl::deinitializeFrameworkData()
{
+ const auto& dataFields = getIScene().getDataLayout(m_uniformLayout).getDataFields();
+ for (DataFieldHandle datFieldHandle{ 0u }; datFieldHandle < dataFields.size(); ++datFieldHandle)
+ {
+ const auto& field = dataFields[datFieldHandle.asMemoryHandle()];
+ if (field.dataType == EDataType::UniformBuffer && field.semantics == EFixedSemantics::Invalid)
+ {
+ const auto ubHandle = getIScene().getDataUniformBuffer(m_uniformInstance, datFieldHandle);
+ getIScene().releaseUniformBuffer(ubHandle);
+ }
+ }
+
getIScene().releaseDataInstance(m_uniformInstance);
m_uniformInstance = DataInstanceHandle::Invalid();
@@ -426,22 +438,37 @@ namespace ramses::internal
void AppearanceImpl::createUniformDataInstance(const EffectImpl& effect)
{
- InputIndexVector referencedInputs;
const EffectInputInformationVector& uniformsInputInfo = effect.getUniformInputInformation();
- m_uniformLayout = DataLayoutCreationHelper::CreateUniformDataLayoutMatchingEffectInputs(getIScene(), uniformsInputInfo, referencedInputs, effect.getLowlevelResourceHash());
+ InputIndexVector referencedInputs;
+ std::tie(m_uniformLayout, referencedInputs) = DataLayoutCreationHelper::CreateUniformDataLayoutMatchingEffectInputs(getIScene(), uniformsInputInfo, effect.getLowlevelResourceHash());
m_uniformInstance = getIScene().allocateDataInstance(m_uniformLayout, {});
m_bindableInputs.reserve(m_bindableInputs.size() + referencedInputs.size());
for (const auto& refInput : referencedInputs)
{
- const DataFieldHandle dataField(refInput);
+ const DataFieldHandle dataField(uniformsInputInfo[refInput].dataFieldHandle);
BindableInput bindableInput;
bindableInput.externallyBoundDataObject = nullptr;
bindableInput.dataReference = DataLayoutCreationHelper::CreateAndBindDataReference(getIScene(), m_uniformInstance, dataField, uniformsInputInfo[refInput].dataType);
m_bindableInputs.put(refInput, bindableInput);
}
+
+ createUniformBuffers(uniformsInputInfo);
+ }
+
+ void AppearanceImpl::createUniformBuffers(const EffectInputInformationVector& uniformsInputs)
+ {
+ for (const auto& uniformInput : uniformsInputs)
+ {
+ if (uniformInput.dataType == EDataType::UniformBuffer && uniformInput.semantics == EFixedSemantics::Invalid)
+ {
+ assert(uniformInput.uniformBufferElementSize.isValid());
+ const auto ubHandle = getIScene().allocateUniformBuffer(uniformInput.uniformBufferElementSize.getValue(), {});
+ getIScene().setDataUniformBuffer(m_uniformInstance, uniformInput.dataFieldHandle, ubHandle);
+ }
+ }
}
bool AppearanceImpl::checkEffectInputValidityAndValueCompatibility(const EffectInputImpl& input, size_t valueElementCount, std::initializer_list valueDataType) const
@@ -508,7 +535,7 @@ namespace ramses::internal
return false;
}
- const DataFieldHandle dataField(inputIndex);
+ const DataFieldHandle dataField = input.getDataFieldHandle();
if (isBindable)
{
const DataInstanceHandle dataReference = getDataReference(dataField, input.getInternalDataType());
@@ -518,6 +545,10 @@ namespace ramses::internal
ISceneDataArrayAccessor::SetDataArray(&getIScene(), dataReference, DataFieldHandle(0u), 1u, values);
}
}
+ else if (input.getUniformBufferFieldOffset().isValid())
+ {
+ setUniformBufferField(elementCount, values, input);
+ }
else
{
static_assert( std::is_same_v == true );
@@ -532,6 +563,39 @@ namespace ramses::internal
return true;
}
+ template
+ void AppearanceImpl::setUniformBufferField(size_t elementCount, const T* values, const EffectInputImpl& input)
+ {
+ const DataFieldHandle dataField = input.getDataFieldHandle();
+ const auto fieldOffset = input.getUniformBufferFieldOffset().getValue();
+ const auto ubHandle = getIScene().getDataUniformBuffer(m_uniformInstance, dataField);
+ const std::byte* currentValueRaw = getIScene().getUniformBuffer(ubHandle).data.data() + fieldOffset;
+
+ if (UniformBufferUtils::IsDataTightlyPacked(elementCount))
+ {
+ // optimally only types which fall into this category should be used, i.e., mat4, vec4, mat34, mat24
+ // or scalars that could be tightly packed according to their situation in std140
+ const auto size = uint32_t(elementCount * sizeof(T));
+ if (PlatformMemory::Compare(currentValueRaw, values, size) != 0)
+ {
+ getIScene().updateUniformBuffer(ubHandle, fieldOffset, size, reinterpret_cast(values));
+ }
+ }
+ else
+ {
+ const auto elementSize = input.getUniformBufferElementSize().getValue();
+ for (uint32_t i = 0u; i < elementCount; ++i)
+ {
+ const auto elementArrayOffset = i * elementSize;
+ const auto newValuePadded{ UniformBufferUtils::Pad(values[i]) };
+ if (PlatformMemory::Compare(currentValueRaw + elementArrayOffset, &newValuePadded, elementSize) != 0)
+ {
+ getIScene().updateUniformBuffer(ubHandle, fieldOffset + elementArrayOffset, elementSize, reinterpret_cast(&newValuePadded));
+ }
+ }
+ }
+ }
+
template
bool AppearanceImpl::getDataArrayChecked(size_t elementCount, T* values, const EffectInputImpl& input) const
{
@@ -551,12 +615,16 @@ namespace ramses::internal
return false;
}
- const DataFieldHandle dataField(static_cast(input.getInputIndex()));
+ const DataFieldHandle dataField = input.getDataFieldHandle();
if (isBindable)
{
const DataInstanceHandle dataReference = getDataReference(dataField, input.getInternalDataType());
PlatformMemory::Copy(values, ISceneDataArrayAccessor::GetDataArray(&getIScene(), dataReference, DataFieldHandle(0u)), EnumToSize(input.getInternalDataType()));
}
+ else if (input.getUniformBufferFieldOffset().isValid())
+ {
+ getUniformBufferField(elementCount, values, input);
+ }
else
{
PlatformMemory::Copy(values, ISceneDataArrayAccessor::GetDataArray(&getIScene(), m_uniformInstance, dataField), elementCount * EnumToSize(input.getInternalDataType()));
@@ -565,6 +633,29 @@ namespace ramses::internal
return true;
}
+ template
+ void AppearanceImpl::getUniformBufferField(size_t elementCount, T* values, const EffectInputImpl& input) const
+ {
+ const DataFieldHandle dataField = input.getDataFieldHandle();
+ const auto fieldOffset = input.getUniformBufferFieldOffset().getValue();
+ const auto ubHandle = getIScene().getDataUniformBuffer(m_uniformInstance, dataField);
+ const std::byte* fieldDataRaw = getIScene().getUniformBuffer(ubHandle).data.data() + fieldOffset;
+ if (UniformBufferUtils::IsDataTightlyPacked(elementCount))
+ {
+ PlatformMemory::Copy(values, fieldDataRaw, elementCount * sizeof(T));
+ }
+ else
+ {
+ for (uint32_t i = 0u; i < elementCount; ++i)
+ {
+ const auto elementArrayOffset = i * input.getUniformBufferElementSize().getValue();
+ using PaddingT = typename UniformBufferUtils::std140_padding_info::padding_type_t;
+ const auto& valueWithPaddingRef = *reinterpret_cast(fieldDataRaw + elementArrayOffset);
+ UniformBufferUtils::RemovePadding(valueWithPaddingRef, values[i]);
+ }
+ }
+ }
+
bool AppearanceImpl::setInputTexture(const EffectInputImpl& input, const TextureSamplerImpl& textureSampler)
{
if (!isFromTheSameSceneAs(textureSampler))
@@ -583,7 +674,7 @@ namespace ramses::internal
{ramses::internal::EDataType::TextureSampler2D, ramses::internal::EDataType::TextureSampler3D, ramses::internal::EDataType::TextureSamplerCube}))
return false;
- const DataFieldHandle dataField(static_cast(input.getInputIndex()));
+ const DataFieldHandle dataField = input.getDataFieldHandle();
const auto samplerHandle = getIScene().getDataTextureSamplerHandle(m_uniformInstance, dataField);
if (samplerHandle.isValid())
{
@@ -607,7 +698,7 @@ namespace ramses::internal
{ramses::internal::EDataType::TextureSampler2DMS}))
return false;
- const DataFieldHandle dataField(static_cast(input.getInputIndex()));
+ const DataFieldHandle dataField = input.getDataFieldHandle();
const auto samplerHandle = getIScene().getDataTextureSamplerHandle(m_uniformInstance, dataField);
if (samplerHandle.isValid())
{
@@ -631,7 +722,7 @@ namespace ramses::internal
{ramses::internal::EDataType::TextureSamplerExternal}))
return false;
- const DataFieldHandle dataField(static_cast(input.getInputIndex()));
+ const DataFieldHandle dataField = input.getDataFieldHandle();
const auto samplerHandle = getIScene().getDataTextureSamplerHandle(m_uniformInstance, dataField);
if (samplerHandle.isValid())
{
@@ -659,6 +750,12 @@ namespace ramses::internal
if (!checkEffectInputValidityAndValueCompatibility(input, 1u, {DataTypeUtils::ConvertDataTypeToInternal(dataObject.getDataType())}))
return false;
+ if (input.getUniformBufferFieldOffset().isValid())
+ {
+ getErrorReporting().set("Appearance::bindInput failed, input is part of a uniform buffer");
+ return false;
+ }
+
const auto inputIndex = static_cast(input.getInputIndex());
BindableInput* bindableInput = m_bindableInputs.get(inputIndex);
if (bindableInput == nullptr)
@@ -695,7 +792,7 @@ namespace ramses::internal
if (!checkEffectInputValidityAndValueCompatibility(input, 1u, {textureSampler.getTextureDataType()}))
return false;
- const DataFieldHandle dataField(static_cast(input.getInputIndex()));
+ const DataFieldHandle dataField = input.getDataFieldHandle();
const TextureSamplerHandle samplerHandle = textureSampler.getTextureSamplerHandle();
getIScene().setDataTextureSamplerHandle(m_uniformInstance, dataField, samplerHandle);
return true;
@@ -704,7 +801,7 @@ namespace ramses::internal
bool AppearanceImpl::bindInputInternal(const EffectInputImpl& input, const DataObjectImpl& dataObject)
{
const auto inputIndex = static_cast(input.getInputIndex());
- const DataFieldHandle dataField(inputIndex);
+ const DataFieldHandle dataField = input.getDataFieldHandle();
getIScene().setDataReference(m_uniformInstance, dataField, dataObject.getDataReference());
BindableInput* bindableInput = m_bindableInputs.get(inputIndex);
diff --git a/src/client/impl/AppearanceImpl.h b/src/client/impl/AppearanceImpl.h
index b7bb0547f..f7052286e 100644
--- a/src/client/impl/AppearanceImpl.h
+++ b/src/client/impl/AppearanceImpl.h
@@ -19,6 +19,7 @@
#include "internal/SceneGraph/SceneAPI/Handles.h"
#include "internal/SceneGraph/SceneAPI/EDataType.h"
#include "internal/PlatformAbstraction/Collections/HashMap.h"
+#include "internal/SceneGraph/Resource/EffectInputInformation.h"
#include
#include
@@ -93,6 +94,7 @@ namespace ramses::internal
private:
void createUniformDataInstance(const EffectImpl& effect);
+ void createUniformBuffers(const EffectInputInformationVector& uniformsInputs);
[[nodiscard]] bool checkEffectInputValidityAndValueCompatibility(const EffectInputImpl& input, size_t valueElementCount, std::initializer_list valueDataType) const;
[[nodiscard]] DataInstanceHandle getDataReference(DataFieldHandle dataField, ramses::internal::EDataType expectedDataType) const;
@@ -102,6 +104,11 @@ namespace ramses::internal
template
bool getDataArrayChecked(size_t elementCount, T* values, const EffectInputImpl& input) const;
+ template
+ void setUniformBufferField(size_t elementCount, const T* values, const EffectInputImpl& input);
+ template
+ void getUniformBufferField(size_t elementCount, T* values, const EffectInputImpl& input) const;
+
bool setInputTextureInternal(const EffectInputImpl& input, const TextureSamplerImpl& textureSampler);
bool bindInputInternal(const EffectInputImpl& input, const DataObjectImpl& dataObject);
bool unbindInputInternal(const EffectInputImpl& input);
diff --git a/src/client/impl/ArrayBufferImpl.cpp b/src/client/impl/ArrayBufferImpl.cpp
index 8aa1afe7c..7993eaab1 100644
--- a/src/client/impl/ArrayBufferImpl.cpp
+++ b/src/client/impl/ArrayBufferImpl.cpp
@@ -86,7 +86,7 @@ namespace ramses::internal
if (!SceneObjectImpl::deserialize(inStream, serializationContext))
return false;
- inStream >> m_dataBufferHandle;
+ serializationContext.deserializeAndMap(inStream, m_dataBufferHandle);
return true;
}
diff --git a/src/client/impl/BlitPassImpl.cpp b/src/client/impl/BlitPassImpl.cpp
index c05862ba6..228cf4cd3 100644
--- a/src/client/impl/BlitPassImpl.cpp
+++ b/src/client/impl/BlitPassImpl.cpp
@@ -119,7 +119,7 @@ namespace ramses::internal
if (!SceneObjectImpl::deserialize(inStream, serializationContext))
return false;
- inStream >> m_blitPassHandle;
+ serializationContext.deserializeAndMap(inStream, m_blitPassHandle);
DeserializationContext::ReadDependentPointerAndStoreAsID(inStream, m_sourceRenderBufferImpl);
DeserializationContext::ReadDependentPointerAndStoreAsID(inStream, m_destinationRenderBufferImpl);
diff --git a/src/client/impl/CameraNodeImpl.cpp b/src/client/impl/CameraNodeImpl.cpp
index ff344c163..8a5b1c8b2 100644
--- a/src/client/impl/CameraNodeImpl.cpp
+++ b/src/client/impl/CameraNodeImpl.cpp
@@ -11,6 +11,8 @@
#include "impl/DataObjectImpl.h"
#include "impl/SerializationContext.h"
#include "impl/ErrorReporting.h"
+#include "impl/RamsesClientImpl.h"
+#include "impl/RamsesFrameworkImpl.h"
#include "internal/SceneGraph/Scene/ClientScene.h"
#include "internal/SceneGraph/SceneUtils/DataInstanceHelper.h"
#include "internal/Core/Math3d/CameraMatrixHelper.h"
@@ -51,16 +53,16 @@ namespace ramses::internal
if (!NodeImpl::deserialize(inStream, serializationContext))
return false;
- inStream >> m_cameraHandle;
- inStream >> m_dataLayout;
- inStream >> m_dataInstance;
- inStream >> m_viewportDataReferenceLayout;
- inStream >> m_viewportOffsetDataReference;
- inStream >> m_viewportSizeDataReference;
- inStream >> m_frustumPlanesDataReferenceLayout;
- inStream >> m_frustumPlanesDataReference;
- inStream >> m_frustumNearFarDataReferenceLayout;
- inStream >> m_frustumNearFarDataReference;
+ serializationContext.deserializeAndMap(inStream, m_cameraHandle);
+ serializationContext.deserializeAndMap(inStream, m_dataLayout);
+ serializationContext.deserializeAndMap(inStream, m_dataInstance);
+ serializationContext.deserializeAndMap(inStream, m_viewportDataReferenceLayout);
+ serializationContext.deserializeAndMap(inStream, m_viewportOffsetDataReference);
+ serializationContext.deserializeAndMap(inStream, m_viewportSizeDataReference);
+ serializationContext.deserializeAndMap(inStream, m_frustumPlanesDataReferenceLayout);
+ serializationContext.deserializeAndMap(inStream, m_frustumPlanesDataReference);
+ serializationContext.deserializeAndMap(inStream, m_frustumNearFarDataReferenceLayout);
+ serializationContext.deserializeAndMap(inStream, m_frustumNearFarDataReference);
inStream >> m_frustumInitialized;
inStream >> m_viewportInitialized;
diff --git a/src/client/impl/ClientFactory.cpp b/src/client/impl/ClientFactory.cpp
index 723eb5807..6586d82dd 100644
--- a/src/client/impl/ClientFactory.cpp
+++ b/src/client/impl/ClientFactory.cpp
@@ -15,8 +15,14 @@ namespace ramses::internal
ClientUniquePtr ClientFactory::createClient(RamsesFrameworkImpl& framework, std::string_view applicationName) const
{
auto impl = std::make_unique(framework, applicationName);
- return ClientUniquePtr{ new RamsesClient{ std::move(impl) },
- [](RamsesClient* client_) { delete client_; } };
+ return ClientUniquePtr{ new RamsesClient{ std::move(impl) }, ClientFactory::DeleteClient };
+ }
+
+ void ClientFactory::DeleteClient(RamsesClient* client)
+ {
+ assert(client);
+ client->impl().deinitializeFrameworkData();
+ delete client;
}
bool ClientFactory::RegisterClientFactory()
diff --git a/src/client/impl/ClientFactory.h b/src/client/impl/ClientFactory.h
index 097ce8f6a..3f115fe98 100644
--- a/src/client/impl/ClientFactory.h
+++ b/src/client/impl/ClientFactory.h
@@ -21,6 +21,9 @@ namespace ramses::internal
static bool RegisterClientFactory();
ClientUniquePtr createClient(RamsesFrameworkImpl& framework, std::string_view applicationName) const override;
+
+ private:
+ static void DeleteClient(RamsesClient* client);
};
}
diff --git a/src/client/impl/DataObjectImpl.cpp b/src/client/impl/DataObjectImpl.cpp
index e54961df9..084400e5e 100644
--- a/src/client/impl/DataObjectImpl.cpp
+++ b/src/client/impl/DataObjectImpl.cpp
@@ -13,6 +13,7 @@
#include "internal/SceneGraph/Scene/ClientScene.h"
#include "internal/SceneGraph/SceneUtils/ISceneDataArrayAccessor.h"
#include "internal/SceneGraph/SceneAPI/ResourceContentHash.h"
+#include "impl/SerializationContext.h"
namespace ramses::internal
{
@@ -66,8 +67,8 @@ namespace ramses::internal
uint32_t enumType = 0u;
inStream >> enumType;
m_dataType = static_cast(enumType);
- inStream >> m_layoutHandle;
- inStream >> m_dataReference;
+ serializationContext.deserializeAndMap(inStream, m_layoutHandle);
+ serializationContext.deserializeAndMap(inStream, m_dataReference);
return true;
}
diff --git a/src/client/impl/Effect.cpp b/src/client/impl/Effect.cpp
index 5709b976f..f48e34270 100644
--- a/src/client/impl/Effect.cpp
+++ b/src/client/impl/Effect.cpp
@@ -42,6 +42,11 @@ namespace ramses
return m_impl.findUniformInput(uniformSemantic);
}
+ std::optional Effect::findUniformInputAtBinding(uint32_t uniformBufferBinding) const
+ {
+ return m_impl.findUniformInputAtBinding(uniformBufferBinding);
+ }
+
std::optional Effect::getAttributeInput(size_t index) const
{
return m_impl.getAttributeInput(index);
diff --git a/src/client/impl/EffectDescription.cpp b/src/client/impl/EffectDescription.cpp
index d8bd249bf..8f8e6cc14 100644
--- a/src/client/impl/EffectDescription.cpp
+++ b/src/client/impl/EffectDescription.cpp
@@ -93,6 +93,13 @@ namespace ramses
return status;
}
+ bool EffectDescription::setUniformSemantic(uint32_t uniformBufferBinding, EEffectUniformSemantic semanticType)
+ {
+ const auto status = m_impl->setUniformSemantic(uniformBufferBinding, semanticType);
+ LOG_HL_CLIENT_API2(status, uniformBufferBinding, semanticType);
+ return status;
+ }
+
bool EffectDescription::setAttributeSemantic(std::string_view inputName, EEffectAttributeSemantic semanticType)
{
const auto status = m_impl->setAttributeSemantic(inputName, semanticType);
diff --git a/src/client/impl/EffectDescriptionImpl.cpp b/src/client/impl/EffectDescriptionImpl.cpp
index 128f61c5d..864441a34 100644
--- a/src/client/impl/EffectDescriptionImpl.cpp
+++ b/src/client/impl/EffectDescriptionImpl.cpp
@@ -92,7 +92,13 @@ namespace ramses::internal
return false;
}
- m_inputSemantics.put(std::string{semanticName}, semanticType);
+ m_inputSemantics[std::string{semanticName}] = semanticType;
+ return true;
+ }
+
+ bool EffectDescriptionImpl::setSemantic(uint32_t uniformBufferBinding, EFixedSemantics semanticType)
+ {
+ m_inputSemantics[UniformBufferBinding{ uniformBufferBinding }] = semanticType;
return true;
}
@@ -102,6 +108,12 @@ namespace ramses::internal
return setSemantic(semanticName, semanticTypeInternal);
}
+ bool EffectDescriptionImpl::setUniformSemantic(uint32_t uniformBufferBinding, EEffectUniformSemantic semanticType)
+ {
+ const EFixedSemantics semanticTypeInternal = EffectInputSemanticUtils::GetEffectInputSemanticInternal(semanticType);
+ return setSemantic(uniformBufferBinding, semanticTypeInternal);
+ }
+
bool EffectDescriptionImpl::setAttributeSemantic(std::string_view semanticName, EEffectAttributeSemantic semanticType)
{
const EFixedSemantics semanticTypeInternal = EffectInputSemanticUtils::GetEffectInputSemanticInternal(semanticType);
@@ -143,7 +155,7 @@ namespace ramses::internal
return nullptr;
}
- const EffectDescriptionImpl::SemanticsMap& EffectDescriptionImpl::getSemanticsMap() const
+ const SemanticsMap& EffectDescriptionImpl::getSemanticsMap() const
{
return m_inputSemantics;
}
diff --git a/src/client/impl/EffectDescriptionImpl.h b/src/client/impl/EffectDescriptionImpl.h
index 0bd986861..2ac63c850 100644
--- a/src/client/impl/EffectDescriptionImpl.h
+++ b/src/client/impl/EffectDescriptionImpl.h
@@ -13,7 +13,6 @@
#include "ramses/client/EffectInputSemantic.h"
// ramses framework
-#include "internal/PlatformAbstraction/Collections/HashMap.h"
#include "internal/SceneGraph/SceneAPI/EFixedSemantics.h"
#include
@@ -25,8 +24,6 @@ namespace ramses::internal
class EffectDescriptionImpl
{
public:
- using SemanticsMap = HashMap;
-
EffectDescriptionImpl();
~EffectDescriptionImpl();
@@ -38,6 +35,7 @@ namespace ramses::internal
[[nodiscard]] bool setGeometryShaderFromFile(std::string_view shaderSourceFileName);
[[nodiscard]] bool addCompilerDefine(std::string_view define);
[[nodiscard]] bool setUniformSemantic(std::string_view semanticName, EEffectUniformSemantic semanticType);
+ [[nodiscard]] bool setUniformSemantic(uint32_t uniformBufferBinding, EEffectUniformSemantic semanticType);
[[nodiscard]] bool setAttributeSemantic(std::string_view semanticName, EEffectAttributeSemantic semanticType);
[[nodiscard]] const char* getVertexShader() const;
@@ -52,6 +50,7 @@ namespace ramses::internal
private:
[[nodiscard]] bool setSemantic(std::string_view semanticName, EFixedSemantics semanticType);
+ [[nodiscard]] bool setSemantic(uint32_t uniformBufferBinding, EFixedSemantics semanticType);
std::string m_vertexShaderSource;
std::string m_fragmentShaderSource;
diff --git a/src/client/impl/EffectImpl.cpp b/src/client/impl/EffectImpl.cpp
index adb317f00..751619bb3 100644
--- a/src/client/impl/EffectImpl.cpp
+++ b/src/client/impl/EffectImpl.cpp
@@ -10,6 +10,7 @@
#include "impl/EffectInputImpl.h"
#include "impl/SerializationContext.h"
#include "impl/RamsesClientImpl.h"
+#include "impl/RamsesFrameworkImpl.h"
#include "impl/EffectInputSemanticUtils.h"
#include "impl/ErrorReporting.h"
@@ -17,7 +18,6 @@
#include "internal/SceneGraph/Resource/IResource.h"
#include "internal/Components/ResourceHashUsage.h"
#include "internal/SceneGraph/Resource/EffectResource.h"
-#include "internal/PlatformAbstraction/Collections/StringOutputStream.h"
#include "fmt/format.h"
@@ -52,6 +52,8 @@ namespace ramses::internal
if (!ResourceImpl::serialize(outStream, serializationContext))
return false;
+ const bool serializeUBO = (getClientImpl().getFramework().getFeatureLevel() >= EFeatureLevel_02);
+
outStream << static_cast(m_effectUniformInputs.size());
for(const auto& input : m_effectUniformInputs)
{
@@ -59,6 +61,13 @@ namespace ramses::internal
outStream << static_cast(input.dataType);
outStream << static_cast(input.elementCount);
outStream << static_cast(input.semantics);
+
+ if (serializeUBO)
+ {
+ outStream << input.uniformBufferBinding.getValue();
+ outStream << input.uniformBufferFieldOffset.getValue();
+ outStream << input.uniformBufferFieldOffset.getValue();
+ }
}
outStream << static_cast(m_effectAttributeInputs.size());
@@ -80,6 +89,8 @@ namespace ramses::internal
if (!ResourceImpl::deserialize(inStream, serializationContext))
return false;
+ const bool deserializeUBO = (getClientImpl().getFramework().getFeatureLevel() >= EFeatureLevel_02);
+
uint32_t count = 0u;
inStream >> count;
m_effectUniformInputs.resize(count);
@@ -97,6 +108,19 @@ namespace ramses::internal
m_effectUniformInputs[i].dataType = static_cast(dataTypeAsUInt);
m_effectUniformInputs[i].elementCount = elementCount;
m_effectUniformInputs[i].semantics = static_cast(semanticAsUInt);
+
+ if (deserializeUBO)
+ {
+ uint32_t uniformBufferBindingAsUInt = 0;
+ inStream >> uniformBufferBindingAsUInt;
+ uint32_t uniformBufferElementSizeAsUInt = 0;
+ inStream >> uniformBufferElementSizeAsUInt;
+ uint32_t uniformBufferFieldOffsetAsUInt = 0;
+ inStream >> uniformBufferFieldOffsetAsUInt;
+ m_effectUniformInputs[i].uniformBufferBinding.getReference() = uniformBufferBindingAsUInt;
+ m_effectUniformInputs[i].uniformBufferElementSize.getReference() = uniformBufferElementSizeAsUInt;
+ m_effectUniformInputs[i].uniformBufferFieldOffset.getReference() = uniformBufferFieldOffsetAsUInt;
+ }
}
inStream >> count;
@@ -122,6 +146,9 @@ namespace ramses::internal
m_shaderWarnings.reset();
+ DataLayoutCreationHelper::SetDataFieldMappingForUniformInputs(m_effectUniformInputs);
+ DataLayoutCreationHelper::SetDataFieldMappingForAttributeInputs(m_effectAttributeInputs);
+
return true;
}
@@ -268,6 +295,21 @@ namespace ramses::internal
return input;
}
+ std::optional EffectImpl::findUniformInputAtBinding(uint32_t uniformBufferBinding) const
+ {
+ const size_t index = GetUniformBufferInputIndex(m_effectUniformInputs, UniformBufferBinding{ uniformBufferBinding });
+ if (index == InvalidInputIndex)
+ {
+ LOG_ERROR(CONTEXT_CLIENT, "Effect: findUniformInputAtBinding failed, uniform buffer with specified binding is not defined in effect!");
+ return std::nullopt;
+ }
+
+ UniformInput input;
+ initializeEffectInputData(*input.m_impl, m_effectUniformInputs[index], index);
+
+ return input;
+ }
+
const EffectInputInformationVector& EffectImpl::getUniformInputInformation() const
{
return m_effectUniformInputs;
@@ -293,6 +335,22 @@ namespace ramses::internal
return InvalidInputIndex;
}
+ size_t EffectImpl::GetUniformBufferInputIndex(const EffectInputInformationVector& effectInputVector, UniformBufferBinding uniformBufferBinding)
+ {
+ const size_t numInputs = effectInputVector.size();
+ for (size_t i = 0u; i < numInputs; ++i)
+ {
+ const EffectInputInformation& effectInputInfo = effectInputVector[i];
+ if (effectInputInfo.dataType == EDataType::UniformBuffer &&
+ effectInputInfo.uniformBufferBinding == uniformBufferBinding)
+ {
+ return i;
+ }
+ }
+
+ return InvalidInputIndex;
+ }
+
size_t EffectImpl::FindEffectInputIndex(const EffectInputInformationVector& effectInputVector, EFixedSemantics inputSemantics)
{
if (EFixedSemantics::Invalid == inputSemantics)
@@ -313,14 +371,7 @@ namespace ramses::internal
void EffectImpl::initializeEffectInputData(EffectInputImpl& effectInputImpl, const EffectInputInformation& effectInputInfo, size_t index) const
{
- effectInputImpl.initialize(
- getLowlevelResourceHash(),
- effectInputInfo.inputName,
- effectInputInfo.dataType,
- effectInputInfo.semantics,
- effectInputInfo.elementCount,
- index
- );
+ effectInputImpl.initialize(getLowlevelResourceHash(), effectInputInfo, index);
}
bool EffectImpl::hasGeometryShader() const
@@ -332,7 +383,7 @@ namespace ramses::internal
{
if (!hasGeometryShader())
{
- getErrorReporting().set((StringOutputStream() << "Effect::getGeometryShaderInputType: failed, effect '" << getName() << "' has no geometry shader attached to it!").c_str(), *this);
+ getErrorReporting().set(fmt::format("Effect::getGeometryShaderInputType: failed, effect '{}' has no geometry shader attached to it!", getName()), *this);
return false;
}
diff --git a/src/client/impl/EffectImpl.h b/src/client/impl/EffectImpl.h
index bd74c9593..07e62a6db 100644
--- a/src/client/impl/EffectImpl.h
+++ b/src/client/impl/EffectImpl.h
@@ -55,6 +55,7 @@ namespace ramses::internal
std::optional findAttributeInput(std::string_view inputName) const;
std::optional findUniformInput(EEffectUniformSemantic uniformSemantic) const;
std::optional findAttributeInput(EEffectAttributeSemantic attributeSemantic) const;
+ std::optional findUniformInputAtBinding(uint32_t uniformBufferBinding) const;
const EffectInputInformationVector& getUniformInputInformation() const;
const EffectInputInformationVector& getAttributeInputInformation() const;
@@ -64,6 +65,7 @@ namespace ramses::internal
static size_t GetEffectInputIndex(const EffectInputInformationVector& effectInputVector, std::string_view inputName);
static size_t FindEffectInputIndex(const EffectInputInformationVector& effectInputVector, EFixedSemantics inputSemantics);
+ static size_t GetUniformBufferInputIndex(const EffectInputInformationVector& effectInputVector, UniformBufferBinding uniformBufferBinding);
void initializeEffectInputData(EffectInputImpl& effectInputImpl, const EffectInputInformation& effectInputInfo, size_t index) const;
EffectInputInformationVector m_effectUniformInputs;
diff --git a/src/client/impl/EffectInputImpl.cpp b/src/client/impl/EffectInputImpl.cpp
index 9a175a64d..749820287 100644
--- a/src/client/impl/EffectInputImpl.cpp
+++ b/src/client/impl/EffectInputImpl.cpp
@@ -13,19 +13,10 @@
namespace ramses::internal
{
- void EffectInputImpl::initialize(
- const ResourceContentHash& effectHash,
- std::string_view name,
- ramses::internal::EDataType dataType,
- EFixedSemantics semantics,
- size_t elementCount,
- size_t index)
+ void EffectInputImpl::initialize(const ResourceContentHash& effectHash, const EffectInputInformation& inputInfo, size_t index)
{
m_effectHash = effectHash;
- m_name = name;
- m_dataType = dataType;
- m_semantics = semantics;
- m_elementCount = elementCount;
+ m_inputInfo = inputInfo;
m_inputIndex = index;
}
@@ -36,27 +27,27 @@ namespace ramses::internal
const std::string& EffectInputImpl::getName() const
{
- return m_name;
+ return m_inputInfo.inputName;
}
ramses::EDataType EffectInputImpl::getDataType() const
{
- return DataTypeUtils::ConvertDataTypeFromInternal(m_dataType);
+ return DataTypeUtils::ConvertDataTypeFromInternal(m_inputInfo.dataType);
}
ramses::internal::EDataType EffectInputImpl::getInternalDataType() const
{
- return m_dataType;
+ return m_inputInfo.dataType;
}
EFixedSemantics EffectInputImpl::getSemantics() const
{
- return m_semantics;
+ return m_inputInfo.semantics;
}
size_t EffectInputImpl::getElementCount() const
{
- return m_elementCount;
+ return m_inputInfo.elementCount;
}
size_t EffectInputImpl::getInputIndex() const
@@ -66,11 +57,26 @@ namespace ramses::internal
EEffectUniformSemantic EffectInputImpl::getUniformSemantics() const
{
- return EffectInputSemanticUtils::GetEffectUniformSemanticFromInternal(m_semantics);
+ return EffectInputSemanticUtils::GetEffectUniformSemanticFromInternal(m_inputInfo.semantics);
}
EEffectAttributeSemantic EffectInputImpl::getAttributeSemantics() const
{
- return EffectInputSemanticUtils::GetEffectAttributeSemanticFromInternal(m_semantics);
+ return EffectInputSemanticUtils::GetEffectAttributeSemanticFromInternal(m_inputInfo.semantics);
+ }
+
+ UniformBufferBinding EffectInputImpl::getUniformBufferBinding() const
+ {
+ return m_inputInfo.uniformBufferBinding;
+ }
+
+ UniformBufferElementSize EffectInputImpl::getUniformBufferElementSize() const
+ {
+ return m_inputInfo.uniformBufferElementSize;
+ }
+
+ UniformBufferFieldOffset EffectInputImpl::getUniformBufferFieldOffset() const
+ {
+ return m_inputInfo.uniformBufferFieldOffset;
}
}
diff --git a/src/client/impl/EffectInputImpl.h b/src/client/impl/EffectInputImpl.h
index a898e4614..c7447bb6b 100644
--- a/src/client/impl/EffectInputImpl.h
+++ b/src/client/impl/EffectInputImpl.h
@@ -15,8 +15,8 @@
// framework
#include "internal/SceneGraph/SceneAPI/ResourceContentHash.h"
-#include "internal/SceneGraph/SceneAPI/EDataType.h"
-#include "internal/SceneGraph/SceneAPI/EFixedSemantics.h"
+#include "internal/SceneGraph/Resource/EffectInputInformation.h"
+#include "internal/SceneGraph/SceneAPI/SceneTypes.h"
#include
#include
@@ -28,13 +28,7 @@ namespace ramses::internal
public:
EffectInputImpl() = default;
- void initialize(
- const ResourceContentHash& effectHash,
- std::string_view name,
- ramses::internal::EDataType dataType,
- EFixedSemantics semantics,
- size_t elementCount,
- size_t index);
+ void initialize(const ResourceContentHash& effectHash, const EffectInputInformation& inputInfo, size_t index);
[[nodiscard]] ResourceContentHash getEffectHash() const;
[[nodiscard]] const std::string& getName() const;
@@ -42,17 +36,19 @@ namespace ramses::internal
[[nodiscard]] EFixedSemantics getSemantics() const;
[[nodiscard]] size_t getElementCount() const;
[[nodiscard]] size_t getInputIndex() const;
+ [[nodiscard]] UniformBufferBinding getUniformBufferBinding() const;
+ [[nodiscard]] UniformBufferFieldOffset getUniformBufferFieldOffset() const;
+ [[nodiscard]] UniformBufferElementSize getUniformBufferElementSize() const;
[[nodiscard]] ramses::EDataType getDataType() const;
[[nodiscard]] EEffectUniformSemantic getUniformSemantics() const;
[[nodiscard]] EEffectAttributeSemantic getAttributeSemantics() const;
+ [[nodiscard]] DataFieldHandle getDataFieldHandle() const { return m_inputInfo.dataFieldHandle; }
+
private:
ResourceContentHash m_effectHash{};
- std::string m_name;
- ramses::internal::EDataType m_dataType{ramses::internal::EDataType::Invalid};
- EFixedSemantics m_semantics{EFixedSemantics::Invalid};
- size_t m_elementCount{0u};
- size_t m_inputIndex{std::numeric_limits::max()};
+ EffectInputInformation m_inputInfo;
+ size_t m_inputIndex{ std::numeric_limits::max() };
};
}
diff --git a/src/client/impl/EffectInputSemanticUtils.h b/src/client/impl/EffectInputSemanticUtils.h
index 7fb1f7045..60e57bd6e 100644
--- a/src/client/impl/EffectInputSemanticUtils.h
+++ b/src/client/impl/EffectInputSemanticUtils.h
@@ -21,6 +21,16 @@ namespace ramses
{
switch (semanticType)
{
+ case EEffectUniformSemantic::ModelBlock:
+ return ramses::internal::EFixedSemantics::ModelBlock;
+ case EEffectUniformSemantic::CameraBlock:
+ return ramses::internal::EFixedSemantics::CameraBlock;
+ case EEffectUniformSemantic::ModelCameraBlock:
+ return ramses::internal::EFixedSemantics::ModelCameraBlock;
+ case EEffectUniformSemantic::FramebufferBlock:
+ return ramses::internal::EFixedSemantics::FramebufferBlock;
+ case EEffectUniformSemantic::SceneBlock:
+ return ramses::internal::EFixedSemantics::SceneBlock;
case EEffectUniformSemantic::ProjectionMatrix:
return ramses::internal::EFixedSemantics::ProjectionMatrix;
case EEffectUniformSemantic::ModelMatrix:
@@ -55,6 +65,16 @@ namespace ramses
{
switch (semanticType)
{
+ case ramses::internal::EFixedSemantics::ModelBlock:
+ return EEffectUniformSemantic::ModelBlock;
+ case ramses::internal::EFixedSemantics::CameraBlock:
+ return EEffectUniformSemantic::CameraBlock;
+ case ramses::internal::EFixedSemantics::ModelCameraBlock:
+ return EEffectUniformSemantic::ModelCameraBlock;
+ case ramses::internal::EFixedSemantics::FramebufferBlock:
+ return EEffectUniformSemantic::FramebufferBlock;
+ case ramses::internal::EFixedSemantics::SceneBlock:
+ return EEffectUniformSemantic::SceneBlock;
case ramses::internal::EFixedSemantics::ProjectionMatrix:
return EEffectUniformSemantic::ProjectionMatrix;
case ramses::internal::EFixedSemantics::ModelMatrix:
diff --git a/src/client/impl/GeometryImpl.cpp b/src/client/impl/GeometryImpl.cpp
index 5148307a8..c56388e9b 100644
--- a/src/client/impl/GeometryImpl.cpp
+++ b/src/client/impl/GeometryImpl.cpp
@@ -80,8 +80,8 @@ namespace ramses::internal
DeserializationContext::ReadDependentPointerAndStoreAsID(inStream, m_effectImpl);
- inStream >> m_attributeLayout;
- inStream >> m_attributeInstance;
+ serializationContext.deserializeAndMap(inStream, m_attributeLayout);
+ serializationContext.deserializeAndMap(inStream, m_attributeInstance);
inStream >> m_indicesCount;
serializationContext.addForDependencyResolve(this);
@@ -328,8 +328,7 @@ namespace ramses::internal
return false;
}
- // data field index on low level scene is indexed starting after reserved slot for indices
- const ramses::internal::DataFieldHandle dataField(static_cast(input.getInputIndex()) + IndicesDataFieldIndex + 1u);
+ const auto dataField(input.getDataFieldHandle());
getIScene().setDataResource(m_attributeInstance, dataField, bufferResource.getLowlevelResourceHash(), ramses::internal::DataBufferHandle::Invalid(), instancingDivisor, offset, stride);
return true;
@@ -370,8 +369,7 @@ namespace ramses::internal
return false;
}
- // data field index on low level scene is indexed starting after reserved slot for indices
- const ramses::internal::DataFieldHandle dataField(static_cast(input.getInputIndex()) + IndicesDataFieldIndex + 1u);
+ const auto dataField(input.getDataFieldHandle());
getIScene().setDataResource(m_attributeInstance, dataField, ramses::internal::ResourceContentHash::Invalid(), dataBufferHandle, instancingDivisor, offset, stride);
return true;
diff --git a/src/client/impl/MeshNodeImpl.cpp b/src/client/impl/MeshNodeImpl.cpp
index 5c7aa47a7..d79381993 100644
--- a/src/client/impl/MeshNodeImpl.cpp
+++ b/src/client/impl/MeshNodeImpl.cpp
@@ -8,6 +8,8 @@
// internal
#include "impl/MeshNodeImpl.h"
+#include "impl/RamsesClientImpl.h"
+#include "impl/RamsesFrameworkImpl.h"
// API
#include "ramses/client/Geometry.h"
@@ -43,22 +45,8 @@ namespace ramses::internal
return false;
outStream << m_renderableHandle;
- if (m_appearanceImpl != nullptr)
- {
- outStream << serializationContext.getIDForObject(m_appearanceImpl);
- }
- else
- {
- outStream << SerializationContext::GetObjectIDNull();
- }
- if (m_geometryImpl != nullptr)
- {
- outStream << serializationContext.getIDForObject(m_geometryImpl);
- }
- else
- {
- outStream << SerializationContext::GetObjectIDNull();
- }
+ outStream << (m_appearanceImpl ? serializationContext.getIDForObject(m_appearanceImpl) : SerializationContext::GetObjectIDNull());
+ outStream << (m_geometryImpl ? serializationContext.getIDForObject(m_geometryImpl) : SerializationContext::GetObjectIDNull());
return true;
}
@@ -68,7 +56,7 @@ namespace ramses::internal
if (!NodeImpl::deserialize(inStream, serializationContext))
return false;
- inStream >> m_renderableHandle;
+ serializationContext.deserializeAndMap(inStream, m_renderableHandle);
DeserializationContext::ReadDependentPointerAndStoreAsID(inStream, m_appearanceImpl);
DeserializationContext::ReadDependentPointerAndStoreAsID(inStream, m_geometryImpl);
@@ -127,6 +115,7 @@ namespace ramses::internal
void MeshNodeImpl::deinitializeFrameworkData()
{
assert(m_renderableHandle.isValid());
+
getIScene().releaseRenderable(m_renderableHandle);
NodeImpl::deinitializeFrameworkData();
@@ -194,12 +183,11 @@ namespace ramses::internal
bool MeshNodeImpl::removeAppearanceAndGeometry()
{
m_appearanceImpl = nullptr;
-
getIScene().setRenderableUniformsDataInstanceAndState(m_renderableHandle, ramses::internal::DataInstanceHandle::Invalid(), ramses::internal::RenderStateHandle::Invalid());
m_geometryImpl = nullptr;
-
getIScene().setRenderableDataInstance(m_renderableHandle, ramses::internal::ERenderableDataSlotType_Geometry, ramses::internal::DataInstanceHandle::Invalid());
+
return setIndexCount(0u);
}
diff --git a/src/client/impl/MeshNodeImpl.h b/src/client/impl/MeshNodeImpl.h
index 4265df05e..2fc405a07 100644
--- a/src/client/impl/MeshNodeImpl.h
+++ b/src/client/impl/MeshNodeImpl.h
@@ -69,9 +69,9 @@ namespace ramses::internal
private:
static bool AreGeometryAndAppearanceCompatible(const GeometryImpl& geometry, const AppearanceImpl& appearance);
- ramses::internal::RenderableHandle m_renderableHandle;
+ RenderableHandle m_renderableHandle;
- const AppearanceImpl* m_appearanceImpl;
- const GeometryImpl* m_geometryImpl;
+ const AppearanceImpl* m_appearanceImpl;
+ const GeometryImpl* m_geometryImpl;
};
}
diff --git a/src/client/impl/NodeImpl.cpp b/src/client/impl/NodeImpl.cpp
index 20999fe67..d3637f6f5 100644
--- a/src/client/impl/NodeImpl.cpp
+++ b/src/client/impl/NodeImpl.cpp
@@ -44,9 +44,9 @@ namespace ramses::internal
if (!SceneObjectImpl::deserialize(inStream, serializationContext))
return false;
- inStream >> m_nodeHandle;
+ serializationContext.deserializeAndMap(inStream, m_nodeHandle);
inStream >> m_visibilityMode;
- inStream >> m_transformHandle;
+ serializationContext.deserializeAndMap(inStream, m_transformHandle);
serializationContext.addForDependencyResolve(this);
serializationContext.addNodeHandleToNodeImplMapping(m_nodeHandle, this);
diff --git a/src/client/impl/PickableObjectImpl.cpp b/src/client/impl/PickableObjectImpl.cpp
index 02f11b4d6..7c7c779d8 100644
--- a/src/client/impl/PickableObjectImpl.cpp
+++ b/src/client/impl/PickableObjectImpl.cpp
@@ -71,7 +71,7 @@ namespace ramses::internal
if (!NodeImpl::deserialize(inStream, serializationContext))
return false;
- inStream >> m_pickableObjectHandle;
+ serializationContext.deserializeAndMap(inStream, m_pickableObjectHandle);
DeserializationContext::ReadDependentPointerAndStoreAsID(inStream, m_geometryBufferImpl);
DeserializationContext::ReadDependentPointerAndStoreAsID(inStream, m_cameraImpl);
diff --git a/src/client/impl/RamsesClient.cpp b/src/client/impl/RamsesClient.cpp
index ff1b2fd95..289125c48 100644
--- a/src/client/impl/RamsesClient.cpp
+++ b/src/client/impl/RamsesClient.cpp
@@ -74,6 +74,28 @@ namespace ramses
return status;
}
+ bool RamsesClient::mergeSceneFromFile(Scene & scene, std::string_view fileName)
+ {
+ auto status = m_impl.mergeSceneFromFile(scene, fileName);
+ LOG_HL_CLIENT_API1(status, fileName);
+ return status;
+ }
+
+ // NOLINTNEXTLINE(modernize-avoid-c-arrays)
+ bool RamsesClient::mergeSceneFromMemory(Scene& scene, std::unique_ptr data, size_t size)
+ {
+ auto status = m_impl.mergeSceneFromMemory(scene, std::move(data), size);
+ LOG_HL_CLIENT_API1(status, size);
+ return status;
+ }
+
+ bool RamsesClient::mergeSceneFromFileDescriptor(Scene& scene, int fd, size_t offset, size_t length)
+ {
+ auto status = m_impl.mergeSceneFromFileDescriptor(scene, fd, offset, length);
+ LOG_HL_CLIENT_API3(status, fd, offset, length);
+ return status;
+ }
+
bool RamsesClient::GetFeatureLevelFromFile(std::string_view fileName, EFeatureLevel& detectedFeatureLevel)
{
const bool ret = internal::RamsesClientImpl::GetFeatureLevelFromFile(fileName, detectedFeatureLevel);
diff --git a/src/client/impl/RamsesClientImpl.cpp b/src/client/impl/RamsesClientImpl.cpp
index fee9e5c97..d172ae0a5 100644
--- a/src/client/impl/RamsesClientImpl.cpp
+++ b/src/client/impl/RamsesClientImpl.cpp
@@ -37,6 +37,7 @@
#include "internal/SceneGraph/Resource/IResource.h"
#include "internal/ClientCommands/PrintSceneList.h"
#include "internal/ClientCommands/FlushSceneVersion.h"
+#include "internal/ClientCommands/SetProperty.h"
#include "impl/SerializationContext.h"
#include "internal/Core/Utils/BinaryFileOutputStream.h"
#include "internal/Core/Utils/BinaryFileInputStream.h"
@@ -57,6 +58,8 @@
#include "internal/glslEffectBlock/GlslEffect.h"
#include "impl/EffectDescriptionImpl.h"
#include "impl/TextureUtils.h"
+#include "internal/SceneGraph/Scene/SceneActionApplier.h"
+#include "ramses/framework/EFeatureLevel.h"
#include
#include
@@ -76,11 +79,15 @@ namespace ramses::internal
m_appLogic.init(framework.getResourceComponent(), framework.getScenegraphComponent());
m_cmdPrintSceneList = std::make_shared(*this);
+ m_cmdSetProperty = std::make_shared(*this);
+ m_cmdSetPropertyAll = std::make_shared(*this);
m_cmdPrintValidation = std::make_shared(*this);
m_cmdFlushSceneVersion = std::make_shared(*this);
m_cmdDumpSceneToFile = std::make_shared(*this);
m_cmdLogResourceMemoryUsage = std::make_shared(*this);
framework.getRamsh().add(m_cmdPrintSceneList);
+ framework.getRamsh().add(m_cmdSetProperty);
+ framework.getRamsh().add(m_cmdSetPropertyAll);
framework.getRamsh().add(m_cmdPrintValidation);
framework.getRamsh().add(m_cmdFlushSceneVersion);
framework.getRamsh().add(m_cmdDumpSceneToFile);
@@ -91,8 +98,6 @@ namespace ramses::internal
RamsesClientImpl::~RamsesClientImpl()
{
LOG_INFO(CONTEXT_CLIENT, "RamsesClientImpl::~RamsesClientImpl");
- m_deleteSceneQueue.disableAcceptingTasksAfterExecutingCurrentQueue();
- m_loadFromFileTaskQueue.disableAcceptingTasksAfterExecutingCurrentQueue();
// delete async loaded scenes that were never collected via calling dispatchEvents
ramses::internal::PlatformGuard g(m_clientLock);
@@ -110,9 +115,11 @@ namespace ramses::internal
m_hlClient = hlClient;
}
-
void RamsesClientImpl::deinitializeFrameworkData()
{
+ LOG_INFO(CONTEXT_CLIENT, "RamsesClientImpl::deinitializeFrameworkData waiting for task queue to finish");
+ m_deleteSceneQueue.disableAcceptingTasksAfterExecutingCurrentQueue();
+ m_loadFromFileTaskQueue.disableAcceptingTasksAfterExecutingCurrentQueue();
}
const ramses::internal::ClientApplicationLogic& RamsesClientImpl::getClientApplication() const
@@ -133,12 +140,24 @@ namespace ramses::internal
return nullptr;
}
+ const auto featureLevel = getFramework().getFeatureLevel();
+ const bool vulkanCompatible = sceneConfig.getRenderBackendCompatibility() == ERenderBackendCompatibility::VulkanAndOpenGL;
+
+ if (vulkanCompatible && featureLevel < EFeatureLevel_02)
+ {
+ LOG_ERROR(CONTEXT_CLIENT, "RamsesClient::createScene: ERenderBackendCompatibility::VulkanAndOpenGL supported only with feature level 02 or higher");
+ return nullptr;
+ }
+
ramses::internal::PlatformGuard g(m_clientLock);
ramses::internal::SceneInfo sceneInfo;
sceneInfo.friendlyName = name;
sceneInfo.sceneID = ramses::internal::SceneId(sceneConfig.getSceneId().getValue());
+ sceneInfo.renderBackendCompatibility = sceneConfig.getRenderBackendCompatibility();
+ sceneInfo.vulkanAPIVersion = (vulkanCompatible ? TargetVulkanApiVersion : EVulkanAPIVersion::Invalid);
+ sceneInfo.spirvVersion = (vulkanCompatible ? TargetSPIRVVersion : ESPIRVVersion::Invalid);
- ramses::internal::ClientScene* internalScene = m_sceneFactory.createScene(sceneInfo);
+ ramses::internal::ClientScene* internalScene = m_sceneFactory.createScene(sceneInfo, featureLevel);
if (nullptr == internalScene)
{
return nullptr;
@@ -177,7 +196,7 @@ namespace ramses::internal
getClientApplication().removeScene(sceneID);
- scene.impl().closeSceneFile();
+ scene.impl().closeSceneFiles();
auto task = new DeleteSceneRunnable(std::move(sceneOwnPtr), std::move(llscene));
m_deleteSceneQueue.enqueue(*task);
task->release();
@@ -232,22 +251,21 @@ namespace ramses::internal
LOG_TRACE(CONTEXT_CLIENT, "RamsesClient::prepareSceneFromInputStream: start loading scene from input stream");
ramses::internal::SceneCreationInformation createInfo;
- ramses::internal::ScenePersistation::ReadSceneMetadataFromStream(inputStream, createInfo);
+ ramses::internal::ScenePersistation::ReadSceneMetadataFromStream(inputStream, createInfo, getFramework().getFeatureLevel());
if (config.getSceneId().isValid())
{
const auto newSceneId = ramses::internal::SceneId(config.getSceneId().getValue());
- LOG_INFO(CONTEXT_CLIENT, "RamsesClient::{}: Override stored scene id: {} with user provided scene id: {}", caller, createInfo.m_id, newSceneId);
- createInfo.m_id = newSceneId;
+ LOG_INFO(CONTEXT_CLIENT, "RamsesClient::{}: Override stored scene id: {} with user provided scene id: {}", caller, createInfo.m_sceneInfo.sceneID, newSceneId);
+ createInfo.m_sceneInfo.sceneID = newSceneId;
}
const ramses::internal::SceneSizeInformation& sizeInformation = createInfo.m_sizeInfo;
- const ramses::internal::SceneInfo sceneInfo(createInfo.m_id, createInfo.m_name);
LOG_DEBUG(CONTEXT_CLIENT, "RamsesClient::prepareSceneFromInputStream: scene to be loaded has {}", sizeInformation);
ramses::internal::ClientScene* internalScene = nullptr;
{
ramses::internal::PlatformGuard g(m_clientLock);
- internalScene = m_sceneFactory.createScene(sceneInfo);
+ internalScene = m_sceneFactory.createScene(createInfo.m_sceneInfo, getFramework().getFeatureLevel());
}
if (nullptr == internalScene)
{
@@ -258,18 +276,18 @@ namespace ramses::internal
// need first to create the pimpl, so that internal framework components know the new scene
if (config.getPublicationMode() == EScenePublicationMode::LocalOnly)
{
- LOG_INFO(CONTEXT_CLIENT, "RamsesClient::{}: Mark file loaded from {} with sceneId {} as local only", caller, filename, createInfo.m_id);
+ LOG_INFO(CONTEXT_CLIENT, "RamsesClient::{}: Mark file loaded from {} with sceneId {} as local only", caller, filename, createInfo.m_sceneInfo.sceneID);
}
else
{
- LOG_INFO(CONTEXT_CLIENT, "RamsesClient::{}: Mark file loaded from {} with sceneId {} as local and remote", caller, filename, createInfo.m_id);
+ LOG_INFO(CONTEXT_CLIENT, "RamsesClient::{}: Mark file loaded from {} with sceneId {} as local and remote", caller, filename, createInfo.m_sceneInfo.sceneID);
}
auto impl = std::make_unique(*internalScene, config, *m_hlClient);
// now the scene is registered, so it's possible to load the low level content into the scene
LOG_TRACE(CONTEXT_CLIENT, " Reading low level scene from stream");
- ramses::internal::ScenePersistation::ReadSceneFromStream(inputStream, *internalScene);
+ ramses::internal::ScenePersistation::ReadSceneFromStream(inputStream, *internalScene, getFramework().getFeatureLevel(), nullptr);
LOG_TRACE(CONTEXT_CLIENT, " Deserializing high level scene objects from stream");
DeserializationContext deserializationContext(config);
@@ -286,23 +304,106 @@ namespace ramses::internal
return SceneOwningPtr{ new ramses::Scene{ std::move(impl) }, [](ramses::Scene* s) { delete s; } };
}
+
+ bool RamsesClientImpl::mergeSceneObjectFromStream(::ramses::Scene & scene,
+ const std::string& caller,
+ std::string const& filename,
+ ramses::internal::IInputStream& inputStream,
+ const SceneConfigImpl& config)
+ {
+ LOG_TRACE(CONTEXT_CLIENT, "RamsesClient::prepareSceneFromInputStream: start merging scene from input stream");
+
+ if (getFramework().getFeatureLevel() < EFeatureLevel::EFeatureLevel_02)
+ {
+ LOG_ERROR(CONTEXT_CLIENT, "RamsesClient::mergeSceneObjectFromStream: Min feature level {} required for merging.", EFeatureLevel::EFeatureLevel_02);
+ return false;
+ }
+
+ ramses::internal::SceneCreationInformation createInfo;
+ ramses::internal::ScenePersistation::ReadSceneMetadataFromStream(inputStream, createInfo, getFramework().getFeatureLevel());
+ const ramses::internal::SceneSizeInformation& sizeInformation = createInfo.m_sizeInfo;
+
+ LOG_DEBUG(CONTEXT_CLIENT, "RamsesClient::prepareSceneFromInputStream: scene to be merged has {}", sizeInformation);
+
+ ramses::internal::ClientScene& internalScene = scene.m_impl.getIScene();
+ if (internalScene.getRenderBackendCompatibility() != createInfo.m_sceneInfo.renderBackendCompatibility
+ || internalScene.getVulkanAPIVersion() != createInfo.m_sceneInfo.vulkanAPIVersion
+ || internalScene.getSPIRVVersion() != createInfo.m_sceneInfo.spirvVersion)
+ {
+ LOG_ERROR(CONTEXT_CLIENT, "RamsesClient::mergeSceneObjectFromStream: Trying to merge scenes with incompatible render backends");
+ return false;
+ }
+
+ SceneMergeHandleMapping mapping;
+
+ LOG_TRACE(CONTEXT_CLIENT, " Reading low level scene from stream caller={} file={}", caller, filename);
+ ramses::internal::ScenePersistation::ReadSceneFromStream(inputStream, internalScene, getFramework().getFeatureLevel(), &mapping);
+
+ LOG_TRACE(CONTEXT_CLIENT, " Deserializing high level scene objects from stream");
+ DeserializationContext deserializationContext(config, &mapping);
+ SerializationHelper::DeserializeObjectID(inputStream);
+ if (!scene.m_impl.deserialize(inputStream, deserializationContext))
+ {
+ LOG_ERROR(CONTEXT_CLIENT, " Failed to deserialize high level scene:");
+ LOG_ERROR(CONTEXT_CLIENT, m_framework.getErrorReporting().getError().value_or(Issue{}).message);
+ return false;
+ }
+
+ LOG_TRACE(CONTEXT_CLIENT, " Done with preparing scene from input stream.");
+
+ return true;
+ }
+
SceneOwningPtr RamsesClientImpl::loadSceneFromCreationConfig(const SceneCreationConfig& cconfig)
+ {
+ SaveFileConfigImpl::ExporterVersion exporter;
+ std::vector sceneData;
+
+ if (!readInitialSceneInformation(cconfig, exporter, sceneData))
+ {
+ return {};
+ }
+
+ ramses::internal::IInputStream& inputStream = cconfig.streamContainer->getStream();
+
+ SceneOwningPtr scene;
+ if (cconfig.prefetchData)
+ {
+ ramses::internal::BinaryInputStream sceneDataStream(sceneData.data());
+ scene = loadSceneObjectFromStream(cconfig.caller, cconfig.dataSource, sceneDataStream, cconfig.config);
+ }
+ else
+ {
+ // this path will be used in the future when creating scene from user provided stream
+ scene = loadSceneObjectFromStream(cconfig.caller, cconfig.dataSource, inputStream, cconfig.config);
+ }
+ if (!scene)
+ {
+ LOG_ERROR(CONTEXT_CLIENT, "RamsesClient::{}: scene creation for '{}' failed", cconfig.caller, cconfig.dataSource);
+ return nullptr;
+ }
+
+ readAndRegisterResourceFile(inputStream, *scene, cconfig);
+
+ return scene;
+ }
+
+ bool RamsesClientImpl::readInitialSceneInformation(const SceneCreationConfig& cconfig, SaveFileConfigImpl::ExporterVersion& exporter, std::vector& sceneData)
{
// this stream contains scene data AND resource data and will be handed over to and held open by resource component as resource stream
ramses::internal::IInputStream& inputStream = cconfig.streamContainer->getStream();
if (inputStream.getState() != ramses::internal::EStatus::Ok)
{
LOG_ERROR(CONTEXT_CLIENT, "RamsesClient::{}: failed to open scene source {}", cconfig.caller, cconfig.dataSource);
- return nullptr;
+ return false;
}
if (!ReadRamsesVersionAndPrintWarningOnMismatch(inputStream, "scene file", getFramework().getFeatureLevel()))
{
LOG_ERROR(CONTEXT_CLIENT, "RamsesClient::{}: failed to read from scene source {}", cconfig.caller, cconfig.dataSource);
- return nullptr;
+ return false;
}
- SaveFileConfigImpl::ExporterVersion exporter;
std::string metadataString;
inputStream >> exporter;
inputStream >> metadataString;
@@ -315,42 +416,65 @@ namespace ramses::internal
inputStream >> sceneObjectStart;
inputStream >> llResourceStart;
- SceneOwningPtr scene;
if (cconfig.prefetchData)
{
- std::vector sceneData(static_cast(llResourceStart - sceneObjectStart));
+ sceneData.resize(static_cast(llResourceStart - sceneObjectStart));
inputStream.read(sceneData.data(), sceneData.size());
+ }
- if (inputStream.getState() != ramses::internal::EStatus::Ok)
- {
- LOG_ERROR(CONTEXT_CLIENT, "RamsesClient::{}: Failed reading scene from file: {} ", cconfig.caller, inputStream.getState());
- return nullptr;
- }
+ if (inputStream.getState() != ramses::internal::EStatus::Ok)
+ {
+ LOG_ERROR(CONTEXT_CLIENT, "RamsesClient::{}: Failed reading scene from file: {} ", cconfig.caller, inputStream.getState());
+ return false;
+ }
+
+ return true;
+ }
+
+ void RamsesClientImpl::readAndRegisterResourceFile(IInputStream& inputStream, ramses::Scene& scene, const SceneCreationConfig& cconfig)
+ {
+ // calls on m_appLogic are thread safe
+ // register stream for on-demand resource loading (LL-Resources)
+ ramses::internal::ResourceTableOfContents loadedTOC;
+ loadedTOC.readTOCPosAndTOCFromStream(inputStream);
+ const ramses::internal::SceneFileHandle fileHandle = m_appLogic.addResourceFile(cconfig.streamContainer, loadedTOC);
+ scene.m_impl.addSceneFileHandle(fileHandle);
+
+ LOG_INFO(CONTEXT_CLIENT, "RamsesClient::{}: Source '{}' has handle {}", cconfig.caller, cconfig.dataSource, fileHandle);
+ }
+
+ bool RamsesClientImpl::mergeSceneFromCreationConfig(::ramses::Scene& scene, const SceneCreationConfig& cconfig)
+ {
+ SaveFileConfigImpl::ExporterVersion exporter;
+ std::vector sceneData;
+ if (!readInitialSceneInformation(cconfig, exporter, sceneData))
+ {
+ return false;
+ }
+
+ ramses::internal::IInputStream& inputStream = cconfig.streamContainer->getStream();
+
+ bool success = true;
+ if (cconfig.prefetchData)
+ {
ramses::internal::BinaryInputStream sceneDataStream(sceneData.data());
- scene = loadSceneObjectFromStream(cconfig.caller, cconfig.dataSource, sceneDataStream, cconfig.config);
+ success = mergeSceneObjectFromStream(scene, cconfig.caller, cconfig.dataSource, sceneDataStream, cconfig.config);
}
else
{
// this path will be used in the future when creating scene from user provided stream
- scene = loadSceneObjectFromStream(cconfig.caller, cconfig.dataSource, inputStream, cconfig.config);
+ success = mergeSceneObjectFromStream(scene, cconfig.caller, cconfig.dataSource, inputStream, cconfig.config);
}
- if (!scene)
+ if (!success)
{
LOG_ERROR(CONTEXT_CLIENT, "RamsesClient::{}: scene creation for '{}' failed", cconfig.caller, cconfig.dataSource);
- return nullptr;
+ return false;
}
- // calls on m_appLogic are thread safe
- // register stream for on-demand resource loading (LL-Resources)
- ramses::internal::ResourceTableOfContents loadedTOC;
- loadedTOC.readTOCPosAndTOCFromStream(inputStream);
- const ramses::internal::SceneFileHandle fileHandle = m_appLogic.addResourceFile(cconfig.streamContainer, loadedTOC);
- scene->m_impl.setSceneFileHandle(fileHandle);
+ readAndRegisterResourceFile(inputStream, scene, cconfig);
- LOG_INFO(CONTEXT_CLIENT, "RamsesClient::{}: Source '{}' has handle {}", cconfig.caller, cconfig.dataSource, fileHandle);
-
- return scene;
+ return true;
}
ramses::Scene* RamsesClientImpl::loadSceneFromFile(std::string_view fileName, const SceneConfigImpl& config)
@@ -361,7 +485,7 @@ namespace ramses::internal
return nullptr;
}
- return loadSceneSynchonousCommon({
+ return loadSceneSynchronousCommon({
"loadSceneFromFile",
std::string{fileName},
std::make_shared(fileName), true, config
@@ -382,7 +506,7 @@ namespace ramses::internal
return nullptr;
}
- return loadSceneSynchonousCommon({
+ return loadSceneSynchronousCommon({
"loadSceneFromMemory",
fmt::format("", size),
std::make_shared(std::move(data)),
@@ -404,7 +528,7 @@ namespace ramses::internal
return nullptr;
}
- return loadSceneSynchonousCommon(SceneCreationConfig{
+ return loadSceneSynchronousCommon(SceneCreationConfig{
"loadSceneFromFileDescriptor",
fmt::format("", fd, offset, length),
std::make_shared(fd, offset, length),
@@ -413,7 +537,7 @@ namespace ramses::internal
});
}
- ramses::Scene* RamsesClientImpl::loadSceneSynchonousCommon(const SceneCreationConfig& cconfig)
+ ramses::Scene* RamsesClientImpl::loadSceneSynchronousCommon(const SceneCreationConfig& cconfig)
{
const uint64_t start = ramses::internal::PlatformTime::GetMillisecondsMonotonic();
auto scene = loadSceneFromCreationConfig(cconfig);
@@ -429,6 +553,86 @@ namespace ramses::internal
return scenePtr;
}
+ bool RamsesClientImpl::mergeSceneFromFile(ramses::Scene & scene, std::string_view fileName)
+ {
+ if (fileName.empty())
+ {
+ LOG_ERROR(CONTEXT_CLIENT, "RamsesClient::mergeSceneFromFile: filename may not be empty");
+ return false;
+ }
+
+ return mergeSceneSynchronousCommon(
+ scene,
+ {
+ "mergeSceneFromFile",
+ std::string{fileName},
+ std::make_shared(fileName), true, {}
+ });
+ }
+
+ // NOLINTNEXTLINE(modernize-avoid-c-arrays)
+ bool RamsesClientImpl::mergeSceneFromMemory(ramses::Scene& scene, std::unique_ptr data, size_t size)
+ {
+ if (!data)
+ {
+ LOG_ERROR(CONTEXT_CLIENT, "RamsesClient::mergeSceneFromMemory: data may not be null");
+ return false;
+ }
+ if (size == 0)
+ {
+ LOG_ERROR(CONTEXT_CLIENT, "RamsesClient::mergeSceneFromMemory: size may not be 0");
+ return false;
+ }
+
+ return mergeSceneSynchronousCommon(
+ scene,
+ {
+ "mergeSceneFromMemory",
+ fmt::format("", size),
+ std::make_shared(std::move(data)),
+ false,
+ {}
+ });
+ }
+
+ bool RamsesClientImpl::mergeSceneFromFileDescriptor(ramses::Scene& scene, int fd, size_t offset, size_t length)
+ {
+ if (fd <= 0)
+ {
+ LOG_ERROR(CONTEXT_CLIENT, "RamsesClient::mergeSceneFromFileDescriptor: filedescriptor must be valid {}", fd);
+ return false;
+ }
+ if (length == 0)
+ {
+ LOG_ERROR(CONTEXT_CLIENT, "RamsesClient::mergeSceneFromFileDescriptor: length may not be 0");
+ return false;
+ }
+
+ return mergeSceneSynchronousCommon(
+ scene,
+ SceneCreationConfig{
+ "mergeSceneFromFileDescriptor",
+ fmt::format("", fd, offset, length),
+ std::make_shared(fd, offset, length),
+ true,
+ {}
+ });
+ }
+
+ bool RamsesClientImpl::mergeSceneSynchronousCommon(ramses::Scene& scene, const SceneCreationConfig& cconfig)
+ {
+ const uint64_t start = ramses::internal::PlatformTime::GetMillisecondsMonotonic();
+ if (!mergeSceneFromCreationConfig(scene, cconfig))
+ {
+ return false;
+ }
+
+ const uint64_t end = ramses::internal::PlatformTime::GetMillisecondsMonotonic();
+ LOG_INFO(CONTEXT_CLIENT, "RamsesClient::{} ramses::Scene merged from '{}' in {} ms", cconfig.caller, cconfig.dataSource, end - start);
+
+ return true;
+ }
+
void RamsesClientImpl::finalizeLoadedScene(SceneOwningPtr scene)
{
// add to the known list of scenes
@@ -488,9 +692,9 @@ namespace ramses::internal
}
LOG_INFO(CONTEXT_CLIENT, "RAMSES version in file '{}': [{}]; GitHash: [{}]; FeatureLevel: [{}];", verboseFileName, readVersion.versionString, readVersion.gitHash, featureLevelFromFile);
- if (!ramses::internal::RamsesVersion::MatchesMajorMinor(::ramses_sdk::RAMSES_SDK_PROJECT_VERSION_MAJOR_INT, ::ramses_sdk::RAMSES_SDK_PROJECT_VERSION_MINOR_INT, readVersion))
+ if (::ramses_sdk::RAMSES_SDK_PROJECT_VERSION_MAJOR_INT != readVersion.major)
{
- LOG_ERROR(CONTEXT_CLIENT, "RamsesClient::ReadRamsesVersionAndPrintWarningOnMismatch: Version of file {} does not match MAJOR.MINOR of this build. Cannot load the file.", verboseFileName);
+ LOG_ERROR(CONTEXT_CLIENT, "RamsesClient::ReadRamsesVersionAndPrintWarningOnMismatch: Version of file {} does not match MAJOR of this build. Cannot load the file.", verboseFileName);
LOG_ERROR(CONTEXT_CLIENT, "SDK version of loader: [{}]; GitHash: [{}]", ::ramses_sdk::RAMSES_SDK_RAMSES_VERSION, ::ramses_sdk::RAMSES_SDK_GIT_COMMIT_HASH);
return false;
}
@@ -797,19 +1001,20 @@ namespace ramses::internal
const std::vector& mipLevelData, bool generateMipChain,
const TextureSwizzle& swizzle, std::string_view name);
- ramses::internal::ManagedResource RamsesClientImpl::createManagedEffect(const EffectDescription& effectDesc, std::string_view name, std::string& errorMessages)
+ ramses::internal::ManagedResource RamsesClientImpl::createManagedEffect(const EffectDescription& effectDesc, ERenderBackendCompatibility compatibility, std::string_view name, std::string& errorMessages)
{
//create effect using vertex and fragment shaders
ramses::internal::GlslEffect effectBlock(effectDesc.getVertexShader(), effectDesc.getFragmentShader(), effectDesc.getGeometryShader(), effectDesc.impl().getCompilerDefines(),
- effectDesc.impl().getSemanticsMap(), name);
+ effectDesc.impl().getSemanticsMap(), compatibility, name);
errorMessages.clear();
- ramses::internal::EffectResource* effectResource = effectBlock.createEffectResource();
+ auto effectResource = effectBlock.createEffectResource(getFramework().getFeatureLevel());
if (!effectResource)
{
errorMessages = effectBlock.getEffectErrorMessages();
- LOG_ERROR(CONTEXT_CLIENT, "RamsesClient::createEffect Failed to create effect resource (name: '{}') :\n {}", name, effectBlock.getEffectErrorMessages());
+ LOG_ERROR(CONTEXT_CLIENT, "RamsesClient::createEffect: Failed to create effect resource (name: '{}') :\n {}", name, effectBlock.getEffectErrorMessages());
return {};
}
- return manageResource(effectResource);
+
+ return manageResource(effectResource.release());
}
}
diff --git a/src/client/impl/RamsesClientImpl.h b/src/client/impl/RamsesClientImpl.h
index ea432594d..935e3bcaa 100644
--- a/src/client/impl/RamsesClientImpl.h
+++ b/src/client/impl/RamsesClientImpl.h
@@ -35,9 +35,11 @@
#include "internal/Core/TaskFramework/EnqueueOnlyOneAtATimeQueue.h"
#include "internal/Core/TaskFramework/TaskForwardingQueue.h"
#include "internal/PlatformAbstraction/Collections/HashMap.h"
+#include "internal/glslEffectBlock/GlslangInitializer.h"
#include "impl/RamsesFrameworkTypesImpl.h"
#include "impl/SceneImpl.h"
#include "impl/SceneConfigImpl.h"
+#include "impl/SaveFileConfigImpl.h"
#include
#include
@@ -58,6 +60,8 @@ namespace ramses::internal
{
class IInputStream;
class PrintSceneList;
+ class SetProperty;
+ class SetPropertyAll;
class FlushSceneVersion;
class BinaryFileOutputStream;
class BinaryFileInputStream;
@@ -107,6 +111,11 @@ namespace ramses::internal
bool loadSceneFromFileAsync(std::string_view fileName, const SceneConfigImpl& config);
+ bool mergeSceneFromFile(ramses::Scene& scene, std::string_view fileName);
+ // NOLINTNEXTLINE(modernize-avoid-c-arrays)
+ bool mergeSceneFromMemory(ramses::Scene& scene, std::unique_ptr data, size_t size);
+ bool mergeSceneFromFileDescriptor(ramses::Scene& scene, int fd, size_t offset, size_t length);
+
bool dispatchEvents(IClientEventHandler& clientEventHandler);
const SceneVector& getListOfScenes() const;
@@ -135,7 +144,7 @@ namespace ramses::internal
ramses::internal::ManagedResource createManagedArrayResource(size_t numElements, ramses::EDataType type, const void* arrayData, std::string_view name);
template
ramses::internal::ManagedResource createManagedTexture(ramses::internal::EResourceType textureType, uint32_t width, uint32_t height, uint32_t depth, ETextureFormat format, const std::vector& mipLevelData, bool generateMipChain, const TextureSwizzle& swizzle, std::string_view name);
- ramses::internal::ManagedResource createManagedEffect(const EffectDescription& effectDesc, std::string_view name, std::string& errorMessages);
+ ramses::internal::ManagedResource createManagedEffect(const EffectDescription& effectDesc, ERenderBackendCompatibility compatibility, std::string_view name, std::string& errorMessages);
void writeLowLevelResourcesToStream(const ResourceObjects& resources, ramses::internal::IOutputStream& resourceOutputStream, bool compress) const;
static bool ReadRamsesVersionAndPrintWarningOnMismatch(ramses::internal::IInputStream& inputStream, std::string_view verboseFileName, EFeatureLevel featureLevel);
@@ -144,6 +153,10 @@ namespace ramses::internal
static bool GetFeatureLevelFromFile(int fd, size_t offset, size_t length, EFeatureLevel& detectedFeatureLevel);
private:
+ // This make sure that glslang init/deinit is called maximum once per client to reduce overhead
+ // i.e., since init/deinit internally get called in glslang only when ref-count is Zero
+ GlslangInitializer m_glslangInitializer;
+
struct SceneCreationConfig
{
std::string caller;
@@ -185,12 +198,22 @@ namespace ramses::internal
ramses::internal::ManagedResource manageResource(const ramses::internal::IResource* res);
- Scene* loadSceneSynchonousCommon(const SceneCreationConfig& cconf);
+ Scene* loadSceneSynchronousCommon(const SceneCreationConfig& cconf);
SceneOwningPtr loadSceneFromCreationConfig(const SceneCreationConfig& cconf);
SceneOwningPtr loadSceneObjectFromStream(const std::string& caller,
std::string const& filename,
ramses::internal::IInputStream& inputStream, const SceneConfigImpl& config);
void finalizeLoadedScene(SceneOwningPtr scene);
+ bool readInitialSceneInformation(const SceneCreationConfig& cconfig, SaveFileConfigImpl::ExporterVersion& exporter, std::vector& sceneData);
+ void readAndRegisterResourceFile(IInputStream& inputStream, ramses::Scene& scene, const SceneCreationConfig& cconfig);
+
+ bool mergeSceneSynchronousCommon(ramses::Scene& scene, const SceneCreationConfig& cconfig);
+ bool mergeSceneFromCreationConfig(ramses::Scene& scene, const SceneCreationConfig& cconfig);
+ bool mergeSceneObjectFromStream(ramses::Scene& scene,
+ const std::string& caller,
+ std::string const& filename,
+ ramses::internal::IInputStream& inputStream,
+ const SceneConfigImpl& config);
void validateScenes(ValidationReportImpl& report) const;
@@ -203,6 +226,8 @@ namespace ramses::internal
SceneVector m_scenes;
std::shared_ptr m_cmdPrintSceneList;
+ std::shared_ptr m_cmdSetProperty;
+ std::shared_ptr m_cmdSetPropertyAll;
std::shared_ptr m_cmdPrintValidation;
std::shared_ptr m_cmdFlushSceneVersion;
std::shared_ptr m_cmdDumpSceneToFile;
diff --git a/src/client/impl/RamsesClientTypesImpl.h b/src/client/impl/RamsesClientTypesImpl.h
index 4f6e74466..87c15f3e0 100644
--- a/src/client/impl/RamsesClientTypesImpl.h
+++ b/src/client/impl/RamsesClientTypesImpl.h
@@ -54,7 +54,8 @@ namespace ramses
"TextureSampler3D",
"TextureSamplerCube",
"TextureSamplerExternal",
+ "UniformBuffer",
};
}
-MAKE_ENUM_CLASS_PRINTABLE(ramses::EDataType, "EDataType", ramses::DataTypeNames, ramses::EDataType::TextureSamplerExternal);
+MAKE_ENUM_CLASS_PRINTABLE(ramses::EDataType, "EDataType", ramses::DataTypeNames, ramses::EDataType::UniformBuffer);
diff --git a/src/client/impl/RenderBufferImpl.cpp b/src/client/impl/RenderBufferImpl.cpp
index 552dd53f0..a7253055c 100644
--- a/src/client/impl/RenderBufferImpl.cpp
+++ b/src/client/impl/RenderBufferImpl.cpp
@@ -10,6 +10,7 @@
#include "impl/TextureUtils.h"
#include "impl/TextureEnumsImpl.h"
#include "impl/ErrorReporting.h"
+#include "impl/SerializationContext.h"
#include "internal/SceneGraph/Scene/ClientScene.h"
namespace ramses::internal
@@ -80,7 +81,7 @@ namespace ramses::internal
if (!SceneObjectImpl::deserialize(inStream, serializationContext))
return false;
- inStream >> m_renderBufferHandle;
+ serializationContext.deserializeAndMap(inStream, m_renderBufferHandle);
return true;
}
@@ -103,6 +104,7 @@ namespace ramses::internal
}
bool usedInRenderPass = false;
+ bool renderPassEnabled = false;
ramses::internal::RenderTargetHandle rtHandle;
for (ramses::internal::RenderTargetHandle rt(0u); rt < iscene.getRenderTargetCount() && !rtHandle.isValid(); ++rt)
{
@@ -122,10 +124,18 @@ namespace ramses::internal
{
for (ramses::internal::RenderPassHandle rp(0u); rp < iscene.getRenderPassCount(); ++rp)
{
- if (iscene.isRenderPassAllocated(rp) && iscene.getRenderPass(rp).renderTarget == rtHandle && iscene.getRenderPass(rp).isEnabled)
+ if (iscene.isRenderPassAllocated(rp))
{
- usedInRenderPass = true;
- break;
+ auto& renderPass = iscene.getRenderPass(rp);
+ if (renderPass.renderTarget == rtHandle)
+ {
+ usedInRenderPass = true;
+ if (renderPass.isEnabled)
+ {
+ renderPassEnabled = true;
+ break;
+ }
+ }
}
}
}
@@ -153,35 +163,30 @@ namespace ramses::internal
}
}
- bool hasIssue = false;
- // explicitly warn about usage of potentially uninitialized buffer
- if (usedAsTexture && !(usedInRenderPass || usedAsBlitDestination))
+ if (!usedInRenderPass && !usedAsBlitDestination)
{
- report.add(EIssueType::Warning,
- "RenderBuffer is used in a TextureSampler for reading but is not set as destination in any RenderPass or BlitPass, this can lead to usage of "
+ if (usedAsBlitSource || usedAsTexture)
+ {
+ // explicitly warn about usage of potentially uninitialized buffer
+ report.add(EIssueType::Warning,
+ "RenderBuffer is used in a TextureSampler or BlitPass for reading, but is not set as destination in any RenderPass or BlitPass. This can lead to usage of "
"uninitialized data.", &getRamsesObject());
- hasIssue = true;
+ }
+ else
+ {
+ report.add(EIssueType::Warning, "RenderBuffer is not set as destination in any RenderPass or BlitPass, destroy it if not needed.", &getRamsesObject());
+ }
}
- if (!usedInRenderPass && !usedAsBlitDestination)
+ if ((usedAsBlitSource || usedAsTexture) && usedInRenderPass && !renderPassEnabled && !usedAsBlitDestination)
{
- hasIssue = true;
- report.add(EIssueType::Warning, "RenderBuffer is not set as destination in any RenderPass or BlitPass, destroy it if not needed.", &getRamsesObject());
+ report.add(EIssueType::Warning, "RenderBuffer is used in a TextureSampler or BlitPass for reading, but assigned RenderPass is not enabled. This can lead to usage of uninitialized data.", &getRamsesObject());
}
if (!usedAsTexture && !usedAsBlitSource && isColorBuffer) // depth/stencil buffer does not need to be validated for usage as texture
{
- hasIssue = true;
report.add(EIssueType::Warning, "RenderBuffer is neither used in a TextureSampler for reading nor set as source in a BlitPass, destroy it if not needed.", &getRamsesObject());
}
-
- if (hasIssue)
- {
- ramses::internal::StringOutputStream rbDesc;
- const ramses::internal::RenderBuffer& rb = getIScene().getRenderBuffer(m_renderBufferHandle);
- rbDesc << " [" << rb.width << "x" << rb.height << "; " << ramses::internal::EnumToString(rb.format) << "; " << EnumToString(rb.accessMode) << "; " << rb.sampleCount << " samples]";
- return report.add(EIssueType::Warning, rbDesc.release(), &getRamsesObject());
- }
}
bool RenderBufferImpl::setProperties(uint32_t width, uint32_t height, uint32_t sampleCount)
diff --git a/src/client/impl/RenderGroupImpl.cpp b/src/client/impl/RenderGroupImpl.cpp
index dc4282791..4e50ce64e 100644
--- a/src/client/impl/RenderGroupImpl.cpp
+++ b/src/client/impl/RenderGroupImpl.cpp
@@ -74,7 +74,7 @@ namespace ramses::internal
if (!SceneObjectImpl::deserialize(inStream, serializationContext))
return false;
- inStream >> m_renderGroupHandle;
+ serializationContext.deserializeAndMap(inStream, m_renderGroupHandle);
deserializeObjects(inStream, serializationContext, m_meshes);
deserializeObjects(inStream, serializationContext, m_renderGroups);
@@ -106,9 +106,6 @@ namespace ramses::internal
{
SceneObjectImpl::onValidate(report);
- if (m_meshes.empty() && m_renderGroups.empty())
- report.add(EIssueType::Warning, "rendergroup does not contain any meshes", &getRamsesObject());
-
for (const auto& element : m_meshes)
report.addDependentObject(*this, *element);
diff --git a/src/client/impl/RenderPassImpl.cpp b/src/client/impl/RenderPassImpl.cpp
index 02d37d708..644c9bb84 100644
--- a/src/client/impl/RenderPassImpl.cpp
+++ b/src/client/impl/RenderPassImpl.cpp
@@ -73,7 +73,7 @@ namespace ramses::internal
if (!SceneObjectImpl::deserialize(inStream, serializationContext))
return false;
- inStream >> m_renderPassHandle;
+ serializationContext.deserializeAndMap(inStream, m_renderPassHandle);
DeserializationContext::ReadDependentPointerAndStoreAsID(inStream, m_cameraImpl);
DeserializationContext::ReadDependentPointerAndStoreAsID(inStream, m_renderTargetImpl);
diff --git a/src/client/impl/RenderTargetImpl.cpp b/src/client/impl/RenderTargetImpl.cpp
index 96496db8c..57cab4efe 100644
--- a/src/client/impl/RenderTargetImpl.cpp
+++ b/src/client/impl/RenderTargetImpl.cpp
@@ -8,6 +8,7 @@
#include "impl/RenderTargetImpl.h"
#include "impl/RenderTargetDescriptionImpl.h"
+#include "impl/SerializationContext.h"
#include "internal/SceneGraph/Scene/ClientScene.h"
namespace ramses::internal
@@ -86,7 +87,7 @@ namespace ramses::internal
if (!SceneObjectImpl::deserialize(inStream, serializationContext))
return false;
- inStream >> m_renderTargetHandle;
+ serializationContext.deserializeAndMap(inStream, m_renderTargetHandle);
return true;
}
diff --git a/src/client/impl/ResourceImpl.cpp b/src/client/impl/ResourceImpl.cpp
index b333809e3..8619a0226 100644
--- a/src/client/impl/ResourceImpl.cpp
+++ b/src/client/impl/ResourceImpl.cpp
@@ -17,7 +17,6 @@
#include "internal/ClientApplicationLogic.h"
#include "internal/Components/ManagedResource.h"
-#include "internal/PlatformAbstraction/Collections/StringOutputStream.h"
#include "internal/Core/Utils/BinaryOutputStream.h"
#include "impl/RamsesObjectTypeUtils.h"
#include "city.h"
diff --git a/src/client/impl/SceneConfig.cpp b/src/client/impl/SceneConfig.cpp
index bd469d234..181b94e3a 100644
--- a/src/client/impl/SceneConfig.cpp
+++ b/src/client/impl/SceneConfig.cpp
@@ -20,11 +20,12 @@ namespace ramses
{
}
- SceneConfig::SceneConfig(sceneId_t sceneId, EScenePublicationMode publicationMode)
+ SceneConfig::SceneConfig(sceneId_t sceneId, EScenePublicationMode publicationMode, ERenderBackendCompatibility renderBackendCompatibility)
: m_impl{ std::make_unique() }
{
m_impl->setSceneId(sceneId);
m_impl->setPublicationMode(publicationMode);
+ m_impl->setRenderBackendCompatibility(renderBackendCompatibility);
}
SceneConfig::~SceneConfig() = default;
@@ -71,4 +72,10 @@ namespace ramses
m_impl->setMemoryVerificationEnabled(enabled);
LOG_HL_CLIENT_API1(true, enabled);
}
+
+ void SceneConfig::setRenderBackendCompatibility(ERenderBackendCompatibility renderBackendCompatibility)
+ {
+ m_impl->setRenderBackendCompatibility(renderBackendCompatibility);
+ LOG_HL_CLIENT_API1(true, renderBackendCompatibility);
+ }
}
diff --git a/src/client/impl/SceneConfigImpl.cpp b/src/client/impl/SceneConfigImpl.cpp
index edd76efc4..3873f7e58 100644
--- a/src/client/impl/SceneConfigImpl.cpp
+++ b/src/client/impl/SceneConfigImpl.cpp
@@ -39,4 +39,14 @@ namespace ramses::internal
{
return m_memoryVerificationEnabled;
}
+
+ void SceneConfigImpl::setRenderBackendCompatibility(ERenderBackendCompatibility renderBackendCompatibility)
+ {
+ m_renderBackendCompatibility = renderBackendCompatibility;
+ }
+
+ ERenderBackendCompatibility SceneConfigImpl::getRenderBackendCompatibility() const
+ {
+ return m_renderBackendCompatibility;
+ }
}
diff --git a/src/client/impl/SceneConfigImpl.h b/src/client/impl/SceneConfigImpl.h
index b115ba70d..4245237ba 100644
--- a/src/client/impl/SceneConfigImpl.h
+++ b/src/client/impl/SceneConfigImpl.h
@@ -10,6 +10,7 @@
#include "ramses/framework/RamsesFrameworkTypes.h"
#include "ramses/framework/EScenePublicationMode.h"
+#include "ramses/framework/ERenderBackendCompatibility.h"
namespace ramses::internal
{
@@ -19,14 +20,17 @@ namespace ramses::internal
void setPublicationMode(EScenePublicationMode publicationMode);
void setMemoryVerificationEnabled(bool enabled);
void setSceneId(sceneId_t sceneId);
+ void setRenderBackendCompatibility(ERenderBackendCompatibility renderBackendCompatibility);
[[nodiscard]] EScenePublicationMode getPublicationMode() const;
[[nodiscard]] bool getMemoryVerificationEnabled() const;
[[nodiscard]] sceneId_t getSceneId() const;
+ [[nodiscard]] ERenderBackendCompatibility getRenderBackendCompatibility() const;
private:
EScenePublicationMode m_publicationMode = EScenePublicationMode::LocalOnly;
sceneId_t m_sceneId;
bool m_memoryVerificationEnabled = true;
+ ERenderBackendCompatibility m_renderBackendCompatibility = ERenderBackendCompatibility::OpenGL;
};
}
diff --git a/src/client/impl/SceneFactory.cpp b/src/client/impl/SceneFactory.cpp
index 28f41af2c..d984d7f29 100644
--- a/src/client/impl/SceneFactory.cpp
+++ b/src/client/impl/SceneFactory.cpp
@@ -12,7 +12,7 @@
namespace ramses::internal
{
- ClientScene* SceneFactory::createScene(const SceneInfo& sceneInfo)
+ ClientScene* SceneFactory::createScene(const SceneInfo& sceneInfo, EFeatureLevel featureLevel)
{
if (m_scenes.count(sceneInfo.sceneID) != 0)
{
@@ -20,7 +20,7 @@ namespace ramses::internal
return nullptr;
}
- auto newScene = std::make_unique(sceneInfo);
+ auto newScene = std::make_unique(sceneInfo, featureLevel);
auto* newScenePtr = newScene.get();
m_scenes.insert({ newScene->getSceneId(), std::move(newScene) });
diff --git a/src/client/impl/SceneFactory.h b/src/client/impl/SceneFactory.h
index c3e0b18b2..a8bc9f689 100644
--- a/src/client/impl/SceneFactory.h
+++ b/src/client/impl/SceneFactory.h
@@ -9,6 +9,7 @@
#pragma once
#include "internal/SceneGraph/SceneAPI/IScene.h"
+#include "ramses/framework/EFeatureLevel.h"
#include
namespace ramses::internal
@@ -19,7 +20,7 @@ namespace ramses::internal
class SceneFactory
{
public:
- ClientScene* createScene(const SceneInfo& sceneInfo);
+ ClientScene* createScene(const SceneInfo& sceneInfo, EFeatureLevel featureLevel);
InternalSceneOwningPtr releaseScene(SceneId id);
private:
diff --git a/src/client/impl/SceneImpl.cpp b/src/client/impl/SceneImpl.cpp
index 0f842ca0c..70414f5a8 100644
--- a/src/client/impl/SceneImpl.cpp
+++ b/src/client/impl/SceneImpl.cpp
@@ -44,6 +44,13 @@
#include "ramses/client/ramses-utils.h"
#include "ramses/client/logic/LogicEngine.h"
#include "ramses/client/logic/LogicObject.h"
+#include "ramses/client/logic/AppearanceBinding.h"
+#include "ramses/client/logic/CameraBinding.h"
+#include "ramses/client/logic/MeshNodeBinding.h"
+#include "ramses/client/logic/NodeBinding.h"
+#include "ramses/client/logic/RenderBufferBinding.h"
+#include "ramses/client/logic/RenderGroupBinding.h"
+#include "ramses/client/logic/RenderPassBinding.h"
#include "ramses/framework/EScenePublicationMode.h"
#include "impl/CameraNodeImpl.h"
@@ -80,6 +87,13 @@
#include "impl/SaveFileConfigImpl.h"
#include "impl/logic/LogicObjectImpl.h"
#include "impl/SerializationContext.h"
+#include "impl/logic/AppearanceBindingImpl.h"
+#include "impl/logic/CameraBindingImpl.h"
+#include "impl/logic/MeshNodeBindingImpl.h"
+#include "impl/logic/NodeBindingImpl.h"
+#include "impl/logic/RenderBufferBindingImpl.h"
+#include "impl/logic/RenderGroupBindingImpl.h"
+#include "impl/logic/RenderPassBindingImpl.h"
#include "internal/SceneGraph/Scene/Scene.h"
#include "internal/SceneGraph/Scene/ScenePersistation.h"
@@ -103,8 +117,10 @@
#include "ramses-sdk-build-config.h"
#include "fmt/format.h"
+#include
#include
#include
+#include
namespace ramses::internal
{
@@ -124,7 +140,7 @@ namespace ramses::internal
SceneImpl::~SceneImpl()
{
LOG_INFO(CONTEXT_CLIENT, "SceneImpl::~SceneImpl");
- closeSceneFile();
+ closeSceneFiles();
getClientImpl().getFramework().getPeriodicLogger().removeStatisticCollectionScene(m_scene.getSceneId());
}
@@ -214,7 +230,7 @@ namespace ramses::internal
{
uint32_t count = 0u;
const ERamsesObjectType type = SerializationHelper::DeserializeObjectTypeAndCount(inStream, count);
- assert(m_objectRegistry.getNumberOfObjects(type) == 0u);
+ assert(serializationContext.getSceneMergeHandleMapping() || m_objectRegistry.getNumberOfObjects(type) == 0u);
m_objectRegistry.reserveAdditionalObjectCapacity(type, count);
objectCounts[i] = count;
@@ -313,7 +329,12 @@ namespace ramses::internal
return false;
}
- inStream >> m_lastSceneObjectId.getReference();
+ sceneObjectId_t lastSceneObjectId;
+ inStream >> lastSceneObjectId.getReference();
+ if (!serializationContext.getSceneMergeHandleMapping())
+ {
+ m_lastSceneObjectId = lastSceneObjectId;
+ }
LOG_DEBUG_F(CONTEXT_PROFILING, ([&](ramses::internal::StringOutputStream& sos) {
sos << "SceneImpl::deserialize: HL scene object counts for SceneID " << m_scene.getSceneId() << "\n";
@@ -329,8 +350,68 @@ namespace ramses::internal
return serializationContext.resolveDependencies();
}
+ bool SceneImpl::ValidateLogicBindingReferencesTo(const SceneObject* obj, const std::vector& lengines)
+ {
+ auto countBindingsIn = [obj](const auto& collections) {
+ size_t count = 0;
+ for (const auto* binding : collections)
+ {
+ if (binding->impl().getBoundObject().getSceneObjectId() == obj->getSceneObjectId())
+ count++;
+ }
+ return count;
+ };
+
+ std::unordered_map counts;
+ for (const auto* le : lengines)
+ {
+ switch (obj->getType())
+ {
+ case ERamsesObjectType::Appearance:
+ counts[ERamsesObjectType::Appearance] += countBindingsIn(le->getCollection());
+ break;
+ case ERamsesObjectType::Camera:
+ case ERamsesObjectType::PerspectiveCamera:
+ case ERamsesObjectType::OrthographicCamera:
+ counts[ERamsesObjectType::Camera] += countBindingsIn(le->getCollection());
+ counts[ERamsesObjectType::Node] += countBindingsIn(le->getCollection());
+ break;
+ case ERamsesObjectType::MeshNode:
+ counts[ERamsesObjectType::MeshNode] += countBindingsIn(le->getCollection());
+ counts[ERamsesObjectType::Node] += countBindingsIn(le->getCollection());
+ break;
+ case ERamsesObjectType::Node:
+ counts[ERamsesObjectType::Node] += countBindingsIn(le->getCollection());
+ break;
+ case ERamsesObjectType::RenderBuffer:
+ counts[ERamsesObjectType::RenderBuffer] += countBindingsIn(le->getCollection());
+ break;
+ case ERamsesObjectType::RenderGroup:
+ counts[ERamsesObjectType::RenderGroup] += countBindingsIn(le->getCollection());
+ break;
+ case ERamsesObjectType::RenderPass:
+ counts[ERamsesObjectType::RenderPass] += countBindingsIn(le->getCollection());
+ break;
+ default:
+ break;
+ }
+ }
+
+ for (const auto& count : counts)
+ {
+ if (count.second > 1)
+ return false;
+ }
+ return true;
+ }
+
void SceneImpl::onValidate(ValidationReportImpl& report) const
{
+ std::vector lengines;
+ SceneObjectRegistryIterator lengineIter(getObjectRegistry(), ERamsesObjectType::LogicEngine);
+ while (const auto* obj = lengineIter.getNext())
+ lengines.push_back(obj->as());
+
for (size_t i = 0u; i < RamsesObjectTypeCount; ++i)
{
const auto type = static_cast(i);
@@ -341,6 +422,8 @@ namespace ramses::internal
while (const auto* obj = iter.getNext())
{
obj->impl().validate(report);
+ if (!ValidateLogicBindingReferencesTo(obj, lengines))
+ report.add(EIssueType::Error, "Multiple logic bindings reference this object, this will lead to one overwriting values from the other", obj);
}
}
}
@@ -607,12 +690,12 @@ namespace ramses::internal
{
if (isPublished())
{
- getErrorReporting().set((ramses::internal::StringOutputStream() << "Scene(" << m_scene.getSceneId() << ")::publish: ignored, scene is already published").c_str(), *this);
+ getErrorReporting().set(fmt::format("Scene({})::publish: ignored, scene is already published", m_scene.getSceneId()), *this);
return false;
}
if (requestedPublicationMode == EScenePublicationMode::LocalAndRemote && m_futurePublicationMode == EScenePublicationMode::LocalOnly)
{
- getErrorReporting().set((ramses::internal::StringOutputStream() << "Scene(" << m_scene.getSceneId() << ")::publish: Enabled local only optimisations from SceneConfig, cannot remote publish later").c_str(), *this);
+ getErrorReporting().set(fmt::format("Scene({})::publish: Enabled local only optimisations from SceneConfig, cannot remote publish later", m_scene.getSceneId()), *this);
return false;
}
if (requestedPublicationMode != EScenePublicationMode::LocalOnly && !getClientImpl().getFramework().isConnected())
@@ -627,7 +710,7 @@ namespace ramses::internal
{
if (!isPublished())
{
- getErrorReporting().set((ramses::internal::StringOutputStream() << "Scene(" << m_scene.getSceneId() << ")::unpublish ignored, scene is not published.").c_str(), *this);
+ getErrorReporting().set(fmt::format("Scene({})::unpublish ignored, scene is not published.", m_scene.getSceneId()), *this);
return false;
}
@@ -1758,7 +1841,8 @@ namespace ramses::internal
Effect* SceneImpl::createEffect(const EffectDescription& effectDesc, std::string_view name)
{
- ramses::internal::ManagedResource res = getClientImpl().createManagedEffect(effectDesc, name, m_effectErrorMessages);
+ const auto compatibility = getIScene().getRenderBackendCompatibility();
+ ramses::internal::ManagedResource res = getClientImpl().createManagedEffect(effectDesc, compatibility, name, m_effectErrorMessages);
if (!res)
{
LOG_ERROR(CONTEXT_CLIENT, "Scene::createEffect: failed to create managed effect resource: {}", m_effectErrorMessages);
@@ -1817,8 +1901,8 @@ namespace ramses::internal
bool SceneImpl::writeSceneObjectsToStream(ramses::internal::IOutputStream& outputStream, const SaveFileConfigImpl& saveConfig) const
{
- ramses::internal::ScenePersistation::WriteSceneMetadataToStream(outputStream, getIScene());
- ramses::internal::ScenePersistation::WriteSceneToStream(outputStream, getIScene());
+ ramses::internal::ScenePersistation::WriteSceneMetadataToStream(outputStream, getIScene(), m_hlClient.impl().getFramework().getFeatureLevel());
+ ramses::internal::ScenePersistation::WriteSceneToStream(outputStream, getIScene(), m_hlClient.impl().getFramework().getFeatureLevel());
SerializationContext serializationContext{saveConfig};
return serialize(outputStream, serializationContext);
@@ -1914,24 +1998,29 @@ namespace ramses::internal
return true;
}
- void SceneImpl::setSceneFileHandle(ramses::internal::SceneFileHandle handle)
+ void SceneImpl::addSceneFileHandle(ramses::internal::SceneFileHandle handle)
{
- m_sceneFileHandle = handle;
+ assert(handle.isValid());
+ if (std::find(m_sceneFileHandles.begin(), m_sceneFileHandles.end(), handle) == m_sceneFileHandles.end())
+ {
+ m_sceneFileHandles.push_back(handle);
+ }
}
- void SceneImpl::closeSceneFile()
+ void SceneImpl::closeSceneFiles()
{
- if (!m_sceneFileHandle.isValid())
- return;
-
- getClientImpl().getClientApplication().removeResourceFile(m_sceneFileHandle);
- LOG_INFO(CONTEXT_CLIENT, "SceneImpl::closeSceneFile closed: {}", m_sceneFileHandle);
- m_sceneFileHandle = ramses::internal::SceneFileHandle::Invalid();
+ for (const auto& sceneFileHandle: m_sceneFileHandles)
+ {
+ assert(sceneFileHandle.isValid());
+ getClientImpl().getClientApplication().removeResourceFile(sceneFileHandle);
+ LOG_INFO(CONTEXT_CLIENT, "SceneImpl::closeSceneFiles closed: {}", sceneFileHandle);
+ }
+ m_sceneFileHandles.clear();
}
- ramses::internal::SceneFileHandle SceneImpl::getSceneFileHandle() const
+ const std::vector& SceneImpl::getSceneFileHandles() const
{
- return m_sceneFileHandle;
+ return m_sceneFileHandles;
}
bool SceneImpl::removeResourceWithIdFromResources(resourceId_t const& id, Resource& resource)
diff --git a/src/client/impl/SceneImpl.h b/src/client/impl/SceneImpl.h
index a978b5ca4..cb746a894 100644
--- a/src/client/impl/SceneImpl.h
+++ b/src/client/impl/SceneImpl.h
@@ -39,6 +39,7 @@
#include "impl/RamsesFrameworkTypesImpl.h"
#include
+#include
#include
#include
@@ -252,9 +253,9 @@ namespace ramses::internal
template
bool createAndDeserializeObjectImpls(ramses::internal::IInputStream& inStream, DeserializationContext& serializationContext, uint32_t count);
- void setSceneFileHandle(ramses::internal::SceneFileHandle handle);
- void closeSceneFile();
- ramses::internal::SceneFileHandle getSceneFileHandle() const;
+ void addSceneFileHandle(ramses::internal::SceneFileHandle handle);
+ void closeSceneFiles();
+ const std::vector& getSceneFileHandles() const;
void updateResourceId(resourceId_t const& oldId, Resource& resourceWithNewId);
@@ -313,6 +314,9 @@ namespace ramses::internal
bool removeResourceWithIdFromResources(resourceId_t const& id, Resource& resource);
+ // Validate logic bindings only. Return true for objects that are not logic bindings
+ static bool ValidateLogicBindingReferencesTo(const SceneObject* obj, const std::vector& lengines);
+
ramses::internal::ClientScene& m_scene;
ramses::internal::SceneCommandBuffer m_commandBuffer;
sceneVersionTag_t m_nextSceneVersion;
@@ -334,7 +338,7 @@ namespace ramses::internal
std::string m_effectErrorMessages;
- ramses::internal::SceneFileHandle m_sceneFileHandle;
+ std::vector m_sceneFileHandles;
bool m_sendEffectTimeSync = false;
};
diff --git a/src/client/impl/SceneObjectImpl.cpp b/src/client/impl/SceneObjectImpl.cpp
index 9685429ad..0c05bf2e4 100644
--- a/src/client/impl/SceneObjectImpl.cpp
+++ b/src/client/impl/SceneObjectImpl.cpp
@@ -67,13 +67,27 @@ namespace ramses::internal
bool SceneObjectImpl::deserialize(ramses::internal::IInputStream& inStream, DeserializationContext& serializationContext)
{
if (!RamsesObjectImpl::deserialize(inStream, serializationContext))
- return true;
+ return false;
sceneObjectId_t id;
inStream >> id.getReference();
- if (id.isValid())
+ if (!id.isValid())
+ {
+ LOG_ERROR(CONTEXT_CLIENT, "Fatal: deserialized invalid scene object ID.");
+ return false;
+ }
+
+ auto* mapping = serializationContext.getSceneMergeHandleMapping();
+ if (mapping)
+ {
+ mapping->addMapping(id, m_sceneObjectId);
+ // we keep the generated id
+ }
+ else
+ {
m_sceneObjectId = std::move(id);
+ }
return true;
}
diff --git a/src/client/impl/SceneReferenceImpl.cpp b/src/client/impl/SceneReferenceImpl.cpp
index eaf21623e..1de6dda25 100644
--- a/src/client/impl/SceneReferenceImpl.cpp
+++ b/src/client/impl/SceneReferenceImpl.cpp
@@ -14,6 +14,7 @@
#include "impl/SceneObjectImpl.h"
#include "impl/SceneImpl.h"
#include "impl/ErrorReporting.h"
+#include "impl/SerializationContext.h"
namespace ramses::internal
{
@@ -47,7 +48,7 @@ namespace ramses::internal
if (!SceneObjectImpl::deserialize(inStream, serializationContext))
return false;
- inStream >> m_sceneReferenceHandle;
+ serializationContext.deserializeAndMap(inStream, m_sceneReferenceHandle);
return true;
}
diff --git a/src/client/impl/Texture2DBufferImpl.cpp b/src/client/impl/Texture2DBufferImpl.cpp
index 5c6f1b7e6..bdb43692d 100644
--- a/src/client/impl/Texture2DBufferImpl.cpp
+++ b/src/client/impl/Texture2DBufferImpl.cpp
@@ -55,7 +55,7 @@ namespace ramses::internal
if (!SceneObjectImpl::deserialize(inStream, serializationContext))
return false;
- inStream >> m_textureBufferHandle;
+ serializationContext.deserializeAndMap(inStream, m_textureBufferHandle);
return true;
}
diff --git a/src/client/impl/TextureSamplerImpl.cpp b/src/client/impl/TextureSamplerImpl.cpp
index 3bc911ff2..5b80792f3 100644
--- a/src/client/impl/TextureSamplerImpl.cpp
+++ b/src/client/impl/TextureSamplerImpl.cpp
@@ -24,6 +24,7 @@
#include "impl/TextureUtils.h"
#include "impl/SceneObjectRegistryIterator.h"
#include "impl/ErrorReporting.h"
+#include "impl/SerializationContext.h"
#include "internal/SceneGraph/Scene/ClientScene.h"
#include "internal/DataSlotUtils.h"
@@ -230,7 +231,7 @@ namespace ramses::internal
inStream >> value;
m_textureType = static_cast(value);
- inStream >> m_textureSamplerHandle;
+ serializationContext.deserializeAndMap(inStream, m_textureSamplerHandle);
return true;
}
diff --git a/src/client/impl/UniformInput.cpp b/src/client/impl/UniformInput.cpp
index 7d0ea96a0..18735b865 100644
--- a/src/client/impl/UniformInput.cpp
+++ b/src/client/impl/UniformInput.cpp
@@ -35,4 +35,13 @@ namespace ramses
{
return m_impl->getElementCount();
}
+
+ std::optional UniformInput::getUniformBufferBinding() const
+ {
+ const auto uboBinding = m_impl->getUniformBufferBinding();
+ if (uboBinding.isValid())
+ return uboBinding.getValue();
+
+ return std::nullopt;
+ }
}
diff --git a/src/client/impl/logic/AppearanceBindingImpl.cpp b/src/client/impl/logic/AppearanceBindingImpl.cpp
index 5155ca3b3..cb28bec65 100644
--- a/src/client/impl/logic/AppearanceBindingImpl.cpp
+++ b/src/client/impl/logic/AppearanceBindingImpl.cpp
@@ -27,7 +27,7 @@
namespace ramses::internal
{
AppearanceBindingImpl::AppearanceBindingImpl(SceneImpl& scene, ramses::Appearance& ramsesAppearance, std::string_view name, sceneObjectId_t id)
- : RamsesBindingImpl{ scene, name, id }
+ : RamsesBindingImpl{ scene, name, id, ramsesAppearance }
, m_ramsesAppearance(ramsesAppearance)
{
const auto& effect = m_ramsesAppearance.get().getEffect();
diff --git a/src/client/impl/logic/CameraBindingImpl.cpp b/src/client/impl/logic/CameraBindingImpl.cpp
index f399e2e81..1924412b3 100644
--- a/src/client/impl/logic/CameraBindingImpl.cpp
+++ b/src/client/impl/logic/CameraBindingImpl.cpp
@@ -27,7 +27,7 @@
namespace ramses::internal
{
CameraBindingImpl::CameraBindingImpl(SceneImpl& scene, ramses::Camera& ramsesCamera, bool withFrustumPlanes, std::string_view name, sceneObjectId_t id)
- : RamsesBindingImpl{ scene, name, id }
+ : RamsesBindingImpl{ scene, name, id, ramsesCamera }
, m_ramsesCamera(ramsesCamera)
, m_hasFrustumPlanesProperties{ ramsesCamera.isOfType(ramses::ERamsesObjectType::OrthographicCamera) || withFrustumPlanes }
{
diff --git a/src/client/impl/logic/LogicEngineImpl.cpp b/src/client/impl/logic/LogicEngineImpl.cpp
index 8609fa916..d65091726 100644
--- a/src/client/impl/logic/LogicEngineImpl.cpp
+++ b/src/client/impl/logic/LogicEngineImpl.cpp
@@ -436,7 +436,11 @@ namespace ramses::internal
// force dirty all timer nodes, anchor points and skinbindings
setNodeToBeAlwaysUpdatedDirty();
- const bool success = updateNodes(*sortedNodes);
+ bool success = updateNodes(*sortedNodes);
+
+ // update skin bindings only if updating the other nodes succeeded
+ if (success)
+ success = updateSkinBindings();
if (m_statisticsEnabled || m_updateReportEnabled)
{
@@ -455,7 +459,8 @@ namespace ramses::internal
{
LogicNodeImpl& node = *nodeIter;
- if (!node.isDirty())
+ // skip also processing of SkinBindings, since they will be processed after updating everything else
+ if (!node.isDirty() || dynamic_cast(&node))
{
if (m_updateReportEnabled)
m_updateReport.nodeSkippedExecution(node);
@@ -464,33 +469,50 @@ namespace ramses::internal
continue;
}
- if (m_updateReportEnabled)
- m_updateReport.nodeExecutionStarted(node);
- if (m_statisticsEnabled)
- m_statistics.nodeExecuted();
+ if (!updateNode(node))
+ return false;
+ }
- const std::optional potentialError = node.update();
- if (potentialError)
- {
- getErrorReporting().set(potentialError->message, &node.getLogicObject());
+ return true;
+ }
+
+ bool LogicEngineImpl::updateSkinBindings()
+ {
+ for (SkinBinding* skinBinding : m_apiObjects->getApiObjectContainer()) {
+ if (!updateNode(skinBinding->impl())) {
return false;
}
+ }
+ return true;
+ }
- Property* outputs = node.getOutputs();
- if (outputs != nullptr)
- {
- const size_t activatedLinks = activateLinksRecursive(outputs->impl());
+ bool LogicEngineImpl::updateNode(LogicNodeImpl& node)
+ {
+ if (m_updateReportEnabled)
+ m_updateReport.nodeExecutionStarted(node);
+ if (m_statisticsEnabled)
+ m_statistics.nodeExecuted();
- if (m_statisticsEnabled || m_updateReportEnabled)
- m_updateReport.linksActivated(activatedLinks);
- }
+ const std::optional potentialError = node.update();
+ if (potentialError)
+ {
+ getErrorReporting().set(potentialError->message, &node.getLogicObject());
+ return false;
+ }
- if (m_updateReportEnabled)
- m_updateReport.nodeExecutionFinished();
+ Property* outputs = node.getOutputs();
+ if (outputs != nullptr)
+ {
+ const size_t activatedLinks = activateLinksRecursive(outputs->impl());
- node.setDirty(false);
+ if (m_statisticsEnabled || m_updateReportEnabled)
+ m_updateReport.linksActivated(activatedLinks);
}
+ if (m_updateReportEnabled)
+ m_updateReport.nodeExecutionFinished();
+ node.setDirty(false);
+
return true;
}
@@ -502,9 +524,6 @@ namespace ramses::internal
// force anchor points dirty because they depend on set of ramses states which cannot be monitored
for (AnchorPoint* anchorPoint : m_apiObjects->getApiObjectContainer())
anchorPoint->impl().setDirty(true);
- // force skinbindings dirty because they depend on set of ramses states which cannot be monitored
- for (SkinBinding* skinBinding : m_apiObjects->getApiObjectContainer())
- skinBinding->impl().setDirty(true);
}
void LogicEngineImpl::onValidate(ValidationReportImpl& report) const
@@ -516,7 +535,7 @@ namespace ramses::internal
m_apiObjects->validateDanglingNodes(report);
}
- bool LogicEngineImpl::loadFromByteData(const void* byteData, size_t byteSize, bool enableMemoryVerification, const std::string& dataSourceDescription)
+ bool LogicEngineImpl::loadFromByteData(const void* byteData, size_t byteSize, bool enableMemoryVerification, const std::string& dataSourceDescription, const SceneMergeHandleMapping* mapping)
{
if (byteSize < 8)
{
@@ -553,7 +572,7 @@ namespace ramses::internal
return false;
}
- RamsesObjectResolver ramsesResolver{ getErrorReporting(), getSceneImpl() };
+ RamsesObjectResolver ramsesResolver{ getErrorReporting(), getSceneImpl(), mapping };
std::unique_ptr deserializedObjects = ApiObjects::Deserialize(getSceneImpl(), *logicEngine->apiObjects(), ramsesResolver, dataSourceDescription, getErrorReporting(), m_featureLevel);
if (!deserializedObjects)
@@ -701,7 +720,7 @@ namespace ramses::internal
bool LogicEngineImpl::resolveDeserializationDependencies(DeserializationContext& serializationContext)
{
const bool enableMemoryVerification = serializationContext.getLoadConfig().getMemoryVerificationEnabled();
- if (!loadFromByteData(m_byteBuffer.data(), m_byteBuffer.size(), enableMemoryVerification, fmt::format("data buffer '{}' (size: {})", m_byteBuffer.data(), m_byteBuffer.size())))
+ if (!loadFromByteData(m_byteBuffer.data(), m_byteBuffer.size(), enableMemoryVerification, fmt::format("data buffer '{}' (size: {})", m_byteBuffer.data(), m_byteBuffer.size()), serializationContext.getSceneMergeHandleMapping()))
return false;
std::vector().swap(m_byteBuffer);
diff --git a/src/client/impl/logic/LogicEngineImpl.h b/src/client/impl/logic/LogicEngineImpl.h
index 3c59859a6..9fd1180df 100644
--- a/src/client/impl/logic/LogicEngineImpl.h
+++ b/src/client/impl/logic/LogicEngineImpl.h
@@ -9,6 +9,7 @@
#pragma once
#include "impl/SceneObjectImpl.h"
+#include "internal/SceneGraph/Scene/SceneMergeHandleMapping.h"
#include "ramses/client/logic/AnimationTypes.h"
#include "ramses/client/logic/LogicEngine.h"
#include "ramses/client/logic/LogicEngineReport.h"
@@ -70,6 +71,7 @@ namespace ramses::internal
class RamsesBindingImpl;
class ValidationReportImpl;
class ApiObjects;
+ class SceneMergeHandleMapping;
class LogicEngineImpl : public SceneObjectImpl
{
@@ -141,7 +143,10 @@ namespace ramses::internal
[[nodiscard]] bool updateNodes(const NodeVector& nodes);
- [[nodiscard]] bool loadFromByteData(const void* byteData, size_t byteSize, bool enableMemoryVerification, const std::string& dataSourceDescription);
+ [[nodiscard]] bool updateSkinBindings();
+ [[nodiscard]] bool updateNode(LogicNodeImpl& node);
+
+ [[nodiscard]] bool loadFromByteData(const void* byteData, size_t byteSize, bool enableMemoryVerification, const std::string& dataSourceDescription, const SceneMergeHandleMapping* mapping);
EFeatureLevel m_featureLevel;
diff --git a/src/client/impl/logic/MeshNodeBindingImpl.cpp b/src/client/impl/logic/MeshNodeBindingImpl.cpp
index d35c1201f..2e552914e 100644
--- a/src/client/impl/logic/MeshNodeBindingImpl.cpp
+++ b/src/client/impl/logic/MeshNodeBindingImpl.cpp
@@ -19,7 +19,7 @@
namespace ramses::internal
{
MeshNodeBindingImpl::MeshNodeBindingImpl(SceneImpl& scene, ramses::MeshNode& ramsesMeshNode, std::string_view name, sceneObjectId_t id)
- : RamsesBindingImpl{ scene, name, id }
+ : RamsesBindingImpl{ scene, name, id, ramsesMeshNode }
, m_ramsesMeshNode{ ramsesMeshNode }
{
}
diff --git a/src/client/impl/logic/NodeBindingImpl.cpp b/src/client/impl/logic/NodeBindingImpl.cpp
index 4edc146a2..c5751ce4c 100644
--- a/src/client/impl/logic/NodeBindingImpl.cpp
+++ b/src/client/impl/logic/NodeBindingImpl.cpp
@@ -24,7 +24,7 @@
namespace ramses::internal
{
NodeBindingImpl::NodeBindingImpl(SceneImpl& scene, ramses::Node& ramsesNode, ramses::ERotationType rotationType, std::string_view name, sceneObjectId_t id)
- : RamsesBindingImpl{ scene, name, id }
+ : RamsesBindingImpl{ scene, name, id, ramsesNode }
, m_ramsesNode{ ramsesNode }
, m_rotationType{ rotationType }
{
diff --git a/src/client/impl/logic/RamsesBindingImpl.cpp b/src/client/impl/logic/RamsesBindingImpl.cpp
index 5eb3ad622..e81816ef2 100644
--- a/src/client/impl/logic/RamsesBindingImpl.cpp
+++ b/src/client/impl/logic/RamsesBindingImpl.cpp
@@ -15,8 +15,9 @@
namespace ramses::internal
{
- RamsesBindingImpl::RamsesBindingImpl(SceneImpl& scene, std::string_view name, sceneObjectId_t id) noexcept
+ RamsesBindingImpl::RamsesBindingImpl(SceneImpl& scene, std::string_view name, sceneObjectId_t id, SceneObject& boundObject) noexcept
: LogicNodeImpl{ scene, name, id }
+ , m_boundObject{ boundObject }
{
// Bindings are not supposed to do anything unless user set an actual value to them
// Thus, they are not dirty by default!
@@ -37,6 +38,11 @@ namespace ramses::internal
return ramsesRef;
}
+ const SceneObject& RamsesBindingImpl::getBoundObject() const
+ {
+ return m_boundObject;
+ }
+
void RamsesBindingImpl::setRootInputs(std::unique_ptr rootInputs)
{
setRootProperties(std::move(rootInputs), {});
diff --git a/src/client/impl/logic/RamsesBindingImpl.h b/src/client/impl/logic/RamsesBindingImpl.h
index c8f4fa5f1..bb07d49b3 100644
--- a/src/client/impl/logic/RamsesBindingImpl.h
+++ b/src/client/impl/logic/RamsesBindingImpl.h
@@ -32,7 +32,9 @@ namespace ramses::internal
class RamsesBindingImpl : public LogicNodeImpl
{
public:
- explicit RamsesBindingImpl(SceneImpl& scene, std::string_view name, sceneObjectId_t id) noexcept;
+ explicit RamsesBindingImpl(SceneImpl& scene, std::string_view name, sceneObjectId_t id, SceneObject& boundObject) noexcept;
+
+ [[nodiscard]] const SceneObject& getBoundObject() const;
protected:
// Used by subclasses to handle serialization
@@ -40,6 +42,8 @@ namespace ramses::internal
void setRootInputs(std::unique_ptr rootInputs);
+ std::reference_wrapper m_boundObject;
+
private:
using LogicNodeImpl::setRootProperties;
};
diff --git a/src/client/impl/logic/RenderBufferBindingImpl.cpp b/src/client/impl/logic/RenderBufferBindingImpl.cpp
index 3277313e4..3e2332c3a 100644
--- a/src/client/impl/logic/RenderBufferBindingImpl.cpp
+++ b/src/client/impl/logic/RenderBufferBindingImpl.cpp
@@ -20,7 +20,7 @@
namespace ramses::internal
{
RenderBufferBindingImpl::RenderBufferBindingImpl(SceneImpl& scene, ramses::RenderBuffer& renderBuffer, std::string_view name, sceneObjectId_t id)
- : RamsesBindingImpl{ scene, name, id }
+ : RamsesBindingImpl{ scene, name, id, renderBuffer }
, m_renderBuffer{ renderBuffer }
{
}
diff --git a/src/client/impl/logic/RenderGroupBindingImpl.cpp b/src/client/impl/logic/RenderGroupBindingImpl.cpp
index 248d27d5e..df1933bf0 100644
--- a/src/client/impl/logic/RenderGroupBindingImpl.cpp
+++ b/src/client/impl/logic/RenderGroupBindingImpl.cpp
@@ -20,7 +20,7 @@
namespace ramses::internal
{
RenderGroupBindingImpl::RenderGroupBindingImpl(SceneImpl& scene, ramses::RenderGroup& ramsesRenderGroup, const RenderGroupBindingElementsImpl& elements, std::string_view name, sceneObjectId_t id)
- : RamsesBindingImpl{ scene, name, id }
+ : RamsesBindingImpl{ scene, name, id, ramsesRenderGroup }
, m_ramsesRenderGroup{ ramsesRenderGroup }
, m_elements{ elements.getElements() }
{
diff --git a/src/client/impl/logic/RenderPassBindingImpl.cpp b/src/client/impl/logic/RenderPassBindingImpl.cpp
index 9caafba34..7f4f1e5a8 100644
--- a/src/client/impl/logic/RenderPassBindingImpl.cpp
+++ b/src/client/impl/logic/RenderPassBindingImpl.cpp
@@ -22,7 +22,7 @@
namespace ramses::internal
{
RenderPassBindingImpl::RenderPassBindingImpl(SceneImpl& scene, ramses::RenderPass& ramsesRenderPass, std::string_view name, sceneObjectId_t id)
- : RamsesBindingImpl{ scene, name, id }
+ : RamsesBindingImpl{ scene, name, id, ramsesRenderPass }
, m_ramsesRenderPass{ ramsesRenderPass }
{
}
diff --git a/src/client/impl/logic/SkinBindingImpl.cpp b/src/client/impl/logic/SkinBindingImpl.cpp
index 848551bff..aa25f4dda 100644
--- a/src/client/impl/logic/SkinBindingImpl.cpp
+++ b/src/client/impl/logic/SkinBindingImpl.cpp
@@ -29,7 +29,7 @@ namespace ramses::internal
const ramses::UniformInput& jointMatInput,
std::string_view name,
sceneObjectId_t id)
- : RamsesBindingImpl{ scene, name, id }
+ : RamsesBindingImpl{ scene, name, id, appearanceBinding.getRamsesAppearance() }
, m_joints{ std::move(joints) }
, m_inverseBindMatrices(inverseBindMatrices)
, m_appearanceBinding{ appearanceBinding }
@@ -67,7 +67,7 @@ namespace ramses::internal
inverseBindMatData.reserve(skinBinding.m_inverseBindMatrices.size() * 16u);
for (const auto& mat : skinBinding.m_inverseBindMatrices)
{
- inverseBindMatData.insert(inverseBindMatData.begin(), begin(mat), end(mat));
+ inverseBindMatData.insert(inverseBindMatData.end(), begin(mat), end(mat));
}
const auto fbInverseBindMatData = builder.CreateVector(inverseBindMatData);
diff --git a/src/client/internal/CMakeLists.txt b/src/client/internal/CMakeLists.txt
index ec3098a26..39fecc4f5 100644
--- a/src/client/internal/CMakeLists.txt
+++ b/src/client/internal/CMakeLists.txt
@@ -7,20 +7,10 @@
# -------------------------------------------------------------------------
if(ramses-sdk_TEXT_SUPPORT)
- list(APPEND CLIENT_INTERNAL_LIBS freetype
+ list(APPEND TEXT_INTERNAL_LIBS freetype
harfbuzz)
endif()
-if(ramses-sdk_ENABLE_LOGIC)
- list(APPEND CLIENT_INTERNAL_SOURCES logic/*.h
- logic/*.cpp
- logic/flatbuffers/generated/*.h
- logic/flatbuffers/schemas/*.fbs)
- list(APPEND CLIENT_INTERNAL_LIBS sol2::sol2
- lua::lua
- ramses::flatbuffers
- fmt::fmt)
-endif()
createModule(
NAME ramses-client-internal
@@ -34,11 +24,18 @@ createModule(
glslEffectBlock/*.cpp
ClientCommands/*.h
ClientCommands/*.cpp
- ${CLIENT_INTERNAL_SOURCES}
+ logic/*.h
+ logic/*.cpp
+ logic/flatbuffers/generated/*.h
+ logic/flatbuffers/schemas/*.fbs
DEPENDENCIES ramses-api
ramses-framework-internal
ramses-glslang
- ${CLIENT_INTERNAL_LIBS}
+ sol2::sol2
+ lua::lua
+ ramses::flatbuffers
+ fmt::fmt
+ ${TEXT_INTERNAL_LIBS}
)
if(TARGET FlatbufGen)
diff --git a/src/client/internal/ClientCommands/LogMemoryUtils.cpp b/src/client/internal/ClientCommands/LogMemoryUtils.cpp
index 96cba9e96..a7ca46d85 100644
--- a/src/client/internal/ClientCommands/LogMemoryUtils.cpp
+++ b/src/client/internal/ClientCommands/LogMemoryUtils.cpp
@@ -43,25 +43,20 @@ namespace ramses::internal
if (nullptr != resourceObject)
{
- StringOutputStream stream;
- stream << "Resource \"" << resource.getName() << "\"\t";
- stream << "type " << EnumToString(resourceObject->getTypeID()) << " ";
- stream << "mem compressed " << resourceObject->getCompressedDataSize() << " ";
- stream << "uncompressed " << resourceObject->getDecompressedDataSize() << " ";
-
MemoryInfo info;
info.memoryUsage = resourceObject->getCompressedDataSize() + resourceObject->getDecompressedDataSize();
- info.logInfoMesage = stream.release();
+ info.logInfoMesage = fmt::format("Resource \"{}\"\ttype {} mem compressed {} uncompressed {} ",
+ resource.getName(),
+ EnumToString(resourceObject->getTypeID()),
+ resourceObject->getCompressedDataSize(),
+ resourceObject->getDecompressedDataSize());
memoryInfos.push_back(info);
}
}
auto createMemInfo = [](const auto& logMessage, uint32_t numElements, const std::function< size_t(uint32_t) >& sizeOfIndividualElement){
- StringOutputStream stream;
- stream << numElements << " " << logMessage << " allocated";
-
MemoryInfo info;
- info.logInfoMesage = stream.release();
+ info.logInfoMesage = fmt::format("{} {} allocated", numElements, logMessage);
for(uint32_t i = 0; i < numElements; ++i)
{
diff --git a/src/client/internal/ClientCommands/SceneCommandBuffer.h b/src/client/internal/ClientCommands/SceneCommandBuffer.h
index 7007b899f..485c0b0ed 100644
--- a/src/client/internal/ClientCommands/SceneCommandBuffer.h
+++ b/src/client/internal/ClientCommands/SceneCommandBuffer.h
@@ -9,6 +9,7 @@
#pragma once
#include "ramses/framework/RamsesFrameworkTypes.h"
+#include "ramses/framework/RamsesObjectTypes.h"
#include "ramses/framework/Issue.h"
#include "internal/PlatformAbstraction/VariantWrapper.h"
@@ -22,6 +23,8 @@ namespace ramses::internal
struct SceneCommandFlushSceneVersion
{
sceneVersionTag_t sceneVersion = 0u;
+ // work around unsolved gcc bug https://bugzilla.redhat.com/show_bug.cgi?id=1507359
+ uint32_t _dummyValue = 0u;
};
struct SceneCommandValidationRequest
@@ -30,6 +33,14 @@ namespace ramses::internal
std::string optionalObjectName;
};
+ struct SceneCommandSetProperty
+ {
+ sceneObjectId_t id;
+ ERamsesObjectType type = ERamsesObjectType::Invalid;
+ std::string prop;
+ std::string value;
+ };
+
struct SceneCommandDumpSceneToFile
{
std::string fileName;
@@ -39,7 +50,8 @@ namespace ramses::internal
struct SceneCommandLogResourceMemoryUsage
{
// work around unsolved gcc bug https://bugzilla.redhat.com/show_bug.cgi?id=1507359
- bool _dummyValue = false;
+ uint64_t _dummyValue = 0u;
+ uint32_t _dummyValue2 = 0u;
};
@@ -55,6 +67,7 @@ namespace ramses::internal
private:
using CommandVariant = std::variant;
diff --git a/src/client/internal/ClientCommands/SceneCommandVisitor.cpp b/src/client/internal/ClientCommands/SceneCommandVisitor.cpp
index fb05088eb..b6aa77e50 100644
--- a/src/client/internal/ClientCommands/SceneCommandVisitor.cpp
+++ b/src/client/internal/ClientCommands/SceneCommandVisitor.cpp
@@ -12,13 +12,155 @@
#include "impl/SceneImpl.h"
#include "impl/RamsesClientImpl.h"
#include "impl/SaveFileConfigImpl.h"
+#include "impl/SceneObjectRegistryIterator.h"
#include "LogMemoryUtils.h"
+#include "ramses/client/Node.h"
+#include "ramses/client/Effect.h"
+#include "ramses/client/UniformInput.h"
+#include "ramses/client/SceneObject.h"
#include "internal/Core/Utils/LogMacros.h"
#include "internal/Core/Utils/File.h"
+#include "SetProperty.h"
#include
namespace ramses::internal
{
+ void setProperty(ramses::SceneObject* obj, const std::string& prop, const std::string& value)
+ {
+ const auto id = obj->getSceneObjectId();
+ switch (SetProperty::GetPropertyType(obj->getType(), prop))
+ {
+ case SetProperty::Type::Visible:
+ {
+ assert(obj->isOfType(ramses::ERamsesObjectType::Node));
+ auto nodeObj = static_cast(obj);
+ if (value == "0" || value == "off")
+ {
+ nodeObj->setVisibility(ramses::EVisibilityMode::Off);
+ }
+ else if (value == "1" || value.find("inv") == 0)
+ {
+ nodeObj->setVisibility(ramses::EVisibilityMode::Invisible);
+ }
+ else if (value == "2" || value.find("vis") == 0)
+ {
+ nodeObj->setVisibility(ramses::EVisibilityMode::Visible);
+ }
+ else
+ {
+ LOG_ERROR(CONTEXT_CLIENT, "Invalid value for <{}>::{}. Must be (off,inv,vis) or (0,1,2).", id.getValue(), prop);
+ return;
+ }
+ break;
+ }
+ case SetProperty::Type::DepthFunc: {
+ assert(obj->isOfType(ERamsesObjectType::Appearance));
+ auto appObj = static_cast(obj);
+ if (value == "disabled")
+ {
+ appObj->setDepthFunction(EDepthFunc::Disabled);
+ }
+ else if (value == "always")
+ {
+ appObj->setDepthFunction(EDepthFunc::Always);
+ }
+ else if (value == "less")
+ {
+ appObj->setDepthFunction(EDepthFunc::Less);
+ }
+ else if (value == "lessEqual")
+ {
+ appObj->setDepthFunction(EDepthFunc::LessEqual);
+ }
+ else
+ {
+ LOG_ERROR(CONTEXT_CLIENT, "Invalid value for <{}>::{}. Must be (disabled,always,less,lessEqual).", id.getValue(), prop);
+ return;
+ }
+ break;
+ }
+ case SetProperty::Type::DepthWrite:
+ {
+ assert(obj->isOfType(ERamsesObjectType::Appearance));
+ auto appObj = static_cast(obj);
+ if (value == "off" || value == "0")
+ {
+ appObj->setDepthWrite(EDepthWrite::Disabled);
+ }
+ else if (value == "on" || value == "1")
+ {
+ appObj->setDepthWrite(EDepthWrite::Enabled);
+ }
+ else
+ {
+ LOG_ERROR(CONTEXT_CLIENT, "Invalid value for <{}>::{}. Must be (off,on) or (0,1).", id.getValue(), prop);
+ return;
+ }
+ break;
+ }
+ case SetProperty::Type::Uniform:
+ {
+ assert(obj->isOfType(ERamsesObjectType::Appearance));
+ auto appObj = static_cast(obj);
+ const auto name = prop.substr(8);
+ auto& effect = appObj->getEffect();
+
+ auto uniform = effect.findUniformInput(name);
+ if (!uniform.has_value())
+ {
+ LOG_ERROR(CONTEXT_CLIENT, "Unknown uniform '{}' for <{}>", name, id.getValue());
+ return;
+ }
+ if (uniform->getDataType() != ramses::EDataType::Float || uniform->getElementCount() != 1)
+ {
+ LOG_ERROR(CONTEXT_CLIENT, "only float[1] uniforms supported currently");
+ return;
+ }
+ float uniformValue = 0.f;
+ if (!ArgumentConverter::tryConvert(value, uniformValue))
+ {
+ LOG_ERROR(CONTEXT_CLIENT, "conversion to float failed: {}", value);
+ return;
+ }
+ appObj->setInputValue(*uniform, uniformValue);
+ break;
+ }
+ case SetProperty::Type::Invalid:
+ LOG_ERROR(CONTEXT_CLIENT, "Unsupported property:'{}' (obj <{}> is of type {}).",
+ prop,
+ id.getValue(),
+ RamsesObjectTypeUtils::GetRamsesObjectTypeName(obj->getType()));
+ break;
+ }
+ }
+
+ void SceneCommandVisitor::operator()(const SceneCommandSetProperty& cmd)
+ {
+ LOG_INFO(CONTEXT_CLIENT, "SceneCommandVisitor::execute: set property on <{}>: {} -> {}",
+ cmd.id.getValue(),
+ cmd.prop,
+ cmd.value);
+
+ if (cmd.id.isValid())
+ {
+ auto* obj = m_scene.findObjectById(cmd.id);
+ if (!obj)
+ {
+ LOG_ERROR(CONTEXT_CLIENT, "Object not found: {}", cmd.id.getValue());
+ return;
+ }
+ setProperty(obj, cmd.prop, cmd.value);
+ }
+ else
+ {
+ SceneObjectRegistryIterator iter(m_scene.getObjectRegistry(), cmd.type);
+ while (auto* obj = iter.getNextNonConst())
+ {
+ setProperty(obj, cmd.prop, cmd.value);
+ }
+ }
+ }
+
void SceneCommandVisitor::operator()(const SceneCommandFlushSceneVersion& cmd)
{
diff --git a/src/client/internal/ClientCommands/SceneCommandVisitor.h b/src/client/internal/ClientCommands/SceneCommandVisitor.h
index dfe7bfbf6..3e7c9c644 100644
--- a/src/client/internal/ClientCommands/SceneCommandVisitor.h
+++ b/src/client/internal/ClientCommands/SceneCommandVisitor.h
@@ -15,6 +15,7 @@ namespace ramses::internal
{
class SceneImpl;
+ struct SceneCommandSetProperty;
struct SceneCommandFlushSceneVersion;
struct SceneCommandValidationRequest;
struct SceneCommandDumpSceneToFile;
@@ -27,6 +28,7 @@ namespace ramses::internal
: m_scene(scene)
{}
+ void operator()(const SceneCommandSetProperty& cmd);
void operator()(const SceneCommandFlushSceneVersion& cmd);
void operator()(const SceneCommandValidationRequest& cmd);
void operator()(const SceneCommandDumpSceneToFile& cmd) const;
diff --git a/src/client/internal/ClientCommands/SetProperty.cpp b/src/client/internal/ClientCommands/SetProperty.cpp
new file mode 100644
index 000000000..6320ea62c
--- /dev/null
+++ b/src/client/internal/ClientCommands/SetProperty.cpp
@@ -0,0 +1,182 @@
+// -------------------------------------------------------------------------
+// Copyright (C) 2024 BMW Car IT GmbH
+// -------------------------------------------------------------------------
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this
+// file, You can obtain one at https://mozilla.org/MPL/2.0/.
+// -------------------------------------------------------------------------
+
+#include "SetProperty.h"
+#include "ramses/client/Scene.h"
+#include "impl/SceneImpl.h"
+#include "impl/RamsesClientImpl.h"
+#include "impl/RamsesObjectTypeUtils.h"
+#include "internal/Core/Utils/LogMacros.h"
+#include
+
+namespace ramses::internal
+{
+ namespace
+ {
+ std::array SetPropertyTypeNames = {"visible", "uniform.*", "depth.write", "depth.func"};
+
+ struct SupportedObjectType
+ {
+ std::string typeName;
+ ERamsesObjectType type;
+ std::vector properties;
+ };
+
+ const std::vector& GetSupportedProperties()
+ {
+ static std::vector properties = {
+ {"node", ERamsesObjectType::Node, {SetProperty::Type::Visible}},
+ {"meshnode", ERamsesObjectType::MeshNode, {SetProperty::Type::Visible}},
+ {"appearance", ERamsesObjectType::Appearance, {SetProperty::Type::Uniform, SetProperty::Type::DepthWrite, SetProperty::Type::DepthFunc}},
+ };
+ return properties;
+ }
+
+ std::vector GetObjectTypeNames()
+ {
+ auto& supportedProperties = GetSupportedProperties();
+ std::vector result;
+ result.reserve(supportedProperties.size());
+ for (const auto& t : supportedProperties)
+ result.push_back(t.typeName);
+ return result;
+ }
+
+ ERamsesObjectType FindObjectType(const char* name)
+ {
+ ERamsesObjectType found = ERamsesObjectType::Invalid;
+ auto& supportedProperties = GetSupportedProperties();
+ for (auto& t : supportedProperties)
+ {
+ if (t.typeName.find(name) == 0)
+ {
+ if (found != ERamsesObjectType::Invalid)
+ return ERamsesObjectType::Invalid; // ambiguous result
+ found = t.type;
+ }
+ }
+ return found;
+ }
+
+ SetProperty::Type FindProperty(const SupportedObjectType& t, const std::string& name)
+ {
+ SetProperty::Type found = SetProperty::Type::Invalid;
+ for (auto& p : t.properties)
+ {
+ std::string fullName = SetPropertyTypeNames[static_cast(p)];
+ bool wildcardMatch = (fullName.back() == '*' && name.find(fullName.substr(0, fullName.size() - 1)) == 0);
+ if (fullName.find(name) == 0 || wildcardMatch)
+ {
+ if (found != SetProperty::Type::Invalid)
+ return SetProperty::Type::Invalid; // ambigous result
+ found = p;
+ }
+ }
+ return found;
+ }
+ }
+}
+
+namespace ramses::internal
+{
+ SetProperty::SetProperty(RamsesClientImpl& client)
+ : m_client(client)
+ {
+ description = fmt::format("Usage: sceneId sceneObjId {} value - modifies a scene object", fmt::join(SetPropertyTypeNames, "|"));
+ registerKeyword("setprop");
+ }
+
+ bool SetProperty::executeInput(const std::vector& input)
+ {
+ if (input.size() != 5)
+ {
+ LOG_ERROR(CONTEXT_RAMSH, "{}", description);
+ return false;
+ }
+ ramses::sceneId_t sceneId;
+ ArgumentConverter::tryConvert(input[1], sceneId.getReference());
+ if (!sceneId.isValid())
+ {
+ LOG_ERROR(CONTEXT_RAMSH, "Invalid SceneId: {}", input[1]);
+ return false;
+ }
+ ramses::sceneObjectId_t objectId;
+ ArgumentConverter::tryConvert(input[2], objectId.getReference());
+ if (!objectId.isValid())
+ {
+ LOG_ERROR(CONTEXT_RAMSH, "Invalid SceneObjectId: {}", input[2]);
+ return false;
+ }
+
+ SceneCommandSetProperty command;
+ command.prop = input[3];
+ command.value = input[4];
+ command.id = ramses::sceneObjectId_t(objectId);
+ m_client.enqueueSceneCommand(ramses::sceneId_t(sceneId), std::move(command));
+ return true;
+ }
+
+ SetProperty::Type SetProperty::GetPropertyType(ramses::ERamsesObjectType objType, const std::string& name)
+ {
+ SetProperty::Type found = SetProperty::Type::Invalid;
+ auto& supportedProperties = GetSupportedProperties();
+ for (auto& t : supportedProperties)
+ {
+ if (RamsesObjectTypeUtils::IsTypeMatchingBaseType(objType, t.type))
+ {
+ found = FindProperty(t, name);
+ if (found != SetProperty::Type::Invalid)
+ return found; // continue if not found: there may be a more specialized type
+ }
+ }
+ return found;
+ }
+}
+
+namespace ramses::internal
+{
+ SetPropertyAll::SetPropertyAll(RamsesClientImpl& client)
+ : m_client(client)
+ {
+ registerKeyword("setall");
+ description = fmt::format("Usage: sceneId objType {} value - modifies all scene objects of given type", fmt::join(SetPropertyTypeNames, "|"));
+ }
+
+ bool SetPropertyAll::executeInput(const std::vector& input)
+ {
+ if (input.size() != 5)
+ {
+ LOG_ERROR(CONTEXT_RAMSH, "{}", description);
+ return false;
+ }
+ ramses::sceneId_t sceneId;
+ ArgumentConverter::tryConvert(input[1], sceneId.getReference());
+ if (!sceneId.isValid())
+ {
+ LOG_ERROR(CONTEXT_RAMSH, "Invalid SceneId: {}", input[1]);
+ return false;
+ }
+ SceneCommandSetProperty command;
+ auto type = input[2];
+ command.prop = input[3];
+ command.value = input[4];
+ command.type = FindObjectType(type.c_str());
+ if (command.type == ERamsesObjectType::Invalid)
+ {
+ LOG_ERROR(CONTEXT_RAMSH, "Invalid typename:{}. Must be one of ({})", type, fmt::join(GetObjectTypeNames(), "|"));
+ return false;
+ }
+ if (SetProperty::GetPropertyType(command.type, command.prop) == SetProperty::Type::Invalid)
+ {
+ LOG_ERROR(CONTEXT_RAMSH, "Unsupported property '{}' for type {}", command.prop, type);
+ return false;
+ }
+ m_client.enqueueSceneCommand(sceneId, std::move(command));
+ return true;
+ }
+}
diff --git a/src/client/internal/ClientCommands/SetProperty.h b/src/client/internal/ClientCommands/SetProperty.h
new file mode 100644
index 000000000..25d394dea
--- /dev/null
+++ b/src/client/internal/ClientCommands/SetProperty.h
@@ -0,0 +1,48 @@
+// -------------------------------------------------------------------------
+// Copyright (C) 2024 BMW AG
+// -------------------------------------------------------------------------
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this
+// file, You can obtain one at https://mozilla.org/MPL/2.0/.
+// -------------------------------------------------------------------------
+
+#pragma once
+
+#include "ramses/framework/RamsesFrameworkTypes.h"
+#include "ramses/framework/RamsesObjectTypes.h"
+#include "internal/Ramsh/RamshCommand.h"
+
+namespace ramses::internal
+{
+ class RamsesClientImpl;
+
+ class SetProperty : public RamshCommand
+ {
+ public:
+ enum class Type
+ {
+ Visible,
+ Uniform,
+ DepthWrite,
+ DepthFunc,
+ Invalid,
+ };
+
+ static Type GetPropertyType(ramses::ERamsesObjectType objType, const std::string& name);
+
+ explicit SetProperty(RamsesClientImpl& client);
+ bool executeInput(const std::vector& input) override;
+ private:
+ RamsesClientImpl& m_client;
+ };
+
+ class SetPropertyAll : public RamshCommand
+ {
+ public:
+ explicit SetPropertyAll(RamsesClientImpl& client);
+ bool executeInput(const std::vector& input) override;
+ private:
+ RamsesClientImpl& m_client;
+ };
+}
+
diff --git a/src/client/internal/RamsesVersion.cpp b/src/client/internal/RamsesVersion.cpp
index eef9d8758..8ec125893 100644
--- a/src/client/internal/RamsesVersion.cpp
+++ b/src/client/internal/RamsesVersion.cpp
@@ -9,7 +9,6 @@
#include "internal/RamsesVersion.h"
#include "internal/PlatformAbstraction/Collections/IOutputStream.h"
#include "internal/PlatformAbstraction/Collections/IInputStream.h"
-#include "internal/PlatformAbstraction/Collections/StringOutputStream.h"
#include "internal/PlatformAbstraction/PlatformStringUtils.h"
#include "internal/Core/Utils/LogMacros.h"
#include "ramses-sdk-build-config.h"
@@ -24,8 +23,7 @@ namespace ramses::internal
void WriteToStream(IOutputStream& stream, std::string_view versionString, std::string_view gitHash, EFeatureLevel featureLevel)
{
LOG_INFO(CONTEXT_CLIENT, "RamsesVersion::WriteToStream: Version: {} Git Hash: {} Feature Level: {}", versionString, gitHash, featureLevel);
- StringOutputStream out;
- out << "[RamsesVersion:" << versionString << "]\n[GitHash:" << gitHash << "]\n[FeatureLevel:" << featureLevel << "]\n";
+ auto out = fmt::format("[RamsesVersion:{}]\n[GitHash:{}]\n[FeatureLevel:{}]\n", versionString, gitHash, featureLevel);
stream.write(out.c_str(), out.size());
}
@@ -172,13 +170,5 @@ namespace ramses::internal
return true;
}
-
- bool MatchesMajorMinor(uint32_t currentMajor, uint32_t currentMinor, const VersionInfo& in)
- {
- return (in.major == currentMajor &&
- in.minor == currentMinor) ||
- (currentMajor == 0 &&
- currentMinor == 0);
- }
}
}
diff --git a/src/client/internal/RamsesVersion.h b/src/client/internal/RamsesVersion.h
index 4c1427570..d3622587c 100644
--- a/src/client/internal/RamsesVersion.h
+++ b/src/client/internal/RamsesVersion.h
@@ -31,6 +31,5 @@ namespace ramses::internal
void WriteToStream(IOutputStream& stream, std::string_view versionString, std::string_view gitHash, EFeatureLevel featureLevel);
bool ReadFromStream(IInputStream& stream, VersionInfo& outVersion, EFeatureLevel& outFeatureLevel);
- bool MatchesMajorMinor(uint32_t currentMajor, uint32_t currentMinor, const VersionInfo& in);
}
}
diff --git a/src/client/internal/glslEffectBlock/GLSlang.h b/src/client/internal/glslEffectBlock/GLSlang.h
index 26ed7d60c..11a42a193 100644
--- a/src/client/internal/glslEffectBlock/GLSlang.h
+++ b/src/client/internal/glslEffectBlock/GLSlang.h
@@ -29,7 +29,6 @@ WARNING_DISABLE_GCC9(-Wdeprecated-copy)
#include "Include/intermediate.h"
#include "Include/InitializeGlobals.h"
#include "MachineIndependent/localintermediate.h"
-#include "OGLCompilersDLL/InitializeDll.h"
WARNINGS_POP
diff --git a/src/client/internal/glslEffectBlock/GlslEffect.cpp b/src/client/internal/glslEffectBlock/GlslEffect.cpp
index 7b79f8b8d..45b80bb8b 100644
--- a/src/client/internal/glslEffectBlock/GlslEffect.cpp
+++ b/src/client/internal/glslEffectBlock/GlslEffect.cpp
@@ -16,55 +16,26 @@
namespace ramses::internal
{
- /*
- wrapper for glslang process wide initializer and finalizer.
- constructed once in this file. it is global and lives longer
- than main. will not work if global static objects start using
- effects but this should never happen.
- */
- class GlslangInitAndFinalizeOnceHelper
- {
- public:
- GlslangInitAndFinalizeOnceHelper()
- {
- glslang::InitializeProcess();
- glslang::InitProcess();
- }
-
- ~GlslangInitAndFinalizeOnceHelper()
- {
- glslang::DetachProcess();
- glslang::FinalizeProcess();
- }
- };
- static GlslangInitAndFinalizeOnceHelper glslangInitializer;
-
-
GlslEffect::GlslEffect(std::string_view vertexShader,
std::string_view fragmentShader,
std::string_view geometryShader,
std::vector compilerDefines,
- const HashMap& semanticInputs,
+ SemanticsMap semanticInputs,
+ ERenderBackendCompatibility compatibility,
std::string_view name)
: m_vertexShader(vertexShader)
, m_fragmentShader(fragmentShader)
, m_geometryShader(geometryShader)
, m_compilerDefines(std::move(compilerDefines))
- , m_semanticInputs(semanticInputs)
+ , m_semanticInputs(std::move(semanticInputs))
+ , m_renderBackendCompatibility(compatibility)
, m_name(name)
{
}
- GlslEffect::~GlslEffect() = default;
-
- EffectResource* GlslEffect::createEffectResource()
+ std::unique_ptr GlslEffect::createEffectResource(EFeatureLevel featureLevel)
{
- if (m_effectResource)
- {
- return m_effectResource;
- }
-
- GlslParser parser{m_vertexShader, m_fragmentShader, m_geometryShader, m_compilerDefines};
+ GlslParser parser{m_vertexShader, m_fragmentShader, m_geometryShader, m_compilerDefines, m_renderBackendCompatibility};
if (!parser.valid())
{
m_errorMessages << parser.getErrors();
@@ -92,8 +63,25 @@ namespace ramses::internal
const EffectInputInformationVector& attributeInputs = glslToEffectConverter.getAttributeInputs();
const auto geomInputType = glslToEffectConverter.getGeometryShaderInputType();
- m_effectResource = new EffectResource(parser.getVertexShader(), parser.getFragmentShader(), parser.getGeometryShader(), geomInputType, uniformInputs, attributeInputs, m_name);
- return m_effectResource;
+ // forbid effect creation with UBOs below FL02
+ if (featureLevel < EFeatureLevel_02)
+ {
+ if (std::any_of(uniformInputs.cbegin(), uniformInputs.cend(), [](const auto& uniform) { return uniform.uniformBufferBinding.isValid(); }))
+ {
+ m_errorMessages << "Uniform buffer objects are supported only with feature level 02 or higher";
+ return nullptr;
+ }
+ }
+
+ return std::make_unique(parser.getVertexShader(),
+ parser.getFragmentShader(),
+ parser.getGeometryShader(),
+ parser.getSPIRVShaders(),
+ geomInputType,
+ uniformInputs,
+ attributeInputs,
+ m_name,
+ featureLevel);
}
bool GlslEffect::extractAndCheckShaderVersions(const glslang::TProgram* program)
@@ -166,7 +154,6 @@ namespace ramses::internal
uint32_t GlslEffect::getShadingLanguageVersion() const
{
- assert(m_effectResource);
return m_shadingLanguageVersion;
}
diff --git a/src/client/internal/glslEffectBlock/GlslEffect.h b/src/client/internal/glslEffectBlock/GlslEffect.h
index de7be7b90..0a479d54d 100644
--- a/src/client/internal/glslEffectBlock/GlslEffect.h
+++ b/src/client/internal/glslEffectBlock/GlslEffect.h
@@ -13,6 +13,8 @@
#include "internal/SceneGraph/SceneAPI/EFixedSemantics.h"
#include "internal/SceneGraph/Resource/EffectResource.h"
+#include "ramses/framework/ERenderBackendCompatibility.h"
+
#include
#include
#include
@@ -36,12 +38,11 @@ namespace ramses::internal
std::string_view fragmentShader,
std::string_view geometryShader,
std::vector compilerDefines,
- const HashMap& semanticInputs,
+ SemanticsMap semanticInputs,
+ ERenderBackendCompatibility compatibility,
std::string_view name);
- ~GlslEffect();
-
- [[nodiscard]] EffectResource* createEffectResource();
+ [[nodiscard]] std::unique_ptr createEffectResource(EFeatureLevel featureLevel);
[[nodiscard]] uint32_t getShadingLanguageVersion() const;
[[nodiscard]] std::string getEffectErrorMessages() const;
@@ -51,11 +52,11 @@ namespace ramses::internal
const std::string m_fragmentShader;
const std::string m_geometryShader;
const std::vector m_compilerDefines;
- const HashMap m_semanticInputs;
+ const SemanticsMap m_semanticInputs;
+ const ERenderBackendCompatibility m_renderBackendCompatibility;
const std::string m_name;
- mutable StringOutputStream m_errorMessages;
- EffectResource* m_effectResource{nullptr};
+ StringOutputStream m_errorMessages;
uint32_t m_shadingLanguageVersion{0};
bool extractAndCheckShaderVersions(const glslang::TProgram* program);
diff --git a/src/client/internal/glslEffectBlock/GlslLimits.h b/src/client/internal/glslEffectBlock/GlslLimits.h
index 89d5e762c..aba9d02e5 100644
--- a/src/client/internal/glslEffectBlock/GlslLimits.h
+++ b/src/client/internal/glslEffectBlock/GlslLimits.h
@@ -97,6 +97,7 @@ namespace ramses::internal
glslCompilationResources.limits.generalSamplerIndexing = true;
glslCompilationResources.limits.generalVariableIndexing = true;
glslCompilationResources.limits.generalConstantMatrixVectorIndexing = true;
+ glslCompilationResources.maxDualSourceDrawBuffersEXT = 1;
}
static void SetLimitsOpenGL_2_0(TBuiltInResource& glslCompilationResources)
diff --git a/src/client/internal/glslEffectBlock/GlslParser.cpp b/src/client/internal/glslEffectBlock/GlslParser.cpp
index f1b14cbdf..3baabf94a 100644
--- a/src/client/internal/glslEffectBlock/GlslParser.cpp
+++ b/src/client/internal/glslEffectBlock/GlslParser.cpp
@@ -7,10 +7,12 @@
// -------------------------------------------------------------------------
#include "internal/glslEffectBlock/GlslParser.h"
+#include "internal/SceneGraph/SceneAPI/EVulkanVersion.h"
#include "GlslLimits.h"
#include "fmt/format.h"
#include "internal/PlatformAbstraction/FmtBase.h"
#include "impl/EffectDescriptionImpl.h"
+#include "SPIRV/GlslangToSpv.h"
template <> struct fmt::formatter : public ramses::internal::SimpleFormatterBase
{
@@ -171,7 +173,7 @@ namespace
namespace ramses::internal
{
- GlslParser::GlslParser(const std::string& vertexShader, const std::string& fragmentShader, const std::string& geometryShader, const std::vector& compilerDefines)
+ GlslParser::GlslParser(const std::string& vertexShader, const std::string& fragmentShader, const std::string& geometryShader, const std::vector& compilerDefines, ERenderBackendCompatibility compatibility)
{
m_vertexShader = std::make_unique(EShLangVertex);
m_fragmentShader = std::make_unique(EShLangFragment);
@@ -179,6 +181,7 @@ namespace ramses::internal
{
m_geometryShader = std::make_unique(EShLangGeometry);
}
+ setShadersCompatibility(compatibility);
const auto defineString = CreateDefineString(compilerDefines);
const bool hasGeometryShader = (m_geometryShader != nullptr);
@@ -215,6 +218,7 @@ namespace ramses::internal
m_fragmentShaderFromParts = MergeShaderParts(fragmentShaderParts);
m_geometryShaderFromParts = MergeShaderParts(geometryShaderParts);
}
+ generateSPIRV(compatibility);
}
bool GlslParser::linkProgram()
@@ -240,6 +244,17 @@ namespace ramses::internal
return true;
}
+ void GlslParser::generateSPIRV(ERenderBackendCompatibility compatibility)
+ {
+ if (compatibility == ERenderBackendCompatibility::VulkanAndOpenGL)
+ {
+ glslang::GlslangToSpv(*m_program->getIntermediate(EShLangVertex), m_spirvShaders.m_vertexSPIRVBlob);
+ glslang::GlslangToSpv(*m_program->getIntermediate(EShLangFragment), m_spirvShaders.m_fragmentSPIRVBlob);
+ if (m_geometryShader)
+ glslang::GlslangToSpv(*m_program->getIntermediate(EShLangGeometry), m_spirvShaders.m_geometrySPIRVBlob);
+ }
+ }
+
std::string GlslParser::getErrors() const
{
return m_errorMessages.c_str();
@@ -327,6 +342,29 @@ namespace ramses::internal
return std::string(result.release());
}
+ void GlslParser::setShadersCompatibility(ERenderBackendCompatibility compatibility)
+ {
+ auto setShaderTargetVulkan = [](glslang::TShader& shader)
+ {
+ static_assert(TargetVulkanApiVersion == EVulkanAPIVersion::Version_1_0, "Update target Vulkan API version passed to glslang");
+ static_assert(TargetSPIRVVersion == ESPIRVVersion::Version_1_0, "Update target SPIRV version passed to glslang");
+ shader.setEnvTarget(glslang::EShTargetLanguage::EShTargetSpv, glslang::EShTargetLanguageVersion::EShTargetSpv_1_0);
+ shader.setEnvClient(glslang::EShClient::EShClientVulkan, glslang::EshTargetClientVersion::EShTargetVulkan_1_0);
+ };
+
+ switch (compatibility)
+ {
+ case ramses::ERenderBackendCompatibility::OpenGL:
+ break;
+ case ramses::ERenderBackendCompatibility::VulkanAndOpenGL:
+ setShaderTargetVulkan(*m_vertexShader);
+ setShaderTargetVulkan(*m_fragmentShader);
+ if (m_geometryShader)
+ setShaderTargetVulkan(*m_geometryShader);
+ break;
+ }
+ }
+
bool GlslParser::createShaderParts(ShaderParts& outParts, const std::string& defineString, const std::string& userShader, const std::string& shaderName) const
{
size_t versionStringStart = 0;
@@ -381,10 +419,13 @@ namespace ramses::internal
return m_geometryShaderFromParts;
}
+ const SPIRVShaders& GlslParser::getSPIRVShaders() const
+ {
+ return m_spirvShaders;
+ }
+
std::string GlslParser::MergeShaderParts(const ShaderParts& shaderParts)
{
- StringOutputStream str;
- str << shaderParts.version << shaderParts.defines << shaderParts.userCode;
- return str.release();
+ return fmt::format("{}{}{}", shaderParts.version, shaderParts.defines, shaderParts.userCode);
}
}
diff --git a/src/client/internal/glslEffectBlock/GlslParser.h b/src/client/internal/glslEffectBlock/GlslParser.h
index da3350fa4..deb71b5ab 100644
--- a/src/client/internal/glslEffectBlock/GlslParser.h
+++ b/src/client/internal/glslEffectBlock/GlslParser.h
@@ -12,6 +12,9 @@
#include "internal/SceneGraph/SceneAPI/EShaderStage.h"
#include "internal/SceneGraph/SceneAPI/EShaderWarningCategory.h"
#include "internal/PlatformAbstraction/Collections/StringOutputStream.h"
+#include "internal/SceneGraph/Resource/SPIRVShaders.h"
+
+#include "ramses/framework/ERenderBackendCompatibility.h"
#include
#include
@@ -31,7 +34,7 @@ namespace ramses::internal
};
using Warnings = std::vector;
- GlslParser(const std::string& vertexShader, const std::string& fragmentShader, const std::string& geometryShader = {}, const std::vector& compilerDefines = {});
+ GlslParser(const std::string& vertexShader, const std::string& fragmentShader, const std::string& geometryShader = {}, const std::vector& compilerDefines = {}, ERenderBackendCompatibility compatibility = ERenderBackendCompatibility::OpenGL);
[[nodiscard]] bool valid() const;
@@ -39,6 +42,8 @@ namespace ramses::internal
[[nodiscard]] const std::string& getFragmentShader() const;
[[nodiscard]] const std::string& getGeometryShader() const;
+ [[nodiscard]] const SPIRVShaders& getSPIRVShaders() const;
+
[[nodiscard]] Warnings generateWarnings() const;
[[nodiscard]] std::string getErrors() const;
@@ -54,9 +59,11 @@ namespace ramses::internal
};
static std::string CreateDefineString(const std::vector& compilerDefines);
+ void setShadersCompatibility(ERenderBackendCompatibility compatibility);
bool createShaderParts(ShaderParts& outParts, const std::string& defineString, const std::string& userShader, const std::string& shaderName) const;
bool parseShader(glslang::TShader& tShader, const TBuiltInResource& glslCompilationResources, const ShaderParts& shaderParts, const std::string& shaderName);
inline bool linkProgram();
+ void generateSPIRV(ERenderBackendCompatibility compatibility);
static std::string MergeShaderParts(const ShaderParts& shaderParts);
mutable StringOutputStream m_errorMessages;
@@ -68,5 +75,7 @@ namespace ramses::internal
std::string m_vertexShaderFromParts;
std::string m_fragmentShaderFromParts;
std::string m_geometryShaderFromParts;
+
+ SPIRVShaders m_spirvShaders;
};
}
diff --git a/src/client/internal/glslEffectBlock/GlslToEffectConverter.cpp b/src/client/internal/glslEffectBlock/GlslToEffectConverter.cpp
index 0766478ec..b5c12c60c 100644
--- a/src/client/internal/glslEffectBlock/GlslToEffectConverter.cpp
+++ b/src/client/internal/glslEffectBlock/GlslToEffectConverter.cpp
@@ -12,8 +12,8 @@
namespace ramses::internal
{
- GlslToEffectConverter::GlslToEffectConverter(const HashMap& semanticInputs)
- : m_semanticInputs(semanticInputs)
+ GlslToEffectConverter::GlslToEffectConverter(SemanticsMap semanticInputs)
+ : m_semanticInputs(std::move(semanticInputs))
{
}
@@ -27,6 +27,7 @@ namespace ramses::internal
if(geomShader != nullptr)
CHECK_RETURN_ERR(parseLinkerObjectsForStage(geomShader->getTreeRoot(), EShaderStage::Geometry)); // Parse data for geometry stage
CHECK_RETURN_ERR(replaceVertexAttributeWithBufferVariant()); // Post-process vertex attributes
+ CHECK_RETURN_ERR(checkIncompatibleUniformBufferRedifinitions());
CHECK_RETURN_ERR(makeUniformsUnique()); // Post-process uniforms which are present in both stages
if (geomShader)
@@ -128,11 +129,11 @@ namespace ramses::internal
if (storageQualifier == glslang::EvqVaryingIn && stage == EShaderStage::Vertex) // 'VaryingIn' means vertex attribute
{
- return setInputTypeFromType(symbol->getType(), symbol->getName(), m_attributeInputs);
+ return createEffectInputsRecursivelyIfNeeded(symbol->getType(), symbol->getName(), {}, 0u);
}
if (storageQualifier == glslang::EvqUniform)
{
- return setInputTypeFromType(symbol->getType(), symbol->getName(), m_uniformInputs);
+ return createEffectInputsRecursivelyIfNeeded(symbol->getType(), symbol->getName(), {}, 0u);
}
return true;
@@ -146,17 +147,21 @@ namespace ramses::internal
for (size_t i = 0; i < temp.size(); i++)
{
const EffectInputInformation& A = temp[i];
+ const auto& aType = m_uniformInputsGlslangTypes[i].get();
bool add = true;
for (size_t j = i + 1; j < temp.size(); j++)
{
const EffectInputInformation& B = temp[j];
+ const auto& bType = m_uniformInputsGlslangTypes[j].get();
if (A.inputName == B.inputName)
{
- if (A == B) // Same name and data: This is allowed, but only a single occurrence is added
+ //check inputs are same, but also check glslang type, which does a recursive check in case of structs (and UBOs)
+ if (A == B && aType == bType)
{
+ // Same name and type: This is allowed, but only a single occurrence is added
add = false;
break;
}
@@ -174,7 +179,28 @@ namespace ramses::internal
return true;
}
- bool GlslToEffectConverter::setInputTypeFromType(const glslang::TType& type, std::string_view inputName, EffectInputInformationVector& outputVector) const
+ bool GlslToEffectConverter::checkIncompatibleUniformBufferRedifinitions() const
+ {
+ EffectInputInformationVector uboInputs;
+ std::copy_if(m_uniformInputs.cbegin(), m_uniformInputs.cend(), std::back_inserter(uboInputs), [](const auto& input) { return input.dataType == EDataType::UniformBuffer; });
+
+ auto sortByBinding = [](const auto& ubo1, const auto& ubo2) { return ubo1.uniformBufferBinding.getValue() < ubo2.uniformBufferBinding.getValue(); };
+ std::sort(uboInputs.begin(), uboInputs.end(), sortByBinding);
+
+ //check if non-identical UBOs exist with same binding
+ auto incompatibleUBOs = [](const auto& ubo1, const auto& ubo2) { return ubo1.uniformBufferBinding == ubo2.uniformBufferBinding && ubo1 != ubo2; };
+ auto badIt = std::adjacent_find(uboInputs.begin(), uboInputs.end(), incompatibleUBOs);
+
+ if (badIt != uboInputs.end())
+ {
+ m_message << badIt->inputName << ": several uniform buffers with same binding but different definition at binding: " << badIt->uniformBufferBinding.getValue();
+ return false;
+ }
+
+ return true;
+ }
+
+ bool GlslToEffectConverter::createEffectInputsRecursivelyIfNeeded(const glslang::TType& type, std::string_view inputName, std::optional uniformBuffer, uint32_t offset)
{
uint32_t elementCount = 0;
CHECK_RETURN_ERR(getElementCountFromType(type, inputName, elementCount));
@@ -184,31 +210,71 @@ namespace ramses::internal
if (!type.isStruct())
{
- CHECK_RETURN_ERR(createEffectInputType(type, inputName, elementCount, outputVector));
+ CHECK_RETURN_ERR(createEffectInput(type, inputName, elementCount, uniformBuffer, 0u));
}
else // Structs and especially arrays of structs are a bit more complicated
{
- const glslang::TTypeList* structFields = type.getStruct();
+ if (type.getBasicType() == glslang::EbtBlock)
+ {
+ assert(!uniformBuffer && offset == 0u && "New uniform block is not expected to be defined within a uniform block");
+ if (type.getQualifier().layoutPacking != glslang::ElpStd140)
+ {
+ // UBO layout must be explicitly set to "std140", which guarantees a specific packing
+ // of UBO elements in memory.
+ // Otherwise there is no guarantee on the layout of elements when setting UBO on GPU in case of OpenGL.
+ // Vulkan guarantees a layout that is compatible with std140 by default.
+
+ m_message << "Failed creating effect input for uniform block " << inputName
+ << " of type " << type.getTypeName() << ". Layout must be explicitly set to std140";
+ return false;
+ }
+
+ if (type.isArray())
+ {
+ // Arrays have harsh alignment rules in std140 that are known to be mis-interpreted.
+ // Forbidding UBO arrays in favor of having a less complicated implementation
+ // and more stable support for most crucial features of UBOs
+ m_message << "Failed creating effect input for uniform block " << inputName
+ << "[] of type " << type.getTypeName() << ". Uniform block arrays are not supported";
+ return false;
+ }
+
+ // Create an input representing the UBO input itself
+ // (shadow) inputs will be creating to represent each field of the UBO
+ // as if it were a normal struct, but those inputs should not be used
+ // for data layout/instance or LL scene. They should be used only to
+ // represent offsets within the UBO input created in the next line
+ CHECK_RETURN_ERR(createEffectInput(type, inputName, elementCount, {}, 0u));
+ uniformBuffer = m_uniformInputs.back();
+ }
+
+ const auto uniformBufferElementSize = GetElementPaddedSizeFromType(type);
+
+ const glslang::TTypeList& structFields = *type.getStruct();
for (uint32_t i = 0; i < elementCount; i++)
{
- for(const auto& structField : *structFields)
+ for(std::size_t fieldIdx = 0u; fieldIdx < structFields.size(); ++fieldIdx)
{
- const glslang::TType& fieldType = *structField.type;
+ const auto& field = structFields[fieldIdx];
+ const glslang::TType& fieldType = *field.type;
const auto subName = GetStructFieldIdentifier(inputName, fieldType.getFieldName(), type.isArray() ? static_cast(i) : -1);
+ const auto fieldOffsetWithinParent = glslang::TIntermediate::getOffset(type, static_cast(fieldIdx));
+ const auto fieldOffset = offset + i * uniformBufferElementSize + fieldOffsetWithinParent;
+
// Get the element count for the field
- uint32_t newElementCount = 0;
- CHECK_RETURN_ERR(getElementCountFromType(fieldType, inputName, newElementCount));
+ uint32_t fieldElementCount = 0;
+ CHECK_RETURN_ERR(getElementCountFromType(fieldType, inputName, fieldElementCount));
if (fieldType.isStruct())
{
// Recursive case: Nested struct
- CHECK_RETURN_ERR(setInputTypeFromType(fieldType, subName, outputVector));
+ CHECK_RETURN_ERR(createEffectInputsRecursivelyIfNeeded(fieldType, subName, uniformBuffer, fieldOffset));
}
else
{
- CHECK_RETURN_ERR(createEffectInputType(fieldType, subName, newElementCount, outputVector));
+ CHECK_RETURN_ERR(createEffectInput(fieldType, subName, fieldElementCount, uniformBuffer, fieldOffset));
}
}
}
@@ -220,7 +286,8 @@ namespace ramses::internal
std::string GlslToEffectConverter::GetStructFieldIdentifier(std::string_view baseName, std::string_view fieldName, const int32_t arrayIndex)
{
StringOutputStream stream;
- stream << baseName;
+ if(!IsUniformAnonymous(baseName))
+ stream << baseName;
if (arrayIndex != -1)
{
@@ -229,22 +296,60 @@ namespace ramses::internal
stream << ']';
}
- stream << '.';
+ if(!IsUniformAnonymous(baseName))
+ stream << '.';
stream << fieldName;
return stream.release();
}
- bool GlslToEffectConverter::createEffectInputType(const glslang::TType& type, std::string_view inputName, uint32_t elementCount, EffectInputInformationVector& outputVector) const
+ bool GlslToEffectConverter::IsUniformAnonymous(std::string_view uniformName)
+ {
+ return uniformName.find("anon@") != std::string_view::npos;
+ }
+
+ std::string GlslToEffectConverter::MakeNameForAnonymousUniformBuffer(UniformBufferBinding binding)
+ {
+ //GLSLang gives names to anonymous UBOs that have the prefix "anon@" and a postfix of an integer
+ //that represents the order of their definition in the shader.
+ //This function creates a name which has the layout binding as a postfix so it is possible
+ //to make checks and filtration easier
+ assert(binding.isValid());
+ return std::string("anon@ubo_binding=") + std::to_string(binding.getValue());
+ }
+
+ bool GlslToEffectConverter::createEffectInput(const glslang::TType& type, std::string_view inputName, uint32_t elementCount, std::optional parentUniformBuffer, uint32_t offset)
{
EffectInputInformation input;
- input.inputName = inputName;
+ input.inputName = IsUniformAnonymous(inputName) ? MakeNameForAnonymousUniformBuffer(UniformBufferBinding{ type.getQualifier().layoutBinding }) : inputName;;
input.elementCount = elementCount;
- CHECK_RETURN_ERR(setInputTypeFromType(type, input));
- CHECK_RETURN_ERR(setSemanticsOnInput(input));
+ if (type.getBasicType() == glslang::EbtBlock)
+ {
+ input.uniformBufferBinding = UniformBufferBinding{ type.getQualifier().layoutBinding };
+ input.uniformBufferElementSize = UniformBufferElementSize{ GetElementPaddedSizeFromType(type) };
+ }
+
+ if (parentUniformBuffer)
+ {
+ input.uniformBufferBinding = UniformBufferBinding{ parentUniformBuffer->uniformBufferBinding };
+ input.uniformBufferFieldOffset = UniformBufferFieldOffset{ offset };
+ input.uniformBufferElementSize = UniformBufferElementSize{ GetElementPaddedSizeFromType(type) };
+ }
+
+ CHECK_RETURN_ERR(setEffectInputType(type, input));
+ CHECK_RETURN_ERR(setEffectInputSemantics(type, parentUniformBuffer.has_value(), input));
+
+ if (IsAttributeType(type))
+ {
+ m_attributeInputs.push_back(input);
+ }
+ else
+ {
+ m_uniformInputs.push_back(input);
+ m_uniformInputsGlslangTypes.emplace_back(type);
+ }
- outputVector.push_back(input);
return true;
}
@@ -278,10 +383,10 @@ namespace ramses::internal
return true;
}
- bool GlslToEffectConverter::setInputTypeFromType(const glslang::TType& type, EffectInputInformation& input) const
+ bool GlslToEffectConverter::setEffectInputType(const glslang::TType& type, EffectInputInformation& input) const
{
assert(!input.inputName.empty());
- assert(!type.isStruct());
+ assert(!type.isStruct() || type.getBasicType() == glslang::EbtBlock);
const glslang::TBasicType basicType = type.getBasicType();
@@ -404,6 +509,9 @@ namespace ramses::internal
case glslang::EbtUint:
input.dataType = EDataType::UInt32;
return true;
+ case glslang::EbtBlock:
+ input.dataType = EDataType::UniformBuffer;
+ return true;
default:
m_message << input.inputName << ": unknown scalar base type " << type.getBasicTypeString().c_str();
}
@@ -412,17 +520,37 @@ namespace ramses::internal
return false;
}
- bool GlslToEffectConverter::setSemanticsOnInput(EffectInputInformation& input) const
+ bool GlslToEffectConverter::setEffectInputSemantics(const glslang::TType& type, bool uniformBufferField, EffectInputInformation& input) const
{
assert(!input.inputName.empty());
- if (const EFixedSemantics* semantic = m_semanticInputs.get(input.inputName))
+ // find input semantic by name or uniform buffer binding
+ auto semanticIt = m_semanticInputs.find(input.inputName);
+ if (semanticIt == m_semanticInputs.end() && input.dataType == EDataType::UniformBuffer)
+ semanticIt = m_semanticInputs.find(input.uniformBufferBinding);
+
+ if (semanticIt != m_semanticInputs.end())
{
- if (!IsSemanticCompatibleWithDataType(*semantic, input.dataType))
+ const auto semantic = semanticIt->second;
+ if (uniformBufferField)
{
- m_message << input.inputName << ": input type " << EnumToString(input.dataType) << " not compatible with semantic " << *semantic;
+ m_message << input.inputName << ": can not have semantic because it is declared in a uniform block";
return false;
}
- input.semantics = *semantic;
+
+ if (!IsSemanticCompatibleWithDataType(semantic, input.dataType))
+ {
+ m_message << input.inputName << ": input type " << EnumToString(input.dataType) << " not compatible with semantic " << semantic;
+ return false;
+ }
+
+ if (input.dataType == EDataType::UniformBuffer
+ && !IsSemanticCompatibleWithUniformBufferDefinition(semantic, type))
+ {
+ m_message << input.inputName << ": is a uniform buffer that does not have correct format for semantic :" << semantic;
+ return false;
+ }
+
+ input.semantics = semantic;
}
return true;
}
@@ -445,4 +573,77 @@ namespace ramses::internal
return true;
}
+
+ uint32_t GlslToEffectConverter::GetElementPaddedSizeFromType(const glslang::TType& type)
+ {
+ int uniformBufferElementSize = 0;
+
+ if (type.getBasicType() == glslang::EbtBlock)
+ {
+ uniformBufferElementSize = glslang::TIntermediate::getBlockSize(type);
+ }
+ else
+ {
+ int totalSize = 0; // in case of array this is size for all elements
+ int arrayStride = 0; // in case of array this is equal to (aligned) size for a single element (with padding), otherwise zero
+ glslang::TIntermediate::getBaseAlignment(type, totalSize, arrayStride, glslang::ElpStd140, type.getQualifier().layoutMatrix == glslang::ElmRowMajor);
+ uniformBufferElementSize = type.isArray() ? arrayStride : totalSize;
+ }
+
+ return uint32_t(uniformBufferElementSize);
+ }
+
+ bool GlslToEffectConverter::IsSemanticCompatibleWithUniformBufferDefinition(const EFixedSemantics semantic, const glslang::TType& type)
+ {
+ assert(type.isStruct());
+ const auto& structTypes = *type.getStruct();
+
+ auto checkType = [&structTypes](std::size_t index, auto basicType, auto vectorSize, auto matrixCols, auto matrixRows) {
+ const auto& typeToCheck = *structTypes[index].type;
+ return typeToCheck.getBasicType() == basicType
+ && typeToCheck.getVectorSize() == vectorSize
+ && typeToCheck.getMatrixCols() == matrixCols
+ && typeToCheck.getMatrixRows() == matrixRows;
+ };
+
+ auto isMat44Type = [&checkType](std::size_t index) {
+ return checkType(index, glslang::EbtFloat, 0, 4, 4);
+ };
+
+ auto isVec3Type = [&checkType](std::size_t index) {
+ return checkType(index, glslang::EbtFloat, 3, 0, 0);
+ };
+
+ switch (semantic)
+ {
+ case EFixedSemantics::ModelBlock:
+ return structTypes.size() == 1u
+ && isMat44Type(0u);
+ case EFixedSemantics::CameraBlock:
+ return structTypes.size() == 3u
+ && isMat44Type(0u)
+ && isMat44Type(1u)
+ && isVec3Type(2u);
+ case EFixedSemantics::ModelCameraBlock:
+ return structTypes.size() == 3u
+ && isMat44Type(0u)
+ && isMat44Type(1u)
+ && isMat44Type(2u);
+ case EFixedSemantics::FramebufferBlock:
+ case EFixedSemantics::SceneBlock:
+ return false; // TODO _SEMANTICUBO_
+ default:
+ assert(false);
+ }
+
+ return false;
+ }
+
+ bool GlslToEffectConverter::IsAttributeType(const glslang::TType& type)
+ {
+ const auto storageQualifier = type.getQualifier().storage;
+ //In GLSLang "EvqVaryingIn" is any stages' per vertex input, which is the case for vertex stage's "in" variables aka attributes
+ //but not for uniforms.
+ return (storageQualifier == glslang::EvqVaryingIn);
+ }
}
diff --git a/src/client/internal/glslEffectBlock/GlslToEffectConverter.h b/src/client/internal/glslEffectBlock/GlslToEffectConverter.h
index 429a506fd..fc09fc81c 100644
--- a/src/client/internal/glslEffectBlock/GlslToEffectConverter.h
+++ b/src/client/internal/glslEffectBlock/GlslToEffectConverter.h
@@ -26,7 +26,7 @@ namespace ramses::internal
class GlslToEffectConverter
{
public:
- explicit GlslToEffectConverter(const HashMap& semanticInputs);
+ explicit GlslToEffectConverter(SemanticsMap semanticInputs);
~GlslToEffectConverter();
[[nodiscard]] bool parseShaderProgram(const glslang::TProgram* program);
@@ -38,25 +38,32 @@ namespace ramses::internal
[[nodiscard]] std::optional getGeometryShaderInputType() const;
private:
- HashMap