pax_global_header00006660000000000000000000000064143267106600014517gustar00rootroot0000000000000052 comment=f237a2bfcec0d9b82b90ec9af4af265c40de7183 glad-2.0.2/000077500000000000000000000000001432671066000124275ustar00rootroot00000000000000glad-2.0.2/.github/000077500000000000000000000000001432671066000137675ustar00rootroot00000000000000glad-2.0.2/.github/workflows/000077500000000000000000000000001432671066000160245ustar00rootroot00000000000000glad-2.0.2/.github/workflows/glad2.yaml000066400000000000000000000022211432671066000176760ustar00rootroot00000000000000on: [push, pull_request] name: glad2 jobs: test: name: Test runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Set up Python uses: actions/setup-python@v2 with: python-version: 3 - name: Install Python dependencies run: | python -m pip install --upgrade pip pip install -r requirements.txt pip install -r requirements-test.txt - name: Install dependencies run: | sudo apt-get update sudo apt-get install gcc g++ gcc-mingw-w64 g++-mingw-w64 rustc libglfw3-dev wine winetricks xvfb libxxf86vm-dev libxi-dev libxcursor-dev libxinerama-dev - name: Setup environment run: | mkdir .wine export WINEPREFIX="$(pwd)/.wine" export WINEDLLOVERRIDES="mscoree,mshtml=" winetricks nocrashdialog - name: Run Tests run: PRINT_MESSAGE=1 xvfb-run --auto-servernum ./utility/test.sh - name: Publish Test Results uses: EnricoMi/publish-unit-test-result-action@v1 if: always() with: files: test-report.xml comment_mode: off glad-2.0.2/.gitignore000066400000000000000000000002641432671066000144210ustar00rootroot00000000000000*.pyc /*.xml *.kdev4 build/ *.o *.a a.out *.kdev_include_paths main.c *.diff .idea dist/ *.egg-info /khrplatform.h /eglplatform.h /vk_platform.h /glad-rs/ /rust/ target/ Cargo.lockglad-2.0.2/Jenkinsfile000066400000000000000000000020311432671066000146070ustar00rootroot00000000000000pipeline { agent any stages { stage('Setup') { steps { sh 'git reset --hard HEAD' sh 'git clean -xffd' } } stage('Test') { parallel { stage('Unit') { steps { withPythonEnv('python2') { sh 'python -m pip install -r requirements.txt' sh 'python -m pip install -r requirements-test.txt' sh 'python -m nose --with-xunit || true' junit 'nosetests.xml' } } } stage('Integration') { steps { sh 'docker pull dav1d/glad-test' sh 'docker run --rm -t -v "$WORKSPACE:/mnt" --user "$(id -u):$(id -g)" dav1d/glad-test || true' junit 'test-report.xml' } } } } } } glad-2.0.2/LICENSE000066400000000000000000000057061432671066000134440ustar00rootroot00000000000000The glad source code: The MIT License (MIT) Copyright (c) 2013-2022 David Herberth Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is 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 Software. THE SOFTWARE IS 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. The Khronos Specifications: Copyright (c) 2013-2020 The Khronos Group Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. The EGL Specification and various headers: Copyright (c) 2007-2016 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. glad-2.0.2/MANIFEST.in000066400000000000000000000000741432671066000141660ustar00rootroot00000000000000recursive-include glad *.c *.h *.d *.volt *.rs *.toml *.xml glad-2.0.2/README.md000066400000000000000000000042471432671066000137150ustar00rootroot00000000000000glad ==== Vulkan/GL/GLES/EGL/GLX/WGL Loader-Generator based on the official specifications for multiple languages. Check out the [webservice for glad2](https://glad.sh) to generate the files you need! **NOTE:** This is the 2.0 branch, which adds more functionality but changes the API. Some languages are only available in the [glad1 generator](https://glad.dav1d.de). ## Examples ```c #include // GLFW (include after glad) #include int main() { // -- snip -- GLFWwindow* window = glfwCreateWindow(WIDTH, HEIGHT, "LearnOpenGL", NULL, NULL); glfwMakeContextCurrent(window); int version = gladLoadGL(glfwGetProcAddress); if (version == 0) { printf("Failed to initialize OpenGL context\n"); return -1; } // Successfully loaded OpenGL printf("Loaded OpenGL %d.%d\n", GLAD_VERSION_MAJOR(version), GLAD_VERSION_MINOR(version)); // -- snip -- } ``` The full code: [hellowindow2.cpp](example/c++/hellowindow2.cpp) More examples in the [examples directory](example/) of this repository. ## Documentation The documentation can be found in the [wiki](https://github.com/Dav1dde/glad/wiki). Examples can be found [in the example directory](/example). Some examples: * C/C++ * [GL GLFW](example/c/gl_glfw.c) * [GL GLFW On-Demand loading](example/c/gl_glfw_on_demand.c) * [GL GLFW Multiple Windows/Contexts](example/c++/multiwin_mx/) * [GL SDL2](example/c/gl_sdl2.c) * [Vulkan GLFW](example/c/vulkan_tri_glfw/) * [GLX](example/c/glx.c) * [GLX Modern](example/c/glx_modern.c) * [WGL](example/c/wgl.c) * [EGL X11](example/c/egl_x11/) * Rust * [GL GLFW](example/rust/gl-glfw/) * [GL GLFW Multiple Windows/Contexts](example/rust/gl-glfw-mx/) ## License For the source code and various Khronos files see [LICENSE](/LICENSE). The generated code from glad is any of Public Domain, WTFPL or CC0. Now Khronos has some of their specifications under Apache Version 2.0 license which may have an impact on the generated code, [see this clarifying comment](https://github.com/KhronosGroup/OpenGL-Registry/issues/376#issuecomment-596187053) on the Khronos / OpenGL-Specification issue tracker. glad-2.0.2/cmake/000077500000000000000000000000001432671066000135075ustar00rootroot00000000000000glad-2.0.2/cmake/CMakeLists.txt000066400000000000000000000230251432671066000162510ustar00rootroot00000000000000# This project defines a `glad_add_library` function that will create a glad library. # The created library will automatically generate the glad sources. # Consumers can link to the the library. # # configuration variables: # GLAD_SOURCES_DIR: path to the sources of glad (=python module) # # # glad_add_library( [SHARED|STATIC|MODULE|INTERFACE] [EXCLUDE_FROM_ALL] [MERGE] [QUIET] [LOCATION ] # [LANGUAGE ] [API [ ...]] [EXTENSIONS [ [ ...]]]) # - # Name of the TARGET # - SHARED|STATIC|MODULE|INTERFACE # Type of the library, if none is specified, default BUILD_SHARED_LIBS behavior is honored # - EXCLUDE_FROM_ALL # Exclude building the library from the all target # - MERGE # Merge multiple APIs of the same specitifation into one file. # - QUIET # Disable logging # - LOCATION # Set the location where the generated glad should be saved. # - LANGUAGE # Language of the generated glad sources. # - API [ ...]] # Apis to include in the generated glad library. # - EXTENSIONS [ [ ...]] # Extensions to include in the generated glad library. Pass NONE to add no extensions whatsoever. # # examples: # - create a shared glad library of the core profile of opengl 3.3, having all extensions: # ``` # glad_add_library(glad_gl_core_33 SHARED API gl:core=3.3) # ``` # - create a module glad library of the compatibility profile of opengl 1.0, having only the GL_EXT_COMPRESSION_s3tc extensionsion # ``` # glad_add_library(glad_gl_compat_10 MODULE API gl:compatibility=1.0 EXTENSIONS GL_EXT_COMPRESSION_s3tc) # ``` # - create a static glad library with the vulkan=1.1 cmake_minimum_required(VERSION 3.2) project(glad C) find_package(PythonInterp REQUIRED) set(GLAD_CMAKE_DIR "${CMAKE_CURRENT_LIST_DIR}" CACHE STRING "Directory containing glad generator CMakeLists.txt") set(GLAD_SOURCES_DIR "${GLAD_CMAKE_DIR}/../" CACHE STRING "Directory containing glad sources (python modules), used as working directory") mark_as_advanced(GLAD_CMAKE_DIR) # Extract specification, profile and version from a string # examples: # gl:core=3.3 => SPEC=gl PROFILE=core VERSION=3.3 # gl:compatibility=4.0 => SPEC=gl PROFILE=compatibility VERSION=4.0 # vulkan=1.1 => SPEC=vulkan PROFILE="" VERSION=1.1 function(__glad_extract_spec_profile_version SPEC PROFILE VERSION STRING) string(REPLACE "=" ";" SPEC_PROFILE_VERSION_LIST "${STRING}") list(LENGTH SPEC_PROFILE_VERSION_LIST SPV_LENGTH) if(SPV_LENGTH LESS 2) message(FATAL_ERROR "${SPEC} is an invalid SPEC") endif() list(GET SPEC_PROFILE_VERSION_LIST 0 SPEC_PROFILE_STR) list(GET SPEC_PROFILE_VERSION_LIST 1 VERSION_STR) string(REPLACE ":" ";" SPEC_PROFILE_LIST "${SPEC_PROFILE_STR}") list(LENGTH SPEC_PROFILE_LIST SP_LENGTH) if(SP_LENGTH LESS 2) list(GET SPEC_PROFILE_LIST 0 SPEC_STR) set(PROFILE_STR "") else() list(GET SPEC_PROFILE_LIST 0 SPEC_STR) list(GET SPEC_PROFILE_LIST 1 PROFILE_STR) endif() set("${SPEC}" "${SPEC_STR}" PARENT_SCOPE) set("${PROFILE}" "${PROFILE_STR}" PARENT_SCOPE) set("${VERSION}" "${VERSION_STR}" PARENT_SCOPE) endfunction() # Calculate the argument and generated files for the "c" subparser for glad function(__glad_c_library CARGS CFILES) cmake_parse_arguments(GGC "ALIAS;DEBUG;HEADERONLY;LOADER;MX;MXGLOBAL;ON_DEMAND" "" "API" ${ARGN}) if(NOT GGC_API) message(FATAL_ERROR "Need API") endif() set(GGC_FILES "") foreach(API ${GGC_API}) __glad_extract_spec_profile_version(SPEC PROFILE VERSION "${API}") if(SPEC STREQUAL "egl") list(APPEND GGC_FILES "${GLAD_DIR}/include/EGL/eglplatform.h" "${GLAD_DIR}/include/KHR/khrplatform.h" "${GLAD_DIR}/include/glad/egl.h" "${GLAD_DIR}/src/egl.c" ) elseif(SPEC STREQUAL "vulkan") list(APPEND GGC_FILES "${GLAD_DIR}/include/vk_platform.h" "${GLAD_DIR}/include/glad/vulkan.h" "${GLAD_DIR}/src/vulkan.c" ) elseif(SPEC STREQUAL "gl") list(APPEND GGC_FILES "${GLAD_DIR}/include/KHR/khrplatform.h" "${GLAD_DIR}/include/glad/gl.h" "${GLAD_DIR}/src/gl.c" ) elseif(SPEC STREQUAL "gles1") list(APPEND GGC_FILES "${GLAD_DIR}/include/KHR/khrplatform.h" "${GLAD_DIR}/include/glad/gles1.h" "${GLAD_DIR}/src/gles1.c" ) elseif(SPEC STREQUAL "gles2") list(APPEND GGC_FILES "${GLAD_DIR}/include/KHR/khrplatform.h" "${GLAD_DIR}/include/glad/gles2.h" "${GLAD_DIR}/src/gles2.c" ) elseif(SPEC STREQUAL "glsc2") list(APPEND GGC_FILES "${GLAD_DIR}/include/KHR/khrplatform.h" "${GLAD_DIR}/include/glad/glsc2.h" "${GLAD_DIR}/src/glsc2.c" ) elseif(SPEC STREQUAL "wgl") list(APPEND GGC_FILES "${GLAD_DIR}/include/glad/wgl.h" "${GLAD_DIR}/src/wgl.c" ) elseif(SPEC STREQUAL "glx") list(APPEND GGC_FILES "${GLAD_DIR}/include/glad/glx.h" "${GLAD_DIR}/src/glx.c" ) else() message(FATAL_ERROR "Unknown SPEC: '${SPEC}'") endif() endforeach() set(GGC_ARGS "") if(GGC_ALIAS) list(APPEND GGC_ARGS "--alias") endif() if(GGC_DEBUG) list(APPEND GGC_ARGS "--debug") endif() if(GGC_HEADERONLY) list(APPEND GGC_ARGS "--header-only") endif() if(GGC_LOADER) list(APPEND GGC_ARGS "--loader") endif() if(GGC_MX) list(APPEND GGC_ARGS "--mx") endif() if(GGC_MXGLOBAL) list(APPEND GGC_ARGS "--mx-global") endif() if(GGC_ON_DEMAND) list(APPEND GGC_ARGS "--on-demand") endif() set("${CARGS}" "${GGC_ARGS}" PARENT_SCOPE) set("${CFILES}" "${GGC_FILES}" PARENT_SCOPE) endfunction() # Create a glad library named "${TARGET}" function(glad_add_library TARGET) message(STATUS "Glad Library \'${TARGET}\'") cmake_parse_arguments(GG "MERGE;QUIET;REPRODUCIBLE;STATIC;SHARED;MODULE;INTERFACE;EXCLUDE_FROM_ALL" "LOCATION;LANGUAGE" "API;EXTENSIONS" ${ARGN}) if(NOT GG_LOCATION) set(GG_LOCATION "${CMAKE_CURRENT_BINARY_DIR}/gladsources/${TARGET}") endif() set(GLAD_DIR "${GG_LOCATION}") if(NOT IS_DIRECTORY "${GLAD_DIR}") file(MAKE_DIRECTORY "${GLAD_DIRECTORY}") endif() set(GLAD_ARGS --out-path "${GLAD_DIR}") if(NOT GG_API) message(FATAL_ERROR "Need API") endif() string(REPLACE ";" "," GLAD_API "${GG_API}") list(APPEND GLAD_ARGS --api "${GLAD_API}") if(GG_EXTENSIONS) list(FIND GG_EXTENSIONS NONE GG_EXT_NONE) if(GG_EXT_NONE GREATER -1) set(GLAD_EXTENSIONS " ") else() list(REMOVE_DUPLICATES GG_EXTENSIONS) list(JOIN GG_EXTENSIONS "," GLAD_EXTENSIONS) endif() list(APPEND GLAD_ARGS --extensions "${GLAD_EXTENSIONS}") endif() if(GG_QUIET) list(APPEND GLAD_ARGS --quiet) endif() if(GG_MERGE) list(APPEND GLAD_ARGS --merge) endif() if(GG_REPRODUCIBLE) list(APPEND GLAD_ARGS --reproducible) endif() set(GLAD_LANGUAGE "c") if(GG_LANGUAGE) string(TOLOWER "${GG_LANGUAGE}" "${GLAD_LANGUAGE}") endif() if(GLAD_LANGUAGE STREQUAL "c") __glad_c_library(LANG_ARGS GLAD_FILES ${GG_UNPARSED_ARGUMENTS} API ${GG_API}) else() message(FATAL_ERROR "Unknown LANGUAGE") endif() list(APPEND GLAD_ARGS ${GLAD_LANGUAGE} ${LANG_ARGS}) string(REPLACE "${GLAD_DIR}" GLAD_DIRECTORY GLAD_ARGS_UNIVERSAL "${GLAD_ARGS}") set(GLAD_ARGS_PATH "${GLAD_DIR}/args.txt") # add make custom target add_custom_command( OUTPUT ${GLAD_FILES} ${GLAD_ARGS_PATH} COMMAND echo Cleaning ${GLAD_DIR} COMMAND ${CMAKE_COMMAND} -E remove_directory ${GLAD_DIR} COMMAND ${CMAKE_COMMAND} -E make_directory ${GLAD_DIR} COMMAND echo Generating with args ${GLAD_ARGS} COMMAND ${PYTHON_EXECUTABLE} -m glad ${GLAD_ARGS} COMMAND echo Writing ${GLAD_ARGS_PATH} COMMAND echo ${GLAD_ARGS} > ${GLAD_ARGS_PATH} WORKING_DIRECTORY ${GLAD_SOURCES_DIR} COMMENT "${TARGET}-generate" USES_TERMINAL ) set(GLAD_ADD_LIBRARY_ARGS "") if(GG_SHARED) list(APPEND GLAD_ADD_LIBRARY_ARGS SHARED) elseif(GG_STATIC) list(APPEND GLAD_ADD_LIBRARY_ARGS STATIC) elseif(GG_MODULE) list(APPEND GLAD_ADD_LIBRARY_ARGS MODULE) elseif(GG_INTERFACE) list(APPEND GLAD_ADD_LIBRARY_ARGS INTERFACE) endif() if(GG_EXCLUDE_FROM_ALL) list(APPEND GLAD_ADD_LIBRARY_ARGS EXCLUDE_FROM_ALL) endif() add_library("${TARGET}" ${GLAD_ADD_LIBRARY_ARGS} ${GLAD_FILES} ) target_include_directories("${TARGET}" PUBLIC "${GLAD_DIR}/include" ) target_link_libraries("${TARGET}" PUBLIC ${CMAKE_DL_LIBS} ) if(GG_SHARED) target_compile_definitions("${TARGET}" PUBLIC GLAD_API_CALL_EXPORT) set_target_properties("${TARGET}" PROPERTIES DEFINE_SYMBOL "GLAD_API_CALL_EXPORT_BUILD" ) endif() endfunction() glad-2.0.2/example/000077500000000000000000000000001432671066000140625ustar00rootroot00000000000000glad-2.0.2/example/c++/000077500000000000000000000000001432671066000144325ustar00rootroot00000000000000glad-2.0.2/example/c++/hellowindow2.cpp000066400000000000000000000052271432671066000175610ustar00rootroot00000000000000#include // GLAD #include // GLFW (include after glad) #include // This example is taken from http://learnopengl.com/ // http://learnopengl.com/code_viewer.php?code=getting-started/hellowindow2 // The code originally used GLEW, I replaced it with Glad // Compile: // g++ example/c++/hellowindow2.cpp -Ibuild/include build/src/gl.c -lglfw -ldl // Function prototypes void key_callback(GLFWwindow* window, int key, int scancode, int action, int mode); // Window dimensions const GLuint WIDTH = 800, HEIGHT = 600; // The MAIN function, from here we start the application and run the game loop int main() { std::cout << "Starting GLFW context, OpenGL 3.3" << std::endl; // Init GLFW glfwInit(); // Set all the required options for GLFW glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); glfwWindowHint(GLFW_RESIZABLE, GL_FALSE); // Create a GLFWwindow object that we can use for GLFW's functions GLFWwindow* window = glfwCreateWindow(WIDTH, HEIGHT, "LearnOpenGL", NULL, NULL); glfwMakeContextCurrent(window); if (window == NULL) { std::cout << "Failed to create GLFW window" << std::endl; glfwTerminate(); return -1; } // Set the required callback functions glfwSetKeyCallback(window, key_callback); // Load OpenGL functions, gladLoadGL returns the loaded version, 0 on error. int version = gladLoadGL(glfwGetProcAddress); if (version == 0) { std::cout << "Failed to initialize OpenGL context" << std::endl; return -1; } // Successfully loaded OpenGL std::cout << "Loaded OpenGL " << GLAD_VERSION_MAJOR(version) << "." << GLAD_VERSION_MINOR(version) << std::endl; // Define the viewport dimensions glViewport(0, 0, WIDTH, HEIGHT); // Game loop while (!glfwWindowShouldClose(window)) { // Check if any events have been activated (key pressed, mouse moved etc.) and call corresponding response functions glfwPollEvents(); // Render // Clear the colorbuffer glClearColor(0.2f, 0.3f, 0.3f, 1.0f); glClear(GL_COLOR_BUFFER_BIT); // Swap the screen buffers glfwSwapBuffers(window); } // Terminates GLFW, clearing any resources allocated by GLFW. glfwTerminate(); return 0; } // Is called whenever a key is pressed/released via GLFW void key_callback(GLFWwindow* window, int key, int scancode, int action, int mode) { if (key == GLFW_KEY_ESCAPE && action == GLFW_PRESS) glfwSetWindowShouldClose(window, GL_TRUE); } glad-2.0.2/example/c++/hellowindow2_macro.cpp000066400000000000000000000073111432671066000207360ustar00rootroot00000000000000#include // GLAD #define GLAD_GL_IMPLEMENTATION #include // GLFW #include // This example is taken from http://learnopengl.com/ // http://learnopengl.com/code_viewer.php?code=getting-started/hellowindow2 // The code originally used GLEW, I replaced it with Glad // Compile: // g++ example/c++/hellowindow2.cpp -Ibuild/include build/src/glad.c -lglfw -ldl // Function prototypes void key_callback(GLFWwindow* window, int key, int scancode, int action, int mode); // Window dimensions const GLuint WIDTH = 800, HEIGHT = 600; #ifdef GLAD_OPTION_GL_DEBUG // Define a custom callback for demonstration purposes void pre_gl_call(const char *name, void *funcptr, int len_args, ...) { #ifdef GLAD_OPTION_GL_MX printf("Current GL Context: %p -> ", gladGetGLContext()); #endif printf("Calling: %s at %p (%d arguments)\n", name, funcptr, len_args); } #endif // The MAIN function, from here we start the application and run the game loop int main() { std::cout << "Starting GLFW context, OpenGL 3.3" << std::endl; // Init GLFW glfwInit(); // Set all the required options for GLFW glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); glfwWindowHint(GLFW_RESIZABLE, GL_FALSE); // Create a GLFWwindow object that we can use for GLFW's functions GLFWwindow* window = glfwCreateWindow(WIDTH, HEIGHT, "LearnOpenGL", NULL, NULL); glfwMakeContextCurrent(window); if (window == NULL) { std::cout << "Failed to create GLFW window" << std::endl; glfwTerminate(); return -1; } // Set the required callback functions glfwSetKeyCallback(window, key_callback); #ifdef GLAD_OPTION_GL_LOADER printf("Using internal loader.\n"); #endif #ifdef GLAD_OPTION_GL_MX GladGLContext context = {}; #ifdef GLAD_OPTION_GL_LOADER int version = gladLoaderLoadGLContext(&context); #else int version = gladLoadGLContext(&context, glfwGetProcAddress); #endif #else #ifdef GLAD_OPTION_GL_LOADER int version = gladLoaderLoadGL(); #else int version = gladLoadGL(glfwGetProcAddress); #endif #endif if (version == 0) { std::cout << "Failed to initialize OpenGL context" << std::endl; return -1; } std::cout << "Loaded OpenGL " << GLAD_VERSION_MAJOR(version) << "." << GLAD_VERSION_MINOR(version) << std::endl; #ifdef GLAD_OPTION_GL_DEBUG // before every opengl call call pre_gl_call glad_set_gl_pre_callback(pre_gl_call); // don't use the callbacks for glClear and glClearColor #ifdef GLAD_OPTION_GL_MX_GLOBAL glad_debug_glClear = gladGetGLContext()->Clear; glad_debug_glClearColor = gladGetGLContext()->ClearColor; #else glad_debug_glClear = glad_glClear; glad_debug_glClearColor = glad_glClearColor; #endif #endif // Define the viewport dimensions glViewport(0, 0, WIDTH, HEIGHT); // Game loop while (!glfwWindowShouldClose(window)) { // Check if any events have been activated (key pressed, mouse moved etc.) and call corresponding response functions glfwPollEvents(); // Render // Clear the colorbuffer glClearColor(0.2f, 0.3f, 0.3f, 1.0f); glClear(GL_COLOR_BUFFER_BIT); // Swap the screen buffers glfwSwapBuffers(window); } // Terminates GLFW, clearing any resources allocated by GLFW. glfwTerminate(); return 0; } // Is called whenever a key is pressed/released via GLFW void key_callback(GLFWwindow* window, int key, int scancode, int action, int mode) { if (key == GLFW_KEY_ESCAPE && action == GLFW_PRESS) glfwSetWindowShouldClose(window, GL_TRUE); } glad-2.0.2/example/c++/hellowindow2_mx.cpp000066400000000000000000000051341432671066000202620ustar00rootroot00000000000000#include // GLAD #include // GLFW #include // This example is taken from http://learnopengl.com/ // http://learnopengl.com/code_viewer.php?code=getting-started/hellowindow2 // The code originally used GLEW, I replaced it with Glad // Compile: // g++ example/c++/hellowindow2.cpp -Ibuild/include build/src/glad.c -lglfw -ldl // Function prototypes void key_callback(GLFWwindow* window, int key, int scancode, int action, int mode); void draw(GLFWwindow *window, GladGLContext *context); // Window dimensions const GLuint WIDTH = 800, HEIGHT = 600; // The MAIN function, from here we start the application and run the game loop int main() { std::cout << "Starting GLFW context, OpenGL 3.3" << std::endl; // Init GLFW glfwInit(); // Set all the required options for GLFW glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); glfwWindowHint(GLFW_RESIZABLE, GL_FALSE); // Create a GLFWwindow object that we can use for GLFW's functions GLFWwindow* window = glfwCreateWindow(WIDTH, HEIGHT, "LearnOpenGL", NULL, NULL); glfwMakeContextCurrent(window); if (window == NULL) { std::cout << "Failed to create GLFW window" << std::endl; glfwTerminate(); return -1; } // Set the required callback functions glfwSetKeyCallback(window, key_callback); GladGLContext context = {}; int version = gladLoadGLContext(&context, glfwGetProcAddress); if (version == 0) { std::cout << "Failed to initialize OpenGL context" << std::endl; return -1; } draw(window, &context); return 0; } void draw(GLFWwindow *window, GladGLContext *gl) { // Define the viewport dimensions gl->Viewport(0, 0, WIDTH, HEIGHT); // Game loop while (!glfwWindowShouldClose(window)) { // Check if any events have been activated (key pressed, mouse moved etc.) and call corresponding response functions glfwPollEvents(); // Render // Clear the colorbuffer gl->ClearColor(0.2f, 0.3f, 0.3f, 1.0f); gl->Clear(GL_COLOR_BUFFER_BIT); // Swap the screen buffers glfwSwapBuffers(window); } // Terminates GLFW, clearing any resources allocated by GLFW. glfwTerminate(); } // Is called whenever a key is pressed/released via GLFW void key_callback(GLFWwindow* window, int key, int scancode, int action, int mode) { if (key == GLFW_KEY_ESCAPE && action == GLFW_PRESS) glfwSetWindowShouldClose(window, GL_TRUE); } glad-2.0.2/example/c++/multiwin_mx/000077500000000000000000000000001432671066000170065ustar00rootroot00000000000000glad-2.0.2/example/c++/multiwin_mx/CMakeLists.txt000066400000000000000000000006651432671066000215550ustar00rootroot00000000000000cmake_minimum_required(VERSION 3.1) project(glad_examples_c_multiwin_mx C CXX) find_package(glfw3 REQUIRED) set(GLAD_SOURCES_DIR "${PROJECT_SOURCE_DIR}/../../..") add_subdirectory("${GLAD_SOURCES_DIR}/cmake" glad_cmake) glad_add_library(glad_gl_core_mx_33 REPRODUCIBLE MX API gl:core=3.3) add_executable(multiwin_mx multiwin_mx.cpp ) target_link_libraries(multiwin_mx PUBLIC glad_gl_core_mx_33 glfw ) glad-2.0.2/example/c++/multiwin_mx/multiwin_mx.cpp000066400000000000000000000060021432671066000220640ustar00rootroot00000000000000#include #include #include // Function prototypes GLFWwindow* create_window(const char *name, int major, int minor); GladGLContext* create_context(GLFWwindow *window); void free_context(GladGLContext *context); void draw(GLFWwindow *window, GladGLContext *context, float r, float g, float b); void key_callback(GLFWwindow* window, int key, int scancode, int action, int mode); // Window dimensions const GLuint WIDTH = 400, HEIGHT = 300; int main() { glfwInit(); GLFWwindow *window1 = create_window("Window 1", 3, 3); GLFWwindow *window2 = create_window("Window 2", 3, 2); if (!window1 || !window2) { std::cout << "Failed to create GLFW window" << std::endl; glfwTerminate(); return -1; } glfwSetKeyCallback(window1, key_callback); glfwSetKeyCallback(window2, key_callback); GladGLContext *context1 = create_context(window1); GladGLContext *context2 = create_context(window2); if (!context1 || !context2) { std::cout << "Failed to initialize GL contexts" << std::endl; free_context(context1); free_context(context2); } glfwMakeContextCurrent(window1); context1->Viewport(0, 0, WIDTH, HEIGHT); glfwMakeContextCurrent(window2); context2->Viewport(0, 0, WIDTH, HEIGHT); while (!glfwWindowShouldClose(window1) && !glfwWindowShouldClose(window2)) { glfwPollEvents(); draw(window1, context1, 0.5, 0.2, 0.6); draw(window2, context2, 0.0, 0.1, 0.8); } free_context(context1); free_context(context2); glfwTerminate(); return 0; } GLFWwindow* create_window(const char *name, int major, int minor) { std::cout << "Creating Window, OpenGL " << major << "." << minor << ": " << name << std::endl; glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, major); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, minor); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); glfwWindowHint(GLFW_RESIZABLE, GL_FALSE); GLFWwindow* window = glfwCreateWindow(WIDTH, HEIGHT, name, NULL, NULL); return window; } GladGLContext* create_context(GLFWwindow *window) { glfwMakeContextCurrent(window); GladGLContext* context = (GladGLContext*) calloc(1, sizeof(GladGLContext)); if (!context) return NULL; int version = gladLoadGLContext(context, glfwGetProcAddress); std::cout << "Loaded OpenGL " << GLAD_VERSION_MAJOR(version) << "." << GLAD_VERSION_MINOR(version) << std::endl; return context; } void free_context(GladGLContext *context) { free(context); } void draw(GLFWwindow *window, GladGLContext *gl, float r, float g, float b) { glfwMakeContextCurrent(window); gl->ClearColor(r, g, b, 1.0f); gl->Clear(GL_COLOR_BUFFER_BIT); glfwSwapBuffers(window); } // Is called whenever a key is pressed/released via GLFW void key_callback(GLFWwindow* window, int key, int scancode, int action, int mode) { if (key == GLFW_KEY_ESCAPE && action == GLFW_PRESS) glfwSetWindowShouldClose(window, GL_TRUE); } glad-2.0.2/example/c/000077500000000000000000000000001432671066000143045ustar00rootroot00000000000000glad-2.0.2/example/c/egl_gles2_glfw_emscripten.c000066400000000000000000000040651432671066000215700ustar00rootroot00000000000000#include #include #include #include #include #define GLFW_INCLUDE_NONE 1 #include #ifdef __EMSCRIPTEN__ #include #else #define GLFW_EXPOSE_NATIVE_EGL 1 #include #endif const GLuint WIDTH = 800, HEIGHT = 600; void key_callback(GLFWwindow* window, int key, int scancode, int action, int mode) { if (key == GLFW_KEY_ESCAPE && action == GLFW_PRESS) glfwSetWindowShouldClose(window, GL_TRUE); } void render_frame(GLFWwindow *window) { glfwPollEvents(); glClearColor(0.7f, 0.9f, 0.1f, 1.0f); glClear(GL_COLOR_BUFFER_BIT); glfwSwapBuffers(window); } int main(int argc, char **argv) { glfwInit(); srand(time(NULL)); glfwWindowHint(GLFW_CLIENT_API, GLFW_OPENGL_ES_API); glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 2); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 0); glfwWindowHint(GLFW_CONTEXT_CREATION_API, GLFW_EGL_CONTEXT_API); glfwWindowHint(GLFW_RESIZABLE, GL_FALSE); GLFWwindow* window = glfwCreateWindow(WIDTH, HEIGHT, "[glad] EGL with GLFW", NULL, NULL); glfwMakeContextCurrent(window); glfwSetKeyCallback(window, key_callback); #ifndef __EMSCRIPTEN__ /* Load EGL */ EGLDisplay display = glfwGetEGLDisplay(); int egl_version = gladLoaderLoadEGL(display); printf("EGL %d.%d\n", GLAD_VERSION_MAJOR(egl_version), GLAD_VERSION_MINOR(egl_version)); #endif /* Load GLES */ int gles_version = 0; if (rand() % 100 < 50) { printf("-> using GLFW to load GLES2\n"); gles_version = gladLoadGLES2(glfwGetProcAddress); } else { printf("-> using GLAD loader to load GLES2\n"); gles_version = gladLoaderLoadGLES2(); } printf("GLES %d.%d\n", GLAD_VERSION_MAJOR(gles_version), GLAD_VERSION_MINOR(gles_version)); #ifdef __EMSCRIPTEN__ emscripten_set_main_loop_arg((em_arg_callback_func) render_frame, window, 60, 1); #else while (!glfwWindowShouldClose(window)) { render_frame(window); } #endif glfwTerminate(); return 0; } glad-2.0.2/example/c/egl_x11/000077500000000000000000000000001432671066000155445ustar00rootroot00000000000000glad-2.0.2/example/c/egl_x11/CMakeLists.txt000066400000000000000000000010051432671066000203000ustar00rootroot00000000000000cmake_minimum_required(VERSION 3.1) project(glad_examples_c_egl_x11 C) find_package(X11 REQUIRED) set(GLAD_SOURCES_DIR "${PROJECT_SOURCE_DIR}/../../..") add_subdirectory("${GLAD_SOURCES_DIR}/cmake" glad_cmake) glad_add_library(glad_egl_15_gles2_20 REPRODUCIBLE LOADER API egl=1.5 gles2=2.0) add_executable(egl_x11 egl_x11.c ) target_include_directories(egl_x11 PUBLIC ${X11_INCLUDE_DIR} ) target_link_libraries(egl_x11 PUBLIC glad_egl_15_gles2_20 ${X11_LIBRARIES} ) glad-2.0.2/example/c/egl_x11/egl_x11.c000066400000000000000000000104711432671066000171530ustar00rootroot00000000000000// gcc example/c/egl_x11.c -Ibuild/include build/src/*.c -ldl -lX11 #include #include #include #include #include #include #include #include #include const int window_width = 800, window_height = 480; int main(void) { Display *display = XOpenDisplay(NULL); if (display == NULL) { printf("cannot connect to X server\n"); return 1; } int screen = DefaultScreen(display); Window root = RootWindow(display, screen); Visual *visual = DefaultVisual(display, screen); Colormap colormap = XCreateColormap(display, root, visual, AllocNone); XSetWindowAttributes attributes; attributes.colormap = colormap; attributes.event_mask = ExposureMask | KeyPressMask | KeyReleaseMask; Window window = XCreateWindow(display, root, 0, 0, window_width, window_height, 0, DefaultDepth(display, screen), InputOutput, visual, CWColormap | CWEventMask, &attributes); XFreeColormap(display, colormap); XMapWindow(display, window); XStoreName(display, window, "[glad] EGL with X11"); if (!window) { printf("Unable to create window.\n"); return 1; } int egl_version = gladLoaderLoadEGL(NULL); if (!egl_version) { printf("Unable to load EGL.\n"); return 1; } printf("Loaded EGL %d.%d on first load.\n", GLAD_VERSION_MAJOR(egl_version), GLAD_VERSION_MINOR(egl_version)); EGLDisplay egl_display = eglGetDisplay((EGLNativeDisplayType) display); if (egl_display == EGL_NO_DISPLAY) { printf("Got no EGL display.\n"); return 1; } if (!eglInitialize(egl_display, NULL, NULL)) { printf("Unable to initialize EGL\n"); return 1; } egl_version = gladLoaderLoadEGL(egl_display); if (!egl_version) { printf("Unable to reload EGL.\n"); return 1; } printf("Loaded EGL %d.%d after reload.\n", GLAD_VERSION_MAJOR(egl_version), GLAD_VERSION_MINOR(egl_version)); EGLint attr[] = { EGL_BUFFER_SIZE, 16, EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT, EGL_NONE }; EGLConfig egl_config; EGLint num_config; if (!eglChooseConfig(egl_display, attr, &egl_config, 1, &num_config)) { printf("Failed to choose config (eglError: %d)\n", eglGetError()); return 1; } if (num_config != 1) { printf("Didn't get exactly one config, but %d\n", num_config); return 1; } EGLSurface egl_surface = eglCreateWindowSurface(egl_display, egl_config, window, NULL); if (egl_surface == EGL_NO_SURFACE) { printf("Unable to create EGL surface (eglError: %d)\n", eglGetError()); return 1; } EGLint ctxattr[] = { EGL_CONTEXT_CLIENT_VERSION, 2, EGL_NONE }; EGLContext egl_context = eglCreateContext(egl_display, egl_config, EGL_NO_CONTEXT, ctxattr); if (egl_context == EGL_NO_CONTEXT) { printf("Unable to create EGL context (eglError: %d)\n", eglGetError()); return 1; } // activate context before loading GL functions using glad eglMakeCurrent(egl_display, egl_surface, egl_surface, egl_context); int gles_version = gladLoaderLoadGLES2(); if (!gles_version) { printf("Unable to load GLES.\n"); return 1; } printf("Loaded GLES %d.%d.\n", GLAD_VERSION_MAJOR(gles_version), GLAD_VERSION_MINOR(gles_version)); XWindowAttributes gwa; XGetWindowAttributes(display, window, &gwa); glViewport(0, 0, gwa.width, gwa.height); bool quit = false; while (!quit) { while (XPending(display)) { XEvent xev; XNextEvent(display, &xev); if (xev.type == KeyPress) { quit = true; } } glClearColor(0.8, 0.6, 0.7, 1.0); glClear(GL_COLOR_BUFFER_BIT); eglSwapBuffers(egl_display, egl_surface); usleep(1000 * 10); } gladLoaderUnloadGLES2(); eglDestroyContext(egl_display, egl_context); eglDestroySurface(egl_display, egl_surface); eglTerminate(egl_display); gladLoaderUnloadEGL(); XDestroyWindow(display, window); XCloseDisplay(display); return 0; } glad-2.0.2/example/c/gl_glfw.c000066400000000000000000000020631432671066000160720ustar00rootroot00000000000000#include #include #include #include const GLuint WIDTH = 800, HEIGHT = 600; void key_callback(GLFWwindow* window, int key, int scancode, int action, int mode) { if (key == GLFW_KEY_ESCAPE && action == GLFW_PRESS) glfwSetWindowShouldClose(window, GL_TRUE); } int main(void) { glfwInit(); glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 2); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); GLFWwindow* window = glfwCreateWindow(WIDTH, HEIGHT, "[glad] GL with GLFW", NULL, NULL); glfwMakeContextCurrent(window); glfwSetKeyCallback(window, key_callback); int version = gladLoadGL(glfwGetProcAddress); printf("GL %d.%d\n", GLAD_VERSION_MAJOR(version), GLAD_VERSION_MINOR(version)); while (!glfwWindowShouldClose(window)) { glfwPollEvents(); glClearColor(0.7f, 0.9f, 0.1f, 1.0f); glClear(GL_COLOR_BUFFER_BIT); glfwSwapBuffers(window); } glfwTerminate(); return 0; } glad-2.0.2/example/c/gl_glfw_on_demand.c000066400000000000000000000040141432671066000200740ustar00rootroot00000000000000// This example requires you to generate glad with the --on-demand option and optionally --loader and --debug. // gcc -o gl_glfw_on_demand example/c/gl_glfw_on_demand.c build/src/gl.c -Ibuild/include -ldl -lglfw #include #include #include #include const GLuint WIDTH = 800, HEIGHT = 600; static void pre_call_gl_callback(const char *name, GLADapiproc apiproc, int len_args, ...) { printf("about to call gl func: %s\n", name); } void key_callback(GLFWwindow* window, int key, int scancode, int action, int mode) { if (action != GLFW_PRESS) { return; } if (key == GLFW_KEY_ESCAPE) { glfwSetWindowShouldClose(window, GL_TRUE); #ifdef GLAD_OPTION_GL_DEBUG } else if (key == GLFW_KEY_H) { printf("Installing glad debug function pointers\n"); gladInstallGLDebug(); } else if (key == GLFW_KEY_J) { printf("Uninstalling glad debug function pointers\n"); gladUninstallGLDebug(); #endif } } int main(void) { glfwInit(); glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 2); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); GLFWwindow* window = glfwCreateWindow(WIDTH, HEIGHT, "[glad] GL with GLFW", NULL, NULL); glfwMakeContextCurrent(window); glfwSetKeyCallback(window, key_callback); // If glad is generated with the --loader and --on-demand option // you don't have to call any glad function. // It is recommended to use the loader provided by your context creation library // instead of the glad loader. #ifndef GLAD_GL_LOADER gladSetGLOnDemandLoader(glfwGetProcAddress); #endif #ifdef GLAD_OPTION_GL_DEBUG gladUninstallGLDebug(); gladSetGLPreCallback(pre_call_gl_callback); #endif while (!glfwWindowShouldClose(window)) { glfwPollEvents(); glClearColor(0.7f, 0.9f, 0.1f, 1.0f); glClear(GL_COLOR_BUFFER_BIT); glfwSwapBuffers(window); } glfwTerminate(); return 0; } glad-2.0.2/example/c/gl_sdl2.c000066400000000000000000000032761432671066000160060ustar00rootroot00000000000000// gcc example/c/gl_sdl2.c build/src/gl.c -Ibuild/include `sdl2-config --libs --cflags` -ldl #include #include #include #include #include const GLuint WIDTH = 800, HEIGHT = 600; int main(void) { // code without checking for errors SDL_Init(SDL_INIT_VIDEO); SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1); SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3); SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 2); SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE); SDL_Window *window = SDL_CreateWindow( "[glad] GL with SDL", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, WIDTH, HEIGHT, SDL_WINDOW_OPENGL | SDL_WINDOW_SHOWN ); SDL_GLContext context = SDL_GL_CreateContext(window); int version = gladLoadGL((GLADloadfunc) SDL_GL_GetProcAddress); printf("GL %d.%d\n", GLAD_VERSION_MAJOR(version), GLAD_VERSION_MINOR(version)); int exit = 0; while(!exit) { SDL_Event event; while (SDL_PollEvent(&event)) { switch(event.type) { case SDL_QUIT: exit = 1; break; case SDL_KEYUP: if (event.key.keysym.sym == SDLK_ESCAPE) { exit = 1; } break; default: break; } } glClearColor(0.7f, 0.9f, 0.1f, 1.0f); glClear(GL_COLOR_BUFFER_BIT); SDL_GL_SwapWindow(window); SDL_Delay(1); } SDL_GL_DeleteContext(context); SDL_DestroyWindow(window); SDL_Quit(); return 0; } glad-2.0.2/example/c/gles2_glfw_emscripten.c000066400000000000000000000026711432671066000207420ustar00rootroot00000000000000#include #include #include #define GLFW_INCLUDE_NONE 1 #include #ifdef __EMSCRIPTEN__ #include #endif const GLuint WIDTH = 800, HEIGHT = 600; void key_callback(GLFWwindow* window, int key, int scancode, int action, int mode) { if (key == GLFW_KEY_ESCAPE && action == GLFW_PRESS) glfwSetWindowShouldClose(window, GL_TRUE); } void render_frame(GLFWwindow *window) { glfwPollEvents(); glClearColor(0.7f, 0.9f, 0.1f, 1.0f); glClear(GL_COLOR_BUFFER_BIT); glfwSwapBuffers(window); } int main(void) { glfwInit(); glfwWindowHint(GLFW_CLIENT_API, GLFW_OPENGL_ES_API); glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 2); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 0); glfwWindowHint(GLFW_CONTEXT_CREATION_API, GLFW_EGL_CONTEXT_API); glfwWindowHint(GLFW_RESIZABLE, GL_FALSE); GLFWwindow *window = glfwCreateWindow(WIDTH, HEIGHT, "[glad] GLES2 with GLFW", NULL, NULL); glfwMakeContextCurrent(window); glfwSetKeyCallback(window, key_callback); /* Load GLES */ int gles_version = gladLoadGLES2(glfwGetProcAddress); printf("GLES %d.%d\n", GLAD_VERSION_MAJOR(gles_version), GLAD_VERSION_MINOR(gles_version)); #ifdef __EMSCRIPTEN__ emscripten_set_main_loop_arg((em_arg_callback_func) render_frame, window, 60, 1); #else while (!glfwWindowShouldClose(window)) { render_frame(window); } #endif return 0; } glad-2.0.2/example/c/glut.c000066400000000000000000000034071432671066000154270ustar00rootroot00000000000000#include #include #include #ifdef __APPLE__ #include #else #include #endif // This file is a modified version of gl3w's test.c // https://github.com/skaslev/gl3w/blob/master/src/test.c // Compile: // gcc example/c/simple.c -Ibuild/include build/src/glad.c -lglut -ldl static int width = 600, height = 600; static void display(void) { glClearColor(1.0f, 0.2f, 0.7f, 1.0f); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glutSwapBuffers(); glutPostRedisplay(); } static void reshape(int w, int h) { width = w > 1 ? w : 1; height = h > 1 ? h : 1; glViewport(0, 0, width, height); glClearDepth(1.0); glClearColor(0.0f, 0.0f, 0.0f, 0.0f); glEnable(GL_DEPTH_TEST); } static void keyboard(unsigned char key, int x, int y) { switch (key) { case 27: // Escape key glutDestroyWindow(1); return; } glutPostRedisplay(); } int main(int argc, char **argv) { glutInit(&argc, argv); glutInitDisplayMode(GLUT_RGBA | GLUT_DEPTH | GLUT_DOUBLE); glutInitWindowSize(width, height); glutCreateWindow("cookie"); glutReshapeFunc(reshape); glutDisplayFunc(display); glutKeyboardFunc(keyboard); // initialize glad after creating a context int version = gladLoaderLoadGL(); if(version == 0) { printf("Something went wrong!\n"); exit(-1); } printf("OpenGL %d.%d\n", GLAD_VERSION_MAJOR(version), GLAD_VERSION_MINOR(version)); if (!GLAD_GL_VERSION_2_0) { printf("Your system doesn't support OpenGL >= 2!\n"); return -1; } printf("OpenGL %s, GLSL %s\n", glGetString(GL_VERSION), glGetString(GL_SHADING_LANGUAGE_VERSION)); glutMainLoop(); return 0; } glad-2.0.2/example/c/glx.c000066400000000000000000000051521432671066000152450ustar00rootroot00000000000000// gcc example/c/glx.c -o build/glx -Ibuild/include build/src/*.c -ldl -lX11 #include #include #include #include #include #include #include const int window_width = 800, window_height = 480; int main(void) { Display *display = XOpenDisplay(NULL); if (display == NULL) { printf("cannot connect to X server\n"); return 1; } int screen = DefaultScreen(display); int glx_version = gladLoaderLoadGLX(display, screen); if (!glx_version) { printf("Unable to load GLX.\n"); return 1; } printf("Loaded GLX %d.%d\n", GLAD_VERSION_MAJOR(glx_version), GLAD_VERSION_MINOR(glx_version)); Window root = RootWindow(display, screen); GLint visual_attributes[] = { GLX_RGBA, GLX_DOUBLEBUFFER, None }; XVisualInfo *visual_info = glXChooseVisual(display, screen, visual_attributes); Colormap colormap = XCreateColormap(display, root, visual_info->visual, AllocNone); XSetWindowAttributes attributes; attributes.event_mask = ExposureMask | KeyPressMask | KeyReleaseMask; attributes.colormap = colormap; Window window = XCreateWindow(display, root, 0, 0, window_width, window_height, 0, visual_info->depth, InputOutput, visual_info->visual, CWColormap | CWEventMask, &attributes); XMapWindow(display, window); XStoreName(display, window, "[glad] GLX with X11"); if (!window) { printf("Unable to create window.\n"); return 1; } GLXContext context = glXCreateContext(display, visual_info, NULL, GL_TRUE); glXMakeCurrent(display, window, context); int gl_version = gladLoaderLoadGL(); if (!gl_version) { printf("Unable to load GL.\n"); return 1; } printf("Loaded GL %d.%d\n", GLAD_VERSION_MAJOR(gl_version), GLAD_VERSION_MINOR(gl_version)); XWindowAttributes gwa; XGetWindowAttributes(display, window, &gwa); glViewport(0, 0, gwa.width, gwa.height); bool quit = false; while (!quit) { while (XPending(display)) { XEvent xev; XNextEvent(display, &xev); if (xev.type == KeyPress) { quit = true; } } glClearColor(0.8, 0.6, 0.7, 1.0); glClear(GL_COLOR_BUFFER_BIT); glXSwapBuffers(display, window); usleep(1000 * 10); } glXMakeCurrent(display, 0, 0); glXDestroyContext(display, context); XDestroyWindow(display, window); XFreeColormap(display, colormap); XCloseDisplay(display); gladLoaderUnloadGLX(); } glad-2.0.2/example/c/glx_modern.c000066400000000000000000000060661432671066000166160ustar00rootroot00000000000000// gcc example/c/glx.c -o build/glx -Ibuild/include build/src/*.c -ldl -lX11 #include #include #include #include #include #include #include const int window_width = 800, window_height = 480; int main(void) { Display *display = XOpenDisplay(NULL); if (display == NULL) { printf("cannot connect to X server\n"); return 1; } int screen = DefaultScreen(display); Window root = RootWindow(display, screen); Visual *visual = DefaultVisual(display, screen); Colormap colormap = XCreateColormap(display, root, visual, AllocNone); XSetWindowAttributes attributes; attributes.event_mask = ExposureMask | KeyPressMask | KeyReleaseMask; attributes.colormap = colormap; Window window = XCreateWindow(display, root, 0, 0, window_width, window_height, 0, DefaultDepth(display, screen), InputOutput, visual, CWColormap | CWEventMask, &attributes); XMapWindow(display, window); XStoreName(display, window, "[glad] Modern GLX with X11"); if (!window) { printf("Unable to create window.\n"); return 1; } int glx_version = gladLoaderLoadGLX(display, screen); if (!glx_version) { printf("Unable to load GLX.\n"); return 1; } printf("Loaded GLX %d.%d\n", GLAD_VERSION_MAJOR(glx_version), GLAD_VERSION_MINOR(glx_version)); GLint visual_attributes[] = { GLX_RENDER_TYPE, GLX_RGBA_BIT, GLX_DOUBLEBUFFER, 1, None }; int num_fbc = 0; GLXFBConfig *fbc = glXChooseFBConfig(display, screen, visual_attributes, &num_fbc); GLint context_attributes[] = { GLX_CONTEXT_MAJOR_VERSION_ARB, 3, GLX_CONTEXT_MINOR_VERSION_ARB, 3, GLX_CONTEXT_PROFILE_MASK_ARB, GLX_CONTEXT_CORE_PROFILE_BIT_ARB, None }; GLXContext context = glXCreateContextAttribsARB(display, fbc[0], NULL, 1, context_attributes); if (!context) { printf("Unable to create OpenGL context.\n"); return 1; } glXMakeCurrent(display, window, context); int gl_version = gladLoaderLoadGL(); if (!gl_version) { printf("Unable to load GL.\n"); return 1; } printf("Loaded GL %d.%d\n", GLAD_VERSION_MAJOR(gl_version), GLAD_VERSION_MINOR(gl_version)); XWindowAttributes gwa; XGetWindowAttributes(display, window, &gwa); glViewport(0, 0, gwa.width, gwa.height); bool quit = false; while (!quit) { while (XPending(display)) { XEvent xev; XNextEvent(display, &xev); if (xev.type == KeyPress) { quit = true; } } glClearColor(0.8, 0.6, 0.7, 1.0); glClear(GL_COLOR_BUFFER_BIT); glXSwapBuffers(display, window); usleep(1000 * 10); } glXMakeCurrent(display, 0, 0); glXDestroyContext(display, context); XDestroyWindow(display, window); XFreeColormap(display, colormap); XCloseDisplay(display); gladLoaderUnloadGLX(); } glad-2.0.2/example/c/vulkan_tri_glfw/000077500000000000000000000000001432671066000175015ustar00rootroot00000000000000glad-2.0.2/example/c/vulkan_tri_glfw/CMakeLists.txt000066400000000000000000000006711432671066000222450ustar00rootroot00000000000000cmake_minimum_required(VERSION 3.1) project(glad_examples_c_vulkan_tri_glfw C) set(GLAD_SOURCES_DIR "${PROJECT_SOURCE_DIR}/../../..") add_subdirectory("${GLAD_SOURCES_DIR}/cmake" glad_cmake) find_package(glfw3 REQUIRED) glad_add_library(glad_vulkan_12 REPRODUCIBLE LOADER API vulkan=1.2) add_executable(vulkan_tri_glfw vulkan_tri_glfw.c ) target_link_libraries(vulkan_tri_glfw PUBLIC glad_vulkan_12 glfw ) glad-2.0.2/example/c/vulkan_tri_glfw/vulkan_tri_glfw.c000066400000000000000000002535121432671066000230520ustar00rootroot00000000000000/* * Copyright (c) 2015-2016 The Khronos Group Inc. * Copyright (c) 2015-2016 Valve Corporation * Copyright (c) 2015-2016 LunarG, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * Author: Chia-I Wu * Author: Cody Northrop * Author: Courtney Goeltzenleuchter * Author: Ian Elliott * Author: Jon Ashburn * Author: Piers Daniell * Author: Gwan-gyeong Mun * Porter: Camilla Löwy * Porter: David Herberth */ /* * Draw a textured triangle with depth testing. This is written against Intel * ICD. It does not do state transition nor object memory binding like it * should. It also does no error checking. */ /* * > python -m glad --out-path=build --api="vulkan" \ * --extensions="VK_KHR_surface,VK_KHR_swapchain,VK_EXT_debug_report" \ * c --loader * * > gcc -I build/include build/src/vulkan.c example/c/vulkan_tri_glfw.c -lglfw -ldl * > ./a.out */ #include #include #include #include #include #include #ifdef _WIN32 #include #endif /* in case we have a header only version of glad */ #define GLAD_VULKAN_IMPLEMENTATION #include #define GLFW_INCLUDE_NONE #include #define DEMO_TEXTURE_COUNT 1 #define VERTEX_BUFFER_BIND_ID 0 #define APP_SHORT_NAME "tri_glad" #define APP_LONG_NAME "The glad powered Vulkan Triangle Demo Program" #define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0])) #if defined(NDEBUG) && defined(__GNUC__) #define U_ASSERT_ONLY __attribute__((unused)) #else #define U_ASSERT_ONLY #endif #define ERR_EXIT(err_msg, err_class) \ do { \ printf(err_msg); \ fflush(stdout); \ exit(1); \ } while (0) static const char fragShaderCode[] = { 0x03, 0x02, 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x08, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x06, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x4c, 0x53, 0x4c, 0x2e, 0x73, 0x74, 0x64, 0x2e, 0x34, 0x35, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x07, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x10, 0x00, 0x03, 0x00, 0x04, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x03, 0x00, 0x03, 0x00, 0x02, 0x00, 0x00, 0x00, 0x90, 0x01, 0x00, 0x00, 0x04, 0x00, 0x09, 0x00, 0x47, 0x4c, 0x5f, 0x41, 0x52, 0x42, 0x5f, 0x73, 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x73, 0x68, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x00, 0x00, 0x04, 0x00, 0x09, 0x00, 0x47, 0x4c, 0x5f, 0x41, 0x52, 0x42, 0x5f, 0x73, 0x68, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x5f, 0x34, 0x32, 0x30, 0x70, 0x61, 0x63, 0x6b, 0x00, 0x05, 0x00, 0x04, 0x00, 0x04, 0x00, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x09, 0x00, 0x00, 0x00, 0x75, 0x46, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x74, 0x65, 0x78, 0x00, 0x05, 0x00, 0x05, 0x00, 0x11, 0x00, 0x00, 0x00, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x09, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x11, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00, 0x21, 0x00, 0x03, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x16, 0x00, 0x03, 0x00, 0x06, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x07, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x08, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x08, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x19, 0x00, 0x09, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1b, 0x00, 0x03, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x10, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x36, 0x00, 0x05, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x05, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x57, 0x00, 0x05, 0x00, 0x07, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x09, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00 }; static const char vertShaderCode[] = { 0x03, 0x02, 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x08, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x06, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x4c, 0x53, 0x4c, 0x2e, 0x73, 0x74, 0x64, 0x2e, 0x34, 0x35, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x03, 0x00, 0x03, 0x00, 0x02, 0x00, 0x00, 0x00, 0x90, 0x01, 0x00, 0x00, 0x04, 0x00, 0x09, 0x00, 0x47, 0x4c, 0x5f, 0x41, 0x52, 0x42, 0x5f, 0x73, 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x73, 0x68, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x00, 0x00, 0x04, 0x00, 0x09, 0x00, 0x47, 0x4c, 0x5f, 0x41, 0x52, 0x42, 0x5f, 0x73, 0x68, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x5f, 0x34, 0x32, 0x30, 0x70, 0x61, 0x63, 0x6b, 0x00, 0x05, 0x00, 0x04, 0x00, 0x04, 0x00, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x09, 0x00, 0x00, 0x00, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x61, 0x74, 0x74, 0x72, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x11, 0x00, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x50, 0x65, 0x72, 0x56, 0x65, 0x72, 0x74, 0x65, 0x78, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x06, 0x00, 0x07, 0x00, 0x11, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x53, 0x69, 0x7a, 0x65, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x07, 0x00, 0x11, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x43, 0x6c, 0x69, 0x70, 0x44, 0x69, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x00, 0x05, 0x00, 0x03, 0x00, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0x17, 0x00, 0x00, 0x00, 0x70, 0x6f, 0x73, 0x00, 0x05, 0x00, 0x05, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x56, 0x65, 0x72, 0x74, 0x65, 0x78, 0x49, 0x44, 0x00, 0x05, 0x00, 0x06, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x44, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x09, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x11, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x11, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x47, 0x00, 0x03, 0x00, 0x11, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x17, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x13, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00, 0x21, 0x00, 0x03, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x16, 0x00, 0x03, 0x00, 0x06, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x07, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x08, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x08, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x04, 0x00, 0x10, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x05, 0x00, 0x11, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x12, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x12, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x14, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x14, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x16, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x16, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x19, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x36, 0x00, 0x05, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x05, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x07, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x09, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x19, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00 }; struct texture_object { VkSampler sampler; VkImage image; VkImageLayout imageLayout; VkDeviceMemory mem; VkImageView view; int32_t tex_width, tex_height; }; static int validation_error = 0; VKAPI_ATTR VkBool32 VKAPI_CALL BreakCallback(VkFlags msgFlags, VkDebugReportObjectTypeEXT objType, uint64_t srcObject, size_t location, int32_t msgCode, const char *pLayerPrefix, const char *pMsg, void *pUserData) { #ifdef _WIN32 DebugBreak(); #else raise(SIGTRAP); #endif return false; } typedef struct { VkImage image; VkCommandBuffer cmd; VkImageView view; } SwapchainBuffers; struct demo { GLFWwindow* window; VkSurfaceKHR surface; bool use_staging_buffer; VkInstance inst; VkPhysicalDevice gpu; VkDevice device; VkQueue queue; VkPhysicalDeviceProperties gpu_props; VkPhysicalDeviceFeatures gpu_features; VkQueueFamilyProperties *queue_props; uint32_t graphics_queue_node_index; uint32_t enabled_extension_count; uint32_t enabled_layer_count; const char *extension_names[64]; const char *enabled_layers[64]; int width, height; VkFormat format; VkColorSpaceKHR color_space; uint32_t swapchainImageCount; VkSwapchainKHR swapchain; SwapchainBuffers *buffers; VkCommandPool cmd_pool; struct { VkFormat format; VkImage image; VkDeviceMemory mem; VkImageView view; } depth; struct texture_object textures[DEMO_TEXTURE_COUNT]; struct { VkBuffer buf; VkDeviceMemory mem; VkPipelineVertexInputStateCreateInfo vi; VkVertexInputBindingDescription vi_bindings[1]; VkVertexInputAttributeDescription vi_attrs[2]; } vertices; VkCommandBuffer setup_cmd; // Command Buffer for initialization commands VkCommandBuffer draw_cmd; // Command Buffer for drawing commands VkPipelineLayout pipeline_layout; VkDescriptorSetLayout desc_layout; VkPipelineCache pipelineCache; VkRenderPass render_pass; VkPipeline pipeline; VkShaderModule vert_shader_module; VkShaderModule frag_shader_module; VkDescriptorPool desc_pool; VkDescriptorSet desc_set; VkFramebuffer *framebuffers; VkPhysicalDeviceMemoryProperties memory_properties; int32_t curFrame; int32_t frameCount; bool validate; bool use_break; PFN_vkCreateDebugReportCallbackEXT CreateDebugReportCallback; PFN_vkDestroyDebugReportCallbackEXT DestroyDebugReportCallback; VkDebugReportCallbackEXT msg_callback; PFN_vkDebugReportMessageEXT DebugReportMessage; float depthStencil; float depthIncrement; uint32_t current_buffer; uint32_t queue_count; }; VKAPI_ATTR VkBool32 VKAPI_CALL dbgFunc(VkFlags msgFlags, VkDebugReportObjectTypeEXT objType, uint64_t srcObject, size_t location, int32_t msgCode, const char *pLayerPrefix, const char *pMsg, void *pUserData) { char *message = (char *)malloc(strlen(pMsg) + 100); assert(message); validation_error = 1; if (msgFlags & VK_DEBUG_REPORT_ERROR_BIT_EXT) { sprintf(message, "ERROR: [%s] Code %d : %s", pLayerPrefix, msgCode, pMsg); } else if (msgFlags & VK_DEBUG_REPORT_WARNING_BIT_EXT) { sprintf(message, "WARNING: [%s] Code %d : %s", pLayerPrefix, msgCode, pMsg); } else { return false; } printf("%s\n", message); fflush(stdout); free(message); /* * false indicates that layer should not bail-out of an * API call that had validation failures. This may mean that the * app dies inside the driver due to invalid parameter(s). * That's what would happen without validation layers, so we'll * keep that behavior here. */ return false; } // Forward declaration: static void demo_resize(struct demo *demo); static bool memory_type_from_properties(struct demo *demo, uint32_t typeBits, VkFlags requirements_mask, uint32_t *typeIndex) { uint32_t i; // Search memtypes to find first index with those properties for (i = 0; i < VK_MAX_MEMORY_TYPES; i++) { if ((typeBits & 1) == 1) { // Type is available, does it match user properties? if ((demo->memory_properties.memoryTypes[i].propertyFlags & requirements_mask) == requirements_mask) { *typeIndex = i; return true; } } typeBits >>= 1; } // No memory types matched, return failure return false; } static void demo_flush_init_cmd(struct demo *demo) { VkResult U_ASSERT_ONLY err; if (demo->setup_cmd == VK_NULL_HANDLE) return; err = vkEndCommandBuffer(demo->setup_cmd); assert(!err); const VkCommandBuffer cmd_bufs[] = {demo->setup_cmd}; VkFence nullFence = {VK_NULL_HANDLE}; VkSubmitInfo submit_info = {.sType = VK_STRUCTURE_TYPE_SUBMIT_INFO, .pNext = NULL, .waitSemaphoreCount = 0, .pWaitSemaphores = NULL, .pWaitDstStageMask = NULL, .commandBufferCount = 1, .pCommandBuffers = cmd_bufs, .signalSemaphoreCount = 0, .pSignalSemaphores = NULL}; err = vkQueueSubmit(demo->queue, 1, &submit_info, nullFence); assert(!err); err = vkQueueWaitIdle(demo->queue); assert(!err); vkFreeCommandBuffers(demo->device, demo->cmd_pool, 1, cmd_bufs); demo->setup_cmd = VK_NULL_HANDLE; } static void demo_set_image_layout(struct demo *demo, VkImage image, VkImageAspectFlags aspectMask, VkImageLayout old_image_layout, VkImageLayout new_image_layout, VkAccessFlagBits srcAccessMask) { VkResult U_ASSERT_ONLY err; if (demo->setup_cmd == VK_NULL_HANDLE) { const VkCommandBufferAllocateInfo cmd = { .sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO, .pNext = NULL, .commandPool = demo->cmd_pool, .level = VK_COMMAND_BUFFER_LEVEL_PRIMARY, .commandBufferCount = 1, }; err = vkAllocateCommandBuffers(demo->device, &cmd, &demo->setup_cmd); assert(!err); VkCommandBufferBeginInfo cmd_buf_info = { .sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO, .pNext = NULL, .flags = 0, .pInheritanceInfo = NULL, }; err = vkBeginCommandBuffer(demo->setup_cmd, &cmd_buf_info); assert(!err); } VkImageMemoryBarrier image_memory_barrier = { .sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER, .pNext = NULL, .srcAccessMask = srcAccessMask, .dstAccessMask = 0, .oldLayout = old_image_layout, .newLayout = new_image_layout, .image = image, .subresourceRange = {aspectMask, 0, 1, 0, 1}}; if (new_image_layout == VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL) { /* Make sure anything that was copying from this image has completed */ image_memory_barrier.dstAccessMask = VK_ACCESS_TRANSFER_READ_BIT; } if (new_image_layout == VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL) { image_memory_barrier.dstAccessMask = VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT; } if (new_image_layout == VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL) { image_memory_barrier.dstAccessMask = VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT; } if (new_image_layout == VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL) { /* Make sure any Copy or CPU writes to image are flushed */ image_memory_barrier.dstAccessMask = VK_ACCESS_SHADER_READ_BIT | VK_ACCESS_INPUT_ATTACHMENT_READ_BIT; } VkImageMemoryBarrier *pmemory_barrier = &image_memory_barrier; VkPipelineStageFlags src_stages = VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT; VkPipelineStageFlags dest_stages = VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT; vkCmdPipelineBarrier(demo->setup_cmd, src_stages, dest_stages, 0, 0, NULL, 0, NULL, 1, pmemory_barrier); } static void demo_draw_build_cmd(struct demo *demo) { const VkCommandBufferBeginInfo cmd_buf_info = { .sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO, .pNext = NULL, .flags = 0, .pInheritanceInfo = NULL, }; const VkClearValue clear_values[2] = { [0] = {.color.float32 = {0.2f, 0.2f, 0.2f, 0.2f}}, [1] = {.depthStencil = {demo->depthStencil, 0}}, }; const VkRenderPassBeginInfo rp_begin = { .sType = VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO, .pNext = NULL, .renderPass = demo->render_pass, .framebuffer = demo->framebuffers[demo->current_buffer], .renderArea.offset.x = 0, .renderArea.offset.y = 0, .renderArea.extent.width = demo->width, .renderArea.extent.height = demo->height, .clearValueCount = 2, .pClearValues = clear_values, }; VkResult U_ASSERT_ONLY err; err = vkBeginCommandBuffer(demo->draw_cmd, &cmd_buf_info); assert(!err); // We can use LAYOUT_UNDEFINED as a wildcard here because we don't care what // happens to the previous contents of the image VkImageMemoryBarrier image_memory_barrier = { .sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER, .pNext = NULL, .srcAccessMask = 0, .dstAccessMask = VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT, .oldLayout = VK_IMAGE_LAYOUT_UNDEFINED, .newLayout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL, .srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED, .dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED, .image = demo->buffers[demo->current_buffer].image, .subresourceRange = {VK_IMAGE_ASPECT_COLOR_BIT, 0, 1, 0, 1}}; vkCmdPipelineBarrier(demo->draw_cmd, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT, 0, 0, NULL, 0, NULL, 1, &image_memory_barrier); vkCmdBeginRenderPass(demo->draw_cmd, &rp_begin, VK_SUBPASS_CONTENTS_INLINE); vkCmdBindPipeline(demo->draw_cmd, VK_PIPELINE_BIND_POINT_GRAPHICS, demo->pipeline); vkCmdBindDescriptorSets(demo->draw_cmd, VK_PIPELINE_BIND_POINT_GRAPHICS, demo->pipeline_layout, 0, 1, &demo->desc_set, 0, NULL); VkViewport viewport; memset(&viewport, 0, sizeof(viewport)); viewport.height = (float)demo->height; viewport.width = (float)demo->width; viewport.minDepth = (float)0.0f; viewport.maxDepth = (float)1.0f; vkCmdSetViewport(demo->draw_cmd, 0, 1, &viewport); VkRect2D scissor; memset(&scissor, 0, sizeof(scissor)); scissor.extent.width = demo->width; scissor.extent.height = demo->height; scissor.offset.x = 0; scissor.offset.y = 0; vkCmdSetScissor(demo->draw_cmd, 0, 1, &scissor); VkDeviceSize offsets[1] = {0}; vkCmdBindVertexBuffers(demo->draw_cmd, VERTEX_BUFFER_BIND_ID, 1, &demo->vertices.buf, offsets); vkCmdDraw(demo->draw_cmd, 3, 1, 0, 0); vkCmdEndRenderPass(demo->draw_cmd); VkImageMemoryBarrier prePresentBarrier = { .sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER, .pNext = NULL, .srcAccessMask = VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT, .dstAccessMask = VK_ACCESS_MEMORY_READ_BIT, .oldLayout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL, .newLayout = VK_IMAGE_LAYOUT_PRESENT_SRC_KHR, .srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED, .dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED, .subresourceRange = {VK_IMAGE_ASPECT_COLOR_BIT, 0, 1, 0, 1}}; prePresentBarrier.image = demo->buffers[demo->current_buffer].image; VkImageMemoryBarrier *pmemory_barrier = &prePresentBarrier; vkCmdPipelineBarrier(demo->draw_cmd, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT, 0, 0, NULL, 0, NULL, 1, pmemory_barrier); err = vkEndCommandBuffer(demo->draw_cmd); assert(!err); } static void demo_draw(struct demo *demo) { VkResult U_ASSERT_ONLY err; VkSemaphore imageAcquiredSemaphore, drawCompleteSemaphore; VkSemaphoreCreateInfo semaphoreCreateInfo = { .sType = VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO, .pNext = NULL, .flags = 0, }; err = vkCreateSemaphore(demo->device, &semaphoreCreateInfo, NULL, &imageAcquiredSemaphore); assert(!err); err = vkCreateSemaphore(demo->device, &semaphoreCreateInfo, NULL, &drawCompleteSemaphore); assert(!err); // Get the index of the next available swapchain image: err = vkAcquireNextImageKHR(demo->device, demo->swapchain, UINT64_MAX, imageAcquiredSemaphore, (VkFence)0, // TODO: Show use of fence &demo->current_buffer); if (err == VK_ERROR_OUT_OF_DATE_KHR) { // demo->swapchain is out of date (e.g. the window was resized) and // must be recreated: demo_resize(demo); demo_draw(demo); vkDestroySemaphore(demo->device, imageAcquiredSemaphore, NULL); vkDestroySemaphore(demo->device, drawCompleteSemaphore, NULL); return; } else if (err == VK_SUBOPTIMAL_KHR) { // demo->swapchain is not as optimal as it could be, but the platform's // presentation engine will still present the image correctly. } else { assert(!err); } demo_flush_init_cmd(demo); // Wait for the present complete semaphore to be signaled to ensure // that the image won't be rendered to until the presentation // engine has fully released ownership to the application, and it is // okay to render to the image. demo_draw_build_cmd(demo); VkFence nullFence = VK_NULL_HANDLE; VkPipelineStageFlags pipe_stage_flags = VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT; VkSubmitInfo submit_info = {.sType = VK_STRUCTURE_TYPE_SUBMIT_INFO, .pNext = NULL, .waitSemaphoreCount = 1, .pWaitSemaphores = &imageAcquiredSemaphore, .pWaitDstStageMask = &pipe_stage_flags, .commandBufferCount = 1, .pCommandBuffers = &demo->draw_cmd, .signalSemaphoreCount = 1, .pSignalSemaphores = &drawCompleteSemaphore}; err = vkQueueSubmit(demo->queue, 1, &submit_info, nullFence); assert(!err); VkPresentInfoKHR present = { .sType = VK_STRUCTURE_TYPE_PRESENT_INFO_KHR, .pNext = NULL, .waitSemaphoreCount = 1, .pWaitSemaphores = &drawCompleteSemaphore, .swapchainCount = 1, .pSwapchains = &demo->swapchain, .pImageIndices = &demo->current_buffer, }; err = vkQueuePresentKHR(demo->queue, &present); if (err == VK_ERROR_OUT_OF_DATE_KHR) { // demo->swapchain is out of date (e.g. the window was resized) and // must be recreated: demo_resize(demo); } else if (err == VK_SUBOPTIMAL_KHR) { // demo->swapchain is not as optimal as it could be, but the platform's // presentation engine will still present the image correctly. } else { assert(!err); } err = vkQueueWaitIdle(demo->queue); assert(err == VK_SUCCESS); vkDestroySemaphore(demo->device, imageAcquiredSemaphore, NULL); vkDestroySemaphore(demo->device, drawCompleteSemaphore, NULL); } static void demo_prepare_buffers(struct demo *demo) { VkResult U_ASSERT_ONLY err; VkSwapchainKHR oldSwapchain = demo->swapchain; // Check the surface capabilities and formats VkSurfaceCapabilitiesKHR surfCapabilities; err = vkGetPhysicalDeviceSurfaceCapabilitiesKHR( demo->gpu, demo->surface, &surfCapabilities); assert(!err); uint32_t presentModeCount; err = vkGetPhysicalDeviceSurfacePresentModesKHR( demo->gpu, demo->surface, &presentModeCount, NULL); assert(!err); VkPresentModeKHR *presentModes = (VkPresentModeKHR *)malloc(presentModeCount * sizeof(VkPresentModeKHR)); assert(presentModes); err = vkGetPhysicalDeviceSurfacePresentModesKHR( demo->gpu, demo->surface, &presentModeCount, presentModes); assert(!err); VkExtent2D swapchainExtent; // width and height are either both 0xFFFFFFFF, or both not 0xFFFFFFFF. if (surfCapabilities.currentExtent.width == 0xFFFFFFFF) { // If the surface size is undefined, the size is set to the size // of the images requested, which must fit within the minimum and // maximum values. swapchainExtent.width = demo->width; swapchainExtent.height = demo->height; if (swapchainExtent.width < surfCapabilities.minImageExtent.width) { swapchainExtent.width = surfCapabilities.minImageExtent.width; } else if (swapchainExtent.width > surfCapabilities.maxImageExtent.width) { swapchainExtent.width = surfCapabilities.maxImageExtent.width; } if (swapchainExtent.height < surfCapabilities.minImageExtent.height) { swapchainExtent.height = surfCapabilities.minImageExtent.height; } else if (swapchainExtent.height > surfCapabilities.maxImageExtent.height) { swapchainExtent.height = surfCapabilities.maxImageExtent.height; } } else { // If the surface size is defined, the swap chain size must match swapchainExtent = surfCapabilities.currentExtent; demo->width = surfCapabilities.currentExtent.width; demo->height = surfCapabilities.currentExtent.height; } VkPresentModeKHR swapchainPresentMode = VK_PRESENT_MODE_FIFO_KHR; // Determine the number of VkImage's to use in the swap chain. // Application desires to only acquire 1 image at a time (which is // "surfCapabilities.minImageCount"). uint32_t desiredNumOfSwapchainImages = surfCapabilities.minImageCount; // If maxImageCount is 0, we can ask for as many images as we want; // otherwise we're limited to maxImageCount if ((surfCapabilities.maxImageCount > 0) && (desiredNumOfSwapchainImages > surfCapabilities.maxImageCount)) { // Application must settle for fewer images than desired: desiredNumOfSwapchainImages = surfCapabilities.maxImageCount; } VkSurfaceTransformFlagsKHR preTransform; if (surfCapabilities.supportedTransforms & VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR) { preTransform = VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR; } else { preTransform = surfCapabilities.currentTransform; } const VkSwapchainCreateInfoKHR swapchain = { .sType = VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR, .pNext = NULL, .surface = demo->surface, .minImageCount = desiredNumOfSwapchainImages, .imageFormat = demo->format, .imageColorSpace = demo->color_space, .imageExtent = { .width = swapchainExtent.width, .height = swapchainExtent.height, }, .imageUsage = VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, .preTransform = preTransform, .compositeAlpha = VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR, .imageArrayLayers = 1, .imageSharingMode = VK_SHARING_MODE_EXCLUSIVE, .queueFamilyIndexCount = 0, .pQueueFamilyIndices = NULL, .presentMode = swapchainPresentMode, .oldSwapchain = oldSwapchain, .clipped = true, }; uint32_t i; err = vkCreateSwapchainKHR(demo->device, &swapchain, NULL, &demo->swapchain); assert(!err); // If we just re-created an existing swapchain, we should destroy the old // swapchain at this point. // Note: destroying the swapchain also cleans up all its associated // presentable images once the platform is done with them. if (oldSwapchain != VK_NULL_HANDLE) { vkDestroySwapchainKHR(demo->device, oldSwapchain, NULL); } err = vkGetSwapchainImagesKHR(demo->device, demo->swapchain, &demo->swapchainImageCount, NULL); assert(!err); VkImage *swapchainImages = (VkImage *)malloc(demo->swapchainImageCount * sizeof(VkImage)); assert(swapchainImages); err = vkGetSwapchainImagesKHR(demo->device, demo->swapchain, &demo->swapchainImageCount, swapchainImages); assert(!err); demo->buffers = (SwapchainBuffers *)malloc(sizeof(SwapchainBuffers) * demo->swapchainImageCount); assert(demo->buffers); for (i = 0; i < demo->swapchainImageCount; i++) { VkImageViewCreateInfo color_attachment_view = { .sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO, .pNext = NULL, .format = demo->format, .components = { .r = VK_COMPONENT_SWIZZLE_R, .g = VK_COMPONENT_SWIZZLE_G, .b = VK_COMPONENT_SWIZZLE_B, .a = VK_COMPONENT_SWIZZLE_A, }, .subresourceRange = {.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT, .baseMipLevel = 0, .levelCount = 1, .baseArrayLayer = 0, .layerCount = 1}, .viewType = VK_IMAGE_VIEW_TYPE_2D, .flags = 0, }; demo->buffers[i].image = swapchainImages[i]; color_attachment_view.image = demo->buffers[i].image; err = vkCreateImageView(demo->device, &color_attachment_view, NULL, &demo->buffers[i].view); assert(!err); } demo->current_buffer = 0; if (NULL != presentModes) { free(presentModes); } } static void demo_prepare_depth(struct demo *demo) { const VkFormat depth_format = VK_FORMAT_D16_UNORM; const VkImageCreateInfo image = { .sType = VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO, .pNext = NULL, .imageType = VK_IMAGE_TYPE_2D, .format = depth_format, .extent = {demo->width, demo->height, 1}, .mipLevels = 1, .arrayLayers = 1, .samples = VK_SAMPLE_COUNT_1_BIT, .tiling = VK_IMAGE_TILING_OPTIMAL, .usage = VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, .flags = 0, }; VkMemoryAllocateInfo mem_alloc = { .sType = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO, .pNext = NULL, .allocationSize = 0, .memoryTypeIndex = 0, }; VkImageViewCreateInfo view = { .sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO, .pNext = NULL, .image = VK_NULL_HANDLE, .format = depth_format, .subresourceRange = {.aspectMask = VK_IMAGE_ASPECT_DEPTH_BIT, .baseMipLevel = 0, .levelCount = 1, .baseArrayLayer = 0, .layerCount = 1}, .flags = 0, .viewType = VK_IMAGE_VIEW_TYPE_2D, }; VkMemoryRequirements mem_reqs; VkResult U_ASSERT_ONLY err; bool U_ASSERT_ONLY pass; demo->depth.format = depth_format; /* create image */ err = vkCreateImage(demo->device, &image, NULL, &demo->depth.image); assert(!err); /* get memory requirements for this object */ vkGetImageMemoryRequirements(demo->device, demo->depth.image, &mem_reqs); /* select memory size and type */ mem_alloc.allocationSize = mem_reqs.size; pass = memory_type_from_properties(demo, mem_reqs.memoryTypeBits, 0, /* No requirements */ &mem_alloc.memoryTypeIndex); assert(pass); /* allocate memory */ err = vkAllocateMemory(demo->device, &mem_alloc, NULL, &demo->depth.mem); assert(!err); /* bind memory */ err = vkBindImageMemory(demo->device, demo->depth.image, demo->depth.mem, 0); assert(!err); demo_set_image_layout(demo, demo->depth.image, VK_IMAGE_ASPECT_DEPTH_BIT, VK_IMAGE_LAYOUT_UNDEFINED, VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL, 0); /* create image view */ view.image = demo->depth.image; err = vkCreateImageView(demo->device, &view, NULL, &demo->depth.view); assert(!err); } static void demo_prepare_texture_image(struct demo *demo, const uint32_t *tex_colors, struct texture_object *tex_obj, VkImageTiling tiling, VkImageUsageFlags usage, VkFlags required_props) { const VkFormat tex_format = VK_FORMAT_B8G8R8A8_UNORM; const int32_t tex_width = 2; const int32_t tex_height = 2; VkResult U_ASSERT_ONLY err; bool U_ASSERT_ONLY pass; tex_obj->tex_width = tex_width; tex_obj->tex_height = tex_height; const VkImageCreateInfo image_create_info = { .sType = VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO, .pNext = NULL, .imageType = VK_IMAGE_TYPE_2D, .format = tex_format, .extent = {tex_width, tex_height, 1}, .mipLevels = 1, .arrayLayers = 1, .samples = VK_SAMPLE_COUNT_1_BIT, .tiling = tiling, .usage = usage, .flags = 0, .initialLayout = VK_IMAGE_LAYOUT_PREINITIALIZED }; VkMemoryAllocateInfo mem_alloc = { .sType = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO, .pNext = NULL, .allocationSize = 0, .memoryTypeIndex = 0, }; VkMemoryRequirements mem_reqs; err = vkCreateImage(demo->device, &image_create_info, NULL, &tex_obj->image); assert(!err); vkGetImageMemoryRequirements(demo->device, tex_obj->image, &mem_reqs); mem_alloc.allocationSize = mem_reqs.size; pass = memory_type_from_properties(demo, mem_reqs.memoryTypeBits, required_props, &mem_alloc.memoryTypeIndex); assert(pass); /* allocate memory */ err = vkAllocateMemory(demo->device, &mem_alloc, NULL, &tex_obj->mem); assert(!err); /* bind memory */ err = vkBindImageMemory(demo->device, tex_obj->image, tex_obj->mem, 0); assert(!err); if (required_props & VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT) { const VkImageSubresource subres = { .aspectMask = VK_IMAGE_ASPECT_COLOR_BIT, .mipLevel = 0, .arrayLayer = 0, }; VkSubresourceLayout layout; void *data; int32_t x, y; vkGetImageSubresourceLayout(demo->device, tex_obj->image, &subres, &layout); err = vkMapMemory(demo->device, tex_obj->mem, 0, mem_alloc.allocationSize, 0, &data); assert(!err); for (y = 0; y < tex_height; y++) { uint32_t *row = (uint32_t *)((char *)data + layout.rowPitch * y); for (x = 0; x < tex_width; x++) row[x] = tex_colors[(x & 1) ^ (y & 1)]; } vkUnmapMemory(demo->device, tex_obj->mem); } tex_obj->imageLayout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL; demo_set_image_layout(demo, tex_obj->image, VK_IMAGE_ASPECT_COLOR_BIT, VK_IMAGE_LAYOUT_PREINITIALIZED, tex_obj->imageLayout, VK_ACCESS_HOST_WRITE_BIT); /* setting the image layout does not reference the actual memory so no need * to add a mem ref */ } static void demo_destroy_texture_image(struct demo *demo, struct texture_object *tex_obj) { /* clean up staging resources */ vkDestroyImage(demo->device, tex_obj->image, NULL); vkFreeMemory(demo->device, tex_obj->mem, NULL); } static void demo_prepare_textures(struct demo *demo) { const VkFormat tex_format = VK_FORMAT_B8G8R8A8_UNORM; VkFormatProperties props; const uint32_t tex_colors[DEMO_TEXTURE_COUNT][2] = { {0xffff0000, 0xff00ff00}, }; uint32_t i; VkResult U_ASSERT_ONLY err; vkGetPhysicalDeviceFormatProperties(demo->gpu, tex_format, &props); for (i = 0; i < DEMO_TEXTURE_COUNT; i++) { if ((props.linearTilingFeatures & VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT) && !demo->use_staging_buffer) { /* Device can texture using linear textures */ demo_prepare_texture_image( demo, tex_colors[i], &demo->textures[i], VK_IMAGE_TILING_LINEAR, VK_IMAGE_USAGE_SAMPLED_BIT, VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT); } else if (props.optimalTilingFeatures & VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT) { /* Must use staging buffer to copy linear texture to optimized */ struct texture_object staging_texture; memset(&staging_texture, 0, sizeof(staging_texture)); demo_prepare_texture_image( demo, tex_colors[i], &staging_texture, VK_IMAGE_TILING_LINEAR, VK_IMAGE_USAGE_TRANSFER_SRC_BIT, VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT); demo_prepare_texture_image( demo, tex_colors[i], &demo->textures[i], VK_IMAGE_TILING_OPTIMAL, (VK_IMAGE_USAGE_TRANSFER_DST_BIT | VK_IMAGE_USAGE_SAMPLED_BIT), VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT); demo_set_image_layout(demo, staging_texture.image, VK_IMAGE_ASPECT_COLOR_BIT, staging_texture.imageLayout, VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, 0); demo_set_image_layout(demo, demo->textures[i].image, VK_IMAGE_ASPECT_COLOR_BIT, demo->textures[i].imageLayout, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, 0); VkImageCopy copy_region = { .srcSubresource = {VK_IMAGE_ASPECT_COLOR_BIT, 0, 0, 1}, .srcOffset = {0, 0, 0}, .dstSubresource = {VK_IMAGE_ASPECT_COLOR_BIT, 0, 0, 1}, .dstOffset = {0, 0, 0}, .extent = {staging_texture.tex_width, staging_texture.tex_height, 1}, }; vkCmdCopyImage( demo->setup_cmd, staging_texture.image, VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, demo->textures[i].image, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, 1, ©_region); demo_set_image_layout(demo, demo->textures[i].image, VK_IMAGE_ASPECT_COLOR_BIT, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, demo->textures[i].imageLayout, 0); demo_flush_init_cmd(demo); demo_destroy_texture_image(demo, &staging_texture); } else { /* Can't support VK_FORMAT_B8G8R8A8_UNORM !? */ assert(!"No support for B8G8R8A8_UNORM as texture image format"); } const VkSamplerCreateInfo sampler = { .sType = VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO, .pNext = NULL, .magFilter = VK_FILTER_NEAREST, .minFilter = VK_FILTER_NEAREST, .mipmapMode = VK_SAMPLER_MIPMAP_MODE_NEAREST, .addressModeU = VK_SAMPLER_ADDRESS_MODE_REPEAT, .addressModeV = VK_SAMPLER_ADDRESS_MODE_REPEAT, .addressModeW = VK_SAMPLER_ADDRESS_MODE_REPEAT, .mipLodBias = 0.0f, .anisotropyEnable = VK_FALSE, .maxAnisotropy = 1, .compareOp = VK_COMPARE_OP_NEVER, .minLod = 0.0f, .maxLod = 0.0f, .borderColor = VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE, .unnormalizedCoordinates = VK_FALSE, }; VkImageViewCreateInfo view = { .sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO, .pNext = NULL, .image = VK_NULL_HANDLE, .viewType = VK_IMAGE_VIEW_TYPE_2D, .format = tex_format, .components = { VK_COMPONENT_SWIZZLE_R, VK_COMPONENT_SWIZZLE_G, VK_COMPONENT_SWIZZLE_B, VK_COMPONENT_SWIZZLE_A, }, .subresourceRange = {VK_IMAGE_ASPECT_COLOR_BIT, 0, 1, 0, 1}, .flags = 0, }; /* create sampler */ err = vkCreateSampler(demo->device, &sampler, NULL, &demo->textures[i].sampler); assert(!err); /* create image view */ view.image = demo->textures[i].image; err = vkCreateImageView(demo->device, &view, NULL, &demo->textures[i].view); assert(!err); } } static void demo_prepare_vertices(struct demo *demo) { // clang-format off const float vb[3][5] = { /* position texcoord */ { -1.0f, -1.0f, 0.25f, 0.0f, 0.0f }, { 1.0f, -1.0f, 0.25f, 1.0f, 0.0f }, { 0.0f, 1.0f, 1.0f, 0.5f, 1.0f }, }; // clang-format on const VkBufferCreateInfo buf_info = { .sType = VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO, .pNext = NULL, .size = sizeof(vb), .usage = VK_BUFFER_USAGE_VERTEX_BUFFER_BIT, .flags = 0, }; VkMemoryAllocateInfo mem_alloc = { .sType = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO, .pNext = NULL, .allocationSize = 0, .memoryTypeIndex = 0, }; VkMemoryRequirements mem_reqs; VkResult U_ASSERT_ONLY err; bool U_ASSERT_ONLY pass; void *data; memset(&demo->vertices, 0, sizeof(demo->vertices)); err = vkCreateBuffer(demo->device, &buf_info, NULL, &demo->vertices.buf); assert(!err); vkGetBufferMemoryRequirements(demo->device, demo->vertices.buf, &mem_reqs); assert(!err); mem_alloc.allocationSize = mem_reqs.size; pass = memory_type_from_properties(demo, mem_reqs.memoryTypeBits, VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT, &mem_alloc.memoryTypeIndex); assert(pass); err = vkAllocateMemory(demo->device, &mem_alloc, NULL, &demo->vertices.mem); assert(!err); err = vkMapMemory(demo->device, demo->vertices.mem, 0, mem_alloc.allocationSize, 0, &data); assert(!err); memcpy(data, vb, sizeof(vb)); vkUnmapMemory(demo->device, demo->vertices.mem); err = vkBindBufferMemory(demo->device, demo->vertices.buf, demo->vertices.mem, 0); assert(!err); demo->vertices.vi.sType = VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO; demo->vertices.vi.pNext = NULL; demo->vertices.vi.vertexBindingDescriptionCount = 1; demo->vertices.vi.pVertexBindingDescriptions = demo->vertices.vi_bindings; demo->vertices.vi.vertexAttributeDescriptionCount = 2; demo->vertices.vi.pVertexAttributeDescriptions = demo->vertices.vi_attrs; demo->vertices.vi_bindings[0].binding = VERTEX_BUFFER_BIND_ID; demo->vertices.vi_bindings[0].stride = sizeof(vb[0]); demo->vertices.vi_bindings[0].inputRate = VK_VERTEX_INPUT_RATE_VERTEX; demo->vertices.vi_attrs[0].binding = VERTEX_BUFFER_BIND_ID; demo->vertices.vi_attrs[0].location = 0; demo->vertices.vi_attrs[0].format = VK_FORMAT_R32G32B32_SFLOAT; demo->vertices.vi_attrs[0].offset = 0; demo->vertices.vi_attrs[1].binding = VERTEX_BUFFER_BIND_ID; demo->vertices.vi_attrs[1].location = 1; demo->vertices.vi_attrs[1].format = VK_FORMAT_R32G32_SFLOAT; demo->vertices.vi_attrs[1].offset = sizeof(float) * 3; } static void demo_prepare_descriptor_layout(struct demo *demo) { const VkDescriptorSetLayoutBinding layout_binding = { .binding = 0, .descriptorType = VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, .descriptorCount = DEMO_TEXTURE_COUNT, .stageFlags = VK_SHADER_STAGE_FRAGMENT_BIT, .pImmutableSamplers = NULL, }; const VkDescriptorSetLayoutCreateInfo descriptor_layout = { .sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO, .pNext = NULL, .bindingCount = 1, .pBindings = &layout_binding, }; VkResult U_ASSERT_ONLY err; err = vkCreateDescriptorSetLayout(demo->device, &descriptor_layout, NULL, &demo->desc_layout); assert(!err); const VkPipelineLayoutCreateInfo pPipelineLayoutCreateInfo = { .sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO, .pNext = NULL, .setLayoutCount = 1, .pSetLayouts = &demo->desc_layout, }; err = vkCreatePipelineLayout(demo->device, &pPipelineLayoutCreateInfo, NULL, &demo->pipeline_layout); assert(!err); } static void demo_prepare_render_pass(struct demo *demo) { const VkAttachmentDescription attachments[2] = { [0] = { .format = demo->format, .samples = VK_SAMPLE_COUNT_1_BIT, .loadOp = VK_ATTACHMENT_LOAD_OP_CLEAR, .storeOp = VK_ATTACHMENT_STORE_OP_STORE, .stencilLoadOp = VK_ATTACHMENT_LOAD_OP_DONT_CARE, .stencilStoreOp = VK_ATTACHMENT_STORE_OP_DONT_CARE, .initialLayout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL, .finalLayout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL, }, [1] = { .format = demo->depth.format, .samples = VK_SAMPLE_COUNT_1_BIT, .loadOp = VK_ATTACHMENT_LOAD_OP_CLEAR, .storeOp = VK_ATTACHMENT_STORE_OP_DONT_CARE, .stencilLoadOp = VK_ATTACHMENT_LOAD_OP_DONT_CARE, .stencilStoreOp = VK_ATTACHMENT_STORE_OP_DONT_CARE, .initialLayout = VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL, .finalLayout = VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL, }, }; const VkAttachmentReference color_reference = { .attachment = 0, .layout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL, }; const VkAttachmentReference depth_reference = { .attachment = 1, .layout = VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL, }; const VkSubpassDescription subpass = { .pipelineBindPoint = VK_PIPELINE_BIND_POINT_GRAPHICS, .flags = 0, .inputAttachmentCount = 0, .pInputAttachments = NULL, .colorAttachmentCount = 1, .pColorAttachments = &color_reference, .pResolveAttachments = NULL, .pDepthStencilAttachment = &depth_reference, .preserveAttachmentCount = 0, .pPreserveAttachments = NULL, }; const VkRenderPassCreateInfo rp_info = { .sType = VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO, .pNext = NULL, .attachmentCount = 2, .pAttachments = attachments, .subpassCount = 1, .pSubpasses = &subpass, .dependencyCount = 0, .pDependencies = NULL, }; VkResult U_ASSERT_ONLY err; err = vkCreateRenderPass(demo->device, &rp_info, NULL, &demo->render_pass); assert(!err); } static VkShaderModule demo_prepare_shader_module(struct demo *demo, const void *code, size_t size) { VkShaderModuleCreateInfo moduleCreateInfo; VkShaderModule module; VkResult U_ASSERT_ONLY err; moduleCreateInfo.sType = VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO; moduleCreateInfo.pNext = NULL; moduleCreateInfo.codeSize = size; moduleCreateInfo.pCode = code; moduleCreateInfo.flags = 0; err = vkCreateShaderModule(demo->device, &moduleCreateInfo, NULL, &module); assert(!err); return module; } static VkShaderModule demo_prepare_vs(struct demo *demo) { size_t size = sizeof(vertShaderCode); demo->vert_shader_module = demo_prepare_shader_module(demo, vertShaderCode, size); return demo->vert_shader_module; } static VkShaderModule demo_prepare_fs(struct demo *demo) { size_t size = sizeof(fragShaderCode); demo->frag_shader_module = demo_prepare_shader_module(demo, fragShaderCode, size); return demo->frag_shader_module; } static void demo_prepare_pipeline(struct demo *demo) { VkGraphicsPipelineCreateInfo pipeline; VkPipelineCacheCreateInfo pipelineCache; VkPipelineVertexInputStateCreateInfo vi; VkPipelineInputAssemblyStateCreateInfo ia; VkPipelineRasterizationStateCreateInfo rs; VkPipelineColorBlendStateCreateInfo cb; VkPipelineDepthStencilStateCreateInfo ds; VkPipelineViewportStateCreateInfo vp; VkPipelineMultisampleStateCreateInfo ms; VkDynamicState dynamicStateEnables[8]; VkPipelineDynamicStateCreateInfo dynamicState; VkResult U_ASSERT_ONLY err; memset(dynamicStateEnables, 0, sizeof dynamicStateEnables); memset(&dynamicState, 0, sizeof dynamicState); dynamicState.sType = VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO; dynamicState.pDynamicStates = dynamicStateEnables; memset(&pipeline, 0, sizeof(pipeline)); pipeline.sType = VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO; pipeline.layout = demo->pipeline_layout; vi = demo->vertices.vi; memset(&ia, 0, sizeof(ia)); ia.sType = VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO; ia.topology = VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST; memset(&rs, 0, sizeof(rs)); rs.sType = VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO; rs.polygonMode = VK_POLYGON_MODE_FILL; rs.cullMode = VK_CULL_MODE_BACK_BIT; rs.frontFace = VK_FRONT_FACE_CLOCKWISE; rs.depthClampEnable = VK_FALSE; rs.rasterizerDiscardEnable = VK_FALSE; rs.depthBiasEnable = VK_FALSE; rs.lineWidth = 1.0f; memset(&cb, 0, sizeof(cb)); cb.sType = VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO; VkPipelineColorBlendAttachmentState att_state[1]; memset(att_state, 0, sizeof(att_state)); att_state[0].colorWriteMask = 0xf; att_state[0].blendEnable = VK_FALSE; cb.attachmentCount = 1; cb.pAttachments = att_state; memset(&vp, 0, sizeof(vp)); vp.sType = VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO; vp.viewportCount = 1; dynamicStateEnables[dynamicState.dynamicStateCount++] = VK_DYNAMIC_STATE_VIEWPORT; vp.scissorCount = 1; dynamicStateEnables[dynamicState.dynamicStateCount++] = VK_DYNAMIC_STATE_SCISSOR; memset(&ds, 0, sizeof(ds)); ds.sType = VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO; ds.depthTestEnable = VK_TRUE; ds.depthWriteEnable = VK_TRUE; ds.depthCompareOp = VK_COMPARE_OP_LESS_OR_EQUAL; ds.depthBoundsTestEnable = VK_FALSE; ds.back.failOp = VK_STENCIL_OP_KEEP; ds.back.passOp = VK_STENCIL_OP_KEEP; ds.back.compareOp = VK_COMPARE_OP_ALWAYS; ds.stencilTestEnable = VK_FALSE; ds.front = ds.back; memset(&ms, 0, sizeof(ms)); ms.sType = VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO; ms.pSampleMask = NULL; ms.rasterizationSamples = VK_SAMPLE_COUNT_1_BIT; // Two stages: vs and fs pipeline.stageCount = 2; VkPipelineShaderStageCreateInfo shaderStages[2]; memset(&shaderStages, 0, 2 * sizeof(VkPipelineShaderStageCreateInfo)); shaderStages[0].sType = VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO; shaderStages[0].stage = VK_SHADER_STAGE_VERTEX_BIT; shaderStages[0].module = demo_prepare_vs(demo); shaderStages[0].pName = "main"; shaderStages[1].sType = VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO; shaderStages[1].stage = VK_SHADER_STAGE_FRAGMENT_BIT; shaderStages[1].module = demo_prepare_fs(demo); shaderStages[1].pName = "main"; pipeline.pVertexInputState = &vi; pipeline.pInputAssemblyState = &ia; pipeline.pRasterizationState = &rs; pipeline.pColorBlendState = &cb; pipeline.pMultisampleState = &ms; pipeline.pViewportState = &vp; pipeline.pDepthStencilState = &ds; pipeline.pStages = shaderStages; pipeline.renderPass = demo->render_pass; pipeline.pDynamicState = &dynamicState; memset(&pipelineCache, 0, sizeof(pipelineCache)); pipelineCache.sType = VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO; err = vkCreatePipelineCache(demo->device, &pipelineCache, NULL, &demo->pipelineCache); assert(!err); err = vkCreateGraphicsPipelines(demo->device, demo->pipelineCache, 1, &pipeline, NULL, &demo->pipeline); assert(!err); vkDestroyPipelineCache(demo->device, demo->pipelineCache, NULL); vkDestroyShaderModule(demo->device, demo->frag_shader_module, NULL); vkDestroyShaderModule(demo->device, demo->vert_shader_module, NULL); } static void demo_prepare_descriptor_pool(struct demo *demo) { const VkDescriptorPoolSize type_count = { .type = VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, .descriptorCount = DEMO_TEXTURE_COUNT, }; const VkDescriptorPoolCreateInfo descriptor_pool = { .sType = VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO, .pNext = NULL, .maxSets = 1, .poolSizeCount = 1, .pPoolSizes = &type_count, }; VkResult U_ASSERT_ONLY err; err = vkCreateDescriptorPool(demo->device, &descriptor_pool, NULL, &demo->desc_pool); assert(!err); } static void demo_prepare_descriptor_set(struct demo *demo) { VkDescriptorImageInfo tex_descs[DEMO_TEXTURE_COUNT]; VkWriteDescriptorSet write; VkResult U_ASSERT_ONLY err; uint32_t i; VkDescriptorSetAllocateInfo alloc_info = { .sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO, .pNext = NULL, .descriptorPool = demo->desc_pool, .descriptorSetCount = 1, .pSetLayouts = &demo->desc_layout}; err = vkAllocateDescriptorSets(demo->device, &alloc_info, &demo->desc_set); assert(!err); memset(&tex_descs, 0, sizeof(tex_descs)); for (i = 0; i < DEMO_TEXTURE_COUNT; i++) { tex_descs[i].sampler = demo->textures[i].sampler; tex_descs[i].imageView = demo->textures[i].view; tex_descs[i].imageLayout = VK_IMAGE_LAYOUT_GENERAL; } memset(&write, 0, sizeof(write)); write.sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET; write.dstSet = demo->desc_set; write.descriptorCount = DEMO_TEXTURE_COUNT; write.descriptorType = VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER; write.pImageInfo = tex_descs; vkUpdateDescriptorSets(demo->device, 1, &write, 0, NULL); } static void demo_prepare_framebuffers(struct demo *demo) { VkImageView attachments[2]; attachments[1] = demo->depth.view; const VkFramebufferCreateInfo fb_info = { .sType = VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO, .pNext = NULL, .renderPass = demo->render_pass, .attachmentCount = 2, .pAttachments = attachments, .width = demo->width, .height = demo->height, .layers = 1, }; VkResult U_ASSERT_ONLY err; uint32_t i; demo->framebuffers = (VkFramebuffer *)malloc(demo->swapchainImageCount * sizeof(VkFramebuffer)); assert(demo->framebuffers); for (i = 0; i < demo->swapchainImageCount; i++) { attachments[0] = demo->buffers[i].view; err = vkCreateFramebuffer(demo->device, &fb_info, NULL, &demo->framebuffers[i]); assert(!err); } } static void demo_prepare(struct demo *demo) { VkResult U_ASSERT_ONLY err; const VkCommandPoolCreateInfo cmd_pool_info = { .sType = VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO, .pNext = NULL, .queueFamilyIndex = demo->graphics_queue_node_index, .flags = VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT, }; err = vkCreateCommandPool(demo->device, &cmd_pool_info, NULL, &demo->cmd_pool); assert(!err); const VkCommandBufferAllocateInfo cmd = { .sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO, .pNext = NULL, .commandPool = demo->cmd_pool, .level = VK_COMMAND_BUFFER_LEVEL_PRIMARY, .commandBufferCount = 1, }; err = vkAllocateCommandBuffers(demo->device, &cmd, &demo->draw_cmd); assert(!err); demo_prepare_buffers(demo); demo_prepare_depth(demo); demo_prepare_textures(demo); demo_prepare_vertices(demo); demo_prepare_descriptor_layout(demo); demo_prepare_render_pass(demo); demo_prepare_pipeline(demo); demo_prepare_descriptor_pool(demo); demo_prepare_descriptor_set(demo); demo_prepare_framebuffers(demo); } static void demo_error_callback(int error, const char* description) { printf("GLFW error: %s\n", description); fflush(stdout); } static void demo_key_callback(GLFWwindow* window, int key, int scancode, int action, int mods) { if (key == GLFW_KEY_ESCAPE && action == GLFW_RELEASE) glfwSetWindowShouldClose(window, GLFW_TRUE); } static void demo_refresh_callback(GLFWwindow* window) { struct demo* demo = glfwGetWindowUserPointer(window); demo_draw(demo); } static void demo_resize_callback(GLFWwindow* window, int width, int height) { struct demo* demo = glfwGetWindowUserPointer(window); demo->width = width; demo->height = height; demo_resize(demo); } static void demo_run(struct demo *demo) { while (!glfwWindowShouldClose(demo->window)) { glfwPollEvents(); demo_draw(demo); if (demo->depthStencil > 0.99f) demo->depthIncrement = -0.001f; if (demo->depthStencil < 0.8f) demo->depthIncrement = 0.001f; demo->depthStencil += demo->depthIncrement; // Wait for work to finish before updating MVP. vkDeviceWaitIdle(demo->device); demo->curFrame++; if (demo->frameCount != INT32_MAX && demo->curFrame == demo->frameCount) glfwSetWindowShouldClose(demo->window, GLFW_TRUE); } } static void demo_create_window(struct demo *demo) { glfwWindowHint(GLFW_CLIENT_API, GLFW_NO_API); demo->window = glfwCreateWindow(demo->width, demo->height, APP_LONG_NAME, NULL, NULL); if (!demo->window) { // It didn't work, so try to give a useful error: printf("Cannot create a window in which to draw!\n"); fflush(stdout); exit(1); } glfwSetWindowUserPointer(demo->window, demo); glfwSetWindowRefreshCallback(demo->window, demo_refresh_callback); glfwSetFramebufferSizeCallback(demo->window, demo_resize_callback); glfwSetKeyCallback(demo->window, demo_key_callback); } /* * Return 1 (true) if all layer names specified in check_names * can be found in given layer properties. */ static VkBool32 demo_check_layers(uint32_t check_count, const char **check_names, uint32_t layer_count, VkLayerProperties *layers) { uint32_t i, j; for (i = 0; i < check_count; i++) { VkBool32 found = 0; for (j = 0; j < layer_count; j++) { if (!strcmp(check_names[i], layers[j].layerName)) { found = 1; break; } } if (!found) { fprintf(stderr, "Cannot find layer: %s\n", check_names[i]); return 0; } } return 1; } static void demo_init_vk(struct demo *demo) { VkResult err; int glad_vk_version = 0; uint32_t i = 0; uint32_t required_extension_count = 0; uint32_t instance_layer_count = 0; uint32_t validation_layer_count = 0; const char **required_extensions = NULL; const char **instance_validation_layers = NULL; demo->enabled_extension_count = 0; demo->enabled_layer_count = 0; char *instance_validation_layers_alt1[] = { "VK_LAYER_LUNARG_standard_validation" }; char *instance_validation_layers_alt2[] = { "VK_LAYER_GOOGLE_threading", "VK_LAYER_LUNARG_parameter_validation", "VK_LAYER_LUNARG_object_tracker", "VK_LAYER_LUNARG_image", "VK_LAYER_LUNARG_core_validation", "VK_LAYER_LUNARG_swapchain", "VK_LAYER_GOOGLE_unique_objects" }; glad_vk_version = gladLoaderLoadVulkan(NULL, NULL, NULL); if (!glad_vk_version) { ERR_EXIT("Unable to load Vulkan symbols!\n", "gladLoad Failure"); } /* Look for validation layers */ VkBool32 validation_found = 0; if (demo->validate) { err = vkEnumerateInstanceLayerProperties(&instance_layer_count, NULL); assert(!err); instance_validation_layers = (const char**) instance_validation_layers_alt1; if (instance_layer_count > 0) { VkLayerProperties *instance_layers = malloc(sizeof (VkLayerProperties) * instance_layer_count); err = vkEnumerateInstanceLayerProperties(&instance_layer_count, instance_layers); assert(!err); validation_found = demo_check_layers( ARRAY_SIZE(instance_validation_layers_alt1), instance_validation_layers, instance_layer_count, instance_layers); if (validation_found) { demo->enabled_layer_count = ARRAY_SIZE(instance_validation_layers_alt1); demo->enabled_layers[0] = "VK_LAYER_LUNARG_standard_validation"; validation_layer_count = 1; } else { // use alternative set of validation layers instance_validation_layers = (const char**) instance_validation_layers_alt2; demo->enabled_layer_count = ARRAY_SIZE(instance_validation_layers_alt2); validation_found = demo_check_layers( ARRAY_SIZE(instance_validation_layers_alt2), instance_validation_layers, instance_layer_count, instance_layers); validation_layer_count = ARRAY_SIZE(instance_validation_layers_alt2); for (i = 0; i < validation_layer_count; i++) { demo->enabled_layers[i] = instance_validation_layers[i]; } } free(instance_layers); } if (!validation_found) { ERR_EXIT("vkEnumerateInstanceLayerProperties failed to find " "required validation layer.\n\n" "Please look at the Getting Started guide for additional " "information.\n", "vkCreateInstance Failure"); } } /* Look for instance extensions */ required_extensions = glfwGetRequiredInstanceExtensions(&required_extension_count); if (!required_extensions) { ERR_EXIT("glfwGetRequiredInstanceExtensions failed to find the " "platform surface extensions.\n\nDo you have a compatible " "Vulkan installable client driver (ICD) installed?\nPlease " "look at the Getting Started guide for additional " "information.\n", "vkCreateInstance Failure"); } for (i = 0; i < required_extension_count; i++) { demo->extension_names[demo->enabled_extension_count++] = required_extensions[i]; assert(demo->enabled_extension_count < 64); } if (GLAD_VK_EXT_debug_report && demo->validate) { demo->extension_names[demo->enabled_extension_count++] = VK_EXT_DEBUG_REPORT_EXTENSION_NAME; } assert(demo->enabled_extension_count < 64); const VkApplicationInfo app = { .sType = VK_STRUCTURE_TYPE_APPLICATION_INFO, .pNext = NULL, .pApplicationName = APP_SHORT_NAME, .applicationVersion = 0, .pEngineName = APP_SHORT_NAME, .engineVersion = 0, .apiVersion = VK_API_VERSION_1_0, }; VkInstanceCreateInfo inst_info = { .sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO, .pNext = NULL, .pApplicationInfo = &app, .enabledLayerCount = demo->enabled_layer_count, .ppEnabledLayerNames = (const char *const *)instance_validation_layers, .enabledExtensionCount = demo->enabled_extension_count, .ppEnabledExtensionNames = (const char *const *)demo->extension_names, }; uint32_t gpu_count; err = vkCreateInstance(&inst_info, NULL, &demo->inst); if (err == VK_ERROR_INCOMPATIBLE_DRIVER) { ERR_EXIT("Cannot find a compatible Vulkan installable client driver " "(ICD).\n\nPlease look at the Getting Started guide for " "additional information.\n", "vkCreateInstance Failure"); } else if (err == VK_ERROR_EXTENSION_NOT_PRESENT) { ERR_EXIT("Cannot find a specified extension library" ".\nMake sure your layers path is set appropriately\n", "vkCreateInstance Failure"); } else if (err) { ERR_EXIT("vkCreateInstance failed.\n\nDo you have a compatible Vulkan " "installable client driver (ICD) installed?\nPlease look at " "the Getting Started guide for additional information.\n", "vkCreateInstance Failure"); } /* Make initial call to query gpu_count, then second call for gpu info*/ err = vkEnumeratePhysicalDevices(demo->inst, &gpu_count, NULL); assert(!err && gpu_count > 0); if (gpu_count > 0) { VkPhysicalDevice *physical_devices = malloc(sizeof(VkPhysicalDevice) * gpu_count); err = vkEnumeratePhysicalDevices(demo->inst, &gpu_count, physical_devices); assert(!err); /* For tri demo we just grab the first physical device */ demo->gpu = physical_devices[0]; free(physical_devices); } else { ERR_EXIT("vkEnumeratePhysicalDevices reported zero accessible devices." "\n\nDo you have a compatible Vulkan installable client" " driver (ICD) installed?\nPlease look at the Getting Started" " guide for additional information.\n", "vkEnumeratePhysicalDevices Failure"); } /* Look for device extensions */ /* Re-Load glad here to load instance pointers and to populate available extensions */ glad_vk_version = gladLoaderLoadVulkan(demo->inst, demo->gpu, NULL); if (!glad_vk_version) { ERR_EXIT("Unable to re-load Vulkan symbols with instance!\n", "gladLoad Failure"); } VkBool32 swapchainExtFound = 0; demo->enabled_extension_count = 0; if (GLAD_VK_KHR_swapchain) { swapchainExtFound = 1; demo->extension_names[demo->enabled_extension_count++] = VK_KHR_SWAPCHAIN_EXTENSION_NAME; } assert(demo->enabled_extension_count < 64); if (!swapchainExtFound) { ERR_EXIT("vkEnumerateDeviceExtensionProperties failed to find " "the " VK_KHR_SWAPCHAIN_EXTENSION_NAME " extension.\n\nDo you have a compatible " "Vulkan installable client driver (ICD) installed?\nPlease " "look at the Getting Started guide for additional " "information.\n", "vkCreateInstance Failure"); } if (demo->validate) { demo->CreateDebugReportCallback = (PFN_vkCreateDebugReportCallbackEXT)vkGetInstanceProcAddr( demo->inst, "vkCreateDebugReportCallbackEXT"); demo->DestroyDebugReportCallback = (PFN_vkDestroyDebugReportCallbackEXT)vkGetInstanceProcAddr( demo->inst, "vkDestroyDebugReportCallbackEXT"); if (!demo->CreateDebugReportCallback) { ERR_EXIT( "GetProcAddr: Unable to find vkCreateDebugReportCallbackEXT\n", "vkGetProcAddr Failure"); } if (!demo->DestroyDebugReportCallback) { ERR_EXIT( "GetProcAddr: Unable to find vkDestroyDebugReportCallbackEXT\n", "vkGetProcAddr Failure"); } demo->DebugReportMessage = (PFN_vkDebugReportMessageEXT)vkGetInstanceProcAddr( demo->inst, "vkDebugReportMessageEXT"); if (!demo->DebugReportMessage) { ERR_EXIT("GetProcAddr: Unable to find vkDebugReportMessageEXT\n", "vkGetProcAddr Failure"); } VkDebugReportCallbackCreateInfoEXT dbgCreateInfo; dbgCreateInfo.sType = VK_STRUCTURE_TYPE_DEBUG_REPORT_CREATE_INFO_EXT; dbgCreateInfo.flags = VK_DEBUG_REPORT_ERROR_BIT_EXT | VK_DEBUG_REPORT_WARNING_BIT_EXT; dbgCreateInfo.pfnCallback = demo->use_break ? BreakCallback : dbgFunc; dbgCreateInfo.pUserData = demo; dbgCreateInfo.pNext = NULL; err = demo->CreateDebugReportCallback(demo->inst, &dbgCreateInfo, NULL, &demo->msg_callback); switch (err) { case VK_SUCCESS: break; case VK_ERROR_OUT_OF_HOST_MEMORY: ERR_EXIT("CreateDebugReportCallback: out of host memory\n", "CreateDebugReportCallback Failure"); break; default: ERR_EXIT("CreateDebugReportCallback: unknown failure\n", "CreateDebugReportCallback Failure"); break; } } vkGetPhysicalDeviceProperties(demo->gpu, &demo->gpu_props); // Query with NULL data to get count vkGetPhysicalDeviceQueueFamilyProperties(demo->gpu, &demo->queue_count, NULL); demo->queue_props = (VkQueueFamilyProperties *)malloc( demo->queue_count * sizeof(VkQueueFamilyProperties)); vkGetPhysicalDeviceQueueFamilyProperties(demo->gpu, &demo->queue_count, demo->queue_props); assert(demo->queue_count >= 1); vkGetPhysicalDeviceFeatures(demo->gpu, &demo->gpu_features); // Graphics queue and MemMgr queue can be separate. // TODO: Add support for separate queues, including synchronization, // and appropriate tracking for QueueSubmit } static void demo_init_device(struct demo *demo) { VkResult U_ASSERT_ONLY err; float queue_priorities[1] = {0.0}; const VkDeviceQueueCreateInfo queue = { .sType = VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO, .pNext = NULL, .queueFamilyIndex = demo->graphics_queue_node_index, .queueCount = 1, .pQueuePriorities = queue_priorities}; VkPhysicalDeviceFeatures features; memset(&features, 0, sizeof(features)); if (demo->gpu_features.shaderClipDistance) { features.shaderClipDistance = VK_TRUE; } VkDeviceCreateInfo device = { .sType = VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO, .pNext = NULL, .queueCreateInfoCount = 1, .pQueueCreateInfos = &queue, .enabledLayerCount = 0, .ppEnabledLayerNames = NULL, .enabledExtensionCount = demo->enabled_extension_count, .ppEnabledExtensionNames = (const char *const *)demo->extension_names, .pEnabledFeatures = &features, }; err = vkCreateDevice(demo->gpu, &device, NULL, &demo->device); assert(!err); int glad_vk_version = gladLoaderLoadVulkan(demo->inst, demo->gpu, demo->device); if (!glad_vk_version) { ERR_EXIT("Unable to re-load Vulkan symbols with device!\n", "gladLoad Failure"); } } static void demo_init_vk_swapchain(struct demo *demo) { VkResult U_ASSERT_ONLY err; uint32_t i; // Create a WSI surface for the window: glfwCreateWindowSurface(demo->inst, demo->window, NULL, &demo->surface); // Iterate over each queue to learn whether it supports presenting: VkBool32 *supportsPresent = (VkBool32 *)malloc(demo->queue_count * sizeof(VkBool32)); for (i = 0; i < demo->queue_count; i++) { vkGetPhysicalDeviceSurfaceSupportKHR(demo->gpu, i, demo->surface, &supportsPresent[i]); } // Search for a graphics and a present queue in the array of queue // families, try to find one that supports both uint32_t graphicsQueueNodeIndex = UINT32_MAX; uint32_t presentQueueNodeIndex = UINT32_MAX; for (i = 0; i < demo->queue_count; i++) { if ((demo->queue_props[i].queueFlags & VK_QUEUE_GRAPHICS_BIT) != 0) { if (graphicsQueueNodeIndex == UINT32_MAX) { graphicsQueueNodeIndex = i; } if (supportsPresent[i] == VK_TRUE) { graphicsQueueNodeIndex = i; presentQueueNodeIndex = i; break; } } } if (presentQueueNodeIndex == UINT32_MAX) { // If didn't find a queue that supports both graphics and present, then // find a separate present queue. for (i = 0; i < demo->queue_count; ++i) { if (supportsPresent[i] == VK_TRUE) { presentQueueNodeIndex = i; break; } } } free(supportsPresent); // Generate error if could not find both a graphics and a present queue if (graphicsQueueNodeIndex == UINT32_MAX || presentQueueNodeIndex == UINT32_MAX) { ERR_EXIT("Could not find a graphics and a present queue\n", "Swapchain Initialization Failure"); } // TODO: Add support for separate queues, including presentation, // synchronization, and appropriate tracking for QueueSubmit. // NOTE: While it is possible for an application to use a separate graphics // and a present queues, this demo program assumes it is only using // one: if (graphicsQueueNodeIndex != presentQueueNodeIndex) { ERR_EXIT("Could not find a common graphics and a present queue\n", "Swapchain Initialization Failure"); } demo->graphics_queue_node_index = graphicsQueueNodeIndex; demo_init_device(demo); vkGetDeviceQueue(demo->device, demo->graphics_queue_node_index, 0, &demo->queue); // Get the list of VkFormat's that are supported: uint32_t formatCount; err = vkGetPhysicalDeviceSurfaceFormatsKHR(demo->gpu, demo->surface, &formatCount, NULL); assert(!err); VkSurfaceFormatKHR *surfFormats = (VkSurfaceFormatKHR *)malloc(formatCount * sizeof(VkSurfaceFormatKHR)); err = vkGetPhysicalDeviceSurfaceFormatsKHR(demo->gpu, demo->surface, &formatCount, surfFormats); assert(!err); // If the format list includes just one entry of VK_FORMAT_UNDEFINED, // the surface has no preferred format. Otherwise, at least one // supported format will be returned. if (formatCount == 1 && surfFormats[0].format == VK_FORMAT_UNDEFINED) { demo->format = VK_FORMAT_B8G8R8A8_UNORM; } else { assert(formatCount >= 1); demo->format = surfFormats[0].format; } demo->color_space = surfFormats[0].colorSpace; demo->curFrame = 0; // Get Memory information and properties vkGetPhysicalDeviceMemoryProperties(demo->gpu, &demo->memory_properties); } static void demo_init_connection(struct demo *demo) { glfwSetErrorCallback(demo_error_callback); if (!glfwInit()) { printf("Cannot initialize GLFW.\nExiting ...\n"); fflush(stdout); exit(1); } if (!glfwVulkanSupported()) { printf("GLFW failed to find the Vulkan loader.\nExiting ...\n"); fflush(stdout); exit(1); } } static void demo_init(struct demo *demo, const int argc, const char *argv[]) { int i; memset(demo, 0, sizeof(*demo)); demo->frameCount = INT32_MAX; for (i = 1; i < argc; i++) { if (strcmp(argv[i], "--use_staging") == 0) { demo->use_staging_buffer = true; continue; } if (strcmp(argv[i], "--break") == 0) { demo->use_break = true; continue; } if (strcmp(argv[i], "--validate") == 0) { demo->validate = true; continue; } if (strcmp(argv[i], "--c") == 0 && demo->frameCount == INT32_MAX && i < argc - 1 && sscanf(argv[i + 1], "%d", &demo->frameCount) == 1 && demo->frameCount >= 0) { i++; continue; } fprintf(stderr, "Usage:\n %s [--use_staging] [--validate] [--break] " "[--c ]\n", APP_SHORT_NAME); fflush(stderr); exit(1); } demo_init_connection(demo); demo_init_vk(demo); demo->width = 700; demo->height = 500; demo->depthStencil = 1.0; demo->depthIncrement = -0.01f; } static void demo_cleanup(struct demo *demo) { uint32_t i; for (i = 0; i < demo->swapchainImageCount; i++) { vkDestroyFramebuffer(demo->device, demo->framebuffers[i], NULL); } free(demo->framebuffers); vkDestroyDescriptorPool(demo->device, demo->desc_pool, NULL); if (demo->setup_cmd) { vkFreeCommandBuffers(demo->device, demo->cmd_pool, 1, &demo->setup_cmd); } vkFreeCommandBuffers(demo->device, demo->cmd_pool, 1, &demo->draw_cmd); vkDestroyCommandPool(demo->device, demo->cmd_pool, NULL); vkDestroyPipeline(demo->device, demo->pipeline, NULL); vkDestroyRenderPass(demo->device, demo->render_pass, NULL); vkDestroyPipelineLayout(demo->device, demo->pipeline_layout, NULL); vkDestroyDescriptorSetLayout(demo->device, demo->desc_layout, NULL); vkDestroyBuffer(demo->device, demo->vertices.buf, NULL); vkFreeMemory(demo->device, demo->vertices.mem, NULL); for (i = 0; i < DEMO_TEXTURE_COUNT; i++) { vkDestroyImageView(demo->device, demo->textures[i].view, NULL); vkDestroyImage(demo->device, demo->textures[i].image, NULL); vkFreeMemory(demo->device, demo->textures[i].mem, NULL); vkDestroySampler(demo->device, demo->textures[i].sampler, NULL); } for (i = 0; i < demo->swapchainImageCount; i++) { vkDestroyImageView(demo->device, demo->buffers[i].view, NULL); } vkDestroyImageView(demo->device, demo->depth.view, NULL); vkDestroyImage(demo->device, demo->depth.image, NULL); vkFreeMemory(demo->device, demo->depth.mem, NULL); vkDestroySwapchainKHR(demo->device, demo->swapchain, NULL); free(demo->buffers); vkDestroyDevice(demo->device, NULL); if (demo->validate) { demo->DestroyDebugReportCallback(demo->inst, demo->msg_callback, NULL); } vkDestroySurfaceKHR(demo->inst, demo->surface, NULL); vkDestroyInstance(demo->inst, NULL); free(demo->queue_props); gladLoaderUnloadVulkan(); glfwDestroyWindow(demo->window); glfwTerminate(); } static void demo_resize(struct demo *demo) { uint32_t i; // In order to properly resize the window, we must re-create the swapchain // AND redo the command buffers, etc. // // First, perform part of the demo_cleanup() function: for (i = 0; i < demo->swapchainImageCount; i++) { vkDestroyFramebuffer(demo->device, demo->framebuffers[i], NULL); } free(demo->framebuffers); vkDestroyDescriptorPool(demo->device, demo->desc_pool, NULL); if (demo->setup_cmd) { vkFreeCommandBuffers(demo->device, demo->cmd_pool, 1, &demo->setup_cmd); } vkFreeCommandBuffers(demo->device, demo->cmd_pool, 1, &demo->draw_cmd); vkDestroyCommandPool(demo->device, demo->cmd_pool, NULL); vkDestroyPipeline(demo->device, demo->pipeline, NULL); vkDestroyRenderPass(demo->device, demo->render_pass, NULL); vkDestroyPipelineLayout(demo->device, demo->pipeline_layout, NULL); vkDestroyDescriptorSetLayout(demo->device, demo->desc_layout, NULL); vkDestroyBuffer(demo->device, demo->vertices.buf, NULL); vkFreeMemory(demo->device, demo->vertices.mem, NULL); for (i = 0; i < DEMO_TEXTURE_COUNT; i++) { vkDestroyImageView(demo->device, demo->textures[i].view, NULL); vkDestroyImage(demo->device, demo->textures[i].image, NULL); vkFreeMemory(demo->device, demo->textures[i].mem, NULL); vkDestroySampler(demo->device, demo->textures[i].sampler, NULL); } for (i = 0; i < demo->swapchainImageCount; i++) { vkDestroyImageView(demo->device, demo->buffers[i].view, NULL); } vkDestroyImageView(demo->device, demo->depth.view, NULL); vkDestroyImage(demo->device, demo->depth.image, NULL); vkFreeMemory(demo->device, demo->depth.mem, NULL); free(demo->buffers); // Second, re-perform the demo_prepare() function, which will re-create the // swapchain: demo_prepare(demo); } int main(const int argc, const char *argv[]) { struct demo demo; demo_init(&demo, argc, argv); demo_create_window(&demo); demo_init_vk_swapchain(&demo); demo_prepare(&demo); demo_run(&demo); demo_cleanup(&demo); return validation_error; } glad-2.0.2/example/c/wgl.c000066400000000000000000000140541432671066000152450ustar00rootroot00000000000000/** * Thanks to Xeek for the code! * * Building and running under Linux: * i686-w64-mingw32-gcc example/c/wgl.c build/src/wgl.c build/src/gl.c -Ibuild/include -lgdi32 -lopengl32 * wine a.exe */ #define WIN32_LEAN_AND_MEAN #include #include #include #include #include LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam); static const TCHAR window_classname[] = _T("SampleWndClass"); static const TCHAR window_title[] = _T("[glad] WGL"); static const POINT window_location = { CW_USEDEFAULT, 0 }; static const SIZE window_size = { 1024, 768 }; static const GLfloat clear_color[] = { 0.0f, 0.0f, 1.0f, 1.0f }; int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { UNREFERENCED_PARAMETER(hPrevInstance); UNREFERENCED_PARAMETER(lpCmdLine); WNDCLASSEX wcex = { }; wcex.cbSize = sizeof(WNDCLASSEX); wcex.style = CS_HREDRAW | CS_VREDRAW; wcex.lpfnWndProc = WndProc; wcex.hInstance = hInstance; wcex.hCursor = LoadCursor(NULL, IDC_ARROW); wcex.hbrBackground = (HBRUSH) (COLOR_WINDOW + 1); wcex.lpszClassName = window_classname; ATOM wndclass = RegisterClassEx(&wcex); HWND hWnd = CreateWindow(MAKEINTATOM(wndclass), window_title, WS_OVERLAPPEDWINDOW, window_location.x, window_location.y, window_size.cx, window_size.cy, NULL, NULL, hInstance, NULL); if (!hWnd) { MessageBox(NULL, _T("Failed to create window!"), window_title, MB_ICONERROR); return -1; } // Configure & Initialize OpenGL: // Get a device context so I can set the pixel format later: HDC hdc = GetDC(hWnd); if (hdc == NULL) { DestroyWindow(hWnd); MessageBox(NULL, _T("Failed to get Window's device context!"), window_title, MB_ICONERROR); return -1; } // Set the pixel format for the device context: PIXELFORMATDESCRIPTOR pfd = { }; pfd.nSize = sizeof(pfd); pfd.nSize = sizeof(PIXELFORMATDESCRIPTOR); // Set the size of the PFD to the size of the class pfd.dwFlags = PFD_DOUBLEBUFFER | PFD_SUPPORT_OPENGL | PFD_DRAW_TO_WINDOW; // Enable double buffering, opengl support and drawing to a window pfd.iPixelType = PFD_TYPE_RGBA; // Set our application to use RGBA pixels pfd.cColorBits = 32; // Give us 32 bits of color information (the higher, the more colors) pfd.cDepthBits = 32; // Give us 32 bits of depth information (the higher, the more depth levels) pfd.iLayerType = PFD_MAIN_PLANE; // Set the layer of the PFD int format = ChoosePixelFormat(hdc, &pfd); if (format == 0 || SetPixelFormat(hdc, format, &pfd) == FALSE) { ReleaseDC(hWnd, hdc); DestroyWindow(hWnd); MessageBox(NULL, _T("Failed to set a compatible pixel format!"), window_title, MB_ICONERROR); return -1; } // Create and enable a temporary (helper) opengl context: HGLRC temp_context = NULL; if (NULL == (temp_context = wglCreateContext(hdc))) { ReleaseDC(hWnd, hdc); DestroyWindow(hWnd); MessageBox(NULL, _T("Failed to create the initial rendering context!"), window_title, MB_ICONERROR); return -1; } wglMakeCurrent(hdc, temp_context); // Load WGL Extensions: gladLoaderLoadWGL(hdc); // Set the desired OpenGL version: int attributes[] = { WGL_CONTEXT_MAJOR_VERSION_ARB, 3, // Set the MAJOR version of OpenGL to 3 WGL_CONTEXT_MINOR_VERSION_ARB, 2, // Set the MINOR version of OpenGL to 2 WGL_CONTEXT_FLAGS_ARB, WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB, // Set our OpenGL context to be forward compatible 0 }; // Create the final opengl context and get rid of the temporary one: HGLRC opengl_context = NULL; if (NULL == (opengl_context = wglCreateContextAttribsARB(hdc, NULL, attributes))) { wglDeleteContext(temp_context); ReleaseDC(hWnd, hdc); DestroyWindow(hWnd); MessageBox(NULL, _T("Failed to create the final rendering context!"), window_title, MB_ICONERROR); return -1; } wglMakeCurrent(NULL, NULL); // Remove the temporary context from being active wglDeleteContext(temp_context); // Delete the temporary OpenGL context wglMakeCurrent(hdc, opengl_context); // Make our OpenGL 3.2 context current // Glad Loader! if (!gladLoaderLoadGL()) { wglMakeCurrent(NULL, NULL); wglDeleteContext(opengl_context); ReleaseDC(hWnd, hdc); DestroyWindow(hWnd); MessageBox(NULL, _T("Glad Loader failed!"), window_title, MB_ICONERROR); return -1; } // Show & Update the main window: ShowWindow(hWnd, nCmdShow); UpdateWindow(hWnd); // A typical native Windows game loop: bool should_quit = false; MSG msg = { }; while (!should_quit) { // Generally you'll want to empty out the message queue before each rendering // frame or messages will build up in the queue possibly causing input // delay. Multiple messages and input events occur before each frame. while (PeekMessage(&msg, hWnd, 0, 0, PM_REMOVE)) { TranslateMessage(&msg); DispatchMessage(&msg); if (msg.message == WM_QUIT || (msg.message == WM_KEYDOWN && msg.wParam == VK_ESCAPE)) should_quit = true; } glClearColor(clear_color[0], clear_color[1], clear_color[2], clear_color[3]); glClear(GL_COLOR_BUFFER_BIT); SwapBuffers(hdc); } // Clean-up: if (opengl_context) wglDeleteContext(opengl_context); if (hdc) ReleaseDC(hWnd, hdc); if (hWnd) DestroyWindow(hWnd); return (int) msg.wParam; } LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { switch (uMsg) { case WM_QUIT: case WM_DESTROY: case WM_CLOSE: PostQuitMessage(0); break; default: return DefWindowProc(hWnd, uMsg, wParam, lParam); } return 0; } glad-2.0.2/example/rust/000077500000000000000000000000001432671066000150575ustar00rootroot00000000000000glad-2.0.2/example/rust/gl-glfw-mx/000077500000000000000000000000001432671066000170405ustar00rootroot00000000000000glad-2.0.2/example/rust/gl-glfw-mx/Cargo.toml000066400000000000000000000001651432671066000207720ustar00rootroot00000000000000[package] name = "gl-glfw" version = "0.1.0" [dependencies] glfw = "0.37.0" glad-gl = { path = "./build/glad-gl" } glad-2.0.2/example/rust/gl-glfw-mx/README.md000066400000000000000000000015101432671066000203140ustar00rootroot00000000000000Example: gl-glfw-mx ================ This is basic example showcasing `glad-gl` in combination with [`glfw`](https://crates.io/crates/glfw). And multiple OpenGL contexts in different windows. To run the example use the following command: ```sh ./init.sh && cargo run ``` The `init.sh` script is just a small utility used to generate the `glad-gl` crate into the `build/` directory. The `Cargo.toml` references the dependency using: ```toml [dependencies] glad-gl = { path = "./build/glad-gl" } ``` This example is the basic example of the [glfw crate](https://crates.io/crates/glfw) with some OpenGL instructions added and just one additional line to initialize `glad`: ```rust gl::load(|e| glfw.get_proc_address_raw(e) as *const std::os::raw::c_void); ``` That's all that is needed to initialize and use OpenGL using `glad`! glad-2.0.2/example/rust/gl-glfw-mx/init.sh000077500000000000000000000002561432671066000203450ustar00rootroot00000000000000#!/bin/sh BASE_PATH="$(dirname $(realpath $0))" cd "${BASE_PATH}/../../../" python -m glad --out-path "${BASE_PATH}/build" --extensions="" --api="gl:core=3.3" rust --mx glad-2.0.2/example/rust/gl-glfw-mx/src/000077500000000000000000000000001432671066000176275ustar00rootroot00000000000000glad-2.0.2/example/rust/gl-glfw-mx/src/main.rs000066400000000000000000000030441432671066000211220ustar00rootroot00000000000000extern crate glfw; extern crate glad_gl; use std::sync::mpsc::Receiver; use glfw::{Action, Context, Key}; use glad_gl::gl; struct Window { source: glfw::Window, events: Receiver<(f64, glfw::WindowEvent)>, gl: gl::Gl } fn main() { let mut glfw = glfw::init(glfw::FAIL_ON_ERRORS).unwrap(); let mut w1 = create_window(&mut glfw); let mut w2 = create_window(&mut glfw); while !w1.source.should_close() && !w2.source.should_close() { glfw.poll_events(); draw(&mut w1); draw(&mut w2); } } fn create_window(glfw: &mut glfw::Glfw) -> Window { let (mut window, events) = glfw .create_window(300, 300, "[glad] Rust - OpenGL with GLFW", glfw::WindowMode::Windowed) .expect("Failed to create GLFW window."); window.set_key_polling(true); window.make_current(); let gl = gl::load(|e| glfw.get_proc_address_raw(e) as *const std::os::raw::c_void); Window { source: window, events, gl } } fn draw(window: &mut Window) { for (_, event) in glfw::flush_messages(&window.events) { handle_window_event(&mut window.source, event); } window.source.make_current(); unsafe { window.gl.ClearColor(0.7, 0.9, 0.1, 1.0); window.gl.Clear(gl::COLOR_BUFFER_BIT); } window.source.swap_buffers(); } fn handle_window_event(window: &mut glfw::Window, event: glfw::WindowEvent) { match event { glfw::WindowEvent::Key(Key::Escape, _, Action::Press, _) => { window.set_should_close(true) } _ => {} } } glad-2.0.2/example/rust/gl-glfw/000077500000000000000000000000001432671066000164165ustar00rootroot00000000000000glad-2.0.2/example/rust/gl-glfw/Cargo.toml000066400000000000000000000001651432671066000203500ustar00rootroot00000000000000[package] name = "gl-glfw" version = "0.1.0" [dependencies] glfw = "0.37.0" glad-gl = { path = "./build/glad-gl" } glad-2.0.2/example/rust/gl-glfw/README.md000066400000000000000000000014261432671066000177000ustar00rootroot00000000000000Example: gl-glfw ================ This is basic example showcasing `glad-gl` in combination with [`glfw`](https://crates.io/crates/glfw). To run the example use the following command: ```sh ./init.sh && cargo run ``` The `init.sh` script is just a small utility used to generate the `glad-gl` crate into the `build/` directory. The `Cargo.toml` references the dependency using: ```toml [dependencies] glad-gl = { path = "./build/glad-gl" } ``` This example is the basic example of the [glfw crate](https://crates.io/crates/glfw) with some OpenGL instructions added and just one additional line to initialize `glad`: ```rust gl::load(|e| glfw.get_proc_address_raw(e) as *const std::os::raw::c_void); ``` That's all that is needed to initialize and use OpenGL using `glad`! glad-2.0.2/example/rust/gl-glfw/init.sh000077500000000000000000000002511432671066000177160ustar00rootroot00000000000000#!/bin/sh BASE_PATH="$(dirname $(realpath $0))" cd "${BASE_PATH}/../../../" python -m glad --out-path "${BASE_PATH}/build" --extensions="" --api="gl:core=3.3" rust glad-2.0.2/example/rust/gl-glfw/src/000077500000000000000000000000001432671066000172055ustar00rootroot00000000000000glad-2.0.2/example/rust/gl-glfw/src/main.rs000066400000000000000000000020601432671066000204750ustar00rootroot00000000000000extern crate glfw; extern crate glad_gl; use glfw::{Action, Context, Key}; use glad_gl::gl; fn main() { let mut glfw = glfw::init(glfw::FAIL_ON_ERRORS).unwrap(); let (mut window, events) = glfw.create_window(300, 300, "[glad] Rust - OpenGL with GLFW", glfw::WindowMode::Windowed) .expect("Failed to create GLFW window."); window.set_key_polling(true); window.make_current(); gl::load(|e| glfw.get_proc_address_raw(e) as *const std::os::raw::c_void); while !window.should_close() { glfw.poll_events(); for (_, event) in glfw::flush_messages(&events) { handle_window_event(&mut window, event); } unsafe { gl::ClearColor(0.7, 0.9, 0.1, 1.0); gl::Clear(gl::COLOR_BUFFER_BIT); } window.swap_buffers(); } } fn handle_window_event(window: &mut glfw::Window, event: glfw::WindowEvent) { match event { glfw::WindowEvent::Key(Key::Escape, _, Action::Press, _) => { window.set_should_close(true) } _ => {} } } glad-2.0.2/glad/000077500000000000000000000000001432671066000133365ustar00rootroot00000000000000glad-2.0.2/glad/__init__.py000066400000000000000000000000301432671066000154400ustar00rootroot00000000000000 __version__ = '2.0.2' glad-2.0.2/glad/__main__.py000066400000000000000000000147211432671066000154350ustar00rootroot00000000000000#!/usr/bin/env python """ Uses the official Khronos-XML specs to generate a Vulkan/GL/GLES/EGL/GLX/WGL Loader made for your needs. Subcommands have additional help information, query with: `{subcommand} --help` """ from itertools import groupby import logging import os import glad.files from glad.config import Config, ConfigOption from glad.generator import GenerationInfo from glad.sink import LoggingSink from glad.opener import URLOpener from glad.parse import FeatureSet from glad.plugin import find_specifications, find_generators from glad.util import parse_apis logger = logging.getLogger('glad') def parse_extensions(value): if os.path.isfile(value): # it's an extensions file with open(value) as f: value = f.read() value = value.replace(',', ' ') return list(filter(None, value.split())) class GlobalConfig(Config): OUT_PATH = ConfigOption( required=True, description='Output directory for the generated files' ) API = ConfigOption( required=True, converter=parse_apis, description='Comma separated list of APIs in `name:profile=version` pairs ' 'optionally including a specification `name:profile/spec=version`. ' 'No version means latest, a profile is only required if the API requires a profile. ' 'E.g. `gl:core=3.3,gles1/gl=2,gles2' ) EXTENSIONS = ConfigOption( converter=parse_extensions, default=None, description='Path to a file containing a list of extensions or ' 'a comma separated list of extensions, if missing ' 'all possible extensions are included.' ) MERGE = ConfigOption( converter=bool, default=False, description='Merge multiple APIs of the same specification into one file.' ) QUIET = ConfigOption( converter=bool, description='Disable logging.' ) REPRODUCIBLE = ConfigOption( converter=bool, default=False, description='Makes the build reproducible by not fetching the latest ' 'specification from Khronos.' ) def load_specifications(specification_names, opener, specification_classes=None): specifications = dict() if specification_classes is None: specification_classes = find_specifications() for name in set(specification_names): Specification = specification_classes[name] xml_name = name + '.xml' if os.path.isfile(xml_name): logger.info('using local specification: %s', xml_name) specification = Specification.from_file(xml_name, opener=opener) else: logger.info('getting %r specification from remote location', name) specification = Specification.from_remote(opener=opener) specifications[name] = specification return specifications def apis_by_specification(api_info, specifications): return groupby(api_info.items(), key=lambda api_info: specifications[api_info[1].specification]) def main(args=None): from argparse import ArgumentParser import sys # Initialize logging as early as possible if not '--quiet' in (args or sys.argv): logging.basicConfig( format='[%(asctime)s][%(levelname)s\t][%(name)-7s\t]: %(message)s', datefmt='%d.%m.%Y %H:%M:%S', level=logging.DEBUG ) logging_sink = LoggingSink(logger=logger) description = __doc__ parser = ArgumentParser(description=description) global_config = GlobalConfig() global_config.init_parser(parser) subparsers = parser.add_subparsers( dest='subparser_name', description='Generator to use' ) subparsers.default = 'c' configs = dict() generators = find_generators() for lang, Generator in generators.items(): config = Generator.Config() subparser = subparsers.add_parser(lang) config.init_parser(subparser) configs[lang] = config ns = parser.parse_args(args=args) global_config.update_from_object(ns, convert=False, ignore_additional=True) config = configs[ns.subparser_name] config.update_from_object(ns, convert=False, ignore_additional=True) # This should never throw if Config.init_parser is working correctly global_config.validate() # Done before, but doesn't hurt config.validate() if global_config['REPRODUCIBLE']: opener = glad.files.StaticFileOpener() gen_info_factory = lambda *a, **kw: GenerationInfo.create(when='-', *a, **kw) else: opener = URLOpener() gen_info_factory = GenerationInfo.create specifications = load_specifications( [value[0] for value in global_config['API'].values()], opener=opener ) generator = generators[ns.subparser_name]( global_config['OUT_PATH'], opener=opener, gen_info_factory=gen_info_factory ) invalid_extensions = set(global_config['EXTENSIONS'] or []) for specification, apis in apis_by_specification(global_config['API'], specifications): for api in apis: invalid_extensions = invalid_extensions.difference(specification.extensions[api[0]]) if not len(invalid_extensions) == 0: message = 'invalid extensions or extensions not present in one of the selected APIs: {}\n' \ .format(', '.join(invalid_extensions)) parser.exit(11, message) def select(specification, api, info): logging_sink.info('generating {}:{}/{}={}'.format(api, info.profile, info.specification, info.version)) extensions = global_config['EXTENSIONS'] if extensions: extensions = [ext for ext in extensions if specification.is_extension(api, ext)] return generator.select(specification, api, info.version, info.profile, extensions, config, sink=logging_sink) for specification, apis in apis_by_specification(global_config['API'], specifications): feature_sets = list(select(specification, api, info) for api, info in apis) if global_config['MERGE']: logging_sink.info('merging {}'.format(feature_sets)) feature_sets = [FeatureSet.merge(feature_sets, sink=logging_sink)] logging_sink.info('merged into {}'.format(feature_sets[0])) for feature_set in feature_sets: logging_sink.info('generating feature set {}'.format(feature_set)) generator.generate(specification, feature_set, config, sink=logging_sink) if __name__ == '__main__': main() glad-2.0.2/glad/config.py000066400000000000000000000215321432671066000151600ustar00rootroot00000000000000class ConfigException(Exception): pass class InvalidConfig(ConfigException): pass class OptionRequired(InvalidConfig): def __init__(self, name, option): ConfigException.__init__(self, 'Required option {!r} not set'.format(name)) self.name = name self.option = option class ConstraintException(InvalidConfig): def __init__(self, message, constraint): InvalidConfig.__init__(self, message) self.constraint = constraint class RequirementNotSatisfied(ConstraintException): pass class UnsupportedConfiguration(ConstraintException): pass class InvalidOption(ConfigException): def __init__(self, name): ConfigException.__init__(self, 'Invalid option {!r}'.format(name)) self.name = name def identity(x): return x def one_of(choices): def validator(x): if x not in choices: raise ValueError('invalid choice {!r}, expected one of {!r}', x, choices) validator.__config__doc__ = 'One of: {!r}'.format(choices) return validator class ConfigOption(object): def __init__(self, description, converter=None, default=None, required=False, help=None): self.converter = converter if self.converter is None: self.converter = identity self.description = description self.default = default self.required = required self.help = help try: self.description = '{}. {}'.format( self.description.rstrip('. '), self.converter.__config_doc__ ) except AttributeError: pass if self.default and self.required: raise ValueError( 'ConfigOption cannot have a default and be required at the same time.' ) def to_parser_arguments(self): args = dict( type=self.converter, help=self.description, ) if self.required: args['required'] = True else: if self.converter is bool: args['action'] = 'store_false' if self.default else 'store_true' args.pop('type') else: args['default'] = self.default return args class Constraint(object): def validate(self, config): pass class RequirementConstraint(Constraint): """ Specifies a simple requirement constraint. If a list of options are given (True), the requirement needs to be True as well. This only checks for the variables boolean values. """ def __init__(self, options, require, error_formatter=None): self.options = options self.require = require if len(self.options) == 0: raise ValueError('At least one option required') self.error_formatter = error_formatter if self.error_formatter is None: self.error_formatter = self._format_error def validate(self, config): if all(config[option] for option in self.options) and not config[self.require]: raise RequirementNotSatisfied(self.error_formatter(self, config), self) @staticmethod def _format_error(constraint, config): plural = len(constraint.options) > 1 options = ', '.join(constraint.options[:-1]) if options: options = '{} and {}'.format(options, constraint.options[-1]) else: options = constraint.options[0] return 'option{s} {options} require{not_s} option {require}'.format( options=options, require=constraint.require, s='s' if plural else '', not_s='' if plural else 's' ) class UnsupportedConstraint(Constraint): """ Specifies a unsupported constraint, that can either be a single option or a combination of options. Checks only for the boolean value of the options. """ def __init__(self, given, not_allowed, error_formatter=None): self.given = given self.not_allowed = not_allowed if len(self.given) == 0: raise ValueError('At least one \'given\' option required') self.error_formatter = error_formatter if self.error_formatter is None: self.error_formatter = self._format_error def validate(self, config): if all(config[option] for option in self.given) and config[self.not_allowed]: raise UnsupportedConfiguration(self.error_formatter(self, config), self) @staticmethod def _format_error(constraint, config): plural = len(constraint.given) > 1 given = ', '.join(constraint.given[:-1]) if given: given = '{} and {}'.format(given, constraint.given[-1]) else: given = constraint.given[-1] return 'option{s} {given} can not be used together with {not_allowed}'.format( given=given, not_allowed=constraint.not_allowed, s='s' if plural else '' ) class Config(object): """ Base for all glad configurations. The class with initiliaze the options with it iself. Every uppercase name will be assumed to be a configuration option and should be of type ConfigOption: class MyAwesomeConfig(Config): DEBUG = ConfigOption( converter=bool, default=False description='Enables debug output' ) ITERATIONS = ConfigOption( converter=int, required=True description='Number of iterations' ) config = MyAwesomeConfig() config['DEBUG'] = True # update config from file # ... # now make sure every required option has been set config.validate() if config['DEBUG']: print 'debug information' Special Constraints can be specified in the __constraints__ variable. class MyConstraintConfig(MyAwesomeConfig): __constraints__ = [ RequirementConstraint(['DEBUG'], 'iterations') ] The constraints will be checked when calling `.valid` or `.validate()` """ def __init__(self): self._options = dict() self._values = dict() # initialize options, every uppercase name without leading underscore = option for name in dir(self): if name.isupper() and not name.startswith('_'): option = self._options[name] = getattr(self, name) if not option.required: self._values[name] = option.default def set(self, name, value, convert=True): try: option = self._options[name] except KeyError: raise InvalidOption(name) if convert: value = option.converter(value) self._values[name] = value def get(self, item, default=None): try: return self[item] except KeyError: return default def __getitem__(self, item): return self._values[item] def __setitem__(self, key, value): self.set(key, value, convert=True) def items(self): return list(self._options.items()) @property def valid(self): """ Checks if every required option has been set. :return: True if everything has been set otherwise False """ try: self.validate() except InvalidConfig: return False return True def validate(self): """ Checks if every required option has been set. Throws InvalidConfig if a required option is missing. This also checks all specified constraints. Should be overwritten by subclasses if necessary. """ for name, option in self._options.items(): if option.required: if not name in self._values: raise OptionRequired(name, option) constraints = getattr(self, '__constraints__', []) for constraint in constraints: constraint.validate(self) def update_from_object(self, obj, convert=True, ignore_additional=False): for name in dir(obj): if not name.startswith('_'): try: self.set(name, getattr(obj, name), convert=convert) except InvalidOption: if not ignore_additional: raise def init_parser(self, parser): for name, option in self._options.items(): parser_name = '--' + name.lower().replace('_', '-') parser.add_argument( parser_name, dest=name, **option.to_parser_arguments() ) def to_dict(self, transform=None): if transform is None: transform = identity result = dict() for name, value in self._values.items(): result[transform(name)] = value return result glad-2.0.2/glad/files/000077500000000000000000000000001432671066000144405ustar00rootroot00000000000000glad-2.0.2/glad/files/__init__.py000066400000000000000000000032311432671066000165500ustar00rootroot00000000000000import os.path import logging import shutil try: from urlparse import urlparse except ImportError: from urllib.parse import urlparse try: from pkg_resources import resource_exists, resource_stream except ImportError: def resource_exists(*args, **kwargs): return False def resource_stream(*args, **kwargs): return None BASE_PATH = os.path.abspath(os.path.dirname(__file__)) logger = logging.getLogger('glad.files') class GladFileException(Exception): pass def open_local(name, *args, **kwargs): # use pkg_resources when available, makes it work in zipped modules # or other environments if resource_exists(__name__, name): logger.info('opening packaged resource: %r', name) return resource_stream(__name__, name) # fallback to filesystem logger.info('opening packaged path: %r', name) local_path = os.path.normpath(os.path.join(BASE_PATH, os.path.join(name))) if not local_path.startswith(BASE_PATH): raise GladFileException('unsafe file path, won\'t open {!r}'.format(local_path)) return open(local_path, *args, **kwargs) class StaticFileOpener(object): def urlopen(self, url, data=None, *args, **kwargs): logger.debug('intercepted attempt to retrieve resource: %r', url) if data is not None: raise GladFileException('can not resolve requests with payload') filename = urlparse(url).path.rsplit('/', 1)[-1] return open_local(filename, 'rb') def urlretrieve(self, url, filename, *args, **kwargs): with self.urlopen(url) as src: with open(filename, 'wb') as dst: shutil.copyfileobj(src, dst) glad-2.0.2/glad/files/egl.xml000066400000000000000000005657441432671066000157560ustar00rootroot00000000000000 #include <KHR/khrplatform.h> #include <EGL/eglplatform.h> struct AHardwareBuffer; struct wl_buffer; struct wl_display; struct wl_resource; typedef unsigned int EGLBoolean; typedef unsigned int EGLenum; typedef intptr_t EGLAttribKHR; typedef intptr_t EGLAttrib; typedef void *EGLClientBuffer; typedef void *EGLConfig; typedef void *EGLContext; typedef void *EGLDeviceEXT; typedef void *EGLDisplay; typedef void *EGLImage; typedef void *EGLImageKHR; typedef void *EGLLabelKHR; typedef void *EGLObjectKHR; typedef void *EGLOutputLayerEXT; typedef void *EGLOutputPortEXT; typedef void *EGLStreamKHR; typedef void *EGLSurface; typedef void *EGLSync; typedef void *EGLSyncKHR; typedef void *EGLSyncNV; typedef void (*__eglMustCastToProperFunctionPointerType)(void); typedef khronos_utime_nanoseconds_t EGLTimeKHR; typedef khronos_utime_nanoseconds_t EGLTime; typedef khronos_utime_nanoseconds_t EGLTimeNV; typedef khronos_utime_nanoseconds_t EGLuint64NV; typedef khronos_uint64_t EGLuint64KHR; typedef khronos_stime_nanoseconds_t EGLnsecsANDROID; typedef int EGLNativeFileDescriptorKHR; typedef khronos_ssize_t EGLsizeiANDROID; typedef void (*EGLSetBlobFuncANDROID) (const void *key, EGLsizeiANDROID keySize, const void *value, EGLsizeiANDROID valueSize); typedef EGLsizeiANDROID (*EGLGetBlobFuncANDROID) (const void *key, EGLsizeiANDROID keySize, void *value, EGLsizeiANDROID valueSize); struct EGLClientPixmapHI { void *pData; EGLint iWidth; EGLint iHeight; EGLint iStride; }; typedef void ( *EGLDEBUGPROCKHR)(EGLenum error,const char *command,EGLint messageType,EGLLabelKHR threadLabel,EGLLabelKHR objectLabel,const char* message); #define PFNEGLBINDWAYLANDDISPLAYWL PFNEGLBINDWAYLANDDISPLAYWLPROC #define PFNEGLUNBINDWAYLANDDISPLAYWL PFNEGLUNBINDWAYLANDDISPLAYWLPROC #define PFNEGLQUERYWAYLANDBUFFERWL PFNEGLQUERYWAYLANDBUFFERWLPROC #define PFNEGLCREATEWAYLANDBUFFERFROMIMAGEWL PFNEGLCREATEWAYLANDBUFFERFROMIMAGEWLPROC EGLBoolean eglBindAPI EGLenum api EGLBoolean eglBindTexImage EGLDisplay dpy EGLSurface surface EGLint buffer EGLBoolean eglChooseConfig EGLDisplay dpy const EGLint *attrib_list EGLConfig *configs EGLint config_size EGLint *num_config EGLBoolean eglClientSignalSyncEXT EGLDisplay dpy EGLSync sync const EGLAttrib *attrib_list EGLint eglClientWaitSync EGLDisplay dpy EGLSync sync EGLint flags EGLTime timeout EGLint eglClientWaitSyncKHR EGLDisplay dpy EGLSyncKHR sync EGLint flags EGLTimeKHR timeout EGLint eglClientWaitSyncNV EGLSyncNV sync EGLint flags EGLTimeNV timeout EGLBoolean eglCopyBuffers EGLDisplay dpy EGLSurface surface EGLNativePixmapType target EGLContext eglCreateContext EGLDisplay dpy EGLConfig config EGLContext share_context const EGLint *attrib_list EGLImageKHR eglCreateDRMImageMESA EGLDisplay dpy const EGLint *attrib_list EGLSyncNV eglCreateFenceSyncNV EGLDisplay dpy EGLenum condition const EGLint *attrib_list EGLImage eglCreateImage EGLDisplay dpy EGLContext ctx EGLenum target EGLClientBuffer buffer const EGLAttrib *attrib_list EGLImageKHR eglCreateImageKHR EGLDisplay dpy EGLContext ctx EGLenum target EGLClientBuffer buffer const EGLint *attrib_list EGLClientBuffer eglCreateNativeClientBufferANDROID const EGLint *attrib_list EGLSurface eglCreatePbufferFromClientBuffer EGLDisplay dpy EGLenum buftype EGLClientBuffer buffer EGLConfig config const EGLint *attrib_list EGLSurface eglCreatePbufferSurface EGLDisplay dpy EGLConfig config const EGLint *attrib_list EGLSurface eglCreatePixmapSurface EGLDisplay dpy EGLConfig config EGLNativePixmapType pixmap const EGLint *attrib_list EGLSurface eglCreatePixmapSurfaceHI EGLDisplay dpy EGLConfig config struct EGLClientPixmapHI *pixmap EGLSurface eglCreatePlatformPixmapSurface EGLDisplay dpy EGLConfig config void *native_pixmap const EGLAttrib *attrib_list EGLSurface eglCreatePlatformPixmapSurfaceEXT EGLDisplay dpy EGLConfig config void *native_pixmap const EGLint *attrib_list EGLSurface eglCreatePlatformWindowSurface EGLDisplay dpy EGLConfig config void *native_window const EGLAttrib *attrib_list EGLSurface eglCreatePlatformWindowSurfaceEXT EGLDisplay dpy EGLConfig config void *native_window const EGLint *attrib_list EGLStreamKHR eglCreateStreamFromFileDescriptorKHR EGLDisplay dpy EGLNativeFileDescriptorKHR file_descriptor EGLStreamKHR eglCreateStreamKHR EGLDisplay dpy const EGLint *attrib_list EGLStreamKHR eglCreateStreamAttribKHR EGLDisplay dpy const EGLAttrib *attrib_list EGLSurface eglCreateStreamProducerSurfaceKHR EGLDisplay dpy EGLConfig config EGLStreamKHR stream const EGLint *attrib_list EGLSyncKHR eglCreateStreamSyncNV EGLDisplay dpy EGLStreamKHR stream EGLenum type const EGLint *attrib_list EGLSync eglCreateSync EGLDisplay dpy EGLenum type const EGLAttrib *attrib_list EGLSyncKHR eglCreateSyncKHR EGLDisplay dpy EGLenum type const EGLint *attrib_list EGLSyncKHR eglCreateSync64KHR EGLDisplay dpy EGLenum type const EGLAttribKHR *attrib_list EGLSurface eglCreateWindowSurface EGLDisplay dpy EGLConfig config EGLNativeWindowType win const EGLint *attrib_list EGLint eglDebugMessageControlKHR EGLDEBUGPROCKHR callback const EGLAttrib *attrib_list EGLBoolean eglDestroyContext EGLDisplay dpy EGLContext ctx EGLBoolean eglDestroyImage EGLDisplay dpy EGLImage image EGLBoolean eglDestroyImageKHR EGLDisplay dpy EGLImageKHR image EGLBoolean eglDestroyStreamKHR EGLDisplay dpy EGLStreamKHR stream EGLBoolean eglDestroySurface EGLDisplay dpy EGLSurface surface EGLBoolean eglDestroySync EGLDisplay dpy EGLSync sync EGLBoolean eglDestroySyncKHR EGLDisplay dpy EGLSyncKHR sync EGLBoolean eglDestroySyncNV EGLSyncNV sync EGLint eglDupNativeFenceFDANDROID EGLDisplay dpy EGLSyncKHR sync EGLBoolean eglExportDMABUFImageMESA EGLDisplay dpy EGLImageKHR image int *fds EGLint *strides EGLint *offsets EGLBoolean eglExportDMABUFImageQueryMESA EGLDisplay dpy EGLImageKHR image int *fourcc int *num_planes EGLuint64KHR *modifiers EGLBoolean eglExportDRMImageMESA EGLDisplay dpy EGLImageKHR image EGLint *name EGLint *handle EGLint *stride EGLBoolean eglFenceNV EGLSyncNV sync EGLBoolean eglGetConfigAttrib EGLDisplay dpy EGLConfig config EGLint attribute EGLint *value EGLBoolean eglGetConfigs EGLDisplay dpy EGLConfig *configs EGLint config_size EGLint *num_config EGLContext eglGetCurrentContext EGLDisplay eglGetCurrentDisplay EGLSurface eglGetCurrentSurface EGLint readdraw EGLDisplay eglGetDisplay EGLNativeDisplayType display_id char *eglGetDisplayDriverConfig EGLDisplay dpy const char *eglGetDisplayDriverName EGLDisplay dpy EGLint eglGetError EGLBoolean eglGetMscRateANGLE EGLDisplay dpy EGLSurface surface EGLint *numerator EGLint *denominator EGLClientBuffer eglGetNativeClientBufferANDROID const struct AHardwareBuffer *buffer EGLBoolean eglGetOutputLayersEXT EGLDisplay dpy const EGLAttrib *attrib_list EGLOutputLayerEXT *layers EGLint max_layers EGLint *num_layers EGLBoolean eglGetOutputPortsEXT EGLDisplay dpy const EGLAttrib *attrib_list EGLOutputPortEXT *ports EGLint max_ports EGLint *num_ports EGLDisplay eglGetPlatformDisplay EGLenum platform void *native_display const EGLAttrib *attrib_list EGLDisplay eglGetPlatformDisplayEXT EGLenum platform void *native_display const EGLint *attrib_list __eglMustCastToProperFunctionPointerType eglGetProcAddress const char *procname EGLNativeFileDescriptorKHR eglGetStreamFileDescriptorKHR EGLDisplay dpy EGLStreamKHR stream EGLBoolean eglGetSyncAttrib EGLDisplay dpy EGLSync sync EGLint attribute EGLAttrib *value EGLBoolean eglGetSyncAttribKHR EGLDisplay dpy EGLSyncKHR sync EGLint attribute EGLint *value EGLBoolean eglGetSyncAttribNV EGLSyncNV sync EGLint attribute EGLint *value EGLuint64NV eglGetSystemTimeFrequencyNV EGLuint64NV eglGetSystemTimeNV EGLBoolean eglInitialize EGLDisplay dpy EGLint *major EGLint *minor EGLint eglLabelObjectKHR EGLDisplay display EGLenum objectType EGLObjectKHR object EGLLabelKHR label EGLBoolean eglLockSurfaceKHR EGLDisplay dpy EGLSurface surface const EGLint *attrib_list EGLBoolean eglMakeCurrent EGLDisplay dpy EGLSurface draw EGLSurface read EGLContext ctx EGLBoolean eglOutputLayerAttribEXT EGLDisplay dpy EGLOutputLayerEXT layer EGLint attribute EGLAttrib value EGLBoolean eglOutputPortAttribEXT EGLDisplay dpy EGLOutputPortEXT port EGLint attribute EGLAttrib value EGLBoolean eglPostSubBufferNV EGLDisplay dpy EGLSurface surface EGLint x EGLint y EGLint width EGLint height EGLBoolean eglPresentationTimeANDROID EGLDisplay dpy EGLSurface surface EGLnsecsANDROID time EGLBoolean eglGetCompositorTimingSupportedANDROID EGLDisplay dpy EGLSurface surface EGLint name EGLBoolean eglGetCompositorTimingANDROID EGLDisplay dpy EGLSurface surface EGLint numTimestamps const EGLint *names EGLnsecsANDROID *values EGLBoolean eglGetNextFrameIdANDROID EGLDisplay dpy EGLSurface surface EGLuint64KHR *frameId EGLBoolean eglGetFrameTimestampSupportedANDROID EGLDisplay dpy EGLSurface surface EGLint timestamp EGLBoolean eglGetFrameTimestampsANDROID EGLDisplay dpy EGLSurface surface EGLuint64KHR frameId EGLint numTimestamps const EGLint *timestamps EGLnsecsANDROID *values EGLenum eglQueryAPI EGLBoolean eglQueryContext EGLDisplay dpy EGLContext ctx EGLint attribute EGLint *value EGLBoolean eglQueryDebugKHR EGLint attribute EGLAttrib *value EGLBoolean eglQueryDeviceAttribEXT EGLDeviceEXT device EGLint attribute EGLAttrib *value const char *eglQueryDeviceStringEXT EGLDeviceEXT device EGLint name EGLBoolean eglQueryDevicesEXT EGLint max_devices EGLDeviceEXT *devices EGLint *num_devices EGLBoolean eglQueryDisplayAttribEXT EGLDisplay dpy EGLint attribute EGLAttrib *value EGLBoolean eglQueryDisplayAttribKHR EGLDisplay dpy EGLint name EGLAttrib *value EGLBoolean eglQueryDisplayAttribNV EGLDisplay dpy EGLint attribute EGLAttrib *value EGLBoolean eglQueryDmaBufFormatsEXT EGLDisplay dpy EGLint max_formats EGLint *formats EGLint *num_formats EGLBoolean eglQueryDmaBufModifiersEXT EGLDisplay dpy EGLint format EGLint max_modifiers EGLuint64KHR *modifiers EGLBoolean *external_only EGLint *num_modifiers EGLBoolean eglQueryNativeDisplayNV EGLDisplay dpy EGLNativeDisplayType *display_id EGLBoolean eglQueryNativePixmapNV EGLDisplay dpy EGLSurface surf EGLNativePixmapType *pixmap EGLBoolean eglQueryNativeWindowNV EGLDisplay dpy EGLSurface surf EGLNativeWindowType *window EGLBoolean eglQueryOutputLayerAttribEXT EGLDisplay dpy EGLOutputLayerEXT layer EGLint attribute EGLAttrib *value const char *eglQueryOutputLayerStringEXT EGLDisplay dpy EGLOutputLayerEXT layer EGLint name EGLBoolean eglQueryOutputPortAttribEXT EGLDisplay dpy EGLOutputPortEXT port EGLint attribute EGLAttrib *value const char *eglQueryOutputPortStringEXT EGLDisplay dpy EGLOutputPortEXT port EGLint name EGLBoolean eglQueryStreamKHR EGLDisplay dpy EGLStreamKHR stream EGLenum attribute EGLint *value EGLBoolean eglQueryStreamAttribKHR EGLDisplay dpy EGLStreamKHR stream EGLenum attribute EGLAttrib *value EGLBoolean eglQueryStreamMetadataNV EGLDisplay dpy EGLStreamKHR stream EGLenum name EGLint n EGLint offset EGLint size void *data EGLBoolean eglQueryStreamTimeKHR EGLDisplay dpy EGLStreamKHR stream EGLenum attribute EGLTimeKHR *value EGLBoolean eglQueryStreamu64KHR EGLDisplay dpy EGLStreamKHR stream EGLenum attribute EGLuint64KHR *value const char *eglQueryString EGLDisplay dpy EGLint name EGLBoolean eglQuerySupportedCompressionRatesEXT EGLDisplay dpy EGLConfig config const EGLAttrib *attrib_list EGLint *rates EGLint rate_size EGLint *num_rates EGLBoolean eglQuerySurface EGLDisplay dpy EGLSurface surface EGLint attribute EGLint *value EGLBoolean eglQuerySurface64KHR EGLDisplay dpy EGLSurface surface EGLint attribute EGLAttribKHR *value EGLBoolean eglQuerySurfacePointerANGLE EGLDisplay dpy EGLSurface surface EGLint attribute void **value EGLBoolean eglReleaseTexImage EGLDisplay dpy EGLSurface surface EGLint buffer EGLBoolean eglReleaseThread EGLBoolean eglResetStreamNV EGLDisplay dpy EGLStreamKHR stream void eglSetBlobCacheFuncsANDROID EGLDisplay dpy EGLSetBlobFuncANDROID set EGLGetBlobFuncANDROID get EGLBoolean eglSetDamageRegionKHR EGLDisplay dpy EGLSurface surface EGLint *rects EGLint n_rects EGLBoolean eglSetStreamAttribKHR EGLDisplay dpy EGLStreamKHR stream EGLenum attribute EGLAttrib value EGLBoolean eglSetStreamMetadataNV EGLDisplay dpy EGLStreamKHR stream EGLint n EGLint offset EGLint size const void *data EGLBoolean eglSignalSyncKHR EGLDisplay dpy EGLSyncKHR sync EGLenum mode EGLBoolean eglSignalSyncNV EGLSyncNV sync EGLenum mode EGLBoolean eglStreamAttribKHR EGLDisplay dpy EGLStreamKHR stream EGLenum attribute EGLint value EGLBoolean eglStreamConsumerAcquireKHR EGLDisplay dpy EGLStreamKHR stream EGLBoolean eglStreamConsumerAcquireAttribKHR EGLDisplay dpy EGLStreamKHR stream const EGLAttrib *attrib_list EGLBoolean eglStreamConsumerGLTextureExternalKHR EGLDisplay dpy EGLStreamKHR stream EGLBoolean eglStreamConsumerGLTextureExternalAttribsNV EGLDisplay dpy EGLStreamKHR stream const EGLAttrib *attrib_list EGLBoolean eglStreamConsumerOutputEXT EGLDisplay dpy EGLStreamKHR stream EGLOutputLayerEXT layer EGLBoolean eglStreamConsumerReleaseKHR EGLDisplay dpy EGLStreamKHR stream EGLBoolean eglStreamConsumerReleaseAttribKHR EGLDisplay dpy EGLStreamKHR stream const EGLAttrib *attrib_list EGLBoolean eglStreamFlushNV EGLDisplay dpy EGLStreamKHR stream EGLBoolean eglSurfaceAttrib EGLDisplay dpy EGLSurface surface EGLint attribute EGLint value EGLBoolean eglSwapBuffers EGLDisplay dpy EGLSurface surface EGLBoolean eglSwapBuffersWithDamageEXT EGLDisplay dpy EGLSurface surface const EGLint *rects EGLint n_rects EGLBoolean eglSwapBuffersWithDamageKHR EGLDisplay dpy EGLSurface surface const EGLint *rects EGLint n_rects EGLBoolean eglSwapBuffersRegionNOK EGLDisplay dpy EGLSurface surface EGLint numRects const EGLint *rects EGLBoolean eglSwapBuffersRegion2NOK EGLDisplay dpy EGLSurface surface EGLint numRects const EGLint *rects EGLBoolean eglSwapInterval EGLDisplay dpy EGLint interval EGLBoolean eglTerminate EGLDisplay dpy EGLBoolean eglUnlockSurfaceKHR EGLDisplay dpy EGLSurface surface EGLBoolean eglUnsignalSyncEXT EGLDisplay dpy EGLSync sync const EGLAttrib *attrib_list EGLBoolean eglWaitClient EGLBoolean eglWaitGL EGLBoolean eglWaitNative EGLint engine EGLBoolean eglWaitSync EGLDisplay dpy EGLSync sync EGLint flags EGLint eglWaitSyncKHR EGLDisplay dpy EGLSyncKHR sync EGLint flags EGLBoolean eglCompositorSetContextListEXT const EGLint *external_ref_ids EGLint num_entries EGLBoolean eglCompositorSetContextAttributesEXT EGLint external_ref_id const EGLint *context_attributes EGLint num_entries EGLBoolean eglCompositorSetWindowListEXT EGLint external_ref_id const EGLint *external_win_ids EGLint num_entries EGLBoolean eglCompositorSetWindowAttributesEXT EGLint external_win_id const EGLint *window_attributes EGLint num_entries EGLBoolean eglCompositorBindTexWindowEXT EGLint external_win_id EGLBoolean eglCompositorSetSizeEXT EGLint external_win_id EGLint width EGLint height EGLBoolean eglCompositorSwapPolicyEXT EGLint external_win_id EGLint policy EGLBoolean eglBindWaylandDisplayWL EGLDisplay dpy struct wl_display *display EGLBoolean eglUnbindWaylandDisplayWL EGLDisplay dpy struct wl_display *display EGLBoolean eglQueryWaylandBufferWL EGLDisplay dpy struct wl_resource *buffer EGLint attribute EGLint *value struct wl_buffer *eglCreateWaylandBufferFromImageWL EGLDisplay dpy EGLImageKHR image EGLBoolean eglStreamImageConsumerConnectNV EGLDisplay dpy EGLStreamKHR stream EGLint num_modifiers const EGLuint64KHR *modifiers const EGLAttrib *attrib_list EGLint eglQueryStreamConsumerEventNV EGLDisplay dpy EGLStreamKHR stream EGLTime timeout EGLenum *event EGLAttrib *aux EGLBoolean eglStreamAcquireImageNV EGLDisplay dpy EGLStreamKHR stream EGLImage *pImage EGLSync sync EGLBoolean eglStreamReleaseImageNV EGLDisplay dpy EGLStreamKHR stream EGLImage image EGLSync sync EGLBoolean eglQueryDeviceBinaryEXT EGLDeviceEXT device EGLint name EGLint max_size void *value EGLint *size glad-2.0.2/glad/files/eglplatform.h000066400000000000000000000116231432671066000171300ustar00rootroot00000000000000#ifndef __eglplatform_h_ #define __eglplatform_h_ /* ** Copyright 2007-2020 The Khronos Group Inc. ** SPDX-License-Identifier: Apache-2.0 */ /* Platform-specific types and definitions for egl.h * * Adopters may modify khrplatform.h and this file to suit their platform. * You are encouraged to submit all modifications to the Khronos group so that * they can be included in future versions of this file. Please submit changes * by filing an issue or pull request on the public Khronos EGL Registry, at * https://www.github.com/KhronosGroup/EGL-Registry/ */ #include /* Macros used in EGL function prototype declarations. * * EGL functions should be prototyped as: * * EGLAPI return-type EGLAPIENTRY eglFunction(arguments); * typedef return-type (EXPAPIENTRYP PFNEGLFUNCTIONPROC) (arguments); * * KHRONOS_APICALL and KHRONOS_APIENTRY are defined in KHR/khrplatform.h */ #ifndef EGLAPI #define EGLAPI KHRONOS_APICALL #endif #ifndef EGLAPIENTRY #define EGLAPIENTRY KHRONOS_APIENTRY #endif #define EGLAPIENTRYP EGLAPIENTRY* /* The types NativeDisplayType, NativeWindowType, and NativePixmapType * are aliases of window-system-dependent types, such as X Display * or * Windows Device Context. They must be defined in platform-specific * code below. The EGL-prefixed versions of Native*Type are the same * types, renamed in EGL 1.3 so all types in the API start with "EGL". * * Khronos STRONGLY RECOMMENDS that you use the default definitions * provided below, since these changes affect both binary and source * portability of applications using EGL running on different EGL * implementations. */ #if defined(EGL_NO_PLATFORM_SPECIFIC_TYPES) typedef void *EGLNativeDisplayType; typedef void *EGLNativePixmapType; typedef void *EGLNativeWindowType; #elif defined(_WIN32) || defined(__VC32__) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) /* Win32 and WinCE */ #ifndef WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN 1 #endif #include typedef HDC EGLNativeDisplayType; typedef HBITMAP EGLNativePixmapType; typedef HWND EGLNativeWindowType; #elif defined(__EMSCRIPTEN__) typedef int EGLNativeDisplayType; typedef int EGLNativePixmapType; typedef int EGLNativeWindowType; #elif defined(__WINSCW__) || defined(__SYMBIAN32__) /* Symbian */ typedef int EGLNativeDisplayType; typedef void *EGLNativePixmapType; typedef void *EGLNativeWindowType; #elif defined(WL_EGL_PLATFORM) typedef struct wl_display *EGLNativeDisplayType; typedef struct wl_egl_pixmap *EGLNativePixmapType; typedef struct wl_egl_window *EGLNativeWindowType; #elif defined(__GBM__) typedef struct gbm_device *EGLNativeDisplayType; typedef struct gbm_bo *EGLNativePixmapType; typedef void *EGLNativeWindowType; #elif defined(__ANDROID__) || defined(ANDROID) struct ANativeWindow; struct egl_native_pixmap_t; typedef void* EGLNativeDisplayType; typedef struct egl_native_pixmap_t* EGLNativePixmapType; typedef struct ANativeWindow* EGLNativeWindowType; #elif defined(USE_OZONE) typedef intptr_t EGLNativeDisplayType; typedef intptr_t EGLNativePixmapType; typedef intptr_t EGLNativeWindowType; #elif defined(USE_X11) /* X11 (tentative) */ #include #include typedef Display *EGLNativeDisplayType; typedef Pixmap EGLNativePixmapType; typedef Window EGLNativeWindowType; #elif defined(__unix__) typedef void *EGLNativeDisplayType; typedef khronos_uintptr_t EGLNativePixmapType; typedef khronos_uintptr_t EGLNativeWindowType; #elif defined(__APPLE__) typedef int EGLNativeDisplayType; typedef void *EGLNativePixmapType; typedef void *EGLNativeWindowType; #elif defined(__HAIKU__) #include typedef void *EGLNativeDisplayType; typedef khronos_uintptr_t EGLNativePixmapType; typedef khronos_uintptr_t EGLNativeWindowType; #elif defined(__Fuchsia__) typedef void *EGLNativeDisplayType; typedef khronos_uintptr_t EGLNativePixmapType; typedef khronos_uintptr_t EGLNativeWindowType; #else #error "Platform not recognized" #endif /* EGL 1.2 types, renamed for consistency in EGL 1.3 */ typedef EGLNativeDisplayType NativeDisplayType; typedef EGLNativePixmapType NativePixmapType; typedef EGLNativeWindowType NativeWindowType; /* Define EGLint. This must be a signed integral type large enough to contain * all legal attribute names and values passed into and out of EGL, whether * their type is boolean, bitmask, enumerant (symbolic constant), integer, * handle, or other. While in general a 32-bit integer will suffice, if * handles are 64 bit types, then EGLint should be defined as a signed 64-bit * integer type. */ typedef khronos_int32_t EGLint; /* C++ / C typecast macros for special EGL handle values */ #if defined(__cplusplus) #define EGL_CAST(type, value) (static_cast(value)) #else #define EGL_CAST(type, value) ((type) (value)) #endif #endif /* __eglplatform_h */ glad-2.0.2/glad/files/gl.xml000066400000000000000000123731311432671066000155770ustar00rootroot00000000000000 Copyright 2013-2020 The Khronos Group Inc. SPDX-License-Identifier: Apache-2.0 This file, gl.xml, is the OpenGL and OpenGL API Registry. The canonical version of the registry, together with documentation, schema, and Python generator scripts used to generate C header files for OpenGL and OpenGL ES, can always be found in the Khronos Registry at https://github.com/KhronosGroup/OpenGL-Registry #include <KHR/khrplatform.h> 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; typedef khronos_intptr_t GLintptr; typedef khronos_intptr_t GLintptrARB; typedef khronos_ssize_t GLsizeiptr; typedef khronos_ssize_t GLsizeiptrARB; 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 ( *GLDEBUGPROC)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam); typedef void ( *GLDEBUGPROCARB)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam); typedef void ( *GLDEBUGPROCKHR)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam); typedef void ( *GLDEBUGPROCAMD)(GLuint id,GLenum category,GLenum severity,GLsizei length,const GLchar *message,void *userParam); typedef unsigned short GLhalfNV; typedef GLintptr GLvdpauSurfaceNV; typedef void ( *GLVULKANPROCNV)(void); void glAccum GLenum op GLfloat value void glAccumxOES GLenum op GLfixed value void glActiveProgramEXT GLuint program void glActiveShaderProgram GLuint pipeline GLuint program void glActiveShaderProgramEXT GLuint pipeline GLuint program void glActiveStencilFaceEXT GLenum face void glActiveTexture GLenum texture void glActiveTextureARB GLenum texture void glActiveVaryingNV GLuint program const GLchar *name void glAlphaFragmentOp1ATI GLenum op GLuint dst GLuint dstMod GLuint arg1 GLuint arg1Rep GLuint arg1Mod void glAlphaFragmentOp2ATI GLenum op GLuint dst GLuint dstMod GLuint arg1 GLuint arg1Rep GLuint arg1Mod GLuint arg2 GLuint arg2Rep GLuint arg2Mod void glAlphaFragmentOp3ATI GLenum op GLuint dst GLuint dstMod GLuint arg1 GLuint arg1Rep GLuint arg1Mod GLuint arg2 GLuint arg2Rep GLuint arg2Mod GLuint arg3 GLuint arg3Rep GLuint arg3Mod void glAlphaFunc GLenum func GLfloat ref void glAlphaFuncQCOM GLenum func GLclampf ref void glAlphaFuncx GLenum func GLfixed ref void glAlphaFuncxOES GLenum func GLfixed ref void glAlphaToCoverageDitherControlNV GLenum mode void glApplyFramebufferAttachmentCMAAINTEL void glApplyTextureEXT GLenum mode GLboolean glAcquireKeyedMutexWin32EXT GLuint memory GLuint64 key GLuint timeout GLboolean glAreProgramsResidentNV GLsizei n const GLuint *programs GLboolean *residences GLboolean glAreTexturesResident GLsizei n const GLuint *textures GLboolean *residences GLboolean glAreTexturesResidentEXT GLsizei n const GLuint *textures GLboolean *residences void glArrayElement GLint i void glArrayElementEXT GLint i void glArrayObjectATI GLenum array GLint size GLenum type GLsizei stride GLuint buffer GLuint offset GLuint glAsyncCopyBufferSubDataNVX GLsizei waitSemaphoreCount const GLuint *waitSemaphoreArray const GLuint64 *fenceValueArray GLuint readGpu GLbitfield writeGpuMask GLuint readBuffer GLuint writeBuffer GLintptr readOffset GLintptr writeOffset GLsizeiptr size GLsizei signalSemaphoreCount const GLuint *signalSemaphoreArray const GLuint64 *signalValueArray GLuint glAsyncCopyImageSubDataNVX GLsizei waitSemaphoreCount const GLuint *waitSemaphoreArray const GLuint64 *waitValueArray GLuint srcGpu GLbitfield dstGpuMask 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 GLsizei signalSemaphoreCount const GLuint *signalSemaphoreArray const GLuint64 *signalValueArray void glAsyncMarkerSGIX GLuint marker void glAttachObjectARB GLhandleARB containerObj GLhandleARB obj void glAttachShader GLuint program GLuint shader void glBegin GLenum mode void glBeginConditionalRender GLuint id GLenum mode void glBeginConditionalRenderNV GLuint id GLenum mode void glBeginConditionalRenderNVX GLuint id void glBeginFragmentShaderATI void glBeginOcclusionQueryNV GLuint id void glBeginPerfMonitorAMD GLuint monitor void glBeginPerfQueryINTEL GLuint queryHandle void glBeginQuery GLenum target GLuint id void glBeginQueryARB GLenum target GLuint id void glBeginQueryEXT GLenum target GLuint id void glBeginQueryIndexed GLenum target GLuint index GLuint id void glBeginTransformFeedback GLenum primitiveMode void glBeginTransformFeedbackEXT GLenum primitiveMode void glBeginTransformFeedbackNV GLenum primitiveMode void glBeginVertexShaderEXT void glBeginVideoCaptureNV GLuint video_capture_slot void glBindAttribLocation GLuint program GLuint index const GLchar *name void glBindAttribLocationARB GLhandleARB programObj GLuint index const GLcharARB *name void glBindBuffer GLenum target GLuint buffer void glBindBufferARB GLenum target GLuint buffer void glBindBufferBase GLenum target GLuint index GLuint buffer void glBindBufferBaseEXT GLenum target GLuint index GLuint buffer void glBindBufferBaseNV GLenum target GLuint index GLuint buffer void glBindBufferOffsetEXT GLenum target GLuint index GLuint buffer GLintptr offset void glBindBufferOffsetNV GLenum target GLuint index GLuint buffer GLintptr offset void glBindBufferRange GLenum target GLuint index GLuint buffer GLintptr offset GLsizeiptr size void glBindBufferRangeEXT GLenum target GLuint index GLuint buffer GLintptr offset GLsizeiptr size void glBindBufferRangeNV GLenum target GLuint index GLuint buffer GLintptr offset GLsizeiptr size void glBindBuffersBase GLenum target GLuint first GLsizei count const GLuint *buffers void glBindBuffersRange GLenum target GLuint first GLsizei count const GLuint *buffers const GLintptr *offsets const GLsizeiptr *sizes void glBindFragDataLocation GLuint program GLuint color const GLchar *name void glBindFragDataLocationEXT GLuint program GLuint color const GLchar *name void glBindFragDataLocationIndexed GLuint program GLuint colorNumber GLuint index const GLchar *name void glBindFragDataLocationIndexedEXT GLuint program GLuint colorNumber GLuint index const GLchar *name void glBindFragmentShaderATI GLuint id void glBindFramebuffer GLenum target GLuint framebuffer void glBindFramebufferEXT GLenum target GLuint framebuffer void glBindFramebufferOES GLenum target GLuint framebuffer void glBindImageTexture GLuint unit GLuint texture GLint level GLboolean layered GLint layer GLenum access GLenum format void glBindImageTextureEXT GLuint index GLuint texture GLint level GLboolean layered GLint layer GLenum access GLint format void glBindImageTextures GLuint first GLsizei count const GLuint *textures GLuint glBindLightParameterEXT GLenum light GLenum value GLuint glBindMaterialParameterEXT GLenum face GLenum value void glBindMultiTextureEXT GLenum texunit GLenum target GLuint texture GLuint glBindParameterEXT GLenum value void glBindProgramARB GLenum target GLuint program void glBindProgramNV GLenum target GLuint id void glBindProgramPipeline GLuint pipeline void glBindProgramPipelineEXT GLuint pipeline void glBindRenderbuffer GLenum target GLuint renderbuffer void glBindRenderbufferEXT GLenum target GLuint renderbuffer void glBindRenderbufferOES GLenum target GLuint renderbuffer void glBindSampler GLuint unit GLuint sampler void glBindSamplers GLuint first GLsizei count const GLuint *samplers void glBindShadingRateImageNV GLuint texture GLuint glBindTexGenParameterEXT GLenum unit GLenum coord GLenum value void glBindTexture GLenum target GLuint texture void glBindTextureEXT GLenum target GLuint texture void glBindTextureUnit GLuint unit GLuint texture GLuint glBindTextureUnitParameterEXT GLenum unit GLenum value void glBindTextures GLuint first GLsizei count const GLuint *textures void glBindTransformFeedback GLenum target GLuint id void glBindTransformFeedbackNV GLenum target GLuint id void glBindVertexArray GLuint array void glBindVertexArrayAPPLE GLuint array void glBindVertexArrayOES GLuint array void glBindVertexBuffer GLuint bindingindex GLuint buffer GLintptr offset GLsizei stride void glBindVertexBuffers GLuint first GLsizei count const GLuint *buffers const GLintptr *offsets const GLsizei *strides void glBindVertexShaderEXT GLuint id void glBindVideoCaptureStreamBufferNV GLuint video_capture_slot GLuint stream GLenum frame_region GLintptrARB offset void glBindVideoCaptureStreamTextureNV GLuint video_capture_slot GLuint stream GLenum frame_region GLenum target GLuint texture void glBinormal3bEXT GLbyte bx GLbyte by GLbyte bz void glBinormal3bvEXT const GLbyte *v void glBinormal3dEXT GLdouble bx GLdouble by GLdouble bz void glBinormal3dvEXT const GLdouble *v void glBinormal3fEXT GLfloat bx GLfloat by GLfloat bz void glBinormal3fvEXT const GLfloat *v void glBinormal3iEXT GLint bx GLint by GLint bz void glBinormal3ivEXT const GLint *v void glBinormal3sEXT GLshort bx GLshort by GLshort bz void glBinormal3svEXT const GLshort *v void glBinormalPointerEXT GLenum type GLsizei stride const void *pointer void glBitmap GLsizei width GLsizei height GLfloat xorig GLfloat yorig GLfloat xmove GLfloat ymove const GLubyte *bitmap void glBitmapxOES GLsizei width GLsizei height GLfixed xorig GLfixed yorig GLfixed xmove GLfixed ymove const GLubyte *bitmap void glBlendBarrier void glBlendBarrierKHR void glBlendBarrierNV void glBlendColor GLfloat red GLfloat green GLfloat blue GLfloat alpha void glBlendColorEXT GLfloat red GLfloat green GLfloat blue GLfloat alpha void glBlendColorxOES GLfixed red GLfixed green GLfixed blue GLfixed alpha void glBlendEquation GLenum mode void glBlendEquationEXT GLenum mode void glBlendEquationIndexedAMD GLuint buf GLenum mode void glBlendEquationOES GLenum mode void glBlendEquationSeparate GLenum modeRGB GLenum modeAlpha void glBlendEquationSeparateEXT GLenum modeRGB GLenum modeAlpha void glBlendEquationSeparateIndexedAMD GLuint buf GLenum modeRGB GLenum modeAlpha void glBlendEquationSeparateOES GLenum modeRGB GLenum modeAlpha void glBlendEquationSeparatei GLuint buf GLenum modeRGB GLenum modeAlpha void glBlendEquationSeparateiARB GLuint buf GLenum modeRGB GLenum modeAlpha void glBlendEquationSeparateiEXT GLuint buf GLenum modeRGB GLenum modeAlpha void glBlendEquationSeparateiOES GLuint buf GLenum modeRGB GLenum modeAlpha void glBlendEquationi GLuint buf GLenum mode void glBlendEquationiARB GLuint buf GLenum mode void glBlendEquationiEXT GLuint buf GLenum mode void glBlendEquationiOES GLuint buf GLenum mode void glBlendFunc GLenum sfactor GLenum dfactor void glBlendFuncIndexedAMD GLuint buf GLenum src GLenum dst void glBlendFuncSeparate GLenum sfactorRGB GLenum dfactorRGB GLenum sfactorAlpha GLenum dfactorAlpha void glBlendFuncSeparateEXT GLenum sfactorRGB GLenum dfactorRGB GLenum sfactorAlpha GLenum dfactorAlpha void glBlendFuncSeparateINGR GLenum sfactorRGB GLenum dfactorRGB GLenum sfactorAlpha GLenum dfactorAlpha void glBlendFuncSeparateIndexedAMD GLuint buf GLenum srcRGB GLenum dstRGB GLenum srcAlpha GLenum dstAlpha void glBlendFuncSeparateOES GLenum srcRGB GLenum dstRGB GLenum srcAlpha GLenum dstAlpha void glBlendFuncSeparatei GLuint buf GLenum srcRGB GLenum dstRGB GLenum srcAlpha GLenum dstAlpha void glBlendFuncSeparateiARB GLuint buf GLenum srcRGB GLenum dstRGB GLenum srcAlpha GLenum dstAlpha void glBlendFuncSeparateiEXT GLuint buf GLenum srcRGB GLenum dstRGB GLenum srcAlpha GLenum dstAlpha void glBlendFuncSeparateiOES GLuint buf GLenum srcRGB GLenum dstRGB GLenum srcAlpha GLenum dstAlpha void glBlendFunci GLuint buf GLenum src GLenum dst void glBlendFunciARB GLuint buf GLenum src GLenum dst void glBlendFunciEXT GLuint buf GLenum src GLenum dst void glBlendFunciOES GLuint buf GLenum src GLenum dst void glBlendParameteriNV GLenum pname GLint value void glBlitFramebuffer GLint srcX0 GLint srcY0 GLint srcX1 GLint srcY1 GLint dstX0 GLint dstY0 GLint dstX1 GLint dstY1 GLbitfield mask GLenum filter void glBlitFramebufferANGLE GLint srcX0 GLint srcY0 GLint srcX1 GLint srcY1 GLint dstX0 GLint dstY0 GLint dstX1 GLint dstY1 GLbitfield mask GLenum filter void glBlitFramebufferEXT GLint srcX0 GLint srcY0 GLint srcX1 GLint srcY1 GLint dstX0 GLint dstY0 GLint dstX1 GLint dstY1 GLbitfield mask GLenum filter void glBlitFramebufferNV GLint srcX0 GLint srcY0 GLint srcX1 GLint srcY1 GLint dstX0 GLint dstY0 GLint dstX1 GLint dstY1 GLbitfield mask GLenum filter void glBlitNamedFramebuffer GLuint readFramebuffer GLuint drawFramebuffer GLint srcX0 GLint srcY0 GLint srcX1 GLint srcY1 GLint dstX0 GLint dstY0 GLint dstX1 GLint dstY1 GLbitfield mask GLenum filter void glBufferAddressRangeNV GLenum pname GLuint index GLuint64EXT address GLsizeiptr length void glBufferAttachMemoryNV GLenum target GLuint memory GLuint64 offset void glBufferData GLenum target GLsizeiptr size const void *data GLenum usage void glBufferDataARB GLenum target GLsizeiptrARB size const void *data GLenum usage void glBufferPageCommitmentARB GLenum target GLintptr offset GLsizeiptr size GLboolean commit void glBufferPageCommitmentMemNV GLenum target GLintptr offset GLsizeiptr size GLuint memory GLuint64 memOffset GLboolean commit void glBufferParameteriAPPLE GLenum target GLenum pname GLint param void glBufferStorage GLenum target GLsizeiptr size const void *data GLbitfield flags void glBufferStorageEXT GLenum target GLsizeiptr size const void *data GLbitfield flags void glBufferStorageExternalEXT GLenum target GLintptr offset GLsizeiptr size GLeglClientBufferEXT clientBuffer GLbitfield flags void glBufferStorageMemEXT GLenum target GLsizeiptr size GLuint memory GLuint64 offset void glBufferSubData GLenum target GLintptr offset GLsizeiptr size const void *data void glBufferSubDataARB GLenum target GLintptrARB offset GLsizeiptrARB size const void *data void glCallCommandListNV GLuint list void glCallList GLuint list void glCallLists GLsizei n GLenum type const void *lists GLenum glCheckFramebufferStatus GLenum target GLenum glCheckFramebufferStatusEXT GLenum target GLenum glCheckFramebufferStatusOES GLenum target GLenum glCheckNamedFramebufferStatus GLuint framebuffer GLenum target GLenum glCheckNamedFramebufferStatusEXT GLuint framebuffer GLenum target void glClampColor GLenum target GLenum clamp void glClampColorARB GLenum target GLenum clamp void glClear GLbitfield mask void glClearAccum GLfloat red GLfloat green GLfloat blue GLfloat alpha void glClearAccumxOES GLfixed red GLfixed green GLfixed blue GLfixed alpha void glClearBufferData GLenum target GLenum internalformat GLenum format GLenum type const void *data void glClearBufferSubData GLenum target GLenum internalformat GLintptr offset GLsizeiptr size GLenum format GLenum type const void *data void glClearBufferfi GLenum buffer GLint drawbuffer GLfloat depth GLint stencil void glClearBufferfv GLenum buffer GLint drawbuffer const GLfloat *value void glClearBufferiv GLenum buffer GLint drawbuffer const GLint *value void glClearBufferuiv GLenum buffer GLint drawbuffer const GLuint *value void glClearColor GLfloat red GLfloat green GLfloat blue GLfloat alpha void glClearColorIiEXT GLint red GLint green GLint blue GLint alpha void glClearColorIuiEXT GLuint red GLuint green GLuint blue GLuint alpha void glClearColorx GLfixed red GLfixed green GLfixed blue GLfixed alpha void glClearColorxOES GLfixed red GLfixed green GLfixed blue GLfixed alpha void glClearDepth GLdouble depth void glClearDepthdNV GLdouble depth void glClearDepthf GLfloat d void glClearDepthfOES GLclampf depth void glClearDepthx GLfixed depth void glClearDepthxOES GLfixed depth void glClearIndex GLfloat c void glClearNamedBufferData GLuint buffer GLenum internalformat GLenum format GLenum type const void *data void glClearNamedBufferDataEXT GLuint buffer GLenum internalformat GLenum format GLenum type const void *data void glClearNamedBufferSubData GLuint buffer GLenum internalformat GLintptr offset GLsizeiptr size GLenum format GLenum type const void *data void glClearNamedBufferSubDataEXT GLuint buffer GLenum internalformat GLsizeiptr offset GLsizeiptr size GLenum format GLenum type const void *data void glClearNamedFramebufferfi GLuint framebuffer GLenum buffer GLint drawbuffer GLfloat depth GLint stencil void glClearNamedFramebufferfv GLuint framebuffer GLenum buffer GLint drawbuffer const GLfloat *value void glClearNamedFramebufferiv GLuint framebuffer GLenum buffer GLint drawbuffer const GLint *value void glClearNamedFramebufferuiv GLuint framebuffer GLenum buffer GLint drawbuffer const GLuint *value void glClearPixelLocalStorageuiEXT GLsizei offset GLsizei n const GLuint *values void glClearStencil GLint s void glClearTexImage GLuint texture GLint level GLenum format GLenum type const void *data void glClearTexImageEXT GLuint texture GLint level GLenum format GLenum type const void *data void glClearTexSubImage GLuint texture GLint level GLint xoffset GLint yoffset GLint zoffset GLsizei width GLsizei height GLsizei depth GLenum format GLenum type const void *data void glClearTexSubImageEXT GLuint texture GLint level GLint xoffset GLint yoffset GLint zoffset GLsizei width GLsizei height GLsizei depth GLenum format GLenum type const void *data void glClientActiveTexture GLenum texture void glClientActiveTextureARB GLenum texture void glClientActiveVertexStreamATI GLenum stream void glClientAttribDefaultEXT GLbitfield mask void glClientWaitSemaphoreui64NVX GLsizei fenceObjectCount const GLuint *semaphoreArray const GLuint64 *fenceValueArray GLenum glClientWaitSync GLsync sync GLbitfield flags GLuint64 timeout GLenum glClientWaitSyncAPPLE GLsync sync GLbitfield flags GLuint64 timeout void glClipControl GLenum origin GLenum depth void glClipControlEXT GLenum origin GLenum depth void glClipPlane GLenum plane const GLdouble *equation void glClipPlanef GLenum p const GLfloat *eqn void glClipPlanefIMG GLenum p const GLfloat *eqn void glClipPlanefOES GLenum plane const GLfloat *equation void glClipPlanex GLenum plane const GLfixed *equation void glClipPlanexIMG GLenum p const GLfixed *eqn void glClipPlanexOES GLenum plane const GLfixed *equation void glColor3b GLbyte red GLbyte green GLbyte blue void glColor3bv const GLbyte *v void glColor3d GLdouble red GLdouble green GLdouble blue void glColor3dv const GLdouble *v void glColor3f GLfloat red GLfloat green GLfloat blue void glColor3fVertex3fSUN GLfloat r GLfloat g GLfloat b GLfloat x GLfloat y GLfloat z void glColor3fVertex3fvSUN const GLfloat *c const GLfloat *v void glColor3fv const GLfloat *v void glColor3hNV GLhalfNV red GLhalfNV green GLhalfNV blue void glColor3hvNV const GLhalfNV *v void glColor3i GLint red GLint green GLint blue void glColor3iv const GLint *v void glColor3s GLshort red GLshort green GLshort blue void glColor3sv const GLshort *v void glColor3ub GLubyte red GLubyte green GLubyte blue void glColor3ubv const GLubyte *v void glColor3ui GLuint red GLuint green GLuint blue void glColor3uiv const GLuint *v void glColor3us GLushort red GLushort green GLushort blue void glColor3usv const GLushort *v void glColor3xOES GLfixed red GLfixed green GLfixed blue void glColor3xvOES const GLfixed *components void glColor4b GLbyte red GLbyte green GLbyte blue GLbyte alpha void glColor4bv const GLbyte *v void glColor4d GLdouble red GLdouble green GLdouble blue GLdouble alpha void glColor4dv const GLdouble *v void glColor4f GLfloat red GLfloat green GLfloat blue GLfloat alpha void glColor4fNormal3fVertex3fSUN GLfloat r GLfloat g GLfloat b GLfloat a GLfloat nx GLfloat ny GLfloat nz GLfloat x GLfloat y GLfloat z void glColor4fNormal3fVertex3fvSUN const GLfloat *c const GLfloat *n const GLfloat *v void glColor4fv const GLfloat *v void glColor4hNV GLhalfNV red GLhalfNV green GLhalfNV blue GLhalfNV alpha void glColor4hvNV const GLhalfNV *v void glColor4i GLint red GLint green GLint blue GLint alpha void glColor4iv const GLint *v void glColor4s GLshort red GLshort green GLshort blue GLshort alpha void glColor4sv const GLshort *v void glColor4ub GLubyte red GLubyte green GLubyte blue GLubyte alpha void glColor4ubVertex2fSUN GLubyte r GLubyte g GLubyte b GLubyte a GLfloat x GLfloat y void glColor4ubVertex2fvSUN const GLubyte *c const GLfloat *v void glColor4ubVertex3fSUN GLubyte r GLubyte g GLubyte b GLubyte a GLfloat x GLfloat y GLfloat z void glColor4ubVertex3fvSUN const GLubyte *c const GLfloat *v void glColor4ubv const GLubyte *v void glColor4ui GLuint red GLuint green GLuint blue GLuint alpha void glColor4uiv const GLuint *v void glColor4us GLushort red GLushort green GLushort blue GLushort alpha void glColor4usv const GLushort *v void glColor4x GLfixed red GLfixed green GLfixed blue GLfixed alpha void glColor4xOES GLfixed red GLfixed green GLfixed blue GLfixed alpha void glColor4xvOES const GLfixed *components void glColorFormatNV GLint size GLenum type GLsizei stride void glColorFragmentOp1ATI GLenum op GLuint dst GLuint dstMask GLuint dstMod GLuint arg1 GLuint arg1Rep GLuint arg1Mod void glColorFragmentOp2ATI GLenum op GLuint dst GLuint dstMask GLuint dstMod GLuint arg1 GLuint arg1Rep GLuint arg1Mod GLuint arg2 GLuint arg2Rep GLuint arg2Mod void glColorFragmentOp3ATI GLenum op GLuint dst GLuint dstMask GLuint dstMod GLuint arg1 GLuint arg1Rep GLuint arg1Mod GLuint arg2 GLuint arg2Rep GLuint arg2Mod GLuint arg3 GLuint arg3Rep GLuint arg3Mod void glColorMask GLboolean red GLboolean green GLboolean blue GLboolean alpha void glColorMaskIndexedEXT GLuint index GLboolean r GLboolean g GLboolean b GLboolean a void glColorMaski GLuint index GLboolean r GLboolean g GLboolean b GLboolean a void glColorMaskiEXT GLuint index GLboolean r GLboolean g GLboolean b GLboolean a void glColorMaskiOES GLuint index GLboolean r GLboolean g GLboolean b GLboolean a void glColorMaterial GLenum face GLenum mode void glColorP3ui GLenum type GLuint color void glColorP3uiv GLenum type const GLuint *color void glColorP4ui GLenum type GLuint color void glColorP4uiv GLenum type const GLuint *color void glColorPointer GLint size GLenum type GLsizei stride const void *pointer void glColorPointerEXT GLint size GLenum type GLsizei stride GLsizei count const void *pointer void glColorPointerListIBM GLint size GLenum type GLint stride const void **pointer GLint ptrstride void glColorPointervINTEL GLint size GLenum type const void **pointer void glColorSubTable GLenum target GLsizei start GLsizei count GLenum format GLenum type const void *data void glColorSubTableEXT GLenum target GLsizei start GLsizei count GLenum format GLenum type const void *data void glColorTable GLenum target GLenum internalformat GLsizei width GLenum format GLenum type const void *table void glColorTableEXT GLenum target GLenum internalFormat GLsizei width GLenum format GLenum type const void *table void glColorTableParameterfv GLenum target GLenum pname const GLfloat *params void glColorTableParameterfvSGI GLenum target GLenum pname const GLfloat *params void glColorTableParameteriv GLenum target GLenum pname const GLint *params void glColorTableParameterivSGI GLenum target GLenum pname const GLint *params void glColorTableSGI GLenum target GLenum internalformat GLsizei width GLenum format GLenum type const void *table void glCombinerInputNV GLenum stage GLenum portion GLenum variable GLenum input GLenum mapping GLenum componentUsage void glCombinerOutputNV GLenum stage GLenum portion GLenum abOutput GLenum cdOutput GLenum sumOutput GLenum scale GLenum bias GLboolean abDotProduct GLboolean cdDotProduct GLboolean muxSum void glCombinerParameterfNV GLenum pname GLfloat param void glCombinerParameterfvNV GLenum pname const GLfloat *params void glCombinerParameteriNV GLenum pname GLint param void glCombinerParameterivNV GLenum pname const GLint *params void glCombinerStageParameterfvNV GLenum stage GLenum pname const GLfloat *params void glCommandListSegmentsNV GLuint list GLuint segments void glCompileCommandListNV GLuint list void glCompileShader GLuint shader void glCompileShaderARB GLhandleARB shaderObj void glCompileShaderIncludeARB GLuint shader GLsizei count const GLchar *const*path const GLint *length void glCompressedMultiTexImage1DEXT GLenum texunit GLenum target GLint level GLenum internalformat GLsizei width GLint border GLsizei imageSize const void *bits void glCompressedMultiTexImage2DEXT GLenum texunit GLenum target GLint level GLenum internalformat GLsizei width GLsizei height GLint border GLsizei imageSize const void *bits void glCompressedMultiTexImage3DEXT GLenum texunit GLenum target GLint level GLenum internalformat GLsizei width GLsizei height GLsizei depth GLint border GLsizei imageSize const void *bits void glCompressedMultiTexSubImage1DEXT GLenum texunit GLenum target GLint level GLint xoffset GLsizei width GLenum format GLsizei imageSize const void *bits void glCompressedMultiTexSubImage2DEXT GLenum texunit GLenum target GLint level GLint xoffset GLint yoffset GLsizei width GLsizei height GLenum format GLsizei imageSize const void *bits void glCompressedMultiTexSubImage3DEXT GLenum texunit GLenum target GLint level GLint xoffset GLint yoffset GLint zoffset GLsizei width GLsizei height GLsizei depth GLenum format GLsizei imageSize const void *bits void glCompressedTexImage1D GLenum target GLint level GLenum internalformat GLsizei width GLint border GLsizei imageSize const void *data void glCompressedTexImage1DARB GLenum target GLint level GLenum internalformat GLsizei width GLint border GLsizei imageSize const void *data void glCompressedTexImage2D GLenum target GLint level GLenum internalformat GLsizei width GLsizei height GLint border GLsizei imageSize const void *data void glCompressedTexImage2DARB GLenum target GLint level GLenum internalformat GLsizei width GLsizei height GLint border GLsizei imageSize const void *data void glCompressedTexImage3D GLenum target GLint level GLenum internalformat GLsizei width GLsizei height GLsizei depth GLint border GLsizei imageSize const void *data void glCompressedTexImage3DARB GLenum target GLint level GLenum internalformat GLsizei width GLsizei height GLsizei depth GLint border GLsizei imageSize const void *data void glCompressedTexImage3DOES GLenum target GLint level GLenum internalformat GLsizei width GLsizei height GLsizei depth GLint border GLsizei imageSize const void *data void glCompressedTexSubImage1D GLenum target GLint level GLint xoffset GLsizei width GLenum format GLsizei imageSize const void *data void glCompressedTexSubImage1DARB GLenum target GLint level GLint xoffset GLsizei width GLenum format GLsizei imageSize const void *data void glCompressedTexSubImage2D GLenum target GLint level GLint xoffset GLint yoffset GLsizei width GLsizei height GLenum format GLsizei imageSize const void *data void glCompressedTexSubImage2DARB GLenum target GLint level GLint xoffset GLint yoffset GLsizei width GLsizei height GLenum format GLsizei imageSize const void *data void glCompressedTexSubImage3D GLenum target GLint level GLint xoffset GLint yoffset GLint zoffset GLsizei width GLsizei height GLsizei depth GLenum format GLsizei imageSize const void *data void glCompressedTexSubImage3DARB GLenum target GLint level GLint xoffset GLint yoffset GLint zoffset GLsizei width GLsizei height GLsizei depth GLenum format GLsizei imageSize const void *data void glCompressedTexSubImage3DOES GLenum target GLint level GLint xoffset GLint yoffset GLint zoffset GLsizei width GLsizei height GLsizei depth GLenum format GLsizei imageSize const void *data void glCompressedTextureImage1DEXT GLuint texture GLenum target GLint level GLenum internalformat GLsizei width GLint border GLsizei imageSize const void *bits void glCompressedTextureImage2DEXT GLuint texture GLenum target GLint level GLenum internalformat GLsizei width GLsizei height GLint border GLsizei imageSize const void *bits void glCompressedTextureImage3DEXT GLuint texture GLenum target GLint level GLenum internalformat GLsizei width GLsizei height GLsizei depth GLint border GLsizei imageSize const void *bits void glCompressedTextureSubImage1D GLuint texture GLint level GLint xoffset GLsizei width GLenum format GLsizei imageSize const void *data void glCompressedTextureSubImage1DEXT GLuint texture GLenum target GLint level GLint xoffset GLsizei width GLenum format GLsizei imageSize const void *bits void glCompressedTextureSubImage2D GLuint texture GLint level GLint xoffset GLint yoffset GLsizei width GLsizei height GLenum format GLsizei imageSize const void *data void glCompressedTextureSubImage2DEXT GLuint texture GLenum target GLint level GLint xoffset GLint yoffset GLsizei width GLsizei height GLenum format GLsizei imageSize const void *bits void glCompressedTextureSubImage3D GLuint texture GLint level GLint xoffset GLint yoffset GLint zoffset GLsizei width GLsizei height GLsizei depth GLenum format GLsizei imageSize const void *data void glCompressedTextureSubImage3DEXT GLuint texture GLenum target GLint level GLint xoffset GLint yoffset GLint zoffset GLsizei width GLsizei height GLsizei depth GLenum format GLsizei imageSize const void *bits void glConservativeRasterParameterfNV GLenum pname GLfloat value void glConservativeRasterParameteriNV GLenum pname GLint param void glConvolutionFilter1D GLenum target GLenum internalformat GLsizei width GLenum format GLenum type const void *image void glConvolutionFilter1DEXT GLenum target GLenum internalformat GLsizei width GLenum format GLenum type const void *image void glConvolutionFilter2D GLenum target GLenum internalformat GLsizei width GLsizei height GLenum format GLenum type const void *image void glConvolutionFilter2DEXT GLenum target GLenum internalformat GLsizei width GLsizei height GLenum format GLenum type const void *image void glConvolutionParameterf GLenum target GLenum pname GLfloat params void glConvolutionParameterfEXT GLenum target GLenum pname GLfloat params void glConvolutionParameterfv GLenum target GLenum pname const GLfloat *params void glConvolutionParameterfvEXT GLenum target GLenum pname const GLfloat *params void glConvolutionParameteri GLenum target GLenum pname GLint params void glConvolutionParameteriEXT GLenum target GLenum pname GLint params void glConvolutionParameteriv GLenum target GLenum pname const GLint *params void glConvolutionParameterivEXT GLenum target GLenum pname const GLint *params void glConvolutionParameterxOES GLenum target GLenum pname GLfixed param void glConvolutionParameterxvOES GLenum target GLenum pname const GLfixed *params void glCopyBufferSubData GLenum readTarget GLenum writeTarget GLintptr readOffset GLintptr writeOffset GLsizeiptr size void glCopyBufferSubDataNV GLenum readTarget GLenum writeTarget GLintptr readOffset GLintptr writeOffset GLsizeiptr size void glCopyColorSubTable GLenum target GLsizei start GLint x GLint y GLsizei width void glCopyColorSubTableEXT GLenum target GLsizei start GLint x GLint y GLsizei width void glCopyColorTable GLenum target GLenum internalformat GLint x GLint y GLsizei width void glCopyColorTableSGI GLenum target GLenum internalformat GLint x GLint y GLsizei width void glCopyConvolutionFilter1D GLenum target GLenum internalformat GLint x GLint y GLsizei width void glCopyConvolutionFilter1DEXT GLenum target GLenum internalformat GLint x GLint y GLsizei width void glCopyConvolutionFilter2D GLenum target GLenum internalformat GLint x GLint y GLsizei width GLsizei height void glCopyConvolutionFilter2DEXT GLenum target GLenum internalformat GLint x GLint y GLsizei width GLsizei height void glCopyImageSubData 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 void 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 void glCopyImageSubDataNV 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 width GLsizei height GLsizei depth void glCopyImageSubDataOES 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 void glCopyMultiTexImage1DEXT GLenum texunit GLenum target GLint level GLenum internalformat GLint x GLint y GLsizei width GLint border void glCopyMultiTexImage2DEXT GLenum texunit GLenum target GLint level GLenum internalformat GLint x GLint y GLsizei width GLsizei height GLint border void glCopyMultiTexSubImage1DEXT GLenum texunit GLenum target GLint level GLint xoffset GLint x GLint y GLsizei width void glCopyMultiTexSubImage2DEXT GLenum texunit GLenum target GLint level GLint xoffset GLint yoffset GLint x GLint y GLsizei width GLsizei height void glCopyMultiTexSubImage3DEXT GLenum texunit GLenum target GLint level GLint xoffset GLint yoffset GLint zoffset GLint x GLint y GLsizei width GLsizei height void glCopyNamedBufferSubData GLuint readBuffer GLuint writeBuffer GLintptr readOffset GLintptr writeOffset GLsizeiptr size void glCopyPathNV GLuint resultPath GLuint srcPath void glCopyPixels GLint x GLint y GLsizei width GLsizei height GLenum type void glCopyTexImage1D GLenum target GLint level GLenum internalformat GLint x GLint y GLsizei width GLint border void glCopyTexImage1DEXT GLenum target GLint level GLenum internalformat GLint x GLint y GLsizei width GLint border void glCopyTexImage2D GLenum target GLint level GLenum internalformat GLint x GLint y GLsizei width GLsizei height GLint border void glCopyTexImage2DEXT GLenum target GLint level GLenum internalformat GLint x GLint y GLsizei width GLsizei height GLint border void glCopyTexSubImage1D GLenum target GLint level GLint xoffset GLint x GLint y GLsizei width void glCopyTexSubImage1DEXT GLenum target GLint level GLint xoffset GLint x GLint y GLsizei width void glCopyTexSubImage2D GLenum target GLint level GLint xoffset GLint yoffset GLint x GLint y GLsizei width GLsizei height void glCopyTexSubImage2DEXT GLenum target GLint level GLint xoffset GLint yoffset GLint x GLint y GLsizei width GLsizei height void glCopyTexSubImage3D GLenum target GLint level GLint xoffset GLint yoffset GLint zoffset GLint x GLint y GLsizei width GLsizei height void glCopyTexSubImage3DEXT GLenum target GLint level GLint xoffset GLint yoffset GLint zoffset GLint x GLint y GLsizei width GLsizei height void glCopyTexSubImage3DOES GLenum target GLint level GLint xoffset GLint yoffset GLint zoffset GLint x GLint y GLsizei width GLsizei height void glCopyTextureImage1DEXT GLuint texture GLenum target GLint level GLenum internalformat GLint x GLint y GLsizei width GLint border void glCopyTextureImage2DEXT GLuint texture GLenum target GLint level GLenum internalformat GLint x GLint y GLsizei width GLsizei height GLint border void glCopyTextureLevelsAPPLE GLuint destinationTexture GLuint sourceTexture GLint sourceBaseLevel GLsizei sourceLevelCount void glCopyTextureSubImage1D GLuint texture GLint level GLint xoffset GLint x GLint y GLsizei width void glCopyTextureSubImage1DEXT GLuint texture GLenum target GLint level GLint xoffset GLint x GLint y GLsizei width void glCopyTextureSubImage2D GLuint texture GLint level GLint xoffset GLint yoffset GLint x GLint y GLsizei width GLsizei height void glCopyTextureSubImage2DEXT GLuint texture GLenum target GLint level GLint xoffset GLint yoffset GLint x GLint y GLsizei width GLsizei height void glCopyTextureSubImage3D GLuint texture GLint level GLint xoffset GLint yoffset GLint zoffset GLint x GLint y GLsizei width GLsizei height void glCopyTextureSubImage3DEXT GLuint texture GLenum target GLint level GLint xoffset GLint yoffset GLint zoffset GLint x GLint y GLsizei width GLsizei height void glCoverFillPathInstancedNV GLsizei numPaths GLenum pathNameType const void *paths GLuint pathBase GLenum coverMode GLenum transformType const GLfloat *transformValues void glCoverFillPathNV GLuint path GLenum coverMode void glCoverStrokePathInstancedNV GLsizei numPaths GLenum pathNameType const void *paths GLuint pathBase GLenum coverMode GLenum transformType const GLfloat *transformValues void glCoverStrokePathNV GLuint path GLenum coverMode void glCoverageMaskNV GLboolean mask void glCoverageModulationNV GLenum components void glCoverageModulationTableNV GLsizei n const GLfloat *v void glCoverageOperationNV GLenum operation void glCreateBuffers GLsizei n GLuint *buffers void glCreateCommandListsNV GLsizei n GLuint *lists void glCreateFramebuffers GLsizei n GLuint *framebuffers void glCreateMemoryObjectsEXT GLsizei n GLuint *memoryObjects void glCreatePerfQueryINTEL GLuint queryId GLuint *queryHandle GLuint glCreateProgram GLhandleARB glCreateProgramObjectARB void glCreateProgramPipelines GLsizei n GLuint *pipelines GLuint glCreateProgressFenceNVX void glCreateQueries GLenum target GLsizei n GLuint *ids void glCreateRenderbuffers GLsizei n GLuint *renderbuffers void glCreateSamplers GLsizei n GLuint *samplers void glCreateSemaphoresNV GLsizei n GLuint *semaphores GLuint glCreateShader GLenum type GLhandleARB glCreateShaderObjectARB GLenum shaderType GLuint glCreateShaderProgramEXT GLenum type const GLchar *string GLuint glCreateShaderProgramv GLenum type GLsizei count const GLchar *const*strings GLuint glCreateShaderProgramvEXT GLenum type GLsizei count const GLchar **strings void glCreateStatesNV GLsizei n GLuint *states GLsync glCreateSyncFromCLeventARB struct _cl_context *context struct _cl_event *event GLbitfield flags void glCreateTextures GLenum target GLsizei n GLuint *textures void glCreateTransformFeedbacks GLsizei n GLuint *ids void glCreateVertexArrays GLsizei n GLuint *arrays void glCullFace GLenum mode void glCullParameterdvEXT GLenum pname GLdouble *params void glCullParameterfvEXT GLenum pname GLfloat *params void glCurrentPaletteMatrixARB GLint index void glCurrentPaletteMatrixOES GLuint matrixpaletteindex void glDebugMessageCallback GLDEBUGPROC callback const void *userParam void glDebugMessageCallbackAMD GLDEBUGPROCAMD callback void *userParam void glDebugMessageCallbackARB GLDEBUGPROCARB callback const void *userParam void glDebugMessageCallbackKHR GLDEBUGPROCKHR callback const void *userParam void glDebugMessageControl GLenum source GLenum type GLenum severity GLsizei count const GLuint *ids GLboolean enabled void glDebugMessageControlARB GLenum source GLenum type GLenum severity GLsizei count const GLuint *ids GLboolean enabled void glDebugMessageControlKHR GLenum source GLenum type GLenum severity GLsizei count const GLuint *ids GLboolean enabled void glDebugMessageEnableAMD GLenum category GLenum severity GLsizei count const GLuint *ids GLboolean enabled void glDebugMessageInsert GLenum source GLenum type GLuint id GLenum severity GLsizei length const GLchar *buf void glDebugMessageInsertAMD GLenum category GLenum severity GLuint id GLsizei length const GLchar *buf void glDebugMessageInsertARB GLenum source GLenum type GLuint id GLenum severity GLsizei length const GLchar *buf void glDebugMessageInsertKHR GLenum source GLenum type GLuint id GLenum severity GLsizei length const GLchar *buf void glDeformSGIX GLbitfield mask void glDeformationMap3dSGIX GLenum target GLdouble u1 GLdouble u2 GLint ustride GLint uorder GLdouble v1 GLdouble v2 GLint vstride GLint vorder GLdouble w1 GLdouble w2 GLint wstride GLint worder const GLdouble *points void glDeformationMap3fSGIX GLenum target GLfloat u1 GLfloat u2 GLint ustride GLint uorder GLfloat v1 GLfloat v2 GLint vstride GLint vorder GLfloat w1 GLfloat w2 GLint wstride GLint worder const GLfloat *points void glDeleteAsyncMarkersSGIX GLuint marker GLsizei range void glDeleteBuffers GLsizei n const GLuint *buffers void glDeleteBuffersARB GLsizei n const GLuint *buffers void glDeleteCommandListsNV GLsizei n const GLuint *lists void glDeleteFencesAPPLE GLsizei n const GLuint *fences void glDeleteFencesNV GLsizei n const GLuint *fences void glDeleteFragmentShaderATI GLuint id void glDeleteFramebuffers GLsizei n const GLuint *framebuffers void glDeleteFramebuffersEXT GLsizei n const GLuint *framebuffers void glDeleteFramebuffersOES GLsizei n const GLuint *framebuffers void glDeleteLists GLuint list GLsizei range void glDeleteMemoryObjectsEXT GLsizei n const GLuint *memoryObjects void glDeleteNamedStringARB GLint namelen const GLchar *name void glDeleteNamesAMD GLenum identifier GLuint num const GLuint *names void glDeleteObjectARB GLhandleARB obj void glDeleteOcclusionQueriesNV GLsizei n const GLuint *ids void glDeletePathsNV GLuint path GLsizei range void glDeletePerfMonitorsAMD GLsizei n GLuint *monitors void glDeletePerfQueryINTEL GLuint queryHandle void glDeleteProgram GLuint program void glDeleteProgramPipelines GLsizei n const GLuint *pipelines void glDeleteProgramPipelinesEXT GLsizei n const GLuint *pipelines void glDeleteProgramsARB GLsizei n const GLuint *programs void glDeleteProgramsNV GLsizei n const GLuint *programs void glDeleteQueries GLsizei n const GLuint *ids void glDeleteQueriesARB GLsizei n const GLuint *ids void glDeleteQueriesEXT GLsizei n const GLuint *ids void glDeleteQueryResourceTagNV GLsizei n const GLint *tagIds void glDeleteRenderbuffers GLsizei n const GLuint *renderbuffers void glDeleteRenderbuffersEXT GLsizei n const GLuint *renderbuffers void glDeleteRenderbuffersOES GLsizei n const GLuint *renderbuffers void glDeleteSamplers GLsizei count const GLuint *samplers void glDeleteSemaphoresEXT GLsizei n const GLuint *semaphores void glDeleteShader GLuint shader void glDeleteStatesNV GLsizei n const GLuint *states void glDeleteSync GLsync sync void glDeleteSyncAPPLE GLsync sync void glDeleteTextures GLsizei n const GLuint *textures void glDeleteTexturesEXT GLsizei n const GLuint *textures void glDeleteTransformFeedbacks GLsizei n const GLuint *ids void glDeleteTransformFeedbacksNV GLsizei n const GLuint *ids void glDeleteVertexArrays GLsizei n const GLuint *arrays void glDeleteVertexArraysAPPLE GLsizei n const GLuint *arrays void glDeleteVertexArraysOES GLsizei n const GLuint *arrays void glDeleteVertexShaderEXT GLuint id void glDepthBoundsEXT GLclampd zmin GLclampd zmax void glDepthBoundsdNV GLdouble zmin GLdouble zmax void glDepthFunc GLenum func void glDepthMask GLboolean flag void glDepthRange GLdouble n GLdouble f void glDepthRangeArraydvNV GLuint first GLsizei count const GLdouble *v void glDepthRangeArrayfvNV GLuint first GLsizei count const GLfloat *v void glDepthRangeArrayfvOES GLuint first GLsizei count const GLfloat *v void glDepthRangeArrayv GLuint first GLsizei count const GLdouble *v void glDepthRangeIndexed GLuint index GLdouble n GLdouble f void glDepthRangeIndexeddNV GLuint index GLdouble n GLdouble f void glDepthRangeIndexedfNV GLuint index GLfloat n GLfloat f void glDepthRangeIndexedfOES GLuint index GLfloat n GLfloat f void glDepthRangedNV GLdouble zNear GLdouble zFar void glDepthRangef GLfloat n GLfloat f void glDepthRangefOES GLclampf n GLclampf f void glDepthRangex GLfixed n GLfixed f void glDepthRangexOES GLfixed n GLfixed f void glDetachObjectARB GLhandleARB containerObj GLhandleARB attachedObj void glDetachShader GLuint program GLuint shader void glDetailTexFuncSGIS GLenum target GLsizei n const GLfloat *points void glDisable GLenum cap void glDisableClientState GLenum array void glDisableClientStateIndexedEXT GLenum array GLuint index void glDisableClientStateiEXT GLenum array GLuint index void glDisableDriverControlQCOM GLuint driverControl void glDisableIndexedEXT GLenum target GLuint index void glDisableVariantClientStateEXT GLuint id void glDisableVertexArrayAttrib GLuint vaobj GLuint index void glDisableVertexArrayAttribEXT GLuint vaobj GLuint index void glDisableVertexArrayEXT GLuint vaobj GLenum array void glDisableVertexAttribAPPLE GLuint index GLenum pname void glDisableVertexAttribArray GLuint index void glDisableVertexAttribArrayARB GLuint index void glDisablei GLenum target GLuint index void glDisableiEXT GLenum target GLuint index void glDisableiNV GLenum target GLuint index void glDisableiOES GLenum target GLuint index void glDiscardFramebufferEXT GLenum target GLsizei numAttachments const GLenum *attachments void glDispatchCompute GLuint num_groups_x GLuint num_groups_y GLuint num_groups_z void glDispatchComputeGroupSizeARB GLuint num_groups_x GLuint num_groups_y GLuint num_groups_z GLuint group_size_x GLuint group_size_y GLuint group_size_z void glDispatchComputeIndirect GLintptr indirect void glDrawArrays GLenum mode GLint first GLsizei count void glDrawArraysEXT GLenum mode GLint first GLsizei count void glDrawArraysIndirect GLenum mode const void *indirect void glDrawArraysInstanced GLenum mode GLint first GLsizei count GLsizei instancecount void glDrawArraysInstancedANGLE GLenum mode GLint first GLsizei count GLsizei primcount void glDrawArraysInstancedARB GLenum mode GLint first GLsizei count GLsizei primcount void glDrawArraysInstancedBaseInstance GLenum mode GLint first GLsizei count GLsizei instancecount GLuint baseinstance void glDrawArraysInstancedBaseInstanceEXT GLenum mode GLint first GLsizei count GLsizei instancecount GLuint baseinstance void glDrawArraysInstancedEXT GLenum mode GLint start GLsizei count GLsizei primcount void glDrawArraysInstancedNV GLenum mode GLint first GLsizei count GLsizei primcount void glDrawBuffer GLenum buf void glDrawBuffers GLsizei n const GLenum *bufs void glDrawBuffersARB GLsizei n const GLenum *bufs void glDrawBuffersATI GLsizei n const GLenum *bufs void glDrawBuffersEXT GLsizei n const GLenum *bufs void glDrawBuffersIndexedEXT GLint n const GLenum *location const GLint *indices void glDrawBuffersNV GLsizei n const GLenum *bufs void glDrawCommandsAddressNV GLenum primitiveMode const GLuint64 *indirects const GLsizei *sizes GLuint count void glDrawCommandsNV GLenum primitiveMode GLuint buffer const GLintptr *indirects const GLsizei *sizes GLuint count void glDrawCommandsStatesAddressNV const GLuint64 *indirects const GLsizei *sizes const GLuint *states const GLuint *fbos GLuint count void glDrawCommandsStatesNV GLuint buffer const GLintptr *indirects const GLsizei *sizes const GLuint *states const GLuint *fbos GLuint count void glDrawElementArrayAPPLE GLenum mode GLint first GLsizei count void glDrawElementArrayATI GLenum mode GLsizei count void glDrawElements GLenum mode GLsizei count GLenum type const void *indices void glDrawElementsBaseVertex GLenum mode GLsizei count GLenum type const void *indices GLint basevertex void glDrawElementsBaseVertexEXT GLenum mode GLsizei count GLenum type const void *indices GLint basevertex void glDrawElementsBaseVertexOES GLenum mode GLsizei count GLenum type const void *indices GLint basevertex void glDrawElementsIndirect GLenum mode GLenum type const void *indirect void glDrawElementsInstanced GLenum mode GLsizei count GLenum type const void *indices GLsizei instancecount void glDrawElementsInstancedANGLE GLenum mode GLsizei count GLenum type const void *indices GLsizei primcount void glDrawElementsInstancedARB GLenum mode GLsizei count GLenum type const void *indices GLsizei primcount void glDrawElementsInstancedBaseInstance GLenum mode GLsizei count GLenum type const void *indices GLsizei instancecount GLuint baseinstance void glDrawElementsInstancedBaseInstanceEXT GLenum mode GLsizei count GLenum type const void *indices GLsizei instancecount GLuint baseinstance void glDrawElementsInstancedBaseVertex GLenum mode GLsizei count GLenum type const void *indices GLsizei instancecount GLint basevertex void glDrawElementsInstancedBaseVertexBaseInstance GLenum mode GLsizei count GLenum type const void *indices GLsizei instancecount GLint basevertex GLuint baseinstance void glDrawElementsInstancedBaseVertexBaseInstanceEXT GLenum mode GLsizei count GLenum type const void *indices GLsizei instancecount GLint basevertex GLuint baseinstance void glDrawElementsInstancedBaseVertexEXT GLenum mode GLsizei count GLenum type const void *indices GLsizei instancecount GLint basevertex void glDrawElementsInstancedBaseVertexOES GLenum mode GLsizei count GLenum type const void *indices GLsizei instancecount GLint basevertex void glDrawElementsInstancedEXT GLenum mode GLsizei count GLenum type const void *indices GLsizei primcount void glDrawElementsInstancedNV GLenum mode GLsizei count GLenum type const void *indices GLsizei primcount void glDrawMeshArraysSUN GLenum mode GLint first GLsizei count GLsizei width void glDrawMeshTasksNV GLuint first GLuint count void glDrawMeshTasksIndirectNV GLintptr indirect void glDrawPixels GLsizei width GLsizei height GLenum format GLenum type const void *pixels void glDrawRangeElementArrayAPPLE GLenum mode GLuint start GLuint end GLint first GLsizei count void glDrawRangeElementArrayATI GLenum mode GLuint start GLuint end GLsizei count void glDrawRangeElements GLenum mode GLuint start GLuint end GLsizei count GLenum type const void *indices void glDrawRangeElementsBaseVertex GLenum mode GLuint start GLuint end GLsizei count GLenum type const void *indices GLint basevertex void glDrawRangeElementsBaseVertexEXT GLenum mode GLuint start GLuint end GLsizei count GLenum type const void *indices GLint basevertex void glDrawRangeElementsBaseVertexOES GLenum mode GLuint start GLuint end GLsizei count GLenum type const void *indices GLint basevertex void glDrawRangeElementsEXT GLenum mode GLuint start GLuint end GLsizei count GLenum type const void *indices void glDrawTexfOES GLfloat x GLfloat y GLfloat z GLfloat width GLfloat height void glDrawTexfvOES const GLfloat *coords void glDrawTexiOES GLint x GLint y GLint z GLint width GLint height void glDrawTexivOES const GLint *coords void glDrawTexsOES GLshort x GLshort y GLshort z GLshort width GLshort height void glDrawTexsvOES const GLshort *coords void glDrawTextureNV GLuint texture GLuint sampler GLfloat x0 GLfloat y0 GLfloat x1 GLfloat y1 GLfloat z GLfloat s0 GLfloat t0 GLfloat s1 GLfloat t1 void glDrawTexxOES GLfixed x GLfixed y GLfixed z GLfixed width GLfixed height void glDrawTexxvOES const GLfixed *coords void glDrawTransformFeedback GLenum mode GLuint id void glDrawTransformFeedbackEXT GLenum mode GLuint id void glDrawTransformFeedbackInstanced GLenum mode GLuint id GLsizei instancecount void glDrawTransformFeedbackInstancedEXT GLenum mode GLuint id GLsizei instancecount void glDrawTransformFeedbackNV GLenum mode GLuint id void glDrawTransformFeedbackStream GLenum mode GLuint id GLuint stream void glDrawTransformFeedbackStreamInstanced GLenum mode GLuint id GLuint stream GLsizei instancecount void glEGLImageTargetRenderbufferStorageOES GLenum target GLeglImageOES image void glEGLImageTargetTexStorageEXT GLenum target GLeglImageOES image const GLint* attrib_list void glEGLImageTargetTexture2DOES GLenum target GLeglImageOES image void glEGLImageTargetTextureStorageEXT GLuint texture GLeglImageOES image const GLint* attrib_list void glEdgeFlag GLboolean flag void glEdgeFlagFormatNV GLsizei stride void glEdgeFlagPointer GLsizei stride const void *pointer void glEdgeFlagPointerEXT GLsizei stride GLsizei count const GLboolean *pointer void glEdgeFlagPointerListIBM GLint stride const GLboolean **pointer GLint ptrstride void glEdgeFlagv const GLboolean *flag void glElementPointerAPPLE GLenum type const void *pointer void glElementPointerATI GLenum type const void *pointer void glEnable GLenum cap void glEnableClientState GLenum array void glEnableClientStateIndexedEXT GLenum array GLuint index void glEnableClientStateiEXT GLenum array GLuint index void glEnableDriverControlQCOM GLuint driverControl void glEnableIndexedEXT GLenum target GLuint index void glEnableVariantClientStateEXT GLuint id void glEnableVertexArrayAttrib GLuint vaobj GLuint index void glEnableVertexArrayAttribEXT GLuint vaobj GLuint index void glEnableVertexArrayEXT GLuint vaobj GLenum array void glEnableVertexAttribAPPLE GLuint index GLenum pname void glEnableVertexAttribArray GLuint index void glEnableVertexAttribArrayARB GLuint index void glEnablei GLenum target GLuint index void glEnableiEXT GLenum target GLuint index void glEnableiNV GLenum target GLuint index void glEnableiOES GLenum target GLuint index void glEnd void glEndConditionalRender void glEndConditionalRenderNV void glEndConditionalRenderNVX void glEndFragmentShaderATI void glEndList void glEndOcclusionQueryNV void glEndPerfMonitorAMD GLuint monitor void glEndPerfQueryINTEL GLuint queryHandle void glEndQuery GLenum target void glEndQueryARB GLenum target void glEndQueryEXT GLenum target void glEndQueryIndexed GLenum target GLuint index void glEndTilingQCOM GLbitfield preserveMask void glEndTransformFeedback void glEndTransformFeedbackEXT void glEndTransformFeedbackNV void glEndVertexShaderEXT void glEndVideoCaptureNV GLuint video_capture_slot void glEvalCoord1d GLdouble u void glEvalCoord1dv const GLdouble *u void glEvalCoord1f GLfloat u void glEvalCoord1fv const GLfloat *u void glEvalCoord1xOES GLfixed u void glEvalCoord1xvOES const GLfixed *coords void glEvalCoord2d GLdouble u GLdouble v void glEvalCoord2dv const GLdouble *u void glEvalCoord2f GLfloat u GLfloat v void glEvalCoord2fv const GLfloat *u void glEvalCoord2xOES GLfixed u GLfixed v void glEvalCoord2xvOES const GLfixed *coords void glEvalMapsNV GLenum target GLenum mode void glEvalMesh1 GLenum mode GLint i1 GLint i2 void glEvalMesh2 GLenum mode GLint i1 GLint i2 GLint j1 GLint j2 void glEvalPoint1 GLint i void glEvalPoint2 GLint i GLint j void glEvaluateDepthValuesARB void glExecuteProgramNV GLenum target GLuint id const GLfloat *params void glExtGetBufferPointervQCOM GLenum target void **params void glExtGetBuffersQCOM GLuint *buffers GLint maxBuffers GLint *numBuffers void glExtGetFramebuffersQCOM GLuint *framebuffers GLint maxFramebuffers GLint *numFramebuffers void glExtGetProgramBinarySourceQCOM GLuint program GLenum shadertype GLchar *source GLint *length void glExtGetProgramsQCOM GLuint *programs GLint maxPrograms GLint *numPrograms void glExtGetRenderbuffersQCOM GLuint *renderbuffers GLint maxRenderbuffers GLint *numRenderbuffers void glExtGetShadersQCOM GLuint *shaders GLint maxShaders GLint *numShaders void glExtGetTexLevelParameterivQCOM GLuint texture GLenum face GLint level GLenum pname GLint *params void glExtGetTexSubImageQCOM GLenum target GLint level GLint xoffset GLint yoffset GLint zoffset GLsizei width GLsizei height GLsizei depth GLenum format GLenum type void *texels void glExtGetTexturesQCOM GLuint *textures GLint maxTextures GLint *numTextures GLboolean glExtIsProgramBinaryQCOM GLuint program void glExtTexObjectStateOverrideiQCOM GLenum target GLenum pname GLint param void glExtractComponentEXT GLuint res GLuint src GLuint num void glFeedbackBuffer GLsizei size GLenum type GLfloat *buffer void glFeedbackBufferxOES GLsizei n GLenum type const GLfixed *buffer GLsync glFenceSync GLenum condition GLbitfield flags GLsync glFenceSyncAPPLE GLenum condition GLbitfield flags void glFinalCombinerInputNV GLenum variable GLenum input GLenum mapping GLenum componentUsage void glFinish GLint glFinishAsyncSGIX GLuint *markerp void glFinishFenceAPPLE GLuint fence void glFinishFenceNV GLuint fence void glFinishObjectAPPLE GLenum object GLint name void glFinishTextureSUNX void glFlush void glFlushMappedBufferRange GLenum target GLintptr offset GLsizeiptr length void glFlushMappedBufferRangeAPPLE GLenum target GLintptr offset GLsizeiptr size void glFlushMappedBufferRangeEXT GLenum target GLintptr offset GLsizeiptr length void glFlushMappedNamedBufferRange GLuint buffer GLintptr offset GLsizeiptr length void glFlushMappedNamedBufferRangeEXT GLuint buffer GLintptr offset GLsizeiptr length void glFlushPixelDataRangeNV GLenum target void glFlushRasterSGIX void glFlushStaticDataIBM GLenum target void glFlushVertexArrayRangeAPPLE GLsizei length void *pointer void glFlushVertexArrayRangeNV void glFogCoordFormatNV GLenum type GLsizei stride void glFogCoordPointer GLenum type GLsizei stride const void *pointer void glFogCoordPointerEXT GLenum type GLsizei stride const void *pointer void glFogCoordPointerListIBM GLenum type GLint stride const void **pointer GLint ptrstride void glFogCoordd GLdouble coord void glFogCoorddEXT GLdouble coord void glFogCoorddv const GLdouble *coord void glFogCoorddvEXT const GLdouble *coord void glFogCoordf GLfloat coord void glFogCoordfEXT GLfloat coord void glFogCoordfv const GLfloat *coord void glFogCoordfvEXT const GLfloat *coord void glFogCoordhNV GLhalfNV fog void glFogCoordhvNV const GLhalfNV *fog void glFogFuncSGIS GLsizei n const GLfloat *points void glFogf GLenum pname GLfloat param void glFogfv GLenum pname const GLfloat *params void glFogi GLenum pname GLint param void glFogiv GLenum pname const GLint *params void glFogx GLenum pname GLfixed param void glFogxOES GLenum pname GLfixed param void glFogxv GLenum pname const GLfixed *param void glFogxvOES GLenum pname const GLfixed *param void glFragmentColorMaterialSGIX GLenum face GLenum mode void glFragmentCoverageColorNV GLuint color void glFragmentLightModelfSGIX GLenum pname GLfloat param void glFragmentLightModelfvSGIX GLenum pname const GLfloat *params void glFragmentLightModeliSGIX GLenum pname GLint param void glFragmentLightModelivSGIX GLenum pname const GLint *params void glFragmentLightfSGIX GLenum light GLenum pname GLfloat param void glFragmentLightfvSGIX GLenum light GLenum pname const GLfloat *params void glFragmentLightiSGIX GLenum light GLenum pname GLint param void glFragmentLightivSGIX GLenum light GLenum pname const GLint *params void glFragmentMaterialfSGIX GLenum face GLenum pname GLfloat param void glFragmentMaterialfvSGIX GLenum face GLenum pname const GLfloat *params void glFragmentMaterialiSGIX GLenum face GLenum pname GLint param void glFragmentMaterialivSGIX GLenum face GLenum pname const GLint *params void glFrameTerminatorGREMEDY void glFrameZoomSGIX GLint factor void glFramebufferDrawBufferEXT GLuint framebuffer GLenum mode void glFramebufferDrawBuffersEXT GLuint framebuffer GLsizei n const GLenum *bufs void glFramebufferFetchBarrierEXT void glFramebufferFetchBarrierQCOM void glFramebufferFoveationConfigQCOM GLuint framebuffer GLuint numLayers GLuint focalPointsPerLayer GLuint requestedFeatures GLuint *providedFeatures void glFramebufferFoveationParametersQCOM GLuint framebuffer GLuint layer GLuint focalPoint GLfloat focalX GLfloat focalY GLfloat gainX GLfloat gainY GLfloat foveaArea void glFramebufferParameteri GLenum target GLenum pname GLint param void glFramebufferPixelLocalStorageSizeEXT GLuint target GLsizei size void glFramebufferReadBufferEXT GLuint framebuffer GLenum mode void glFramebufferRenderbuffer GLenum target GLenum attachment GLenum renderbuffertarget GLuint renderbuffer void glFramebufferRenderbufferEXT GLenum target GLenum attachment GLenum renderbuffertarget GLuint renderbuffer void glFramebufferRenderbufferOES GLenum target GLenum attachment GLenum renderbuffertarget GLuint renderbuffer void glFramebufferSampleLocationsfvARB GLenum target GLuint start GLsizei count const GLfloat *v void glFramebufferSampleLocationsfvNV GLenum target GLuint start GLsizei count const GLfloat *v void glFramebufferSamplePositionsfvAMD GLenum target GLuint numsamples GLuint pixelindex const GLfloat *values void glFramebufferShadingRateEXT GLenum target GLenum attachment GLuint texture GLint baseLayer GLsizei numLayers GLsizei texelWidth GLsizei texelHeight void glFramebufferTexture GLenum target GLenum attachment GLuint texture GLint level void glFramebufferTexture1D GLenum target GLenum attachment GLenum textarget GLuint texture GLint level void glFramebufferTexture1DEXT GLenum target GLenum attachment GLenum textarget GLuint texture GLint level void glFramebufferTexture2D GLenum target GLenum attachment GLenum textarget GLuint texture GLint level void glFramebufferTexture2DEXT GLenum target GLenum attachment GLenum textarget GLuint texture GLint level void glFramebufferTexture2DDownsampleIMG GLenum target GLenum attachment GLenum textarget GLuint texture GLint level GLint xscale GLint yscale void glFramebufferTexture2DMultisampleEXT GLenum target GLenum attachment GLenum textarget GLuint texture GLint level GLsizei samples void glFramebufferTexture2DMultisampleIMG GLenum target GLenum attachment GLenum textarget GLuint texture GLint level GLsizei samples void glFramebufferTexture2DOES GLenum target GLenum attachment GLenum textarget GLuint texture GLint level void glFramebufferTexture3D GLenum target GLenum attachment GLenum textarget GLuint texture GLint level GLint zoffset void glFramebufferTexture3DEXT GLenum target GLenum attachment GLenum textarget GLuint texture GLint level GLint zoffset void glFramebufferTexture3DOES GLenum target GLenum attachment GLenum textarget GLuint texture GLint level GLint zoffset void glFramebufferTextureARB GLenum target GLenum attachment GLuint texture GLint level void glFramebufferTextureEXT GLenum target GLenum attachment GLuint texture GLint level void glFramebufferTextureFaceARB GLenum target GLenum attachment GLuint texture GLint level GLenum face void glFramebufferTextureFaceEXT GLenum target GLenum attachment GLuint texture GLint level GLenum face void glFramebufferTextureLayer GLenum target GLenum attachment GLuint texture GLint level GLint layer void glFramebufferTextureLayerARB GLenum target GLenum attachment GLuint texture GLint level GLint layer void glFramebufferTextureLayerEXT GLenum target GLenum attachment GLuint texture GLint level GLint layer void glFramebufferTextureLayerDownsampleIMG GLenum target GLenum attachment GLuint texture GLint level GLint layer GLint xscale GLint yscale void glFramebufferTextureMultisampleMultiviewOVR GLenum target GLenum attachment GLuint texture GLint level GLsizei samples GLint baseViewIndex GLsizei numViews void glFramebufferTextureMultiviewOVR GLenum target GLenum attachment GLuint texture GLint level GLint baseViewIndex GLsizei numViews void glFramebufferTextureOES GLenum target GLenum attachment GLuint texture GLint level void glFreeObjectBufferATI GLuint buffer void glFrontFace GLenum mode void glFrustum GLdouble left GLdouble right GLdouble bottom GLdouble top GLdouble zNear GLdouble zFar void glFrustumf GLfloat l GLfloat r GLfloat b GLfloat t GLfloat n GLfloat f void glFrustumfOES GLfloat l GLfloat r GLfloat b GLfloat t GLfloat n GLfloat f void glFrustumx GLfixed l GLfixed r GLfixed b GLfixed t GLfixed n GLfixed f void glFrustumxOES GLfixed l GLfixed r GLfixed b GLfixed t GLfixed n GLfixed f GLuint glGenAsyncMarkersSGIX GLsizei range void glGenBuffers GLsizei n GLuint *buffers void glGenBuffersARB GLsizei n GLuint *buffers void glGenFencesAPPLE GLsizei n GLuint *fences void glGenFencesNV GLsizei n GLuint *fences GLuint glGenFragmentShadersATI GLuint range void glGenFramebuffers GLsizei n GLuint *framebuffers void glGenFramebuffersEXT GLsizei n GLuint *framebuffers void glGenFramebuffersOES GLsizei n GLuint *framebuffers GLuint glGenLists GLsizei range void glGenNamesAMD GLenum identifier GLuint num GLuint *names void glGenOcclusionQueriesNV GLsizei n GLuint *ids GLuint glGenPathsNV GLsizei range void glGenPerfMonitorsAMD GLsizei n GLuint *monitors void glGenProgramPipelines GLsizei n GLuint *pipelines void glGenProgramPipelinesEXT GLsizei n GLuint *pipelines void glGenProgramsARB GLsizei n GLuint *programs void glGenProgramsNV GLsizei n GLuint *programs void glGenQueries GLsizei n GLuint *ids void glGenQueriesARB GLsizei n GLuint *ids void glGenQueriesEXT GLsizei n GLuint *ids void glGenQueryResourceTagNV GLsizei n GLint *tagIds void glGenRenderbuffers GLsizei n GLuint *renderbuffers void glGenRenderbuffersEXT GLsizei n GLuint *renderbuffers void glGenRenderbuffersOES GLsizei n GLuint *renderbuffers void glGenSamplers GLsizei count GLuint *samplers void glGenSemaphoresEXT GLsizei n GLuint *semaphores GLuint glGenSymbolsEXT GLenum datatype GLenum storagetype GLenum range GLuint components void glGenTextures GLsizei n GLuint *textures void glGenTexturesEXT GLsizei n GLuint *textures void glGenTransformFeedbacks GLsizei n GLuint *ids void glGenTransformFeedbacksNV GLsizei n GLuint *ids void glGenVertexArrays GLsizei n GLuint *arrays void glGenVertexArraysAPPLE GLsizei n GLuint *arrays void glGenVertexArraysOES GLsizei n GLuint *arrays GLuint glGenVertexShadersEXT GLuint range void glGenerateMipmap GLenum target void glGenerateMipmapEXT GLenum target void glGenerateMipmapOES GLenum target void glGenerateMultiTexMipmapEXT GLenum texunit GLenum target void glGenerateTextureMipmap GLuint texture void glGenerateTextureMipmapEXT GLuint texture GLenum target void glGetActiveAtomicCounterBufferiv GLuint program GLuint bufferIndex GLenum pname GLint *params void glGetActiveAttrib GLuint program GLuint index GLsizei bufSize GLsizei *length GLint *size GLenum *type GLchar *name void glGetActiveAttribARB GLhandleARB programObj GLuint index GLsizei maxLength GLsizei *length GLint *size GLenum *type GLcharARB *name void glGetActiveSubroutineName GLuint program GLenum shadertype GLuint index GLsizei bufSize GLsizei *length GLchar *name void glGetActiveSubroutineUniformName GLuint program GLenum shadertype GLuint index GLsizei bufSize GLsizei *length GLchar *name void glGetActiveSubroutineUniformiv GLuint program GLenum shadertype GLuint index GLenum pname GLint *values void glGetActiveUniform GLuint program GLuint index GLsizei bufSize GLsizei *length GLint *size GLenum *type GLchar *name void glGetActiveUniformARB GLhandleARB programObj GLuint index GLsizei maxLength GLsizei *length GLint *size GLenum *type GLcharARB *name void glGetActiveUniformBlockName GLuint program GLuint uniformBlockIndex GLsizei bufSize GLsizei *length GLchar *uniformBlockName void glGetActiveUniformBlockiv GLuint program GLuint uniformBlockIndex GLenum pname GLint *params void glGetActiveUniformName GLuint program GLuint uniformIndex GLsizei bufSize GLsizei *length GLchar *uniformName void glGetActiveUniformsiv GLuint program GLsizei uniformCount const GLuint *uniformIndices GLenum pname GLint *params void glGetActiveVaryingNV GLuint program GLuint index GLsizei bufSize GLsizei *length GLsizei *size GLenum *type GLchar *name void glGetArrayObjectfvATI GLenum array GLenum pname GLfloat *params void glGetArrayObjectivATI GLenum array GLenum pname GLint *params void glGetAttachedObjectsARB GLhandleARB containerObj GLsizei maxCount GLsizei *count GLhandleARB *obj void glGetAttachedShaders GLuint program GLsizei maxCount GLsizei *count GLuint *shaders GLint glGetAttribLocation GLuint program const GLchar *name GLint glGetAttribLocationARB GLhandleARB programObj const GLcharARB *name void glGetBooleanIndexedvEXT GLenum target GLuint index GLboolean *data void glGetBooleani_v GLenum target GLuint index GLboolean *data void glGetBooleanv GLenum pname GLboolean *data void glGetBufferParameteri64v GLenum target GLenum pname GLint64 *params void glGetBufferParameteriv GLenum target GLenum pname GLint *params void glGetBufferParameterivARB GLenum target GLenum pname GLint *params void glGetBufferParameterui64vNV GLenum target GLenum pname GLuint64EXT *params void glGetBufferPointerv GLenum target GLenum pname void **params void glGetBufferPointervARB GLenum target GLenum pname void **params void glGetBufferPointervOES GLenum target GLenum pname void **params void glGetBufferSubData GLenum target GLintptr offset GLsizeiptr size void *data void glGetBufferSubDataARB GLenum target GLintptrARB offset GLsizeiptrARB size void *data void glGetClipPlane GLenum plane GLdouble *equation void glGetClipPlanef GLenum plane GLfloat *equation void glGetClipPlanefOES GLenum plane GLfloat *equation void glGetClipPlanex GLenum plane GLfixed *equation void glGetClipPlanexOES GLenum plane GLfixed *equation void glGetColorTable GLenum target GLenum format GLenum type void *table void glGetColorTableEXT GLenum target GLenum format GLenum type void *data void glGetColorTableParameterfv GLenum target GLenum pname GLfloat *params void glGetColorTableParameterfvEXT GLenum target GLenum pname GLfloat *params void glGetColorTableParameterfvSGI GLenum target GLenum pname GLfloat *params void glGetColorTableParameteriv GLenum target GLenum pname GLint *params void glGetColorTableParameterivEXT GLenum target GLenum pname GLint *params void glGetColorTableParameterivSGI GLenum target GLenum pname GLint *params void glGetColorTableSGI GLenum target GLenum format GLenum type void *table void glGetCombinerInputParameterfvNV GLenum stage GLenum portion GLenum variable GLenum pname GLfloat *params void glGetCombinerInputParameterivNV GLenum stage GLenum portion GLenum variable GLenum pname GLint *params void glGetCombinerOutputParameterfvNV GLenum stage GLenum portion GLenum pname GLfloat *params void glGetCombinerOutputParameterivNV GLenum stage GLenum portion GLenum pname GLint *params void glGetCombinerStageParameterfvNV GLenum stage GLenum pname GLfloat *params GLuint glGetCommandHeaderNV GLenum tokenID GLuint size void glGetCompressedMultiTexImageEXT GLenum texunit GLenum target GLint lod void *img void glGetCompressedTexImage GLenum target GLint level void *img void glGetCompressedTexImageARB GLenum target GLint level void *img void glGetCompressedTextureImage GLuint texture GLint level GLsizei bufSize void *pixels void glGetCompressedTextureImageEXT GLuint texture GLenum target GLint lod void *img void glGetCompressedTextureSubImage GLuint texture GLint level GLint xoffset GLint yoffset GLint zoffset GLsizei width GLsizei height GLsizei depth GLsizei bufSize void *pixels void glGetConvolutionFilter GLenum target GLenum format GLenum type void *image void glGetConvolutionFilterEXT GLenum target GLenum format GLenum type void *image void glGetConvolutionParameterfv GLenum target GLenum pname GLfloat *params void glGetConvolutionParameterfvEXT GLenum target GLenum pname GLfloat *params void glGetConvolutionParameteriv GLenum target GLenum pname GLint *params void glGetConvolutionParameterivEXT GLenum target GLenum pname GLint *params void glGetConvolutionParameterxvOES GLenum target GLenum pname GLfixed *params void glGetCoverageModulationTableNV GLsizei bufSize GLfloat *v GLuint glGetDebugMessageLog GLuint count GLsizei bufSize GLenum *sources GLenum *types GLuint *ids GLenum *severities GLsizei *lengths GLchar *messageLog GLuint glGetDebugMessageLogAMD GLuint count GLsizei bufSize GLenum *categories GLenum *severities GLuint *ids GLsizei *lengths GLchar *message GLuint glGetDebugMessageLogARB GLuint count GLsizei bufSize GLenum *sources GLenum *types GLuint *ids GLenum *severities GLsizei *lengths GLchar *messageLog GLuint glGetDebugMessageLogKHR GLuint count GLsizei bufSize GLenum *sources GLenum *types GLuint *ids GLenum *severities GLsizei *lengths GLchar *messageLog void glGetDetailTexFuncSGIS GLenum target GLfloat *points void glGetDoubleIndexedvEXT GLenum target GLuint index GLdouble *data void glGetDoublei_v GLenum target GLuint index GLdouble *data void glGetDoublei_vEXT GLenum pname GLuint index GLdouble *params void glGetDoublev GLenum pname GLdouble *data void glGetDriverControlStringQCOM GLuint driverControl GLsizei bufSize GLsizei *length GLchar *driverControlString void glGetDriverControlsQCOM GLint *num GLsizei size GLuint *driverControls GLenum glGetError void glGetFenceivNV GLuint fence GLenum pname GLint *params void glGetFinalCombinerInputParameterfvNV GLenum variable GLenum pname GLfloat *params void glGetFinalCombinerInputParameterivNV GLenum variable GLenum pname GLint *params void glGetFirstPerfQueryIdINTEL GLuint *queryId void glGetFixedv GLenum pname GLfixed *params void glGetFixedvOES GLenum pname GLfixed *params void glGetFloatIndexedvEXT GLenum target GLuint index GLfloat *data void glGetFloati_v GLenum target GLuint index GLfloat *data void glGetFloati_vEXT GLenum pname GLuint index GLfloat *params void glGetFloati_vNV GLenum target GLuint index GLfloat *data void glGetFloati_vOES GLenum target GLuint index GLfloat *data void glGetFloatv GLenum pname GLfloat *data void glGetFogFuncSGIS GLfloat *points GLint glGetFragDataIndex GLuint program const GLchar *name GLint glGetFragDataIndexEXT GLuint program const GLchar *name GLint glGetFragDataLocation GLuint program const GLchar *name GLint glGetFragDataLocationEXT GLuint program const GLchar *name void glGetFragmentLightfvSGIX GLenum light GLenum pname GLfloat *params void glGetFragmentLightivSGIX GLenum light GLenum pname GLint *params void glGetFragmentMaterialfvSGIX GLenum face GLenum pname GLfloat *params void glGetFragmentMaterialivSGIX GLenum face GLenum pname GLint *params void glGetFragmentShadingRatesEXT GLsizei samples GLsizei maxCount GLsizei *count GLenum *shadingRates void glGetFramebufferAttachmentParameteriv GLenum target GLenum attachment GLenum pname GLint *params void glGetFramebufferAttachmentParameterivEXT GLenum target GLenum attachment GLenum pname GLint *params void glGetFramebufferAttachmentParameterivOES GLenum target GLenum attachment GLenum pname GLint *params void glGetFramebufferParameterfvAMD GLenum target GLenum pname GLuint numsamples GLuint pixelindex GLsizei size GLfloat *values void glGetFramebufferParameteriv GLenum target GLenum pname GLint *params void glGetFramebufferParameterivEXT GLuint framebuffer GLenum pname GLint *params GLsizei glGetFramebufferPixelLocalStorageSizeEXT GLuint target GLenum glGetGraphicsResetStatus GLenum glGetGraphicsResetStatusARB GLenum glGetGraphicsResetStatusEXT GLenum glGetGraphicsResetStatusKHR GLhandleARB glGetHandleARB GLenum pname void glGetHistogram GLenum target GLboolean reset GLenum format GLenum type void *values void glGetHistogramEXT GLenum target GLboolean reset GLenum format GLenum type void *values void glGetHistogramParameterfv GLenum target GLenum pname GLfloat *params void glGetHistogramParameterfvEXT GLenum target GLenum pname GLfloat *params void glGetHistogramParameteriv GLenum target GLenum pname GLint *params void glGetHistogramParameterivEXT GLenum target GLenum pname GLint *params void glGetHistogramParameterxvOES GLenum target GLenum pname GLfixed *params GLuint64 glGetImageHandleARB GLuint texture GLint level GLboolean layered GLint layer GLenum format GLuint64 glGetImageHandleNV GLuint texture GLint level GLboolean layered GLint layer GLenum format void glGetImageTransformParameterfvHP GLenum target GLenum pname GLfloat *params void glGetImageTransformParameterivHP GLenum target GLenum pname GLint *params void glGetInfoLogARB GLhandleARB obj GLsizei maxLength GLsizei *length GLcharARB *infoLog GLint glGetInstrumentsSGIX void glGetInteger64i_v GLenum target GLuint index GLint64 *data void glGetInteger64v GLenum pname GLint64 *data void glGetInteger64vAPPLE GLenum pname GLint64 *params void glGetInteger64vEXT GLenum pname GLint64 *data void glGetIntegerIndexedvEXT GLenum target GLuint index GLint *data void glGetIntegeri_v GLenum target GLuint index GLint *data void glGetIntegeri_vEXT GLenum target GLuint index GLint *data void glGetIntegerui64i_vNV GLenum value GLuint index GLuint64EXT *result void glGetIntegerui64vNV GLenum value GLuint64EXT *result void glGetIntegerv GLenum pname GLint *data void glGetInternalformatSampleivNV GLenum target GLenum internalformat GLsizei samples GLenum pname GLsizei count GLint *params void glGetInternalformati64v GLenum target GLenum internalformat GLenum pname GLsizei count GLint64 *params void glGetInternalformativ GLenum target GLenum internalformat GLenum pname GLsizei count GLint *params void glGetInvariantBooleanvEXT GLuint id GLenum value GLboolean *data void glGetInvariantFloatvEXT GLuint id GLenum value GLfloat *data void glGetInvariantIntegervEXT GLuint id GLenum value GLint *data void glGetLightfv GLenum light GLenum pname GLfloat *params void glGetLightiv GLenum light GLenum pname GLint *params void glGetLightxOES GLenum light GLenum pname GLfixed *params void glGetLightxv GLenum light GLenum pname GLfixed *params void glGetLightxvOES GLenum light GLenum pname GLfixed *params void glGetListParameterfvSGIX GLuint list GLenum pname GLfloat *params void glGetListParameterivSGIX GLuint list GLenum pname GLint *params void glGetLocalConstantBooleanvEXT GLuint id GLenum value GLboolean *data void glGetLocalConstantFloatvEXT GLuint id GLenum value GLfloat *data void glGetLocalConstantIntegervEXT GLuint id GLenum value GLint *data void glGetMapAttribParameterfvNV GLenum target GLuint index GLenum pname GLfloat *params void glGetMapAttribParameterivNV GLenum target GLuint index GLenum pname GLint *params void glGetMapControlPointsNV GLenum target GLuint index GLenum type GLsizei ustride GLsizei vstride GLboolean packed void *points void glGetMapParameterfvNV GLenum target GLenum pname GLfloat *params void glGetMapParameterivNV GLenum target GLenum pname GLint *params void glGetMapdv GLenum target GLenum query GLdouble *v void glGetMapfv GLenum target GLenum query GLfloat *v void glGetMapiv GLenum target GLenum query GLint *v void glGetMapxvOES GLenum target GLenum query GLfixed *v void glGetMaterialfv GLenum face GLenum pname GLfloat *params void glGetMaterialiv GLenum face GLenum pname GLint *params void glGetMaterialxOES GLenum face GLenum pname GLfixed param void glGetMaterialxv GLenum face GLenum pname GLfixed *params void glGetMaterialxvOES GLenum face GLenum pname GLfixed *params void glGetMemoryObjectDetachedResourcesuivNV GLuint memory GLenum pname GLint first GLsizei count GLuint *params void glGetMemoryObjectParameterivEXT GLuint memoryObject GLenum pname GLint *params void glGetMinmax GLenum target GLboolean reset GLenum format GLenum type void *values void glGetMinmaxEXT GLenum target GLboolean reset GLenum format GLenum type void *values void glGetMinmaxParameterfv GLenum target GLenum pname GLfloat *params void glGetMinmaxParameterfvEXT GLenum target GLenum pname GLfloat *params void glGetMinmaxParameteriv GLenum target GLenum pname GLint *params void glGetMinmaxParameterivEXT GLenum target GLenum pname GLint *params void glGetMultiTexEnvfvEXT GLenum texunit GLenum target GLenum pname GLfloat *params void glGetMultiTexEnvivEXT GLenum texunit GLenum target GLenum pname GLint *params void glGetMultiTexGendvEXT GLenum texunit GLenum coord GLenum pname GLdouble *params void glGetMultiTexGenfvEXT GLenum texunit GLenum coord GLenum pname GLfloat *params void glGetMultiTexGenivEXT GLenum texunit GLenum coord GLenum pname GLint *params void glGetMultiTexImageEXT GLenum texunit GLenum target GLint level GLenum format GLenum type void *pixels void glGetMultiTexLevelParameterfvEXT GLenum texunit GLenum target GLint level GLenum pname GLfloat *params void glGetMultiTexLevelParameterivEXT GLenum texunit GLenum target GLint level GLenum pname GLint *params void glGetMultiTexParameterIivEXT GLenum texunit GLenum target GLenum pname GLint *params void glGetMultiTexParameterIuivEXT GLenum texunit GLenum target GLenum pname GLuint *params void glGetMultiTexParameterfvEXT GLenum texunit GLenum target GLenum pname GLfloat *params void glGetMultiTexParameterivEXT GLenum texunit GLenum target GLenum pname GLint *params void glGetMultisamplefv GLenum pname GLuint index GLfloat *val void glGetMultisamplefvNV GLenum pname GLuint index GLfloat *val void glGetNamedBufferParameteri64v GLuint buffer GLenum pname GLint64 *params void glGetNamedBufferParameteriv GLuint buffer GLenum pname GLint *params void glGetNamedBufferParameterivEXT GLuint buffer GLenum pname GLint *params void glGetNamedBufferParameterui64vNV GLuint buffer GLenum pname GLuint64EXT *params void glGetNamedBufferPointerv GLuint buffer GLenum pname void **params void glGetNamedBufferPointervEXT GLuint buffer GLenum pname void **params void glGetNamedBufferSubData GLuint buffer GLintptr offset GLsizeiptr size void *data void glGetNamedBufferSubDataEXT GLuint buffer GLintptr offset GLsizeiptr size void *data void glGetNamedFramebufferParameterfvAMD GLuint framebuffer GLenum pname GLuint numsamples GLuint pixelindex GLsizei size GLfloat *values void glGetNamedFramebufferAttachmentParameteriv GLuint framebuffer GLenum attachment GLenum pname GLint *params void glGetNamedFramebufferAttachmentParameterivEXT GLuint framebuffer GLenum attachment GLenum pname GLint *params void glGetNamedFramebufferParameteriv GLuint framebuffer GLenum pname GLint *param void glGetNamedFramebufferParameterivEXT GLuint framebuffer GLenum pname GLint *params void glGetNamedProgramLocalParameterIivEXT GLuint program GLenum target GLuint index GLint *params void glGetNamedProgramLocalParameterIuivEXT GLuint program GLenum target GLuint index GLuint *params void glGetNamedProgramLocalParameterdvEXT GLuint program GLenum target GLuint index GLdouble *params void glGetNamedProgramLocalParameterfvEXT GLuint program GLenum target GLuint index GLfloat *params void glGetNamedProgramStringEXT GLuint program GLenum target GLenum pname void *string void glGetNamedProgramivEXT GLuint program GLenum target GLenum pname GLint *params void glGetNamedRenderbufferParameteriv GLuint renderbuffer GLenum pname GLint *params void glGetNamedRenderbufferParameterivEXT GLuint renderbuffer GLenum pname GLint *params void glGetNamedStringARB GLint namelen const GLchar *name GLsizei bufSize GLint *stringlen GLchar *string void glGetNamedStringivARB GLint namelen const GLchar *name GLenum pname GLint *params void glGetNextPerfQueryIdINTEL GLuint queryId GLuint *nextQueryId void glGetObjectBufferfvATI GLuint buffer GLenum pname GLfloat *params void glGetObjectBufferivATI GLuint buffer GLenum pname GLint *params void glGetObjectLabel GLenum identifier GLuint name GLsizei bufSize GLsizei *length GLchar *label void glGetObjectLabelEXT GLenum type GLuint object GLsizei bufSize GLsizei *length GLchar *label void glGetObjectLabelKHR GLenum identifier GLuint name GLsizei bufSize GLsizei *length GLchar *label void glGetObjectParameterfvARB GLhandleARB obj GLenum pname GLfloat *params void glGetObjectParameterivAPPLE GLenum objectType GLuint name GLenum pname GLint *params void glGetObjectParameterivARB GLhandleARB obj GLenum pname GLint *params void glGetObjectPtrLabel const void *ptr GLsizei bufSize GLsizei *length GLchar *label void glGetObjectPtrLabelKHR const void *ptr GLsizei bufSize GLsizei *length GLchar *label void glGetOcclusionQueryivNV GLuint id GLenum pname GLint *params void glGetOcclusionQueryuivNV GLuint id GLenum pname GLuint *params void glGetPathColorGenfvNV GLenum color GLenum pname GLfloat *value void glGetPathColorGenivNV GLenum color GLenum pname GLint *value void glGetPathCommandsNV GLuint path GLubyte *commands void glGetPathCoordsNV GLuint path GLfloat *coords void glGetPathDashArrayNV GLuint path GLfloat *dashArray GLfloat glGetPathLengthNV GLuint path GLsizei startSegment GLsizei numSegments void glGetPathMetricRangeNV GLbitfield metricQueryMask GLuint firstPathName GLsizei numPaths GLsizei stride GLfloat *metrics void glGetPathMetricsNV GLbitfield metricQueryMask GLsizei numPaths GLenum pathNameType const void *paths GLuint pathBase GLsizei stride GLfloat *metrics void glGetPathParameterfvNV GLuint path GLenum pname GLfloat *value void glGetPathParameterivNV GLuint path GLenum pname GLint *value void glGetPathSpacingNV GLenum pathListMode GLsizei numPaths GLenum pathNameType const void *paths GLuint pathBase GLfloat advanceScale GLfloat kerningScale GLenum transformType GLfloat *returnedSpacing void glGetPathTexGenfvNV GLenum texCoordSet GLenum pname GLfloat *value void glGetPathTexGenivNV GLenum texCoordSet GLenum pname GLint *value void glGetPerfCounterInfoINTEL GLuint queryId GLuint counterId GLuint counterNameLength GLchar *counterName GLuint counterDescLength GLchar *counterDesc GLuint *counterOffset GLuint *counterDataSize GLuint *counterTypeEnum GLuint *counterDataTypeEnum GLuint64 *rawCounterMaxValue void glGetPerfMonitorCounterDataAMD GLuint monitor GLenum pname GLsizei dataSize GLuint *data GLint *bytesWritten void glGetPerfMonitorCounterInfoAMD GLuint group GLuint counter GLenum pname void *data void glGetPerfMonitorCounterStringAMD GLuint group GLuint counter GLsizei bufSize GLsizei *length GLchar *counterString void glGetPerfMonitorCountersAMD GLuint group GLint *numCounters GLint *maxActiveCounters GLsizei counterSize GLuint *counters void glGetPerfMonitorGroupStringAMD GLuint group GLsizei bufSize GLsizei *length GLchar *groupString void glGetPerfMonitorGroupsAMD GLint *numGroups GLsizei groupsSize GLuint *groups void glGetPerfQueryDataINTEL GLuint queryHandle GLuint flags GLsizei dataSize void *data GLuint *bytesWritten void glGetPerfQueryIdByNameINTEL GLchar *queryName GLuint *queryId void glGetPerfQueryInfoINTEL GLuint queryId GLuint queryNameLength GLchar *queryName GLuint *dataSize GLuint *noCounters GLuint *noInstances GLuint *capsMask void glGetPixelMapfv GLenum map GLfloat *values void glGetPixelMapuiv GLenum map GLuint *values void glGetPixelMapusv GLenum map GLushort *values void glGetPixelMapxv GLenum map GLint size GLfixed *values void glGetPixelTexGenParameterfvSGIS GLenum pname GLfloat *params void glGetPixelTexGenParameterivSGIS GLenum pname GLint *params void glGetPixelTransformParameterfvEXT GLenum target GLenum pname GLfloat *params void glGetPixelTransformParameterivEXT GLenum target GLenum pname GLint *params void glGetPointerIndexedvEXT GLenum target GLuint index void **data void glGetPointeri_vEXT GLenum pname GLuint index void **params void glGetPointerv GLenum pname void **params void glGetPointervEXT GLenum pname void **params void glGetPointervKHR GLenum pname void **params void glGetPolygonStipple GLubyte *mask void glGetProgramBinary GLuint program GLsizei bufSize GLsizei *length GLenum *binaryFormat void *binary void glGetProgramBinaryOES GLuint program GLsizei bufSize GLsizei *length GLenum *binaryFormat void *binary void glGetProgramEnvParameterIivNV GLenum target GLuint index GLint *params void glGetProgramEnvParameterIuivNV GLenum target GLuint index GLuint *params void glGetProgramEnvParameterdvARB GLenum target GLuint index GLdouble *params void glGetProgramEnvParameterfvARB GLenum target GLuint index GLfloat *params void glGetProgramInfoLog GLuint program GLsizei bufSize GLsizei *length GLchar *infoLog void glGetProgramInterfaceiv GLuint program GLenum programInterface GLenum pname GLint *params void glGetProgramLocalParameterIivNV GLenum target GLuint index GLint *params void glGetProgramLocalParameterIuivNV GLenum target GLuint index GLuint *params void glGetProgramLocalParameterdvARB GLenum target GLuint index GLdouble *params void glGetProgramLocalParameterfvARB GLenum target GLuint index GLfloat *params void glGetProgramNamedParameterdvNV GLuint id GLsizei len const GLubyte *name GLdouble *params void glGetProgramNamedParameterfvNV GLuint id GLsizei len const GLubyte *name GLfloat *params void glGetProgramParameterdvNV GLenum target GLuint index GLenum pname GLdouble *params void glGetProgramParameterfvNV GLenum target GLuint index GLenum pname GLfloat *params void glGetProgramPipelineInfoLog GLuint pipeline GLsizei bufSize GLsizei *length GLchar *infoLog void glGetProgramPipelineInfoLogEXT GLuint pipeline GLsizei bufSize GLsizei *length GLchar *infoLog void glGetProgramPipelineiv GLuint pipeline GLenum pname GLint *params void glGetProgramPipelineivEXT GLuint pipeline GLenum pname GLint *params GLuint glGetProgramResourceIndex GLuint program GLenum programInterface const GLchar *name GLint glGetProgramResourceLocation GLuint program GLenum programInterface const GLchar *name GLint glGetProgramResourceLocationIndex GLuint program GLenum programInterface const GLchar *name GLint glGetProgramResourceLocationIndexEXT GLuint program GLenum programInterface const GLchar *name void glGetProgramResourceName GLuint program GLenum programInterface GLuint index GLsizei bufSize GLsizei *length GLchar *name void glGetProgramResourcefvNV GLuint program GLenum programInterface GLuint index GLsizei propCount const GLenum *props GLsizei count GLsizei *length GLfloat *params void glGetProgramResourceiv GLuint program GLenum programInterface GLuint index GLsizei propCount const GLenum *props GLsizei count GLsizei *length GLint *params void glGetProgramStageiv GLuint program GLenum shadertype GLenum pname GLint *values void glGetProgramStringARB GLenum target GLenum pname void *string void glGetProgramStringNV GLuint id GLenum pname GLubyte *program void glGetProgramSubroutineParameteruivNV GLenum target GLuint index GLuint *param void glGetProgramiv GLuint program GLenum pname GLint *params void glGetProgramivARB GLenum target GLenum pname GLint *params void glGetProgramivNV GLuint id GLenum pname GLint *params void glGetQueryBufferObjecti64v GLuint id GLuint buffer GLenum pname GLintptr offset void glGetQueryBufferObjectiv GLuint id GLuint buffer GLenum pname GLintptr offset void glGetQueryBufferObjectui64v GLuint id GLuint buffer GLenum pname GLintptr offset void glGetQueryBufferObjectuiv GLuint id GLuint buffer GLenum pname GLintptr offset void glGetQueryIndexediv GLenum target GLuint index GLenum pname GLint *params void glGetQueryObjecti64v GLuint id GLenum pname GLint64 *params void glGetQueryObjecti64vEXT GLuint id GLenum pname GLint64 *params void glGetQueryObjectiv GLuint id GLenum pname GLint *params void glGetQueryObjectivARB GLuint id GLenum pname GLint *params void glGetQueryObjectivEXT GLuint id GLenum pname GLint *params void glGetQueryObjectui64v GLuint id GLenum pname GLuint64 *params void glGetQueryObjectui64vEXT GLuint id GLenum pname GLuint64 *params void glGetQueryObjectuiv GLuint id GLenum pname GLuint *params void glGetQueryObjectuivARB GLuint id GLenum pname GLuint *params void glGetQueryObjectuivEXT GLuint id GLenum pname GLuint *params void glGetQueryiv GLenum target GLenum pname GLint *params void glGetQueryivARB GLenum target GLenum pname GLint *params void glGetQueryivEXT GLenum target GLenum pname GLint *params void glGetRenderbufferParameteriv GLenum target GLenum pname GLint *params void glGetRenderbufferParameterivEXT GLenum target GLenum pname GLint *params void glGetRenderbufferParameterivOES GLenum target GLenum pname GLint *params void glGetSamplerParameterIiv GLuint sampler GLenum pname GLint *params void glGetSamplerParameterIivEXT GLuint sampler GLenum pname GLint *params void glGetSamplerParameterIivOES GLuint sampler GLenum pname GLint *params void glGetSamplerParameterIuiv GLuint sampler GLenum pname GLuint *params void glGetSamplerParameterIuivEXT GLuint sampler GLenum pname GLuint *params void glGetSamplerParameterIuivOES GLuint sampler GLenum pname GLuint *params void glGetSamplerParameterfv GLuint sampler GLenum pname GLfloat *params void glGetSamplerParameteriv GLuint sampler GLenum pname GLint *params void glGetSemaphoreParameterivNV GLuint semaphore GLenum pname GLint *params void glGetSemaphoreParameterui64vEXT GLuint semaphore GLenum pname GLuint64 *params void glGetSeparableFilter GLenum target GLenum format GLenum type void *row void *column void *span void glGetSeparableFilterEXT GLenum target GLenum format GLenum type void *row void *column void *span void glGetShaderInfoLog GLuint shader GLsizei bufSize GLsizei *length GLchar *infoLog void glGetShaderPrecisionFormat GLenum shadertype GLenum precisiontype GLint *range GLint *precision void glGetShaderSource GLuint shader GLsizei bufSize GLsizei *length GLchar *source void glGetShaderSourceARB GLhandleARB obj GLsizei maxLength GLsizei *length GLcharARB *source void glGetShaderiv GLuint shader GLenum pname GLint *params void glGetShadingRateImagePaletteNV GLuint viewport GLuint entry GLenum *rate void glGetShadingRateSampleLocationivNV GLenum rate GLuint samples GLuint index GLint *location void glGetSharpenTexFuncSGIS GLenum target GLfloat *points GLushort glGetStageIndexNV GLenum shadertype const GLubyte *glGetString GLenum name const GLubyte *glGetStringi GLenum name GLuint index GLuint glGetSubroutineIndex GLuint program GLenum shadertype const GLchar *name GLint glGetSubroutineUniformLocation GLuint program GLenum shadertype const GLchar *name void glGetSynciv GLsync sync GLenum pname GLsizei count GLsizei *length GLint *values void glGetSyncivAPPLE GLsync sync GLenum pname GLsizei count GLsizei *length GLint *values void glGetTexBumpParameterfvATI GLenum pname GLfloat *param void glGetTexBumpParameterivATI GLenum pname GLint *param void glGetTexEnvfv GLenum target GLenum pname GLfloat *params void glGetTexEnviv GLenum target GLenum pname GLint *params void glGetTexEnvxv GLenum target GLenum pname GLfixed *params void glGetTexEnvxvOES GLenum target GLenum pname GLfixed *params void glGetTexFilterFuncSGIS GLenum target GLenum filter GLfloat *weights void glGetTexGendv GLenum coord GLenum pname GLdouble *params void glGetTexGenfv GLenum coord GLenum pname GLfloat *params void glGetTexGenfvOES GLenum coord GLenum pname GLfloat *params void glGetTexGeniv GLenum coord GLenum pname GLint *params void glGetTexGenivOES GLenum coord GLenum pname GLint *params void glGetTexGenxvOES GLenum coord GLenum pname GLfixed *params void glGetTexImage GLenum target GLint level GLenum format GLenum type void *pixels void glGetTexLevelParameterfv GLenum target GLint level GLenum pname GLfloat *params void glGetTexLevelParameteriv GLenum target GLint level GLenum pname GLint *params void glGetTexLevelParameterxvOES GLenum target GLint level GLenum pname GLfixed *params void glGetTexParameterIiv GLenum target GLenum pname GLint *params void glGetTexParameterIivEXT GLenum target GLenum pname GLint *params void glGetTexParameterIivOES GLenum target GLenum pname GLint *params void glGetTexParameterIuiv GLenum target GLenum pname GLuint *params void glGetTexParameterIuivEXT GLenum target GLenum pname GLuint *params void glGetTexParameterIuivOES GLenum target GLenum pname GLuint *params void glGetTexParameterPointervAPPLE GLenum target GLenum pname void **params void glGetTexParameterfv GLenum target GLenum pname GLfloat *params void glGetTexParameteriv GLenum target GLenum pname GLint *params void glGetTexParameterxv GLenum target GLenum pname GLfixed *params void glGetTexParameterxvOES GLenum target GLenum pname GLfixed *params GLuint64 glGetTextureHandleARB GLuint texture GLuint64 glGetTextureHandleIMG GLuint texture GLuint64 glGetTextureHandleNV GLuint texture void glGetTextureImage GLuint texture GLint level GLenum format GLenum type GLsizei bufSize void *pixels void glGetTextureImageEXT GLuint texture GLenum target GLint level GLenum format GLenum type void *pixels void glGetTextureLevelParameterfv GLuint texture GLint level GLenum pname GLfloat *params void glGetTextureLevelParameterfvEXT GLuint texture GLenum target GLint level GLenum pname GLfloat *params void glGetTextureLevelParameteriv GLuint texture GLint level GLenum pname GLint *params void glGetTextureLevelParameterivEXT GLuint texture GLenum target GLint level GLenum pname GLint *params void glGetTextureParameterIiv GLuint texture GLenum pname GLint *params void glGetTextureParameterIivEXT GLuint texture GLenum target GLenum pname GLint *params void glGetTextureParameterIuiv GLuint texture GLenum pname GLuint *params void glGetTextureParameterIuivEXT GLuint texture GLenum target GLenum pname GLuint *params void glGetTextureParameterfv GLuint texture GLenum pname GLfloat *params void glGetTextureParameterfvEXT GLuint texture GLenum target GLenum pname GLfloat *params void glGetTextureParameteriv GLuint texture GLenum pname GLint *params void glGetTextureParameterivEXT GLuint texture GLenum target GLenum pname GLint *params GLuint64 glGetTextureSamplerHandleARB GLuint texture GLuint sampler GLuint64 glGetTextureSamplerHandleIMG GLuint texture GLuint sampler GLuint64 glGetTextureSamplerHandleNV GLuint texture GLuint sampler void glGetTextureSubImage GLuint texture GLint level GLint xoffset GLint yoffset GLint zoffset GLsizei width GLsizei height GLsizei depth GLenum format GLenum type GLsizei bufSize void *pixels void glGetTrackMatrixivNV GLenum target GLuint address GLenum pname GLint *params void glGetTransformFeedbackVarying GLuint program GLuint index GLsizei bufSize GLsizei *length GLsizei *size GLenum *type GLchar *name void glGetTransformFeedbackVaryingEXT GLuint program GLuint index GLsizei bufSize GLsizei *length GLsizei *size GLenum *type GLchar *name void glGetTransformFeedbackVaryingNV GLuint program GLuint index GLint *location void glGetTransformFeedbacki64_v GLuint xfb GLenum pname GLuint index GLint64 *param void glGetTransformFeedbacki_v GLuint xfb GLenum pname GLuint index GLint *param void glGetTransformFeedbackiv GLuint xfb GLenum pname GLint *param void glGetTranslatedShaderSourceANGLE GLuint shader GLsizei bufSize GLsizei *length GLchar *source GLuint glGetUniformBlockIndex GLuint program const GLchar *uniformBlockName GLint glGetUniformBufferSizeEXT GLuint program GLint location void glGetUniformIndices GLuint program GLsizei uniformCount const GLchar *const*uniformNames GLuint *uniformIndices GLint glGetUniformLocation GLuint program const GLchar *name GLint glGetUniformLocationARB GLhandleARB programObj const GLcharARB *name GLintptr glGetUniformOffsetEXT GLuint program GLint location void glGetUniformSubroutineuiv GLenum shadertype GLint location GLuint *params void glGetUniformdv GLuint program GLint location GLdouble *params void glGetUniformfv GLuint program GLint location GLfloat *params void glGetUniformfvARB GLhandleARB programObj GLint location GLfloat *params void glGetUniformi64vARB GLuint program GLint location GLint64 *params void glGetUniformi64vNV GLuint program GLint location GLint64EXT *params void glGetUniformiv GLuint program GLint location GLint *params void glGetUniformivARB GLhandleARB programObj GLint location GLint *params void glGetUniformui64vARB GLuint program GLint location GLuint64 *params void glGetUniformui64vNV GLuint program GLint location GLuint64EXT *params void glGetUniformuiv GLuint program GLint location GLuint *params void glGetUniformuivEXT GLuint program GLint location GLuint *params void glGetUnsignedBytevEXT GLenum pname GLubyte *data void glGetUnsignedBytei_vEXT GLenum target GLuint index GLubyte *data void glGetVariantArrayObjectfvATI GLuint id GLenum pname GLfloat *params void glGetVariantArrayObjectivATI GLuint id GLenum pname GLint *params void glGetVariantBooleanvEXT GLuint id GLenum value GLboolean *data void glGetVariantFloatvEXT GLuint id GLenum value GLfloat *data void glGetVariantIntegervEXT GLuint id GLenum value GLint *data void glGetVariantPointervEXT GLuint id GLenum value void **data GLint glGetVaryingLocationNV GLuint program const GLchar *name void glGetVertexArrayIndexed64iv GLuint vaobj GLuint index GLenum pname GLint64 *param void glGetVertexArrayIndexediv GLuint vaobj GLuint index GLenum pname GLint *param void glGetVertexArrayIntegeri_vEXT GLuint vaobj GLuint index GLenum pname GLint *param void glGetVertexArrayIntegervEXT GLuint vaobj GLenum pname GLint *param void glGetVertexArrayPointeri_vEXT GLuint vaobj GLuint index GLenum pname void **param void glGetVertexArrayPointervEXT GLuint vaobj GLenum pname void **param void glGetVertexArrayiv GLuint vaobj GLenum pname GLint *param void glGetVertexAttribArrayObjectfvATI GLuint index GLenum pname GLfloat *params void glGetVertexAttribArrayObjectivATI GLuint index GLenum pname GLint *params void glGetVertexAttribIiv GLuint index GLenum pname GLint *params void glGetVertexAttribIivEXT GLuint index GLenum pname GLint *params void glGetVertexAttribIuiv GLuint index GLenum pname GLuint *params void glGetVertexAttribIuivEXT GLuint index GLenum pname GLuint *params void glGetVertexAttribLdv GLuint index GLenum pname GLdouble *params void glGetVertexAttribLdvEXT GLuint index GLenum pname GLdouble *params void glGetVertexAttribLi64vNV GLuint index GLenum pname GLint64EXT *params void glGetVertexAttribLui64vARB GLuint index GLenum pname GLuint64EXT *params void glGetVertexAttribLui64vNV GLuint index GLenum pname GLuint64EXT *params void glGetVertexAttribPointerv GLuint index GLenum pname void **pointer void glGetVertexAttribPointervARB GLuint index GLenum pname void **pointer void glGetVertexAttribPointervNV GLuint index GLenum pname void **pointer void glGetVertexAttribdv GLuint index GLenum pname GLdouble *params void glGetVertexAttribdvARB GLuint index GLenum pname GLdouble *params void glGetVertexAttribdvNV GLuint index GLenum pname GLdouble *params void glGetVertexAttribfv GLuint index GLenum pname GLfloat *params void glGetVertexAttribfvARB GLuint index GLenum pname GLfloat *params void glGetVertexAttribfvNV GLuint index GLenum pname GLfloat *params void glGetVertexAttribiv GLuint index GLenum pname GLint *params void glGetVertexAttribivARB GLuint index GLenum pname GLint *params void glGetVertexAttribivNV GLuint index GLenum pname GLint *params void glGetVideoCaptureStreamdvNV GLuint video_capture_slot GLuint stream GLenum pname GLdouble *params void glGetVideoCaptureStreamfvNV GLuint video_capture_slot GLuint stream GLenum pname GLfloat *params void glGetVideoCaptureStreamivNV GLuint video_capture_slot GLuint stream GLenum pname GLint *params void glGetVideoCaptureivNV GLuint video_capture_slot GLenum pname GLint *params void glGetVideoi64vNV GLuint video_slot GLenum pname GLint64EXT *params void glGetVideoivNV GLuint video_slot GLenum pname GLint *params void glGetVideoui64vNV GLuint video_slot GLenum pname GLuint64EXT *params void glGetVideouivNV GLuint video_slot GLenum pname GLuint *params void glGetnColorTable GLenum target GLenum format GLenum type GLsizei bufSize void *table void glGetnColorTableARB GLenum target GLenum format GLenum type GLsizei bufSize void *table void glGetnCompressedTexImage GLenum target GLint lod GLsizei bufSize void *pixels void glGetnCompressedTexImageARB GLenum target GLint lod GLsizei bufSize void *img void glGetnConvolutionFilter GLenum target GLenum format GLenum type GLsizei bufSize void *image void glGetnConvolutionFilterARB GLenum target GLenum format GLenum type GLsizei bufSize void *image void glGetnHistogram GLenum target GLboolean reset GLenum format GLenum type GLsizei bufSize void *values void glGetnHistogramARB GLenum target GLboolean reset GLenum format GLenum type GLsizei bufSize void *values void glGetnMapdv GLenum target GLenum query GLsizei bufSize GLdouble *v void glGetnMapdvARB GLenum target GLenum query GLsizei bufSize GLdouble *v void glGetnMapfv GLenum target GLenum query GLsizei bufSize GLfloat *v void glGetnMapfvARB GLenum target GLenum query GLsizei bufSize GLfloat *v void glGetnMapiv GLenum target GLenum query GLsizei bufSize GLint *v void glGetnMapivARB GLenum target GLenum query GLsizei bufSize GLint *v void glGetnMinmax GLenum target GLboolean reset GLenum format GLenum type GLsizei bufSize void *values void glGetnMinmaxARB GLenum target GLboolean reset GLenum format GLenum type GLsizei bufSize void *values void glGetnPixelMapfv GLenum map GLsizei bufSize GLfloat *values void glGetnPixelMapfvARB GLenum map GLsizei bufSize GLfloat *values void glGetnPixelMapuiv GLenum map GLsizei bufSize GLuint *values void glGetnPixelMapuivARB GLenum map GLsizei bufSize GLuint *values void glGetnPixelMapusv GLenum map GLsizei bufSize GLushort *values void glGetnPixelMapusvARB GLenum map GLsizei bufSize GLushort *values void glGetnPolygonStipple GLsizei bufSize GLubyte *pattern void glGetnPolygonStippleARB GLsizei bufSize GLubyte *pattern void glGetnSeparableFilter GLenum target GLenum format GLenum type GLsizei rowBufSize void *row GLsizei columnBufSize void *column void *span void glGetnSeparableFilterARB GLenum target GLenum format GLenum type GLsizei rowBufSize void *row GLsizei columnBufSize void *column void *span void glGetnTexImage GLenum target GLint level GLenum format GLenum type GLsizei bufSize void *pixels void glGetnTexImageARB GLenum target GLint level GLenum format GLenum type GLsizei bufSize void *img void glGetnUniformdv GLuint program GLint location GLsizei bufSize GLdouble *params void glGetnUniformdvARB GLuint program GLint location GLsizei bufSize GLdouble *params void glGetnUniformfv GLuint program GLint location GLsizei bufSize GLfloat *params void glGetnUniformfvARB GLuint program GLint location GLsizei bufSize GLfloat *params void glGetnUniformfvEXT GLuint program GLint location GLsizei bufSize GLfloat *params void glGetnUniformfvKHR GLuint program GLint location GLsizei bufSize GLfloat *params void glGetnUniformi64vARB GLuint program GLint location GLsizei bufSize GLint64 *params void glGetnUniformiv GLuint program GLint location GLsizei bufSize GLint *params void glGetnUniformivARB GLuint program GLint location GLsizei bufSize GLint *params void glGetnUniformivEXT GLuint program GLint location GLsizei bufSize GLint *params void glGetnUniformivKHR GLuint program GLint location GLsizei bufSize GLint *params void glGetnUniformui64vARB GLuint program GLint location GLsizei bufSize GLuint64 *params void glGetnUniformuiv GLuint program GLint location GLsizei bufSize GLuint *params void glGetnUniformuivARB GLuint program GLint location GLsizei bufSize GLuint *params void glGetnUniformuivKHR GLuint program GLint location GLsizei bufSize GLuint *params void glGlobalAlphaFactorbSUN GLbyte factor void glGlobalAlphaFactordSUN GLdouble factor void glGlobalAlphaFactorfSUN GLfloat factor void glGlobalAlphaFactoriSUN GLint factor void glGlobalAlphaFactorsSUN GLshort factor void glGlobalAlphaFactorubSUN GLubyte factor void glGlobalAlphaFactoruiSUN GLuint factor void glGlobalAlphaFactorusSUN GLushort factor void glHint GLenum target GLenum mode void glHintPGI GLenum target GLint mode void glHistogram GLenum target GLsizei width GLenum internalformat GLboolean sink void glHistogramEXT GLenum target GLsizei width GLenum internalformat GLboolean sink void glIglooInterfaceSGIX GLenum pname const void *params void glImageTransformParameterfHP GLenum target GLenum pname GLfloat param void glImageTransformParameterfvHP GLenum target GLenum pname const GLfloat *params void glImageTransformParameteriHP GLenum target GLenum pname GLint param void glImageTransformParameterivHP GLenum target GLenum pname const GLint *params void glImportMemoryFdEXT GLuint memory GLuint64 size GLenum handleType GLint fd void glImportMemoryWin32HandleEXT GLuint memory GLuint64 size GLenum handleType void *handle void glImportMemoryWin32NameEXT GLuint memory GLuint64 size GLenum handleType const void *name void glImportSemaphoreFdEXT GLuint semaphore GLenum handleType GLint fd void glImportSemaphoreWin32HandleEXT GLuint semaphore GLenum handleType void *handle void glImportSemaphoreWin32NameEXT GLuint semaphore GLenum handleType const void *name GLsync glImportSyncEXT GLenum external_sync_type GLintptr external_sync GLbitfield flags void glIndexFormatNV GLenum type GLsizei stride void glIndexFuncEXT GLenum func GLclampf ref void glIndexMask GLuint mask void glIndexMaterialEXT GLenum face GLenum mode void glIndexPointer GLenum type GLsizei stride const void *pointer void glIndexPointerEXT GLenum type GLsizei stride GLsizei count const void *pointer void glIndexPointerListIBM GLenum type GLint stride const void **pointer GLint ptrstride void glIndexd GLdouble c void glIndexdv const GLdouble *c void glIndexf GLfloat c void glIndexfv const GLfloat *c void glIndexi GLint c void glIndexiv const GLint *c void glIndexs GLshort c void glIndexsv const GLshort *c void glIndexub GLubyte c void glIndexubv const GLubyte *c void glIndexxOES GLfixed component void glIndexxvOES const GLfixed *component void glInitNames void glInsertComponentEXT GLuint res GLuint src GLuint num void glInsertEventMarkerEXT GLsizei length const GLchar *marker void glInstrumentsBufferSGIX GLsizei size GLint *buffer void glInterleavedArrays GLenum format GLsizei stride const void *pointer void glInterpolatePathsNV GLuint resultPath GLuint pathA GLuint pathB GLfloat weight void glInvalidateBufferData GLuint buffer void glInvalidateBufferSubData GLuint buffer GLintptr offset GLsizeiptr length void glInvalidateFramebuffer GLenum target GLsizei numAttachments const GLenum *attachments void glInvalidateNamedFramebufferData GLuint framebuffer GLsizei numAttachments const GLenum *attachments void glInvalidateNamedFramebufferSubData GLuint framebuffer GLsizei numAttachments const GLenum *attachments GLint x GLint y GLsizei width GLsizei height void glInvalidateSubFramebuffer GLenum target GLsizei numAttachments const GLenum *attachments GLint x GLint y GLsizei width GLsizei height void glInvalidateTexImage GLuint texture GLint level void glInvalidateTexSubImage GLuint texture GLint level GLint xoffset GLint yoffset GLint zoffset GLsizei width GLsizei height GLsizei depth GLboolean glIsAsyncMarkerSGIX GLuint marker GLboolean glIsBuffer GLuint buffer GLboolean glIsBufferARB GLuint buffer GLboolean glIsBufferResidentNV GLenum target GLboolean glIsCommandListNV GLuint list GLboolean glIsEnabled GLenum cap GLboolean glIsEnabledIndexedEXT GLenum target GLuint index GLboolean glIsEnabledi GLenum target GLuint index GLboolean glIsEnablediEXT GLenum target GLuint index GLboolean glIsEnablediNV GLenum target GLuint index GLboolean glIsEnablediOES GLenum target GLuint index GLboolean glIsFenceAPPLE GLuint fence GLboolean glIsFenceNV GLuint fence GLboolean glIsFramebuffer GLuint framebuffer GLboolean glIsFramebufferEXT GLuint framebuffer GLboolean glIsFramebufferOES GLuint framebuffer GLboolean glIsImageHandleResidentARB GLuint64 handle GLboolean glIsImageHandleResidentNV GLuint64 handle GLboolean glIsList GLuint list GLboolean glIsMemoryObjectEXT GLuint memoryObject GLboolean glIsNameAMD GLenum identifier GLuint name GLboolean glIsNamedBufferResidentNV GLuint buffer GLboolean glIsNamedStringARB GLint namelen const GLchar *name GLboolean glIsObjectBufferATI GLuint buffer GLboolean glIsOcclusionQueryNV GLuint id GLboolean glIsPathNV GLuint path GLboolean glIsPointInFillPathNV GLuint path GLuint mask GLfloat x GLfloat y GLboolean glIsPointInStrokePathNV GLuint path GLfloat x GLfloat y GLboolean glIsProgram GLuint program GLboolean glIsProgramARB GLuint program GLboolean glIsProgramNV GLuint id GLboolean glIsProgramPipeline GLuint pipeline GLboolean glIsProgramPipelineEXT GLuint pipeline GLboolean glIsQuery GLuint id GLboolean glIsQueryARB GLuint id GLboolean glIsQueryEXT GLuint id GLboolean glIsRenderbuffer GLuint renderbuffer GLboolean glIsRenderbufferEXT GLuint renderbuffer GLboolean glIsRenderbufferOES GLuint renderbuffer GLboolean glIsSemaphoreEXT GLuint semaphore GLboolean glIsSampler GLuint sampler GLboolean glIsShader GLuint shader GLboolean glIsStateNV GLuint state GLboolean glIsSync GLsync sync GLboolean glIsSyncAPPLE GLsync sync GLboolean glIsTexture GLuint texture GLboolean glIsTextureEXT GLuint texture GLboolean glIsTextureHandleResidentARB GLuint64 handle GLboolean glIsTextureHandleResidentNV GLuint64 handle GLboolean glIsTransformFeedback GLuint id GLboolean glIsTransformFeedbackNV GLuint id GLboolean glIsVariantEnabledEXT GLuint id GLenum cap GLboolean glIsVertexArray GLuint array GLboolean glIsVertexArrayAPPLE GLuint array GLboolean glIsVertexArrayOES GLuint array GLboolean glIsVertexAttribEnabledAPPLE GLuint index GLenum pname void glLGPUCopyImageSubDataNVX GLuint sourceGpu GLbitfield destinationGpuMask GLuint srcName GLenum srcTarget GLint srcLevel GLint srcX GLint srxY GLint srcZ GLuint dstName GLenum dstTarget GLint dstLevel GLint dstX GLint dstY GLint dstZ GLsizei width GLsizei height GLsizei depth void glLGPUInterlockNVX void glLGPUNamedBufferSubDataNVX GLbitfield gpuMask GLuint buffer GLintptr offset GLsizeiptr size const void *data void glLabelObjectEXT GLenum type GLuint object GLsizei length const GLchar *label void glLightEnviSGIX GLenum pname GLint param void glLightModelf GLenum pname GLfloat param void glLightModelfv GLenum pname const GLfloat *params void glLightModeli GLenum pname GLint param void glLightModeliv GLenum pname const GLint *params void glLightModelx GLenum pname GLfixed param void glLightModelxOES GLenum pname GLfixed param void glLightModelxv GLenum pname const GLfixed *param void glLightModelxvOES GLenum pname const GLfixed *param void glLightf GLenum light GLenum pname GLfloat param void glLightfv GLenum light GLenum pname const GLfloat *params void glLighti GLenum light GLenum pname GLint param void glLightiv GLenum light GLenum pname const GLint *params void glLightx GLenum light GLenum pname GLfixed param void glLightxOES GLenum light GLenum pname GLfixed param void glLightxv GLenum light GLenum pname const GLfixed *params void glLightxvOES GLenum light GLenum pname const GLfixed *params void glLineStipple GLint factor GLushort pattern void glLineWidth GLfloat width void glLineWidthx GLfixed width void glLineWidthxOES GLfixed width void glLinkProgram GLuint program void glLinkProgramARB GLhandleARB programObj void glListBase GLuint base void glListDrawCommandsStatesClientNV GLuint list GLuint segment const void **indirects const GLsizei *sizes const GLuint *states const GLuint *fbos GLuint count void glListParameterfSGIX GLuint list GLenum pname GLfloat param void glListParameterfvSGIX GLuint list GLenum pname const GLfloat *params void glListParameteriSGIX GLuint list GLenum pname GLint param void glListParameterivSGIX GLuint list GLenum pname const GLint *params void glLoadIdentity void glLoadIdentityDeformationMapSGIX GLbitfield mask void glLoadMatrixd const GLdouble *m void glLoadMatrixf const GLfloat *m void glLoadMatrixx const GLfixed *m void glLoadMatrixxOES const GLfixed *m void glLoadName GLuint name void glLoadPaletteFromModelViewMatrixOES void glLoadProgramNV GLenum target GLuint id GLsizei len const GLubyte *program void glLoadTransposeMatrixd const GLdouble *m void glLoadTransposeMatrixdARB const GLdouble *m void glLoadTransposeMatrixf const GLfloat *m void glLoadTransposeMatrixfARB const GLfloat *m void glLoadTransposeMatrixxOES const GLfixed *m void glLockArraysEXT GLint first GLsizei count void glLogicOp GLenum opcode void glMakeBufferNonResidentNV GLenum target void glMakeBufferResidentNV GLenum target GLenum access void glMakeImageHandleNonResidentARB GLuint64 handle void glMakeImageHandleNonResidentNV GLuint64 handle void glMakeImageHandleResidentARB GLuint64 handle GLenum access void glMakeImageHandleResidentNV GLuint64 handle GLenum access void glMakeNamedBufferNonResidentNV GLuint buffer void glMakeNamedBufferResidentNV GLuint buffer GLenum access void glMakeTextureHandleNonResidentARB GLuint64 handle void glMakeTextureHandleNonResidentNV GLuint64 handle void glMakeTextureHandleResidentARB GLuint64 handle void glMakeTextureHandleResidentNV GLuint64 handle void glMap1d GLenum target GLdouble u1 GLdouble u2 GLint stride GLint order const GLdouble *points void glMap1f GLenum target GLfloat u1 GLfloat u2 GLint stride GLint order const GLfloat *points void glMap1xOES GLenum target GLfixed u1 GLfixed u2 GLint stride GLint order GLfixed points void glMap2d GLenum target GLdouble u1 GLdouble u2 GLint ustride GLint uorder GLdouble v1 GLdouble v2 GLint vstride GLint vorder const GLdouble *points void glMap2f GLenum target GLfloat u1 GLfloat u2 GLint ustride GLint uorder GLfloat v1 GLfloat v2 GLint vstride GLint vorder const GLfloat *points void glMap2xOES GLenum target GLfixed u1 GLfixed u2 GLint ustride GLint uorder GLfixed v1 GLfixed v2 GLint vstride GLint vorder GLfixed points void *glMapBuffer GLenum target GLenum access void *glMapBufferARB GLenum target GLenum access void *glMapBufferOES GLenum target GLenum access void *glMapBufferRange GLenum target GLintptr offset GLsizeiptr length GLbitfield access void *glMapBufferRangeEXT GLenum target GLintptr offset GLsizeiptr length GLbitfield access void glMapControlPointsNV GLenum target GLuint index GLenum type GLsizei ustride GLsizei vstride GLint uorder GLint vorder GLboolean packed const void *points void glMapGrid1d GLint un GLdouble u1 GLdouble u2 void glMapGrid1f GLint un GLfloat u1 GLfloat u2 void glMapGrid1xOES GLint n GLfixed u1 GLfixed u2 void glMapGrid2d GLint un GLdouble u1 GLdouble u2 GLint vn GLdouble v1 GLdouble v2 void glMapGrid2f GLint un GLfloat u1 GLfloat u2 GLint vn GLfloat v1 GLfloat v2 void glMapGrid2xOES GLint n GLfixed u1 GLfixed u2 GLfixed v1 GLfixed v2 void *glMapNamedBuffer GLuint buffer GLenum access void *glMapNamedBufferEXT GLuint buffer GLenum access void *glMapNamedBufferRange GLuint buffer GLintptr offset GLsizeiptr length GLbitfield access void *glMapNamedBufferRangeEXT GLuint buffer GLintptr offset GLsizeiptr length GLbitfield access void *glMapObjectBufferATI GLuint buffer void glMapParameterfvNV GLenum target GLenum pname const GLfloat *params void glMapParameterivNV GLenum target GLenum pname const GLint *params void *glMapTexture2DINTEL GLuint texture GLint level GLbitfield access GLint *stride GLenum *layout void glMapVertexAttrib1dAPPLE GLuint index GLuint size GLdouble u1 GLdouble u2 GLint stride GLint order const GLdouble *points void glMapVertexAttrib1fAPPLE GLuint index GLuint size GLfloat u1 GLfloat u2 GLint stride GLint order const GLfloat *points void glMapVertexAttrib2dAPPLE GLuint index GLuint size GLdouble u1 GLdouble u2 GLint ustride GLint uorder GLdouble v1 GLdouble v2 GLint vstride GLint vorder const GLdouble *points void glMapVertexAttrib2fAPPLE GLuint index GLuint size GLfloat u1 GLfloat u2 GLint ustride GLint uorder GLfloat v1 GLfloat v2 GLint vstride GLint vorder const GLfloat *points void glMaterialf GLenum face GLenum pname GLfloat param void glMaterialfv GLenum face GLenum pname const GLfloat *params void glMateriali GLenum face GLenum pname GLint param void glMaterialiv GLenum face GLenum pname const GLint *params void glMaterialx GLenum face GLenum pname GLfixed param void glMaterialxOES GLenum face GLenum pname GLfixed param void glMaterialxv GLenum face GLenum pname const GLfixed *param void glMaterialxvOES GLenum face GLenum pname const GLfixed *param void glMatrixFrustumEXT GLenum mode GLdouble left GLdouble right GLdouble bottom GLdouble top GLdouble zNear GLdouble zFar void glMatrixIndexPointerARB GLint size GLenum type GLsizei stride const void *pointer void glMatrixIndexPointerOES GLint size GLenum type GLsizei stride const void *pointer void glMatrixIndexubvARB GLint size const GLubyte *indices void glMatrixIndexuivARB GLint size const GLuint *indices void glMatrixIndexusvARB GLint size const GLushort *indices void glMatrixLoad3x2fNV GLenum matrixMode const GLfloat *m void glMatrixLoad3x3fNV GLenum matrixMode const GLfloat *m void glMatrixLoadIdentityEXT GLenum mode void glMatrixLoadTranspose3x3fNV GLenum matrixMode const GLfloat *m void glMatrixLoadTransposedEXT GLenum mode const GLdouble *m void glMatrixLoadTransposefEXT GLenum mode const GLfloat *m void glMatrixLoaddEXT GLenum mode const GLdouble *m void glMatrixLoadfEXT GLenum mode const GLfloat *m void glMatrixMode GLenum mode void glMatrixMult3x2fNV GLenum matrixMode const GLfloat *m void glMatrixMult3x3fNV GLenum matrixMode const GLfloat *m void glMatrixMultTranspose3x3fNV GLenum matrixMode const GLfloat *m void glMatrixMultTransposedEXT GLenum mode const GLdouble *m void glMatrixMultTransposefEXT GLenum mode const GLfloat *m void glMatrixMultdEXT GLenum mode const GLdouble *m void glMatrixMultfEXT GLenum mode const GLfloat *m void glMatrixOrthoEXT GLenum mode GLdouble left GLdouble right GLdouble bottom GLdouble top GLdouble zNear GLdouble zFar void glMatrixPopEXT GLenum mode void glMatrixPushEXT GLenum mode void glMatrixRotatedEXT GLenum mode GLdouble angle GLdouble x GLdouble y GLdouble z void glMatrixRotatefEXT GLenum mode GLfloat angle GLfloat x GLfloat y GLfloat z void glMatrixScaledEXT GLenum mode GLdouble x GLdouble y GLdouble z void glMatrixScalefEXT GLenum mode GLfloat x GLfloat y GLfloat z void glMatrixTranslatedEXT GLenum mode GLdouble x GLdouble y GLdouble z void glMatrixTranslatefEXT GLenum mode GLfloat x GLfloat y GLfloat z void glMaxShaderCompilerThreadsKHR GLuint count void glMaxShaderCompilerThreadsARB GLuint count void glMemoryBarrier GLbitfield barriers void glMemoryBarrierByRegion GLbitfield barriers void glMemoryBarrierEXT GLbitfield barriers void glMemoryObjectParameterivEXT GLuint memoryObject GLenum pname const GLint *params void glMinSampleShading GLfloat value void glMinSampleShadingARB GLfloat value void glMinSampleShadingOES GLfloat value void glMinmax GLenum target GLenum internalformat GLboolean sink void glMinmaxEXT GLenum target GLenum internalformat GLboolean sink void glMultMatrixd const GLdouble *m void glMultMatrixf const GLfloat *m void glMultMatrixx const GLfixed *m void glMultMatrixxOES const GLfixed *m void glMultTransposeMatrixd const GLdouble *m void glMultTransposeMatrixdARB const GLdouble *m void glMultTransposeMatrixf const GLfloat *m void glMultTransposeMatrixfARB const GLfloat *m void glMultTransposeMatrixxOES const GLfixed *m void glMultiDrawArrays GLenum mode const GLint *first const GLsizei *count GLsizei drawcount void glMultiDrawArraysEXT GLenum mode const GLint *first const GLsizei *count GLsizei primcount void glMultiDrawArraysIndirect GLenum mode const void *indirect GLsizei drawcount GLsizei stride void glMultiDrawArraysIndirectAMD GLenum mode const void *indirect GLsizei primcount GLsizei stride void glMultiDrawArraysIndirectBindlessCountNV GLenum mode const void *indirect GLsizei drawCount GLsizei maxDrawCount GLsizei stride GLint vertexBufferCount void glMultiDrawArraysIndirectBindlessNV GLenum mode const void *indirect GLsizei drawCount GLsizei stride GLint vertexBufferCount void glMultiDrawArraysIndirectCount GLenum mode const void *indirect GLintptr drawcount GLsizei maxdrawcount GLsizei stride void glMultiDrawArraysIndirectCountARB GLenum mode const void *indirect GLintptr drawcount GLsizei maxdrawcount GLsizei stride void glMultiDrawArraysIndirectEXT GLenum mode const void *indirect GLsizei drawcount GLsizei stride void glMultiDrawElementArrayAPPLE GLenum mode const GLint *first const GLsizei *count GLsizei primcount void glMultiDrawElements GLenum mode const GLsizei *count GLenum type const void *const*indices GLsizei drawcount void glMultiDrawElementsBaseVertex GLenum mode const GLsizei *count GLenum type const void *const*indices GLsizei drawcount const GLint *basevertex void glMultiDrawElementsBaseVertexEXT GLenum mode const GLsizei *count GLenum type const void *const*indices GLsizei drawcount const GLint *basevertex void glMultiDrawElementsEXT GLenum mode const GLsizei *count GLenum type const void *const*indices GLsizei primcount void glMultiDrawElementsIndirect GLenum mode GLenum type const void *indirect GLsizei drawcount GLsizei stride void glMultiDrawElementsIndirectAMD GLenum mode GLenum type const void *indirect GLsizei primcount GLsizei stride void glMultiDrawElementsIndirectBindlessCountNV GLenum mode GLenum type const void *indirect GLsizei drawCount GLsizei maxDrawCount GLsizei stride GLint vertexBufferCount void glMultiDrawElementsIndirectBindlessNV GLenum mode GLenum type const void *indirect GLsizei drawCount GLsizei stride GLint vertexBufferCount void glMultiDrawElementsIndirectCount GLenum mode GLenum type const void *indirect GLintptr drawcount GLsizei maxdrawcount GLsizei stride void glMultiDrawElementsIndirectCountARB GLenum mode GLenum type const void *indirect GLintptr drawcount GLsizei maxdrawcount GLsizei stride void glMultiDrawElementsIndirectEXT GLenum mode GLenum type const void *indirect GLsizei drawcount GLsizei stride void glMultiDrawMeshTasksIndirectNV GLintptr indirect GLsizei drawcount GLsizei stride void glMultiDrawMeshTasksIndirectCountNV GLintptr indirect GLintptr drawcount GLsizei maxdrawcount GLsizei stride void glMultiDrawRangeElementArrayAPPLE GLenum mode GLuint start GLuint end const GLint *first const GLsizei *count GLsizei primcount void glMultiModeDrawArraysIBM const GLenum *mode const GLint *first const GLsizei *count GLsizei primcount GLint modestride void glMultiModeDrawElementsIBM const GLenum *mode const GLsizei *count GLenum type const void *const*indices GLsizei primcount GLint modestride void glMultiTexBufferEXT GLenum texunit GLenum target GLenum internalformat GLuint buffer void glMultiTexCoord1bOES GLenum texture GLbyte s void glMultiTexCoord1bvOES GLenum texture const GLbyte *coords void glMultiTexCoord1d GLenum target GLdouble s void glMultiTexCoord1dARB GLenum target GLdouble s void glMultiTexCoord1dv GLenum target const GLdouble *v void glMultiTexCoord1dvARB GLenum target const GLdouble *v void glMultiTexCoord1f GLenum target GLfloat s void glMultiTexCoord1fARB GLenum target GLfloat s void glMultiTexCoord1fv GLenum target const GLfloat *v void glMultiTexCoord1fvARB GLenum target const GLfloat *v void glMultiTexCoord1hNV GLenum target GLhalfNV s void glMultiTexCoord1hvNV GLenum target const GLhalfNV *v void glMultiTexCoord1i GLenum target GLint s void glMultiTexCoord1iARB GLenum target GLint s void glMultiTexCoord1iv GLenum target const GLint *v void glMultiTexCoord1ivARB GLenum target const GLint *v void glMultiTexCoord1s GLenum target GLshort s void glMultiTexCoord1sARB GLenum target GLshort s void glMultiTexCoord1sv GLenum target const GLshort *v void glMultiTexCoord1svARB GLenum target const GLshort *v void glMultiTexCoord1xOES GLenum texture GLfixed s void glMultiTexCoord1xvOES GLenum texture const GLfixed *coords void glMultiTexCoord2bOES GLenum texture GLbyte s GLbyte t void glMultiTexCoord2bvOES GLenum texture const GLbyte *coords void glMultiTexCoord2d GLenum target GLdouble s GLdouble t void glMultiTexCoord2dARB GLenum target GLdouble s GLdouble t void glMultiTexCoord2dv GLenum target const GLdouble *v void glMultiTexCoord2dvARB GLenum target const GLdouble *v void glMultiTexCoord2f GLenum target GLfloat s GLfloat t void glMultiTexCoord2fARB GLenum target GLfloat s GLfloat t void glMultiTexCoord2fv GLenum target const GLfloat *v void glMultiTexCoord2fvARB GLenum target const GLfloat *v void glMultiTexCoord2hNV GLenum target GLhalfNV s GLhalfNV t void glMultiTexCoord2hvNV GLenum target const GLhalfNV *v void glMultiTexCoord2i GLenum target GLint s GLint t void glMultiTexCoord2iARB GLenum target GLint s GLint t void glMultiTexCoord2iv GLenum target const GLint *v void glMultiTexCoord2ivARB GLenum target const GLint *v void glMultiTexCoord2s GLenum target GLshort s GLshort t void glMultiTexCoord2sARB GLenum target GLshort s GLshort t void glMultiTexCoord2sv GLenum target const GLshort *v void glMultiTexCoord2svARB GLenum target const GLshort *v void glMultiTexCoord2xOES GLenum texture GLfixed s GLfixed t void glMultiTexCoord2xvOES GLenum texture const GLfixed *coords void glMultiTexCoord3bOES GLenum texture GLbyte s GLbyte t GLbyte r void glMultiTexCoord3bvOES GLenum texture const GLbyte *coords void glMultiTexCoord3d GLenum target GLdouble s GLdouble t GLdouble r void glMultiTexCoord3dARB GLenum target GLdouble s GLdouble t GLdouble r void glMultiTexCoord3dv GLenum target const GLdouble *v void glMultiTexCoord3dvARB GLenum target const GLdouble *v void glMultiTexCoord3f GLenum target GLfloat s GLfloat t GLfloat r void glMultiTexCoord3fARB GLenum target GLfloat s GLfloat t GLfloat r void glMultiTexCoord3fv GLenum target const GLfloat *v void glMultiTexCoord3fvARB GLenum target const GLfloat *v void glMultiTexCoord3hNV GLenum target GLhalfNV s GLhalfNV t GLhalfNV r void glMultiTexCoord3hvNV GLenum target const GLhalfNV *v void glMultiTexCoord3i GLenum target GLint s GLint t GLint r void glMultiTexCoord3iARB GLenum target GLint s GLint t GLint r void glMultiTexCoord3iv GLenum target const GLint *v void glMultiTexCoord3ivARB GLenum target const GLint *v void glMultiTexCoord3s GLenum target GLshort s GLshort t GLshort r void glMultiTexCoord3sARB GLenum target GLshort s GLshort t GLshort r void glMultiTexCoord3sv GLenum target const GLshort *v void glMultiTexCoord3svARB GLenum target const GLshort *v void glMultiTexCoord3xOES GLenum texture GLfixed s GLfixed t GLfixed r void glMultiTexCoord3xvOES GLenum texture const GLfixed *coords void glMultiTexCoord4bOES GLenum texture GLbyte s GLbyte t GLbyte r GLbyte q void glMultiTexCoord4bvOES GLenum texture const GLbyte *coords void glMultiTexCoord4d GLenum target GLdouble s GLdouble t GLdouble r GLdouble q void glMultiTexCoord4dARB GLenum target GLdouble s GLdouble t GLdouble r GLdouble q void glMultiTexCoord4dv GLenum target const GLdouble *v void glMultiTexCoord4dvARB GLenum target const GLdouble *v void glMultiTexCoord4f GLenum target GLfloat s GLfloat t GLfloat r GLfloat q void glMultiTexCoord4fARB GLenum target GLfloat s GLfloat t GLfloat r GLfloat q void glMultiTexCoord4fv GLenum target const GLfloat *v void glMultiTexCoord4fvARB GLenum target const GLfloat *v void glMultiTexCoord4hNV GLenum target GLhalfNV s GLhalfNV t GLhalfNV r GLhalfNV q void glMultiTexCoord4hvNV GLenum target const GLhalfNV *v void glMultiTexCoord4i GLenum target GLint s GLint t GLint r GLint q void glMultiTexCoord4iARB GLenum target GLint s GLint t GLint r GLint q void glMultiTexCoord4iv GLenum target const GLint *v void glMultiTexCoord4ivARB GLenum target const GLint *v void glMultiTexCoord4s GLenum target GLshort s GLshort t GLshort r GLshort q void glMultiTexCoord4sARB GLenum target GLshort s GLshort t GLshort r GLshort q void glMultiTexCoord4sv GLenum target const GLshort *v void glMultiTexCoord4svARB GLenum target const GLshort *v void glMultiTexCoord4x GLenum texture GLfixed s GLfixed t GLfixed r GLfixed q void glMultiTexCoord4xOES GLenum texture GLfixed s GLfixed t GLfixed r GLfixed q void glMultiTexCoord4xvOES GLenum texture const GLfixed *coords void glMultiTexCoordP1ui GLenum texture GLenum type GLuint coords void glMultiTexCoordP1uiv GLenum texture GLenum type const GLuint *coords void glMultiTexCoordP2ui GLenum texture GLenum type GLuint coords void glMultiTexCoordP2uiv GLenum texture GLenum type const GLuint *coords void glMultiTexCoordP3ui GLenum texture GLenum type GLuint coords void glMultiTexCoordP3uiv GLenum texture GLenum type const GLuint *coords void glMultiTexCoordP4ui GLenum texture GLenum type GLuint coords void glMultiTexCoordP4uiv GLenum texture GLenum type const GLuint *coords void glMultiTexCoordPointerEXT GLenum texunit GLint size GLenum type GLsizei stride const void *pointer void glMultiTexEnvfEXT GLenum texunit GLenum target GLenum pname GLfloat param void glMultiTexEnvfvEXT GLenum texunit GLenum target GLenum pname const GLfloat *params void glMultiTexEnviEXT GLenum texunit GLenum target GLenum pname GLint param void glMultiTexEnvivEXT GLenum texunit GLenum target GLenum pname const GLint *params void glMultiTexGendEXT GLenum texunit GLenum coord GLenum pname GLdouble param void glMultiTexGendvEXT GLenum texunit GLenum coord GLenum pname const GLdouble *params void glMultiTexGenfEXT GLenum texunit GLenum coord GLenum pname GLfloat param void glMultiTexGenfvEXT GLenum texunit GLenum coord GLenum pname const GLfloat *params void glMultiTexGeniEXT GLenum texunit GLenum coord GLenum pname GLint param void glMultiTexGenivEXT GLenum texunit GLenum coord GLenum pname const GLint *params void glMultiTexImage1DEXT GLenum texunit GLenum target GLint level GLint internalformat GLsizei width GLint border GLenum format GLenum type const void *pixels void glMultiTexImage2DEXT GLenum texunit GLenum target GLint level GLint internalformat GLsizei width GLsizei height GLint border GLenum format GLenum type const void *pixels void glMultiTexImage3DEXT GLenum texunit GLenum target GLint level GLint internalformat GLsizei width GLsizei height GLsizei depth GLint border GLenum format GLenum type const void *pixels void glMultiTexParameterIivEXT GLenum texunit GLenum target GLenum pname const GLint *params void glMultiTexParameterIuivEXT GLenum texunit GLenum target GLenum pname const GLuint *params void glMultiTexParameterfEXT GLenum texunit GLenum target GLenum pname GLfloat param void glMultiTexParameterfvEXT GLenum texunit GLenum target GLenum pname const GLfloat *params void glMultiTexParameteriEXT GLenum texunit GLenum target GLenum pname GLint param void glMultiTexParameterivEXT GLenum texunit GLenum target GLenum pname const GLint *params void glMultiTexRenderbufferEXT GLenum texunit GLenum target GLuint renderbuffer void glMultiTexSubImage1DEXT GLenum texunit GLenum target GLint level GLint xoffset GLsizei width GLenum format GLenum type const void *pixels void glMultiTexSubImage2DEXT GLenum texunit GLenum target GLint level GLint xoffset GLint yoffset GLsizei width GLsizei height GLenum format GLenum type const void *pixels void glMultiTexSubImage3DEXT GLenum texunit GLenum target GLint level GLint xoffset GLint yoffset GLint zoffset GLsizei width GLsizei height GLsizei depth GLenum format GLenum type const void *pixels void glMulticastBarrierNV void glMulticastBlitFramebufferNV GLuint srcGpu GLuint dstGpu GLint srcX0 GLint srcY0 GLint srcX1 GLint srcY1 GLint dstX0 GLint dstY0 GLint dstX1 GLint dstY1 GLbitfield mask GLenum filter void glMulticastBufferSubDataNV GLbitfield gpuMask GLuint buffer GLintptr offset GLsizeiptr size const void *data void glMulticastCopyBufferSubDataNV GLuint readGpu GLbitfield writeGpuMask GLuint readBuffer GLuint writeBuffer GLintptr readOffset GLintptr writeOffset GLsizeiptr size void glMulticastCopyImageSubDataNV GLuint srcGpu GLbitfield dstGpuMask 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 void glMulticastFramebufferSampleLocationsfvNV GLuint gpu GLuint framebuffer GLuint start GLsizei count const GLfloat *v void glMulticastGetQueryObjecti64vNV GLuint gpu GLuint id GLenum pname GLint64 *params void glMulticastGetQueryObjectivNV GLuint gpu GLuint id GLenum pname GLint *params void glMulticastGetQueryObjectui64vNV GLuint gpu GLuint id GLenum pname GLuint64 *params void glMulticastGetQueryObjectuivNV GLuint gpu GLuint id GLenum pname GLuint *params void glMulticastScissorArrayvNVX GLuint gpu GLuint first GLsizei count const GLint *v void glMulticastViewportArrayvNVX GLuint gpu GLuint first GLsizei count const GLfloat *v void glMulticastViewportPositionWScaleNVX GLuint gpu GLuint index GLfloat xcoeff GLfloat ycoeff void glMulticastWaitSyncNV GLuint signalGpu GLbitfield waitGpuMask void glNamedBufferAttachMemoryNV GLuint buffer GLuint memory GLuint64 offset void glNamedBufferData GLuint buffer GLsizeiptr size const void *data GLenum usage void glNamedBufferDataEXT GLuint buffer GLsizeiptr size const void *data GLenum usage void glNamedBufferPageCommitmentARB GLuint buffer GLintptr offset GLsizeiptr size GLboolean commit void glNamedBufferPageCommitmentEXT GLuint buffer GLintptr offset GLsizeiptr size GLboolean commit void glNamedBufferPageCommitmentMemNV GLuint buffer GLintptr offset GLsizeiptr size GLuint memory GLuint64 memOffset GLboolean commit void glNamedBufferStorage GLuint buffer GLsizeiptr size const void *data GLbitfield flags void glNamedBufferStorageExternalEXT GLuint buffer GLintptr offset GLsizeiptr size GLeglClientBufferEXT clientBuffer GLbitfield flags void glNamedBufferStorageEXT GLuint buffer GLsizeiptr size const void *data GLbitfield flags void glNamedBufferStorageMemEXT GLuint buffer GLsizeiptr size GLuint memory GLuint64 offset void glNamedBufferSubData GLuint buffer GLintptr offset GLsizeiptr size const void *data void glNamedBufferSubDataEXT GLuint buffer GLintptr offset GLsizeiptr size const void *data void glNamedCopyBufferSubDataEXT GLuint readBuffer GLuint writeBuffer GLintptr readOffset GLintptr writeOffset GLsizeiptr size void glNamedFramebufferDrawBuffer GLuint framebuffer GLenum buf void glNamedFramebufferDrawBuffers GLuint framebuffer GLsizei n const GLenum *bufs void glNamedFramebufferParameteri GLuint framebuffer GLenum pname GLint param void glNamedFramebufferParameteriEXT GLuint framebuffer GLenum pname GLint param void glNamedFramebufferReadBuffer GLuint framebuffer GLenum src void glNamedFramebufferRenderbuffer GLuint framebuffer GLenum attachment GLenum renderbuffertarget GLuint renderbuffer void glNamedFramebufferRenderbufferEXT GLuint framebuffer GLenum attachment GLenum renderbuffertarget GLuint renderbuffer void glNamedFramebufferSampleLocationsfvARB GLuint framebuffer GLuint start GLsizei count const GLfloat *v void glNamedFramebufferSampleLocationsfvNV GLuint framebuffer GLuint start GLsizei count const GLfloat *v void glNamedFramebufferTexture GLuint framebuffer GLenum attachment GLuint texture GLint level void glNamedFramebufferSamplePositionsfvAMD GLuint framebuffer GLuint numsamples GLuint pixelindex const GLfloat *values void glNamedFramebufferTexture1DEXT GLuint framebuffer GLenum attachment GLenum textarget GLuint texture GLint level void glNamedFramebufferTexture2DEXT GLuint framebuffer GLenum attachment GLenum textarget GLuint texture GLint level void glNamedFramebufferTexture3DEXT GLuint framebuffer GLenum attachment GLenum textarget GLuint texture GLint level GLint zoffset void glNamedFramebufferTextureEXT GLuint framebuffer GLenum attachment GLuint texture GLint level void glNamedFramebufferTextureFaceEXT GLuint framebuffer GLenum attachment GLuint texture GLint level GLenum face void glNamedFramebufferTextureLayer GLuint framebuffer GLenum attachment GLuint texture GLint level GLint layer void glNamedFramebufferTextureLayerEXT GLuint framebuffer GLenum attachment GLuint texture GLint level GLint layer void glNamedProgramLocalParameter4dEXT GLuint program GLenum target GLuint index GLdouble x GLdouble y GLdouble z GLdouble w void glNamedProgramLocalParameter4dvEXT GLuint program GLenum target GLuint index const GLdouble *params void glNamedProgramLocalParameter4fEXT GLuint program GLenum target GLuint index GLfloat x GLfloat y GLfloat z GLfloat w void glNamedProgramLocalParameter4fvEXT GLuint program GLenum target GLuint index const GLfloat *params void glNamedProgramLocalParameterI4iEXT GLuint program GLenum target GLuint index GLint x GLint y GLint z GLint w void glNamedProgramLocalParameterI4ivEXT GLuint program GLenum target GLuint index const GLint *params void glNamedProgramLocalParameterI4uiEXT GLuint program GLenum target GLuint index GLuint x GLuint y GLuint z GLuint w void glNamedProgramLocalParameterI4uivEXT GLuint program GLenum target GLuint index const GLuint *params void glNamedProgramLocalParameters4fvEXT GLuint program GLenum target GLuint index GLsizei count const GLfloat *params void glNamedProgramLocalParametersI4ivEXT GLuint program GLenum target GLuint index GLsizei count const GLint *params void glNamedProgramLocalParametersI4uivEXT GLuint program GLenum target GLuint index GLsizei count const GLuint *params void glNamedProgramStringEXT GLuint program GLenum target GLenum format GLsizei len const void *string void glNamedRenderbufferStorage GLuint renderbuffer GLenum internalformat GLsizei width GLsizei height void glNamedRenderbufferStorageEXT GLuint renderbuffer GLenum internalformat GLsizei width GLsizei height void glNamedRenderbufferStorageMultisample GLuint renderbuffer GLsizei samples GLenum internalformat GLsizei width GLsizei height void glNamedRenderbufferStorageMultisampleAdvancedAMD GLuint renderbuffer GLsizei samples GLsizei storageSamples GLenum internalformat GLsizei width GLsizei height void glNamedRenderbufferStorageMultisampleCoverageEXT GLuint renderbuffer GLsizei coverageSamples GLsizei colorSamples GLenum internalformat GLsizei width GLsizei height void glNamedRenderbufferStorageMultisampleEXT GLuint renderbuffer GLsizei samples GLenum internalformat GLsizei width GLsizei height void glNamedStringARB GLenum type GLint namelen const GLchar *name GLint stringlen const GLchar *string void glNewList GLuint list GLenum mode GLuint glNewObjectBufferATI GLsizei size const void *pointer GLenum usage void glNormal3b GLbyte nx GLbyte ny GLbyte nz void glNormal3bv const GLbyte *v void glNormal3d GLdouble nx GLdouble ny GLdouble nz void glNormal3dv const GLdouble *v void glNormal3f GLfloat nx GLfloat ny GLfloat nz void glNormal3fVertex3fSUN GLfloat nx GLfloat ny GLfloat nz GLfloat x GLfloat y GLfloat z void glNormal3fVertex3fvSUN const GLfloat *n const GLfloat *v void glNormal3fv const GLfloat *v void glNormal3hNV GLhalfNV nx GLhalfNV ny GLhalfNV nz void glNormal3hvNV const GLhalfNV *v void glNormal3i GLint nx GLint ny GLint nz void glNormal3iv const GLint *v void glNormal3s GLshort nx GLshort ny GLshort nz void glNormal3sv const GLshort *v void glNormal3x GLfixed nx GLfixed ny GLfixed nz void glNormal3xOES GLfixed nx GLfixed ny GLfixed nz void glNormal3xvOES const GLfixed *coords void glNormalFormatNV GLenum type GLsizei stride void glNormalP3ui GLenum type GLuint coords void glNormalP3uiv GLenum type const GLuint *coords void glNormalPointer GLenum type GLsizei stride const void *pointer void glNormalPointerEXT GLenum type GLsizei stride GLsizei count const void *pointer void glNormalPointerListIBM GLenum type GLint stride const void **pointer GLint ptrstride void glNormalPointervINTEL GLenum type const void **pointer void glNormalStream3bATI GLenum stream GLbyte nx GLbyte ny GLbyte nz void glNormalStream3bvATI GLenum stream const GLbyte *coords void glNormalStream3dATI GLenum stream GLdouble nx GLdouble ny GLdouble nz void glNormalStream3dvATI GLenum stream const GLdouble *coords void glNormalStream3fATI GLenum stream GLfloat nx GLfloat ny GLfloat nz void glNormalStream3fvATI GLenum stream const GLfloat *coords void glNormalStream3iATI GLenum stream GLint nx GLint ny GLint nz void glNormalStream3ivATI GLenum stream const GLint *coords void glNormalStream3sATI GLenum stream GLshort nx GLshort ny GLshort nz void glNormalStream3svATI GLenum stream const GLshort *coords void glObjectLabel GLenum identifier GLuint name GLsizei length const GLchar *label void glObjectLabelKHR GLenum identifier GLuint name GLsizei length const GLchar *label void glObjectPtrLabel const void *ptr GLsizei length const GLchar *label void glObjectPtrLabelKHR const void *ptr GLsizei length const GLchar *label GLenum glObjectPurgeableAPPLE GLenum objectType GLuint name GLenum option GLenum glObjectUnpurgeableAPPLE GLenum objectType GLuint name GLenum option void glOrtho GLdouble left GLdouble right GLdouble bottom GLdouble top GLdouble zNear GLdouble zFar void glOrthof GLfloat l GLfloat r GLfloat b GLfloat t GLfloat n GLfloat f void glOrthofOES GLfloat l GLfloat r GLfloat b GLfloat t GLfloat n GLfloat f void glOrthox GLfixed l GLfixed r GLfixed b GLfixed t GLfixed n GLfixed f void glOrthoxOES GLfixed l GLfixed r GLfixed b GLfixed t GLfixed n GLfixed f void glPNTrianglesfATI GLenum pname GLfloat param void glPNTrianglesiATI GLenum pname GLint param void glPassTexCoordATI GLuint dst GLuint coord GLenum swizzle void glPassThrough GLfloat token void glPassThroughxOES GLfixed token void glPatchParameterfv GLenum pname const GLfloat *values void glPatchParameteri GLenum pname GLint value void glPatchParameteriEXT GLenum pname GLint value void glPatchParameteriOES GLenum pname GLint value void glPathColorGenNV GLenum color GLenum genMode GLenum colorFormat const GLfloat *coeffs void glPathCommandsNV GLuint path GLsizei numCommands const GLubyte *commands GLsizei numCoords GLenum coordType const void *coords void glPathCoordsNV GLuint path GLsizei numCoords GLenum coordType const void *coords void glPathCoverDepthFuncNV GLenum func void glPathDashArrayNV GLuint path GLsizei dashCount const GLfloat *dashArray void glPathFogGenNV GLenum genMode GLenum glPathGlyphIndexArrayNV GLuint firstPathName GLenum fontTarget const void *fontName GLbitfield fontStyle GLuint firstGlyphIndex GLsizei numGlyphs GLuint pathParameterTemplate GLfloat emScale GLenum glPathGlyphIndexRangeNV GLenum fontTarget const void *fontName GLbitfield fontStyle GLuint pathParameterTemplate GLfloat emScale GLuint *baseAndCount void glPathGlyphRangeNV GLuint firstPathName GLenum fontTarget const void *fontName GLbitfield fontStyle GLuint firstGlyph GLsizei numGlyphs GLenum handleMissingGlyphs GLuint pathParameterTemplate GLfloat emScale void glPathGlyphsNV GLuint firstPathName GLenum fontTarget const void *fontName GLbitfield fontStyle GLsizei numGlyphs GLenum type const void *charcodes GLenum handleMissingGlyphs GLuint pathParameterTemplate GLfloat emScale GLenum glPathMemoryGlyphIndexArrayNV GLuint firstPathName GLenum fontTarget GLsizeiptr fontSize const void *fontData GLsizei faceIndex GLuint firstGlyphIndex GLsizei numGlyphs GLuint pathParameterTemplate GLfloat emScale void glPathParameterfNV GLuint path GLenum pname GLfloat value void glPathParameterfvNV GLuint path GLenum pname const GLfloat *value void glPathParameteriNV GLuint path GLenum pname GLint value void glPathParameterivNV GLuint path GLenum pname const GLint *value void glPathStencilDepthOffsetNV GLfloat factor GLfloat units void glPathStencilFuncNV GLenum func GLint ref GLuint mask void glPathStringNV GLuint path GLenum format GLsizei length const void *pathString void glPathSubCommandsNV GLuint path GLsizei commandStart GLsizei commandsToDelete GLsizei numCommands const GLubyte *commands GLsizei numCoords GLenum coordType const void *coords void glPathSubCoordsNV GLuint path GLsizei coordStart GLsizei numCoords GLenum coordType const void *coords void glPathTexGenNV GLenum texCoordSet GLenum genMode GLint components const GLfloat *coeffs void glPauseTransformFeedback void glPauseTransformFeedbackNV void glPixelDataRangeNV GLenum target GLsizei length const void *pointer void glPixelMapfv GLenum map GLsizei mapsize const GLfloat *values void glPixelMapuiv GLenum map GLsizei mapsize const GLuint *values void glPixelMapusv GLenum map GLsizei mapsize const GLushort *values void glPixelMapx GLenum map GLint size const GLfixed *values void glPixelStoref GLenum pname GLfloat param void glPixelStorei GLenum pname GLint param void glPixelStorex GLenum pname GLfixed param void glPixelTexGenParameterfSGIS GLenum pname GLfloat param void glPixelTexGenParameterfvSGIS GLenum pname const GLfloat *params void glPixelTexGenParameteriSGIS GLenum pname GLint param void glPixelTexGenParameterivSGIS GLenum pname const GLint *params void glPixelTexGenSGIX GLenum mode void glPixelTransferf GLenum pname GLfloat param void glPixelTransferi GLenum pname GLint param void glPixelTransferxOES GLenum pname GLfixed param void glPixelTransformParameterfEXT GLenum target GLenum pname GLfloat param void glPixelTransformParameterfvEXT GLenum target GLenum pname const GLfloat *params void glPixelTransformParameteriEXT GLenum target GLenum pname GLint param void glPixelTransformParameterivEXT GLenum target GLenum pname const GLint *params void glPixelZoom GLfloat xfactor GLfloat yfactor void glPixelZoomxOES GLfixed xfactor GLfixed yfactor GLboolean glPointAlongPathNV GLuint path GLsizei startSegment GLsizei numSegments GLfloat distance GLfloat *x GLfloat *y GLfloat *tangentX GLfloat *tangentY void glPointParameterf GLenum pname GLfloat param void glPointParameterfARB GLenum pname GLfloat param void glPointParameterfEXT GLenum pname GLfloat param void glPointParameterfSGIS GLenum pname GLfloat param void glPointParameterfv GLenum pname const GLfloat *params void glPointParameterfvARB GLenum pname const GLfloat *params void glPointParameterfvEXT GLenum pname const GLfloat *params void glPointParameterfvSGIS GLenum pname const GLfloat *params void glPointParameteri GLenum pname GLint param void glPointParameteriNV GLenum pname GLint param void glPointParameteriv GLenum pname const GLint *params void glPointParameterivNV GLenum pname const GLint *params void glPointParameterx GLenum pname GLfixed param void glPointParameterxOES GLenum pname GLfixed param void glPointParameterxv GLenum pname const GLfixed *params void glPointParameterxvOES GLenum pname const GLfixed *params void glPointSize GLfloat size void glPointSizePointerOES GLenum type GLsizei stride const void *pointer void glPointSizex GLfixed size void glPointSizexOES GLfixed size GLint glPollAsyncSGIX GLuint *markerp GLint glPollInstrumentsSGIX GLint *marker_p void glPolygonMode GLenum face GLenum mode void glPolygonModeNV GLenum face GLenum mode void glPolygonOffset GLfloat factor GLfloat units void glPolygonOffsetClamp GLfloat factor GLfloat units GLfloat clamp void glPolygonOffsetClampEXT GLfloat factor GLfloat units GLfloat clamp void glPolygonOffsetEXT GLfloat factor GLfloat bias void glPolygonOffsetx GLfixed factor GLfixed units void glPolygonOffsetxOES GLfixed factor GLfixed units void glPolygonStipple const GLubyte *mask void glPopAttrib void glPopClientAttrib void glPopDebugGroup void glPopDebugGroupKHR void glPopGroupMarkerEXT void glPopMatrix void glPopName void glPresentFrameDualFillNV GLuint video_slot GLuint64EXT minPresentTime GLuint beginPresentTimeId GLuint presentDurationId GLenum type GLenum target0 GLuint fill0 GLenum target1 GLuint fill1 GLenum target2 GLuint fill2 GLenum target3 GLuint fill3 void glPresentFrameKeyedNV GLuint video_slot GLuint64EXT minPresentTime GLuint beginPresentTimeId GLuint presentDurationId GLenum type GLenum target0 GLuint fill0 GLuint key0 GLenum target1 GLuint fill1 GLuint key1 void glPrimitiveBoundingBox GLfloat minX GLfloat minY GLfloat minZ GLfloat minW GLfloat maxX GLfloat maxY GLfloat maxZ GLfloat maxW void glPrimitiveBoundingBoxARB GLfloat minX GLfloat minY GLfloat minZ GLfloat minW GLfloat maxX GLfloat maxY GLfloat maxZ GLfloat maxW void glPrimitiveBoundingBoxEXT GLfloat minX GLfloat minY GLfloat minZ GLfloat minW GLfloat maxX GLfloat maxY GLfloat maxZ GLfloat maxW void glPrimitiveBoundingBoxOES GLfloat minX GLfloat minY GLfloat minZ GLfloat minW GLfloat maxX GLfloat maxY GLfloat maxZ GLfloat maxW void glPrimitiveRestartIndex GLuint index void glPrimitiveRestartIndexNV GLuint index void glPrimitiveRestartNV void glPrioritizeTextures GLsizei n const GLuint *textures const GLfloat *priorities void glPrioritizeTexturesEXT GLsizei n const GLuint *textures const GLclampf *priorities void glPrioritizeTexturesxOES GLsizei n const GLuint *textures const GLfixed *priorities void glProgramBinary GLuint program GLenum binaryFormat const void *binary GLsizei length void glProgramBinaryOES GLuint program GLenum binaryFormat const void *binary GLint length void glProgramBufferParametersIivNV GLenum target GLuint bindingIndex GLuint wordIndex GLsizei count const GLint *params void glProgramBufferParametersIuivNV GLenum target GLuint bindingIndex GLuint wordIndex GLsizei count const GLuint *params void glProgramBufferParametersfvNV GLenum target GLuint bindingIndex GLuint wordIndex GLsizei count const GLfloat *params void glProgramEnvParameter4dARB GLenum target GLuint index GLdouble x GLdouble y GLdouble z GLdouble w void glProgramEnvParameter4dvARB GLenum target GLuint index const GLdouble *params void glProgramEnvParameter4fARB GLenum target GLuint index GLfloat x GLfloat y GLfloat z GLfloat w void glProgramEnvParameter4fvARB GLenum target GLuint index const GLfloat *params void glProgramEnvParameterI4iNV GLenum target GLuint index GLint x GLint y GLint z GLint w void glProgramEnvParameterI4ivNV GLenum target GLuint index const GLint *params void glProgramEnvParameterI4uiNV GLenum target GLuint index GLuint x GLuint y GLuint z GLuint w void glProgramEnvParameterI4uivNV GLenum target GLuint index const GLuint *params void glProgramEnvParameters4fvEXT GLenum target GLuint index GLsizei count const GLfloat *params void glProgramEnvParametersI4ivNV GLenum target GLuint index GLsizei count const GLint *params void glProgramEnvParametersI4uivNV GLenum target GLuint index GLsizei count const GLuint *params void glProgramLocalParameter4dARB GLenum target GLuint index GLdouble x GLdouble y GLdouble z GLdouble w void glProgramLocalParameter4dvARB GLenum target GLuint index const GLdouble *params void glProgramLocalParameter4fARB GLenum target GLuint index GLfloat x GLfloat y GLfloat z GLfloat w void glProgramLocalParameter4fvARB GLenum target GLuint index const GLfloat *params void glProgramLocalParameterI4iNV GLenum target GLuint index GLint x GLint y GLint z GLint w void glProgramLocalParameterI4ivNV GLenum target GLuint index const GLint *params void glProgramLocalParameterI4uiNV GLenum target GLuint index GLuint x GLuint y GLuint z GLuint w void glProgramLocalParameterI4uivNV GLenum target GLuint index const GLuint *params void glProgramLocalParameters4fvEXT GLenum target GLuint index GLsizei count const GLfloat *params void glProgramLocalParametersI4ivNV GLenum target GLuint index GLsizei count const GLint *params void glProgramLocalParametersI4uivNV GLenum target GLuint index GLsizei count const GLuint *params void glProgramNamedParameter4dNV GLuint id GLsizei len const GLubyte *name GLdouble x GLdouble y GLdouble z GLdouble w void glProgramNamedParameter4dvNV GLuint id GLsizei len const GLubyte *name const GLdouble *v void glProgramNamedParameter4fNV GLuint id GLsizei len const GLubyte *name GLfloat x GLfloat y GLfloat z GLfloat w void glProgramNamedParameter4fvNV GLuint id GLsizei len const GLubyte *name const GLfloat *v void glProgramParameter4dNV GLenum target GLuint index GLdouble x GLdouble y GLdouble z GLdouble w void glProgramParameter4dvNV GLenum target GLuint index const GLdouble *v void glProgramParameter4fNV GLenum target GLuint index GLfloat x GLfloat y GLfloat z GLfloat w void glProgramParameter4fvNV GLenum target GLuint index const GLfloat *v void glProgramParameteri GLuint program GLenum pname GLint value void glProgramParameteriARB GLuint program GLenum pname GLint value void glProgramParameteriEXT GLuint program GLenum pname GLint value void glProgramParameters4dvNV GLenum target GLuint index GLsizei count const GLdouble *v void glProgramParameters4fvNV GLenum target GLuint index GLsizei count const GLfloat *v void glProgramPathFragmentInputGenNV GLuint program GLint location GLenum genMode GLint components const GLfloat *coeffs void glProgramStringARB GLenum target GLenum format GLsizei len const void *string void glProgramSubroutineParametersuivNV GLenum target GLsizei count const GLuint *params void glProgramUniform1d GLuint program GLint location GLdouble v0 void glProgramUniform1dEXT GLuint program GLint location GLdouble x void glProgramUniform1dv GLuint program GLint location GLsizei count const GLdouble *value void glProgramUniform1dvEXT GLuint program GLint location GLsizei count const GLdouble *value void glProgramUniform1f GLuint program GLint location GLfloat v0 void glProgramUniform1fEXT GLuint program GLint location GLfloat v0 void glProgramUniform1fv GLuint program GLint location GLsizei count const GLfloat *value void glProgramUniform1fvEXT GLuint program GLint location GLsizei count const GLfloat *value void glProgramUniform1i GLuint program GLint location GLint v0 void glProgramUniform1i64ARB GLuint program GLint location GLint64 x void glProgramUniform1i64NV GLuint program GLint location GLint64EXT x void glProgramUniform1i64vARB GLuint program GLint location GLsizei count const GLint64 *value void glProgramUniform1i64vNV GLuint program GLint location GLsizei count const GLint64EXT *value void glProgramUniform1iEXT GLuint program GLint location GLint v0 void glProgramUniform1iv GLuint program GLint location GLsizei count const GLint *value void glProgramUniform1ivEXT GLuint program GLint location GLsizei count const GLint *value void glProgramUniform1ui GLuint program GLint location GLuint v0 void glProgramUniform1ui64ARB GLuint program GLint location GLuint64 x void glProgramUniform1ui64NV GLuint program GLint location GLuint64EXT x void glProgramUniform1ui64vARB GLuint program GLint location GLsizei count const GLuint64 *value void glProgramUniform1ui64vNV GLuint program GLint location GLsizei count const GLuint64EXT *value void glProgramUniform1uiEXT GLuint program GLint location GLuint v0 void glProgramUniform1uiv GLuint program GLint location GLsizei count const GLuint *value void glProgramUniform1uivEXT GLuint program GLint location GLsizei count const GLuint *value void glProgramUniform2d GLuint program GLint location GLdouble v0 GLdouble v1 void glProgramUniform2dEXT GLuint program GLint location GLdouble x GLdouble y void glProgramUniform2dv GLuint program GLint location GLsizei count const GLdouble *value void glProgramUniform2dvEXT GLuint program GLint location GLsizei count const GLdouble *value void glProgramUniform2f GLuint program GLint location GLfloat v0 GLfloat v1 void glProgramUniform2fEXT GLuint program GLint location GLfloat v0 GLfloat v1 void glProgramUniform2fv GLuint program GLint location GLsizei count const GLfloat *value void glProgramUniform2fvEXT GLuint program GLint location GLsizei count const GLfloat *value void glProgramUniform2i GLuint program GLint location GLint v0 GLint v1 void glProgramUniform2i64ARB GLuint program GLint location GLint64 x GLint64 y void glProgramUniform2i64NV GLuint program GLint location GLint64EXT x GLint64EXT y void glProgramUniform2i64vARB GLuint program GLint location GLsizei count const GLint64 *value void glProgramUniform2i64vNV GLuint program GLint location GLsizei count const GLint64EXT *value void glProgramUniform2iEXT GLuint program GLint location GLint v0 GLint v1 void glProgramUniform2iv GLuint program GLint location GLsizei count const GLint *value void glProgramUniform2ivEXT GLuint program GLint location GLsizei count const GLint *value void glProgramUniform2ui GLuint program GLint location GLuint v0 GLuint v1 void glProgramUniform2ui64ARB GLuint program GLint location GLuint64 x GLuint64 y void glProgramUniform2ui64NV GLuint program GLint location GLuint64EXT x GLuint64EXT y void glProgramUniform2ui64vARB GLuint program GLint location GLsizei count const GLuint64 *value void glProgramUniform2ui64vNV GLuint program GLint location GLsizei count const GLuint64EXT *value void glProgramUniform2uiEXT GLuint program GLint location GLuint v0 GLuint v1 void glProgramUniform2uiv GLuint program GLint location GLsizei count const GLuint *value void glProgramUniform2uivEXT GLuint program GLint location GLsizei count const GLuint *value void glProgramUniform3d GLuint program GLint location GLdouble v0 GLdouble v1 GLdouble v2 void glProgramUniform3dEXT GLuint program GLint location GLdouble x GLdouble y GLdouble z void glProgramUniform3dv GLuint program GLint location GLsizei count const GLdouble *value void glProgramUniform3dvEXT GLuint program GLint location GLsizei count const GLdouble *value void glProgramUniform3f GLuint program GLint location GLfloat v0 GLfloat v1 GLfloat v2 void glProgramUniform3fEXT GLuint program GLint location GLfloat v0 GLfloat v1 GLfloat v2 void glProgramUniform3fv GLuint program GLint location GLsizei count const GLfloat *value void glProgramUniform3fvEXT GLuint program GLint location GLsizei count const GLfloat *value void glProgramUniform3i GLuint program GLint location GLint v0 GLint v1 GLint v2 void glProgramUniform3i64ARB GLuint program GLint location GLint64 x GLint64 y GLint64 z void glProgramUniform3i64NV GLuint program GLint location GLint64EXT x GLint64EXT y GLint64EXT z void glProgramUniform3i64vARB GLuint program GLint location GLsizei count const GLint64 *value void glProgramUniform3i64vNV GLuint program GLint location GLsizei count const GLint64EXT *value void glProgramUniform3iEXT GLuint program GLint location GLint v0 GLint v1 GLint v2 void glProgramUniform3iv GLuint program GLint location GLsizei count const GLint *value void glProgramUniform3ivEXT GLuint program GLint location GLsizei count const GLint *value void glProgramUniform3ui GLuint program GLint location GLuint v0 GLuint v1 GLuint v2 void glProgramUniform3ui64ARB GLuint program GLint location GLuint64 x GLuint64 y GLuint64 z void glProgramUniform3ui64NV GLuint program GLint location GLuint64EXT x GLuint64EXT y GLuint64EXT z void glProgramUniform3ui64vARB GLuint program GLint location GLsizei count const GLuint64 *value void glProgramUniform3ui64vNV GLuint program GLint location GLsizei count const GLuint64EXT *value void glProgramUniform3uiEXT GLuint program GLint location GLuint v0 GLuint v1 GLuint v2 void glProgramUniform3uiv GLuint program GLint location GLsizei count const GLuint *value void glProgramUniform3uivEXT GLuint program GLint location GLsizei count const GLuint *value void glProgramUniform4d GLuint program GLint location GLdouble v0 GLdouble v1 GLdouble v2 GLdouble v3 void glProgramUniform4dEXT GLuint program GLint location GLdouble x GLdouble y GLdouble z GLdouble w void glProgramUniform4dv GLuint program GLint location GLsizei count const GLdouble *value void glProgramUniform4dvEXT GLuint program GLint location GLsizei count const GLdouble *value void glProgramUniform4f GLuint program GLint location GLfloat v0 GLfloat v1 GLfloat v2 GLfloat v3 void glProgramUniform4fEXT GLuint program GLint location GLfloat v0 GLfloat v1 GLfloat v2 GLfloat v3 void glProgramUniform4fv GLuint program GLint location GLsizei count const GLfloat *value void glProgramUniform4fvEXT GLuint program GLint location GLsizei count const GLfloat *value void glProgramUniform4i GLuint program GLint location GLint v0 GLint v1 GLint v2 GLint v3 void glProgramUniform4i64ARB GLuint program GLint location GLint64 x GLint64 y GLint64 z GLint64 w void glProgramUniform4i64NV GLuint program GLint location GLint64EXT x GLint64EXT y GLint64EXT z GLint64EXT w void glProgramUniform4i64vARB GLuint program GLint location GLsizei count const GLint64 *value void glProgramUniform4i64vNV GLuint program GLint location GLsizei count const GLint64EXT *value void glProgramUniform4iEXT GLuint program GLint location GLint v0 GLint v1 GLint v2 GLint v3 void glProgramUniform4iv GLuint program GLint location GLsizei count const GLint *value void glProgramUniform4ivEXT GLuint program GLint location GLsizei count const GLint *value void glProgramUniform4ui GLuint program GLint location GLuint v0 GLuint v1 GLuint v2 GLuint v3 void glProgramUniform4ui64ARB GLuint program GLint location GLuint64 x GLuint64 y GLuint64 z GLuint64 w void glProgramUniform4ui64NV GLuint program GLint location GLuint64EXT x GLuint64EXT y GLuint64EXT z GLuint64EXT w void glProgramUniform4ui64vARB GLuint program GLint location GLsizei count const GLuint64 *value void glProgramUniform4ui64vNV GLuint program GLint location GLsizei count const GLuint64EXT *value void glProgramUniform4uiEXT GLuint program GLint location GLuint v0 GLuint v1 GLuint v2 GLuint v3 void glProgramUniform4uiv GLuint program GLint location GLsizei count const GLuint *value void glProgramUniform4uivEXT GLuint program GLint location GLsizei count const GLuint *value void glProgramUniformHandleui64ARB GLuint program GLint location GLuint64 value void glProgramUniformHandleui64IMG GLuint program GLint location GLuint64 value void glProgramUniformHandleui64NV GLuint program GLint location GLuint64 value void glProgramUniformHandleui64vARB GLuint program GLint location GLsizei count const GLuint64 *values void glProgramUniformHandleui64vIMG GLuint program GLint location GLsizei count const GLuint64 *values void glProgramUniformHandleui64vNV GLuint program GLint location GLsizei count const GLuint64 *values void glProgramUniformMatrix2dv GLuint program GLint location GLsizei count GLboolean transpose const GLdouble *value void glProgramUniformMatrix2dvEXT GLuint program GLint location GLsizei count GLboolean transpose const GLdouble *value void glProgramUniformMatrix2fv GLuint program GLint location GLsizei count GLboolean transpose const GLfloat *value void glProgramUniformMatrix2fvEXT GLuint program GLint location GLsizei count GLboolean transpose const GLfloat *value void glProgramUniformMatrix2x3dv GLuint program GLint location GLsizei count GLboolean transpose const GLdouble *value void glProgramUniformMatrix2x3dvEXT GLuint program GLint location GLsizei count GLboolean transpose const GLdouble *value void glProgramUniformMatrix2x3fv GLuint program GLint location GLsizei count GLboolean transpose const GLfloat *value void glProgramUniformMatrix2x3fvEXT GLuint program GLint location GLsizei count GLboolean transpose const GLfloat *value void glProgramUniformMatrix2x4dv GLuint program GLint location GLsizei count GLboolean transpose const GLdouble *value void glProgramUniformMatrix2x4dvEXT GLuint program GLint location GLsizei count GLboolean transpose const GLdouble *value void glProgramUniformMatrix2x4fv GLuint program GLint location GLsizei count GLboolean transpose const GLfloat *value void glProgramUniformMatrix2x4fvEXT GLuint program GLint location GLsizei count GLboolean transpose const GLfloat *value void glProgramUniformMatrix3dv GLuint program GLint location GLsizei count GLboolean transpose const GLdouble *value void glProgramUniformMatrix3dvEXT GLuint program GLint location GLsizei count GLboolean transpose const GLdouble *value void glProgramUniformMatrix3fv GLuint program GLint location GLsizei count GLboolean transpose const GLfloat *value void glProgramUniformMatrix3fvEXT GLuint program GLint location GLsizei count GLboolean transpose const GLfloat *value void glProgramUniformMatrix3x2dv GLuint program GLint location GLsizei count GLboolean transpose const GLdouble *value void glProgramUniformMatrix3x2dvEXT GLuint program GLint location GLsizei count GLboolean transpose const GLdouble *value void glProgramUniformMatrix3x2fv GLuint program GLint location GLsizei count GLboolean transpose const GLfloat *value void glProgramUniformMatrix3x2fvEXT GLuint program GLint location GLsizei count GLboolean transpose const GLfloat *value void glProgramUniformMatrix3x4dv GLuint program GLint location GLsizei count GLboolean transpose const GLdouble *value void glProgramUniformMatrix3x4dvEXT GLuint program GLint location GLsizei count GLboolean transpose const GLdouble *value void glProgramUniformMatrix3x4fv GLuint program GLint location GLsizei count GLboolean transpose const GLfloat *value void glProgramUniformMatrix3x4fvEXT GLuint program GLint location GLsizei count GLboolean transpose const GLfloat *value void glProgramUniformMatrix4dv GLuint program GLint location GLsizei count GLboolean transpose const GLdouble *value void glProgramUniformMatrix4dvEXT GLuint program GLint location GLsizei count GLboolean transpose const GLdouble *value void glProgramUniformMatrix4fv GLuint program GLint location GLsizei count GLboolean transpose const GLfloat *value void glProgramUniformMatrix4fvEXT GLuint program GLint location GLsizei count GLboolean transpose const GLfloat *value void glProgramUniformMatrix4x2dv GLuint program GLint location GLsizei count GLboolean transpose const GLdouble *value void glProgramUniformMatrix4x2dvEXT GLuint program GLint location GLsizei count GLboolean transpose const GLdouble *value void glProgramUniformMatrix4x2fv GLuint program GLint location GLsizei count GLboolean transpose const GLfloat *value void glProgramUniformMatrix4x2fvEXT GLuint program GLint location GLsizei count GLboolean transpose const GLfloat *value void glProgramUniformMatrix4x3dv GLuint program GLint location GLsizei count GLboolean transpose const GLdouble *value void glProgramUniformMatrix4x3dvEXT GLuint program GLint location GLsizei count GLboolean transpose const GLdouble *value void glProgramUniformMatrix4x3fv GLuint program GLint location GLsizei count GLboolean transpose const GLfloat *value void glProgramUniformMatrix4x3fvEXT GLuint program GLint location GLsizei count GLboolean transpose const GLfloat *value void glProgramUniformui64NV GLuint program GLint location GLuint64EXT value void glProgramUniformui64vNV GLuint program GLint location GLsizei count const GLuint64EXT *value void glProgramVertexLimitNV GLenum target GLint limit void glProvokingVertex GLenum mode void glProvokingVertexEXT GLenum mode void glPushAttrib GLbitfield mask void glPushClientAttrib GLbitfield mask void glPushClientAttribDefaultEXT GLbitfield mask void glPushDebugGroup GLenum source GLuint id GLsizei length const GLchar *message void glPushDebugGroupKHR GLenum source GLuint id GLsizei length const GLchar *message void glPushGroupMarkerEXT GLsizei length const GLchar *marker void glPushMatrix void glPushName GLuint name void glQueryCounter GLuint id GLenum target void glQueryCounterEXT GLuint id GLenum target GLbitfield glQueryMatrixxOES GLfixed *mantissa GLint *exponent void glQueryObjectParameteruiAMD GLenum target GLuint id GLenum pname GLuint param GLint glQueryResourceNV GLenum queryType GLint tagId GLuint count GLint *buffer void glQueryResourceTagNV GLint tagId const GLchar *tagString void glRasterPos2d GLdouble x GLdouble y void glRasterPos2dv const GLdouble *v void glRasterPos2f GLfloat x GLfloat y void glRasterPos2fv const GLfloat *v void glRasterPos2i GLint x GLint y void glRasterPos2iv const GLint *v void glRasterPos2s GLshort x GLshort y void glRasterPos2sv const GLshort *v void glRasterPos2xOES GLfixed x GLfixed y void glRasterPos2xvOES const GLfixed *coords void glRasterPos3d GLdouble x GLdouble y GLdouble z void glRasterPos3dv const GLdouble *v void glRasterPos3f GLfloat x GLfloat y GLfloat z void glRasterPos3fv const GLfloat *v void glRasterPos3i GLint x GLint y GLint z void glRasterPos3iv const GLint *v void glRasterPos3s GLshort x GLshort y GLshort z void glRasterPos3sv const GLshort *v void glRasterPos3xOES GLfixed x GLfixed y GLfixed z void glRasterPos3xvOES const GLfixed *coords void glRasterPos4d GLdouble x GLdouble y GLdouble z GLdouble w void glRasterPos4dv const GLdouble *v void glRasterPos4f GLfloat x GLfloat y GLfloat z GLfloat w void glRasterPos4fv const GLfloat *v void glRasterPos4i GLint x GLint y GLint z GLint w void glRasterPos4iv const GLint *v void glRasterPos4s GLshort x GLshort y GLshort z GLshort w void glRasterPos4sv const GLshort *v void glRasterPos4xOES GLfixed x GLfixed y GLfixed z GLfixed w void glRasterPos4xvOES const GLfixed *coords void glRasterSamplesEXT GLuint samples GLboolean fixedsamplelocations void glReadBuffer GLenum src void glReadBufferIndexedEXT GLenum src GLint index void glReadBufferNV GLenum mode void glReadInstrumentsSGIX GLint marker void glReadPixels GLint x GLint y GLsizei width GLsizei height GLenum format GLenum type void *pixels void glReadnPixels GLint x GLint y GLsizei width GLsizei height GLenum format GLenum type GLsizei bufSize void *data void glReadnPixelsARB GLint x GLint y GLsizei width GLsizei height GLenum format GLenum type GLsizei bufSize void *data void glReadnPixelsEXT GLint x GLint y GLsizei width GLsizei height GLenum format GLenum type GLsizei bufSize void *data void glReadnPixelsKHR GLint x GLint y GLsizei width GLsizei height GLenum format GLenum type GLsizei bufSize void *data GLboolean glReleaseKeyedMutexWin32EXT GLuint memory GLuint64 key void glRectd GLdouble x1 GLdouble y1 GLdouble x2 GLdouble y2 void glRectdv const GLdouble *v1 const GLdouble *v2 void glRectf GLfloat x1 GLfloat y1 GLfloat x2 GLfloat y2 void glRectfv const GLfloat *v1 const GLfloat *v2 void glRecti GLint x1 GLint y1 GLint x2 GLint y2 void glRectiv const GLint *v1 const GLint *v2 void glRects GLshort x1 GLshort y1 GLshort x2 GLshort y2 void glRectsv const GLshort *v1 const GLshort *v2 void glRectxOES GLfixed x1 GLfixed y1 GLfixed x2 GLfixed y2 void glRectxvOES const GLfixed *v1 const GLfixed *v2 void glReferencePlaneSGIX const GLdouble *equation void glReleaseShaderCompiler void glRenderGpuMaskNV GLbitfield mask GLint glRenderMode GLenum mode void glRenderbufferStorage GLenum target GLenum internalformat GLsizei width GLsizei height void glRenderbufferStorageEXT GLenum target GLenum internalformat GLsizei width GLsizei height void glRenderbufferStorageMultisample GLenum target GLsizei samples GLenum internalformat GLsizei width GLsizei height void glRenderbufferStorageMultisampleANGLE GLenum target GLsizei samples GLenum internalformat GLsizei width GLsizei height void glRenderbufferStorageMultisampleAPPLE GLenum target GLsizei samples GLenum internalformat GLsizei width GLsizei height void glRenderbufferStorageMultisampleAdvancedAMD GLenum target GLsizei samples GLsizei storageSamples GLenum internalformat GLsizei width GLsizei height void glRenderbufferStorageMultisampleCoverageNV GLenum target GLsizei coverageSamples GLsizei colorSamples GLenum internalformat GLsizei width GLsizei height void glRenderbufferStorageMultisampleEXT GLenum target GLsizei samples GLenum internalformat GLsizei width GLsizei height void glRenderbufferStorageMultisampleIMG GLenum target GLsizei samples GLenum internalformat GLsizei width GLsizei height void glRenderbufferStorageMultisampleNV GLenum target GLsizei samples GLenum internalformat GLsizei width GLsizei height void glRenderbufferStorageOES GLenum target GLenum internalformat GLsizei width GLsizei height void glReplacementCodePointerSUN GLenum type GLsizei stride const void **pointer void glReplacementCodeubSUN GLubyte code void glReplacementCodeubvSUN const GLubyte *code void glReplacementCodeuiColor3fVertex3fSUN GLuint rc GLfloat r GLfloat g GLfloat b GLfloat x GLfloat y GLfloat z void glReplacementCodeuiColor3fVertex3fvSUN const GLuint *rc const GLfloat *c const GLfloat *v void glReplacementCodeuiColor4fNormal3fVertex3fSUN GLuint rc GLfloat r GLfloat g GLfloat b GLfloat a GLfloat nx GLfloat ny GLfloat nz GLfloat x GLfloat y GLfloat z void glReplacementCodeuiColor4fNormal3fVertex3fvSUN const GLuint *rc const GLfloat *c const GLfloat *n const GLfloat *v void glReplacementCodeuiColor4ubVertex3fSUN GLuint rc GLubyte r GLubyte g GLubyte b GLubyte a GLfloat x GLfloat y GLfloat z void glReplacementCodeuiColor4ubVertex3fvSUN const GLuint *rc const GLubyte *c const GLfloat *v void glReplacementCodeuiNormal3fVertex3fSUN GLuint rc GLfloat nx GLfloat ny GLfloat nz GLfloat x GLfloat y GLfloat z void glReplacementCodeuiNormal3fVertex3fvSUN const GLuint *rc const GLfloat *n const GLfloat *v void glReplacementCodeuiSUN GLuint code void glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN GLuint rc GLfloat s GLfloat t GLfloat r GLfloat g GLfloat b GLfloat a GLfloat nx GLfloat ny GLfloat nz GLfloat x GLfloat y GLfloat z void glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN const GLuint *rc const GLfloat *tc const GLfloat *c const GLfloat *n const GLfloat *v void glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN GLuint rc GLfloat s GLfloat t GLfloat nx GLfloat ny GLfloat nz GLfloat x GLfloat y GLfloat z void glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN const GLuint *rc const GLfloat *tc const GLfloat *n const GLfloat *v void glReplacementCodeuiTexCoord2fVertex3fSUN GLuint rc GLfloat s GLfloat t GLfloat x GLfloat y GLfloat z void glReplacementCodeuiTexCoord2fVertex3fvSUN const GLuint *rc const GLfloat *tc const GLfloat *v void glReplacementCodeuiVertex3fSUN GLuint rc GLfloat x GLfloat y GLfloat z void glReplacementCodeuiVertex3fvSUN const GLuint *rc const GLfloat *v void glReplacementCodeuivSUN const GLuint *code void glReplacementCodeusSUN GLushort code void glReplacementCodeusvSUN const GLushort *code void glRequestResidentProgramsNV GLsizei n const GLuint *programs void glResetHistogram GLenum target void glResetHistogramEXT GLenum target void glResetMemoryObjectParameterNV GLuint memory GLenum pname void glResetMinmax GLenum target void glResetMinmaxEXT GLenum target void glResizeBuffersMESA void glResolveDepthValuesNV void glResolveMultisampleFramebufferAPPLE void glResumeTransformFeedback void glResumeTransformFeedbackNV void glRotated GLdouble angle GLdouble x GLdouble y GLdouble z void glRotatef GLfloat angle GLfloat x GLfloat y GLfloat z void glRotatex GLfixed angle GLfixed x GLfixed y GLfixed z void glRotatexOES GLfixed angle GLfixed x GLfixed y GLfixed z void glSampleCoverage GLfloat value GLboolean invert void glSampleCoverageARB GLfloat value GLboolean invert void glSampleCoveragex GLclampx value GLboolean invert void glSampleCoveragexOES GLclampx value GLboolean invert void glSampleMapATI GLuint dst GLuint interp GLenum swizzle void glSampleMaskEXT GLclampf value GLboolean invert void glSampleMaskIndexedNV GLuint index GLbitfield mask void glSampleMaskSGIS GLclampf value GLboolean invert void glSampleMaski GLuint maskNumber GLbitfield mask void glSamplePatternEXT GLenum pattern void glSamplePatternSGIS GLenum pattern void glSamplerParameterIiv GLuint sampler GLenum pname const GLint *param void glSamplerParameterIivEXT GLuint sampler GLenum pname const GLint *param void glSamplerParameterIivOES GLuint sampler GLenum pname const GLint *param void glSamplerParameterIuiv GLuint sampler GLenum pname const GLuint *param void glSamplerParameterIuivEXT GLuint sampler GLenum pname const GLuint *param void glSamplerParameterIuivOES GLuint sampler GLenum pname const GLuint *param void glSamplerParameterf GLuint sampler GLenum pname GLfloat param void glSamplerParameterfv GLuint sampler GLenum pname const GLfloat *param void glSamplerParameteri GLuint sampler GLenum pname GLint param void glSamplerParameteriv GLuint sampler GLenum pname const GLint *param void glScaled GLdouble x GLdouble y GLdouble z void glScalef GLfloat x GLfloat y GLfloat z void glScalex GLfixed x GLfixed y GLfixed z void glScalexOES GLfixed x GLfixed y GLfixed z void glScissor GLint x GLint y GLsizei width GLsizei height void glScissorArrayv GLuint first GLsizei count const GLint *v void glScissorArrayvNV GLuint first GLsizei count const GLint *v void glScissorArrayvOES GLuint first GLsizei count const GLint *v void glScissorExclusiveArrayvNV GLuint first GLsizei count const GLint *v void glScissorExclusiveNV GLint x GLint y GLsizei width GLsizei height void glScissorIndexed GLuint index GLint left GLint bottom GLsizei width GLsizei height void glScissorIndexedNV GLuint index GLint left GLint bottom GLsizei width GLsizei height void glScissorIndexedOES GLuint index GLint left GLint bottom GLsizei width GLsizei height void glScissorIndexedv GLuint index const GLint *v void glScissorIndexedvNV GLuint index const GLint *v void glScissorIndexedvOES GLuint index const GLint *v void glSecondaryColor3b GLbyte red GLbyte green GLbyte blue void glSecondaryColor3bEXT GLbyte red GLbyte green GLbyte blue void glSecondaryColor3bv const GLbyte *v void glSecondaryColor3bvEXT const GLbyte *v void glSecondaryColor3d GLdouble red GLdouble green GLdouble blue void glSecondaryColor3dEXT GLdouble red GLdouble green GLdouble blue void glSecondaryColor3dv const GLdouble *v void glSecondaryColor3dvEXT const GLdouble *v void glSecondaryColor3f GLfloat red GLfloat green GLfloat blue void glSecondaryColor3fEXT GLfloat red GLfloat green GLfloat blue void glSecondaryColor3fv const GLfloat *v void glSecondaryColor3fvEXT const GLfloat *v void glSecondaryColor3hNV GLhalfNV red GLhalfNV green GLhalfNV blue void glSecondaryColor3hvNV const GLhalfNV *v void glSecondaryColor3i GLint red GLint green GLint blue void glSecondaryColor3iEXT GLint red GLint green GLint blue void glSecondaryColor3iv const GLint *v void glSecondaryColor3ivEXT const GLint *v void glSecondaryColor3s GLshort red GLshort green GLshort blue void glSecondaryColor3sEXT GLshort red GLshort green GLshort blue void glSecondaryColor3sv const GLshort *v void glSecondaryColor3svEXT const GLshort *v void glSecondaryColor3ub GLubyte red GLubyte green GLubyte blue void glSecondaryColor3ubEXT GLubyte red GLubyte green GLubyte blue void glSecondaryColor3ubv const GLubyte *v void glSecondaryColor3ubvEXT const GLubyte *v void glSecondaryColor3ui GLuint red GLuint green GLuint blue void glSecondaryColor3uiEXT GLuint red GLuint green GLuint blue void glSecondaryColor3uiv const GLuint *v void glSecondaryColor3uivEXT const GLuint *v void glSecondaryColor3us GLushort red GLushort green GLushort blue void glSecondaryColor3usEXT GLushort red GLushort green GLushort blue void glSecondaryColor3usv const GLushort *v void glSecondaryColor3usvEXT const GLushort *v void glSecondaryColorFormatNV GLint size GLenum type GLsizei stride void glSecondaryColorP3ui GLenum type GLuint color void glSecondaryColorP3uiv GLenum type const GLuint *color void glSecondaryColorPointer GLint size GLenum type GLsizei stride const void *pointer void glSecondaryColorPointerEXT GLint size GLenum type GLsizei stride const void *pointer void glSecondaryColorPointerListIBM GLint size GLenum type GLint stride const void **pointer GLint ptrstride void glSelectBuffer GLsizei size GLuint *buffer void glSelectPerfMonitorCountersAMD GLuint monitor GLboolean enable GLuint group GLint numCounters GLuint *counterList void glSemaphoreParameterivNV GLuint semaphore GLenum pname const GLint *params void glSemaphoreParameterui64vEXT GLuint semaphore GLenum pname const GLuint64 *params void glSeparableFilter2D GLenum target GLenum internalformat GLsizei width GLsizei height GLenum format GLenum type const void *row const void *column void glSeparableFilter2DEXT GLenum target GLenum internalformat GLsizei width GLsizei height GLenum format GLenum type const void *row const void *column void glSetFenceAPPLE GLuint fence void glSetFenceNV GLuint fence GLenum condition void glSetFragmentShaderConstantATI GLuint dst const GLfloat *value void glSetInvariantEXT GLuint id GLenum type const void *addr void glSetLocalConstantEXT GLuint id GLenum type const void *addr void glSetMultisamplefvAMD GLenum pname GLuint index const GLfloat *val void glShadeModel GLenum mode void glShaderBinary GLsizei count const GLuint *shaders GLenum binaryFormat const void *binary GLsizei length void glShaderOp1EXT GLenum op GLuint res GLuint arg1 void glShaderOp2EXT GLenum op GLuint res GLuint arg1 GLuint arg2 void glShaderOp3EXT GLenum op GLuint res GLuint arg1 GLuint arg2 GLuint arg3 void glShaderSource GLuint shader GLsizei count const GLchar *const*string const GLint *length void glShaderSourceARB GLhandleARB shaderObj GLsizei count const GLcharARB **string const GLint *length void glShaderStorageBlockBinding GLuint program GLuint storageBlockIndex GLuint storageBlockBinding void glShadingRateEXT GLenum rate void glShadingRateCombinerOpsEXT GLenum combinerOp0 GLenum combinerOp1 void glShadingRateImageBarrierNV GLboolean synchronize void glShadingRateQCOM GLenum rate void glShadingRateImagePaletteNV GLuint viewport GLuint first GLsizei count const GLenum *rates void glShadingRateSampleOrderNV GLenum order void glShadingRateSampleOrderCustomNV GLenum rate GLuint samples const GLint *locations void glSharpenTexFuncSGIS GLenum target GLsizei n const GLfloat *points void glSignalSemaphoreEXT GLuint semaphore GLuint numBufferBarriers const GLuint *buffers GLuint numTextureBarriers const GLuint *textures const GLenum *dstLayouts void glSignalSemaphoreui64NVX GLuint signalGpu GLsizei fenceObjectCount const GLuint *semaphoreArray const GLuint64 *fenceValueArray void glSpecializeShader GLuint shader const GLchar *pEntryPoint GLuint numSpecializationConstants const GLuint *pConstantIndex const GLuint *pConstantValue void glSpecializeShaderARB GLuint shader const GLchar *pEntryPoint GLuint numSpecializationConstants const GLuint *pConstantIndex const GLuint *pConstantValue void glSpriteParameterfSGIX GLenum pname GLfloat param void glSpriteParameterfvSGIX GLenum pname const GLfloat *params void glSpriteParameteriSGIX GLenum pname GLint param void glSpriteParameterivSGIX GLenum pname const GLint *params void glStartInstrumentsSGIX void glStartTilingQCOM GLuint x GLuint y GLuint width GLuint height GLbitfield preserveMask void glStateCaptureNV GLuint state GLenum mode void glStencilClearTagEXT GLsizei stencilTagBits GLuint stencilClearTag void glStencilFillPathInstancedNV GLsizei numPaths GLenum pathNameType const void *paths GLuint pathBase GLenum fillMode GLuint mask GLenum transformType const GLfloat *transformValues void glStencilFillPathNV GLuint path GLenum fillMode GLuint mask void glStencilFunc GLenum func GLint ref GLuint mask void glStencilFuncSeparate GLenum face GLenum func GLint ref GLuint mask void glStencilFuncSeparateATI GLenum frontfunc GLenum backfunc GLint ref GLuint mask void glStencilMask GLuint mask void glStencilMaskSeparate GLenum face GLuint mask void glStencilOp GLenum fail GLenum zfail GLenum zpass void glStencilOpSeparate GLenum face GLenum sfail GLenum dpfail GLenum dppass void glStencilOpSeparateATI GLenum face GLenum sfail GLenum dpfail GLenum dppass void glStencilOpValueAMD GLenum face GLuint value void glStencilStrokePathInstancedNV GLsizei numPaths GLenum pathNameType const void *paths GLuint pathBase GLint reference GLuint mask GLenum transformType const GLfloat *transformValues void glStencilStrokePathNV GLuint path GLint reference GLuint mask void glStencilThenCoverFillPathInstancedNV GLsizei numPaths GLenum pathNameType const void *paths GLuint pathBase GLenum fillMode GLuint mask GLenum coverMode GLenum transformType const GLfloat *transformValues void glStencilThenCoverFillPathNV GLuint path GLenum fillMode GLuint mask GLenum coverMode void glStencilThenCoverStrokePathInstancedNV GLsizei numPaths GLenum pathNameType const void *paths GLuint pathBase GLint reference GLuint mask GLenum coverMode GLenum transformType const GLfloat *transformValues void glStencilThenCoverStrokePathNV GLuint path GLint reference GLuint mask GLenum coverMode void glStopInstrumentsSGIX GLint marker void glStringMarkerGREMEDY GLsizei len const void *string void glSubpixelPrecisionBiasNV GLuint xbits GLuint ybits void glSwizzleEXT GLuint res GLuint in GLenum outX GLenum outY GLenum outZ GLenum outW void glSyncTextureINTEL GLuint texture void glTagSampleBufferSGIX void glTangent3bEXT GLbyte tx GLbyte ty GLbyte tz void glTangent3bvEXT const GLbyte *v void glTangent3dEXT GLdouble tx GLdouble ty GLdouble tz void glTangent3dvEXT const GLdouble *v void glTangent3fEXT GLfloat tx GLfloat ty GLfloat tz void glTangent3fvEXT const GLfloat *v void glTangent3iEXT GLint tx GLint ty GLint tz void glTangent3ivEXT const GLint *v void glTangent3sEXT GLshort tx GLshort ty GLshort tz void glTangent3svEXT const GLshort *v void glTangentPointerEXT GLenum type GLsizei stride const void *pointer void glTbufferMask3DFX GLuint mask void glTessellationFactorAMD GLfloat factor void glTessellationModeAMD GLenum mode GLboolean glTestFenceAPPLE GLuint fence GLboolean glTestFenceNV GLuint fence GLboolean glTestObjectAPPLE GLenum object GLuint name void glTexAttachMemoryNV GLenum target GLuint memory GLuint64 offset void glTexBuffer GLenum target GLenum internalformat GLuint buffer void glTexBufferARB GLenum target GLenum internalformat GLuint buffer void glTexBufferEXT GLenum target GLenum internalformat GLuint buffer void glTexBufferOES GLenum target GLenum internalformat GLuint buffer void glTexBufferRange GLenum target GLenum internalformat GLuint buffer GLintptr offset GLsizeiptr size void glTexBufferRangeEXT GLenum target GLenum internalformat GLuint buffer GLintptr offset GLsizeiptr size void glTexBufferRangeOES GLenum target GLenum internalformat GLuint buffer GLintptr offset GLsizeiptr size void glTexBumpParameterfvATI GLenum pname const GLfloat *param void glTexBumpParameterivATI GLenum pname const GLint *param void glTexCoord1bOES GLbyte s void glTexCoord1bvOES const GLbyte *coords void glTexCoord1d GLdouble s void glTexCoord1dv const GLdouble *v void glTexCoord1f GLfloat s void glTexCoord1fv const GLfloat *v void glTexCoord1hNV GLhalfNV s void glTexCoord1hvNV const GLhalfNV *v void glTexCoord1i GLint s void glTexCoord1iv const GLint *v void glTexCoord1s GLshort s void glTexCoord1sv const GLshort *v void glTexCoord1xOES GLfixed s void glTexCoord1xvOES const GLfixed *coords void glTexCoord2bOES GLbyte s GLbyte t void glTexCoord2bvOES const GLbyte *coords void glTexCoord2d GLdouble s GLdouble t void glTexCoord2dv const GLdouble *v void glTexCoord2f GLfloat s GLfloat t void glTexCoord2fColor3fVertex3fSUN GLfloat s GLfloat t GLfloat r GLfloat g GLfloat b GLfloat x GLfloat y GLfloat z void glTexCoord2fColor3fVertex3fvSUN const GLfloat *tc const GLfloat *c const GLfloat *v void glTexCoord2fColor4fNormal3fVertex3fSUN GLfloat s GLfloat t GLfloat r GLfloat g GLfloat b GLfloat a GLfloat nx GLfloat ny GLfloat nz GLfloat x GLfloat y GLfloat z void glTexCoord2fColor4fNormal3fVertex3fvSUN const GLfloat *tc const GLfloat *c const GLfloat *n const GLfloat *v void glTexCoord2fColor4ubVertex3fSUN GLfloat s GLfloat t GLubyte r GLubyte g GLubyte b GLubyte a GLfloat x GLfloat y GLfloat z void glTexCoord2fColor4ubVertex3fvSUN const GLfloat *tc const GLubyte *c const GLfloat *v void glTexCoord2fNormal3fVertex3fSUN GLfloat s GLfloat t GLfloat nx GLfloat ny GLfloat nz GLfloat x GLfloat y GLfloat z void glTexCoord2fNormal3fVertex3fvSUN const GLfloat *tc const GLfloat *n const GLfloat *v void glTexCoord2fVertex3fSUN GLfloat s GLfloat t GLfloat x GLfloat y GLfloat z void glTexCoord2fVertex3fvSUN const GLfloat *tc const GLfloat *v void glTexCoord2fv const GLfloat *v void glTexCoord2hNV GLhalfNV s GLhalfNV t void glTexCoord2hvNV const GLhalfNV *v void glTexCoord2i GLint s GLint t void glTexCoord2iv const GLint *v void glTexCoord2s GLshort s GLshort t void glTexCoord2sv const GLshort *v void glTexCoord2xOES GLfixed s GLfixed t void glTexCoord2xvOES const GLfixed *coords void glTexCoord3bOES GLbyte s GLbyte t GLbyte r void glTexCoord3bvOES const GLbyte *coords void glTexCoord3d GLdouble s GLdouble t GLdouble r void glTexCoord3dv const GLdouble *v void glTexCoord3f GLfloat s GLfloat t GLfloat r void glTexCoord3fv const GLfloat *v void glTexCoord3hNV GLhalfNV s GLhalfNV t GLhalfNV r void glTexCoord3hvNV const GLhalfNV *v void glTexCoord3i GLint s GLint t GLint r void glTexCoord3iv const GLint *v void glTexCoord3s GLshort s GLshort t GLshort r void glTexCoord3sv const GLshort *v void glTexCoord3xOES GLfixed s GLfixed t GLfixed r void glTexCoord3xvOES const GLfixed *coords void glTexCoord4bOES GLbyte s GLbyte t GLbyte r GLbyte q void glTexCoord4bvOES const GLbyte *coords void glTexCoord4d GLdouble s GLdouble t GLdouble r GLdouble q void glTexCoord4dv const GLdouble *v void glTexCoord4f GLfloat s GLfloat t GLfloat r GLfloat q void glTexCoord4fColor4fNormal3fVertex4fSUN GLfloat s GLfloat t GLfloat p GLfloat q GLfloat r GLfloat g GLfloat b GLfloat a GLfloat nx GLfloat ny GLfloat nz GLfloat x GLfloat y GLfloat z GLfloat w void glTexCoord4fColor4fNormal3fVertex4fvSUN const GLfloat *tc const GLfloat *c const GLfloat *n const GLfloat *v void glTexCoord4fVertex4fSUN GLfloat s GLfloat t GLfloat p GLfloat q GLfloat x GLfloat y GLfloat z GLfloat w void glTexCoord4fVertex4fvSUN const GLfloat *tc const GLfloat *v void glTexCoord4fv const GLfloat *v void glTexCoord4hNV GLhalfNV s GLhalfNV t GLhalfNV r GLhalfNV q void glTexCoord4hvNV const GLhalfNV *v void glTexCoord4i GLint s GLint t GLint r GLint q void glTexCoord4iv const GLint *v void glTexCoord4s GLshort s GLshort t GLshort r GLshort q void glTexCoord4sv const GLshort *v void glTexCoord4xOES GLfixed s GLfixed t GLfixed r GLfixed q void glTexCoord4xvOES const GLfixed *coords void glTexCoordFormatNV GLint size GLenum type GLsizei stride void glTexCoordP1ui GLenum type GLuint coords void glTexCoordP1uiv GLenum type const GLuint *coords void glTexCoordP2ui GLenum type GLuint coords void glTexCoordP2uiv GLenum type const GLuint *coords void glTexCoordP3ui GLenum type GLuint coords void glTexCoordP3uiv GLenum type const GLuint *coords void glTexCoordP4ui GLenum type GLuint coords void glTexCoordP4uiv GLenum type const GLuint *coords void glTexCoordPointer GLint size GLenum type GLsizei stride const void *pointer void glTexCoordPointerEXT GLint size GLenum type GLsizei stride GLsizei count const void *pointer void glTexCoordPointerListIBM GLint size GLenum type GLint stride const void **pointer GLint ptrstride void glTexCoordPointervINTEL GLint size GLenum type const void **pointer void glTexEnvf GLenum target GLenum pname GLfloat param void glTexEnvfv GLenum target GLenum pname const GLfloat *params void glTexEnvi GLenum target GLenum pname GLint param void glTexEnviv GLenum target GLenum pname const GLint *params void glTexEnvx GLenum target GLenum pname GLfixed param void glTexEnvxOES GLenum target GLenum pname GLfixed param void glTexEnvxv GLenum target GLenum pname const GLfixed *params void glTexEnvxvOES GLenum target GLenum pname const GLfixed *params void glTexEstimateMotionQCOM GLuint ref GLuint target GLuint output void glTexEstimateMotionRegionsQCOM GLuint ref GLuint target GLuint output GLuint mask void glExtrapolateTex2DQCOM GLuint src1 GLuint src2 GLuint output GLfloat scaleFactor void glTexFilterFuncSGIS GLenum target GLenum filter GLsizei n const GLfloat *weights void glTexGend GLenum coord GLenum pname GLdouble param void glTexGendv GLenum coord GLenum pname const GLdouble *params void glTexGenf GLenum coord GLenum pname GLfloat param void glTexGenfOES GLenum coord GLenum pname GLfloat param void glTexGenfv GLenum coord GLenum pname const GLfloat *params void glTexGenfvOES GLenum coord GLenum pname const GLfloat *params void glTexGeni GLenum coord GLenum pname GLint param void glTexGeniOES GLenum coord GLenum pname GLint param void glTexGeniv GLenum coord GLenum pname const GLint *params void glTexGenivOES GLenum coord GLenum pname const GLint *params void glTexGenxOES GLenum coord GLenum pname GLfixed param void glTexGenxvOES GLenum coord GLenum pname const GLfixed *params void glTexImage1D GLenum target GLint level GLint internalformat GLsizei width GLint border GLenum format GLenum type const void *pixels void glTexImage2D GLenum target GLint level GLint internalformat GLsizei width GLsizei height GLint border GLenum format GLenum type const void *pixels void glTexImage2DMultisample GLenum target GLsizei samples GLenum internalformat GLsizei width GLsizei height GLboolean fixedsamplelocations void glTexImage2DMultisampleCoverageNV GLenum target GLsizei coverageSamples GLsizei colorSamples GLint internalFormat GLsizei width GLsizei height GLboolean fixedSampleLocations void glTexImage3D GLenum target GLint level GLint internalformat GLsizei width GLsizei height GLsizei depth GLint border GLenum format GLenum type const void *pixels void glTexImage3DEXT GLenum target GLint level GLenum internalformat GLsizei width GLsizei height GLsizei depth GLint border GLenum format GLenum type const void *pixels void glTexImage3DMultisample GLenum target GLsizei samples GLenum internalformat GLsizei width GLsizei height GLsizei depth GLboolean fixedsamplelocations void glTexImage3DMultisampleCoverageNV GLenum target GLsizei coverageSamples GLsizei colorSamples GLint internalFormat GLsizei width GLsizei height GLsizei depth GLboolean fixedSampleLocations void glTexImage3DOES GLenum target GLint level GLenum internalformat GLsizei width GLsizei height GLsizei depth GLint border GLenum format GLenum type const void *pixels void glTexImage4DSGIS GLenum target GLint level GLenum internalformat GLsizei width GLsizei height GLsizei depth GLsizei size4d GLint border GLenum format GLenum type const void *pixels void glTexPageCommitmentARB GLenum target GLint level GLint xoffset GLint yoffset GLint zoffset GLsizei width GLsizei height GLsizei depth GLboolean commit void glTexPageCommitmentEXT GLenum target GLint level GLint xoffset GLint yoffset GLint zoffset GLsizei width GLsizei height GLsizei depth GLboolean commit void glTexPageCommitmentMemNV GLenum target GLint layer GLint level GLint xoffset GLint yoffset GLint zoffset GLsizei width GLsizei height GLsizei depth GLuint memory GLuint64 offset GLboolean commit void glTexParameterIiv GLenum target GLenum pname const GLint *params void glTexParameterIivEXT GLenum target GLenum pname const GLint *params void glTexParameterIivOES GLenum target GLenum pname const GLint *params void glTexParameterIuiv GLenum target GLenum pname const GLuint *params void glTexParameterIuivEXT GLenum target GLenum pname const GLuint *params void glTexParameterIuivOES GLenum target GLenum pname const GLuint *params void glTexParameterf GLenum target GLenum pname GLfloat param void glTexParameterfv GLenum target GLenum pname const GLfloat *params void glTexParameteri GLenum target GLenum pname GLint param void glTexParameteriv GLenum target GLenum pname const GLint *params void glTexParameterx GLenum target GLenum pname GLfixed param void glTexParameterxOES GLenum target GLenum pname GLfixed param void glTexParameterxv GLenum target GLenum pname const GLfixed *params void glTexParameterxvOES GLenum target GLenum pname const GLfixed *params void glTexRenderbufferNV GLenum target GLuint renderbuffer void glTexStorage1D GLenum target GLsizei levels GLenum internalformat GLsizei width void glTexStorage1DEXT GLenum target GLsizei levels GLenum internalformat GLsizei width void glTexStorage2D GLenum target GLsizei levels GLenum internalformat GLsizei width GLsizei height void glTexStorage2DEXT GLenum target GLsizei levels GLenum internalformat GLsizei width GLsizei height void glTexStorage2DMultisample GLenum target GLsizei samples GLenum internalformat GLsizei width GLsizei height GLboolean fixedsamplelocations void glTexStorage3D GLenum target GLsizei levels GLenum internalformat GLsizei width GLsizei height GLsizei depth void glTexStorage3DEXT GLenum target GLsizei levels GLenum internalformat GLsizei width GLsizei height GLsizei depth void glTexStorage3DMultisample GLenum target GLsizei samples GLenum internalformat GLsizei width GLsizei height GLsizei depth GLboolean fixedsamplelocations void glTexStorage3DMultisampleOES GLenum target GLsizei samples GLenum internalformat GLsizei width GLsizei height GLsizei depth GLboolean fixedsamplelocations void glTexStorageAttribs2DEXT GLenum target GLsizei levels GLenum internalformat GLsizei width GLsizei height const GLint* attrib_list void glTexStorageAttribs3DEXT GLenum target GLsizei levels GLenum internalformat GLsizei width GLsizei height GLsizei depth const GLint* attrib_list void glTexStorageMem1DEXT GLenum target GLsizei levels GLenum internalFormat GLsizei width GLuint memory GLuint64 offset void glTexStorageMem2DEXT GLenum target GLsizei levels GLenum internalFormat GLsizei width GLsizei height GLuint memory GLuint64 offset void glTexStorageMem2DMultisampleEXT GLenum target GLsizei samples GLenum internalFormat GLsizei width GLsizei height GLboolean fixedSampleLocations GLuint memory GLuint64 offset void glTexStorageMem3DEXT GLenum target GLsizei levels GLenum internalFormat GLsizei width GLsizei height GLsizei depth GLuint memory GLuint64 offset void glTexStorageMem3DMultisampleEXT GLenum target GLsizei samples GLenum internalFormat GLsizei width GLsizei height GLsizei depth GLboolean fixedSampleLocations GLuint memory GLuint64 offset void glTexStorageSparseAMD GLenum target GLenum internalFormat GLsizei width GLsizei height GLsizei depth GLsizei layers GLbitfield flags void glTexSubImage1D GLenum target GLint level GLint xoffset GLsizei width GLenum format GLenum type const void *pixels void glTexSubImage1DEXT GLenum target GLint level GLint xoffset GLsizei width GLenum format GLenum type const void *pixels void glTexSubImage2D GLenum target GLint level GLint xoffset GLint yoffset GLsizei width GLsizei height GLenum format GLenum type const void *pixels void glTexSubImage2DEXT GLenum target GLint level GLint xoffset GLint yoffset GLsizei width GLsizei height GLenum format GLenum type const void *pixels void glTexSubImage3D GLenum target GLint level GLint xoffset GLint yoffset GLint zoffset GLsizei width GLsizei height GLsizei depth GLenum format GLenum type const void *pixels void glTexSubImage3DEXT GLenum target GLint level GLint xoffset GLint yoffset GLint zoffset GLsizei width GLsizei height GLsizei depth GLenum format GLenum type const void *pixels void glTexSubImage3DOES GLenum target GLint level GLint xoffset GLint yoffset GLint zoffset GLsizei width GLsizei height GLsizei depth GLenum format GLenum type const void *pixels void glTexSubImage4DSGIS GLenum target GLint level GLint xoffset GLint yoffset GLint zoffset GLint woffset GLsizei width GLsizei height GLsizei depth GLsizei size4d GLenum format GLenum type const void *pixels void glTextureAttachMemoryNV GLuint texture GLuint memory GLuint64 offset void glTextureBarrier void glTextureBarrierNV void glTextureBuffer GLuint texture GLenum internalformat GLuint buffer void glTextureBufferEXT GLuint texture GLenum target GLenum internalformat GLuint buffer void glTextureBufferRange GLuint texture GLenum internalformat GLuint buffer GLintptr offset GLsizeiptr size void glTextureBufferRangeEXT GLuint texture GLenum target GLenum internalformat GLuint buffer GLintptr offset GLsizeiptr size void glTextureColorMaskSGIS GLboolean red GLboolean green GLboolean blue GLboolean alpha void glTextureFoveationParametersQCOM GLuint texture GLuint layer GLuint focalPoint GLfloat focalX GLfloat focalY GLfloat gainX GLfloat gainY GLfloat foveaArea void glTextureImage1DEXT GLuint texture GLenum target GLint level GLint internalformat GLsizei width GLint border GLenum format GLenum type const void *pixels void glTextureImage2DEXT GLuint texture GLenum target GLint level GLint internalformat GLsizei width GLsizei height GLint border GLenum format GLenum type const void *pixels void glTextureImage2DMultisampleCoverageNV GLuint texture GLenum target GLsizei coverageSamples GLsizei colorSamples GLint internalFormat GLsizei width GLsizei height GLboolean fixedSampleLocations void glTextureImage2DMultisampleNV GLuint texture GLenum target GLsizei samples GLint internalFormat GLsizei width GLsizei height GLboolean fixedSampleLocations void glTextureImage3DEXT GLuint texture GLenum target GLint level GLint internalformat GLsizei width GLsizei height GLsizei depth GLint border GLenum format GLenum type const void *pixels void glTextureImage3DMultisampleCoverageNV GLuint texture GLenum target GLsizei coverageSamples GLsizei colorSamples GLint internalFormat GLsizei width GLsizei height GLsizei depth GLboolean fixedSampleLocations void glTextureImage3DMultisampleNV GLuint texture GLenum target GLsizei samples GLint internalFormat GLsizei width GLsizei height GLsizei depth GLboolean fixedSampleLocations void glTextureLightEXT GLenum pname void glTextureMaterialEXT GLenum face GLenum mode void glTextureNormalEXT GLenum mode void glTexturePageCommitmentEXT GLuint texture GLint level GLint xoffset GLint yoffset GLint zoffset GLsizei width GLsizei height GLsizei depth GLboolean commit void glTexturePageCommitmentMemNV GLuint texture GLint layer GLint level GLint xoffset GLint yoffset GLint zoffset GLsizei width GLsizei height GLsizei depth GLuint memory GLuint64 offset GLboolean commit void glTextureParameterIiv GLuint texture GLenum pname const GLint *params void glTextureParameterIivEXT GLuint texture GLenum target GLenum pname const GLint *params void glTextureParameterIuiv GLuint texture GLenum pname const GLuint *params void glTextureParameterIuivEXT GLuint texture GLenum target GLenum pname const GLuint *params void glTextureParameterf GLuint texture GLenum pname GLfloat param void glTextureParameterfEXT GLuint texture GLenum target GLenum pname GLfloat param void glTextureParameterfv GLuint texture GLenum pname const GLfloat *param void glTextureParameterfvEXT GLuint texture GLenum target GLenum pname const GLfloat *params void glTextureParameteri GLuint texture GLenum pname GLint param void glTextureParameteriEXT GLuint texture GLenum target GLenum pname GLint param void glTextureParameteriv GLuint texture GLenum pname const GLint *param void glTextureParameterivEXT GLuint texture GLenum target GLenum pname const GLint *params void glTextureRangeAPPLE GLenum target GLsizei length const void *pointer void glTextureRenderbufferEXT GLuint texture GLenum target GLuint renderbuffer void glTextureStorage1D GLuint texture GLsizei levels GLenum internalformat GLsizei width void glTextureStorage1DEXT GLuint texture GLenum target GLsizei levels GLenum internalformat GLsizei width void glTextureStorage2D GLuint texture GLsizei levels GLenum internalformat GLsizei width GLsizei height void glTextureStorage2DEXT GLuint texture GLenum target GLsizei levels GLenum internalformat GLsizei width GLsizei height void glTextureStorage2DMultisample GLuint texture GLsizei samples GLenum internalformat GLsizei width GLsizei height GLboolean fixedsamplelocations void glTextureStorage2DMultisampleEXT GLuint texture GLenum target GLsizei samples GLenum internalformat GLsizei width GLsizei height GLboolean fixedsamplelocations void glTextureStorage3D GLuint texture GLsizei levels GLenum internalformat GLsizei width GLsizei height GLsizei depth void glTextureStorage3DEXT GLuint texture GLenum target GLsizei levels GLenum internalformat GLsizei width GLsizei height GLsizei depth void glTextureStorage3DMultisample GLuint texture GLsizei samples GLenum internalformat GLsizei width GLsizei height GLsizei depth GLboolean fixedsamplelocations void glTextureStorage3DMultisampleEXT GLuint texture GLenum target GLsizei samples GLenum internalformat GLsizei width GLsizei height GLsizei depth GLboolean fixedsamplelocations void glTextureStorageMem1DEXT GLuint texture GLsizei levels GLenum internalFormat GLsizei width GLuint memory GLuint64 offset void glTextureStorageMem2DEXT GLuint texture GLsizei levels GLenum internalFormat GLsizei width GLsizei height GLuint memory GLuint64 offset void glTextureStorageMem2DMultisampleEXT GLuint texture GLsizei samples GLenum internalFormat GLsizei width GLsizei height GLboolean fixedSampleLocations GLuint memory GLuint64 offset void glTextureStorageMem3DEXT GLuint texture GLsizei levels GLenum internalFormat GLsizei width GLsizei height GLsizei depth GLuint memory GLuint64 offset void glTextureStorageMem3DMultisampleEXT GLuint texture GLsizei samples GLenum internalFormat GLsizei width GLsizei height GLsizei depth GLboolean fixedSampleLocations GLuint memory GLuint64 offset void glTextureStorageSparseAMD GLuint texture GLenum target GLenum internalFormat GLsizei width GLsizei height GLsizei depth GLsizei layers GLbitfield flags void glTextureSubImage1D GLuint texture GLint level GLint xoffset GLsizei width GLenum format GLenum type const void *pixels void glTextureSubImage1DEXT GLuint texture GLenum target GLint level GLint xoffset GLsizei width GLenum format GLenum type const void *pixels void glTextureSubImage2D GLuint texture GLint level GLint xoffset GLint yoffset GLsizei width GLsizei height GLenum format GLenum type const void *pixels void glTextureSubImage2DEXT GLuint texture GLenum target GLint level GLint xoffset GLint yoffset GLsizei width GLsizei height GLenum format GLenum type const void *pixels void glTextureSubImage3D GLuint texture GLint level GLint xoffset GLint yoffset GLint zoffset GLsizei width GLsizei height GLsizei depth GLenum format GLenum type const void *pixels void glTextureSubImage3DEXT GLuint texture GLenum target GLint level GLint xoffset GLint yoffset GLint zoffset GLsizei width GLsizei height GLsizei depth GLenum format GLenum type const void *pixels void glTextureView GLuint texture GLenum target GLuint origtexture GLenum internalformat GLuint minlevel GLuint numlevels GLuint minlayer GLuint numlayers void glTextureViewEXT GLuint texture GLenum target GLuint origtexture GLenum internalformat GLuint minlevel GLuint numlevels GLuint minlayer GLuint numlayers void glTextureViewOES GLuint texture GLenum target GLuint origtexture GLenum internalformat GLuint minlevel GLuint numlevels GLuint minlayer GLuint numlayers void glTrackMatrixNV GLenum target GLuint address GLenum matrix GLenum transform void glTransformFeedbackAttribsNV GLsizei count const GLint *attribs GLenum bufferMode void glTransformFeedbackBufferBase GLuint xfb GLuint index GLuint buffer void glTransformFeedbackBufferRange GLuint xfb GLuint index GLuint buffer GLintptr offset GLsizeiptr size void glTransformFeedbackStreamAttribsNV GLsizei count const GLint *attribs GLsizei nbuffers const GLint *bufstreams GLenum bufferMode void glTransformFeedbackVaryings GLuint program GLsizei count const GLchar *const*varyings GLenum bufferMode void glTransformFeedbackVaryingsEXT GLuint program GLsizei count const GLchar *const*varyings GLenum bufferMode void glTransformFeedbackVaryingsNV GLuint program GLsizei count const GLint *locations GLenum bufferMode void glTransformPathNV GLuint resultPath GLuint srcPath GLenum transformType const GLfloat *transformValues void glTranslated GLdouble x GLdouble y GLdouble z void glTranslatef GLfloat x GLfloat y GLfloat z void glTranslatex GLfixed x GLfixed y GLfixed z void glTranslatexOES GLfixed x GLfixed y GLfixed z void glUniform1d GLint location GLdouble x void glUniform1dv GLint location GLsizei count const GLdouble *value void glUniform1f GLint location GLfloat v0 void glUniform1fARB GLint location GLfloat v0 void glUniform1fv GLint location GLsizei count const GLfloat *value void glUniform1fvARB GLint location GLsizei count const GLfloat *value void glUniform1i GLint location GLint v0 void glUniform1i64ARB GLint location GLint64 x void glUniform1i64NV GLint location GLint64EXT x void glUniform1i64vARB GLint location GLsizei count const GLint64 *value void glUniform1i64vNV GLint location GLsizei count const GLint64EXT *value void glUniform1iARB GLint location GLint v0 void glUniform1iv GLint location GLsizei count const GLint *value void glUniform1ivARB GLint location GLsizei count const GLint *value void glUniform1ui GLint location GLuint v0 void glUniform1ui64ARB GLint location GLuint64 x void glUniform1ui64NV GLint location GLuint64EXT x void glUniform1ui64vARB GLint location GLsizei count const GLuint64 *value void glUniform1ui64vNV GLint location GLsizei count const GLuint64EXT *value void glUniform1uiEXT GLint location GLuint v0 void glUniform1uiv GLint location GLsizei count const GLuint *value void glUniform1uivEXT GLint location GLsizei count const GLuint *value void glUniform2d GLint location GLdouble x GLdouble y void glUniform2dv GLint location GLsizei count const GLdouble *value void glUniform2f GLint location GLfloat v0 GLfloat v1 void glUniform2fARB GLint location GLfloat v0 GLfloat v1 void glUniform2fv GLint location GLsizei count const GLfloat *value void glUniform2fvARB GLint location GLsizei count const GLfloat *value void glUniform2i GLint location GLint v0 GLint v1 void glUniform2i64ARB GLint location GLint64 x GLint64 y void glUniform2i64NV GLint location GLint64EXT x GLint64EXT y void glUniform2i64vARB GLint location GLsizei count const GLint64 *value void glUniform2i64vNV GLint location GLsizei count const GLint64EXT *value void glUniform2iARB GLint location GLint v0 GLint v1 void glUniform2iv GLint location GLsizei count const GLint *value void glUniform2ivARB GLint location GLsizei count const GLint *value void glUniform2ui GLint location GLuint v0 GLuint v1 void glUniform2ui64ARB GLint location GLuint64 x GLuint64 y void glUniform2ui64NV GLint location GLuint64EXT x GLuint64EXT y void glUniform2ui64vARB GLint location GLsizei count const GLuint64 *value void glUniform2ui64vNV GLint location GLsizei count const GLuint64EXT *value void glUniform2uiEXT GLint location GLuint v0 GLuint v1 void glUniform2uiv GLint location GLsizei count const GLuint *value void glUniform2uivEXT GLint location GLsizei count const GLuint *value void glUniform3d GLint location GLdouble x GLdouble y GLdouble z void glUniform3dv GLint location GLsizei count const GLdouble *value void glUniform3f GLint location GLfloat v0 GLfloat v1 GLfloat v2 void glUniform3fARB GLint location GLfloat v0 GLfloat v1 GLfloat v2 void glUniform3fv GLint location GLsizei count const GLfloat *value void glUniform3fvARB GLint location GLsizei count const GLfloat *value void glUniform3i GLint location GLint v0 GLint v1 GLint v2 void glUniform3i64ARB GLint location GLint64 x GLint64 y GLint64 z void glUniform3i64NV GLint location GLint64EXT x GLint64EXT y GLint64EXT z void glUniform3i64vARB GLint location GLsizei count const GLint64 *value void glUniform3i64vNV GLint location GLsizei count const GLint64EXT *value void glUniform3iARB GLint location GLint v0 GLint v1 GLint v2 void glUniform3iv GLint location GLsizei count const GLint *value void glUniform3ivARB GLint location GLsizei count const GLint *value void glUniform3ui GLint location GLuint v0 GLuint v1 GLuint v2 void glUniform3ui64ARB GLint location GLuint64 x GLuint64 y GLuint64 z void glUniform3ui64NV GLint location GLuint64EXT x GLuint64EXT y GLuint64EXT z void glUniform3ui64vARB GLint location GLsizei count const GLuint64 *value void glUniform3ui64vNV GLint location GLsizei count const GLuint64EXT *value void glUniform3uiEXT GLint location GLuint v0 GLuint v1 GLuint v2 void glUniform3uiv GLint location GLsizei count const GLuint *value void glUniform3uivEXT GLint location GLsizei count const GLuint *value void glUniform4d GLint location GLdouble x GLdouble y GLdouble z GLdouble w void glUniform4dv GLint location GLsizei count const GLdouble *value void glUniform4f GLint location GLfloat v0 GLfloat v1 GLfloat v2 GLfloat v3 void glUniform4fARB GLint location GLfloat v0 GLfloat v1 GLfloat v2 GLfloat v3 void glUniform4fv GLint location GLsizei count const GLfloat *value void glUniform4fvARB GLint location GLsizei count const GLfloat *value void glUniform4i GLint location GLint v0 GLint v1 GLint v2 GLint v3 void glUniform4i64ARB GLint location GLint64 x GLint64 y GLint64 z GLint64 w void glUniform4i64NV GLint location GLint64EXT x GLint64EXT y GLint64EXT z GLint64EXT w void glUniform4i64vARB GLint location GLsizei count const GLint64 *value void glUniform4i64vNV GLint location GLsizei count const GLint64EXT *value void glUniform4iARB GLint location GLint v0 GLint v1 GLint v2 GLint v3 void glUniform4iv GLint location GLsizei count const GLint *value void glUniform4ivARB GLint location GLsizei count const GLint *value void glUniform4ui GLint location GLuint v0 GLuint v1 GLuint v2 GLuint v3 void glUniform4ui64ARB GLint location GLuint64 x GLuint64 y GLuint64 z GLuint64 w void glUniform4ui64NV GLint location GLuint64EXT x GLuint64EXT y GLuint64EXT z GLuint64EXT w void glUniform4ui64vARB GLint location GLsizei count const GLuint64 *value void glUniform4ui64vNV GLint location GLsizei count const GLuint64EXT *value void glUniform4uiEXT GLint location GLuint v0 GLuint v1 GLuint v2 GLuint v3 void glUniform4uiv GLint location GLsizei count const GLuint *value void glUniform4uivEXT GLint location GLsizei count const GLuint *value void glUniformBlockBinding GLuint program GLuint uniformBlockIndex GLuint uniformBlockBinding void glUniformBufferEXT GLuint program GLint location GLuint buffer void glUniformHandleui64ARB GLint location GLuint64 value void glUniformHandleui64IMG GLint location GLuint64 value void glUniformHandleui64NV GLint location GLuint64 value void glUniformHandleui64vARB GLint location GLsizei count const GLuint64 *value void glUniformHandleui64vIMG GLint location GLsizei count const GLuint64 *value void glUniformHandleui64vNV GLint location GLsizei count const GLuint64 *value void glUniformMatrix2dv GLint location GLsizei count GLboolean transpose const GLdouble *value void glUniformMatrix2fv GLint location GLsizei count GLboolean transpose const GLfloat *value void glUniformMatrix2fvARB GLint location GLsizei count GLboolean transpose const GLfloat *value void glUniformMatrix2x3dv GLint location GLsizei count GLboolean transpose const GLdouble *value void glUniformMatrix2x3fv GLint location GLsizei count GLboolean transpose const GLfloat *value void glUniformMatrix2x3fvNV GLint location GLsizei count GLboolean transpose const GLfloat *value void glUniformMatrix2x4dv GLint location GLsizei count GLboolean transpose const GLdouble *value void glUniformMatrix2x4fv GLint location GLsizei count GLboolean transpose const GLfloat *value void glUniformMatrix2x4fvNV GLint location GLsizei count GLboolean transpose const GLfloat *value void glUniformMatrix3dv GLint location GLsizei count GLboolean transpose const GLdouble *value void glUniformMatrix3fv GLint location GLsizei count GLboolean transpose const GLfloat *value void glUniformMatrix3fvARB GLint location GLsizei count GLboolean transpose const GLfloat *value void glUniformMatrix3x2dv GLint location GLsizei count GLboolean transpose const GLdouble *value void glUniformMatrix3x2fv GLint location GLsizei count GLboolean transpose const GLfloat *value void glUniformMatrix3x2fvNV GLint location GLsizei count GLboolean transpose const GLfloat *value void glUniformMatrix3x4dv GLint location GLsizei count GLboolean transpose const GLdouble *value void glUniformMatrix3x4fv GLint location GLsizei count GLboolean transpose const GLfloat *value void glUniformMatrix3x4fvNV GLint location GLsizei count GLboolean transpose const GLfloat *value void glUniformMatrix4dv GLint location GLsizei count GLboolean transpose const GLdouble *value void glUniformMatrix4fv GLint location GLsizei count GLboolean transpose const GLfloat *value void glUniformMatrix4fvARB GLint location GLsizei count GLboolean transpose const GLfloat *value void glUniformMatrix4x2dv GLint location GLsizei count GLboolean transpose const GLdouble *value void glUniformMatrix4x2fv GLint location GLsizei count GLboolean transpose const GLfloat *value void glUniformMatrix4x2fvNV GLint location GLsizei count GLboolean transpose const GLfloat *value void glUniformMatrix4x3dv GLint location GLsizei count GLboolean transpose const GLdouble *value void glUniformMatrix4x3fv GLint location GLsizei count GLboolean transpose const GLfloat *value void glUniformMatrix4x3fvNV GLint location GLsizei count GLboolean transpose const GLfloat *value void glUniformSubroutinesuiv GLenum shadertype GLsizei count const GLuint *indices void glUniformui64NV GLint location GLuint64EXT value void glUniformui64vNV GLint location GLsizei count const GLuint64EXT *value void glUnlockArraysEXT GLboolean glUnmapBuffer GLenum target GLboolean glUnmapBufferARB GLenum target GLboolean glUnmapBufferOES GLenum target GLboolean glUnmapNamedBuffer GLuint buffer GLboolean glUnmapNamedBufferEXT GLuint buffer void glUnmapObjectBufferATI GLuint buffer void glUnmapTexture2DINTEL GLuint texture GLint level void glUpdateObjectBufferATI GLuint buffer GLuint offset GLsizei size const void *pointer GLenum preserve void glUploadGpuMaskNVX GLbitfield mask void glUseProgram GLuint program void glUseProgramObjectARB GLhandleARB programObj void glUseProgramStages GLuint pipeline GLbitfield stages GLuint program void glUseProgramStagesEXT GLuint pipeline GLbitfield stages GLuint program void glUseShaderProgramEXT GLenum type GLuint program void glVDPAUFiniNV void glVDPAUGetSurfaceivNV GLvdpauSurfaceNV surface GLenum pname GLsizei count GLsizei *length GLint *values void glVDPAUInitNV const void *vdpDevice const void *getProcAddress GLboolean glVDPAUIsSurfaceNV GLvdpauSurfaceNV surface void glVDPAUMapSurfacesNV GLsizei numSurfaces const GLvdpauSurfaceNV *surfaces GLvdpauSurfaceNV glVDPAURegisterOutputSurfaceNV const void *vdpSurface GLenum target GLsizei numTextureNames const GLuint *textureNames GLvdpauSurfaceNV glVDPAURegisterVideoSurfaceNV const void *vdpSurface GLenum target GLsizei numTextureNames const GLuint *textureNames GLvdpauSurfaceNV glVDPAURegisterVideoSurfaceWithPictureStructureNV const void *vdpSurface GLenum target GLsizei numTextureNames const GLuint *textureNames GLboolean isFrameStructure void glVDPAUSurfaceAccessNV GLvdpauSurfaceNV surface GLenum access void glVDPAUUnmapSurfacesNV GLsizei numSurface const GLvdpauSurfaceNV *surfaces void glVDPAUUnregisterSurfaceNV GLvdpauSurfaceNV surface void glValidateProgram GLuint program void glValidateProgramARB GLhandleARB programObj void glValidateProgramPipeline GLuint pipeline void glValidateProgramPipelineEXT GLuint pipeline void glVariantArrayObjectATI GLuint id GLenum type GLsizei stride GLuint buffer GLuint offset void glVariantPointerEXT GLuint id GLenum type GLuint stride const void *addr void glVariantbvEXT GLuint id const GLbyte *addr void glVariantdvEXT GLuint id const GLdouble *addr void glVariantfvEXT GLuint id const GLfloat *addr void glVariantivEXT GLuint id const GLint *addr void glVariantsvEXT GLuint id const GLshort *addr void glVariantubvEXT GLuint id const GLubyte *addr void glVariantuivEXT GLuint id const GLuint *addr void glVariantusvEXT GLuint id const GLushort *addr void glVertex2bOES GLbyte x GLbyte y void glVertex2bvOES const GLbyte *coords void glVertex2d GLdouble x GLdouble y void glVertex2dv const GLdouble *v void glVertex2f GLfloat x GLfloat y void glVertex2fv const GLfloat *v void glVertex2hNV GLhalfNV x GLhalfNV y void glVertex2hvNV const GLhalfNV *v void glVertex2i GLint x GLint y void glVertex2iv const GLint *v void glVertex2s GLshort x GLshort y void glVertex2sv const GLshort *v void glVertex2xOES GLfixed x void glVertex2xvOES const GLfixed *coords void glVertex3bOES GLbyte x GLbyte y GLbyte z void glVertex3bvOES const GLbyte *coords void glVertex3d GLdouble x GLdouble y GLdouble z void glVertex3dv const GLdouble *v void glVertex3f GLfloat x GLfloat y GLfloat z void glVertex3fv const GLfloat *v void glVertex3hNV GLhalfNV x GLhalfNV y GLhalfNV z void glVertex3hvNV const GLhalfNV *v void glVertex3i GLint x GLint y GLint z void glVertex3iv const GLint *v void glVertex3s GLshort x GLshort y GLshort z void glVertex3sv const GLshort *v void glVertex3xOES GLfixed x GLfixed y void glVertex3xvOES const GLfixed *coords void glVertex4bOES GLbyte x GLbyte y GLbyte z GLbyte w void glVertex4bvOES const GLbyte *coords void glVertex4d GLdouble x GLdouble y GLdouble z GLdouble w void glVertex4dv const GLdouble *v void glVertex4f GLfloat x GLfloat y GLfloat z GLfloat w void glVertex4fv const GLfloat *v void glVertex4hNV GLhalfNV x GLhalfNV y GLhalfNV z GLhalfNV w void glVertex4hvNV const GLhalfNV *v void glVertex4i GLint x GLint y GLint z GLint w void glVertex4iv const GLint *v void glVertex4s GLshort x GLshort y GLshort z GLshort w void glVertex4sv const GLshort *v void glVertex4xOES GLfixed x GLfixed y GLfixed z void glVertex4xvOES const GLfixed *coords void glVertexArrayAttribBinding GLuint vaobj GLuint attribindex GLuint bindingindex void glVertexArrayAttribFormat GLuint vaobj GLuint attribindex GLint size GLenum type GLboolean normalized GLuint relativeoffset void glVertexArrayAttribIFormat GLuint vaobj GLuint attribindex GLint size GLenum type GLuint relativeoffset void glVertexArrayAttribLFormat GLuint vaobj GLuint attribindex GLint size GLenum type GLuint relativeoffset void glVertexArrayBindVertexBufferEXT GLuint vaobj GLuint bindingindex GLuint buffer GLintptr offset GLsizei stride void glVertexArrayBindingDivisor GLuint vaobj GLuint bindingindex GLuint divisor void glVertexArrayColorOffsetEXT GLuint vaobj GLuint buffer GLint size GLenum type GLsizei stride GLintptr offset void glVertexArrayEdgeFlagOffsetEXT GLuint vaobj GLuint buffer GLsizei stride GLintptr offset void glVertexArrayElementBuffer GLuint vaobj GLuint buffer void glVertexArrayFogCoordOffsetEXT GLuint vaobj GLuint buffer GLenum type GLsizei stride GLintptr offset void glVertexArrayIndexOffsetEXT GLuint vaobj GLuint buffer GLenum type GLsizei stride GLintptr offset void glVertexArrayMultiTexCoordOffsetEXT GLuint vaobj GLuint buffer GLenum texunit GLint size GLenum type GLsizei stride GLintptr offset void glVertexArrayNormalOffsetEXT GLuint vaobj GLuint buffer GLenum type GLsizei stride GLintptr offset void glVertexArrayParameteriAPPLE GLenum pname GLint param void glVertexArrayRangeAPPLE GLsizei length void *pointer void glVertexArrayRangeNV GLsizei length const void *pointer void glVertexArraySecondaryColorOffsetEXT GLuint vaobj GLuint buffer GLint size GLenum type GLsizei stride GLintptr offset void glVertexArrayTexCoordOffsetEXT GLuint vaobj GLuint buffer GLint size GLenum type GLsizei stride GLintptr offset void glVertexArrayVertexAttribBindingEXT GLuint vaobj GLuint attribindex GLuint bindingindex void glVertexArrayVertexAttribDivisorEXT GLuint vaobj GLuint index GLuint divisor void glVertexArrayVertexAttribFormatEXT GLuint vaobj GLuint attribindex GLint size GLenum type GLboolean normalized GLuint relativeoffset void glVertexArrayVertexAttribIFormatEXT GLuint vaobj GLuint attribindex GLint size GLenum type GLuint relativeoffset void glVertexArrayVertexAttribIOffsetEXT GLuint vaobj GLuint buffer GLuint index GLint size GLenum type GLsizei stride GLintptr offset void glVertexArrayVertexAttribLFormatEXT GLuint vaobj GLuint attribindex GLint size GLenum type GLuint relativeoffset void glVertexArrayVertexAttribLOffsetEXT GLuint vaobj GLuint buffer GLuint index GLint size GLenum type GLsizei stride GLintptr offset void glVertexArrayVertexAttribOffsetEXT GLuint vaobj GLuint buffer GLuint index GLint size GLenum type GLboolean normalized GLsizei stride GLintptr offset void glVertexArrayVertexBindingDivisorEXT GLuint vaobj GLuint bindingindex GLuint divisor void glVertexArrayVertexBuffer GLuint vaobj GLuint bindingindex GLuint buffer GLintptr offset GLsizei stride void glVertexArrayVertexBuffers GLuint vaobj GLuint first GLsizei count const GLuint *buffers const GLintptr *offsets const GLsizei *strides void glVertexArrayVertexOffsetEXT GLuint vaobj GLuint buffer GLint size GLenum type GLsizei stride GLintptr offset void glVertexAttrib1d GLuint index GLdouble x void glVertexAttrib1dARB GLuint index GLdouble x void glVertexAttrib1dNV GLuint index GLdouble x void glVertexAttrib1dv GLuint index const GLdouble *v void glVertexAttrib1dvARB GLuint index const GLdouble *v void glVertexAttrib1dvNV GLuint index const GLdouble *v void glVertexAttrib1f GLuint index GLfloat x void glVertexAttrib1fARB GLuint index GLfloat x void glVertexAttrib1fNV GLuint index GLfloat x void glVertexAttrib1fv GLuint index const GLfloat *v void glVertexAttrib1fvARB GLuint index const GLfloat *v void glVertexAttrib1fvNV GLuint index const GLfloat *v void glVertexAttrib1hNV GLuint index GLhalfNV x void glVertexAttrib1hvNV GLuint index const GLhalfNV *v void glVertexAttrib1s GLuint index GLshort x void glVertexAttrib1sARB GLuint index GLshort x void glVertexAttrib1sNV GLuint index GLshort x void glVertexAttrib1sv GLuint index const GLshort *v void glVertexAttrib1svARB GLuint index const GLshort *v void glVertexAttrib1svNV GLuint index const GLshort *v void glVertexAttrib2d GLuint index GLdouble x GLdouble y void glVertexAttrib2dARB GLuint index GLdouble x GLdouble y void glVertexAttrib2dNV GLuint index GLdouble x GLdouble y void glVertexAttrib2dv GLuint index const GLdouble *v void glVertexAttrib2dvARB GLuint index const GLdouble *v void glVertexAttrib2dvNV GLuint index const GLdouble *v void glVertexAttrib2f GLuint index GLfloat x GLfloat y void glVertexAttrib2fARB GLuint index GLfloat x GLfloat y void glVertexAttrib2fNV GLuint index GLfloat x GLfloat y void glVertexAttrib2fv GLuint index const GLfloat *v void glVertexAttrib2fvARB GLuint index const GLfloat *v void glVertexAttrib2fvNV GLuint index const GLfloat *v void glVertexAttrib2hNV GLuint index GLhalfNV x GLhalfNV y void glVertexAttrib2hvNV GLuint index const GLhalfNV *v void glVertexAttrib2s GLuint index GLshort x GLshort y void glVertexAttrib2sARB GLuint index GLshort x GLshort y void glVertexAttrib2sNV GLuint index GLshort x GLshort y void glVertexAttrib2sv GLuint index const GLshort *v void glVertexAttrib2svARB GLuint index const GLshort *v void glVertexAttrib2svNV GLuint index const GLshort *v void glVertexAttrib3d GLuint index GLdouble x GLdouble y GLdouble z void glVertexAttrib3dARB GLuint index GLdouble x GLdouble y GLdouble z void glVertexAttrib3dNV GLuint index GLdouble x GLdouble y GLdouble z void glVertexAttrib3dv GLuint index const GLdouble *v void glVertexAttrib3dvARB GLuint index const GLdouble *v void glVertexAttrib3dvNV GLuint index const GLdouble *v void glVertexAttrib3f GLuint index GLfloat x GLfloat y GLfloat z void glVertexAttrib3fARB GLuint index GLfloat x GLfloat y GLfloat z void glVertexAttrib3fNV GLuint index GLfloat x GLfloat y GLfloat z void glVertexAttrib3fv GLuint index const GLfloat *v void glVertexAttrib3fvARB GLuint index const GLfloat *v void glVertexAttrib3fvNV GLuint index const GLfloat *v void glVertexAttrib3hNV GLuint index GLhalfNV x GLhalfNV y GLhalfNV z void glVertexAttrib3hvNV GLuint index const GLhalfNV *v void glVertexAttrib3s GLuint index GLshort x GLshort y GLshort z void glVertexAttrib3sARB GLuint index GLshort x GLshort y GLshort z void glVertexAttrib3sNV GLuint index GLshort x GLshort y GLshort z void glVertexAttrib3sv GLuint index const GLshort *v void glVertexAttrib3svARB GLuint index const GLshort *v void glVertexAttrib3svNV GLuint index const GLshort *v void glVertexAttrib4Nbv GLuint index const GLbyte *v void glVertexAttrib4NbvARB GLuint index const GLbyte *v void glVertexAttrib4Niv GLuint index const GLint *v void glVertexAttrib4NivARB GLuint index const GLint *v void glVertexAttrib4Nsv GLuint index const GLshort *v void glVertexAttrib4NsvARB GLuint index const GLshort *v void glVertexAttrib4Nub GLuint index GLubyte x GLubyte y GLubyte z GLubyte w void glVertexAttrib4NubARB GLuint index GLubyte x GLubyte y GLubyte z GLubyte w void glVertexAttrib4Nubv GLuint index const GLubyte *v void glVertexAttrib4NubvARB GLuint index const GLubyte *v void glVertexAttrib4Nuiv GLuint index const GLuint *v void glVertexAttrib4NuivARB GLuint index const GLuint *v void glVertexAttrib4Nusv GLuint index const GLushort *v void glVertexAttrib4NusvARB GLuint index const GLushort *v void glVertexAttrib4bv GLuint index const GLbyte *v void glVertexAttrib4bvARB GLuint index const GLbyte *v void glVertexAttrib4d GLuint index GLdouble x GLdouble y GLdouble z GLdouble w void glVertexAttrib4dARB GLuint index GLdouble x GLdouble y GLdouble z GLdouble w void glVertexAttrib4dNV GLuint index GLdouble x GLdouble y GLdouble z GLdouble w void glVertexAttrib4dv GLuint index const GLdouble *v void glVertexAttrib4dvARB GLuint index const GLdouble *v void glVertexAttrib4dvNV GLuint index const GLdouble *v void glVertexAttrib4f GLuint index GLfloat x GLfloat y GLfloat z GLfloat w void glVertexAttrib4fARB GLuint index GLfloat x GLfloat y GLfloat z GLfloat w void glVertexAttrib4fNV GLuint index GLfloat x GLfloat y GLfloat z GLfloat w void glVertexAttrib4fv GLuint index const GLfloat *v void glVertexAttrib4fvARB GLuint index const GLfloat *v void glVertexAttrib4fvNV GLuint index const GLfloat *v void glVertexAttrib4hNV GLuint index GLhalfNV x GLhalfNV y GLhalfNV z GLhalfNV w void glVertexAttrib4hvNV GLuint index const GLhalfNV *v void glVertexAttrib4iv GLuint index const GLint *v void glVertexAttrib4ivARB GLuint index const GLint *v void glVertexAttrib4s GLuint index GLshort x GLshort y GLshort z GLshort w void glVertexAttrib4sARB GLuint index GLshort x GLshort y GLshort z GLshort w void glVertexAttrib4sNV GLuint index GLshort x GLshort y GLshort z GLshort w void glVertexAttrib4sv GLuint index const GLshort *v void glVertexAttrib4svARB GLuint index const GLshort *v void glVertexAttrib4svNV GLuint index const GLshort *v void glVertexAttrib4ubNV GLuint index GLubyte x GLubyte y GLubyte z GLubyte w void glVertexAttrib4ubv GLuint index const GLubyte *v void glVertexAttrib4ubvARB GLuint index const GLubyte *v void glVertexAttrib4ubvNV GLuint index const GLubyte *v void glVertexAttrib4uiv GLuint index const GLuint *v void glVertexAttrib4uivARB GLuint index const GLuint *v void glVertexAttrib4usv GLuint index const GLushort *v void glVertexAttrib4usvARB GLuint index const GLushort *v void glVertexAttribArrayObjectATI GLuint index GLint size GLenum type GLboolean normalized GLsizei stride GLuint buffer GLuint offset void glVertexAttribBinding GLuint attribindex GLuint bindingindex void glVertexAttribDivisor GLuint index GLuint divisor void glVertexAttribDivisorANGLE GLuint index GLuint divisor void glVertexAttribDivisorARB GLuint index GLuint divisor void glVertexAttribDivisorEXT GLuint index GLuint divisor void glVertexAttribDivisorNV GLuint index GLuint divisor void glVertexAttribFormat GLuint attribindex GLint size GLenum type GLboolean normalized GLuint relativeoffset void glVertexAttribFormatNV GLuint index GLint size GLenum type GLboolean normalized GLsizei stride void glVertexAttribI1i GLuint index GLint x void glVertexAttribI1iEXT GLuint index GLint x void glVertexAttribI1iv GLuint index const GLint *v void glVertexAttribI1ivEXT GLuint index const GLint *v void glVertexAttribI1ui GLuint index GLuint x void glVertexAttribI1uiEXT GLuint index GLuint x void glVertexAttribI1uiv GLuint index const GLuint *v void glVertexAttribI1uivEXT GLuint index const GLuint *v void glVertexAttribI2i GLuint index GLint x GLint y void glVertexAttribI2iEXT GLuint index GLint x GLint y void glVertexAttribI2iv GLuint index const GLint *v void glVertexAttribI2ivEXT GLuint index const GLint *v void glVertexAttribI2ui GLuint index GLuint x GLuint y void glVertexAttribI2uiEXT GLuint index GLuint x GLuint y void glVertexAttribI2uiv GLuint index const GLuint *v void glVertexAttribI2uivEXT GLuint index const GLuint *v void glVertexAttribI3i GLuint index GLint x GLint y GLint z void glVertexAttribI3iEXT GLuint index GLint x GLint y GLint z void glVertexAttribI3iv GLuint index const GLint *v void glVertexAttribI3ivEXT GLuint index const GLint *v void glVertexAttribI3ui GLuint index GLuint x GLuint y GLuint z void glVertexAttribI3uiEXT GLuint index GLuint x GLuint y GLuint z void glVertexAttribI3uiv GLuint index const GLuint *v void glVertexAttribI3uivEXT GLuint index const GLuint *v void glVertexAttribI4bv GLuint index const GLbyte *v void glVertexAttribI4bvEXT GLuint index const GLbyte *v void glVertexAttribI4i GLuint index GLint x GLint y GLint z GLint w void glVertexAttribI4iEXT GLuint index GLint x GLint y GLint z GLint w void glVertexAttribI4iv GLuint index const GLint *v void glVertexAttribI4ivEXT GLuint index const GLint *v void glVertexAttribI4sv GLuint index const GLshort *v void glVertexAttribI4svEXT GLuint index const GLshort *v void glVertexAttribI4ubv GLuint index const GLubyte *v void glVertexAttribI4ubvEXT GLuint index const GLubyte *v void glVertexAttribI4ui GLuint index GLuint x GLuint y GLuint z GLuint w void glVertexAttribI4uiEXT GLuint index GLuint x GLuint y GLuint z GLuint w void glVertexAttribI4uiv GLuint index const GLuint *v void glVertexAttribI4uivEXT GLuint index const GLuint *v void glVertexAttribI4usv GLuint index const GLushort *v void glVertexAttribI4usvEXT GLuint index const GLushort *v void glVertexAttribIFormat GLuint attribindex GLint size GLenum type GLuint relativeoffset void glVertexAttribIFormatNV GLuint index GLint size GLenum type GLsizei stride void glVertexAttribIPointer GLuint index GLint size GLenum type GLsizei stride const void *pointer void glVertexAttribIPointerEXT GLuint index GLint size GLenum type GLsizei stride const void *pointer void glVertexAttribL1d GLuint index GLdouble x void glVertexAttribL1dEXT GLuint index GLdouble x void glVertexAttribL1dv GLuint index const GLdouble *v void glVertexAttribL1dvEXT GLuint index const GLdouble *v void glVertexAttribL1i64NV GLuint index GLint64EXT x void glVertexAttribL1i64vNV GLuint index const GLint64EXT *v void glVertexAttribL1ui64ARB GLuint index GLuint64EXT x void glVertexAttribL1ui64NV GLuint index GLuint64EXT x void glVertexAttribL1ui64vARB GLuint index const GLuint64EXT *v void glVertexAttribL1ui64vNV GLuint index const GLuint64EXT *v void glVertexAttribL2d GLuint index GLdouble x GLdouble y void glVertexAttribL2dEXT GLuint index GLdouble x GLdouble y void glVertexAttribL2dv GLuint index const GLdouble *v void glVertexAttribL2dvEXT GLuint index const GLdouble *v void glVertexAttribL2i64NV GLuint index GLint64EXT x GLint64EXT y void glVertexAttribL2i64vNV GLuint index const GLint64EXT *v void glVertexAttribL2ui64NV GLuint index GLuint64EXT x GLuint64EXT y void glVertexAttribL2ui64vNV GLuint index const GLuint64EXT *v void glVertexAttribL3d GLuint index GLdouble x GLdouble y GLdouble z void glVertexAttribL3dEXT GLuint index GLdouble x GLdouble y GLdouble z void glVertexAttribL3dv GLuint index const GLdouble *v void glVertexAttribL3dvEXT GLuint index const GLdouble *v void glVertexAttribL3i64NV GLuint index GLint64EXT x GLint64EXT y GLint64EXT z void glVertexAttribL3i64vNV GLuint index const GLint64EXT *v void glVertexAttribL3ui64NV GLuint index GLuint64EXT x GLuint64EXT y GLuint64EXT z void glVertexAttribL3ui64vNV GLuint index const GLuint64EXT *v void glVertexAttribL4d GLuint index GLdouble x GLdouble y GLdouble z GLdouble w void glVertexAttribL4dEXT GLuint index GLdouble x GLdouble y GLdouble z GLdouble w void glVertexAttribL4dv GLuint index const GLdouble *v void glVertexAttribL4dvEXT GLuint index const GLdouble *v void glVertexAttribL4i64NV GLuint index GLint64EXT x GLint64EXT y GLint64EXT z GLint64EXT w void glVertexAttribL4i64vNV GLuint index const GLint64EXT *v void glVertexAttribL4ui64NV GLuint index GLuint64EXT x GLuint64EXT y GLuint64EXT z GLuint64EXT w void glVertexAttribL4ui64vNV GLuint index const GLuint64EXT *v void glVertexAttribLFormat GLuint attribindex GLint size GLenum type GLuint relativeoffset void glVertexAttribLFormatNV GLuint index GLint size GLenum type GLsizei stride void glVertexAttribLPointer GLuint index GLint size GLenum type GLsizei stride const void *pointer void glVertexAttribLPointerEXT GLuint index GLint size GLenum type GLsizei stride const void *pointer void glVertexAttribP1ui GLuint index GLenum type GLboolean normalized GLuint value void glVertexAttribP1uiv GLuint index GLenum type GLboolean normalized const GLuint *value void glVertexAttribP2ui GLuint index GLenum type GLboolean normalized GLuint value void glVertexAttribP2uiv GLuint index GLenum type GLboolean normalized const GLuint *value void glVertexAttribP3ui GLuint index GLenum type GLboolean normalized GLuint value void glVertexAttribP3uiv GLuint index GLenum type GLboolean normalized const GLuint *value void glVertexAttribP4ui GLuint index GLenum type GLboolean normalized GLuint value void glVertexAttribP4uiv GLuint index GLenum type GLboolean normalized const GLuint *value void glVertexAttribParameteriAMD GLuint index GLenum pname GLint param void glVertexAttribPointer GLuint index GLint size GLenum type GLboolean normalized GLsizei stride const void *pointer void glVertexAttribPointerARB GLuint index GLint size GLenum type GLboolean normalized GLsizei stride const void *pointer void glVertexAttribPointerNV GLuint index GLint fsize GLenum type GLsizei stride const void *pointer void glVertexAttribs1dvNV GLuint index GLsizei count const GLdouble *v void glVertexAttribs1fvNV GLuint index GLsizei count const GLfloat *v void glVertexAttribs1hvNV GLuint index GLsizei n const GLhalfNV *v void glVertexAttribs1svNV GLuint index GLsizei count const GLshort *v void glVertexAttribs2dvNV GLuint index GLsizei count const GLdouble *v void glVertexAttribs2fvNV GLuint index GLsizei count const GLfloat *v void glVertexAttribs2hvNV GLuint index GLsizei n const GLhalfNV *v void glVertexAttribs2svNV GLuint index GLsizei count const GLshort *v void glVertexAttribs3dvNV GLuint index GLsizei count const GLdouble *v void glVertexAttribs3fvNV GLuint index GLsizei count const GLfloat *v void glVertexAttribs3hvNV GLuint index GLsizei n const GLhalfNV *v void glVertexAttribs3svNV GLuint index GLsizei count const GLshort *v void glVertexAttribs4dvNV GLuint index GLsizei count const GLdouble *v void glVertexAttribs4fvNV GLuint index GLsizei count const GLfloat *v void glVertexAttribs4hvNV GLuint index GLsizei n const GLhalfNV *v void glVertexAttribs4svNV GLuint index GLsizei count const GLshort *v void glVertexAttribs4ubvNV GLuint index GLsizei count const GLubyte *v void glVertexBindingDivisor GLuint bindingindex GLuint divisor void glVertexBlendARB GLint count void glVertexBlendEnvfATI GLenum pname GLfloat param void glVertexBlendEnviATI GLenum pname GLint param void glVertexFormatNV GLint size GLenum type GLsizei stride void glVertexP2ui GLenum type GLuint value void glVertexP2uiv GLenum type const GLuint *value void glVertexP3ui GLenum type GLuint value void glVertexP3uiv GLenum type const GLuint *value void glVertexP4ui GLenum type GLuint value void glVertexP4uiv GLenum type const GLuint *value void glVertexPointer GLint size GLenum type GLsizei stride const void *pointer void glVertexPointerEXT GLint size GLenum type GLsizei stride GLsizei count const void *pointer void glVertexPointerListIBM GLint size GLenum type GLint stride const void **pointer GLint ptrstride void glVertexPointervINTEL GLint size GLenum type const void **pointer void glVertexStream1dATI GLenum stream GLdouble x void glVertexStream1dvATI GLenum stream const GLdouble *coords void glVertexStream1fATI GLenum stream GLfloat x void glVertexStream1fvATI GLenum stream const GLfloat *coords void glVertexStream1iATI GLenum stream GLint x void glVertexStream1ivATI GLenum stream const GLint *coords void glVertexStream1sATI GLenum stream GLshort x void glVertexStream1svATI GLenum stream const GLshort *coords void glVertexStream2dATI GLenum stream GLdouble x GLdouble y void glVertexStream2dvATI GLenum stream const GLdouble *coords void glVertexStream2fATI GLenum stream GLfloat x GLfloat y void glVertexStream2fvATI GLenum stream const GLfloat *coords void glVertexStream2iATI GLenum stream GLint x GLint y void glVertexStream2ivATI GLenum stream const GLint *coords void glVertexStream2sATI GLenum stream GLshort x GLshort y void glVertexStream2svATI GLenum stream const GLshort *coords void glVertexStream3dATI GLenum stream GLdouble x GLdouble y GLdouble z void glVertexStream3dvATI GLenum stream const GLdouble *coords void glVertexStream3fATI GLenum stream GLfloat x GLfloat y GLfloat z void glVertexStream3fvATI GLenum stream const GLfloat *coords void glVertexStream3iATI GLenum stream GLint x GLint y GLint z void glVertexStream3ivATI GLenum stream const GLint *coords void glVertexStream3sATI GLenum stream GLshort x GLshort y GLshort z void glVertexStream3svATI GLenum stream const GLshort *coords void glVertexStream4dATI GLenum stream GLdouble x GLdouble y GLdouble z GLdouble w void glVertexStream4dvATI GLenum stream const GLdouble *coords void glVertexStream4fATI GLenum stream GLfloat x GLfloat y GLfloat z GLfloat w void glVertexStream4fvATI GLenum stream const GLfloat *coords void glVertexStream4iATI GLenum stream GLint x GLint y GLint z GLint w void glVertexStream4ivATI GLenum stream const GLint *coords void glVertexStream4sATI GLenum stream GLshort x GLshort y GLshort z GLshort w void glVertexStream4svATI GLenum stream const GLshort *coords void glVertexWeightPointerEXT GLint size GLenum type GLsizei stride const void *pointer void glVertexWeightfEXT GLfloat weight void glVertexWeightfvEXT const GLfloat *weight void glVertexWeighthNV GLhalfNV weight void glVertexWeighthvNV const GLhalfNV *weight GLenum glVideoCaptureNV GLuint video_capture_slot GLuint *sequence_num GLuint64EXT *capture_time void glVideoCaptureStreamParameterdvNV GLuint video_capture_slot GLuint stream GLenum pname const GLdouble *params void glVideoCaptureStreamParameterfvNV GLuint video_capture_slot GLuint stream GLenum pname const GLfloat *params void glVideoCaptureStreamParameterivNV GLuint video_capture_slot GLuint stream GLenum pname const GLint *params void glViewport GLint x GLint y GLsizei width GLsizei height void glViewportArrayv GLuint first GLsizei count const GLfloat *v void glViewportArrayvNV GLuint first GLsizei count const GLfloat *v void glViewportArrayvOES GLuint first GLsizei count const GLfloat *v void glViewportIndexedf GLuint index GLfloat x GLfloat y GLfloat w GLfloat h void glViewportIndexedfOES GLuint index GLfloat x GLfloat y GLfloat w GLfloat h void glViewportIndexedfNV GLuint index GLfloat x GLfloat y GLfloat w GLfloat h void glViewportIndexedfv GLuint index const GLfloat *v void glViewportIndexedfvOES GLuint index const GLfloat *v void glViewportIndexedfvNV GLuint index const GLfloat *v void glViewportPositionWScaleNV GLuint index GLfloat xcoeff GLfloat ycoeff void glViewportSwizzleNV GLuint index GLenum swizzlex GLenum swizzley GLenum swizzlez GLenum swizzlew void glWaitSemaphoreEXT GLuint semaphore GLuint numBufferBarriers const GLuint *buffers GLuint numTextureBarriers const GLuint *textures const GLenum *srcLayouts void glWaitSemaphoreui64NVX GLuint waitGpu GLsizei fenceObjectCount const GLuint *semaphoreArray const GLuint64 *fenceValueArray void glWaitSync GLsync sync GLbitfield flags GLuint64 timeout void glWaitSyncAPPLE GLsync sync GLbitfield flags GLuint64 timeout void glWeightPathsNV GLuint resultPath GLsizei numPaths const GLuint *paths const GLfloat *weights void glWeightPointerARB GLint size GLenum type GLsizei stride const void *pointer void glWeightPointerOES GLint size GLenum type GLsizei stride const void *pointer void glWeightbvARB GLint size const GLbyte *weights void glWeightdvARB GLint size const GLdouble *weights void glWeightfvARB GLint size const GLfloat *weights void glWeightivARB GLint size const GLint *weights void glWeightsvARB GLint size const GLshort *weights void glWeightubvARB GLint size const GLubyte *weights void glWeightuivARB GLint size const GLuint *weights void glWeightusvARB GLint size const GLushort *weights void glWindowPos2d GLdouble x GLdouble y void glWindowPos2dARB GLdouble x GLdouble y void glWindowPos2dMESA GLdouble x GLdouble y void glWindowPos2dv const GLdouble *v void glWindowPos2dvARB const GLdouble *v void glWindowPos2dvMESA const GLdouble *v void glWindowPos2f GLfloat x GLfloat y void glWindowPos2fARB GLfloat x GLfloat y void glWindowPos2fMESA GLfloat x GLfloat y void glWindowPos2fv const GLfloat *v void glWindowPos2fvARB const GLfloat *v void glWindowPos2fvMESA const GLfloat *v void glWindowPos2i GLint x GLint y void glWindowPos2iARB GLint x GLint y void glWindowPos2iMESA GLint x GLint y void glWindowPos2iv const GLint *v void glWindowPos2ivARB const GLint *v void glWindowPos2ivMESA const GLint *v void glWindowPos2s GLshort x GLshort y void glWindowPos2sARB GLshort x GLshort y void glWindowPos2sMESA GLshort x GLshort y void glWindowPos2sv const GLshort *v void glWindowPos2svARB const GLshort *v void glWindowPos2svMESA const GLshort *v void glWindowPos3d GLdouble x GLdouble y GLdouble z void glWindowPos3dARB GLdouble x GLdouble y GLdouble z void glWindowPos3dMESA GLdouble x GLdouble y GLdouble z void glWindowPos3dv const GLdouble *v void glWindowPos3dvARB const GLdouble *v void glWindowPos3dvMESA const GLdouble *v void glWindowPos3f GLfloat x GLfloat y GLfloat z void glWindowPos3fARB GLfloat x GLfloat y GLfloat z void glWindowPos3fMESA GLfloat x GLfloat y GLfloat z void glWindowPos3fv const GLfloat *v void glWindowPos3fvARB const GLfloat *v void glWindowPos3fvMESA const GLfloat *v void glWindowPos3i GLint x GLint y GLint z void glWindowPos3iARB GLint x GLint y GLint z void glWindowPos3iMESA GLint x GLint y GLint z void glWindowPos3iv const GLint *v void glWindowPos3ivARB const GLint *v void glWindowPos3ivMESA const GLint *v void glWindowPos3s GLshort x GLshort y GLshort z void glWindowPos3sARB GLshort x GLshort y GLshort z void glWindowPos3sMESA GLshort x GLshort y GLshort z void glWindowPos3sv const GLshort *v void glWindowPos3svARB const GLshort *v void glWindowPos3svMESA const GLshort *v void glWindowPos4dMESA GLdouble x GLdouble y GLdouble z GLdouble w void glWindowPos4dvMESA const GLdouble *v void glWindowPos4fMESA GLfloat x GLfloat y GLfloat z GLfloat w void glWindowPos4fvMESA const GLfloat *v void glWindowPos4iMESA GLint x GLint y GLint z GLint w void glWindowPos4ivMESA const GLint *v void glWindowPos4sMESA GLshort x GLshort y GLshort z GLshort w void glWindowPos4svMESA const GLshort *v void glWindowRectanglesEXT GLenum mode GLsizei count const GLint *box void glWriteMaskEXT GLuint res GLuint in GLenum outX GLenum outY GLenum outZ GLenum outW void glDrawVkImageNV GLuint64 vkImage GLuint sampler GLfloat x0 GLfloat y0 GLfloat x1 GLfloat y1 GLfloat z GLfloat s0 GLfloat t0 GLfloat s1 GLfloat t1 GLVULKANPROCNV glGetVkProcAddrNV const GLchar *name void glWaitVkSemaphoreNV GLuint64 vkSemaphore void glSignalVkSemaphoreNV GLuint64 vkSemaphore void glSignalVkFenceNV GLuint64 vkFence void glFramebufferParameteriMESA GLenum target GLenum pname GLint param void glGetFramebufferParameterivMESA GLenum target GLenum pname GLint *params glad-2.0.2/glad/files/glx.xml000066400000000000000000003407241432671066000157660ustar00rootroot00000000000000 Copyright 2013-2020 The Khronos Group Inc. SPDX-License-Identifier: Apache-2.0 This file, glx.xml, is the GLX API Registry. The canonical version of the registry, together with documentation, schema, and Python generator scripts used to generate C header files for GLX, can always be found in the Khronos Registry at https://github.com/KhronosGroup/OpenGL-Registry = 199901L #include #elif defined(__sun__) || defined(__digital__) #include #if defined(__STDC__) #if defined(__arch64__) || defined(_LP64) typedef long int int64_t; typedef unsigned long int uint64_t; #else typedef long long int int64_t; typedef unsigned long long int uint64_t; #endif /* __arch64__ */ #endif /* __STDC__ */ #elif defined( __VMS ) || defined(__sgi) #include #elif defined(__SCO__) || defined(__USLC__) #include #elif defined(__UNIXOS2__) || defined(__SOL64__) typedef long int int32_t; typedef long long int int64_t; typedef unsigned long long int uint64_t; #elif defined(_WIN32) && defined(__GNUC__) #include #elif defined(_WIN32) typedef __int32 int32_t; typedef __int64 int64_t; typedef unsigned __int64 uint64_t; #else /* Fallback if nothing above works */ #include #endif #endif]]> typedef XID GLXFBConfigID; typedef struct __GLXFBConfigRec *GLXFBConfig; typedef XID GLXContextID; typedef struct __GLXcontextRec *GLXContext; typedef XID GLXPixmap; typedef XID GLXDrawable; typedef XID GLXWindow; typedef XID GLXPbuffer; typedef void ( *__GLXextFuncPtr)(void); typedef XID GLXVideoCaptureDeviceNV; typedef unsigned int GLXVideoDeviceNV; typedef XID GLXVideoSourceSGIX; typedef XID GLXFBConfigIDSGIX; typedef struct __GLXFBConfigRec *GLXFBConfigSGIX; typedef XID GLXPbufferSGIX; typedef struct { int event_type; /* GLX_DAMAGED or GLX_SAVED */ int draw_type; /* GLX_WINDOW or GLX_PBUFFER */ unsigned long serial; /* # of last request processed by server */ Bool send_event; /* true if this came for SendEvent request */ Display *display; /* display the event was read from */ GLXDrawable drawable; /* XID of Drawable */ unsigned int buffer_mask; /* mask indicating which buffers are affected */ unsigned int aux_buffer; /* which aux buffer was affected */ int x, y; int width, height; int count; /* if nonzero, at least this many more */ } GLXPbufferClobberEvent; typedef struct { int type; unsigned long serial; /* # of last request processed by server */ Bool send_event; /* true if this came from a SendEvent request */ Display *display; /* Display the event was read from */ GLXDrawable drawable; /* drawable on which event was requested in event mask */ int event_type; int64_t ust; int64_t msc; int64_t sbc; } GLXBufferSwapComplete; typedef union __GLXEvent { GLXPbufferClobberEvent glxpbufferclobber; GLXBufferSwapComplete glxbufferswapcomplete; long pad[24]; } GLXEvent; typedef struct { int type; unsigned long serial; Bool send_event; Display *display; int extension; int evtype; GLXDrawable window; Bool stereo_tree; } GLXStereoNotifyEventEXT; typedef struct { int type; unsigned long serial; /* # of last request processed by server */ Bool send_event; /* true if this came for SendEvent request */ Display *display; /* display the event was read from */ GLXDrawable drawable; /* i.d. of Drawable */ int event_type; /* GLX_DAMAGED_SGIX or GLX_SAVED_SGIX */ int draw_type; /* GLX_WINDOW_SGIX or GLX_PBUFFER_SGIX */ unsigned int mask; /* mask indicating which buffers are affected*/ int x, y; int width, height; int count; /* if nonzero, at least this many more */ } GLXBufferClobberEventSGIX; typedef struct { char pipeName[80]; /* Should be [GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX] */ int networkId; } GLXHyperpipeNetworkSGIX; typedef struct { char pipeName[80]; /* Should be [GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX] */ int channel; unsigned int participationType; int timeSlice; } GLXHyperpipeConfigSGIX; typedef struct { char pipeName[80]; /* Should be [GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX] */ int srcXOrigin, srcYOrigin, srcWidth, srcHeight; int destXOrigin, destYOrigin, destWidth, destHeight; } GLXPipeRect; typedef struct { char pipeName[80]; /* Should be [GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX] */ int XOrigin, YOrigin, maxHeight, maxWidth; } GLXPipeRectLimits; Bool glXAssociateDMPbufferSGIX Display *dpy GLXPbufferSGIX pbuffer DMparams *params DMbuffer dmbuffer int glXBindChannelToWindowSGIX Display *display int screen int channel Window window int glXBindHyperpipeSGIX Display *dpy int hpId Bool glXBindSwapBarrierNV Display *dpy GLuint group GLuint barrier void glXBindSwapBarrierSGIX Display *dpy GLXDrawable drawable int barrier void glXBindTexImageEXT Display *dpy GLXDrawable drawable int buffer const int *attrib_list int glXBindVideoCaptureDeviceNV Display *dpy unsigned int video_capture_slot GLXVideoCaptureDeviceNV device int glXBindVideoDeviceNV Display *dpy unsigned int video_slot unsigned int video_device const int *attrib_list int glXBindVideoImageNV Display *dpy GLXVideoDeviceNV VideoDevice GLXPbuffer pbuf int iVideoBuffer void glXBlitContextFramebufferAMD GLXContext dstCtx GLint srcX0 GLint srcY0 GLint srcX1 GLint srcY1 GLint dstX0 GLint dstY0 GLint dstX1 GLint dstY1 GLbitfield mask GLenum filter int glXChannelRectSGIX Display *display int screen int channel int x int y int w int h int glXChannelRectSyncSGIX Display *display int screen int channel GLenum synctype GLXFBConfig *glXChooseFBConfig Display *dpy int screen const int *attrib_list int *nelements GLXFBConfigSGIX *glXChooseFBConfigSGIX Display *dpy int screen int *attrib_list int *nelements XVisualInfo *glXChooseVisual Display *dpy int screen int *attribList void glXCopyBufferSubDataNV Display *dpy GLXContext readCtx GLXContext writeCtx GLenum readTarget GLenum writeTarget GLintptr readOffset GLintptr writeOffset GLsizeiptr size void glXNamedCopyBufferSubDataNV Display *dpy GLXContext readCtx GLXContext writeCtx GLuint readBuffer GLuint writeBuffer GLintptr readOffset GLintptr writeOffset GLsizeiptr size void glXCopyContext Display *dpy GLXContext src GLXContext dst unsigned long mask void glXCopyImageSubDataNV Display *dpy GLXContext srcCtx GLuint srcName GLenum srcTarget GLint srcLevel GLint srcX GLint srcY GLint srcZ GLXContext dstCtx GLuint dstName GLenum dstTarget GLint dstLevel GLint dstX GLint dstY GLint dstZ GLsizei width GLsizei height GLsizei depth void glXCopySubBufferMESA Display *dpy GLXDrawable drawable int x int y int width int height GLXContext glXCreateAssociatedContextAMD unsigned int id GLXContext share_list GLXContext glXCreateAssociatedContextAttribsAMD unsigned int id GLXContext share_context const int *attribList GLXContext glXCreateContextAttribsARB Display *dpy GLXFBConfig config GLXContext share_context Bool direct const int *attrib_list GLXContext glXCreateContext Display *dpy XVisualInfo *vis GLXContext shareList Bool direct GLXContext glXCreateContextWithConfigSGIX Display *dpy GLXFBConfigSGIX config int render_type GLXContext share_list Bool direct GLXPbufferSGIX glXCreateGLXPbufferSGIX Display *dpy GLXFBConfigSGIX config unsigned int width unsigned int height int *attrib_list GLXPixmap glXCreateGLXPixmap Display *dpy XVisualInfo *visual Pixmap pixmap GLXPixmap glXCreateGLXPixmapMESA Display *dpy XVisualInfo *visual Pixmap pixmap Colormap cmap GLXPixmap glXCreateGLXPixmapWithConfigSGIX Display *dpy GLXFBConfigSGIX config Pixmap pixmap GLXVideoSourceSGIX glXCreateGLXVideoSourceSGIX Display *display int screen VLServer server VLPath path int nodeClass VLNode drainNode GLXContext glXCreateNewContext Display *dpy GLXFBConfig config int render_type GLXContext share_list Bool direct GLXPbuffer glXCreatePbuffer Display *dpy GLXFBConfig config const int *attrib_list GLXPixmap glXCreatePixmap Display *dpy GLXFBConfig config Pixmap pixmap const int *attrib_list GLXWindow glXCreateWindow Display *dpy GLXFBConfig config Window win const int *attrib_list void glXCushionSGI Display *dpy Window window float cushion Bool glXDelayBeforeSwapNV Display *dpy GLXDrawable drawable GLfloat seconds Bool glXDeleteAssociatedContextAMD GLXContext ctx void glXDestroyContext Display *dpy GLXContext ctx void glXDestroyGLXPbufferSGIX Display *dpy GLXPbufferSGIX pbuf void glXDestroyGLXPixmap Display *dpy GLXPixmap pixmap void glXDestroyGLXVideoSourceSGIX Display *dpy GLXVideoSourceSGIX glxvideosource int glXDestroyHyperpipeConfigSGIX Display *dpy int hpId void glXDestroyPbuffer Display *dpy GLXPbuffer pbuf void glXDestroyPixmap Display *dpy GLXPixmap pixmap void glXDestroyWindow Display *dpy GLXWindow win GLXVideoCaptureDeviceNV *glXEnumerateVideoCaptureDevicesNV Display *dpy int screen int *nelements unsigned int *glXEnumerateVideoDevicesNV Display *dpy int screen int *nelements void glXFreeContextEXT Display *dpy GLXContext context unsigned int glXGetAGPOffsetMESA const void *pointer const char *glXGetClientString Display *dpy int name int glXGetConfig Display *dpy XVisualInfo *visual int attrib int *value unsigned int glXGetContextGPUIDAMD GLXContext ctx GLXContextID glXGetContextIDEXT const GLXContext context GLXContext glXGetCurrentAssociatedContextAMD GLXContext glXGetCurrentContext Display *glXGetCurrentDisplayEXT Display *glXGetCurrentDisplay GLXDrawable glXGetCurrentDrawable GLXDrawable glXGetCurrentReadDrawableSGI GLXDrawable glXGetCurrentReadDrawable int glXGetFBConfigAttrib Display *dpy GLXFBConfig config int attribute int *value int glXGetFBConfigAttribSGIX Display *dpy GLXFBConfigSGIX config int attribute int *value GLXFBConfigSGIX glXGetFBConfigFromVisualSGIX Display *dpy XVisualInfo *vis GLXFBConfig *glXGetFBConfigs Display *dpy int screen int *nelements unsigned int glXGetGPUIDsAMD unsigned int maxCount unsigned int *ids int glXGetGPUInfoAMD unsigned int id int property GLenum dataType unsigned int size void *data Bool glXGetMscRateOML Display *dpy GLXDrawable drawable int32_t *numerator int32_t *denominator __GLXextFuncPtr glXGetProcAddressARB const GLubyte *procName __GLXextFuncPtr glXGetProcAddress const GLubyte *procName void glXGetSelectedEvent Display *dpy GLXDrawable draw unsigned long *event_mask void glXGetSelectedEventSGIX Display *dpy GLXDrawable drawable unsigned long *mask int glXGetSwapIntervalMESA Bool glXGetSyncValuesOML Display *dpy GLXDrawable drawable int64_t *ust int64_t *msc int64_t *sbc Status glXGetTransparentIndexSUN Display *dpy Window overlay Window underlay unsigned long *pTransparentIndex int glXGetVideoDeviceNV Display *dpy int screen int numVideoDevices GLXVideoDeviceNV *pVideoDevice int glXGetVideoInfoNV Display *dpy int screen GLXVideoDeviceNV VideoDevice unsigned long *pulCounterOutputPbuffer unsigned long *pulCounterOutputVideo int glXGetVideoSyncSGI unsigned int *count XVisualInfo *glXGetVisualFromFBConfig Display *dpy GLXFBConfig config XVisualInfo *glXGetVisualFromFBConfigSGIX Display *dpy GLXFBConfigSGIX config int glXHyperpipeAttribSGIX Display *dpy int timeSlice int attrib int size void *attribList int glXHyperpipeConfigSGIX Display *dpy int networkId int npipes GLXHyperpipeConfigSGIX *cfg int *hpId GLXContext glXImportContextEXT Display *dpy GLXContextID contextID Bool glXIsDirect Display *dpy GLXContext ctx Bool glXJoinSwapGroupNV Display *dpy GLXDrawable drawable GLuint group void glXJoinSwapGroupSGIX Display *dpy GLXDrawable drawable GLXDrawable member void glXLockVideoCaptureDeviceNV Display *dpy GLXVideoCaptureDeviceNV device Bool glXMakeAssociatedContextCurrentAMD GLXContext ctx Bool glXMakeContextCurrent Display *dpy GLXDrawable draw GLXDrawable read GLXContext ctx Bool glXMakeCurrent Display *dpy GLXDrawable drawable GLXContext ctx Bool glXMakeCurrentReadSGI Display *dpy GLXDrawable draw GLXDrawable read GLXContext ctx int glXQueryChannelDeltasSGIX Display *display int screen int channel int *x int *y int *w int *h int glXQueryChannelRectSGIX Display *display int screen int channel int *dx int *dy int *dw int *dh int glXQueryContext Display *dpy GLXContext ctx int attribute int *value int glXQueryContextInfoEXT Display *dpy GLXContext context int attribute int *value Bool glXQueryCurrentRendererIntegerMESA int attribute unsigned int *value const char *glXQueryCurrentRendererStringMESA int attribute void glXQueryDrawable Display *dpy GLXDrawable draw int attribute unsigned int *value Bool glXQueryExtension Display *dpy int *errorb int *event const char *glXQueryExtensionsString Display *dpy int screen Bool glXQueryFrameCountNV Display *dpy int screen GLuint *count void glXQueryGLXPbufferSGIX Display *dpy GLXPbufferSGIX pbuf int attribute unsigned int *value int glXQueryHyperpipeAttribSGIX Display *dpy int timeSlice int attrib int size void *returnAttribList int glXQueryHyperpipeBestAttribSGIX Display *dpy int timeSlice int attrib int size void *attribList void *returnAttribList GLXHyperpipeConfigSGIX *glXQueryHyperpipeConfigSGIX Display *dpy int hpId int *npipes GLXHyperpipeNetworkSGIX *glXQueryHyperpipeNetworkSGIX Display *dpy int *npipes Bool glXQueryMaxSwapBarriersSGIX Display *dpy int screen int *max Bool glXQueryMaxSwapGroupsNV Display *dpy int screen GLuint *maxGroups GLuint *maxBarriers Bool glXQueryRendererIntegerMESA Display *dpy int screen int renderer int attribute unsigned int *value const char *glXQueryRendererStringMESA Display *dpy int screen int renderer int attribute const char *glXQueryServerString Display *dpy int screen int name Bool glXQuerySwapGroupNV Display *dpy GLXDrawable drawable GLuint *group GLuint *barrier Bool glXQueryVersion Display *dpy int *maj int *min int glXQueryVideoCaptureDeviceNV Display *dpy GLXVideoCaptureDeviceNV device int attribute int *value Bool glXReleaseBuffersMESA Display *dpy GLXDrawable drawable void glXReleaseTexImageEXT Display *dpy GLXDrawable drawable int buffer void glXReleaseVideoCaptureDeviceNV Display *dpy GLXVideoCaptureDeviceNV device int glXReleaseVideoDeviceNV Display *dpy int screen GLXVideoDeviceNV VideoDevice int glXReleaseVideoImageNV Display *dpy GLXPbuffer pbuf Bool glXResetFrameCountNV Display *dpy int screen void glXSelectEvent Display *dpy GLXDrawable draw unsigned long event_mask void glXSelectEventSGIX Display *dpy GLXDrawable drawable unsigned long mask int glXSendPbufferToVideoNV Display *dpy GLXPbuffer pbuf int iBufferType unsigned long *pulCounterPbuffer GLboolean bBlock GLboolean glXSet3DfxModeMESA GLint mode void glXSwapBuffers Display *dpy GLXDrawable drawable int64_t glXSwapBuffersMscOML Display *dpy GLXDrawable drawable int64_t target_msc int64_t divisor int64_t remainder int glXSwapIntervalMESA unsigned int interval void glXSwapIntervalEXT Display *dpy GLXDrawable drawable int interval int glXSwapIntervalSGI int interval void glXUseXFont Font font int first int count int list Bool glXWaitForMscOML Display *dpy GLXDrawable drawable int64_t target_msc int64_t divisor int64_t remainder int64_t *ust int64_t *msc int64_t *sbc Bool glXWaitForSbcOML Display *dpy GLXDrawable drawable int64_t target_sbc int64_t *ust int64_t *msc int64_t *sbc void glXWaitGL int glXWaitVideoSyncSGI int divisor int remainder unsigned int *count void glXWaitX glad-2.0.2/glad/files/khrplatform.h000066400000000000000000000255731432671066000171560ustar00rootroot00000000000000#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_ */ glad-2.0.2/glad/files/vk.xml000066400000000000000000077077121432671066000156270ustar00rootroot00000000000000 Copyright 2015-2022 The Khronos Group Inc. SPDX-License-Identifier: Apache-2.0 OR MIT This file, vk.xml, is the Vulkan API Registry. It is a critically important and normative part of the Vulkan Specification, including a canonical machine-readable definition of the API, parameter and member validation language incorporated into the Specification and reference pages, and other material which is registered by Khronos, such as tags used by extension and layer authors. The authoritative public version of vk.xml is maintained in the default branch (currently named main) of the Khronos Vulkan GitHub project. The authoritative private version is maintained in the default branch of the member gitlab server. #include "vk_platform.h" WSI extensions In the current header structure, each platform's interfaces are confined to a platform-specific header (vulkan_xlib.h, vulkan_win32.h, etc.). These headers are not self-contained, and should not include native headers (X11/Xlib.h, windows.h, etc.). Code should either include vulkan.h after defining the appropriate VK_USE_PLATFORM_platform macros, or include the required native headers prior to explicitly including the corresponding platform header. To accomplish this, the dependencies of native types require native headers, but the XML defines the content for those native headers as empty. The actual native header includes can be restored by modifying the native header tags above to #include the header file in the 'name' attribute. // DEPRECATED: This define is deprecated. VK_MAKE_API_VERSION should be used instead. #define VK_MAKE_VERSION(major, minor, patch) \ ((((uint32_t)(major)) << 22) | (((uint32_t)(minor)) << 12) | ((uint32_t)(patch))) // DEPRECATED: This define is deprecated. VK_API_VERSION_MAJOR should be used instead. #define VK_VERSION_MAJOR(version) ((uint32_t)(version) >> 22) // DEPRECATED: This define is deprecated. VK_API_VERSION_MINOR should be used instead. #define VK_VERSION_MINOR(version) (((uint32_t)(version) >> 12) & 0x3FFU) // DEPRECATED: This define is deprecated. VK_API_VERSION_PATCH should be used instead. #define VK_VERSION_PATCH(version) ((uint32_t)(version) & 0xFFFU) #define VK_MAKE_API_VERSION(variant, major, minor, patch) \ ((((uint32_t)(variant)) << 29) | (((uint32_t)(major)) << 22) | (((uint32_t)(minor)) << 12) | ((uint32_t)(patch))) #define VK_API_VERSION_VARIANT(version) ((uint32_t)(version) >> 29) #define VK_API_VERSION_MAJOR(version) (((uint32_t)(version) >> 22) & 0x7FU) #define VK_API_VERSION_MINOR(version) (((uint32_t)(version) >> 12) & 0x3FFU) #define VK_API_VERSION_PATCH(version) ((uint32_t)(version) & 0xFFFU) // DEPRECATED: This define has been removed. Specific version defines (e.g. VK_API_VERSION_1_0), or the VK_MAKE_VERSION macro, should be used instead. //#define VK_API_VERSION VK_MAKE_VERSION(1, 0, 0) // Patch version should always be set to 0 // Vulkan 1.0 version number #define VK_API_VERSION_1_0 VK_MAKE_API_VERSION(0, 1, 0, 0)// Patch version should always be set to 0 // Vulkan 1.1 version number #define VK_API_VERSION_1_1 VK_MAKE_API_VERSION(0, 1, 1, 0)// Patch version should always be set to 0 // Vulkan 1.2 version number #define VK_API_VERSION_1_2 VK_MAKE_API_VERSION(0, 1, 2, 0)// Patch version should always be set to 0 // Vulkan 1.3 version number #define VK_API_VERSION_1_3 VK_MAKE_API_VERSION(0, 1, 3, 0)// Patch version should always be set to 0 // Version of this file #define VK_HEADER_VERSION 231 // Complete version of this file #define VK_HEADER_VERSION_COMPLETE VK_MAKE_API_VERSION(0, 1, 3, VK_HEADER_VERSION) #define VK_DEFINE_HANDLE(object) typedef struct object##_T* object; #ifndef VK_USE_64_BIT_PTR_DEFINES #if defined(__LP64__) || defined(_WIN64) || (defined(__x86_64__) && !defined(__ILP32__) ) || defined(_M_X64) || defined(__ia64) || defined (_M_IA64) || defined(__aarch64__) || defined(__powerpc64__) #define VK_USE_64_BIT_PTR_DEFINES 1 #else #define VK_USE_64_BIT_PTR_DEFINES 0 #endif #endif #ifndef VK_DEFINE_NON_DISPATCHABLE_HANDLE #if (VK_USE_64_BIT_PTR_DEFINES==1) #if (defined(__cplusplus) && (__cplusplus >= 201103L)) || (defined(_MSVC_LANG) && (_MSVC_LANG >= 201103L)) #define VK_NULL_HANDLE nullptr #else #define VK_NULL_HANDLE ((void*)0) #endif #else #define VK_NULL_HANDLE 0ULL #endif #endif #ifndef VK_NULL_HANDLE #define VK_NULL_HANDLE 0 #endif #ifndef VK_DEFINE_NON_DISPATCHABLE_HANDLE #if (VK_USE_64_BIT_PTR_DEFINES==1) #define VK_DEFINE_NON_DISPATCHABLE_HANDLE(object) typedef struct object##_T *object; #else #define VK_DEFINE_NON_DISPATCHABLE_HANDLE(object) typedef uint64_t object; #endif #endif struct ANativeWindow; struct AHardwareBuffer; #ifdef __OBJC__ @class CAMetalLayer; #else typedef void CAMetalLayer; #endif #ifdef __OBJC__ @protocol MTLDevice; typedef id<MTLDevice> MTLDevice_id; #else typedef void* MTLDevice_id; #endif #ifdef __OBJC__ @protocol MTLCommandQueue; typedef id<MTLCommandQueue> MTLCommandQueue_id; #else typedef void* MTLCommandQueue_id; #endif #ifdef __OBJC__ @protocol MTLBuffer; typedef id<MTLBuffer> MTLBuffer_id; #else typedef void* MTLBuffer_id; #endif #ifdef __OBJC__ @protocol MTLTexture; typedef id<MTLTexture> MTLTexture_id; #else typedef void* MTLTexture_id; #endif #ifdef __OBJC__ @protocol MTLSharedEvent; typedef id<MTLSharedEvent> MTLSharedEvent_id; #else typedef void* MTLSharedEvent_id; #endif typedef struct __IOSurface* IOSurfaceRef; typedef uint32_t VkSampleMask; typedef uint32_t VkBool32; typedef uint32_t VkFlags; typedef uint64_t VkFlags64; typedef uint64_t VkDeviceSize; typedef uint64_t VkDeviceAddress; Basic C types, pulled in via vk_platform.h Bitmask types typedef VkFlags VkFramebufferCreateFlags; typedef VkFlags VkQueryPoolCreateFlags; typedef VkFlags VkRenderPassCreateFlags; typedef VkFlags VkSamplerCreateFlags; typedef VkFlags VkPipelineLayoutCreateFlags; typedef VkFlags VkPipelineCacheCreateFlags; typedef VkFlags VkPipelineDepthStencilStateCreateFlags; typedef VkFlags VkPipelineDynamicStateCreateFlags; typedef VkFlags VkPipelineColorBlendStateCreateFlags; typedef VkFlags VkPipelineMultisampleStateCreateFlags; typedef VkFlags VkPipelineRasterizationStateCreateFlags; typedef VkFlags VkPipelineViewportStateCreateFlags; typedef VkFlags VkPipelineTessellationStateCreateFlags; typedef VkFlags VkPipelineInputAssemblyStateCreateFlags; typedef VkFlags VkPipelineVertexInputStateCreateFlags; typedef VkFlags VkPipelineShaderStageCreateFlags; typedef VkFlags VkDescriptorSetLayoutCreateFlags; typedef VkFlags VkBufferViewCreateFlags; typedef VkFlags VkInstanceCreateFlags; typedef VkFlags VkDeviceCreateFlags; typedef VkFlags VkDeviceQueueCreateFlags; typedef VkFlags VkQueueFlags; typedef VkFlags VkMemoryPropertyFlags; typedef VkFlags VkMemoryHeapFlags; typedef VkFlags VkAccessFlags; typedef VkFlags VkBufferUsageFlags; typedef VkFlags VkBufferCreateFlags; typedef VkFlags VkShaderStageFlags; typedef VkFlags VkImageUsageFlags; typedef VkFlags VkImageCreateFlags; typedef VkFlags VkImageViewCreateFlags; typedef VkFlags VkPipelineCreateFlags; typedef VkFlags VkColorComponentFlags; typedef VkFlags VkFenceCreateFlags; typedef VkFlags VkSemaphoreCreateFlags; typedef VkFlags VkFormatFeatureFlags; typedef VkFlags VkQueryControlFlags; typedef VkFlags VkQueryResultFlags; typedef VkFlags VkShaderModuleCreateFlags; typedef VkFlags VkEventCreateFlags; typedef VkFlags VkCommandPoolCreateFlags; typedef VkFlags VkCommandPoolResetFlags; typedef VkFlags VkCommandBufferResetFlags; typedef VkFlags VkCommandBufferUsageFlags; typedef VkFlags VkQueryPipelineStatisticFlags; typedef VkFlags VkMemoryMapFlags; typedef VkFlags VkImageAspectFlags; typedef VkFlags VkSparseMemoryBindFlags; typedef VkFlags VkSparseImageFormatFlags; typedef VkFlags VkSubpassDescriptionFlags; typedef VkFlags VkPipelineStageFlags; typedef VkFlags VkSampleCountFlags; typedef VkFlags VkAttachmentDescriptionFlags; typedef VkFlags VkStencilFaceFlags; typedef VkFlags VkCullModeFlags; typedef VkFlags VkDescriptorPoolCreateFlags; typedef VkFlags VkDescriptorPoolResetFlags; typedef VkFlags VkDependencyFlags; typedef VkFlags VkSubgroupFeatureFlags; typedef VkFlags VkIndirectCommandsLayoutUsageFlagsNV; typedef VkFlags VkIndirectStateFlagsNV; typedef VkFlags VkGeometryFlagsKHR; typedef VkFlags VkGeometryInstanceFlagsKHR; typedef VkFlags VkBuildAccelerationStructureFlagsKHR; typedef VkFlags VkPrivateDataSlotCreateFlags; typedef VkFlags VkAccelerationStructureCreateFlagsKHR; typedef VkFlags VkDescriptorUpdateTemplateCreateFlags; typedef VkFlags VkPipelineCreationFeedbackFlags; typedef VkFlags VkPerformanceCounterDescriptionFlagsKHR; typedef VkFlags VkAcquireProfilingLockFlagsKHR; typedef VkFlags VkSemaphoreWaitFlags; typedef VkFlags VkPipelineCompilerControlFlagsAMD; typedef VkFlags VkShaderCorePropertiesFlagsAMD; typedef VkFlags VkDeviceDiagnosticsConfigFlagsNV; typedef VkFlags64 VkAccessFlags2; typedef VkFlags64 VkPipelineStageFlags2; typedef VkFlags VkAccelerationStructureMotionInfoFlagsNV; typedef VkFlags VkAccelerationStructureMotionInstanceFlagsNV; typedef VkFlags64 VkFormatFeatureFlags2; typedef VkFlags VkRenderingFlags; typedef VkFlags VkBuildMicromapFlagsEXT; typedef VkFlags VkMicromapCreateFlagsEXT; WSI extensions typedef VkFlags VkCompositeAlphaFlagsKHR; typedef VkFlags VkDisplayPlaneAlphaFlagsKHR; typedef VkFlags VkSurfaceTransformFlagsKHR; typedef VkFlags VkSwapchainCreateFlagsKHR; typedef VkFlags VkDisplayModeCreateFlagsKHR; typedef VkFlags VkDisplaySurfaceCreateFlagsKHR; typedef VkFlags VkAndroidSurfaceCreateFlagsKHR; typedef VkFlags VkViSurfaceCreateFlagsNN; typedef VkFlags VkWaylandSurfaceCreateFlagsKHR; typedef VkFlags VkWin32SurfaceCreateFlagsKHR; typedef VkFlags VkXlibSurfaceCreateFlagsKHR; typedef VkFlags VkXcbSurfaceCreateFlagsKHR; typedef VkFlags VkDirectFBSurfaceCreateFlagsEXT; typedef VkFlags VkIOSSurfaceCreateFlagsMVK; typedef VkFlags VkMacOSSurfaceCreateFlagsMVK; typedef VkFlags VkMetalSurfaceCreateFlagsEXT; typedef VkFlags VkImagePipeSurfaceCreateFlagsFUCHSIA; typedef VkFlags VkStreamDescriptorSurfaceCreateFlagsGGP; typedef VkFlags VkHeadlessSurfaceCreateFlagsEXT; typedef VkFlags VkScreenSurfaceCreateFlagsQNX; typedef VkFlags VkPeerMemoryFeatureFlags; typedef VkFlags VkMemoryAllocateFlags; typedef VkFlags VkDeviceGroupPresentModeFlagsKHR; typedef VkFlags VkDebugReportFlagsEXT; typedef VkFlags VkCommandPoolTrimFlags; typedef VkFlags VkExternalMemoryHandleTypeFlagsNV; typedef VkFlags VkExternalMemoryFeatureFlagsNV; typedef VkFlags VkExternalMemoryHandleTypeFlags; typedef VkFlags VkExternalMemoryFeatureFlags; typedef VkFlags VkExternalSemaphoreHandleTypeFlags; typedef VkFlags VkExternalSemaphoreFeatureFlags; typedef VkFlags VkSemaphoreImportFlags; typedef VkFlags VkExternalFenceHandleTypeFlags; typedef VkFlags VkExternalFenceFeatureFlags; typedef VkFlags VkFenceImportFlags; typedef VkFlags VkSurfaceCounterFlagsEXT; typedef VkFlags VkPipelineViewportSwizzleStateCreateFlagsNV; typedef VkFlags VkPipelineDiscardRectangleStateCreateFlagsEXT; typedef VkFlags VkPipelineCoverageToColorStateCreateFlagsNV; typedef VkFlags VkPipelineCoverageModulationStateCreateFlagsNV; typedef VkFlags VkPipelineCoverageReductionStateCreateFlagsNV; typedef VkFlags VkValidationCacheCreateFlagsEXT; typedef VkFlags VkDebugUtilsMessageSeverityFlagsEXT; typedef VkFlags VkDebugUtilsMessageTypeFlagsEXT; typedef VkFlags VkDebugUtilsMessengerCreateFlagsEXT; typedef VkFlags VkDebugUtilsMessengerCallbackDataFlagsEXT; typedef VkFlags VkDeviceMemoryReportFlagsEXT; typedef VkFlags VkPipelineRasterizationConservativeStateCreateFlagsEXT; typedef VkFlags VkDescriptorBindingFlags; typedef VkFlags VkConditionalRenderingFlagsEXT; typedef VkFlags VkResolveModeFlags; typedef VkFlags VkPipelineRasterizationStateStreamCreateFlagsEXT; typedef VkFlags VkPipelineRasterizationDepthClipStateCreateFlagsEXT; typedef VkFlags VkSwapchainImageUsageFlagsANDROID; typedef VkFlags VkToolPurposeFlags; typedef VkFlags VkSubmitFlags; typedef VkFlags VkImageFormatConstraintsFlagsFUCHSIA; typedef VkFlags VkImageConstraintsInfoFlagsFUCHSIA; typedef VkFlags VkGraphicsPipelineLibraryFlagsEXT; typedef VkFlags VkImageCompressionFlagsEXT; typedef VkFlags VkImageCompressionFixedRateFlagsEXT; typedef VkFlags VkExportMetalObjectTypeFlagsEXT; typedef VkFlags VkDeviceAddressBindingFlagsEXT; typedef VkFlags VkOpticalFlowGridSizeFlagsNV; typedef VkFlags VkOpticalFlowUsageFlagsNV; typedef VkFlags VkOpticalFlowSessionCreateFlagsNV; typedef VkFlags VkOpticalFlowExecuteFlagsNV; Video Core extension typedef VkFlags VkVideoCodecOperationFlagsKHR; typedef VkFlags VkVideoCapabilityFlagsKHR; typedef VkFlags VkVideoSessionCreateFlagsKHR; typedef VkFlags VkVideoSessionParametersCreateFlagsKHR; typedef VkFlags VkVideoBeginCodingFlagsKHR; typedef VkFlags VkVideoEndCodingFlagsKHR; typedef VkFlags VkVideoCodingControlFlagsKHR; Video Decode Core extension typedef VkFlags VkVideoDecodeUsageFlagsKHR; typedef VkFlags VkVideoDecodeCapabilityFlagsKHR; typedef VkFlags VkVideoDecodeFlagsKHR; Video Decode H.264 extension typedef VkFlags VkVideoDecodeH264PictureLayoutFlagsEXT; Video Encode Core extension typedef VkFlags VkVideoEncodeFlagsKHR; typedef VkFlags VkVideoEncodeUsageFlagsKHR; typedef VkFlags VkVideoEncodeContentFlagsKHR; typedef VkFlags VkVideoEncodeCapabilityFlagsKHR; typedef VkFlags VkVideoEncodeRateControlFlagsKHR; typedef VkFlags VkVideoEncodeRateControlModeFlagsKHR; typedef VkFlags VkVideoChromaSubsamplingFlagsKHR; typedef VkFlags VkVideoComponentBitDepthFlagsKHR; Video Encode H.264 extension typedef VkFlags VkVideoEncodeH264CapabilityFlagsEXT; typedef VkFlags VkVideoEncodeH264InputModeFlagsEXT; typedef VkFlags VkVideoEncodeH264OutputModeFlagsEXT; Video Encode H.265 extension typedef VkFlags VkVideoEncodeH265CapabilityFlagsEXT; typedef VkFlags VkVideoEncodeH265InputModeFlagsEXT; typedef VkFlags VkVideoEncodeH265OutputModeFlagsEXT; typedef VkFlags VkVideoEncodeH265CtbSizeFlagsEXT; typedef VkFlags VkVideoEncodeH265TransformBlockSizeFlagsEXT; Types which can be void pointers or class pointers, selected at compile time VK_DEFINE_HANDLE(VkInstance) VK_DEFINE_HANDLE(VkPhysicalDevice) VK_DEFINE_HANDLE(VkDevice) VK_DEFINE_HANDLE(VkQueue) VK_DEFINE_HANDLE(VkCommandBuffer) VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDeviceMemory) VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkCommandPool) VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkBuffer) VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkBufferView) VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkImage) VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkImageView) VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkShaderModule) VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkPipeline) VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkPipelineLayout) VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSampler) VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDescriptorSet) VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDescriptorSetLayout) VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDescriptorPool) VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkFence) VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSemaphore) VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkEvent) VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkQueryPool) VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkFramebuffer) VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkRenderPass) VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkPipelineCache) VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkIndirectCommandsLayoutNV) VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDescriptorUpdateTemplate) VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSamplerYcbcrConversion) VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkValidationCacheEXT) VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkAccelerationStructureKHR) VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkAccelerationStructureNV) VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkPerformanceConfigurationINTEL) VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkBufferCollectionFUCHSIA) VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDeferredOperationKHR) VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkPrivateDataSlot) VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkCuModuleNVX) VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkCuFunctionNVX) VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkOpticalFlowSessionNV) VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkMicromapEXT) WSI extensions VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDisplayKHR) VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDisplayModeKHR) VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSurfaceKHR) VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSwapchainKHR) VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDebugReportCallbackEXT) VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDebugUtilsMessengerEXT) Video extensions VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkVideoSessionKHR) VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkVideoSessionParametersKHR) Types generated from corresponding enums tags below Extensions WSI extensions Enumerated types in the header, but not used by the API Video Core extensions Video Decode extensions Video H.264 Decode extensions Video H.265 Decode extensions Video Encode extensions Video H.264 Encode extensions Video H.265 Encode extensions The PFN_vk*Function types are used by VkAllocationCallbacks below typedef void (VKAPI_PTR *PFN_vkInternalAllocationNotification)( void* pUserData, size_t size, VkInternalAllocationType allocationType, VkSystemAllocationScope allocationScope); typedef void (VKAPI_PTR *PFN_vkInternalFreeNotification)( void* pUserData, size_t size, VkInternalAllocationType allocationType, VkSystemAllocationScope allocationScope); typedef void* (VKAPI_PTR *PFN_vkReallocationFunction)( void* pUserData, void* pOriginal, size_t size, size_t alignment, VkSystemAllocationScope allocationScope); typedef void* (VKAPI_PTR *PFN_vkAllocationFunction)( void* pUserData, size_t size, size_t alignment, VkSystemAllocationScope allocationScope); typedef void (VKAPI_PTR *PFN_vkFreeFunction)( void* pUserData, void* pMemory); The PFN_vkVoidFunction type are used by VkGet*ProcAddr below typedef void (VKAPI_PTR *PFN_vkVoidFunction)(void); The PFN_vkDebugReportCallbackEXT type are used by the DEBUG_REPORT extension typedef VkBool32 (VKAPI_PTR *PFN_vkDebugReportCallbackEXT)( VkDebugReportFlagsEXT flags, VkDebugReportObjectTypeEXT objectType, uint64_t object, size_t location, int32_t messageCode, const char* pLayerPrefix, const char* pMessage, void* pUserData); The PFN_vkDebugUtilsMessengerCallbackEXT type are used by the VK_EXT_debug_utils extension typedef VkBool32 (VKAPI_PTR *PFN_vkDebugUtilsMessengerCallbackEXT)( VkDebugUtilsMessageSeverityFlagBitsEXT messageSeverity, VkDebugUtilsMessageTypeFlagsEXT messageTypes, const VkDebugUtilsMessengerCallbackDataEXT* pCallbackData, void* pUserData); The PFN_vkDeviceMemoryReportCallbackEXT type is used by the VK_EXT_device_memory_report extension typedef void (VKAPI_PTR *PFN_vkDeviceMemoryReportCallbackEXT)( const VkDeviceMemoryReportCallbackDataEXT* pCallbackData, void* pUserData); Struct types VkStructureType sType struct VkBaseOutStructure* pNext VkStructureType sType const struct VkBaseInStructure* pNext int32_t x int32_t y int32_t x int32_t y int32_t z uint32_t width uint32_t height uint32_t width uint32_t height uint32_t depth float x float y float width float height float minDepth float maxDepth VkOffset2D offset VkExtent2D extent VkRect2D rect uint32_t baseArrayLayer uint32_t layerCount VkComponentSwizzle r VkComponentSwizzle g VkComponentSwizzle b VkComponentSwizzle a uint32_t apiVersion uint32_t driverVersion uint32_t vendorID uint32_t deviceID VkPhysicalDeviceType deviceType char deviceName[VK_MAX_PHYSICAL_DEVICE_NAME_SIZE] uint8_t pipelineCacheUUID[VK_UUID_SIZE] VkPhysicalDeviceLimits limits VkPhysicalDeviceSparseProperties sparseProperties char extensionName[VK_MAX_EXTENSION_NAME_SIZE]extension name uint32_t specVersionversion of the extension specification implemented char layerName[VK_MAX_EXTENSION_NAME_SIZE]layer name uint32_t specVersionversion of the layer specification implemented uint32_t implementationVersionbuild or release version of the layer's library char description[VK_MAX_DESCRIPTION_SIZE]Free-form description of the layer VkStructureType sType const void* pNext const char* pApplicationName uint32_t applicationVersion const char* pEngineName uint32_t engineVersion uint32_t apiVersion void* pUserData PFN_vkAllocationFunction pfnAllocation PFN_vkReallocationFunction pfnReallocation PFN_vkFreeFunction pfnFree PFN_vkInternalAllocationNotification pfnInternalAllocation PFN_vkInternalFreeNotification pfnInternalFree VkStructureType sType const void* pNext VkDeviceQueueCreateFlags flags uint32_t queueFamilyIndex uint32_t queueCount const float* pQueuePriorities VkStructureType sType const void* pNext VkDeviceCreateFlags flags uint32_t queueCreateInfoCount const VkDeviceQueueCreateInfo* pQueueCreateInfos uint32_t enabledLayerCount const char* const* ppEnabledLayerNamesOrdered list of layer names to be enabled uint32_t enabledExtensionCount const char* const* ppEnabledExtensionNames const VkPhysicalDeviceFeatures* pEnabledFeatures VkStructureType sType const void* pNext VkInstanceCreateFlags flags const VkApplicationInfo* pApplicationInfo uint32_t enabledLayerCount const char* const* ppEnabledLayerNamesOrdered list of layer names to be enabled uint32_t enabledExtensionCount const char* const* ppEnabledExtensionNamesExtension names to be enabled VkQueueFlags queueFlagsQueue flags uint32_t queueCount uint32_t timestampValidBits VkExtent3D minImageTransferGranularityMinimum alignment requirement for image transfers uint32_t memoryTypeCount VkMemoryType memoryTypes[VK_MAX_MEMORY_TYPES] uint32_t memoryHeapCount VkMemoryHeap memoryHeaps[VK_MAX_MEMORY_HEAPS] VkStructureType sType const void* pNext VkDeviceSize allocationSizeSize of memory allocation uint32_t memoryTypeIndexIndex of the of the memory type to allocate from VkDeviceSize sizeSpecified in bytes VkDeviceSize alignmentSpecified in bytes uint32_t memoryTypeBitsBitmask of the allowed memory type indices into memoryTypes[] for this object VkImageAspectFlags aspectMask VkExtent3D imageGranularity VkSparseImageFormatFlags flags VkSparseImageFormatProperties formatProperties uint32_t imageMipTailFirstLod VkDeviceSize imageMipTailSizeSpecified in bytes, must be a multiple of sparse block size in bytes / alignment VkDeviceSize imageMipTailOffsetSpecified in bytes, must be a multiple of sparse block size in bytes / alignment VkDeviceSize imageMipTailStrideSpecified in bytes, must be a multiple of sparse block size in bytes / alignment VkMemoryPropertyFlags propertyFlagsMemory properties of this memory type uint32_t heapIndexIndex of the memory heap allocations of this memory type are taken from VkDeviceSize sizeAvailable memory in the heap VkMemoryHeapFlags flagsFlags for the heap VkStructureType sType const void* pNext VkDeviceMemory memoryMapped memory object VkDeviceSize offsetOffset within the memory object where the range starts VkDeviceSize sizeSize of the range within the memory object VkFormatFeatureFlags linearTilingFeaturesFormat features in case of linear tiling VkFormatFeatureFlags optimalTilingFeaturesFormat features in case of optimal tiling VkFormatFeatureFlags bufferFeaturesFormat features supported by buffers VkExtent3D maxExtentmax image dimensions for this resource type uint32_t maxMipLevelsmax number of mipmap levels for this resource type uint32_t maxArrayLayersmax array size for this resource type VkSampleCountFlags sampleCountssupported sample counts for this resource type VkDeviceSize maxResourceSizemax size (in bytes) of this resource type VkBuffer bufferBuffer used for this descriptor slot. VkDeviceSize offsetBase offset from buffer start in bytes to update in the descriptor set. VkDeviceSize rangeSize in bytes of the buffer resource for this descriptor update. VkSampler samplerSampler to write to the descriptor in case it is a SAMPLER or COMBINED_IMAGE_SAMPLER descriptor. Ignored otherwise. VkImageView imageViewImage view to write to the descriptor in case it is a SAMPLED_IMAGE, STORAGE_IMAGE, COMBINED_IMAGE_SAMPLER, or INPUT_ATTACHMENT descriptor. Ignored otherwise. VkImageLayout imageLayoutLayout the image is expected to be in when accessed using this descriptor (only used if imageView is not VK_NULL_HANDLE). VkStructureType sType const void* pNext VkDescriptorSet dstSetDestination descriptor set uint32_t dstBindingBinding within the destination descriptor set to write uint32_t dstArrayElementArray element within the destination binding to write uint32_t descriptorCountNumber of descriptors to write (determines the size of the array pointed by pDescriptors) VkDescriptorType descriptorTypeDescriptor type to write (determines which members of the array pointed by pDescriptors are going to be used) const VkDescriptorImageInfo* pImageInfoSampler, image view, and layout for SAMPLER, COMBINED_IMAGE_SAMPLER, {SAMPLED,STORAGE}_IMAGE, and INPUT_ATTACHMENT descriptor types. const VkDescriptorBufferInfo* pBufferInfoRaw buffer, size, and offset for {UNIFORM,STORAGE}_BUFFER[_DYNAMIC] descriptor types. const VkBufferView* pTexelBufferViewBuffer view to write to the descriptor for {UNIFORM,STORAGE}_TEXEL_BUFFER descriptor types. VkStructureType sType const void* pNext VkDescriptorSet srcSetSource descriptor set uint32_t srcBindingBinding within the source descriptor set to copy from uint32_t srcArrayElementArray element within the source binding to copy from VkDescriptorSet dstSetDestination descriptor set uint32_t dstBindingBinding within the destination descriptor set to copy to uint32_t dstArrayElementArray element within the destination binding to copy to uint32_t descriptorCountNumber of descriptors to write (determines the size of the array pointed by pDescriptors) VkStructureType sType const void* pNext VkBufferCreateFlags flagsBuffer creation flags VkDeviceSize sizeSpecified in bytes VkBufferUsageFlags usageBuffer usage flags VkSharingMode sharingMode uint32_t queueFamilyIndexCount const uint32_t* pQueueFamilyIndices VkStructureType sType const void* pNext VkBufferViewCreateFlags flags VkBuffer buffer VkFormat formatOptionally specifies format of elements VkDeviceSize offsetSpecified in bytes VkDeviceSize rangeView size specified in bytes VkImageAspectFlags aspectMask uint32_t mipLevel uint32_t arrayLayer VkImageAspectFlags aspectMask uint32_t mipLevel uint32_t baseArrayLayer uint32_t layerCount VkImageAspectFlags aspectMask uint32_t baseMipLevel uint32_t levelCount uint32_t baseArrayLayer uint32_t layerCount VkStructureType sType const void* pNext VkAccessFlags srcAccessMaskMemory accesses from the source of the dependency to synchronize VkAccessFlags dstAccessMaskMemory accesses from the destination of the dependency to synchronize VkStructureType sType const void* pNext VkAccessFlags srcAccessMaskMemory accesses from the source of the dependency to synchronize VkAccessFlags dstAccessMaskMemory accesses from the destination of the dependency to synchronize uint32_t srcQueueFamilyIndexQueue family to transition ownership from uint32_t dstQueueFamilyIndexQueue family to transition ownership to VkBuffer bufferBuffer to sync VkDeviceSize offsetOffset within the buffer to sync VkDeviceSize sizeAmount of bytes to sync VkStructureType sType const void* pNext VkAccessFlags srcAccessMaskMemory accesses from the source of the dependency to synchronize VkAccessFlags dstAccessMaskMemory accesses from the destination of the dependency to synchronize VkImageLayout oldLayoutCurrent layout of the image VkImageLayout newLayoutNew layout to transition the image to uint32_t srcQueueFamilyIndexQueue family to transition ownership from uint32_t dstQueueFamilyIndexQueue family to transition ownership to VkImage imageImage to sync VkImageSubresourceRange subresourceRangeSubresource range to sync VkStructureType sType const void* pNext VkImageCreateFlags flagsImage creation flags VkImageType imageType VkFormat format VkExtent3D extent uint32_t mipLevels uint32_t arrayLayers VkSampleCountFlagBits samples VkImageTiling tiling VkImageUsageFlags usageImage usage flags VkSharingMode sharingModeCross-queue-family sharing mode uint32_t queueFamilyIndexCountNumber of queue families to share across const uint32_t* pQueueFamilyIndicesArray of queue family indices to share across VkImageLayout initialLayoutInitial image layout for all subresources VkDeviceSize offsetSpecified in bytes VkDeviceSize sizeSpecified in bytes VkDeviceSize rowPitchSpecified in bytes VkDeviceSize arrayPitchSpecified in bytes VkDeviceSize depthPitchSpecified in bytes VkStructureType sType const void* pNext VkImageViewCreateFlags flags VkImage image VkImageViewType viewType VkFormat format VkComponentMapping components VkImageSubresourceRange subresourceRange VkDeviceSize srcOffsetSpecified in bytes VkDeviceSize dstOffsetSpecified in bytes VkDeviceSize sizeSpecified in bytes VkDeviceSize resourceOffsetSpecified in bytes VkDeviceSize sizeSpecified in bytes VkDeviceMemory memory VkDeviceSize memoryOffsetSpecified in bytes VkSparseMemoryBindFlags flags VkImageSubresource subresource VkOffset3D offset VkExtent3D extent VkDeviceMemory memory VkDeviceSize memoryOffsetSpecified in bytes VkSparseMemoryBindFlags flags VkBuffer buffer uint32_t bindCount const VkSparseMemoryBind* pBinds VkImage image uint32_t bindCount const VkSparseMemoryBind* pBinds VkImage image uint32_t bindCount const VkSparseImageMemoryBind* pBinds VkStructureType sType const void* pNext uint32_t waitSemaphoreCount const VkSemaphore* pWaitSemaphores uint32_t bufferBindCount const VkSparseBufferMemoryBindInfo* pBufferBinds uint32_t imageOpaqueBindCount const VkSparseImageOpaqueMemoryBindInfo* pImageOpaqueBinds uint32_t imageBindCount const VkSparseImageMemoryBindInfo* pImageBinds uint32_t signalSemaphoreCount const VkSemaphore* pSignalSemaphores VkImageSubresourceLayers srcSubresource VkOffset3D srcOffsetSpecified in pixels for both compressed and uncompressed images VkImageSubresourceLayers dstSubresource VkOffset3D dstOffsetSpecified in pixels for both compressed and uncompressed images VkExtent3D extentSpecified in pixels for both compressed and uncompressed images VkImageSubresourceLayers srcSubresource VkOffset3D srcOffsets[2]Specified in pixels for both compressed and uncompressed images VkImageSubresourceLayers dstSubresource VkOffset3D dstOffsets[2]Specified in pixels for both compressed and uncompressed images VkDeviceSize bufferOffsetSpecified in bytes uint32_t bufferRowLengthSpecified in texels uint32_t bufferImageHeight VkImageSubresourceLayers imageSubresource VkOffset3D imageOffsetSpecified in pixels for both compressed and uncompressed images VkExtent3D imageExtentSpecified in pixels for both compressed and uncompressed images VkImageSubresourceLayers srcSubresource VkOffset3D srcOffset VkImageSubresourceLayers dstSubresource VkOffset3D dstOffset VkExtent3D extent VkStructureType sType const void* pNextnoautovalidity because this structure can be either an explicit parameter, or passed in a pNext chain VkShaderModuleCreateFlags flags size_t codeSizeSpecified in bytes const uint32_t* pCodeBinary code of size codeSize uint32_t bindingBinding number for this entry VkDescriptorType descriptorTypeType of the descriptors in this binding uint32_t descriptorCountNumber of descriptors in this binding VkShaderStageFlags stageFlagsShader stages this binding is visible to const VkSampler* pImmutableSamplersImmutable samplers (used if descriptor type is SAMPLER or COMBINED_IMAGE_SAMPLER, is either NULL or contains count number of elements) VkStructureType sType const void* pNext VkDescriptorSetLayoutCreateFlags flags uint32_t bindingCountNumber of bindings in the descriptor set layout const VkDescriptorSetLayoutBinding* pBindingsArray of descriptor set layout bindings VkDescriptorType type uint32_t descriptorCount VkStructureType sType const void* pNext VkDescriptorPoolCreateFlags flags uint32_t maxSets uint32_t poolSizeCount const VkDescriptorPoolSize* pPoolSizes VkStructureType sType const void* pNext VkDescriptorPool descriptorPool uint32_t descriptorSetCount const VkDescriptorSetLayout* pSetLayouts uint32_t constantIDThe SpecConstant ID specified in the BIL uint32_t offsetOffset of the value in the data block size_t sizeSize in bytes of the SpecConstant uint32_t mapEntryCountNumber of entries in the map const VkSpecializationMapEntry* pMapEntriesArray of map entries size_t dataSizeSize in bytes of pData const void* pDataPointer to SpecConstant data VkStructureType sType const void* pNext VkPipelineShaderStageCreateFlags flags VkShaderStageFlagBits stageShader stage VkShaderModule moduleModule containing entry point const char* pNameNull-terminated entry point name const VkSpecializationInfo* pSpecializationInfo VkStructureType sType const void* pNext VkPipelineCreateFlags flagsPipeline creation flags VkPipelineShaderStageCreateInfo stage VkPipelineLayout layoutInterface layout of the pipeline VkPipeline basePipelineHandleIf VK_PIPELINE_CREATE_DERIVATIVE_BIT is set and this value is nonzero, it specifies the handle of the base pipeline this is a derivative of int32_t basePipelineIndexIf VK_PIPELINE_CREATE_DERIVATIVE_BIT is set and this value is not -1, it specifies an index into pCreateInfos of the base pipeline this is a derivative of uint32_t bindingVertex buffer binding id uint32_t strideDistance between vertices in bytes (0 = no advancement) VkVertexInputRate inputRateThe rate at which the vertex data is consumed uint32_t locationlocation of the shader vertex attrib uint32_t bindingVertex buffer binding id VkFormat formatformat of source data uint32_t offsetOffset of first element in bytes from base of vertex VkStructureType sType const void* pNext VkPipelineVertexInputStateCreateFlags flags uint32_t vertexBindingDescriptionCountnumber of bindings const VkVertexInputBindingDescription* pVertexBindingDescriptions uint32_t vertexAttributeDescriptionCountnumber of attributes const VkVertexInputAttributeDescription* pVertexAttributeDescriptions VkStructureType sType const void* pNext VkPipelineInputAssemblyStateCreateFlags flags VkPrimitiveTopology topology VkBool32 primitiveRestartEnable VkStructureType sType const void* pNext VkPipelineTessellationStateCreateFlags flags uint32_t patchControlPoints VkStructureType sType const void* pNext VkPipelineViewportStateCreateFlags flags uint32_t viewportCount const VkViewport* pViewports uint32_t scissorCount const VkRect2D* pScissors VkStructureType sType const void* pNext VkPipelineRasterizationStateCreateFlags flags VkBool32 depthClampEnable VkBool32 rasterizerDiscardEnable VkPolygonMode polygonModeoptional (GL45) VkCullModeFlags cullMode VkFrontFace frontFace VkBool32 depthBiasEnable float depthBiasConstantFactor float depthBiasClamp float depthBiasSlopeFactor float lineWidth VkStructureType sType const void* pNext VkPipelineMultisampleStateCreateFlags flags VkSampleCountFlagBits rasterizationSamplesNumber of samples used for rasterization VkBool32 sampleShadingEnableoptional (GL45) float minSampleShadingoptional (GL45) const VkSampleMask* pSampleMaskArray of sampleMask words VkBool32 alphaToCoverageEnable VkBool32 alphaToOneEnable VkBool32 blendEnable VkBlendFactor srcColorBlendFactor VkBlendFactor dstColorBlendFactor VkBlendOp colorBlendOp VkBlendFactor srcAlphaBlendFactor VkBlendFactor dstAlphaBlendFactor VkBlendOp alphaBlendOp VkColorComponentFlags colorWriteMask VkStructureType sType const void* pNext VkPipelineColorBlendStateCreateFlags flags VkBool32 logicOpEnable VkLogicOp logicOp uint32_t attachmentCount# of pAttachments const VkPipelineColorBlendAttachmentState* pAttachments float blendConstants[4] VkStructureType sType const void* pNext VkPipelineDynamicStateCreateFlags flags uint32_t dynamicStateCount const VkDynamicState* pDynamicStates VkStencilOp failOp VkStencilOp passOp VkStencilOp depthFailOp VkCompareOp compareOp uint32_t compareMask uint32_t writeMask uint32_t reference VkStructureType sType const void* pNext VkPipelineDepthStencilStateCreateFlags flags VkBool32 depthTestEnable VkBool32 depthWriteEnable VkCompareOp depthCompareOp VkBool32 depthBoundsTestEnableoptional (depth_bounds_test) VkBool32 stencilTestEnable VkStencilOpState front VkStencilOpState back float minDepthBounds float maxDepthBounds VkStructureType sType const void* pNext VkPipelineCreateFlags flagsPipeline creation flags uint32_t stageCount const VkPipelineShaderStageCreateInfo* pStagesOne entry for each active shader stage const VkPipelineVertexInputStateCreateInfo* pVertexInputState const VkPipelineInputAssemblyStateCreateInfo* pInputAssemblyState const VkPipelineTessellationStateCreateInfo* pTessellationState const VkPipelineViewportStateCreateInfo* pViewportState const VkPipelineRasterizationStateCreateInfo* pRasterizationState const VkPipelineMultisampleStateCreateInfo* pMultisampleState const VkPipelineDepthStencilStateCreateInfo* pDepthStencilState const VkPipelineColorBlendStateCreateInfo* pColorBlendState const VkPipelineDynamicStateCreateInfo* pDynamicState VkPipelineLayout layoutInterface layout of the pipeline VkRenderPass renderPass uint32_t subpass VkPipeline basePipelineHandleIf VK_PIPELINE_CREATE_DERIVATIVE_BIT is set and this value is nonzero, it specifies the handle of the base pipeline this is a derivative of int32_t basePipelineIndexIf VK_PIPELINE_CREATE_DERIVATIVE_BIT is set and this value is not -1, it specifies an index into pCreateInfos of the base pipeline this is a derivative of VkStructureType sType const void* pNext VkPipelineCacheCreateFlags flags size_t initialDataSizeSize of initial data to populate cache, in bytes const void* pInitialDataInitial data to populate cache The fields in this structure are non-normative since structure packing is implementation-defined in C. The specification defines the normative layout. uint32_t headerSize VkPipelineCacheHeaderVersion headerVersion uint32_t vendorID uint32_t deviceID uint8_t pipelineCacheUUID[VK_UUID_SIZE] VkShaderStageFlags stageFlagsWhich stages use the range uint32_t offsetStart of the range, in bytes uint32_t sizeSize of the range, in bytes VkStructureType sType const void* pNext VkPipelineLayoutCreateFlags flags uint32_t setLayoutCountNumber of descriptor sets interfaced by the pipeline const VkDescriptorSetLayout* pSetLayoutsArray of setCount number of descriptor set layout objects defining the layout of the uint32_t pushConstantRangeCountNumber of push-constant ranges used by the pipeline const VkPushConstantRange* pPushConstantRangesArray of pushConstantRangeCount number of ranges used by various shader stages VkStructureType sType const void* pNext VkSamplerCreateFlags flags VkFilter magFilterFilter mode for magnification VkFilter minFilterFilter mode for minifiation VkSamplerMipmapMode mipmapModeMipmap selection mode VkSamplerAddressMode addressModeU VkSamplerAddressMode addressModeV VkSamplerAddressMode addressModeW float mipLodBias VkBool32 anisotropyEnable float maxAnisotropy VkBool32 compareEnable VkCompareOp compareOp float minLod float maxLod VkBorderColor borderColor VkBool32 unnormalizedCoordinates VkStructureType sType const void* pNext VkCommandPoolCreateFlags flagsCommand pool creation flags uint32_t queueFamilyIndex VkStructureType sType const void* pNext VkCommandPool commandPool VkCommandBufferLevel level uint32_t commandBufferCount VkStructureType sType const void* pNext VkRenderPass renderPassRender pass for secondary command buffers uint32_t subpass VkFramebuffer framebufferFramebuffer for secondary command buffers VkBool32 occlusionQueryEnableWhether this secondary command buffer may be executed during an occlusion query VkQueryControlFlags queryFlagsQuery flags used by this secondary command buffer, if executed during an occlusion query VkQueryPipelineStatisticFlags pipelineStatisticsPipeline statistics that may be counted for this secondary command buffer VkStructureType sType const void* pNext VkCommandBufferUsageFlags flagsCommand buffer usage flags const VkCommandBufferInheritanceInfo* pInheritanceInfoPointer to inheritance info for secondary command buffers VkStructureType sType const void* pNext VkRenderPass renderPass VkFramebuffer framebuffer VkRect2D renderArea uint32_t clearValueCount const VkClearValue* pClearValues float float32[4] int32_t int32[4] uint32_t uint32[4] float depth uint32_t stencil VkClearColorValue color VkClearDepthStencilValue depthStencil VkImageAspectFlags aspectMask uint32_t colorAttachment VkClearValue clearValue VkAttachmentDescriptionFlags flags VkFormat format VkSampleCountFlagBits samples VkAttachmentLoadOp loadOpLoad operation for color or depth data VkAttachmentStoreOp storeOpStore operation for color or depth data VkAttachmentLoadOp stencilLoadOpLoad operation for stencil data VkAttachmentStoreOp stencilStoreOpStore operation for stencil data VkImageLayout initialLayout VkImageLayout finalLayout uint32_t attachment VkImageLayout layout VkSubpassDescriptionFlags flags VkPipelineBindPoint pipelineBindPointMust be VK_PIPELINE_BIND_POINT_GRAPHICS for now uint32_t inputAttachmentCount const VkAttachmentReference* pInputAttachments uint32_t colorAttachmentCount const VkAttachmentReference* pColorAttachments const VkAttachmentReference* pResolveAttachments const VkAttachmentReference* pDepthStencilAttachment uint32_t preserveAttachmentCount const uint32_t* pPreserveAttachments uint32_t srcSubpass uint32_t dstSubpass VkPipelineStageFlags srcStageMask VkPipelineStageFlags dstStageMask VkAccessFlags srcAccessMaskMemory accesses from the source of the dependency to synchronize VkAccessFlags dstAccessMaskMemory accesses from the destination of the dependency to synchronize VkDependencyFlags dependencyFlags VkStructureType sType const void* pNext VkRenderPassCreateFlags flags uint32_t attachmentCount const VkAttachmentDescription* pAttachments uint32_t subpassCount const VkSubpassDescription* pSubpasses uint32_t dependencyCount const VkSubpassDependency* pDependencies VkStructureType sType const void* pNext VkEventCreateFlags flagsEvent creation flags VkStructureType sType const void* pNext VkFenceCreateFlags flagsFence creation flags VkBool32 robustBufferAccessout of bounds buffer accesses are well defined VkBool32 fullDrawIndexUint32full 32-bit range of indices for indexed draw calls VkBool32 imageCubeArrayimage views which are arrays of cube maps VkBool32 independentBlendblending operations are controlled per-attachment VkBool32 geometryShadergeometry stage VkBool32 tessellationShadertessellation control and evaluation stage VkBool32 sampleRateShadingper-sample shading and interpolation VkBool32 dualSrcBlendblend operations which take two sources VkBool32 logicOplogic operations VkBool32 multiDrawIndirectmulti draw indirect VkBool32 drawIndirectFirstInstanceindirect drawing can use non-zero firstInstance VkBool32 depthClampdepth clamping VkBool32 depthBiasClampdepth bias clamping VkBool32 fillModeNonSolidpoint and wireframe fill modes VkBool32 depthBoundsdepth bounds test VkBool32 wideLineslines with width greater than 1 VkBool32 largePointspoints with size greater than 1 VkBool32 alphaToOnethe fragment alpha component can be forced to maximum representable alpha value VkBool32 multiViewportviewport arrays VkBool32 samplerAnisotropyanisotropic sampler filtering VkBool32 textureCompressionETC2ETC texture compression formats VkBool32 textureCompressionASTC_LDRASTC LDR texture compression formats VkBool32 textureCompressionBCBC1-7 texture compressed formats VkBool32 occlusionQueryPreciseprecise occlusion queries returning actual sample counts VkBool32 pipelineStatisticsQuerypipeline statistics query VkBool32 vertexPipelineStoresAndAtomicsstores and atomic ops on storage buffers and images are supported in vertex, tessellation, and geometry stages VkBool32 fragmentStoresAndAtomicsstores and atomic ops on storage buffers and images are supported in the fragment stage VkBool32 shaderTessellationAndGeometryPointSizetessellation and geometry stages can export point size VkBool32 shaderImageGatherExtendedimage gather with run-time values and independent offsets VkBool32 shaderStorageImageExtendedFormatsthe extended set of formats can be used for storage images VkBool32 shaderStorageImageMultisamplemultisample images can be used for storage images VkBool32 shaderStorageImageReadWithoutFormatread from storage image does not require format qualifier VkBool32 shaderStorageImageWriteWithoutFormatwrite to storage image does not require format qualifier VkBool32 shaderUniformBufferArrayDynamicIndexingarrays of uniform buffers can be accessed with dynamically uniform indices VkBool32 shaderSampledImageArrayDynamicIndexingarrays of sampled images can be accessed with dynamically uniform indices VkBool32 shaderStorageBufferArrayDynamicIndexingarrays of storage buffers can be accessed with dynamically uniform indices VkBool32 shaderStorageImageArrayDynamicIndexingarrays of storage images can be accessed with dynamically uniform indices VkBool32 shaderClipDistanceclip distance in shaders VkBool32 shaderCullDistancecull distance in shaders VkBool32 shaderFloat6464-bit floats (doubles) in shaders VkBool32 shaderInt6464-bit integers in shaders VkBool32 shaderInt1616-bit integers in shaders VkBool32 shaderResourceResidencyshader can use texture operations that return resource residency information (requires sparseNonResident support) VkBool32 shaderResourceMinLodshader can use texture operations that specify minimum resource LOD VkBool32 sparseBindingSparse resources support: Resource memory can be managed at opaque page level rather than object level VkBool32 sparseResidencyBufferSparse resources support: GPU can access partially resident buffers VkBool32 sparseResidencyImage2DSparse resources support: GPU can access partially resident 2D (non-MSAA non-depth/stencil) images VkBool32 sparseResidencyImage3DSparse resources support: GPU can access partially resident 3D images VkBool32 sparseResidency2SamplesSparse resources support: GPU can access partially resident MSAA 2D images with 2 samples VkBool32 sparseResidency4SamplesSparse resources support: GPU can access partially resident MSAA 2D images with 4 samples VkBool32 sparseResidency8SamplesSparse resources support: GPU can access partially resident MSAA 2D images with 8 samples VkBool32 sparseResidency16SamplesSparse resources support: GPU can access partially resident MSAA 2D images with 16 samples VkBool32 sparseResidencyAliasedSparse resources support: GPU can correctly access data aliased into multiple locations (opt-in) VkBool32 variableMultisampleRatemultisample rate must be the same for all pipelines in a subpass VkBool32 inheritedQueriesQueries may be inherited from primary to secondary command buffers VkBool32 residencyStandard2DBlockShapeSparse resources support: GPU will access all 2D (single sample) sparse resources using the standard sparse image block shapes (based on pixel format) VkBool32 residencyStandard2DMultisampleBlockShapeSparse resources support: GPU will access all 2D (multisample) sparse resources using the standard sparse image block shapes (based on pixel format) VkBool32 residencyStandard3DBlockShapeSparse resources support: GPU will access all 3D sparse resources using the standard sparse image block shapes (based on pixel format) VkBool32 residencyAlignedMipSizeSparse resources support: Images with mip level dimensions that are NOT a multiple of the sparse image block dimensions will be placed in the mip tail VkBool32 residencyNonResidentStrictSparse resources support: GPU can consistently access non-resident regions of a resource, all reads return as if data is 0, writes are discarded resource maximum sizes uint32_t maxImageDimension1Dmax 1D image dimension uint32_t maxImageDimension2Dmax 2D image dimension uint32_t maxImageDimension3Dmax 3D image dimension uint32_t maxImageDimensionCubemax cubemap image dimension uint32_t maxImageArrayLayersmax layers for image arrays uint32_t maxTexelBufferElementsmax texel buffer size (fstexels) uint32_t maxUniformBufferRangemax uniform buffer range (bytes) uint32_t maxStorageBufferRangemax storage buffer range (bytes) uint32_t maxPushConstantsSizemax size of the push constants pool (bytes) memory limits uint32_t maxMemoryAllocationCountmax number of device memory allocations supported uint32_t maxSamplerAllocationCountmax number of samplers that can be allocated on a device VkDeviceSize bufferImageGranularityGranularity (in bytes) at which buffers and images can be bound to adjacent memory for simultaneous usage VkDeviceSize sparseAddressSpaceSizeTotal address space available for sparse allocations (bytes) descriptor set limits uint32_t maxBoundDescriptorSetsmax number of descriptors sets that can be bound to a pipeline uint32_t maxPerStageDescriptorSamplersmax number of samplers allowed per-stage in a descriptor set uint32_t maxPerStageDescriptorUniformBuffersmax number of uniform buffers allowed per-stage in a descriptor set uint32_t maxPerStageDescriptorStorageBuffersmax number of storage buffers allowed per-stage in a descriptor set uint32_t maxPerStageDescriptorSampledImagesmax number of sampled images allowed per-stage in a descriptor set uint32_t maxPerStageDescriptorStorageImagesmax number of storage images allowed per-stage in a descriptor set uint32_t maxPerStageDescriptorInputAttachmentsmax number of input attachments allowed per-stage in a descriptor set uint32_t maxPerStageResourcesmax number of resources allowed by a single stage uint32_t maxDescriptorSetSamplersmax number of samplers allowed in all stages in a descriptor set uint32_t maxDescriptorSetUniformBuffersmax number of uniform buffers allowed in all stages in a descriptor set uint32_t maxDescriptorSetUniformBuffersDynamicmax number of dynamic uniform buffers allowed in all stages in a descriptor set uint32_t maxDescriptorSetStorageBuffersmax number of storage buffers allowed in all stages in a descriptor set uint32_t maxDescriptorSetStorageBuffersDynamicmax number of dynamic storage buffers allowed in all stages in a descriptor set uint32_t maxDescriptorSetSampledImagesmax number of sampled images allowed in all stages in a descriptor set uint32_t maxDescriptorSetStorageImagesmax number of storage images allowed in all stages in a descriptor set uint32_t maxDescriptorSetInputAttachmentsmax number of input attachments allowed in all stages in a descriptor set vertex stage limits uint32_t maxVertexInputAttributesmax number of vertex input attribute slots uint32_t maxVertexInputBindingsmax number of vertex input binding slots uint32_t maxVertexInputAttributeOffsetmax vertex input attribute offset added to vertex buffer offset uint32_t maxVertexInputBindingStridemax vertex input binding stride uint32_t maxVertexOutputComponentsmax number of output components written by vertex shader tessellation control stage limits uint32_t maxTessellationGenerationLevelmax level supported by tessellation primitive generator uint32_t maxTessellationPatchSizemax patch size (vertices) uint32_t maxTessellationControlPerVertexInputComponentsmax number of input components per-vertex in TCS uint32_t maxTessellationControlPerVertexOutputComponentsmax number of output components per-vertex in TCS uint32_t maxTessellationControlPerPatchOutputComponentsmax number of output components per-patch in TCS uint32_t maxTessellationControlTotalOutputComponentsmax total number of per-vertex and per-patch output components in TCS tessellation evaluation stage limits uint32_t maxTessellationEvaluationInputComponentsmax number of input components per vertex in TES uint32_t maxTessellationEvaluationOutputComponentsmax number of output components per vertex in TES geometry stage limits uint32_t maxGeometryShaderInvocationsmax invocation count supported in geometry shader uint32_t maxGeometryInputComponentsmax number of input components read in geometry stage uint32_t maxGeometryOutputComponentsmax number of output components written in geometry stage uint32_t maxGeometryOutputVerticesmax number of vertices that can be emitted in geometry stage uint32_t maxGeometryTotalOutputComponentsmax total number of components (all vertices) written in geometry stage fragment stage limits uint32_t maxFragmentInputComponentsmax number of input components read in fragment stage uint32_t maxFragmentOutputAttachmentsmax number of output attachments written in fragment stage uint32_t maxFragmentDualSrcAttachmentsmax number of output attachments written when using dual source blending uint32_t maxFragmentCombinedOutputResourcesmax total number of storage buffers, storage images and output buffers compute stage limits uint32_t maxComputeSharedMemorySizemax total storage size of work group local storage (bytes) uint32_t maxComputeWorkGroupCount[3]max num of compute work groups that may be dispatched by a single command (x,y,z) uint32_t maxComputeWorkGroupInvocationsmax total compute invocations in a single local work group uint32_t maxComputeWorkGroupSize[3]max local size of a compute work group (x,y,z) uint32_t subPixelPrecisionBitsnumber bits of subpixel precision in screen x and y uint32_t subTexelPrecisionBitsnumber bits of precision for selecting texel weights uint32_t mipmapPrecisionBitsnumber bits of precision for selecting mipmap weights uint32_t maxDrawIndexedIndexValuemax index value for indexed draw calls (for 32-bit indices) uint32_t maxDrawIndirectCountmax draw count for indirect drawing calls float maxSamplerLodBiasmax absolute sampler LOD bias float maxSamplerAnisotropymax degree of sampler anisotropy uint32_t maxViewportsmax number of active viewports uint32_t maxViewportDimensions[2]max viewport dimensions (x,y) float viewportBoundsRange[2]viewport bounds range (min,max) uint32_t viewportSubPixelBitsnumber bits of subpixel precision for viewport size_t minMemoryMapAlignmentmin required alignment of pointers returned by MapMemory (bytes) VkDeviceSize minTexelBufferOffsetAlignmentmin required alignment for texel buffer offsets (bytes) VkDeviceSize minUniformBufferOffsetAlignmentmin required alignment for uniform buffer sizes and offsets (bytes) VkDeviceSize minStorageBufferOffsetAlignmentmin required alignment for storage buffer offsets (bytes) int32_t minTexelOffsetmin texel offset for OpTextureSampleOffset uint32_t maxTexelOffsetmax texel offset for OpTextureSampleOffset int32_t minTexelGatherOffsetmin texel offset for OpTextureGatherOffset uint32_t maxTexelGatherOffsetmax texel offset for OpTextureGatherOffset float minInterpolationOffsetfurthest negative offset for interpolateAtOffset float maxInterpolationOffsetfurthest positive offset for interpolateAtOffset uint32_t subPixelInterpolationOffsetBitsnumber of subpixel bits for interpolateAtOffset uint32_t maxFramebufferWidthmax width for a framebuffer uint32_t maxFramebufferHeightmax height for a framebuffer uint32_t maxFramebufferLayersmax layer count for a layered framebuffer VkSampleCountFlags framebufferColorSampleCountssupported color sample counts for a framebuffer VkSampleCountFlags framebufferDepthSampleCountssupported depth sample counts for a framebuffer VkSampleCountFlags framebufferStencilSampleCountssupported stencil sample counts for a framebuffer VkSampleCountFlags framebufferNoAttachmentsSampleCountssupported sample counts for a subpass which uses no attachments uint32_t maxColorAttachmentsmax number of color attachments per subpass VkSampleCountFlags sampledImageColorSampleCountssupported color sample counts for a non-integer sampled image VkSampleCountFlags sampledImageIntegerSampleCountssupported sample counts for an integer image VkSampleCountFlags sampledImageDepthSampleCountssupported depth sample counts for a sampled image VkSampleCountFlags sampledImageStencilSampleCountssupported stencil sample counts for a sampled image VkSampleCountFlags storageImageSampleCountssupported sample counts for a storage image uint32_t maxSampleMaskWordsmax number of sample mask words VkBool32 timestampComputeAndGraphicstimestamps on graphics and compute queues float timestampPeriodnumber of nanoseconds it takes for timestamp query value to increment by 1 uint32_t maxClipDistancesmax number of clip distances uint32_t maxCullDistancesmax number of cull distances uint32_t maxCombinedClipAndCullDistancesmax combined number of user clipping uint32_t discreteQueuePrioritiesdistinct queue priorities available float pointSizeRange[2]range (min,max) of supported point sizes float lineWidthRange[2]range (min,max) of supported line widths float pointSizeGranularitygranularity of supported point sizes float lineWidthGranularitygranularity of supported line widths VkBool32 strictLinesline rasterization follows preferred rules VkBool32 standardSampleLocationssupports standard sample locations for all supported sample counts VkDeviceSize optimalBufferCopyOffsetAlignmentoptimal offset of buffer copies VkDeviceSize optimalBufferCopyRowPitchAlignmentoptimal pitch of buffer copies VkDeviceSize nonCoherentAtomSizeminimum size and alignment for non-coherent host-mapped device memory access VkStructureType sType const void* pNext VkSemaphoreCreateFlags flagsSemaphore creation flags VkStructureType sType const void* pNext VkQueryPoolCreateFlags flags VkQueryType queryType uint32_t queryCount VkQueryPipelineStatisticFlags pipelineStatisticsOptional VkStructureType sType const void* pNext VkFramebufferCreateFlags flags VkRenderPass renderPass uint32_t attachmentCount const VkImageView* pAttachments uint32_t width uint32_t height uint32_t layers uint32_t vertexCount uint32_t instanceCount uint32_t firstVertex uint32_t firstInstance uint32_t indexCount uint32_t instanceCount uint32_t firstIndex int32_t vertexOffset uint32_t firstInstance uint32_t x uint32_t y uint32_t z uint32_t firstVertex uint32_t vertexCount uint32_t firstIndex uint32_t indexCount int32_t vertexOffset VkStructureType sType const void* pNext uint32_t waitSemaphoreCount const VkSemaphore* pWaitSemaphores const VkPipelineStageFlags* pWaitDstStageMask uint32_t commandBufferCount const VkCommandBuffer* pCommandBuffers uint32_t signalSemaphoreCount const VkSemaphore* pSignalSemaphores WSI extensions VkDisplayKHR displayHandle of the display object const char* displayNameName of the display VkExtent2D physicalDimensionsIn millimeters? VkExtent2D physicalResolutionMax resolution for CRT? VkSurfaceTransformFlagsKHR supportedTransformsone or more bits from VkSurfaceTransformFlagsKHR VkBool32 planeReorderPossibleVK_TRUE if the overlay plane's z-order can be changed on this display. VkBool32 persistentContentVK_TRUE if this is a "smart" display that supports self-refresh/internal buffering. VkDisplayKHR currentDisplayDisplay the plane is currently associated with. Will be VK_NULL_HANDLE if the plane is not in use. uint32_t currentStackIndexCurrent z-order of the plane. VkExtent2D visibleRegionVisible scanout region. uint32_t refreshRateNumber of times per second the display is updated. VkDisplayModeKHR displayModeHandle of this display mode. VkDisplayModeParametersKHR parametersThe parameters this mode uses. VkStructureType sType const void* pNext VkDisplayModeCreateFlagsKHR flags VkDisplayModeParametersKHR parametersThe parameters this mode uses. VkDisplayPlaneAlphaFlagsKHR supportedAlphaTypes of alpha blending supported, if any. VkOffset2D minSrcPositionDoes the plane have any position and extent restrictions? VkOffset2D maxSrcPosition VkExtent2D minSrcExtent VkExtent2D maxSrcExtent VkOffset2D minDstPosition VkOffset2D maxDstPosition VkExtent2D minDstExtent VkExtent2D maxDstExtent VkStructureType sType const void* pNext VkDisplaySurfaceCreateFlagsKHR flags VkDisplayModeKHR displayModeThe mode to use when displaying this surface uint32_t planeIndexThe plane on which this surface appears. Must be between 0 and the value returned by vkGetPhysicalDeviceDisplayPlanePropertiesKHR() in pPropertyCount. uint32_t planeStackIndexThe z-order of the plane. VkSurfaceTransformFlagBitsKHR transformTransform to apply to the images as part of the scanout operation float globalAlphaGlobal alpha value. Must be between 0 and 1, inclusive. Ignored if alphaMode is not VK_DISPLAY_PLANE_ALPHA_GLOBAL_BIT_KHR VkDisplayPlaneAlphaFlagBitsKHR alphaModeWhat type of alpha blending to use. Must be a bit from vkGetDisplayPlanePropertiesKHR::supportedAlpha. VkExtent2D imageExtentsize of the images to use with this surface VkStructureType sType const void* pNext VkRect2D srcRectRectangle within the presentable image to read pixel data from when presenting to the display. VkRect2D dstRectRectangle within the current display mode's visible region to display srcRectangle in. VkBool32 persistentFor smart displays, use buffered mode. If the display properties member "persistentMode" is VK_FALSE, this member must always be VK_FALSE. uint32_t minImageCountSupported minimum number of images for the surface uint32_t maxImageCountSupported maximum number of images for the surface, 0 for unlimited VkExtent2D currentExtentCurrent image width and height for the surface, (0, 0) if undefined VkExtent2D minImageExtentSupported minimum image width and height for the surface VkExtent2D maxImageExtentSupported maximum image width and height for the surface uint32_t maxImageArrayLayersSupported maximum number of image layers for the surface VkSurfaceTransformFlagsKHR supportedTransforms1 or more bits representing the transforms supported VkSurfaceTransformFlagBitsKHR currentTransformThe surface's current transform relative to the device's natural orientation VkCompositeAlphaFlagsKHR supportedCompositeAlpha1 or more bits representing the alpha compositing modes supported VkImageUsageFlags supportedUsageFlagsSupported image usage flags for the surface VkStructureType sType const void* pNext VkAndroidSurfaceCreateFlagsKHR flags struct ANativeWindow* window VkStructureType sType const void* pNext VkViSurfaceCreateFlagsNN flags void* window VkStructureType sType const void* pNext VkWaylandSurfaceCreateFlagsKHR flags struct wl_display* display struct wl_surface* surface VkStructureType sType const void* pNext VkWin32SurfaceCreateFlagsKHR flags HINSTANCE hinstance HWND hwnd VkStructureType sType const void* pNext VkXlibSurfaceCreateFlagsKHR flags Display* dpy Window window VkStructureType sType const void* pNext VkXcbSurfaceCreateFlagsKHR flags xcb_connection_t* connection xcb_window_t window VkStructureType sType const void* pNext VkDirectFBSurfaceCreateFlagsEXT flags IDirectFB* dfb IDirectFBSurface* surface VkStructureType sType const void* pNext VkImagePipeSurfaceCreateFlagsFUCHSIA flags zx_handle_t imagePipeHandle VkStructureType sType const void* pNext VkStreamDescriptorSurfaceCreateFlagsGGP flags GgpStreamDescriptor streamDescriptor VkStructureType sType const void* pNext VkScreenSurfaceCreateFlagsQNX flags struct _screen_context* context struct _screen_window* window VkFormat formatSupported pair of rendering format VkColorSpaceKHR colorSpaceand color space for the surface VkStructureType sType const void* pNext VkSwapchainCreateFlagsKHR flags VkSurfaceKHR surfaceThe swapchain's target surface uint32_t minImageCountMinimum number of presentation images the application needs VkFormat imageFormatFormat of the presentation images VkColorSpaceKHR imageColorSpaceColorspace of the presentation images VkExtent2D imageExtentDimensions of the presentation images uint32_t imageArrayLayersDetermines the number of views for multiview/stereo presentation VkImageUsageFlags imageUsageBits indicating how the presentation images will be used VkSharingMode imageSharingModeSharing mode used for the presentation images uint32_t queueFamilyIndexCountNumber of queue families having access to the images in case of concurrent sharing mode const uint32_t* pQueueFamilyIndicesArray of queue family indices having access to the images in case of concurrent sharing mode VkSurfaceTransformFlagBitsKHR preTransformThe transform, relative to the device's natural orientation, applied to the image content prior to presentation VkCompositeAlphaFlagBitsKHR compositeAlphaThe alpha blending mode used when compositing this surface with other surfaces in the window system VkPresentModeKHR presentModeWhich presentation mode to use for presents on this swap chain VkBool32 clippedSpecifies whether presentable images may be affected by window clip regions VkSwapchainKHR oldSwapchainExisting swap chain to replace, if any VkStructureType sType const void* pNext uint32_t waitSemaphoreCountNumber of semaphores to wait for before presenting const VkSemaphore* pWaitSemaphoresSemaphores to wait for before presenting uint32_t swapchainCountNumber of swapchains to present in this call const VkSwapchainKHR* pSwapchainsSwapchains to present an image from const uint32_t* pImageIndicesIndices of which presentable images to present VkResult* pResultsOptional (i.e. if non-NULL) VkResult for each swapchain VkStructureType sType const void* pNext VkDebugReportFlagsEXT flagsIndicates which events call this callback PFN_vkDebugReportCallbackEXT pfnCallbackFunction pointer of a callback function void* pUserDataUser data provided to callback function VkStructureType sTypeMust be VK_STRUCTURE_TYPE_VALIDATION_FLAGS_EXT const void* pNext uint32_t disabledValidationCheckCountNumber of validation checks to disable const VkValidationCheckEXT* pDisabledValidationChecksValidation checks to disable VkStructureType sTypeMust be VK_STRUCTURE_TYPE_VALIDATION_FEATURES_EXT const void* pNext uint32_t enabledValidationFeatureCountNumber of validation features to enable const VkValidationFeatureEnableEXT* pEnabledValidationFeaturesValidation features to enable uint32_t disabledValidationFeatureCountNumber of validation features to disable const VkValidationFeatureDisableEXT* pDisabledValidationFeaturesValidation features to disable VkStructureType sType const void* pNext VkRasterizationOrderAMD rasterizationOrderRasterization order to use for the pipeline VkStructureType sType const void* pNext VkDebugReportObjectTypeEXT objectTypeThe type of the object uint64_t objectThe handle of the object, cast to uint64_t const char* pObjectNameName to apply to the object VkStructureType sType const void* pNext VkDebugReportObjectTypeEXT objectTypeThe type of the object uint64_t objectThe handle of the object, cast to uint64_t uint64_t tagNameThe name of the tag to set on the object size_t tagSizeThe length in bytes of the tag data const void* pTagTag data to attach to the object VkStructureType sType const void* pNext const char* pMarkerNameName of the debug marker float color[4]Optional color for debug marker VkStructureType sType const void* pNext VkBool32 dedicatedAllocationWhether this image uses a dedicated allocation VkStructureType sType const void* pNext VkBool32 dedicatedAllocationWhether this buffer uses a dedicated allocation VkStructureType sType const void* pNext VkImage imageImage that this allocation will be bound to VkBuffer bufferBuffer that this allocation will be bound to VkImageFormatProperties imageFormatProperties VkExternalMemoryFeatureFlagsNV externalMemoryFeatures VkExternalMemoryHandleTypeFlagsNV exportFromImportedHandleTypes VkExternalMemoryHandleTypeFlagsNV compatibleHandleTypes VkStructureType sType const void* pNext VkExternalMemoryHandleTypeFlagsNV handleTypes VkStructureType sType const void* pNext VkExternalMemoryHandleTypeFlagsNV handleTypes VkStructureType sType const void* pNext VkExternalMemoryHandleTypeFlagsNV handleType HANDLE handle VkStructureType sType const void* pNext const SECURITY_ATTRIBUTES* pAttributes DWORD dwAccess VkStructureType sType const void* pNext uint32_t acquireCount const VkDeviceMemory* pAcquireSyncs const uint64_t* pAcquireKeys const uint32_t* pAcquireTimeoutMilliseconds uint32_t releaseCount const VkDeviceMemory* pReleaseSyncs const uint64_t* pReleaseKeys VkStructureType sType void* pNext VkBool32 deviceGeneratedCommands VkStructureType sType const void* pNext uint32_t privateDataSlotRequestCount VkStructureType sType const void* pNext VkPrivateDataSlotCreateFlags flags VkStructureType sType void* pNext VkBool32 privateData VkStructureType sType void* pNext uint32_t maxGraphicsShaderGroupCount uint32_t maxIndirectSequenceCount uint32_t maxIndirectCommandsTokenCount uint32_t maxIndirectCommandsStreamCount uint32_t maxIndirectCommandsTokenOffset uint32_t maxIndirectCommandsStreamStride uint32_t minSequencesCountBufferOffsetAlignment uint32_t minSequencesIndexBufferOffsetAlignment uint32_t minIndirectCommandsBufferOffsetAlignment VkStructureType sType void* pNext uint32_t maxMultiDrawCount VkStructureType sType const void* pNext uint32_t stageCount const VkPipelineShaderStageCreateInfo* pStages const VkPipelineVertexInputStateCreateInfo* pVertexInputState const VkPipelineTessellationStateCreateInfo* pTessellationState VkStructureType sType const void* pNext uint32_t groupCount const VkGraphicsShaderGroupCreateInfoNV* pGroups uint32_t pipelineCount const VkPipeline* pPipelines uint32_t groupIndex VkDeviceAddress bufferAddress uint32_t size VkIndexType indexType VkDeviceAddress bufferAddress uint32_t size uint32_t stride uint32_t data VkBuffer buffer VkDeviceSize offset VkStructureType sType const void* pNext VkIndirectCommandsTokenTypeNV tokenType uint32_t stream uint32_t offset uint32_t vertexBindingUnit VkBool32 vertexDynamicStride VkPipelineLayout pushconstantPipelineLayout VkShaderStageFlags pushconstantShaderStageFlags uint32_t pushconstantOffset uint32_t pushconstantSize VkIndirectStateFlagsNV indirectStateFlags uint32_t indexTypeCount const VkIndexType* pIndexTypes const uint32_t* pIndexTypeValues VkStructureType sType const void* pNext VkIndirectCommandsLayoutUsageFlagsNV flags VkPipelineBindPoint pipelineBindPoint uint32_t tokenCount const VkIndirectCommandsLayoutTokenNV* pTokens uint32_t streamCount const uint32_t* pStreamStrides VkStructureType sType const void* pNext VkPipelineBindPoint pipelineBindPoint VkPipeline pipeline VkIndirectCommandsLayoutNV indirectCommandsLayout uint32_t streamCount const VkIndirectCommandsStreamNV* pStreams uint32_t sequencesCount VkBuffer preprocessBuffer VkDeviceSize preprocessOffset VkDeviceSize preprocessSize VkBuffer sequencesCountBuffer VkDeviceSize sequencesCountOffset VkBuffer sequencesIndexBuffer VkDeviceSize sequencesIndexOffset VkStructureType sType const void* pNext VkPipelineBindPoint pipelineBindPoint VkPipeline pipeline VkIndirectCommandsLayoutNV indirectCommandsLayout uint32_t maxSequencesCount VkStructureType sType void* pNext VkPhysicalDeviceFeatures features VkStructureType sType void* pNext VkPhysicalDeviceProperties properties VkStructureType sType void* pNext VkFormatProperties formatProperties VkStructureType sType void* pNext VkImageFormatProperties imageFormatProperties VkStructureType sType const void* pNext VkFormat format VkImageType type VkImageTiling tiling VkImageUsageFlags usage VkImageCreateFlags flags VkStructureType sType void* pNext VkQueueFamilyProperties queueFamilyProperties VkStructureType sType void* pNext VkPhysicalDeviceMemoryProperties memoryProperties VkStructureType sType void* pNext VkSparseImageFormatProperties properties VkStructureType sType const void* pNext VkFormat format VkImageType type VkSampleCountFlagBits samples VkImageUsageFlags usage VkImageTiling tiling VkStructureType sType void* pNext uint32_t maxPushDescriptors uint8_t major uint8_t minor uint8_t subminor uint8_t patch VkStructureType sType void* pNext VkDriverId driverID char driverName[VK_MAX_DRIVER_NAME_SIZE] char driverInfo[VK_MAX_DRIVER_INFO_SIZE] VkConformanceVersion conformanceVersion VkStructureType sType const void* pNext uint32_t swapchainCountCopy of VkPresentInfoKHR::swapchainCount const VkPresentRegionKHR* pRegionsThe regions that have changed uint32_t rectangleCountNumber of rectangles in pRectangles const VkRectLayerKHR* pRectanglesArray of rectangles that have changed in a swapchain's image(s) VkOffset2D offsetupper-left corner of a rectangle that has not changed, in pixels of a presentation images VkExtent2D extentDimensions of a rectangle that has not changed, in pixels of a presentation images uint32_t layerLayer of a swapchain's image(s), for stereoscopic-3D images VkStructureType sType void* pNext VkBool32 variablePointersStorageBuffer VkBool32 variablePointers VkExternalMemoryFeatureFlags externalMemoryFeatures VkExternalMemoryHandleTypeFlags exportFromImportedHandleTypes VkExternalMemoryHandleTypeFlags compatibleHandleTypes VkStructureType sType const void* pNext VkExternalMemoryHandleTypeFlagBits handleType VkStructureType sType void* pNext VkExternalMemoryProperties externalMemoryProperties VkStructureType sType const void* pNext VkBufferCreateFlags flags VkBufferUsageFlags usage VkExternalMemoryHandleTypeFlagBits handleType VkStructureType sType void* pNext VkExternalMemoryProperties externalMemoryProperties VkStructureType sType void* pNext uint8_t deviceUUID[VK_UUID_SIZE] uint8_t driverUUID[VK_UUID_SIZE] uint8_t deviceLUID[VK_LUID_SIZE] uint32_t deviceNodeMask VkBool32 deviceLUIDValid VkStructureType sType const void* pNext VkExternalMemoryHandleTypeFlags handleTypes VkStructureType sType const void* pNext VkExternalMemoryHandleTypeFlags handleTypes VkStructureType sType const void* pNext VkExternalMemoryHandleTypeFlags handleTypes VkStructureType sType const void* pNext VkExternalMemoryHandleTypeFlagBits handleType HANDLE handle LPCWSTR name VkStructureType sType const void* pNext const SECURITY_ATTRIBUTES* pAttributes DWORD dwAccess LPCWSTR name VkStructureType sType const void* pNext VkExternalMemoryHandleTypeFlagBits handleType zx_handle_t handle VkStructureType sType void* pNext uint32_t memoryTypeBits VkStructureType sType const void* pNext VkDeviceMemory memory VkExternalMemoryHandleTypeFlagBits handleType VkStructureType sType void* pNext uint32_t memoryTypeBits VkStructureType sType const void* pNext VkDeviceMemory memory VkExternalMemoryHandleTypeFlagBits handleType VkStructureType sType const void* pNext VkExternalMemoryHandleTypeFlagBits handleType int fd VkStructureType sType void* pNext uint32_t memoryTypeBits VkStructureType sType const void* pNext VkDeviceMemory memory VkExternalMemoryHandleTypeFlagBits handleType VkStructureType sType const void* pNext uint32_t acquireCount const VkDeviceMemory* pAcquireSyncs const uint64_t* pAcquireKeys const uint32_t* pAcquireTimeouts uint32_t releaseCount const VkDeviceMemory* pReleaseSyncs const uint64_t* pReleaseKeys VkStructureType sType const void* pNext VkExternalSemaphoreHandleTypeFlagBits handleType VkStructureType sType void* pNext VkExternalSemaphoreHandleTypeFlags exportFromImportedHandleTypes VkExternalSemaphoreHandleTypeFlags compatibleHandleTypes VkExternalSemaphoreFeatureFlags externalSemaphoreFeatures VkStructureType sType const void* pNext VkExternalSemaphoreHandleTypeFlags handleTypes VkStructureType sType const void* pNext VkSemaphore semaphore VkSemaphoreImportFlags flags VkExternalSemaphoreHandleTypeFlagBits handleType HANDLE handle LPCWSTR name VkStructureType sType const void* pNext const SECURITY_ATTRIBUTES* pAttributes DWORD dwAccess LPCWSTR name VkStructureType sType const void* pNext uint32_t waitSemaphoreValuesCount const uint64_t* pWaitSemaphoreValues uint32_t signalSemaphoreValuesCount const uint64_t* pSignalSemaphoreValues VkStructureType sType const void* pNext VkSemaphore semaphore VkExternalSemaphoreHandleTypeFlagBits handleType VkStructureType sType const void* pNext VkSemaphore semaphore VkSemaphoreImportFlags flags VkExternalSemaphoreHandleTypeFlagBits handleType int fd VkStructureType sType const void* pNext VkSemaphore semaphore VkExternalSemaphoreHandleTypeFlagBits handleType VkStructureType sType const void* pNext VkSemaphore semaphore VkSemaphoreImportFlags flags VkExternalSemaphoreHandleTypeFlagBits handleType zx_handle_t zirconHandle VkStructureType sType const void* pNext VkSemaphore semaphore VkExternalSemaphoreHandleTypeFlagBits handleType VkStructureType sType const void* pNext VkExternalFenceHandleTypeFlagBits handleType VkStructureType sType void* pNext VkExternalFenceHandleTypeFlags exportFromImportedHandleTypes VkExternalFenceHandleTypeFlags compatibleHandleTypes VkExternalFenceFeatureFlags externalFenceFeatures VkStructureType sType const void* pNext VkExternalFenceHandleTypeFlags handleTypes VkStructureType sType const void* pNext VkFence fence VkFenceImportFlags flags VkExternalFenceHandleTypeFlagBits handleType HANDLE handle LPCWSTR name VkStructureType sType const void* pNext const SECURITY_ATTRIBUTES* pAttributes DWORD dwAccess LPCWSTR name VkStructureType sType const void* pNext VkFence fence VkExternalFenceHandleTypeFlagBits handleType VkStructureType sType const void* pNext VkFence fence VkFenceImportFlags flags VkExternalFenceHandleTypeFlagBits handleType int fd VkStructureType sType const void* pNext VkFence fence VkExternalFenceHandleTypeFlagBits handleType VkStructureType sType void* pNext VkBool32 multiviewMultiple views in a renderpass VkBool32 multiviewGeometryShaderMultiple views in a renderpass w/ geometry shader VkBool32 multiviewTessellationShaderMultiple views in a renderpass w/ tessellation shader VkStructureType sType void* pNext uint32_t maxMultiviewViewCountmax number of views in a subpass uint32_t maxMultiviewInstanceIndexmax instance index for a draw in a multiview subpass VkStructureType sType const void* pNext uint32_t subpassCount const uint32_t* pViewMasks uint32_t dependencyCount const int32_t* pViewOffsets uint32_t correlationMaskCount const uint32_t* pCorrelationMasks VkStructureType sType void* pNext uint32_t minImageCountSupported minimum number of images for the surface uint32_t maxImageCountSupported maximum number of images for the surface, 0 for unlimited VkExtent2D currentExtentCurrent image width and height for the surface, (0, 0) if undefined VkExtent2D minImageExtentSupported minimum image width and height for the surface VkExtent2D maxImageExtentSupported maximum image width and height for the surface uint32_t maxImageArrayLayersSupported maximum number of image layers for the surface VkSurfaceTransformFlagsKHR supportedTransforms1 or more bits representing the transforms supported VkSurfaceTransformFlagBitsKHR currentTransformThe surface's current transform relative to the device's natural orientation VkCompositeAlphaFlagsKHR supportedCompositeAlpha1 or more bits representing the alpha compositing modes supported VkImageUsageFlags supportedUsageFlagsSupported image usage flags for the surface VkSurfaceCounterFlagsEXT supportedSurfaceCounters VkStructureType sType const void* pNext VkDisplayPowerStateEXT powerState VkStructureType sType const void* pNext VkDeviceEventTypeEXT deviceEvent VkStructureType sType const void* pNext VkDisplayEventTypeEXT displayEvent VkStructureType sType const void* pNext VkSurfaceCounterFlagsEXT surfaceCounters VkStructureType sType void* pNext uint32_t physicalDeviceCount VkPhysicalDevice physicalDevices[VK_MAX_DEVICE_GROUP_SIZE] VkBool32 subsetAllocation VkStructureType sType const void* pNext VkMemoryAllocateFlags flags uint32_t deviceMask VkStructureType sType const void* pNext VkBuffer buffer VkDeviceMemory memory VkDeviceSize memoryOffset VkStructureType sType const void* pNext uint32_t deviceIndexCount const uint32_t* pDeviceIndices VkStructureType sType const void* pNext VkImage image VkDeviceMemory memory VkDeviceSize memoryOffset VkStructureType sType const void* pNext uint32_t deviceIndexCount const uint32_t* pDeviceIndices uint32_t splitInstanceBindRegionCount const VkRect2D* pSplitInstanceBindRegions VkStructureType sType const void* pNext uint32_t deviceMask uint32_t deviceRenderAreaCount const VkRect2D* pDeviceRenderAreas VkStructureType sType const void* pNext uint32_t deviceMask VkStructureType sType const void* pNext uint32_t waitSemaphoreCount const uint32_t* pWaitSemaphoreDeviceIndices uint32_t commandBufferCount const uint32_t* pCommandBufferDeviceMasks uint32_t signalSemaphoreCount const uint32_t* pSignalSemaphoreDeviceIndices VkStructureType sType const void* pNext uint32_t resourceDeviceIndex uint32_t memoryDeviceIndex VkStructureType sType void* pNext uint32_t presentMask[VK_MAX_DEVICE_GROUP_SIZE] VkDeviceGroupPresentModeFlagsKHR modes VkStructureType sType const void* pNext VkSwapchainKHR swapchain VkStructureType sType const void* pNext VkSwapchainKHR swapchain uint32_t imageIndex VkStructureType sType const void* pNext VkSwapchainKHR swapchain uint64_t timeout VkSemaphore semaphore VkFence fence uint32_t deviceMask VkStructureType sType const void* pNext uint32_t swapchainCount const uint32_t* pDeviceMasks VkDeviceGroupPresentModeFlagBitsKHR mode VkStructureType sType const void* pNext uint32_t physicalDeviceCount const VkPhysicalDevice* pPhysicalDevices VkStructureType sType const void* pNext VkDeviceGroupPresentModeFlagsKHR modes uint32_t dstBindingBinding within the destination descriptor set to write uint32_t dstArrayElementArray element within the destination binding to write uint32_t descriptorCountNumber of descriptors to write VkDescriptorType descriptorTypeDescriptor type to write size_t offsetOffset into pData where the descriptors to update are stored size_t strideStride between two descriptors in pData when writing more than one descriptor VkStructureType sType const void* pNext VkDescriptorUpdateTemplateCreateFlags flags uint32_t descriptorUpdateEntryCountNumber of descriptor update entries to use for the update template const VkDescriptorUpdateTemplateEntry* pDescriptorUpdateEntriesDescriptor update entries for the template VkDescriptorUpdateTemplateType templateType VkDescriptorSetLayout descriptorSetLayout VkPipelineBindPoint pipelineBindPoint VkPipelineLayout pipelineLayoutIf used for push descriptors, this is the only allowed layout uint32_t set float x float y VkStructureType sType void* pNext VkBool32 presentIdPresent ID in VkPresentInfoKHR VkStructureType sType const void* pNext uint32_t swapchainCountCopy of VkPresentInfoKHR::swapchainCount const uint64_t* pPresentIdsPresent ID values for each swapchain VkStructureType sType void* pNext VkBool32 presentWaitvkWaitForPresentKHR is supported Display primary in chromaticity coordinates VkStructureType sType const void* pNext From SMPTE 2086 VkXYColorEXT displayPrimaryRedDisplay primary's Red VkXYColorEXT displayPrimaryGreenDisplay primary's Green VkXYColorEXT displayPrimaryBlueDisplay primary's Blue VkXYColorEXT whitePointDisplay primary's Blue float maxLuminanceDisplay maximum luminance float minLuminanceDisplay minimum luminance From CTA 861.3 float maxContentLightLevelContent maximum luminance float maxFrameAverageLightLevel VkStructureType sType void* pNext VkBool32 localDimmingSupport VkStructureType sType const void* pNext VkBool32 localDimmingEnable uint64_t refreshDurationNumber of nanoseconds from the start of one refresh cycle to the next uint32_t presentIDApplication-provided identifier, previously given to vkQueuePresentKHR uint64_t desiredPresentTimeEarliest time an image should have been presented, previously given to vkQueuePresentKHR uint64_t actualPresentTimeTime the image was actually displayed uint64_t earliestPresentTimeEarliest time the image could have been displayed uint64_t presentMarginHow early vkQueuePresentKHR was processed vs. how soon it needed to be and make earliestPresentTime VkStructureType sType const void* pNext uint32_t swapchainCountCopy of VkPresentInfoKHR::swapchainCount const VkPresentTimeGOOGLE* pTimesThe earliest times to present images uint32_t presentIDApplication-provided identifier uint64_t desiredPresentTimeEarliest time an image should be presented VkStructureType sType const void* pNext VkIOSSurfaceCreateFlagsMVK flags const void* pView VkStructureType sType const void* pNext VkMacOSSurfaceCreateFlagsMVK flags const void* pView VkStructureType sType const void* pNext VkMetalSurfaceCreateFlagsEXT flags const CAMetalLayer* pLayer float xcoeff float ycoeff VkStructureType sType const void* pNext VkBool32 viewportWScalingEnable uint32_t viewportCount const VkViewportWScalingNV* pViewportWScalings VkViewportCoordinateSwizzleNV x VkViewportCoordinateSwizzleNV y VkViewportCoordinateSwizzleNV z VkViewportCoordinateSwizzleNV w VkStructureType sType const void* pNext VkPipelineViewportSwizzleStateCreateFlagsNV flags uint32_t viewportCount const VkViewportSwizzleNV* pViewportSwizzles VkStructureType sType void* pNext uint32_t maxDiscardRectanglesmax number of active discard rectangles VkStructureType sType const void* pNext VkPipelineDiscardRectangleStateCreateFlagsEXT flags VkDiscardRectangleModeEXT discardRectangleMode uint32_t discardRectangleCount const VkRect2D* pDiscardRectangles VkStructureType sType void* pNext VkBool32 perViewPositionAllComponents uint32_t subpass uint32_t inputAttachmentIndex VkImageAspectFlags aspectMask VkStructureType sType const void* pNext uint32_t aspectReferenceCount const VkInputAttachmentAspectReference* pAspectReferences VkStructureType sType const void* pNext VkSurfaceKHR surface VkStructureType sType void* pNext VkSurfaceCapabilitiesKHR surfaceCapabilities VkStructureType sType void* pNext VkSurfaceFormatKHR surfaceFormat VkStructureType sType void* pNext VkDisplayPropertiesKHR displayProperties VkStructureType sType void* pNext VkDisplayPlanePropertiesKHR displayPlaneProperties VkStructureType sType void* pNext VkDisplayModePropertiesKHR displayModeProperties VkStructureType sType const void* pNext VkDisplayModeKHR mode uint32_t planeIndex VkStructureType sType void* pNext VkDisplayPlaneCapabilitiesKHR capabilities VkStructureType sType void* pNext VkImageUsageFlags sharedPresentSupportedUsageFlagsSupported image usage flags if swapchain created using a shared present mode VkStructureType sType void* pNext VkBool32 storageBuffer16BitAccess16-bit integer/floating-point variables supported in BufferBlock VkBool32 uniformAndStorageBuffer16BitAccess16-bit integer/floating-point variables supported in BufferBlock and Block VkBool32 storagePushConstant1616-bit integer/floating-point variables supported in PushConstant VkBool32 storageInputOutput1616-bit integer/floating-point variables supported in shader inputs and outputs VkStructureType sType void* pNext uint32_t subgroupSizeThe size of a subgroup for this queue. VkShaderStageFlags supportedStagesBitfield of what shader stages support subgroup operations VkSubgroupFeatureFlags supportedOperationsBitfield of what subgroup operations are supported. VkBool32 quadOperationsInAllStagesFlag to specify whether quad operations are available in all stages. VkStructureType sType void* pNext VkBool32 shaderSubgroupExtendedTypesFlag to specify whether subgroup operations with extended types are supported VkStructureType sType const void* pNext VkBuffer buffer VkStructureType sType const void* pNext const VkBufferCreateInfo* pCreateInfo VkStructureType sType const void* pNext VkImage image VkStructureType sType const void* pNext VkImage image VkStructureType sType const void* pNext const VkImageCreateInfo* pCreateInfo VkImageAspectFlagBits planeAspect VkStructureType sType void* pNext VkMemoryRequirements memoryRequirements VkStructureType sType void* pNext VkSparseImageMemoryRequirements memoryRequirements VkStructureType sType void* pNext VkPointClippingBehavior pointClippingBehavior VkStructureType sType void* pNext VkBool32 prefersDedicatedAllocation VkBool32 requiresDedicatedAllocation VkStructureType sType const void* pNext VkImage imageImage that this allocation will be bound to VkBuffer bufferBuffer that this allocation will be bound to VkStructureType sType const void* pNext VkImageUsageFlags usage VkStructureType sType const void* pNext VkTessellationDomainOrigin domainOrigin VkStructureType sType const void* pNext VkSamplerYcbcrConversion conversion VkStructureType sType const void* pNext VkFormat format VkSamplerYcbcrModelConversion ycbcrModel VkSamplerYcbcrRange ycbcrRange VkComponentMapping components VkChromaLocation xChromaOffset VkChromaLocation yChromaOffset VkFilter chromaFilter VkBool32 forceExplicitReconstruction VkStructureType sType const void* pNext VkImageAspectFlagBits planeAspect VkStructureType sType const void* pNext VkImageAspectFlagBits planeAspect VkStructureType sType void* pNext VkBool32 samplerYcbcrConversionSampler color conversion supported VkStructureType sType void* pNext uint32_t combinedImageSamplerDescriptorCount VkStructureType sType void* pNext VkBool32 supportsTextureGatherLODBiasAMD VkStructureType sType const void* pNext VkBuffer buffer VkDeviceSize offset VkConditionalRenderingFlagsEXT flags VkStructureType sType const void* pNext VkBool32 protectedSubmitSubmit protected command buffers VkStructureType sType void* pNext VkBool32 protectedMemory VkStructureType sType void* pNext VkBool32 protectedNoFault VkStructureType sType const void* pNext VkDeviceQueueCreateFlags flags uint32_t queueFamilyIndex uint32_t queueIndex VkStructureType sType const void* pNext VkPipelineCoverageToColorStateCreateFlagsNV flags VkBool32 coverageToColorEnable uint32_t coverageToColorLocation VkStructureType sType void* pNext VkBool32 filterMinmaxSingleComponentFormats VkBool32 filterMinmaxImageComponentMapping float x float y VkStructureType sType const void* pNext VkSampleCountFlagBits sampleLocationsPerPixel VkExtent2D sampleLocationGridSize uint32_t sampleLocationsCount const VkSampleLocationEXT* pSampleLocations uint32_t attachmentIndex VkSampleLocationsInfoEXT sampleLocationsInfo uint32_t subpassIndex VkSampleLocationsInfoEXT sampleLocationsInfo VkStructureType sType const void* pNext uint32_t attachmentInitialSampleLocationsCount const VkAttachmentSampleLocationsEXT* pAttachmentInitialSampleLocations uint32_t postSubpassSampleLocationsCount const VkSubpassSampleLocationsEXT* pPostSubpassSampleLocations VkStructureType sType const void* pNext VkBool32 sampleLocationsEnable VkSampleLocationsInfoEXT sampleLocationsInfo VkStructureType sType void* pNext VkSampleCountFlags sampleLocationSampleCounts VkExtent2D maxSampleLocationGridSize float sampleLocationCoordinateRange[2] uint32_t sampleLocationSubPixelBits VkBool32 variableSampleLocations VkStructureType sType void* pNext VkExtent2D maxSampleLocationGridSize VkStructureType sType const void* pNext VkSamplerReductionMode reductionMode VkStructureType sType void* pNext VkBool32 advancedBlendCoherentOperations VkStructureType sType void* pNext VkBool32 multiDraw VkStructureType sType void* pNext uint32_t advancedBlendMaxColorAttachments VkBool32 advancedBlendIndependentBlend VkBool32 advancedBlendNonPremultipliedSrcColor VkBool32 advancedBlendNonPremultipliedDstColor VkBool32 advancedBlendCorrelatedOverlap VkBool32 advancedBlendAllOperations VkStructureType sType const void* pNext VkBool32 srcPremultiplied VkBool32 dstPremultiplied VkBlendOverlapEXT blendOverlap VkStructureType sType void* pNext VkBool32 inlineUniformBlock VkBool32 descriptorBindingInlineUniformBlockUpdateAfterBind VkStructureType sType void* pNext uint32_t maxInlineUniformBlockSize uint32_t maxPerStageDescriptorInlineUniformBlocks uint32_t maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks uint32_t maxDescriptorSetInlineUniformBlocks uint32_t maxDescriptorSetUpdateAfterBindInlineUniformBlocks VkStructureType sType const void* pNext uint32_t dataSize const void* pData VkStructureType sType const void* pNext uint32_t maxInlineUniformBlockBindings VkStructureType sType const void* pNext VkPipelineCoverageModulationStateCreateFlagsNV flags VkCoverageModulationModeNV coverageModulationMode VkBool32 coverageModulationTableEnable uint32_t coverageModulationTableCount const float* pCoverageModulationTable VkStructureType sType const void* pNext uint32_t viewFormatCount const VkFormat* pViewFormats VkStructureType sType const void* pNext VkValidationCacheCreateFlagsEXT flags size_t initialDataSize const void* pInitialData VkStructureType sType const void* pNext VkValidationCacheEXT validationCache VkStructureType sType void* pNext uint32_t maxPerSetDescriptors VkDeviceSize maxMemoryAllocationSize VkStructureType sType void* pNext VkBool32 maintenance4 VkStructureType sType void* pNext VkDeviceSize maxBufferSize VkStructureType sType void* pNext VkBool32 supported VkStructureType sType void* pNext VkBool32 shaderDrawParameters VkStructureType sType void* pNext VkBool32 shaderFloat1616-bit floats (halfs) in shaders VkBool32 shaderInt88-bit integers in shaders VkStructureType sType void* pNext VkShaderFloatControlsIndependence denormBehaviorIndependence VkShaderFloatControlsIndependence roundingModeIndependence VkBool32 shaderSignedZeroInfNanPreserveFloat16An implementation can preserve signed zero, nan, inf VkBool32 shaderSignedZeroInfNanPreserveFloat32An implementation can preserve signed zero, nan, inf VkBool32 shaderSignedZeroInfNanPreserveFloat64An implementation can preserve signed zero, nan, inf VkBool32 shaderDenormPreserveFloat16An implementation can preserve denormals VkBool32 shaderDenormPreserveFloat32An implementation can preserve denormals VkBool32 shaderDenormPreserveFloat64An implementation can preserve denormals VkBool32 shaderDenormFlushToZeroFloat16An implementation can flush to zero denormals VkBool32 shaderDenormFlushToZeroFloat32An implementation can flush to zero denormals VkBool32 shaderDenormFlushToZeroFloat64An implementation can flush to zero denormals VkBool32 shaderRoundingModeRTEFloat16An implementation can support RTE VkBool32 shaderRoundingModeRTEFloat32An implementation can support RTE VkBool32 shaderRoundingModeRTEFloat64An implementation can support RTE VkBool32 shaderRoundingModeRTZFloat16An implementation can support RTZ VkBool32 shaderRoundingModeRTZFloat32An implementation can support RTZ VkBool32 shaderRoundingModeRTZFloat64An implementation can support RTZ VkStructureType sType void* pNext VkBool32 hostQueryReset uint64_t consumer uint64_t producer VkStructureType sType const void* pNext const void* handle int stride int format int usage VkNativeBufferUsage2ANDROID usage2 VkStructureType sType const void* pNext VkSwapchainImageUsageFlagsANDROID usage VkStructureType sType const void* pNext VkBool32 sharedImage uint32_t numUsedVgprs uint32_t numUsedSgprs uint32_t ldsSizePerLocalWorkGroup size_t ldsUsageSizeInBytes size_t scratchMemUsageInBytes VkShaderStageFlags shaderStageMask VkShaderResourceUsageAMD resourceUsage uint32_t numPhysicalVgprs uint32_t numPhysicalSgprs uint32_t numAvailableVgprs uint32_t numAvailableSgprs uint32_t computeWorkGroupSize[3] VkStructureType sType const void* pNext VkQueueGlobalPriorityKHR globalPriority VkStructureType sType void* pNext VkBool32 globalPriorityQuery VkStructureType sType void* pNext uint32_t priorityCount VkQueueGlobalPriorityKHR priorities[VK_MAX_GLOBAL_PRIORITY_SIZE_KHR] VkStructureType sType const void* pNext VkObjectType objectType uint64_t objectHandle const char* pObjectName VkStructureType sType const void* pNext VkObjectType objectType uint64_t objectHandle uint64_t tagName size_t tagSize const void* pTag VkStructureType sType const void* pNext const char* pLabelName float color[4] VkStructureType sType const void* pNext VkDebugUtilsMessengerCreateFlagsEXT flags VkDebugUtilsMessageSeverityFlagsEXT messageSeverity VkDebugUtilsMessageTypeFlagsEXT messageType PFN_vkDebugUtilsMessengerCallbackEXT pfnUserCallback void* pUserData VkStructureType sType const void* pNext VkDebugUtilsMessengerCallbackDataFlagsEXT flags const char* pMessageIdName int32_t messageIdNumber const char* pMessage uint32_t queueLabelCount const VkDebugUtilsLabelEXT* pQueueLabels uint32_t cmdBufLabelCount const VkDebugUtilsLabelEXT* pCmdBufLabels uint32_t objectCount const VkDebugUtilsObjectNameInfoEXT* pObjects VkStructureType sType void* pNext VkBool32 deviceMemoryReport VkStructureType sType const void* pNext VkDeviceMemoryReportFlagsEXT flags PFN_vkDeviceMemoryReportCallbackEXT pfnUserCallback void* pUserData VkStructureType sType void* pNext VkDeviceMemoryReportFlagsEXT flags VkDeviceMemoryReportEventTypeEXT type uint64_t memoryObjectId VkDeviceSize size VkObjectType objectType uint64_t objectHandle uint32_t heapIndex VkStructureType sType const void* pNext VkExternalMemoryHandleTypeFlagBits handleType void* pHostPointer VkStructureType sType void* pNext uint32_t memoryTypeBits VkStructureType sType void* pNext VkDeviceSize minImportedHostPointerAlignment VkStructureType sType void* pNext float primitiveOverestimationSizeThe size in pixels the primitive is enlarged at each edge during conservative rasterization float maxExtraPrimitiveOverestimationSizeThe maximum additional overestimation the client can specify in the pipeline state float extraPrimitiveOverestimationSizeGranularityThe granularity of extra overestimation sizes the implementations supports between 0 and maxExtraOverestimationSize VkBool32 primitiveUnderestimationtrue if the implementation supports conservative rasterization underestimation mode VkBool32 conservativePointAndLineRasterizationtrue if conservative rasterization also applies to points and lines VkBool32 degenerateTrianglesRasterizedtrue if degenerate triangles (those with zero area after snap) are rasterized VkBool32 degenerateLinesRasterizedtrue if degenerate lines (those with zero length after snap) are rasterized VkBool32 fullyCoveredFragmentShaderInputVariabletrue if the implementation supports the FullyCoveredEXT SPIR-V builtin fragment shader input variable VkBool32 conservativeRasterizationPostDepthCoveragetrue if the implementation supports both conservative rasterization and post depth coverage sample coverage mask VkStructureType sType const void* pNext VkTimeDomainEXT timeDomain VkStructureType sType void* pNext uint32_t shaderEngineCountnumber of shader engines uint32_t shaderArraysPerEngineCountnumber of shader arrays uint32_t computeUnitsPerShaderArraynumber of physical CUs per shader array uint32_t simdPerComputeUnitnumber of SIMDs per compute unit uint32_t wavefrontsPerSimdnumber of wavefront slots in each SIMD uint32_t wavefrontSizemaximum number of threads per wavefront uint32_t sgprsPerSimdnumber of physical SGPRs per SIMD uint32_t minSgprAllocationminimum number of SGPRs that can be allocated by a wave uint32_t maxSgprAllocationnumber of available SGPRs uint32_t sgprAllocationGranularitySGPRs are allocated in groups of this size uint32_t vgprsPerSimdnumber of physical VGPRs per SIMD uint32_t minVgprAllocationminimum number of VGPRs that can be allocated by a wave uint32_t maxVgprAllocationnumber of available VGPRs uint32_t vgprAllocationGranularityVGPRs are allocated in groups of this size VkStructureType sType void* pNextPointer to next structure VkShaderCorePropertiesFlagsAMD shaderCoreFeaturesfeatures supported by the shader core uint32_t activeComputeUnitCountnumber of active compute units across all shader engines/arrays VkStructureType sType const void* pNext VkPipelineRasterizationConservativeStateCreateFlagsEXT flagsReserved VkConservativeRasterizationModeEXT conservativeRasterizationModeConservative rasterization mode float extraPrimitiveOverestimationSizeExtra overestimation to add to the primitive VkStructureType sType void* pNext VkBool32 shaderInputAttachmentArrayDynamicIndexing VkBool32 shaderUniformTexelBufferArrayDynamicIndexing VkBool32 shaderStorageTexelBufferArrayDynamicIndexing VkBool32 shaderUniformBufferArrayNonUniformIndexing VkBool32 shaderSampledImageArrayNonUniformIndexing VkBool32 shaderStorageBufferArrayNonUniformIndexing VkBool32 shaderStorageImageArrayNonUniformIndexing VkBool32 shaderInputAttachmentArrayNonUniformIndexing VkBool32 shaderUniformTexelBufferArrayNonUniformIndexing VkBool32 shaderStorageTexelBufferArrayNonUniformIndexing VkBool32 descriptorBindingUniformBufferUpdateAfterBind VkBool32 descriptorBindingSampledImageUpdateAfterBind VkBool32 descriptorBindingStorageImageUpdateAfterBind VkBool32 descriptorBindingStorageBufferUpdateAfterBind VkBool32 descriptorBindingUniformTexelBufferUpdateAfterBind VkBool32 descriptorBindingStorageTexelBufferUpdateAfterBind VkBool32 descriptorBindingUpdateUnusedWhilePending VkBool32 descriptorBindingPartiallyBound VkBool32 descriptorBindingVariableDescriptorCount VkBool32 runtimeDescriptorArray VkStructureType sType void* pNext uint32_t maxUpdateAfterBindDescriptorsInAllPools VkBool32 shaderUniformBufferArrayNonUniformIndexingNative VkBool32 shaderSampledImageArrayNonUniformIndexingNative VkBool32 shaderStorageBufferArrayNonUniformIndexingNative VkBool32 shaderStorageImageArrayNonUniformIndexingNative VkBool32 shaderInputAttachmentArrayNonUniformIndexingNative VkBool32 robustBufferAccessUpdateAfterBind VkBool32 quadDivergentImplicitLod uint32_t maxPerStageDescriptorUpdateAfterBindSamplers uint32_t maxPerStageDescriptorUpdateAfterBindUniformBuffers uint32_t maxPerStageDescriptorUpdateAfterBindStorageBuffers uint32_t maxPerStageDescriptorUpdateAfterBindSampledImages uint32_t maxPerStageDescriptorUpdateAfterBindStorageImages uint32_t maxPerStageDescriptorUpdateAfterBindInputAttachments uint32_t maxPerStageUpdateAfterBindResources uint32_t maxDescriptorSetUpdateAfterBindSamplers uint32_t maxDescriptorSetUpdateAfterBindUniformBuffers uint32_t maxDescriptorSetUpdateAfterBindUniformBuffersDynamic uint32_t maxDescriptorSetUpdateAfterBindStorageBuffers uint32_t maxDescriptorSetUpdateAfterBindStorageBuffersDynamic uint32_t maxDescriptorSetUpdateAfterBindSampledImages uint32_t maxDescriptorSetUpdateAfterBindStorageImages uint32_t maxDescriptorSetUpdateAfterBindInputAttachments VkStructureType sType const void* pNext uint32_t bindingCount const VkDescriptorBindingFlags* pBindingFlags VkStructureType sType const void* pNext uint32_t descriptorSetCount const uint32_t* pDescriptorCounts VkStructureType sType void* pNext uint32_t maxVariableDescriptorCount VkStructureType sType const void* pNext VkAttachmentDescriptionFlags flags VkFormat format VkSampleCountFlagBits samples VkAttachmentLoadOp loadOpLoad operation for color or depth data VkAttachmentStoreOp storeOpStore operation for color or depth data VkAttachmentLoadOp stencilLoadOpLoad operation for stencil data VkAttachmentStoreOp stencilStoreOpStore operation for stencil data VkImageLayout initialLayout VkImageLayout finalLayout VkStructureType sType const void* pNext uint32_t attachment VkImageLayout layout VkImageAspectFlags aspectMask VkStructureType sType const void* pNext VkSubpassDescriptionFlags flags VkPipelineBindPoint pipelineBindPoint uint32_t viewMask uint32_t inputAttachmentCount const VkAttachmentReference2* pInputAttachments uint32_t colorAttachmentCount const VkAttachmentReference2* pColorAttachments const VkAttachmentReference2* pResolveAttachments const VkAttachmentReference2* pDepthStencilAttachment uint32_t preserveAttachmentCount const uint32_t* pPreserveAttachments VkStructureType sType const void* pNext uint32_t srcSubpass uint32_t dstSubpass VkPipelineStageFlags srcStageMask VkPipelineStageFlags dstStageMask VkAccessFlags srcAccessMask VkAccessFlags dstAccessMask VkDependencyFlags dependencyFlags int32_t viewOffset VkStructureType sType const void* pNext VkRenderPassCreateFlags flags uint32_t attachmentCount const VkAttachmentDescription2* pAttachments uint32_t subpassCount const VkSubpassDescription2* pSubpasses uint32_t dependencyCount const VkSubpassDependency2* pDependencies uint32_t correlatedViewMaskCount const uint32_t* pCorrelatedViewMasks VkStructureType sType const void* pNext VkSubpassContents contents VkStructureType sType const void* pNext VkStructureType sType void* pNext VkBool32 timelineSemaphore VkStructureType sType void* pNext uint64_t maxTimelineSemaphoreValueDifference VkStructureType sType const void* pNext VkSemaphoreType semaphoreType uint64_t initialValue VkStructureType sType const void* pNext uint32_t waitSemaphoreValueCount const uint64_t* pWaitSemaphoreValues uint32_t signalSemaphoreValueCount const uint64_t* pSignalSemaphoreValues VkStructureType sType const void* pNext VkSemaphoreWaitFlags flags uint32_t semaphoreCount const VkSemaphore* pSemaphores const uint64_t* pValues VkStructureType sType const void* pNext VkSemaphore semaphore uint64_t value uint32_t binding uint32_t divisor VkStructureType sType const void* pNext uint32_t vertexBindingDivisorCount const VkVertexInputBindingDivisorDescriptionEXT* pVertexBindingDivisors VkStructureType sType void* pNext uint32_t maxVertexAttribDivisormax value of vertex attribute divisor VkStructureType sType void* pNext uint32_t pciDomain uint32_t pciBus uint32_t pciDevice uint32_t pciFunction VkStructureType sType const void* pNext struct AHardwareBuffer* buffer VkStructureType sType void* pNext uint64_t androidHardwareBufferUsage VkStructureType sType void* pNext VkDeviceSize allocationSize uint32_t memoryTypeBits VkStructureType sType const void* pNext VkDeviceMemory memory VkStructureType sType void* pNext VkFormat format uint64_t externalFormat VkFormatFeatureFlags formatFeatures VkComponentMapping samplerYcbcrConversionComponents VkSamplerYcbcrModelConversion suggestedYcbcrModel VkSamplerYcbcrRange suggestedYcbcrRange VkChromaLocation suggestedXChromaOffset VkChromaLocation suggestedYChromaOffset VkStructureType sType const void* pNext VkBool32 conditionalRenderingEnableWhether this secondary command buffer may be executed during an active conditional rendering VkStructureType sType void* pNext uint64_t externalFormat VkStructureType sType void* pNext VkBool32 storageBuffer8BitAccess8-bit integer variables supported in StorageBuffer VkBool32 uniformAndStorageBuffer8BitAccess8-bit integer variables supported in StorageBuffer and Uniform VkBool32 storagePushConstant88-bit integer variables supported in PushConstant VkStructureType sType void* pNext VkBool32 conditionalRendering VkBool32 inheritedConditionalRendering VkStructureType sType void* pNext VkBool32 vulkanMemoryModel VkBool32 vulkanMemoryModelDeviceScope VkBool32 vulkanMemoryModelAvailabilityVisibilityChains VkStructureType sType void* pNext VkBool32 shaderBufferInt64Atomics VkBool32 shaderSharedInt64Atomics VkStructureType sType void* pNext VkBool32 shaderBufferFloat32Atomics VkBool32 shaderBufferFloat32AtomicAdd VkBool32 shaderBufferFloat64Atomics VkBool32 shaderBufferFloat64AtomicAdd VkBool32 shaderSharedFloat32Atomics VkBool32 shaderSharedFloat32AtomicAdd VkBool32 shaderSharedFloat64Atomics VkBool32 shaderSharedFloat64AtomicAdd VkBool32 shaderImageFloat32Atomics VkBool32 shaderImageFloat32AtomicAdd VkBool32 sparseImageFloat32Atomics VkBool32 sparseImageFloat32AtomicAdd VkStructureType sType void* pNext VkBool32 shaderBufferFloat16Atomics VkBool32 shaderBufferFloat16AtomicAdd VkBool32 shaderBufferFloat16AtomicMinMax VkBool32 shaderBufferFloat32AtomicMinMax VkBool32 shaderBufferFloat64AtomicMinMax VkBool32 shaderSharedFloat16Atomics VkBool32 shaderSharedFloat16AtomicAdd VkBool32 shaderSharedFloat16AtomicMinMax VkBool32 shaderSharedFloat32AtomicMinMax VkBool32 shaderSharedFloat64AtomicMinMax VkBool32 shaderImageFloat32AtomicMinMax VkBool32 sparseImageFloat32AtomicMinMax VkStructureType sType void* pNext VkBool32 vertexAttributeInstanceRateDivisor VkBool32 vertexAttributeInstanceRateZeroDivisor VkStructureType sType void* pNext VkPipelineStageFlags checkpointExecutionStageMask VkStructureType sType void* pNext VkPipelineStageFlagBits stage void* pCheckpointMarker VkStructureType sType void* pNext VkResolveModeFlags supportedDepthResolveModessupported depth resolve modes VkResolveModeFlags supportedStencilResolveModessupported stencil resolve modes VkBool32 independentResolveNonedepth and stencil resolve modes can be set independently if one of them is none VkBool32 independentResolvedepth and stencil resolve modes can be set independently VkStructureType sType const void* pNext VkResolveModeFlagBits depthResolveModedepth resolve mode VkResolveModeFlagBits stencilResolveModestencil resolve mode const VkAttachmentReference2* pDepthStencilResolveAttachmentdepth/stencil resolve attachment VkStructureType sType const void* pNext VkFormat decodeMode VkStructureType sType void* pNext VkBool32 decodeModeSharedExponent VkStructureType sType void* pNext VkBool32 transformFeedback VkBool32 geometryStreams VkStructureType sType void* pNext uint32_t maxTransformFeedbackStreams uint32_t maxTransformFeedbackBuffers VkDeviceSize maxTransformFeedbackBufferSize uint32_t maxTransformFeedbackStreamDataSize uint32_t maxTransformFeedbackBufferDataSize uint32_t maxTransformFeedbackBufferDataStride VkBool32 transformFeedbackQueries VkBool32 transformFeedbackStreamsLinesTriangles VkBool32 transformFeedbackRasterizationStreamSelect VkBool32 transformFeedbackDraw VkStructureType sType const void* pNext VkPipelineRasterizationStateStreamCreateFlagsEXT flags uint32_t rasterizationStream VkStructureType sType void* pNext VkBool32 representativeFragmentTest VkStructureType sType const void* pNext VkBool32 representativeFragmentTestEnable VkStructureType sType void* pNext VkBool32 exclusiveScissor VkStructureType sType const void* pNext uint32_t exclusiveScissorCount const VkRect2D* pExclusiveScissors VkStructureType sType void* pNext VkBool32 cornerSampledImage VkStructureType sType void* pNext VkBool32 computeDerivativeGroupQuads VkBool32 computeDerivativeGroupLinear VkStructureType sType void* pNext VkBool32 imageFootprint VkStructureType sType void* pNext VkBool32 dedicatedAllocationImageAliasing uint32_t shadingRatePaletteEntryCount const VkShadingRatePaletteEntryNV* pShadingRatePaletteEntries VkStructureType sType const void* pNext VkBool32 shadingRateImageEnable uint32_t viewportCount const VkShadingRatePaletteNV* pShadingRatePalettes VkStructureType sType void* pNext VkBool32 shadingRateImage VkBool32 shadingRateCoarseSampleOrder VkStructureType sType void* pNext VkExtent2D shadingRateTexelSize uint32_t shadingRatePaletteSize uint32_t shadingRateMaxCoarseSamples VkStructureType sType void* pNext VkBool32 invocationMask uint32_t pixelX uint32_t pixelY uint32_t sample VkShadingRatePaletteEntryNV shadingRate uint32_t sampleCount uint32_t sampleLocationCount const VkCoarseSampleLocationNV* pSampleLocations VkStructureType sType const void* pNext VkCoarseSampleOrderTypeNV sampleOrderType uint32_t customSampleOrderCount const VkCoarseSampleOrderCustomNV* pCustomSampleOrders VkStructureType sType void* pNext VkBool32 taskShader VkBool32 meshShader VkStructureType sType void* pNext uint32_t maxDrawMeshTasksCount uint32_t maxTaskWorkGroupInvocations uint32_t maxTaskWorkGroupSize[3] uint32_t maxTaskTotalMemorySize uint32_t maxTaskOutputCount uint32_t maxMeshWorkGroupInvocations uint32_t maxMeshWorkGroupSize[3] uint32_t maxMeshTotalMemorySize uint32_t maxMeshOutputVertices uint32_t maxMeshOutputPrimitives uint32_t maxMeshMultiviewViewCount uint32_t meshOutputPerVertexGranularity uint32_t meshOutputPerPrimitiveGranularity uint32_t taskCount uint32_t firstTask VkStructureType sType void* pNext VkBool32 taskShader VkBool32 meshShader VkBool32 multiviewMeshShader VkBool32 primitiveFragmentShadingRateMeshShader VkBool32 meshShaderQueries VkStructureType sType void* pNext uint32_t maxTaskWorkGroupTotalCount uint32_t maxTaskWorkGroupCount[3] uint32_t maxTaskWorkGroupInvocations uint32_t maxTaskWorkGroupSize[3] uint32_t maxTaskPayloadSize uint32_t maxTaskSharedMemorySize uint32_t maxTaskPayloadAndSharedMemorySize uint32_t maxMeshWorkGroupTotalCount uint32_t maxMeshWorkGroupCount[3] uint32_t maxMeshWorkGroupInvocations uint32_t maxMeshWorkGroupSize[3] uint32_t maxMeshSharedMemorySize uint32_t maxMeshPayloadAndSharedMemorySize uint32_t maxMeshOutputMemorySize uint32_t maxMeshPayloadAndOutputMemorySize uint32_t maxMeshOutputComponents uint32_t maxMeshOutputVertices uint32_t maxMeshOutputPrimitives uint32_t maxMeshOutputLayers uint32_t maxMeshMultiviewViewCount uint32_t meshOutputPerVertexGranularity uint32_t meshOutputPerPrimitiveGranularity uint32_t maxPreferredTaskWorkGroupInvocations uint32_t maxPreferredMeshWorkGroupInvocations VkBool32 prefersLocalInvocationVertexOutput VkBool32 prefersLocalInvocationPrimitiveOutput VkBool32 prefersCompactVertexOutput VkBool32 prefersCompactPrimitiveOutput uint32_t groupCountX uint32_t groupCountY uint32_t groupCountZ VkStructureType sType const void* pNext VkRayTracingShaderGroupTypeKHR type uint32_t generalShader uint32_t closestHitShader uint32_t anyHitShader uint32_t intersectionShader VkStructureType sType const void* pNext VkRayTracingShaderGroupTypeKHR type uint32_t generalShader uint32_t closestHitShader uint32_t anyHitShader uint32_t intersectionShader const void* pShaderGroupCaptureReplayHandle VkStructureType sType const void* pNext VkPipelineCreateFlags flagsPipeline creation flags uint32_t stageCount const VkPipelineShaderStageCreateInfo* pStagesOne entry for each active shader stage uint32_t groupCount const VkRayTracingShaderGroupCreateInfoNV* pGroups uint32_t maxRecursionDepth VkPipelineLayout layoutInterface layout of the pipeline VkPipeline basePipelineHandleIf VK_PIPELINE_CREATE_DERIVATIVE_BIT is set and this value is nonzero, it specifies the handle of the base pipeline this is a derivative of int32_t basePipelineIndexIf VK_PIPELINE_CREATE_DERIVATIVE_BIT is set and this value is not -1, it specifies an index into pCreateInfos of the base pipeline this is a derivative of VkStructureType sType const void* pNext VkPipelineCreateFlags flagsPipeline creation flags uint32_t stageCount const VkPipelineShaderStageCreateInfo* pStagesOne entry for each active shader stage uint32_t groupCount const VkRayTracingShaderGroupCreateInfoKHR* pGroups uint32_t maxPipelineRayRecursionDepth const VkPipelineLibraryCreateInfoKHR* pLibraryInfo const VkRayTracingPipelineInterfaceCreateInfoKHR* pLibraryInterface const VkPipelineDynamicStateCreateInfo* pDynamicState VkPipelineLayout layoutInterface layout of the pipeline VkPipeline basePipelineHandleIf VK_PIPELINE_CREATE_DERIVATIVE_BIT is set and this value is nonzero, it specifies the handle of the base pipeline this is a derivative of int32_t basePipelineIndexIf VK_PIPELINE_CREATE_DERIVATIVE_BIT is set and this value is not -1, it specifies an index into pCreateInfos of the base pipeline this is a derivative of VkStructureType sType const void* pNext VkBuffer vertexData VkDeviceSize vertexOffset uint32_t vertexCount VkDeviceSize vertexStride VkFormat vertexFormat VkBuffer indexData VkDeviceSize indexOffset uint32_t indexCount VkIndexType indexType VkBuffer transformDataOptional reference to array of floats representing a 3x4 row major affine transformation matrix. VkDeviceSize transformOffset VkStructureType sType const void* pNext VkBuffer aabbData uint32_t numAABBs uint32_t strideStride in bytes between AABBs VkDeviceSize offsetOffset in bytes of the first AABB in aabbData VkGeometryTrianglesNV triangles VkGeometryAABBNV aabbs VkStructureType sType const void* pNext VkGeometryTypeKHR geometryType VkGeometryDataNV geometry VkGeometryFlagsKHR flags VkStructureType sType const void* pNext VkAccelerationStructureTypeNV type VkBuildAccelerationStructureFlagsNV flags uint32_t instanceCount uint32_t geometryCount const VkGeometryNV* pGeometries VkStructureType sType const void* pNext VkDeviceSize compactedSize VkAccelerationStructureInfoNV info VkStructureType sType const void* pNext VkAccelerationStructureNV accelerationStructure VkDeviceMemory memory VkDeviceSize memoryOffset uint32_t deviceIndexCount const uint32_t* pDeviceIndices VkStructureType sType const void* pNext uint32_t accelerationStructureCount const VkAccelerationStructureKHR* pAccelerationStructures VkStructureType sType const void* pNext uint32_t accelerationStructureCount const VkAccelerationStructureNV* pAccelerationStructures VkStructureType sType const void* pNext VkAccelerationStructureMemoryRequirementsTypeNV type VkAccelerationStructureNV accelerationStructure VkStructureType sType void* pNext VkBool32 accelerationStructure VkBool32 accelerationStructureCaptureReplay VkBool32 accelerationStructureIndirectBuild VkBool32 accelerationStructureHostCommands VkBool32 descriptorBindingAccelerationStructureUpdateAfterBind VkStructureType sType void* pNext VkBool32 rayTracingPipeline VkBool32 rayTracingPipelineShaderGroupHandleCaptureReplay VkBool32 rayTracingPipelineShaderGroupHandleCaptureReplayMixed VkBool32 rayTracingPipelineTraceRaysIndirect VkBool32 rayTraversalPrimitiveCulling VkStructureType sType void* pNext VkBool32 rayQuery VkStructureType sType void* pNext uint64_t maxGeometryCount uint64_t maxInstanceCount uint64_t maxPrimitiveCount uint32_t maxPerStageDescriptorAccelerationStructures uint32_t maxPerStageDescriptorUpdateAfterBindAccelerationStructures uint32_t maxDescriptorSetAccelerationStructures uint32_t maxDescriptorSetUpdateAfterBindAccelerationStructures uint32_t minAccelerationStructureScratchOffsetAlignment VkStructureType sType void* pNext uint32_t shaderGroupHandleSize uint32_t maxRayRecursionDepth uint32_t maxShaderGroupStride uint32_t shaderGroupBaseAlignment uint32_t shaderGroupHandleCaptureReplaySize uint32_t maxRayDispatchInvocationCount uint32_t shaderGroupHandleAlignment uint32_t maxRayHitAttributeSize VkStructureType sType void* pNext uint32_t shaderGroupHandleSize uint32_t maxRecursionDepth uint32_t maxShaderGroupStride uint32_t shaderGroupBaseAlignment uint64_t maxGeometryCount uint64_t maxInstanceCount uint64_t maxTriangleCount uint32_t maxDescriptorSetAccelerationStructures VkDeviceAddress deviceAddress VkDeviceSize stride VkDeviceSize size uint32_t width uint32_t height uint32_t depth VkDeviceAddress raygenShaderRecordAddress VkDeviceSize raygenShaderRecordSize VkDeviceAddress missShaderBindingTableAddress VkDeviceSize missShaderBindingTableSize VkDeviceSize missShaderBindingTableStride VkDeviceAddress hitShaderBindingTableAddress VkDeviceSize hitShaderBindingTableSize VkDeviceSize hitShaderBindingTableStride VkDeviceAddress callableShaderBindingTableAddress VkDeviceSize callableShaderBindingTableSize VkDeviceSize callableShaderBindingTableStride uint32_t width uint32_t height uint32_t depth VkStructureType sType void* pNext VkBool32 rayTracingMaintenance1 VkBool32 rayTracingPipelineTraceRaysIndirect2 VkStructureType sType void* pNext uint32_t drmFormatModifierCount VkDrmFormatModifierPropertiesEXT* pDrmFormatModifierProperties uint64_t drmFormatModifier uint32_t drmFormatModifierPlaneCount VkFormatFeatureFlags drmFormatModifierTilingFeatures VkStructureType sType const void* pNext uint64_t drmFormatModifier VkSharingMode sharingMode uint32_t queueFamilyIndexCount const uint32_t* pQueueFamilyIndices VkStructureType sType const void* pNext uint32_t drmFormatModifierCount const uint64_t* pDrmFormatModifiers VkStructureType sType const void* pNext uint64_t drmFormatModifier uint32_t drmFormatModifierPlaneCount const VkSubresourceLayout* pPlaneLayouts VkStructureType sType void* pNext uint64_t drmFormatModifier VkStructureType sType const void* pNext VkImageUsageFlags stencilUsage VkStructureType sType const void* pNext VkMemoryOverallocationBehaviorAMD overallocationBehavior VkStructureType sType void* pNext VkBool32 fragmentDensityMap VkBool32 fragmentDensityMapDynamic VkBool32 fragmentDensityMapNonSubsampledImages VkStructureType sType void* pNext VkBool32 fragmentDensityMapDeferred VkStructureType sType void* pNext VkBool32 fragmentDensityMapOffset VkStructureType sType void* pNext VkExtent2D minFragmentDensityTexelSize VkExtent2D maxFragmentDensityTexelSize VkBool32 fragmentDensityInvocations VkStructureType sType void* pNext VkBool32 subsampledLoads VkBool32 subsampledCoarseReconstructionEarlyAccess uint32_t maxSubsampledArrayLayers uint32_t maxDescriptorSetSubsampledSamplers VkStructureType sType void* pNext VkExtent2D fragmentDensityOffsetGranularity VkStructureType sType const void* pNext VkAttachmentReference fragmentDensityMapAttachment VkStructureType sType const void* pNext uint32_t fragmentDensityOffsetCount const VkOffset2D* pFragmentDensityOffsets VkStructureType sType void* pNext VkBool32 scalarBlockLayout VkStructureType sType const void* pNext VkBool32 supportsProtectedRepresents if surface can be protected VkStructureType sType void* pNext VkBool32 uniformBufferStandardLayout VkStructureType sType void* pNext VkBool32 depthClipEnable VkStructureType sType const void* pNext VkPipelineRasterizationDepthClipStateCreateFlagsEXT flagsReserved VkBool32 depthClipEnable VkStructureType sType void* pNext VkDeviceSize heapBudget[VK_MAX_MEMORY_HEAPS] VkDeviceSize heapUsage[VK_MAX_MEMORY_HEAPS] VkStructureType sType void* pNext VkBool32 memoryPriority VkStructureType sType const void* pNext float priority VkStructureType sType void* pNext VkBool32 pageableDeviceLocalMemory VkStructureType sType void* pNext VkBool32 bufferDeviceAddress VkBool32 bufferDeviceAddressCaptureReplay VkBool32 bufferDeviceAddressMultiDevice VkStructureType sType void* pNext VkBool32 bufferDeviceAddress VkBool32 bufferDeviceAddressCaptureReplay VkBool32 bufferDeviceAddressMultiDevice VkStructureType sType const void* pNext VkBuffer buffer VkStructureType sType const void* pNext uint64_t opaqueCaptureAddress VkStructureType sType const void* pNext VkDeviceAddress deviceAddress VkStructureType sType void* pNext VkImageViewType imageViewType VkStructureType sType void* pNext VkBool32 filterCubicThe combinations of format, image type (and image view type if provided) can be filtered with VK_FILTER_CUBIC_EXT VkBool32 filterCubicMinmaxThe combination of format, image type (and image view type if provided) can be filtered with VK_FILTER_CUBIC_EXT and ReductionMode of Min or Max VkStructureType sType void* pNext VkBool32 imagelessFramebuffer VkStructureType sType const void* pNext uint32_t attachmentImageInfoCount const VkFramebufferAttachmentImageInfo* pAttachmentImageInfos VkStructureType sType const void* pNext VkImageCreateFlags flagsImage creation flags VkImageUsageFlags usageImage usage flags uint32_t width uint32_t height uint32_t layerCount uint32_t viewFormatCount const VkFormat* pViewFormats VkStructureType sType const void* pNext uint32_t attachmentCount const VkImageView* pAttachments VkStructureType sType void* pNext VkBool32 textureCompressionASTC_HDR VkStructureType sType void* pNext VkBool32 cooperativeMatrix VkBool32 cooperativeMatrixRobustBufferAccess VkStructureType sType void* pNext VkShaderStageFlags cooperativeMatrixSupportedStages VkStructureType sType void* pNext uint32_t MSize uint32_t NSize uint32_t KSize VkComponentTypeNV AType VkComponentTypeNV BType VkComponentTypeNV CType VkComponentTypeNV DType VkScopeNV scope VkStructureType sType void* pNext VkBool32 ycbcrImageArrays VkStructureType sType const void* pNext VkImageView imageView VkDescriptorType descriptorType VkSampler sampler VkStructureType sType void* pNext VkDeviceAddress deviceAddress VkDeviceSize size VkStructureType sType const void* pNext GgpFrameToken frameToken VkPipelineCreationFeedbackFlags flags uint64_t duration VkStructureType sType const void* pNext VkPipelineCreationFeedback* pPipelineCreationFeedbackOutput pipeline creation feedback. uint32_t pipelineStageCreationFeedbackCount VkPipelineCreationFeedback* pPipelineStageCreationFeedbacksOne entry for each shader stage specified in the parent Vk*PipelineCreateInfo struct VkStructureType sType void* pNext VkFullScreenExclusiveEXT fullScreenExclusive VkStructureType sType const void* pNext HMONITOR hmonitor VkStructureType sType void* pNext VkBool32 fullScreenExclusiveSupported VkStructureType sType void* pNext VkBool32 presentBarrier VkStructureType sType void* pNext VkBool32 presentBarrierSupported VkStructureType sType void* pNext VkBool32 presentBarrierEnable VkStructureType sType void* pNext VkBool32 performanceCounterQueryPoolsperformance counters supported in query pools VkBool32 performanceCounterMultipleQueryPoolsperformance counters from multiple query pools can be accessed in the same primary command buffer VkStructureType sType void* pNext VkBool32 allowCommandBufferQueryCopiesFlag to specify whether performance queries are allowed to be used in vkCmdCopyQueryPoolResults VkStructureType sType void* pNext VkPerformanceCounterUnitKHR unit VkPerformanceCounterScopeKHR scope VkPerformanceCounterStorageKHR storage uint8_t uuid[VK_UUID_SIZE] VkStructureType sType void* pNext VkPerformanceCounterDescriptionFlagsKHR flags char name[VK_MAX_DESCRIPTION_SIZE] char category[VK_MAX_DESCRIPTION_SIZE] char description[VK_MAX_DESCRIPTION_SIZE] VkStructureType sType const void* pNext uint32_t queueFamilyIndex uint32_t counterIndexCount const uint32_t* pCounterIndices int32_t int32 int64_t int64 uint32_t uint32 uint64_t uint64 float float32 double float64 VkStructureType sType const void* pNext VkAcquireProfilingLockFlagsKHR flagsAcquire profiling lock flags uint64_t timeout VkStructureType sType const void* pNext uint32_t counterPassIndexIndex for which counter pass to submit VkStructureType sType const void* pNext VkHeadlessSurfaceCreateFlagsEXT flags VkStructureType sType void* pNext VkBool32 coverageReductionMode VkStructureType sType const void* pNext VkPipelineCoverageReductionStateCreateFlagsNV flags VkCoverageReductionModeNV coverageReductionMode VkStructureType sType void* pNext VkCoverageReductionModeNV coverageReductionMode VkSampleCountFlagBits rasterizationSamples VkSampleCountFlags depthStencilSamples VkSampleCountFlags colorSamples VkStructureType sType void* pNext VkBool32 shaderIntegerFunctions2 uint32_t value32 uint64_t value64 float valueFloat VkBool32 valueBool const char* valueString VkPerformanceValueTypeINTEL type VkPerformanceValueDataINTEL data VkStructureType sType const void* pNext void* pUserData VkStructureType sType const void* pNext VkQueryPoolSamplingModeINTEL performanceCountersSampling VkStructureType sType const void* pNext uint64_t marker VkStructureType sType const void* pNext uint32_t marker VkStructureType sType const void* pNext VkPerformanceOverrideTypeINTEL type VkBool32 enable uint64_t parameter VkStructureType sType const void* pNext VkPerformanceConfigurationTypeINTEL type VkStructureType sType void* pNext VkBool32 shaderSubgroupClock VkBool32 shaderDeviceClock VkStructureType sType void* pNext VkBool32 indexTypeUint8 VkStructureType sType void* pNext uint32_t shaderSMCount uint32_t shaderWarpsPerSM VkStructureType sType void* pNext VkBool32 shaderSMBuiltins VkStructureType sType void* pNextPointer to next structure VkBool32 fragmentShaderSampleInterlock VkBool32 fragmentShaderPixelInterlock VkBool32 fragmentShaderShadingRateInterlock VkStructureType sType void* pNext VkBool32 separateDepthStencilLayouts VkStructureType sType void* pNext VkImageLayout stencilLayout VkStructureType sType void* pNext VkBool32 primitiveTopologyListRestart VkBool32 primitiveTopologyPatchListRestart VkStructureType sType void* pNext VkImageLayout stencilInitialLayout VkImageLayout stencilFinalLayout VkStructureType sType void* pNext VkBool32 pipelineExecutableInfo VkStructureType sType const void* pNext VkPipeline pipeline VkStructureType sType void* pNext VkShaderStageFlags stages char name[VK_MAX_DESCRIPTION_SIZE] char description[VK_MAX_DESCRIPTION_SIZE] uint32_t subgroupSize VkStructureType sType const void* pNext VkPipeline pipeline uint32_t executableIndex VkBool32 b32 int64_t i64 uint64_t u64 double f64 VkStructureType sType void* pNext char name[VK_MAX_DESCRIPTION_SIZE] char description[VK_MAX_DESCRIPTION_SIZE] VkPipelineExecutableStatisticFormatKHR format VkPipelineExecutableStatisticValueKHR value VkStructureType sType void* pNext char name[VK_MAX_DESCRIPTION_SIZE] char description[VK_MAX_DESCRIPTION_SIZE] VkBool32 isText size_t dataSize void* pData VkStructureType sType void* pNext VkBool32 shaderDemoteToHelperInvocation VkStructureType sType void* pNext VkBool32 texelBufferAlignment VkStructureType sType void* pNext VkDeviceSize storageTexelBufferOffsetAlignmentBytes VkBool32 storageTexelBufferOffsetSingleTexelAlignment VkDeviceSize uniformTexelBufferOffsetAlignmentBytes VkBool32 uniformTexelBufferOffsetSingleTexelAlignment VkStructureType sType void* pNext VkBool32 subgroupSizeControl VkBool32 computeFullSubgroups VkStructureType sType void* pNext uint32_t minSubgroupSizeThe minimum subgroup size supported by this device uint32_t maxSubgroupSizeThe maximum subgroup size supported by this device uint32_t maxComputeWorkgroupSubgroupsThe maximum number of subgroups supported in a workgroup VkShaderStageFlags requiredSubgroupSizeStagesThe shader stages that support specifying a subgroup size VkStructureType sType void* pNext uint32_t requiredSubgroupSize VkStructureType sType void* pNext VkRenderPass renderPass uint32_t subpass VkStructureType sType void* pNext uint32_t maxSubpassShadingWorkgroupSizeAspectRatio VkStructureType sType const void* pNext uint64_t opaqueCaptureAddress VkStructureType sType const void* pNext VkDeviceMemory memory VkStructureType sType void* pNext VkBool32 rectangularLines VkBool32 bresenhamLines VkBool32 smoothLines VkBool32 stippledRectangularLines VkBool32 stippledBresenhamLines VkBool32 stippledSmoothLines VkStructureType sType void* pNext uint32_t lineSubPixelPrecisionBits VkStructureType sType const void* pNext VkLineRasterizationModeEXT lineRasterizationMode VkBool32 stippledLineEnable uint32_t lineStippleFactor uint16_t lineStipplePattern VkStructureType sType void* pNext VkBool32 pipelineCreationCacheControl VkStructureType sType void* pNext VkBool32 storageBuffer16BitAccess16-bit integer/floating-point variables supported in BufferBlock VkBool32 uniformAndStorageBuffer16BitAccess16-bit integer/floating-point variables supported in BufferBlock and Block VkBool32 storagePushConstant1616-bit integer/floating-point variables supported in PushConstant VkBool32 storageInputOutput1616-bit integer/floating-point variables supported in shader inputs and outputs VkBool32 multiviewMultiple views in a renderpass VkBool32 multiviewGeometryShaderMultiple views in a renderpass w/ geometry shader VkBool32 multiviewTessellationShaderMultiple views in a renderpass w/ tessellation shader VkBool32 variablePointersStorageBuffer VkBool32 variablePointers VkBool32 protectedMemory VkBool32 samplerYcbcrConversionSampler color conversion supported VkBool32 shaderDrawParameters VkStructureType sType void* pNext uint8_t deviceUUID[VK_UUID_SIZE] uint8_t driverUUID[VK_UUID_SIZE] uint8_t deviceLUID[VK_LUID_SIZE] uint32_t deviceNodeMask VkBool32 deviceLUIDValid uint32_t subgroupSizeThe size of a subgroup for this queue. VkShaderStageFlags subgroupSupportedStagesBitfield of what shader stages support subgroup operations VkSubgroupFeatureFlags subgroupSupportedOperationsBitfield of what subgroup operations are supported. VkBool32 subgroupQuadOperationsInAllStagesFlag to specify whether quad operations are available in all stages. VkPointClippingBehavior pointClippingBehavior uint32_t maxMultiviewViewCountmax number of views in a subpass uint32_t maxMultiviewInstanceIndexmax instance index for a draw in a multiview subpass VkBool32 protectedNoFault uint32_t maxPerSetDescriptors VkDeviceSize maxMemoryAllocationSize VkStructureType sType void* pNext VkBool32 samplerMirrorClampToEdge VkBool32 drawIndirectCount VkBool32 storageBuffer8BitAccess8-bit integer variables supported in StorageBuffer VkBool32 uniformAndStorageBuffer8BitAccess8-bit integer variables supported in StorageBuffer and Uniform VkBool32 storagePushConstant88-bit integer variables supported in PushConstant VkBool32 shaderBufferInt64Atomics VkBool32 shaderSharedInt64Atomics VkBool32 shaderFloat1616-bit floats (halfs) in shaders VkBool32 shaderInt88-bit integers in shaders VkBool32 descriptorIndexing VkBool32 shaderInputAttachmentArrayDynamicIndexing VkBool32 shaderUniformTexelBufferArrayDynamicIndexing VkBool32 shaderStorageTexelBufferArrayDynamicIndexing VkBool32 shaderUniformBufferArrayNonUniformIndexing VkBool32 shaderSampledImageArrayNonUniformIndexing VkBool32 shaderStorageBufferArrayNonUniformIndexing VkBool32 shaderStorageImageArrayNonUniformIndexing VkBool32 shaderInputAttachmentArrayNonUniformIndexing VkBool32 shaderUniformTexelBufferArrayNonUniformIndexing VkBool32 shaderStorageTexelBufferArrayNonUniformIndexing VkBool32 descriptorBindingUniformBufferUpdateAfterBind VkBool32 descriptorBindingSampledImageUpdateAfterBind VkBool32 descriptorBindingStorageImageUpdateAfterBind VkBool32 descriptorBindingStorageBufferUpdateAfterBind VkBool32 descriptorBindingUniformTexelBufferUpdateAfterBind VkBool32 descriptorBindingStorageTexelBufferUpdateAfterBind VkBool32 descriptorBindingUpdateUnusedWhilePending VkBool32 descriptorBindingPartiallyBound VkBool32 descriptorBindingVariableDescriptorCount VkBool32 runtimeDescriptorArray VkBool32 samplerFilterMinmax VkBool32 scalarBlockLayout VkBool32 imagelessFramebuffer VkBool32 uniformBufferStandardLayout VkBool32 shaderSubgroupExtendedTypes VkBool32 separateDepthStencilLayouts VkBool32 hostQueryReset VkBool32 timelineSemaphore VkBool32 bufferDeviceAddress VkBool32 bufferDeviceAddressCaptureReplay VkBool32 bufferDeviceAddressMultiDevice VkBool32 vulkanMemoryModel VkBool32 vulkanMemoryModelDeviceScope VkBool32 vulkanMemoryModelAvailabilityVisibilityChains VkBool32 shaderOutputViewportIndex VkBool32 shaderOutputLayer VkBool32 subgroupBroadcastDynamicId VkStructureType sType void* pNext VkDriverId driverID char driverName[VK_MAX_DRIVER_NAME_SIZE] char driverInfo[VK_MAX_DRIVER_INFO_SIZE] VkConformanceVersion conformanceVersion VkShaderFloatControlsIndependence denormBehaviorIndependence VkShaderFloatControlsIndependence roundingModeIndependence VkBool32 shaderSignedZeroInfNanPreserveFloat16An implementation can preserve signed zero, nan, inf VkBool32 shaderSignedZeroInfNanPreserveFloat32An implementation can preserve signed zero, nan, inf VkBool32 shaderSignedZeroInfNanPreserveFloat64An implementation can preserve signed zero, nan, inf VkBool32 shaderDenormPreserveFloat16An implementation can preserve denormals VkBool32 shaderDenormPreserveFloat32An implementation can preserve denormals VkBool32 shaderDenormPreserveFloat64An implementation can preserve denormals VkBool32 shaderDenormFlushToZeroFloat16An implementation can flush to zero denormals VkBool32 shaderDenormFlushToZeroFloat32An implementation can flush to zero denormals VkBool32 shaderDenormFlushToZeroFloat64An implementation can flush to zero denormals VkBool32 shaderRoundingModeRTEFloat16An implementation can support RTE VkBool32 shaderRoundingModeRTEFloat32An implementation can support RTE VkBool32 shaderRoundingModeRTEFloat64An implementation can support RTE VkBool32 shaderRoundingModeRTZFloat16An implementation can support RTZ VkBool32 shaderRoundingModeRTZFloat32An implementation can support RTZ VkBool32 shaderRoundingModeRTZFloat64An implementation can support RTZ uint32_t maxUpdateAfterBindDescriptorsInAllPools VkBool32 shaderUniformBufferArrayNonUniformIndexingNative VkBool32 shaderSampledImageArrayNonUniformIndexingNative VkBool32 shaderStorageBufferArrayNonUniformIndexingNative VkBool32 shaderStorageImageArrayNonUniformIndexingNative VkBool32 shaderInputAttachmentArrayNonUniformIndexingNative VkBool32 robustBufferAccessUpdateAfterBind VkBool32 quadDivergentImplicitLod uint32_t maxPerStageDescriptorUpdateAfterBindSamplers uint32_t maxPerStageDescriptorUpdateAfterBindUniformBuffers uint32_t maxPerStageDescriptorUpdateAfterBindStorageBuffers uint32_t maxPerStageDescriptorUpdateAfterBindSampledImages uint32_t maxPerStageDescriptorUpdateAfterBindStorageImages uint32_t maxPerStageDescriptorUpdateAfterBindInputAttachments uint32_t maxPerStageUpdateAfterBindResources uint32_t maxDescriptorSetUpdateAfterBindSamplers uint32_t maxDescriptorSetUpdateAfterBindUniformBuffers uint32_t maxDescriptorSetUpdateAfterBindUniformBuffersDynamic uint32_t maxDescriptorSetUpdateAfterBindStorageBuffers uint32_t maxDescriptorSetUpdateAfterBindStorageBuffersDynamic uint32_t maxDescriptorSetUpdateAfterBindSampledImages uint32_t maxDescriptorSetUpdateAfterBindStorageImages uint32_t maxDescriptorSetUpdateAfterBindInputAttachments VkResolveModeFlags supportedDepthResolveModessupported depth resolve modes VkResolveModeFlags supportedStencilResolveModessupported stencil resolve modes VkBool32 independentResolveNonedepth and stencil resolve modes can be set independently if one of them is none VkBool32 independentResolvedepth and stencil resolve modes can be set independently VkBool32 filterMinmaxSingleComponentFormats VkBool32 filterMinmaxImageComponentMapping uint64_t maxTimelineSemaphoreValueDifference VkSampleCountFlags framebufferIntegerColorSampleCounts VkStructureType sType void* pNext VkBool32 robustImageAccess VkBool32 inlineUniformBlock VkBool32 descriptorBindingInlineUniformBlockUpdateAfterBind VkBool32 pipelineCreationCacheControl VkBool32 privateData VkBool32 shaderDemoteToHelperInvocation VkBool32 shaderTerminateInvocation VkBool32 subgroupSizeControl VkBool32 computeFullSubgroups VkBool32 synchronization2 VkBool32 textureCompressionASTC_HDR VkBool32 shaderZeroInitializeWorkgroupMemory VkBool32 dynamicRendering VkBool32 shaderIntegerDotProduct VkBool32 maintenance4 VkStructureType sType void* pNext uint32_t minSubgroupSizeThe minimum subgroup size supported by this device uint32_t maxSubgroupSizeThe maximum subgroup size supported by this device uint32_t maxComputeWorkgroupSubgroupsThe maximum number of subgroups supported in a workgroup VkShaderStageFlags requiredSubgroupSizeStagesThe shader stages that support specifying a subgroup size uint32_t maxInlineUniformBlockSize uint32_t maxPerStageDescriptorInlineUniformBlocks uint32_t maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks uint32_t maxDescriptorSetInlineUniformBlocks uint32_t maxDescriptorSetUpdateAfterBindInlineUniformBlocks uint32_t maxInlineUniformTotalSize VkBool32 integerDotProduct8BitUnsignedAccelerated VkBool32 integerDotProduct8BitSignedAccelerated VkBool32 integerDotProduct8BitMixedSignednessAccelerated VkBool32 integerDotProduct4x8BitPackedUnsignedAccelerated VkBool32 integerDotProduct4x8BitPackedSignedAccelerated VkBool32 integerDotProduct4x8BitPackedMixedSignednessAccelerated VkBool32 integerDotProduct16BitUnsignedAccelerated VkBool32 integerDotProduct16BitSignedAccelerated VkBool32 integerDotProduct16BitMixedSignednessAccelerated VkBool32 integerDotProduct32BitUnsignedAccelerated VkBool32 integerDotProduct32BitSignedAccelerated VkBool32 integerDotProduct32BitMixedSignednessAccelerated VkBool32 integerDotProduct64BitUnsignedAccelerated VkBool32 integerDotProduct64BitSignedAccelerated VkBool32 integerDotProduct64BitMixedSignednessAccelerated VkBool32 integerDotProductAccumulatingSaturating8BitUnsignedAccelerated VkBool32 integerDotProductAccumulatingSaturating8BitSignedAccelerated VkBool32 integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated VkBool32 integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated VkBool32 integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated VkBool32 integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated VkBool32 integerDotProductAccumulatingSaturating16BitUnsignedAccelerated VkBool32 integerDotProductAccumulatingSaturating16BitSignedAccelerated VkBool32 integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated VkBool32 integerDotProductAccumulatingSaturating32BitUnsignedAccelerated VkBool32 integerDotProductAccumulatingSaturating32BitSignedAccelerated VkBool32 integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated VkBool32 integerDotProductAccumulatingSaturating64BitUnsignedAccelerated VkBool32 integerDotProductAccumulatingSaturating64BitSignedAccelerated VkBool32 integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated VkDeviceSize storageTexelBufferOffsetAlignmentBytes VkBool32 storageTexelBufferOffsetSingleTexelAlignment VkDeviceSize uniformTexelBufferOffsetAlignmentBytes VkBool32 uniformTexelBufferOffsetSingleTexelAlignment VkDeviceSize maxBufferSize VkStructureType sType const void* pNext VkPipelineCompilerControlFlagsAMD compilerControlFlags VkStructureType sType void* pNext VkBool32 deviceCoherentMemory VkStructureType sType void* pNext char name[VK_MAX_EXTENSION_NAME_SIZE] char version[VK_MAX_EXTENSION_NAME_SIZE] VkToolPurposeFlags purposes char description[VK_MAX_DESCRIPTION_SIZE] char layer[VK_MAX_EXTENSION_NAME_SIZE] VkStructureType sType const void* pNext VkClearColorValue customBorderColor VkFormat format VkStructureType sType void* pNext uint32_t maxCustomBorderColorSamplers VkStructureType sType void* pNext VkBool32 customBorderColors VkBool32 customBorderColorWithoutFormat VkStructureType sType const void* pNext VkComponentMapping components VkBool32 srgb VkStructureType sType void* pNext VkBool32 borderColorSwizzle VkBool32 borderColorSwizzleFromImage VkDeviceAddress deviceAddress void* hostAddress VkDeviceAddress deviceAddress const void* hostAddress VkStructureType sType const void* pNext VkFormat vertexFormat VkDeviceOrHostAddressConstKHR vertexData VkDeviceSize vertexStride uint32_t maxVertex VkIndexType indexType VkDeviceOrHostAddressConstKHR indexData VkDeviceOrHostAddressConstKHR transformData VkStructureType sType const void* pNext VkDeviceOrHostAddressConstKHR data VkDeviceSize stride VkStructureType sType const void* pNext VkBool32 arrayOfPointers VkDeviceOrHostAddressConstKHR data VkAccelerationStructureGeometryTrianglesDataKHR triangles VkAccelerationStructureGeometryAabbsDataKHR aabbs VkAccelerationStructureGeometryInstancesDataKHR instances VkStructureType sType const void* pNext VkGeometryTypeKHR geometryType VkAccelerationStructureGeometryDataKHR geometry VkGeometryFlagsKHR flags VkStructureType sType const void* pNext VkAccelerationStructureTypeKHR type VkBuildAccelerationStructureFlagsKHR flags VkBuildAccelerationStructureModeKHR mode VkAccelerationStructureKHR srcAccelerationStructure VkAccelerationStructureKHR dstAccelerationStructure uint32_t geometryCount const VkAccelerationStructureGeometryKHR* pGeometries const VkAccelerationStructureGeometryKHR* const* ppGeometries VkDeviceOrHostAddressKHR scratchData uint32_t primitiveCount uint32_t primitiveOffset uint32_t firstVertex uint32_t transformOffset VkStructureType sType const void* pNext VkAccelerationStructureCreateFlagsKHR createFlags VkBuffer buffer VkDeviceSize offsetSpecified in bytes VkDeviceSize size VkAccelerationStructureTypeKHR type VkDeviceAddress deviceAddress float minX float minY float minZ float maxX float maxY float maxZ float matrix[3][4] The bitfields in this structure are non-normative since bitfield ordering is implementation-defined in C. The specification defines the normative layout. VkTransformMatrixKHR transform uint32_t instanceCustomIndex:24 uint32_t mask:8 uint32_t instanceShaderBindingTableRecordOffset:24 VkGeometryInstanceFlagsKHR flags:8 uint64_t accelerationStructureReference VkStructureType sType const void* pNext VkAccelerationStructureKHR accelerationStructure VkStructureType sType const void* pNext const uint8_t* pVersionData VkStructureType sType const void* pNext VkAccelerationStructureKHR src VkAccelerationStructureKHR dst VkCopyAccelerationStructureModeKHR mode VkStructureType sType const void* pNext VkAccelerationStructureKHR src VkDeviceOrHostAddressKHR dst VkCopyAccelerationStructureModeKHR mode VkStructureType sType const void* pNext VkDeviceOrHostAddressConstKHR src VkAccelerationStructureKHR dst VkCopyAccelerationStructureModeKHR mode VkStructureType sType const void* pNext uint32_t maxPipelineRayPayloadSize uint32_t maxPipelineRayHitAttributeSize VkStructureType sType const void* pNext uint32_t libraryCount const VkPipeline* pLibraries VkStructureType sType void* pNext VkBool32 extendedDynamicState VkStructureType sType void* pNext VkBool32 extendedDynamicState2 VkBool32 extendedDynamicState2LogicOp VkBool32 extendedDynamicState2PatchControlPoints VkStructureType sType void* pNext VkBool32 extendedDynamicState3TessellationDomainOrigin VkBool32 extendedDynamicState3DepthClampEnable VkBool32 extendedDynamicState3PolygonMode VkBool32 extendedDynamicState3RasterizationSamples VkBool32 extendedDynamicState3SampleMask VkBool32 extendedDynamicState3AlphaToCoverageEnable VkBool32 extendedDynamicState3AlphaToOneEnable VkBool32 extendedDynamicState3LogicOpEnable VkBool32 extendedDynamicState3ColorBlendEnable VkBool32 extendedDynamicState3ColorBlendEquation VkBool32 extendedDynamicState3ColorWriteMask VkBool32 extendedDynamicState3RasterizationStream VkBool32 extendedDynamicState3ConservativeRasterizationMode VkBool32 extendedDynamicState3ExtraPrimitiveOverestimationSize VkBool32 extendedDynamicState3DepthClipEnable VkBool32 extendedDynamicState3SampleLocationsEnable VkBool32 extendedDynamicState3ColorBlendAdvanced VkBool32 extendedDynamicState3ProvokingVertexMode VkBool32 extendedDynamicState3LineRasterizationMode VkBool32 extendedDynamicState3LineStippleEnable VkBool32 extendedDynamicState3DepthClipNegativeOneToOne VkBool32 extendedDynamicState3ViewportWScalingEnable VkBool32 extendedDynamicState3ViewportSwizzle VkBool32 extendedDynamicState3CoverageToColorEnable VkBool32 extendedDynamicState3CoverageToColorLocation VkBool32 extendedDynamicState3CoverageModulationMode VkBool32 extendedDynamicState3CoverageModulationTableEnable VkBool32 extendedDynamicState3CoverageModulationTable VkBool32 extendedDynamicState3CoverageReductionMode VkBool32 extendedDynamicState3RepresentativeFragmentTestEnable VkBool32 extendedDynamicState3ShadingRateImageEnable VkStructureType sType void* pNext VkBool32 dynamicPrimitiveTopologyUnrestricted VkBlendFactor srcColorBlendFactor VkBlendFactor dstColorBlendFactor VkBlendOp colorBlendOp VkBlendFactor srcAlphaBlendFactor VkBlendFactor dstAlphaBlendFactor VkBlendOp alphaBlendOp VkBlendOp advancedBlendOp VkBool32 srcPremultiplied VkBool32 dstPremultiplied VkBlendOverlapEXT blendOverlap VkBool32 clampResults VkStructureType sType void* pNextPointer to next structure VkSurfaceTransformFlagBitsKHR transform VkStructureType sType const void* pNext VkSurfaceTransformFlagBitsKHR transform VkStructureType sType void* pNextPointer to next structure VkSurfaceTransformFlagBitsKHR transform VkRect2D renderArea VkStructureType sType void* pNext VkBool32 diagnosticsConfig VkStructureType sType const void* pNext VkDeviceDiagnosticsConfigFlagsNV flags VkStructureType sType void* pNext VkBool32 shaderZeroInitializeWorkgroupMemory VkStructureType sType void* pNext VkBool32 shaderSubgroupUniformControlFlow VkStructureType sType void* pNext VkBool32 robustBufferAccess2 VkBool32 robustImageAccess2 VkBool32 nullDescriptor VkStructureType sType void* pNext VkDeviceSize robustStorageBufferAccessSizeAlignment VkDeviceSize robustUniformBufferAccessSizeAlignment VkStructureType sType void* pNext VkBool32 robustImageAccess VkStructureType sType void* pNext VkBool32 workgroupMemoryExplicitLayout VkBool32 workgroupMemoryExplicitLayoutScalarBlockLayout VkBool32 workgroupMemoryExplicitLayout8BitAccess VkBool32 workgroupMemoryExplicitLayout16BitAccess VkStructureType sType void* pNext VkBool32 constantAlphaColorBlendFactors VkBool32 events VkBool32 imageViewFormatReinterpretation VkBool32 imageViewFormatSwizzle VkBool32 imageView2DOn3DImage VkBool32 multisampleArrayImage VkBool32 mutableComparisonSamplers VkBool32 pointPolygons VkBool32 samplerMipLodBias VkBool32 separateStencilMaskRef VkBool32 shaderSampleRateInterpolationFunctions VkBool32 tessellationIsolines VkBool32 tessellationPointMode VkBool32 triangleFans VkBool32 vertexAttributeAccessBeyondStride VkStructureType sType void* pNext uint32_t minVertexInputBindingStrideAlignment VkStructureType sType void* pNext VkBool32 formatA4R4G4B4 VkBool32 formatA4B4G4R4 VkStructureType sType void* pNext VkBool32 subpassShading VkStructureType sType const void* pNext VkDeviceSize srcOffsetSpecified in bytes VkDeviceSize dstOffsetSpecified in bytes VkDeviceSize sizeSpecified in bytes VkStructureType sType const void* pNext VkImageSubresourceLayers srcSubresource VkOffset3D srcOffsetSpecified in pixels for both compressed and uncompressed images VkImageSubresourceLayers dstSubresource VkOffset3D dstOffsetSpecified in pixels for both compressed and uncompressed images VkExtent3D extentSpecified in pixels for both compressed and uncompressed images VkStructureType sType const void* pNext VkImageSubresourceLayers srcSubresource VkOffset3D srcOffsets[2]Specified in pixels for both compressed and uncompressed images VkImageSubresourceLayers dstSubresource VkOffset3D dstOffsets[2]Specified in pixels for both compressed and uncompressed images VkStructureType sType const void* pNext VkDeviceSize bufferOffsetSpecified in bytes uint32_t bufferRowLengthSpecified in texels uint32_t bufferImageHeight VkImageSubresourceLayers imageSubresource VkOffset3D imageOffsetSpecified in pixels for both compressed and uncompressed images VkExtent3D imageExtentSpecified in pixels for both compressed and uncompressed images VkStructureType sType const void* pNext VkImageSubresourceLayers srcSubresource VkOffset3D srcOffset VkImageSubresourceLayers dstSubresource VkOffset3D dstOffset VkExtent3D extent VkStructureType sType const void* pNext VkBuffer srcBuffer VkBuffer dstBuffer uint32_t regionCount const VkBufferCopy2* pRegions VkStructureType sType const void* pNext VkImage srcImage VkImageLayout srcImageLayout VkImage dstImage VkImageLayout dstImageLayout uint32_t regionCount const VkImageCopy2* pRegions VkStructureType sType const void* pNext VkImage srcImage VkImageLayout srcImageLayout VkImage dstImage VkImageLayout dstImageLayout uint32_t regionCount const VkImageBlit2* pRegions VkFilter filter VkStructureType sType const void* pNext VkBuffer srcBuffer VkImage dstImage VkImageLayout dstImageLayout uint32_t regionCount const VkBufferImageCopy2* pRegions VkStructureType sType const void* pNext VkImage srcImage VkImageLayout srcImageLayout VkBuffer dstBuffer uint32_t regionCount const VkBufferImageCopy2* pRegions VkStructureType sType const void* pNext VkImage srcImage VkImageLayout srcImageLayout VkImage dstImage VkImageLayout dstImageLayout uint32_t regionCount const VkImageResolve2* pRegions VkStructureType sType void* pNext VkBool32 shaderImageInt64Atomics VkBool32 sparseImageInt64Atomics VkStructureType sType const void* pNext const VkAttachmentReference2* pFragmentShadingRateAttachment VkExtent2D shadingRateAttachmentTexelSize VkStructureType sType const void* pNext VkExtent2D fragmentSize VkFragmentShadingRateCombinerOpKHR combinerOps[2] VkStructureType sType void* pNext VkBool32 pipelineFragmentShadingRate VkBool32 primitiveFragmentShadingRate VkBool32 attachmentFragmentShadingRate VkStructureType sType void* pNext VkExtent2D minFragmentShadingRateAttachmentTexelSize VkExtent2D maxFragmentShadingRateAttachmentTexelSize uint32_t maxFragmentShadingRateAttachmentTexelSizeAspectRatio VkBool32 primitiveFragmentShadingRateWithMultipleViewports VkBool32 layeredShadingRateAttachments VkBool32 fragmentShadingRateNonTrivialCombinerOps VkExtent2D maxFragmentSize uint32_t maxFragmentSizeAspectRatio uint32_t maxFragmentShadingRateCoverageSamples VkSampleCountFlagBits maxFragmentShadingRateRasterizationSamples VkBool32 fragmentShadingRateWithShaderDepthStencilWrites VkBool32 fragmentShadingRateWithSampleMask VkBool32 fragmentShadingRateWithShaderSampleMask VkBool32 fragmentShadingRateWithConservativeRasterization VkBool32 fragmentShadingRateWithFragmentShaderInterlock VkBool32 fragmentShadingRateWithCustomSampleLocations VkBool32 fragmentShadingRateStrictMultiplyCombiner VkStructureType sType void* pNext VkSampleCountFlags sampleCounts VkExtent2D fragmentSize VkStructureType sType void* pNext VkBool32 shaderTerminateInvocation VkStructureType sType void* pNext VkBool32 fragmentShadingRateEnums VkBool32 supersampleFragmentShadingRates VkBool32 noInvocationFragmentShadingRates VkStructureType sType void* pNext VkSampleCountFlagBits maxFragmentShadingRateInvocationCount VkStructureType sType const void* pNext VkFragmentShadingRateTypeNV shadingRateType VkFragmentShadingRateNV shadingRate VkFragmentShadingRateCombinerOpKHR combinerOps[2] VkStructureType sType const void* pNext VkDeviceSize accelerationStructureSize VkDeviceSize updateScratchSize VkDeviceSize buildScratchSize VkStructureType sType void* pNext VkBool32 image2DViewOf3D VkBool32 sampler2DViewOf3D VkStructureType sType void* pNext VkBool32 mutableDescriptorType uint32_t descriptorTypeCount const VkDescriptorType* pDescriptorTypes VkStructureType sType const void* pNext uint32_t mutableDescriptorTypeListCount const VkMutableDescriptorTypeListEXT* pMutableDescriptorTypeLists VkStructureType sType void* pNext VkBool32 depthClipControl VkStructureType sType const void* pNext VkBool32 negativeOneToOne VkStructureType sType void* pNext VkBool32 vertexInputDynamicState VkStructureType sType void* pNext VkBool32 externalMemoryRDMA VkStructureType sType void* pNext uint32_t binding uint32_t stride VkVertexInputRate inputRate uint32_t divisor VkStructureType sType void* pNext uint32_t locationlocation of the shader vertex attrib uint32_t bindingVertex buffer binding id VkFormat formatformat of source data uint32_t offsetOffset of first element in bytes from base of vertex VkStructureType sType void* pNext VkBool32 colorWriteEnable VkStructureType sType const void* pNext uint32_t attachmentCount# of pAttachments const VkBool32* pColorWriteEnables VkStructureType sType const void* pNext VkPipelineStageFlags2 srcStageMask VkAccessFlags2 srcAccessMask VkPipelineStageFlags2 dstStageMask VkAccessFlags2 dstAccessMask VkStructureType sType const void* pNext VkPipelineStageFlags2 srcStageMask VkAccessFlags2 srcAccessMask VkPipelineStageFlags2 dstStageMask VkAccessFlags2 dstAccessMask VkImageLayout oldLayout VkImageLayout newLayout uint32_t srcQueueFamilyIndex uint32_t dstQueueFamilyIndex VkImage image VkImageSubresourceRange subresourceRange VkStructureType sType const void* pNext VkPipelineStageFlags2 srcStageMask VkAccessFlags2 srcAccessMask VkPipelineStageFlags2 dstStageMask VkAccessFlags2 dstAccessMask uint32_t srcQueueFamilyIndex uint32_t dstQueueFamilyIndex VkBuffer buffer VkDeviceSize offset VkDeviceSize size VkStructureType sType const void* pNext VkDependencyFlags dependencyFlags uint32_t memoryBarrierCount const VkMemoryBarrier2* pMemoryBarriers uint32_t bufferMemoryBarrierCount const VkBufferMemoryBarrier2* pBufferMemoryBarriers uint32_t imageMemoryBarrierCount const VkImageMemoryBarrier2* pImageMemoryBarriers VkStructureType sType const void* pNext VkSemaphore semaphore uint64_t value VkPipelineStageFlags2 stageMask uint32_t deviceIndex VkStructureType sType const void* pNext VkCommandBuffer commandBuffer uint32_t deviceMask VkStructureType sType const void* pNext VkSubmitFlags flags uint32_t waitSemaphoreInfoCount const VkSemaphoreSubmitInfo* pWaitSemaphoreInfos uint32_t commandBufferInfoCount const VkCommandBufferSubmitInfo* pCommandBufferInfos uint32_t signalSemaphoreInfoCount const VkSemaphoreSubmitInfo* pSignalSemaphoreInfos VkStructureType sType void* pNext VkPipelineStageFlags2 checkpointExecutionStageMask VkStructureType sType void* pNext VkPipelineStageFlags2 stage void* pCheckpointMarker VkStructureType sType void* pNext VkBool32 synchronization2 VkStructureType sType void* pNext VkBool32 primitivesGeneratedQuery VkBool32 primitivesGeneratedQueryWithRasterizerDiscard VkBool32 primitivesGeneratedQueryWithNonZeroStreams VkStructureType sType void* pNext VkBool32 legacyDithering VkStructureType sType void* pNext VkBool32 multisampledRenderToSingleSampled VkStructureType sType void* pNext VkBool32 optimal VkStructureType sType const void* pNext VkBool32 multisampledRenderToSingleSampledEnable VkSampleCountFlagBits rasterizationSamples VkStructureType sType void* pNext VkBool32 pipelineProtectedAccess VkStructureType sType void* pNext VkVideoCodecOperationFlagsKHR videoCodecOperations VkStructureType sType void* pNext VkBool32 queryResultStatusSupport VkStructureType sType const void* pNext uint32_t profileCount const VkVideoProfileInfoKHR* pProfiles VkStructureType sType const void* pNext VkImageUsageFlags imageUsage VkStructureType sType void* pNext VkFormat format VkComponentMapping componentMapping VkImageCreateFlags imageCreateFlags VkImageType imageType VkImageTiling imageTiling VkImageUsageFlags imageUsageFlags VkStructureType sType const void* pNext VkVideoCodecOperationFlagBitsKHR videoCodecOperation VkVideoChromaSubsamplingFlagsKHR chromaSubsampling VkVideoComponentBitDepthFlagsKHR lumaBitDepth VkVideoComponentBitDepthFlagsKHR chromaBitDepth VkStructureType sType void* pNext VkVideoCapabilityFlagsKHR flags VkDeviceSize minBitstreamBufferOffsetAlignment VkDeviceSize minBitstreamBufferSizeAlignment VkExtent2D pictureAccessGranularity VkExtent2D minCodedExtent VkExtent2D maxCodedExtent uint32_t maxDpbSlots uint32_t maxActiveReferencePictures VkExtensionProperties stdHeaderVersion VkStructureType sType void* pNext uint32_t memoryBindIndex VkMemoryRequirements memoryRequirements VkStructureType sType const void* pNext uint32_t memoryBindIndex VkDeviceMemory memory VkDeviceSize memoryOffset VkDeviceSize memorySize VkStructureType sType const void* pNext VkOffset2D codedOffsetThe offset to be used for the picture resource, currently only used in field mode VkExtent2D codedExtentThe extent to be used for the picture resource uint32_t baseArrayLayerThe first array layer to be accessed for the Decode or Encode Operations VkImageView imageViewBindingThe ImageView binding of the resource VkStructureType sType const void* pNext int32_t slotIndexThe reference slot index const VkVideoPictureResourceInfoKHR* pPictureResourceThe reference picture resource VkStructureType sType void* pNext VkVideoDecodeCapabilityFlagsKHR flags VkStructureType sType const void* pNext VkVideoDecodeUsageFlagsKHR videoUsageHints VkStructureType sType const void* pNext VkVideoDecodeFlagsKHR flags VkBuffer srcBuffer VkDeviceSize srcBufferOffset VkDeviceSize srcBufferRange VkVideoPictureResourceInfoKHR dstPictureResource const VkVideoReferenceSlotInfoKHR* pSetupReferenceSlot uint32_t referenceSlotCount const VkVideoReferenceSlotInfoKHR* pReferenceSlots Video Decode Codec Standard specific structures #include "vk_video/vulkan_video_codec_h264std.h" #include "vk_video/vulkan_video_codec_h264std_decode.h" VkStructureType sType const void* pNext StdVideoH264ProfileIdc stdProfileIdc VkVideoDecodeH264PictureLayoutFlagBitsEXT pictureLayout VkStructureType sType void* pNext StdVideoH264LevelIdc maxLevelIdc VkOffset2D fieldOffsetGranularity VkStructureType sType const void* pNext uint32_t stdSPSCount const StdVideoH264SequenceParameterSet* pStdSPSs uint32_t stdPPSCount const StdVideoH264PictureParameterSet* pStdPPSsList of Picture Parameters associated with the spsStd, above VkStructureType sType const void* pNext uint32_t maxStdSPSCount uint32_t maxStdPPSCount const VkVideoDecodeH264SessionParametersAddInfoEXT* pParametersAddInfo VkStructureType sType const void* pNext const StdVideoDecodeH264PictureInfo* pStdPictureInfo uint32_t sliceCount const uint32_t* pSliceOffsets VkStructureType sType const void* pNext const StdVideoDecodeH264ReferenceInfo* pStdReferenceInfo #include "vk_video/vulkan_video_codec_h265std.h" #include "vk_video/vulkan_video_codec_h265std_decode.h" VkStructureType sType const void* pNext StdVideoH265ProfileIdc stdProfileIdc VkStructureType sType void* pNext StdVideoH265LevelIdc maxLevelIdc VkStructureType sType const void* pNext uint32_t stdVPSCount const StdVideoH265VideoParameterSet* pStdVPSs uint32_t stdSPSCount const StdVideoH265SequenceParameterSet* pStdSPSs uint32_t stdPPSCount const StdVideoH265PictureParameterSet* pStdPPSsList of Picture Parameters associated with the spsStd, above VkStructureType sType const void* pNext uint32_t maxStdVPSCount uint32_t maxStdSPSCount uint32_t maxStdPPSCount const VkVideoDecodeH265SessionParametersAddInfoEXT* pParametersAddInfo VkStructureType sType const void* pNext StdVideoDecodeH265PictureInfo* pStdPictureInfo uint32_t sliceCount const uint32_t* pSliceOffsets VkStructureType sType const void* pNext const StdVideoDecodeH265ReferenceInfo* pStdReferenceInfo VkStructureType sType const void* pNext uint32_t queueFamilyIndex VkVideoSessionCreateFlagsKHR flags const VkVideoProfileInfoKHR* pVideoProfile VkFormat pictureFormat VkExtent2D maxCodedExtent VkFormat referencePictureFormat uint32_t maxDpbSlots uint32_t maxActiveReferencePictures const VkExtensionProperties* pStdHeaderVersion VkStructureType sType const void* pNext VkVideoSessionParametersCreateFlagsKHR flags VkVideoSessionParametersKHR videoSessionParametersTemplate VkVideoSessionKHR videoSession VkStructureType sType const void* pNext uint32_t updateSequenceCount VkStructureType sType const void* pNext VkVideoBeginCodingFlagsKHR flags VkVideoSessionKHR videoSession VkVideoSessionParametersKHR videoSessionParameters uint32_t referenceSlotCount const VkVideoReferenceSlotInfoKHR* pReferenceSlots VkStructureType sType const void* pNext VkVideoEndCodingFlagsKHR flags VkStructureType sType const void* pNext VkVideoCodingControlFlagsKHR flags VkStructureType sType const void* pNext VkVideoEncodeUsageFlagsKHR videoUsageHints VkVideoEncodeContentFlagsKHR videoContentHints VkVideoEncodeTuningModeKHR tuningMode VkStructureType sType const void* pNext VkVideoEncodeFlagsKHR flags uint32_t qualityLevel VkBuffer dstBitstreamBuffer VkDeviceSize dstBitstreamBufferOffset VkDeviceSize dstBitstreamBufferMaxRange VkVideoPictureResourceInfoKHR srcPictureResource const VkVideoReferenceSlotInfoKHR* pSetupReferenceSlot uint32_t referenceSlotCount const VkVideoReferenceSlotInfoKHR* pReferenceSlots uint32_t precedingExternallyEncodedBytes VkStructureType sType const void* pNext VkVideoEncodeRateControlFlagsKHR flags VkVideoEncodeRateControlModeFlagBitsKHR rateControlMode uint8_t layerCount const VkVideoEncodeRateControlLayerInfoKHR* pLayerConfigs VkStructureType sType const void* pNext uint32_t averageBitrate uint32_t maxBitrate uint32_t frameRateNumerator uint32_t frameRateDenominator uint32_t virtualBufferSizeInMs uint32_t initialVirtualBufferSizeInMs VkStructureType sType void* pNext VkVideoEncodeCapabilityFlagsKHR flags VkVideoEncodeRateControlModeFlagsKHR rateControlModes uint8_t rateControlLayerCount uint8_t qualityLevelCount VkExtent2D inputImageDataFillAlignment VkStructureType sType void* pNext VkVideoEncodeH264CapabilityFlagsEXT flags VkVideoEncodeH264InputModeFlagsEXT inputModeFlags VkVideoEncodeH264OutputModeFlagsEXT outputModeFlags uint8_t maxPPictureL0ReferenceCount uint8_t maxBPictureL0ReferenceCount uint8_t maxL1ReferenceCount VkBool32 motionVectorsOverPicBoundariesFlag uint32_t maxBytesPerPicDenom uint32_t maxBitsPerMbDenom uint32_t log2MaxMvLengthHorizontal uint32_t log2MaxMvLengthVertical #include "vk_video/vulkan_video_codec_h264std_encode.h" VkStructureType sType const void* pNext uint32_t stdSPSCount const StdVideoH264SequenceParameterSet* pStdSPSs uint32_t stdPPSCount const StdVideoH264PictureParameterSet* pStdPPSsList of Picture Parameters associated with the spsStd, above VkStructureType sType const void* pNext uint32_t maxStdSPSCount uint32_t maxStdPPSCount const VkVideoEncodeH264SessionParametersAddInfoEXT* pParametersAddInfo VkStructureType sType const void* pNext int8_t slotIndex const StdVideoEncodeH264ReferenceInfo* pStdReferenceInfo VkStructureType sType const void* pNext const VkVideoEncodeH264ReferenceListsInfoEXT* pReferenceFinalLists uint32_t naluSliceEntryCount const VkVideoEncodeH264NaluSliceInfoEXT* pNaluSliceEntries const StdVideoEncodeH264PictureInfo* pCurrentPictureInfo VkStructureType sType const void* pNext uint8_t referenceList0EntryCount const VkVideoEncodeH264DpbSlotInfoEXT* pReferenceList0Entries uint8_t referenceList1EntryCount const VkVideoEncodeH264DpbSlotInfoEXT* pReferenceList1Entries const StdVideoEncodeH264RefMemMgmtCtrlOperations* pMemMgmtCtrlOperations VkStructureType sType const void* pNext uint8_t spsId VkBool32 emitSpsEnable uint32_t ppsIdEntryCount const uint8_t* ppsIdEntries VkStructureType sType const void* pNext StdVideoH264ProfileIdc stdProfileIdc VkStructureType sType const void* pNext uint32_t mbCount const VkVideoEncodeH264ReferenceListsInfoEXT* pReferenceFinalLists const StdVideoEncodeH264SliceHeader* pSliceHeaderStd VkStructureType sType const void* pNext uint32_t gopFrameCount uint32_t idrPeriod uint32_t consecutiveBFrameCount VkVideoEncodeH264RateControlStructureEXT rateControlStructure uint8_t temporalLayerCount int32_t qpI int32_t qpP int32_t qpB uint32_t frameISize uint32_t framePSize uint32_t frameBSize VkStructureType sType const void* pNext uint8_t temporalLayerId VkBool32 useInitialRcQp VkVideoEncodeH264QpEXT initialRcQp VkBool32 useMinQp VkVideoEncodeH264QpEXT minQp VkBool32 useMaxQp VkVideoEncodeH264QpEXT maxQp VkBool32 useMaxFrameSize VkVideoEncodeH264FrameSizeEXT maxFrameSize VkStructureType sType void* pNext VkVideoEncodeH265CapabilityFlagsEXT flags VkVideoEncodeH265InputModeFlagsEXT inputModeFlags VkVideoEncodeH265OutputModeFlagsEXT outputModeFlags VkVideoEncodeH265CtbSizeFlagsEXT ctbSizes VkVideoEncodeH265TransformBlockSizeFlagsEXT transformBlockSizes uint8_t maxPPictureL0ReferenceCount uint8_t maxBPictureL0ReferenceCount uint8_t maxL1ReferenceCount uint8_t maxSubLayersCount uint8_t minLog2MinLumaCodingBlockSizeMinus3 uint8_t maxLog2MinLumaCodingBlockSizeMinus3 uint8_t minLog2MinLumaTransformBlockSizeMinus2 uint8_t maxLog2MinLumaTransformBlockSizeMinus2 uint8_t minMaxTransformHierarchyDepthInter uint8_t maxMaxTransformHierarchyDepthInter uint8_t minMaxTransformHierarchyDepthIntra uint8_t maxMaxTransformHierarchyDepthIntra uint8_t maxDiffCuQpDeltaDepth uint8_t minMaxNumMergeCand uint8_t maxMaxNumMergeCand #include "vk_video/vulkan_video_codec_h265std_encode.h" VkStructureType sType const void* pNext uint32_t stdVPSCount const StdVideoH265VideoParameterSet* pStdVPSs uint32_t stdSPSCount const StdVideoH265SequenceParameterSet* pStdSPSs uint32_t stdPPSCount const StdVideoH265PictureParameterSet* pStdPPSsList of Picture Parameters associated with the spsStd, above VkStructureType sType const void* pNext uint32_t maxStdVPSCount uint32_t maxStdSPSCount uint32_t maxStdPPSCount const VkVideoEncodeH265SessionParametersAddInfoEXT* pParametersAddInfo VkStructureType sType const void* pNext const VkVideoEncodeH265ReferenceListsInfoEXT* pReferenceFinalLists uint32_t naluSliceSegmentEntryCount const VkVideoEncodeH265NaluSliceSegmentInfoEXT* pNaluSliceSegmentEntries const StdVideoEncodeH265PictureInfo* pCurrentPictureInfo VkStructureType sType const void* pNext uint8_t vpsId uint8_t spsId VkBool32 emitVpsEnable VkBool32 emitSpsEnable uint32_t ppsIdEntryCount const uint8_t* ppsIdEntries VkStructureType sType const void* pNext uint32_t ctbCount const VkVideoEncodeH265ReferenceListsInfoEXT* pReferenceFinalLists const StdVideoEncodeH265SliceSegmentHeader* pSliceSegmentHeaderStd VkStructureType sType const void* pNext uint32_t gopFrameCount uint32_t idrPeriod uint32_t consecutiveBFrameCount VkVideoEncodeH265RateControlStructureEXT rateControlStructure uint8_t subLayerCount int32_t qpI int32_t qpP int32_t qpB uint32_t frameISize uint32_t framePSize uint32_t frameBSize VkStructureType sType const void* pNext uint8_t temporalId VkBool32 useInitialRcQp VkVideoEncodeH265QpEXT initialRcQp VkBool32 useMinQp VkVideoEncodeH265QpEXT minQp VkBool32 useMaxQp VkVideoEncodeH265QpEXT maxQp VkBool32 useMaxFrameSize VkVideoEncodeH265FrameSizeEXT maxFrameSize VkStructureType sType const void* pNext StdVideoH265ProfileIdc stdProfileIdc VkStructureType sType const void* pNext int8_t slotIndex const StdVideoEncodeH265ReferenceInfo* pStdReferenceInfo VkStructureType sType const void* pNext uint8_t referenceList0EntryCount const VkVideoEncodeH265DpbSlotInfoEXT* pReferenceList0Entries uint8_t referenceList1EntryCount const VkVideoEncodeH265DpbSlotInfoEXT* pReferenceList1Entries const StdVideoEncodeH265ReferenceModifications* pReferenceModifications VkStructureType sType void* pNext VkBool32 inheritedViewportScissor2D VkStructureType sType const void* pNext VkBool32 viewportScissor2D uint32_t viewportDepthCount const VkViewport* pViewportDepths VkStructureType sType void* pNext VkBool32 ycbcr2plane444Formats VkStructureType sType void* pNext VkBool32 provokingVertexLast VkBool32 transformFeedbackPreservesProvokingVertex VkStructureType sType void* pNext VkBool32 provokingVertexModePerPipeline VkBool32 transformFeedbackPreservesTriangleFanProvokingVertex VkStructureType sType const void* pNext VkProvokingVertexModeEXT provokingVertexMode VkStructureType sType const void* pNext size_t dataSize const void* pData VkStructureType sType const void* pNext VkCuModuleNVX module const char* pName VkStructureType sType const void* pNext VkCuFunctionNVX function uint32_t gridDimX uint32_t gridDimY uint32_t gridDimZ uint32_t blockDimX uint32_t blockDimY uint32_t blockDimZ uint32_t sharedMemBytes size_t paramCount const void* const * pParams size_t extraCount const void* const * pExtras VkStructureType sType void* pNext VkBool32 shaderIntegerDotProduct VkStructureType sType void* pNext VkBool32 integerDotProduct8BitUnsignedAccelerated VkBool32 integerDotProduct8BitSignedAccelerated VkBool32 integerDotProduct8BitMixedSignednessAccelerated VkBool32 integerDotProduct4x8BitPackedUnsignedAccelerated VkBool32 integerDotProduct4x8BitPackedSignedAccelerated VkBool32 integerDotProduct4x8BitPackedMixedSignednessAccelerated VkBool32 integerDotProduct16BitUnsignedAccelerated VkBool32 integerDotProduct16BitSignedAccelerated VkBool32 integerDotProduct16BitMixedSignednessAccelerated VkBool32 integerDotProduct32BitUnsignedAccelerated VkBool32 integerDotProduct32BitSignedAccelerated VkBool32 integerDotProduct32BitMixedSignednessAccelerated VkBool32 integerDotProduct64BitUnsignedAccelerated VkBool32 integerDotProduct64BitSignedAccelerated VkBool32 integerDotProduct64BitMixedSignednessAccelerated VkBool32 integerDotProductAccumulatingSaturating8BitUnsignedAccelerated VkBool32 integerDotProductAccumulatingSaturating8BitSignedAccelerated VkBool32 integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated VkBool32 integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated VkBool32 integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated VkBool32 integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated VkBool32 integerDotProductAccumulatingSaturating16BitUnsignedAccelerated VkBool32 integerDotProductAccumulatingSaturating16BitSignedAccelerated VkBool32 integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated VkBool32 integerDotProductAccumulatingSaturating32BitUnsignedAccelerated VkBool32 integerDotProductAccumulatingSaturating32BitSignedAccelerated VkBool32 integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated VkBool32 integerDotProductAccumulatingSaturating64BitUnsignedAccelerated VkBool32 integerDotProductAccumulatingSaturating64BitSignedAccelerated VkBool32 integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated VkStructureType sType void* pNext VkBool32 hasPrimary VkBool32 hasRender int64_t primaryMajor int64_t primaryMinor int64_t renderMajor int64_t renderMinor VkStructureType sType void* pNext VkBool32 fragmentShaderBarycentric VkStructureType sType void* pNext VkBool32 triStripVertexOrderIndependentOfProvokingVertex VkStructureType sType void* pNext VkBool32 rayTracingMotionBlur VkBool32 rayTracingMotionBlurPipelineTraceRaysIndirect VkStructureType sType const void* pNext VkDeviceOrHostAddressConstKHR vertexData VkStructureType sType const void* pNext uint32_t maxInstances VkAccelerationStructureMotionInfoFlagsNV flags float sx float a float b float pvx float sy float c float pvy float sz float pvz float qx float qy float qz float qw float tx float ty float tz The bitfields in this structure are non-normative since bitfield ordering is implementation-defined in C. The specification defines the normative layout. VkSRTDataNV transformT0 VkSRTDataNV transformT1 uint32_t instanceCustomIndex:24 uint32_t mask:8 uint32_t instanceShaderBindingTableRecordOffset:24 VkGeometryInstanceFlagsKHR flags:8 uint64_t accelerationStructureReference The bitfields in this structure are non-normative since bitfield ordering is implementation-defined in C. The specification defines the normative layout. VkTransformMatrixKHR transformT0 VkTransformMatrixKHR transformT1 uint32_t instanceCustomIndex:24 uint32_t mask:8 uint32_t instanceShaderBindingTableRecordOffset:24 VkGeometryInstanceFlagsKHR flags:8 uint64_t accelerationStructureReference VkAccelerationStructureInstanceKHR staticInstance VkAccelerationStructureMatrixMotionInstanceNV matrixMotionInstance VkAccelerationStructureSRTMotionInstanceNV srtMotionInstance VkAccelerationStructureMotionInstanceTypeNV type VkAccelerationStructureMotionInstanceFlagsNV flags VkAccelerationStructureMotionInstanceDataNV data typedef void* VkRemoteAddressNV; VkStructureType sType const void* pNext VkDeviceMemory memory VkExternalMemoryHandleTypeFlagBits handleType VkStructureType sType const void* pNext VkBufferCollectionFUCHSIA collection uint32_t index VkStructureType sType const void* pNext VkBufferCollectionFUCHSIA collection uint32_t index VkStructureType sType const void* pNext VkBufferCollectionFUCHSIA collection uint32_t index VkStructureType sType const void* pNext zx_handle_t collectionToken VkStructureType sType void* pNext uint32_t memoryTypeBits uint32_t bufferCount uint32_t createInfoIndex uint64_t sysmemPixelFormat VkFormatFeatureFlags formatFeatures VkSysmemColorSpaceFUCHSIA sysmemColorSpaceIndex VkComponentMapping samplerYcbcrConversionComponents VkSamplerYcbcrModelConversion suggestedYcbcrModel VkSamplerYcbcrRange suggestedYcbcrRange VkChromaLocation suggestedXChromaOffset VkChromaLocation suggestedYChromaOffset VkStructureType sType const void* pNext VkBufferCreateInfo createInfo VkFormatFeatureFlags requiredFormatFeatures VkBufferCollectionConstraintsInfoFUCHSIA bufferCollectionConstraints VkStructureType sType const void* pNext uint32_t colorSpace VkStructureType sType const void* pNext VkImageCreateInfo imageCreateInfo VkFormatFeatureFlags requiredFormatFeatures VkImageFormatConstraintsFlagsFUCHSIA flags uint64_t sysmemPixelFormat uint32_t colorSpaceCount const VkSysmemColorSpaceFUCHSIA* pColorSpaces VkStructureType sType const void* pNext uint32_t formatConstraintsCount const VkImageFormatConstraintsInfoFUCHSIA* pFormatConstraints VkBufferCollectionConstraintsInfoFUCHSIA bufferCollectionConstraints VkImageConstraintsInfoFlagsFUCHSIA flags VkStructureType sType const void* pNext uint32_t minBufferCount uint32_t maxBufferCount uint32_t minBufferCountForCamping uint32_t minBufferCountForDedicatedSlack uint32_t minBufferCountForSharedSlack VkStructureType sType void* pNext VkBool32 formatRgba10x6WithoutYCbCrSampler VkStructureType sType void* pNext VkFormatFeatureFlags2 linearTilingFeatures VkFormatFeatureFlags2 optimalTilingFeatures VkFormatFeatureFlags2 bufferFeatures VkStructureType sType void* pNext uint32_t drmFormatModifierCount VkDrmFormatModifierProperties2EXT* pDrmFormatModifierProperties uint64_t drmFormatModifier uint32_t drmFormatModifierPlaneCount VkFormatFeatureFlags2 drmFormatModifierTilingFeatures VkStructureType sType void* pNext VkFormat format uint64_t externalFormat VkFormatFeatureFlags2 formatFeatures VkComponentMapping samplerYcbcrConversionComponents VkSamplerYcbcrModelConversion suggestedYcbcrModel VkSamplerYcbcrRange suggestedYcbcrRange VkChromaLocation suggestedXChromaOffset VkChromaLocation suggestedYChromaOffset VkStructureType sType const void* pNext uint32_t viewMask uint32_t colorAttachmentCount const VkFormat* pColorAttachmentFormats VkFormat depthAttachmentFormat VkFormat stencilAttachmentFormat VkStructureType sType const void* pNext VkRenderingFlags flags VkRect2D renderArea uint32_t layerCount uint32_t viewMask uint32_t colorAttachmentCount const VkRenderingAttachmentInfo* pColorAttachments const VkRenderingAttachmentInfo* pDepthAttachment const VkRenderingAttachmentInfo* pStencilAttachment VkStructureType sType const void* pNext VkImageView imageView VkImageLayout imageLayout VkResolveModeFlagBits resolveMode VkImageView resolveImageView VkImageLayout resolveImageLayout VkAttachmentLoadOp loadOp VkAttachmentStoreOp storeOp VkClearValue clearValue VkStructureType sType const void* pNext VkImageView imageView VkImageLayout imageLayout VkExtent2D shadingRateAttachmentTexelSize VkStructureType sType const void* pNext VkImageView imageView VkImageLayout imageLayout VkStructureType sType void* pNext VkBool32 dynamicRendering VkStructureType sType const void* pNext VkRenderingFlags flags uint32_t viewMask uint32_t colorAttachmentCount const VkFormat* pColorAttachmentFormats VkFormat depthAttachmentFormat VkFormat stencilAttachmentFormat VkSampleCountFlagBits rasterizationSamples VkStructureType sType const void* pNext uint32_t colorAttachmentCount const VkSampleCountFlagBits* pColorAttachmentSamples VkSampleCountFlagBits depthStencilAttachmentSamples VkStructureType sType const void* pNext VkBool32 perViewAttributes VkBool32 perViewAttributesPositionXOnly VkStructureType sType void* pNext VkBool32 minLod VkStructureType sType const void* pNext float minLod VkStructureType sType void* pNext VkBool32 rasterizationOrderColorAttachmentAccess VkBool32 rasterizationOrderDepthAttachmentAccess VkBool32 rasterizationOrderStencilAttachmentAccess VkStructureType sType void* pNext VkBool32 linearColorAttachment VkStructureType sType void* pNext VkBool32 graphicsPipelineLibrary VkStructureType sType void* pNext VkBool32 graphicsPipelineLibraryFastLinking VkBool32 graphicsPipelineLibraryIndependentInterpolationDecoration VkStructureType sType void* pNext VkGraphicsPipelineLibraryFlagsEXT flags VkStructureType sType void* pNext VkBool32 descriptorSetHostMapping VkStructureType sType const void* pNext VkDescriptorSetLayout descriptorSetLayout uint32_t binding VkStructureType sType void* pNext size_t descriptorOffset uint32_t descriptorSize VkStructureType sType void* pNext VkBool32 shaderModuleIdentifier VkStructureType sType void* pNext uint8_t shaderModuleIdentifierAlgorithmUUID[VK_UUID_SIZE] VkStructureType sType const void* pNext uint32_t identifierSize const uint8_t* pIdentifier VkStructureType sType void* pNext uint32_t identifierSize uint8_t identifier[VK_MAX_SHADER_MODULE_IDENTIFIER_SIZE_EXT] VkStructureType sType const void* pNext VkImageCompressionFlagsEXT flags uint32_t compressionControlPlaneCount VkImageCompressionFixedRateFlagsEXT* pFixedRateFlags VkStructureType sType void* pNext VkBool32 imageCompressionControl VkStructureType sType void* pNext VkImageCompressionFlagsEXT imageCompressionFlags VkImageCompressionFixedRateFlagsEXT imageCompressionFixedRateFlags VkStructureType sType void* pNext VkBool32 imageCompressionControlSwapchain VkStructureType sType void* pNext VkImageSubresource imageSubresource VkStructureType sType void* pNext VkSubresourceLayout subresourceLayout VkStructureType sType const void* pNext VkBool32 disallowMerging uint32_t postMergeSubpassCount VkStructureType sType const void* pNext VkRenderPassCreationFeedbackInfoEXT* pRenderPassFeedback VkSubpassMergeStatusEXT subpassMergeStatus char description[VK_MAX_DESCRIPTION_SIZE] uint32_t postMergeIndex VkStructureType sType const void* pNext VkRenderPassSubpassFeedbackInfoEXT* pSubpassFeedback VkStructureType sType void* pNext VkBool32 subpassMergeFeedback VkStructureType sType const void* pNext VkMicromapTypeEXT type VkBuildMicromapFlagsEXT flags VkBuildMicromapModeEXT mode VkMicromapEXT dstMicromap uint32_t usageCountsCount const VkMicromapUsageEXT* pUsageCounts const VkMicromapUsageEXT* const* ppUsageCounts VkDeviceOrHostAddressConstKHR data VkDeviceOrHostAddressKHR scratchData VkDeviceOrHostAddressConstKHR triangleArray VkDeviceSize triangleArrayStride VkStructureType sType const void* pNext VkMicromapCreateFlagsEXT createFlags VkBuffer buffer VkDeviceSize offsetSpecified in bytes VkDeviceSize size VkMicromapTypeEXT type VkDeviceAddress deviceAddress VkStructureType sType const void* pNext const uint8_t* pVersionData VkStructureType sType const void* pNext VkMicromapEXT src VkMicromapEXT dst VkCopyMicromapModeEXT mode VkStructureType sType const void* pNext VkMicromapEXT src VkDeviceOrHostAddressKHR dst VkCopyMicromapModeEXT mode VkStructureType sType const void* pNext VkDeviceOrHostAddressConstKHR src VkMicromapEXT dst VkCopyMicromapModeEXT mode VkStructureType sType const void* pNext VkDeviceSize micromapSize VkDeviceSize buildScratchSize VkBool32 discardable uint32_t count uint32_t subdivisionLevel uint32_t formatInterpretation depends on parent type uint32_t dataOffsetSpecified in bytes uint16_t subdivisionLevel uint16_t format VkStructureType sType void* pNext VkBool32 micromap VkBool32 micromapCaptureReplay VkBool32 micromapHostCommands VkStructureType sType void* pNext uint32_t maxOpacity2StateSubdivisionLevel uint32_t maxOpacity4StateSubdivisionLevel VkStructureType sType void* pNext VkIndexType indexType VkDeviceOrHostAddressConstKHR indexBuffer VkDeviceSize indexStride uint32_t baseTriangle uint32_t usageCountsCount const VkMicromapUsageEXT* pUsageCounts const VkMicromapUsageEXT* const* ppUsageCounts VkMicromapEXT micromap VkStructureType sType void* pNext uint8_t pipelineIdentifier[VK_UUID_SIZE] VkStructureType sType void* pNext VkBool32 pipelinePropertiesIdentifier VkStructureType sType void* pNext VkBool32 shaderEarlyAndLateFragmentTests VkStructureType sType const void* pNext VkExportMetalObjectTypeFlagBitsEXT exportObjectType VkStructureType sType const void* pNext VkStructureType sType const void* pNext MTLDevice_id mtlDevice VkStructureType sType const void* pNext VkQueue queue MTLCommandQueue_id mtlCommandQueue VkStructureType sType const void* pNext VkDeviceMemory memory MTLBuffer_id mtlBuffer VkStructureType sType const void* pNext MTLBuffer_id mtlBuffer VkStructureType sType const void* pNext VkImage image VkImageView imageView VkBufferView bufferView VkImageAspectFlagBits plane MTLTexture_id mtlTexture VkStructureType sType const void* pNext VkImageAspectFlagBits plane MTLTexture_id mtlTexture VkStructureType sType const void* pNext VkImage image IOSurfaceRef ioSurface VkStructureType sType const void* pNext IOSurfaceRef ioSurface VkStructureType sType const void* pNext VkSemaphore semaphore VkEvent event MTLSharedEvent_id mtlSharedEvent VkStructureType sType const void* pNext MTLSharedEvent_id mtlSharedEvent VkStructureType sType void* pNext VkBool32 nonSeamlessCubeMap VkStructureType sType void* pNext VkBool32 pipelineRobustness VkStructureType sType const void* pNext VkPipelineRobustnessBufferBehaviorEXT storageBuffers VkPipelineRobustnessBufferBehaviorEXT uniformBuffers VkPipelineRobustnessBufferBehaviorEXT vertexInputs VkPipelineRobustnessImageBehaviorEXT images VkStructureType sType void* pNext VkPipelineRobustnessBufferBehaviorEXT defaultRobustnessStorageBuffers VkPipelineRobustnessBufferBehaviorEXT defaultRobustnessUniformBuffers VkPipelineRobustnessBufferBehaviorEXT defaultRobustnessVertexInputs VkPipelineRobustnessImageBehaviorEXT defaultRobustnessImages VkStructureType sType const void* pNext VkOffset2D filterCenter VkExtent2D filterSize uint32_t numPhases VkStructureType sType void* pNext VkBool32 textureSampleWeighted VkBool32 textureBoxFilter VkBool32 textureBlockMatch VkStructureType sType void* pNext uint32_t maxWeightFilterPhases VkExtent2D maxWeightFilterDimension VkExtent2D maxBlockMatchRegion VkExtent2D maxBoxFilterBlockSize VkStructureType sType void* pNext VkBool32 tileProperties VkStructureType sType void* pNext VkExtent3D tileSize VkExtent2D apronSize VkOffset2D origin VkStructureType sType void* pNext VkBool32 amigoProfiling VkStructureType sType const void* pNext uint64_t firstDrawTimestamp uint64_t swapBufferTimestamp VkStructureType sType void* pNext VkBool32 attachmentFeedbackLoopLayout VkStructureType sType void* pNext VkBool32 depthClampZeroOne VkStructureType sType void* pNext VkBool32 reportAddressBinding VkStructureType sType void* pNext VkDeviceAddressBindingFlagsEXT flags VkDeviceAddress baseAddress VkDeviceSize size VkDeviceAddressBindingTypeEXT bindingType VkStructureType sType void* pNext VkBool32 opticalFlow VkStructureType sType void* pNext VkOpticalFlowGridSizeFlagsNV supportedOutputGridSizes VkOpticalFlowGridSizeFlagsNV supportedHintGridSizes VkBool32 hintSupported VkBool32 costSupported VkBool32 bidirectionalFlowSupported VkBool32 globalFlowSupported uint32_t minWidth uint32_t minHeight uint32_t maxWidth uint32_t maxHeight uint32_t maxNumRegionsOfInterest VkStructureType sType const void* pNext VkOpticalFlowUsageFlagsNV usage VkStructureType sType const void* pNext VkFormat format VkStructureType sType void* pNext uint32_t width uint32_t height VkFormat imageFormat VkFormat flowVectorFormat VkFormat costFormat VkOpticalFlowGridSizeFlagsNV outputGridSize VkOpticalFlowGridSizeFlagsNV hintGridSize VkOpticalFlowPerformanceLevelNV performanceLevel VkOpticalFlowSessionCreateFlagsNV flags NV internal use only VkStructureType sType void* pNext uint32_t id uint32_t size const void* pPrivateData VkStructureType sType void* pNext VkOpticalFlowExecuteFlagsNV flags uint32_t regionCount const VkRect2D* pRegions VkStructureType sType void* pNext VkBool32 deviceFault VkBool32 deviceFaultVendorBinary VkDeviceFaultAddressTypeEXT addressType VkDeviceAddress reportedAddress VkDeviceSize addressPrecision char description[VK_MAX_DESCRIPTION_SIZE]Free-form description of the fault uint64_t vendorFaultCode uint64_t vendorFaultData VkStructureType sType void* pNext uint32_t addressInfoCount uint32_t vendorInfoCount VkDeviceSize vendorBinarySizeSpecified in bytes VkStructureType sType void* pNext char description[VK_MAX_DESCRIPTION_SIZE]Free-form description of the fault VkDeviceFaultAddressInfoEXT* pAddressInfos VkDeviceFaultVendorInfoEXT* pVendorInfos void* pVendorBinaryData The fields in this structure are non-normative since structure packing is implementation-defined in C. The specification defines the normative layout. uint32_t headerSize VkDeviceFaultVendorBinaryHeaderVersionEXT headerVersion uint32_t vendorID uint32_t deviceID uint32_t driverVersion uint8_t pipelineCacheUUID[VK_UUID_SIZE] uint32_t applicationNameOffset uint32_t applicationVersion uint32_t engineNameOffset VkStructureType sType void* pNext uint32_t shaderCoreCount uint32_t shaderWarpsPerCore VkStructureType sType void* pNext VkBool32 shaderCoreBuiltins Vulkan enumerant (token) definitions Unlike OpenGL, most tokens in Vulkan are actual typed enumerants in their own numeric namespaces. The "name" attribute is the C enum type name, and is pulled in from a type tag definition above (slightly clunky, but retains the type / enum distinction). "type" attributes of "enum" or "bitmask" indicate that these values should be generated inside an appropriate definition. value="4" reserved for VK_KHR_sampler_mirror_clamp_to_edge enum VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE; do not alias! Return codes (positive values) Error codes (negative values) Flags WSI Extensions NVX_device_generated_commands formerly used these enum values, but that extension has been removed value 31 / name VK_DEBUG_REPORT_OBJECT_TYPE_OBJECT_TABLE_NVX_EXT value 32 / name VK_DEBUG_REPORT_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NVX_EXT Vendor IDs are now represented as enums instead of the old <vendorids> tag, allowing them to be included in the API headers. Driver IDs are now represented as enums instead of the old <driverids> tag, allowing them to be included in the API headers. bitpos 17-31 are specified by extensions to the original VkAccessFlagBits enum bitpos 17-31 are specified by extensions to the original VkPipelineStageFlagBits enum VkResult vkCreateInstance const VkInstanceCreateInfo* pCreateInfo const VkAllocationCallbacks* pAllocator VkInstance* pInstance void vkDestroyInstance VkInstance instance const VkAllocationCallbacks* pAllocator all sname:VkPhysicalDevice objects enumerated from pname:instance VkResult vkEnumeratePhysicalDevices VkInstance instance uint32_t* pPhysicalDeviceCount VkPhysicalDevice* pPhysicalDevices PFN_vkVoidFunction vkGetDeviceProcAddr VkDevice device const char* pName PFN_vkVoidFunction vkGetInstanceProcAddr VkInstance instance const char* pName void vkGetPhysicalDeviceProperties VkPhysicalDevice physicalDevice VkPhysicalDeviceProperties* pProperties void vkGetPhysicalDeviceQueueFamilyProperties VkPhysicalDevice physicalDevice uint32_t* pQueueFamilyPropertyCount VkQueueFamilyProperties* pQueueFamilyProperties void vkGetPhysicalDeviceMemoryProperties VkPhysicalDevice physicalDevice VkPhysicalDeviceMemoryProperties* pMemoryProperties void vkGetPhysicalDeviceFeatures VkPhysicalDevice physicalDevice VkPhysicalDeviceFeatures* pFeatures void vkGetPhysicalDeviceFormatProperties VkPhysicalDevice physicalDevice VkFormat format VkFormatProperties* pFormatProperties VkResult vkGetPhysicalDeviceImageFormatProperties VkPhysicalDevice physicalDevice VkFormat format VkImageType type VkImageTiling tiling VkImageUsageFlags usage VkImageCreateFlags flags VkImageFormatProperties* pImageFormatProperties VkResult vkCreateDevice VkPhysicalDevice physicalDevice const VkDeviceCreateInfo* pCreateInfo const VkAllocationCallbacks* pAllocator VkDevice* pDevice void vkDestroyDevice VkDevice device const VkAllocationCallbacks* pAllocator all sname:VkQueue objects created from pname:device VkResult vkEnumerateInstanceVersion uint32_t* pApiVersion VkResult vkEnumerateInstanceLayerProperties uint32_t* pPropertyCount VkLayerProperties* pProperties VkResult vkEnumerateInstanceExtensionProperties const char* pLayerName uint32_t* pPropertyCount VkExtensionProperties* pProperties VkResult vkEnumerateDeviceLayerProperties VkPhysicalDevice physicalDevice uint32_t* pPropertyCount VkLayerProperties* pProperties VkResult vkEnumerateDeviceExtensionProperties VkPhysicalDevice physicalDevice const char* pLayerName uint32_t* pPropertyCount VkExtensionProperties* pProperties void vkGetDeviceQueue VkDevice device uint32_t queueFamilyIndex uint32_t queueIndex VkQueue* pQueue VkResult vkQueueSubmit VkQueue queue uint32_t submitCount const VkSubmitInfo* pSubmits VkFence fence VkResult vkQueueWaitIdle VkQueue queue VkResult vkDeviceWaitIdle VkDevice device all sname:VkQueue objects created from pname:device VkResult vkAllocateMemory VkDevice device const VkMemoryAllocateInfo* pAllocateInfo const VkAllocationCallbacks* pAllocator VkDeviceMemory* pMemory void vkFreeMemory VkDevice device VkDeviceMemory memory const VkAllocationCallbacks* pAllocator VkResult vkMapMemory VkDevice device VkDeviceMemory memory VkDeviceSize offset VkDeviceSize size VkMemoryMapFlags flags void** ppData void vkUnmapMemory VkDevice device VkDeviceMemory memory VkResult vkFlushMappedMemoryRanges VkDevice device uint32_t memoryRangeCount const VkMappedMemoryRange* pMemoryRanges VkResult vkInvalidateMappedMemoryRanges VkDevice device uint32_t memoryRangeCount const VkMappedMemoryRange* pMemoryRanges void vkGetDeviceMemoryCommitment VkDevice device VkDeviceMemory memory VkDeviceSize* pCommittedMemoryInBytes void vkGetBufferMemoryRequirements VkDevice device VkBuffer buffer VkMemoryRequirements* pMemoryRequirements VkResult vkBindBufferMemory VkDevice device VkBuffer buffer VkDeviceMemory memory VkDeviceSize memoryOffset void vkGetImageMemoryRequirements VkDevice device VkImage image VkMemoryRequirements* pMemoryRequirements VkResult vkBindImageMemory VkDevice device VkImage image VkDeviceMemory memory VkDeviceSize memoryOffset void vkGetImageSparseMemoryRequirements VkDevice device VkImage image uint32_t* pSparseMemoryRequirementCount VkSparseImageMemoryRequirements* pSparseMemoryRequirements void vkGetPhysicalDeviceSparseImageFormatProperties VkPhysicalDevice physicalDevice VkFormat format VkImageType type VkSampleCountFlagBits samples VkImageUsageFlags usage VkImageTiling tiling uint32_t* pPropertyCount VkSparseImageFormatProperties* pProperties VkResult vkQueueBindSparse VkQueue queue uint32_t bindInfoCount const VkBindSparseInfo* pBindInfo VkFence fence VkResult vkCreateFence VkDevice device const VkFenceCreateInfo* pCreateInfo const VkAllocationCallbacks* pAllocator VkFence* pFence void vkDestroyFence VkDevice device VkFence fence const VkAllocationCallbacks* pAllocator VkResult vkResetFences VkDevice device uint32_t fenceCount const VkFence* pFences VkResult vkGetFenceStatus VkDevice device VkFence fence VkResult vkWaitForFences VkDevice device uint32_t fenceCount const VkFence* pFences VkBool32 waitAll uint64_t timeout VkResult vkCreateSemaphore VkDevice device const VkSemaphoreCreateInfo* pCreateInfo const VkAllocationCallbacks* pAllocator VkSemaphore* pSemaphore void vkDestroySemaphore VkDevice device VkSemaphore semaphore const VkAllocationCallbacks* pAllocator VkResult vkCreateEvent VkDevice device const VkEventCreateInfo* pCreateInfo const VkAllocationCallbacks* pAllocator VkEvent* pEvent void vkDestroyEvent VkDevice device VkEvent event const VkAllocationCallbacks* pAllocator VkResult vkGetEventStatus VkDevice device VkEvent event VkResult vkSetEvent VkDevice device VkEvent event VkResult vkResetEvent VkDevice device VkEvent event VkResult vkCreateQueryPool VkDevice device const VkQueryPoolCreateInfo* pCreateInfo const VkAllocationCallbacks* pAllocator VkQueryPool* pQueryPool void vkDestroyQueryPool VkDevice device VkQueryPool queryPool const VkAllocationCallbacks* pAllocator VkResult vkGetQueryPoolResults VkDevice device VkQueryPool queryPool uint32_t firstQuery uint32_t queryCount size_t dataSize void* pData VkDeviceSize stride VkQueryResultFlags flags void vkResetQueryPool VkDevice device VkQueryPool queryPool uint32_t firstQuery uint32_t queryCount VkResult vkCreateBuffer VkDevice device const VkBufferCreateInfo* pCreateInfo const VkAllocationCallbacks* pAllocator VkBuffer* pBuffer void vkDestroyBuffer VkDevice device VkBuffer buffer const VkAllocationCallbacks* pAllocator VkResult vkCreateBufferView VkDevice device const VkBufferViewCreateInfo* pCreateInfo const VkAllocationCallbacks* pAllocator VkBufferView* pView void vkDestroyBufferView VkDevice device VkBufferView bufferView const VkAllocationCallbacks* pAllocator VkResult vkCreateImage VkDevice device const VkImageCreateInfo* pCreateInfo const VkAllocationCallbacks* pAllocator VkImage* pImage void vkDestroyImage VkDevice device VkImage image const VkAllocationCallbacks* pAllocator void vkGetImageSubresourceLayout VkDevice device VkImage image const VkImageSubresource* pSubresource VkSubresourceLayout* pLayout VkResult vkCreateImageView VkDevice device const VkImageViewCreateInfo* pCreateInfo const VkAllocationCallbacks* pAllocator VkImageView* pView void vkDestroyImageView VkDevice device VkImageView imageView const VkAllocationCallbacks* pAllocator VkResult vkCreateShaderModule VkDevice device const VkShaderModuleCreateInfo* pCreateInfo const VkAllocationCallbacks* pAllocator VkShaderModule* pShaderModule void vkDestroyShaderModule VkDevice device VkShaderModule shaderModule const VkAllocationCallbacks* pAllocator VkResult vkCreatePipelineCache VkDevice device const VkPipelineCacheCreateInfo* pCreateInfo const VkAllocationCallbacks* pAllocator VkPipelineCache* pPipelineCache void vkDestroyPipelineCache VkDevice device VkPipelineCache pipelineCache const VkAllocationCallbacks* pAllocator VkResult vkGetPipelineCacheData VkDevice device VkPipelineCache pipelineCache size_t* pDataSize void* pData VkResult vkMergePipelineCaches VkDevice device VkPipelineCache dstCache uint32_t srcCacheCount const VkPipelineCache* pSrcCaches VkResult vkCreateGraphicsPipelines VkDevice device VkPipelineCache pipelineCache uint32_t createInfoCount const VkGraphicsPipelineCreateInfo* pCreateInfos const VkAllocationCallbacks* pAllocator VkPipeline* pPipelines VkResult vkCreateComputePipelines VkDevice device VkPipelineCache pipelineCache uint32_t createInfoCount const VkComputePipelineCreateInfo* pCreateInfos const VkAllocationCallbacks* pAllocator VkPipeline* pPipelines VkResult vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI VkDevice device VkRenderPass renderpass VkExtent2D* pMaxWorkgroupSize void vkDestroyPipeline VkDevice device VkPipeline pipeline const VkAllocationCallbacks* pAllocator VkResult vkCreatePipelineLayout VkDevice device const VkPipelineLayoutCreateInfo* pCreateInfo const VkAllocationCallbacks* pAllocator VkPipelineLayout* pPipelineLayout void vkDestroyPipelineLayout VkDevice device VkPipelineLayout pipelineLayout const VkAllocationCallbacks* pAllocator VkResult vkCreateSampler VkDevice device const VkSamplerCreateInfo* pCreateInfo const VkAllocationCallbacks* pAllocator VkSampler* pSampler void vkDestroySampler VkDevice device VkSampler sampler const VkAllocationCallbacks* pAllocator VkResult vkCreateDescriptorSetLayout VkDevice device const VkDescriptorSetLayoutCreateInfo* pCreateInfo const VkAllocationCallbacks* pAllocator VkDescriptorSetLayout* pSetLayout void vkDestroyDescriptorSetLayout VkDevice device VkDescriptorSetLayout descriptorSetLayout const VkAllocationCallbacks* pAllocator VkResult vkCreateDescriptorPool VkDevice device const VkDescriptorPoolCreateInfo* pCreateInfo const VkAllocationCallbacks* pAllocator VkDescriptorPool* pDescriptorPool void vkDestroyDescriptorPool VkDevice device VkDescriptorPool descriptorPool const VkAllocationCallbacks* pAllocator VkResult vkResetDescriptorPool VkDevice device VkDescriptorPool descriptorPool VkDescriptorPoolResetFlags flags any sname:VkDescriptorSet objects allocated from pname:descriptorPool VkResult vkAllocateDescriptorSets VkDevice device const VkDescriptorSetAllocateInfo* pAllocateInfo VkDescriptorSet* pDescriptorSets VkResult vkFreeDescriptorSets VkDevice device VkDescriptorPool descriptorPool uint32_t descriptorSetCount const VkDescriptorSet* pDescriptorSets void vkUpdateDescriptorSets VkDevice device uint32_t descriptorWriteCount const VkWriteDescriptorSet* pDescriptorWrites uint32_t descriptorCopyCount const VkCopyDescriptorSet* pDescriptorCopies VkResult vkCreateFramebuffer VkDevice device const VkFramebufferCreateInfo* pCreateInfo const VkAllocationCallbacks* pAllocator VkFramebuffer* pFramebuffer void vkDestroyFramebuffer VkDevice device VkFramebuffer framebuffer const VkAllocationCallbacks* pAllocator VkResult vkCreateRenderPass VkDevice device const VkRenderPassCreateInfo* pCreateInfo const VkAllocationCallbacks* pAllocator VkRenderPass* pRenderPass void vkDestroyRenderPass VkDevice device VkRenderPass renderPass const VkAllocationCallbacks* pAllocator void vkGetRenderAreaGranularity VkDevice device VkRenderPass renderPass VkExtent2D* pGranularity VkResult vkCreateCommandPool VkDevice device const VkCommandPoolCreateInfo* pCreateInfo const VkAllocationCallbacks* pAllocator VkCommandPool* pCommandPool void vkDestroyCommandPool VkDevice device VkCommandPool commandPool const VkAllocationCallbacks* pAllocator VkResult vkResetCommandPool VkDevice device VkCommandPool commandPool VkCommandPoolResetFlags flags VkResult vkAllocateCommandBuffers VkDevice device const VkCommandBufferAllocateInfo* pAllocateInfo VkCommandBuffer* pCommandBuffers void vkFreeCommandBuffers VkDevice device VkCommandPool commandPool uint32_t commandBufferCount const VkCommandBuffer* pCommandBuffers VkResult vkBeginCommandBuffer VkCommandBuffer commandBuffer const VkCommandBufferBeginInfo* pBeginInfo the sname:VkCommandPool that pname:commandBuffer was allocated from VkResult vkEndCommandBuffer VkCommandBuffer commandBuffer the sname:VkCommandPool that pname:commandBuffer was allocated from VkResult vkResetCommandBuffer VkCommandBuffer commandBuffer VkCommandBufferResetFlags flags the sname:VkCommandPool that pname:commandBuffer was allocated from void vkCmdBindPipeline VkCommandBuffer commandBuffer VkPipelineBindPoint pipelineBindPoint VkPipeline pipeline void vkCmdSetViewport VkCommandBuffer commandBuffer uint32_t firstViewport uint32_t viewportCount const VkViewport* pViewports void vkCmdSetScissor VkCommandBuffer commandBuffer uint32_t firstScissor uint32_t scissorCount const VkRect2D* pScissors void vkCmdSetLineWidth VkCommandBuffer commandBuffer float lineWidth void vkCmdSetDepthBias VkCommandBuffer commandBuffer float depthBiasConstantFactor float depthBiasClamp float depthBiasSlopeFactor void vkCmdSetBlendConstants VkCommandBuffer commandBuffer const float blendConstants[4] void vkCmdSetDepthBounds VkCommandBuffer commandBuffer float minDepthBounds float maxDepthBounds void vkCmdSetStencilCompareMask VkCommandBuffer commandBuffer VkStencilFaceFlags faceMask uint32_t compareMask void vkCmdSetStencilWriteMask VkCommandBuffer commandBuffer VkStencilFaceFlags faceMask uint32_t writeMask void vkCmdSetStencilReference VkCommandBuffer commandBuffer VkStencilFaceFlags faceMask uint32_t reference void vkCmdBindDescriptorSets VkCommandBuffer commandBuffer VkPipelineBindPoint pipelineBindPoint VkPipelineLayout layout uint32_t firstSet uint32_t descriptorSetCount const VkDescriptorSet* pDescriptorSets uint32_t dynamicOffsetCount const uint32_t* pDynamicOffsets void vkCmdBindIndexBuffer VkCommandBuffer commandBuffer VkBuffer buffer VkDeviceSize offset VkIndexType indexType void vkCmdBindVertexBuffers VkCommandBuffer commandBuffer uint32_t firstBinding uint32_t bindingCount const VkBuffer* pBuffers const VkDeviceSize* pOffsets void vkCmdDraw VkCommandBuffer commandBuffer uint32_t vertexCount uint32_t instanceCount uint32_t firstVertex uint32_t firstInstance void vkCmdDrawIndexed VkCommandBuffer commandBuffer uint32_t indexCount uint32_t instanceCount uint32_t firstIndex int32_t vertexOffset uint32_t firstInstance void vkCmdDrawMultiEXT VkCommandBuffer commandBuffer uint32_t drawCount const VkMultiDrawInfoEXT* pVertexInfo uint32_t instanceCount uint32_t firstInstance uint32_t stride void vkCmdDrawMultiIndexedEXT VkCommandBuffer commandBuffer uint32_t drawCount const VkMultiDrawIndexedInfoEXT* pIndexInfo uint32_t instanceCount uint32_t firstInstance uint32_t stride const int32_t* pVertexOffset void vkCmdDrawIndirect VkCommandBuffer commandBuffer VkBuffer buffer VkDeviceSize offset uint32_t drawCount uint32_t stride void vkCmdDrawIndexedIndirect VkCommandBuffer commandBuffer VkBuffer buffer VkDeviceSize offset uint32_t drawCount uint32_t stride void vkCmdDispatch VkCommandBuffer commandBuffer uint32_t groupCountX uint32_t groupCountY uint32_t groupCountZ void vkCmdDispatchIndirect VkCommandBuffer commandBuffer VkBuffer buffer VkDeviceSize offset void vkCmdSubpassShadingHUAWEI VkCommandBuffer commandBuffer void vkCmdCopyBuffer VkCommandBuffer commandBuffer VkBuffer srcBuffer VkBuffer dstBuffer uint32_t regionCount const VkBufferCopy* pRegions void vkCmdCopyImage VkCommandBuffer commandBuffer VkImage srcImage VkImageLayout srcImageLayout VkImage dstImage VkImageLayout dstImageLayout uint32_t regionCount const VkImageCopy* pRegions void vkCmdBlitImage VkCommandBuffer commandBuffer VkImage srcImage VkImageLayout srcImageLayout VkImage dstImage VkImageLayout dstImageLayout uint32_t regionCount const VkImageBlit* pRegions VkFilter filter void vkCmdCopyBufferToImage VkCommandBuffer commandBuffer VkBuffer srcBuffer VkImage dstImage VkImageLayout dstImageLayout uint32_t regionCount const VkBufferImageCopy* pRegions void vkCmdCopyImageToBuffer VkCommandBuffer commandBuffer VkImage srcImage VkImageLayout srcImageLayout VkBuffer dstBuffer uint32_t regionCount const VkBufferImageCopy* pRegions void vkCmdUpdateBuffer VkCommandBuffer commandBuffer VkBuffer dstBuffer VkDeviceSize dstOffset VkDeviceSize dataSize const void* pData void vkCmdFillBuffer VkCommandBuffer commandBuffer VkBuffer dstBuffer VkDeviceSize dstOffset VkDeviceSize size uint32_t data void vkCmdClearColorImage VkCommandBuffer commandBuffer VkImage image VkImageLayout imageLayout const VkClearColorValue* pColor uint32_t rangeCount const VkImageSubresourceRange* pRanges void vkCmdClearDepthStencilImage VkCommandBuffer commandBuffer VkImage image VkImageLayout imageLayout const VkClearDepthStencilValue* pDepthStencil uint32_t rangeCount const VkImageSubresourceRange* pRanges void vkCmdClearAttachments VkCommandBuffer commandBuffer uint32_t attachmentCount const VkClearAttachment* pAttachments uint32_t rectCount const VkClearRect* pRects void vkCmdResolveImage VkCommandBuffer commandBuffer VkImage srcImage VkImageLayout srcImageLayout VkImage dstImage VkImageLayout dstImageLayout uint32_t regionCount const VkImageResolve* pRegions void vkCmdSetEvent VkCommandBuffer commandBuffer VkEvent event VkPipelineStageFlags stageMask void vkCmdResetEvent VkCommandBuffer commandBuffer VkEvent event VkPipelineStageFlags stageMask void vkCmdWaitEvents VkCommandBuffer commandBuffer uint32_t eventCount const VkEvent* pEvents VkPipelineStageFlags srcStageMask VkPipelineStageFlags dstStageMask uint32_t memoryBarrierCount const VkMemoryBarrier* pMemoryBarriers uint32_t bufferMemoryBarrierCount const VkBufferMemoryBarrier* pBufferMemoryBarriers uint32_t imageMemoryBarrierCount const VkImageMemoryBarrier* pImageMemoryBarriers void vkCmdPipelineBarrier VkCommandBuffer commandBuffer VkPipelineStageFlags srcStageMask VkPipelineStageFlags dstStageMask VkDependencyFlags dependencyFlags uint32_t memoryBarrierCount const VkMemoryBarrier* pMemoryBarriers uint32_t bufferMemoryBarrierCount const VkBufferMemoryBarrier* pBufferMemoryBarriers uint32_t imageMemoryBarrierCount const VkImageMemoryBarrier* pImageMemoryBarriers void vkCmdBeginQuery VkCommandBuffer commandBuffer VkQueryPool queryPool uint32_t query VkQueryControlFlags flags void vkCmdEndQuery VkCommandBuffer commandBuffer VkQueryPool queryPool uint32_t query void vkCmdBeginConditionalRenderingEXT VkCommandBuffer commandBuffer const VkConditionalRenderingBeginInfoEXT* pConditionalRenderingBegin void vkCmdEndConditionalRenderingEXT VkCommandBuffer commandBuffer void vkCmdResetQueryPool VkCommandBuffer commandBuffer VkQueryPool queryPool uint32_t firstQuery uint32_t queryCount void vkCmdWriteTimestamp VkCommandBuffer commandBuffer VkPipelineStageFlagBits pipelineStage VkQueryPool queryPool uint32_t query void vkCmdCopyQueryPoolResults VkCommandBuffer commandBuffer VkQueryPool queryPool uint32_t firstQuery uint32_t queryCount VkBuffer dstBuffer VkDeviceSize dstOffset VkDeviceSize stride VkQueryResultFlags flags void vkCmdPushConstants VkCommandBuffer commandBuffer VkPipelineLayout layout VkShaderStageFlags stageFlags uint32_t offset uint32_t size const void* pValues void vkCmdBeginRenderPass VkCommandBuffer commandBuffer const VkRenderPassBeginInfo* pRenderPassBegin VkSubpassContents contents void vkCmdNextSubpass VkCommandBuffer commandBuffer VkSubpassContents contents void vkCmdEndRenderPass VkCommandBuffer commandBuffer void vkCmdExecuteCommands VkCommandBuffer commandBuffer uint32_t commandBufferCount const VkCommandBuffer* pCommandBuffers VkResult vkCreateAndroidSurfaceKHR VkInstance instance const VkAndroidSurfaceCreateInfoKHR* pCreateInfo const VkAllocationCallbacks* pAllocator VkSurfaceKHR* pSurface VkResult vkGetPhysicalDeviceDisplayPropertiesKHR VkPhysicalDevice physicalDevice uint32_t* pPropertyCount VkDisplayPropertiesKHR* pProperties VkResult vkGetPhysicalDeviceDisplayPlanePropertiesKHR VkPhysicalDevice physicalDevice uint32_t* pPropertyCount VkDisplayPlanePropertiesKHR* pProperties VkResult vkGetDisplayPlaneSupportedDisplaysKHR VkPhysicalDevice physicalDevice uint32_t planeIndex uint32_t* pDisplayCount VkDisplayKHR* pDisplays VkResult vkGetDisplayModePropertiesKHR VkPhysicalDevice physicalDevice VkDisplayKHR display uint32_t* pPropertyCount VkDisplayModePropertiesKHR* pProperties VkResult vkCreateDisplayModeKHR VkPhysicalDevice physicalDevice VkDisplayKHR display const VkDisplayModeCreateInfoKHR* pCreateInfo const VkAllocationCallbacks* pAllocator VkDisplayModeKHR* pMode VkResult vkGetDisplayPlaneCapabilitiesKHR VkPhysicalDevice physicalDevice VkDisplayModeKHR mode uint32_t planeIndex VkDisplayPlaneCapabilitiesKHR* pCapabilities VkResult vkCreateDisplayPlaneSurfaceKHR VkInstance instance const VkDisplaySurfaceCreateInfoKHR* pCreateInfo const VkAllocationCallbacks* pAllocator VkSurfaceKHR* pSurface VkResult vkCreateSharedSwapchainsKHR VkDevice device uint32_t swapchainCount const VkSwapchainCreateInfoKHR* pCreateInfos const VkAllocationCallbacks* pAllocator VkSwapchainKHR* pSwapchains void vkDestroySurfaceKHR VkInstance instance VkSurfaceKHR surface const VkAllocationCallbacks* pAllocator VkResult vkGetPhysicalDeviceSurfaceSupportKHR VkPhysicalDevice physicalDevice uint32_t queueFamilyIndex VkSurfaceKHR surface VkBool32* pSupported VkResult vkGetPhysicalDeviceSurfaceCapabilitiesKHR VkPhysicalDevice physicalDevice VkSurfaceKHR surface VkSurfaceCapabilitiesKHR* pSurfaceCapabilities VkResult vkGetPhysicalDeviceSurfaceFormatsKHR VkPhysicalDevice physicalDevice VkSurfaceKHR surface uint32_t* pSurfaceFormatCount VkSurfaceFormatKHR* pSurfaceFormats VkResult vkGetPhysicalDeviceSurfacePresentModesKHR VkPhysicalDevice physicalDevice VkSurfaceKHR surface uint32_t* pPresentModeCount VkPresentModeKHR* pPresentModes VkResult vkCreateSwapchainKHR VkDevice device const VkSwapchainCreateInfoKHR* pCreateInfo const VkAllocationCallbacks* pAllocator VkSwapchainKHR* pSwapchain void vkDestroySwapchainKHR VkDevice device VkSwapchainKHR swapchain const VkAllocationCallbacks* pAllocator VkResult vkGetSwapchainImagesKHR VkDevice device VkSwapchainKHR swapchain uint32_t* pSwapchainImageCount VkImage* pSwapchainImages VkResult vkAcquireNextImageKHR VkDevice device VkSwapchainKHR swapchain uint64_t timeout VkSemaphore semaphore VkFence fence uint32_t* pImageIndex VkResult vkQueuePresentKHR VkQueue queue const VkPresentInfoKHR* pPresentInfo VkResult vkCreateViSurfaceNN VkInstance instance const VkViSurfaceCreateInfoNN* pCreateInfo const VkAllocationCallbacks* pAllocator VkSurfaceKHR* pSurface VkResult vkCreateWaylandSurfaceKHR VkInstance instance const VkWaylandSurfaceCreateInfoKHR* pCreateInfo const VkAllocationCallbacks* pAllocator VkSurfaceKHR* pSurface VkBool32 vkGetPhysicalDeviceWaylandPresentationSupportKHR VkPhysicalDevice physicalDevice uint32_t queueFamilyIndex struct wl_display* display VkResult vkCreateWin32SurfaceKHR VkInstance instance const VkWin32SurfaceCreateInfoKHR* pCreateInfo const VkAllocationCallbacks* pAllocator VkSurfaceKHR* pSurface VkBool32 vkGetPhysicalDeviceWin32PresentationSupportKHR VkPhysicalDevice physicalDevice uint32_t queueFamilyIndex VkResult vkCreateXlibSurfaceKHR VkInstance instance const VkXlibSurfaceCreateInfoKHR* pCreateInfo const VkAllocationCallbacks* pAllocator VkSurfaceKHR* pSurface VkBool32 vkGetPhysicalDeviceXlibPresentationSupportKHR VkPhysicalDevice physicalDevice uint32_t queueFamilyIndex Display* dpy VisualID visualID VkResult vkCreateXcbSurfaceKHR VkInstance instance const VkXcbSurfaceCreateInfoKHR* pCreateInfo const VkAllocationCallbacks* pAllocator VkSurfaceKHR* pSurface VkBool32 vkGetPhysicalDeviceXcbPresentationSupportKHR VkPhysicalDevice physicalDevice uint32_t queueFamilyIndex xcb_connection_t* connection xcb_visualid_t visual_id VkResult vkCreateDirectFBSurfaceEXT VkInstance instance const VkDirectFBSurfaceCreateInfoEXT* pCreateInfo const VkAllocationCallbacks* pAllocator VkSurfaceKHR* pSurface VkBool32 vkGetPhysicalDeviceDirectFBPresentationSupportEXT VkPhysicalDevice physicalDevice uint32_t queueFamilyIndex IDirectFB* dfb VkResult vkCreateImagePipeSurfaceFUCHSIA VkInstance instance const VkImagePipeSurfaceCreateInfoFUCHSIA* pCreateInfo const VkAllocationCallbacks* pAllocator VkSurfaceKHR* pSurface VkResult vkCreateStreamDescriptorSurfaceGGP VkInstance instance const VkStreamDescriptorSurfaceCreateInfoGGP* pCreateInfo const VkAllocationCallbacks* pAllocator VkSurfaceKHR* pSurface VkResult vkCreateScreenSurfaceQNX VkInstance instance const VkScreenSurfaceCreateInfoQNX* pCreateInfo const VkAllocationCallbacks* pAllocator VkSurfaceKHR* pSurface VkBool32 vkGetPhysicalDeviceScreenPresentationSupportQNX VkPhysicalDevice physicalDevice uint32_t queueFamilyIndex struct _screen_window* window VkResult vkCreateDebugReportCallbackEXT VkInstance instance const VkDebugReportCallbackCreateInfoEXT* pCreateInfo const VkAllocationCallbacks* pAllocator VkDebugReportCallbackEXT* pCallback void vkDestroyDebugReportCallbackEXT VkInstance instance VkDebugReportCallbackEXT callback const VkAllocationCallbacks* pAllocator void vkDebugReportMessageEXT VkInstance instance VkDebugReportFlagsEXT flags VkDebugReportObjectTypeEXT objectType uint64_t object size_t location int32_t messageCode const char* pLayerPrefix const char* pMessage VkResult vkDebugMarkerSetObjectNameEXT VkDevice device const VkDebugMarkerObjectNameInfoEXT* pNameInfo VkResult vkDebugMarkerSetObjectTagEXT VkDevice device const VkDebugMarkerObjectTagInfoEXT* pTagInfo void vkCmdDebugMarkerBeginEXT VkCommandBuffer commandBuffer const VkDebugMarkerMarkerInfoEXT* pMarkerInfo void vkCmdDebugMarkerEndEXT VkCommandBuffer commandBuffer void vkCmdDebugMarkerInsertEXT VkCommandBuffer commandBuffer const VkDebugMarkerMarkerInfoEXT* pMarkerInfo VkResult vkGetPhysicalDeviceExternalImageFormatPropertiesNV VkPhysicalDevice physicalDevice VkFormat format VkImageType type VkImageTiling tiling VkImageUsageFlags usage VkImageCreateFlags flags VkExternalMemoryHandleTypeFlagsNV externalHandleType VkExternalImageFormatPropertiesNV* pExternalImageFormatProperties VkResult vkGetMemoryWin32HandleNV VkDevice device VkDeviceMemory memory VkExternalMemoryHandleTypeFlagsNV handleType HANDLE* pHandle void vkCmdExecuteGeneratedCommandsNV VkCommandBuffer commandBuffer VkBool32 isPreprocessed const VkGeneratedCommandsInfoNV* pGeneratedCommandsInfo void vkCmdPreprocessGeneratedCommandsNV VkCommandBuffer commandBuffer const VkGeneratedCommandsInfoNV* pGeneratedCommandsInfo void vkCmdBindPipelineShaderGroupNV VkCommandBuffer commandBuffer VkPipelineBindPoint pipelineBindPoint VkPipeline pipeline uint32_t groupIndex void vkGetGeneratedCommandsMemoryRequirementsNV VkDevice device const VkGeneratedCommandsMemoryRequirementsInfoNV* pInfo VkMemoryRequirements2* pMemoryRequirements VkResult vkCreateIndirectCommandsLayoutNV VkDevice device const VkIndirectCommandsLayoutCreateInfoNV* pCreateInfo const VkAllocationCallbacks* pAllocator VkIndirectCommandsLayoutNV* pIndirectCommandsLayout void vkDestroyIndirectCommandsLayoutNV VkDevice device VkIndirectCommandsLayoutNV indirectCommandsLayout const VkAllocationCallbacks* pAllocator void vkGetPhysicalDeviceFeatures2 VkPhysicalDevice physicalDevice VkPhysicalDeviceFeatures2* pFeatures void vkGetPhysicalDeviceProperties2 VkPhysicalDevice physicalDevice VkPhysicalDeviceProperties2* pProperties void vkGetPhysicalDeviceFormatProperties2 VkPhysicalDevice physicalDevice VkFormat format VkFormatProperties2* pFormatProperties VkResult vkGetPhysicalDeviceImageFormatProperties2 VkPhysicalDevice physicalDevice const VkPhysicalDeviceImageFormatInfo2* pImageFormatInfo VkImageFormatProperties2* pImageFormatProperties void vkGetPhysicalDeviceQueueFamilyProperties2 VkPhysicalDevice physicalDevice uint32_t* pQueueFamilyPropertyCount VkQueueFamilyProperties2* pQueueFamilyProperties void vkGetPhysicalDeviceMemoryProperties2 VkPhysicalDevice physicalDevice VkPhysicalDeviceMemoryProperties2* pMemoryProperties void vkGetPhysicalDeviceSparseImageFormatProperties2 VkPhysicalDevice physicalDevice const VkPhysicalDeviceSparseImageFormatInfo2* pFormatInfo uint32_t* pPropertyCount VkSparseImageFormatProperties2* pProperties void vkCmdPushDescriptorSetKHR VkCommandBuffer commandBuffer VkPipelineBindPoint pipelineBindPoint VkPipelineLayout layout uint32_t set uint32_t descriptorWriteCount const VkWriteDescriptorSet* pDescriptorWrites void vkTrimCommandPool VkDevice device VkCommandPool commandPool VkCommandPoolTrimFlags flags void vkGetPhysicalDeviceExternalBufferProperties VkPhysicalDevice physicalDevice const VkPhysicalDeviceExternalBufferInfo* pExternalBufferInfo VkExternalBufferProperties* pExternalBufferProperties VkResult vkGetMemoryWin32HandleKHR VkDevice device const VkMemoryGetWin32HandleInfoKHR* pGetWin32HandleInfo HANDLE* pHandle VkResult vkGetMemoryWin32HandlePropertiesKHR VkDevice device VkExternalMemoryHandleTypeFlagBits handleType HANDLE handle VkMemoryWin32HandlePropertiesKHR* pMemoryWin32HandleProperties VkResult vkGetMemoryFdKHR VkDevice device const VkMemoryGetFdInfoKHR* pGetFdInfo int* pFd VkResult vkGetMemoryFdPropertiesKHR VkDevice device VkExternalMemoryHandleTypeFlagBits handleType int fd VkMemoryFdPropertiesKHR* pMemoryFdProperties VkResult vkGetMemoryZirconHandleFUCHSIA VkDevice device const VkMemoryGetZirconHandleInfoFUCHSIA* pGetZirconHandleInfo zx_handle_t* pZirconHandle VkResult vkGetMemoryZirconHandlePropertiesFUCHSIA VkDevice device VkExternalMemoryHandleTypeFlagBits handleType zx_handle_t zirconHandle VkMemoryZirconHandlePropertiesFUCHSIA* pMemoryZirconHandleProperties VkResult vkGetMemoryRemoteAddressNV VkDevice device const VkMemoryGetRemoteAddressInfoNV* pMemoryGetRemoteAddressInfo VkRemoteAddressNV* pAddress void vkGetPhysicalDeviceExternalSemaphoreProperties VkPhysicalDevice physicalDevice const VkPhysicalDeviceExternalSemaphoreInfo* pExternalSemaphoreInfo VkExternalSemaphoreProperties* pExternalSemaphoreProperties VkResult vkGetSemaphoreWin32HandleKHR VkDevice device const VkSemaphoreGetWin32HandleInfoKHR* pGetWin32HandleInfo HANDLE* pHandle VkResult vkImportSemaphoreWin32HandleKHR VkDevice device const VkImportSemaphoreWin32HandleInfoKHR* pImportSemaphoreWin32HandleInfo VkResult vkGetSemaphoreFdKHR VkDevice device const VkSemaphoreGetFdInfoKHR* pGetFdInfo int* pFd VkResult vkImportSemaphoreFdKHR VkDevice device const VkImportSemaphoreFdInfoKHR* pImportSemaphoreFdInfo VkResult vkGetSemaphoreZirconHandleFUCHSIA VkDevice device const VkSemaphoreGetZirconHandleInfoFUCHSIA* pGetZirconHandleInfo zx_handle_t* pZirconHandle VkResult vkImportSemaphoreZirconHandleFUCHSIA VkDevice device const VkImportSemaphoreZirconHandleInfoFUCHSIA* pImportSemaphoreZirconHandleInfo void vkGetPhysicalDeviceExternalFenceProperties VkPhysicalDevice physicalDevice const VkPhysicalDeviceExternalFenceInfo* pExternalFenceInfo VkExternalFenceProperties* pExternalFenceProperties VkResult vkGetFenceWin32HandleKHR VkDevice device const VkFenceGetWin32HandleInfoKHR* pGetWin32HandleInfo HANDLE* pHandle VkResult vkImportFenceWin32HandleKHR VkDevice device const VkImportFenceWin32HandleInfoKHR* pImportFenceWin32HandleInfo VkResult vkGetFenceFdKHR VkDevice device const VkFenceGetFdInfoKHR* pGetFdInfo int* pFd VkResult vkImportFenceFdKHR VkDevice device const VkImportFenceFdInfoKHR* pImportFenceFdInfo VkResult vkReleaseDisplayEXT VkPhysicalDevice physicalDevice VkDisplayKHR display VkResult vkAcquireXlibDisplayEXT VkPhysicalDevice physicalDevice Display* dpy VkDisplayKHR display VkResult vkGetRandROutputDisplayEXT VkPhysicalDevice physicalDevice Display* dpy RROutput rrOutput VkDisplayKHR* pDisplay VkResult vkAcquireWinrtDisplayNV VkPhysicalDevice physicalDevice VkDisplayKHR display VkResult vkGetWinrtDisplayNV VkPhysicalDevice physicalDevice uint32_t deviceRelativeId VkDisplayKHR* pDisplay VkResult vkDisplayPowerControlEXT VkDevice device VkDisplayKHR display const VkDisplayPowerInfoEXT* pDisplayPowerInfo VkResult vkRegisterDeviceEventEXT VkDevice device const VkDeviceEventInfoEXT* pDeviceEventInfo const VkAllocationCallbacks* pAllocator VkFence* pFence VkResult vkRegisterDisplayEventEXT VkDevice device VkDisplayKHR display const VkDisplayEventInfoEXT* pDisplayEventInfo const VkAllocationCallbacks* pAllocator VkFence* pFence VkResult vkGetSwapchainCounterEXT VkDevice device VkSwapchainKHR swapchain VkSurfaceCounterFlagBitsEXT counter uint64_t* pCounterValue VkResult vkGetPhysicalDeviceSurfaceCapabilities2EXT VkPhysicalDevice physicalDevice VkSurfaceKHR surface VkSurfaceCapabilities2EXT* pSurfaceCapabilities VkResult vkEnumeratePhysicalDeviceGroups VkInstance instance uint32_t* pPhysicalDeviceGroupCount VkPhysicalDeviceGroupProperties* pPhysicalDeviceGroupProperties void vkGetDeviceGroupPeerMemoryFeatures VkDevice device uint32_t heapIndex uint32_t localDeviceIndex uint32_t remoteDeviceIndex VkPeerMemoryFeatureFlags* pPeerMemoryFeatures VkResult vkBindBufferMemory2 VkDevice device uint32_t bindInfoCount const VkBindBufferMemoryInfo* pBindInfos VkResult vkBindImageMemory2 VkDevice device uint32_t bindInfoCount const VkBindImageMemoryInfo* pBindInfos void vkCmdSetDeviceMask VkCommandBuffer commandBuffer uint32_t deviceMask VkResult vkGetDeviceGroupPresentCapabilitiesKHR VkDevice device VkDeviceGroupPresentCapabilitiesKHR* pDeviceGroupPresentCapabilities VkResult vkGetDeviceGroupSurfacePresentModesKHR VkDevice device VkSurfaceKHR surface VkDeviceGroupPresentModeFlagsKHR* pModes VkResult vkAcquireNextImage2KHR VkDevice device const VkAcquireNextImageInfoKHR* pAcquireInfo uint32_t* pImageIndex void vkCmdDispatchBase VkCommandBuffer commandBuffer uint32_t baseGroupX uint32_t baseGroupY uint32_t baseGroupZ uint32_t groupCountX uint32_t groupCountY uint32_t groupCountZ VkResult vkGetPhysicalDevicePresentRectanglesKHR VkPhysicalDevice physicalDevice VkSurfaceKHR surface uint32_t* pRectCount VkRect2D* pRects VkResult vkCreateDescriptorUpdateTemplate VkDevice device const VkDescriptorUpdateTemplateCreateInfo* pCreateInfo const VkAllocationCallbacks* pAllocator VkDescriptorUpdateTemplate* pDescriptorUpdateTemplate void vkDestroyDescriptorUpdateTemplate VkDevice device VkDescriptorUpdateTemplate descriptorUpdateTemplate const VkAllocationCallbacks* pAllocator void vkUpdateDescriptorSetWithTemplate VkDevice device VkDescriptorSet descriptorSet VkDescriptorUpdateTemplate descriptorUpdateTemplate const void* pData void vkCmdPushDescriptorSetWithTemplateKHR VkCommandBuffer commandBuffer VkDescriptorUpdateTemplate descriptorUpdateTemplate VkPipelineLayout layout uint32_t set const void* pData void vkSetHdrMetadataEXT VkDevice device uint32_t swapchainCount const VkSwapchainKHR* pSwapchains const VkHdrMetadataEXT* pMetadata VkResult vkGetSwapchainStatusKHR VkDevice device VkSwapchainKHR swapchain VkResult vkGetRefreshCycleDurationGOOGLE VkDevice device VkSwapchainKHR swapchain VkRefreshCycleDurationGOOGLE* pDisplayTimingProperties VkResult vkGetPastPresentationTimingGOOGLE VkDevice device VkSwapchainKHR swapchain uint32_t* pPresentationTimingCount VkPastPresentationTimingGOOGLE* pPresentationTimings VkResult vkCreateIOSSurfaceMVK VkInstance instance const VkIOSSurfaceCreateInfoMVK* pCreateInfo const VkAllocationCallbacks* pAllocator VkSurfaceKHR* pSurface VkResult vkCreateMacOSSurfaceMVK VkInstance instance const VkMacOSSurfaceCreateInfoMVK* pCreateInfo const VkAllocationCallbacks* pAllocator VkSurfaceKHR* pSurface VkResult vkCreateMetalSurfaceEXT VkInstance instance const VkMetalSurfaceCreateInfoEXT* pCreateInfo const VkAllocationCallbacks* pAllocator VkSurfaceKHR* pSurface void vkCmdSetViewportWScalingNV VkCommandBuffer commandBuffer uint32_t firstViewport uint32_t viewportCount const VkViewportWScalingNV* pViewportWScalings void vkCmdSetDiscardRectangleEXT VkCommandBuffer commandBuffer uint32_t firstDiscardRectangle uint32_t discardRectangleCount const VkRect2D* pDiscardRectangles void vkCmdSetSampleLocationsEXT VkCommandBuffer commandBuffer const VkSampleLocationsInfoEXT* pSampleLocationsInfo void vkGetPhysicalDeviceMultisamplePropertiesEXT VkPhysicalDevice physicalDevice VkSampleCountFlagBits samples VkMultisamplePropertiesEXT* pMultisampleProperties VkResult vkGetPhysicalDeviceSurfaceCapabilities2KHR VkPhysicalDevice physicalDevice const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo VkSurfaceCapabilities2KHR* pSurfaceCapabilities VkResult vkGetPhysicalDeviceSurfaceFormats2KHR VkPhysicalDevice physicalDevice const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo uint32_t* pSurfaceFormatCount VkSurfaceFormat2KHR* pSurfaceFormats VkResult vkGetPhysicalDeviceDisplayProperties2KHR VkPhysicalDevice physicalDevice uint32_t* pPropertyCount VkDisplayProperties2KHR* pProperties VkResult vkGetPhysicalDeviceDisplayPlaneProperties2KHR VkPhysicalDevice physicalDevice uint32_t* pPropertyCount VkDisplayPlaneProperties2KHR* pProperties VkResult vkGetDisplayModeProperties2KHR VkPhysicalDevice physicalDevice VkDisplayKHR display uint32_t* pPropertyCount VkDisplayModeProperties2KHR* pProperties VkResult vkGetDisplayPlaneCapabilities2KHR VkPhysicalDevice physicalDevice const VkDisplayPlaneInfo2KHR* pDisplayPlaneInfo VkDisplayPlaneCapabilities2KHR* pCapabilities void vkGetBufferMemoryRequirements2 VkDevice device const VkBufferMemoryRequirementsInfo2* pInfo VkMemoryRequirements2* pMemoryRequirements void vkGetImageMemoryRequirements2 VkDevice device const VkImageMemoryRequirementsInfo2* pInfo VkMemoryRequirements2* pMemoryRequirements void vkGetImageSparseMemoryRequirements2 VkDevice device const VkImageSparseMemoryRequirementsInfo2* pInfo uint32_t* pSparseMemoryRequirementCount VkSparseImageMemoryRequirements2* pSparseMemoryRequirements void vkGetDeviceBufferMemoryRequirements VkDevice device const VkDeviceBufferMemoryRequirements* pInfo VkMemoryRequirements2* pMemoryRequirements void vkGetDeviceImageMemoryRequirements VkDevice device const VkDeviceImageMemoryRequirements* pInfo VkMemoryRequirements2* pMemoryRequirements void vkGetDeviceImageSparseMemoryRequirements VkDevice device const VkDeviceImageMemoryRequirements* pInfo uint32_t* pSparseMemoryRequirementCount VkSparseImageMemoryRequirements2* pSparseMemoryRequirements VkResult vkCreateSamplerYcbcrConversion VkDevice device const VkSamplerYcbcrConversionCreateInfo* pCreateInfo const VkAllocationCallbacks* pAllocator VkSamplerYcbcrConversion* pYcbcrConversion void vkDestroySamplerYcbcrConversion VkDevice device VkSamplerYcbcrConversion ycbcrConversion const VkAllocationCallbacks* pAllocator void vkGetDeviceQueue2 VkDevice device const VkDeviceQueueInfo2* pQueueInfo VkQueue* pQueue VkResult vkCreateValidationCacheEXT VkDevice device const VkValidationCacheCreateInfoEXT* pCreateInfo const VkAllocationCallbacks* pAllocator VkValidationCacheEXT* pValidationCache void vkDestroyValidationCacheEXT VkDevice device VkValidationCacheEXT validationCache const VkAllocationCallbacks* pAllocator VkResult vkGetValidationCacheDataEXT VkDevice device VkValidationCacheEXT validationCache size_t* pDataSize void* pData VkResult vkMergeValidationCachesEXT VkDevice device VkValidationCacheEXT dstCache uint32_t srcCacheCount const VkValidationCacheEXT* pSrcCaches void vkGetDescriptorSetLayoutSupport VkDevice device const VkDescriptorSetLayoutCreateInfo* pCreateInfo VkDescriptorSetLayoutSupport* pSupport VkResult vkGetSwapchainGrallocUsageANDROID VkDevice device VkFormat format VkImageUsageFlags imageUsage int* grallocUsage VkResult vkGetSwapchainGrallocUsage2ANDROID VkDevice device VkFormat format VkImageUsageFlags imageUsage VkSwapchainImageUsageFlagsANDROID swapchainImageUsage uint64_t* grallocConsumerUsage uint64_t* grallocProducerUsage VkResult vkAcquireImageANDROID VkDevice device VkImage image int nativeFenceFd VkSemaphore semaphore VkFence fence VkResult vkQueueSignalReleaseImageANDROID VkQueue queue uint32_t waitSemaphoreCount const VkSemaphore* pWaitSemaphores VkImage image int* pNativeFenceFd VkResult vkGetShaderInfoAMD VkDevice device VkPipeline pipeline VkShaderStageFlagBits shaderStage VkShaderInfoTypeAMD infoType size_t* pInfoSize void* pInfo void vkSetLocalDimmingAMD VkDevice device VkSwapchainKHR swapChain VkBool32 localDimmingEnable VkResult vkGetPhysicalDeviceCalibrateableTimeDomainsEXT VkPhysicalDevice physicalDevice uint32_t* pTimeDomainCount VkTimeDomainEXT* pTimeDomains VkResult vkGetCalibratedTimestampsEXT VkDevice device uint32_t timestampCount const VkCalibratedTimestampInfoEXT* pTimestampInfos uint64_t* pTimestamps uint64_t* pMaxDeviation VkResult vkSetDebugUtilsObjectNameEXT VkDevice device const VkDebugUtilsObjectNameInfoEXT* pNameInfo VkResult vkSetDebugUtilsObjectTagEXT VkDevice device const VkDebugUtilsObjectTagInfoEXT* pTagInfo void vkQueueBeginDebugUtilsLabelEXT VkQueue queue const VkDebugUtilsLabelEXT* pLabelInfo void vkQueueEndDebugUtilsLabelEXT VkQueue queue void vkQueueInsertDebugUtilsLabelEXT VkQueue queue const VkDebugUtilsLabelEXT* pLabelInfo void vkCmdBeginDebugUtilsLabelEXT VkCommandBuffer commandBuffer const VkDebugUtilsLabelEXT* pLabelInfo void vkCmdEndDebugUtilsLabelEXT VkCommandBuffer commandBuffer void vkCmdInsertDebugUtilsLabelEXT VkCommandBuffer commandBuffer const VkDebugUtilsLabelEXT* pLabelInfo VkResult vkCreateDebugUtilsMessengerEXT VkInstance instance const VkDebugUtilsMessengerCreateInfoEXT* pCreateInfo const VkAllocationCallbacks* pAllocator VkDebugUtilsMessengerEXT* pMessenger void vkDestroyDebugUtilsMessengerEXT VkInstance instance VkDebugUtilsMessengerEXT messenger const VkAllocationCallbacks* pAllocator void vkSubmitDebugUtilsMessageEXT VkInstance instance VkDebugUtilsMessageSeverityFlagBitsEXT messageSeverity VkDebugUtilsMessageTypeFlagsEXT messageTypes const VkDebugUtilsMessengerCallbackDataEXT* pCallbackData VkResult vkGetMemoryHostPointerPropertiesEXT VkDevice device VkExternalMemoryHandleTypeFlagBits handleType const void* pHostPointer VkMemoryHostPointerPropertiesEXT* pMemoryHostPointerProperties void vkCmdWriteBufferMarkerAMD VkCommandBuffer commandBuffer VkPipelineStageFlagBits pipelineStage VkBuffer dstBuffer VkDeviceSize dstOffset uint32_t marker VkResult vkCreateRenderPass2 VkDevice device const VkRenderPassCreateInfo2* pCreateInfo const VkAllocationCallbacks* pAllocator VkRenderPass* pRenderPass void vkCmdBeginRenderPass2 VkCommandBuffer commandBuffer const VkRenderPassBeginInfo* pRenderPassBegin const VkSubpassBeginInfo* pSubpassBeginInfo void vkCmdNextSubpass2 VkCommandBuffer commandBuffer const VkSubpassBeginInfo* pSubpassBeginInfo const VkSubpassEndInfo* pSubpassEndInfo void vkCmdEndRenderPass2 VkCommandBuffer commandBuffer const VkSubpassEndInfo* pSubpassEndInfo VkResult vkGetSemaphoreCounterValue VkDevice device VkSemaphore semaphore uint64_t* pValue VkResult vkWaitSemaphores VkDevice device const VkSemaphoreWaitInfo* pWaitInfo uint64_t timeout VkResult vkSignalSemaphore VkDevice device const VkSemaphoreSignalInfo* pSignalInfo VkResult vkGetAndroidHardwareBufferPropertiesANDROID VkDevice device const struct AHardwareBuffer* buffer VkAndroidHardwareBufferPropertiesANDROID* pProperties VkResult vkGetMemoryAndroidHardwareBufferANDROID VkDevice device const VkMemoryGetAndroidHardwareBufferInfoANDROID* pInfo struct AHardwareBuffer** pBuffer void vkCmdDrawIndirectCount VkCommandBuffer commandBuffer VkBuffer buffer VkDeviceSize offset VkBuffer countBuffer VkDeviceSize countBufferOffset uint32_t maxDrawCount uint32_t stride void vkCmdDrawIndexedIndirectCount VkCommandBuffer commandBuffer VkBuffer buffer VkDeviceSize offset VkBuffer countBuffer VkDeviceSize countBufferOffset uint32_t maxDrawCount uint32_t stride void vkCmdSetCheckpointNV VkCommandBuffer commandBuffer const void* pCheckpointMarker void vkGetQueueCheckpointDataNV VkQueue queue uint32_t* pCheckpointDataCount VkCheckpointDataNV* pCheckpointData void vkCmdBindTransformFeedbackBuffersEXT VkCommandBuffer commandBuffer uint32_t firstBinding uint32_t bindingCount const VkBuffer* pBuffers const VkDeviceSize* pOffsets const VkDeviceSize* pSizes void vkCmdBeginTransformFeedbackEXT VkCommandBuffer commandBuffer uint32_t firstCounterBuffer uint32_t counterBufferCount const VkBuffer* pCounterBuffers const VkDeviceSize* pCounterBufferOffsets void vkCmdEndTransformFeedbackEXT VkCommandBuffer commandBuffer uint32_t firstCounterBuffer uint32_t counterBufferCount const VkBuffer* pCounterBuffers const VkDeviceSize* pCounterBufferOffsets void vkCmdBeginQueryIndexedEXT VkCommandBuffer commandBuffer VkQueryPool queryPool uint32_t query VkQueryControlFlags flags uint32_t index void vkCmdEndQueryIndexedEXT VkCommandBuffer commandBuffer VkQueryPool queryPool uint32_t query uint32_t index void vkCmdDrawIndirectByteCountEXT VkCommandBuffer commandBuffer uint32_t instanceCount uint32_t firstInstance VkBuffer counterBuffer VkDeviceSize counterBufferOffset uint32_t counterOffset uint32_t vertexStride void vkCmdSetExclusiveScissorNV VkCommandBuffer commandBuffer uint32_t firstExclusiveScissor uint32_t exclusiveScissorCount const VkRect2D* pExclusiveScissors void vkCmdBindShadingRateImageNV VkCommandBuffer commandBuffer VkImageView imageView VkImageLayout imageLayout void vkCmdSetViewportShadingRatePaletteNV VkCommandBuffer commandBuffer uint32_t firstViewport uint32_t viewportCount const VkShadingRatePaletteNV* pShadingRatePalettes void vkCmdSetCoarseSampleOrderNV VkCommandBuffer commandBuffer VkCoarseSampleOrderTypeNV sampleOrderType uint32_t customSampleOrderCount const VkCoarseSampleOrderCustomNV* pCustomSampleOrders void vkCmdDrawMeshTasksNV VkCommandBuffer commandBuffer uint32_t taskCount uint32_t firstTask void vkCmdDrawMeshTasksIndirectNV VkCommandBuffer commandBuffer VkBuffer buffer VkDeviceSize offset uint32_t drawCount uint32_t stride void vkCmdDrawMeshTasksIndirectCountNV VkCommandBuffer commandBuffer VkBuffer buffer VkDeviceSize offset VkBuffer countBuffer VkDeviceSize countBufferOffset uint32_t maxDrawCount uint32_t stride void vkCmdDrawMeshTasksEXT VkCommandBuffer commandBuffer uint32_t groupCountX uint32_t groupCountY uint32_t groupCountZ void vkCmdDrawMeshTasksIndirectEXT VkCommandBuffer commandBuffer VkBuffer buffer VkDeviceSize offset uint32_t drawCount uint32_t stride void vkCmdDrawMeshTasksIndirectCountEXT VkCommandBuffer commandBuffer VkBuffer buffer VkDeviceSize offset VkBuffer countBuffer VkDeviceSize countBufferOffset uint32_t maxDrawCount uint32_t stride VkResult vkCompileDeferredNV VkDevice device VkPipeline pipeline uint32_t shader VkResult vkCreateAccelerationStructureNV VkDevice device const VkAccelerationStructureCreateInfoNV* pCreateInfo const VkAllocationCallbacks* pAllocator VkAccelerationStructureNV* pAccelerationStructure void vkCmdBindInvocationMaskHUAWEI VkCommandBuffer commandBuffer VkImageView imageView VkImageLayout imageLayout void vkDestroyAccelerationStructureKHR VkDevice device VkAccelerationStructureKHR accelerationStructure const VkAllocationCallbacks* pAllocator void vkDestroyAccelerationStructureNV VkDevice device VkAccelerationStructureNV accelerationStructure const VkAllocationCallbacks* pAllocator void vkGetAccelerationStructureMemoryRequirementsNV VkDevice device const VkAccelerationStructureMemoryRequirementsInfoNV* pInfo VkMemoryRequirements2KHR* pMemoryRequirements VkResult vkBindAccelerationStructureMemoryNV VkDevice device uint32_t bindInfoCount const VkBindAccelerationStructureMemoryInfoNV* pBindInfos void vkCmdCopyAccelerationStructureNV VkCommandBuffer commandBuffer VkAccelerationStructureNV dst VkAccelerationStructureNV src VkCopyAccelerationStructureModeKHR mode void vkCmdCopyAccelerationStructureKHR VkCommandBuffer commandBuffer const VkCopyAccelerationStructureInfoKHR* pInfo VkResult vkCopyAccelerationStructureKHR VkDevice device VkDeferredOperationKHR deferredOperation const VkCopyAccelerationStructureInfoKHR* pInfo void vkCmdCopyAccelerationStructureToMemoryKHR VkCommandBuffer commandBuffer const VkCopyAccelerationStructureToMemoryInfoKHR* pInfo VkResult vkCopyAccelerationStructureToMemoryKHR VkDevice device VkDeferredOperationKHR deferredOperation const VkCopyAccelerationStructureToMemoryInfoKHR* pInfo void vkCmdCopyMemoryToAccelerationStructureKHR VkCommandBuffer commandBuffer const VkCopyMemoryToAccelerationStructureInfoKHR* pInfo VkResult vkCopyMemoryToAccelerationStructureKHR VkDevice device VkDeferredOperationKHR deferredOperation const VkCopyMemoryToAccelerationStructureInfoKHR* pInfo void vkCmdWriteAccelerationStructuresPropertiesKHR VkCommandBuffer commandBuffer uint32_t accelerationStructureCount const VkAccelerationStructureKHR* pAccelerationStructures VkQueryType queryType VkQueryPool queryPool uint32_t firstQuery void vkCmdWriteAccelerationStructuresPropertiesNV VkCommandBuffer commandBuffer uint32_t accelerationStructureCount const VkAccelerationStructureNV* pAccelerationStructures VkQueryType queryType VkQueryPool queryPool uint32_t firstQuery void vkCmdBuildAccelerationStructureNV VkCommandBuffer commandBuffer const VkAccelerationStructureInfoNV* pInfo VkBuffer instanceData VkDeviceSize instanceOffset VkBool32 update VkAccelerationStructureNV dst VkAccelerationStructureNV src VkBuffer scratch VkDeviceSize scratchOffset VkResult vkWriteAccelerationStructuresPropertiesKHR VkDevice device uint32_t accelerationStructureCount const VkAccelerationStructureKHR* pAccelerationStructures VkQueryType queryType size_t dataSize void* pData size_t stride void vkCmdTraceRaysKHR VkCommandBuffer commandBuffer const VkStridedDeviceAddressRegionKHR* pRaygenShaderBindingTable const VkStridedDeviceAddressRegionKHR* pMissShaderBindingTable const VkStridedDeviceAddressRegionKHR* pHitShaderBindingTable const VkStridedDeviceAddressRegionKHR* pCallableShaderBindingTable uint32_t width uint32_t height uint32_t depth void vkCmdTraceRaysNV VkCommandBuffer commandBuffer VkBuffer raygenShaderBindingTableBuffer VkDeviceSize raygenShaderBindingOffset VkBuffer missShaderBindingTableBuffer VkDeviceSize missShaderBindingOffset VkDeviceSize missShaderBindingStride VkBuffer hitShaderBindingTableBuffer VkDeviceSize hitShaderBindingOffset VkDeviceSize hitShaderBindingStride VkBuffer callableShaderBindingTableBuffer VkDeviceSize callableShaderBindingOffset VkDeviceSize callableShaderBindingStride uint32_t width uint32_t height uint32_t depth VkResult vkGetRayTracingShaderGroupHandlesKHR VkDevice device VkPipeline pipeline uint32_t firstGroup uint32_t groupCount size_t dataSize void* pData VkResult vkGetRayTracingCaptureReplayShaderGroupHandlesKHR VkDevice device VkPipeline pipeline uint32_t firstGroup uint32_t groupCount size_t dataSize void* pData VkResult vkGetAccelerationStructureHandleNV VkDevice device VkAccelerationStructureNV accelerationStructure size_t dataSize void* pData VkResult vkCreateRayTracingPipelinesNV VkDevice device VkPipelineCache pipelineCache uint32_t createInfoCount const VkRayTracingPipelineCreateInfoNV* pCreateInfos const VkAllocationCallbacks* pAllocator VkPipeline* pPipelines VkResult vkCreateRayTracingPipelinesKHR VkDevice device VkDeferredOperationKHR deferredOperation VkPipelineCache pipelineCache uint32_t createInfoCount const VkRayTracingPipelineCreateInfoKHR* pCreateInfos const VkAllocationCallbacks* pAllocator VkPipeline* pPipelines VkResult vkGetPhysicalDeviceCooperativeMatrixPropertiesNV VkPhysicalDevice physicalDevice uint32_t* pPropertyCount VkCooperativeMatrixPropertiesNV* pProperties void vkCmdTraceRaysIndirectKHR VkCommandBuffer commandBuffer const VkStridedDeviceAddressRegionKHR* pRaygenShaderBindingTable const VkStridedDeviceAddressRegionKHR* pMissShaderBindingTable const VkStridedDeviceAddressRegionKHR* pHitShaderBindingTable const VkStridedDeviceAddressRegionKHR* pCallableShaderBindingTable VkDeviceAddress indirectDeviceAddress void vkCmdTraceRaysIndirect2KHR VkCommandBuffer commandBuffer VkDeviceAddress indirectDeviceAddress void vkGetDeviceAccelerationStructureCompatibilityKHR VkDevice device const VkAccelerationStructureVersionInfoKHR* pVersionInfo VkAccelerationStructureCompatibilityKHR* pCompatibility VkDeviceSize vkGetRayTracingShaderGroupStackSizeKHR VkDevice device VkPipeline pipeline uint32_t group VkShaderGroupShaderKHR groupShader void vkCmdSetRayTracingPipelineStackSizeKHR VkCommandBuffer commandBuffer uint32_t pipelineStackSize uint32_t vkGetImageViewHandleNVX VkDevice device const VkImageViewHandleInfoNVX* pInfo VkResult vkGetImageViewAddressNVX VkDevice device VkImageView imageView VkImageViewAddressPropertiesNVX* pProperties VkResult vkGetPhysicalDeviceSurfacePresentModes2EXT VkPhysicalDevice physicalDevice const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo uint32_t* pPresentModeCount VkPresentModeKHR* pPresentModes VkResult vkGetDeviceGroupSurfacePresentModes2EXT VkDevice device const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo VkDeviceGroupPresentModeFlagsKHR* pModes VkResult vkAcquireFullScreenExclusiveModeEXT VkDevice device VkSwapchainKHR swapchain VkResult vkReleaseFullScreenExclusiveModeEXT VkDevice device VkSwapchainKHR swapchain VkResult vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR VkPhysicalDevice physicalDevice uint32_t queueFamilyIndex uint32_t* pCounterCount VkPerformanceCounterKHR* pCounters VkPerformanceCounterDescriptionKHR* pCounterDescriptions void vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR VkPhysicalDevice physicalDevice const VkQueryPoolPerformanceCreateInfoKHR* pPerformanceQueryCreateInfo uint32_t* pNumPasses VkResult vkAcquireProfilingLockKHR VkDevice device const VkAcquireProfilingLockInfoKHR* pInfo void vkReleaseProfilingLockKHR VkDevice device VkResult vkGetImageDrmFormatModifierPropertiesEXT VkDevice device VkImage image VkImageDrmFormatModifierPropertiesEXT* pProperties uint64_t vkGetBufferOpaqueCaptureAddress VkDevice device const VkBufferDeviceAddressInfo* pInfo VkDeviceAddress vkGetBufferDeviceAddress VkDevice device const VkBufferDeviceAddressInfo* pInfo VkResult vkCreateHeadlessSurfaceEXT VkInstance instance const VkHeadlessSurfaceCreateInfoEXT* pCreateInfo const VkAllocationCallbacks* pAllocator VkSurfaceKHR* pSurface VkResult vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV VkPhysicalDevice physicalDevice uint32_t* pCombinationCount VkFramebufferMixedSamplesCombinationNV* pCombinations VkResult vkInitializePerformanceApiINTEL VkDevice device const VkInitializePerformanceApiInfoINTEL* pInitializeInfo void vkUninitializePerformanceApiINTEL VkDevice device VkResult vkCmdSetPerformanceMarkerINTEL VkCommandBuffer commandBuffer const VkPerformanceMarkerInfoINTEL* pMarkerInfo VkResult vkCmdSetPerformanceStreamMarkerINTEL VkCommandBuffer commandBuffer const VkPerformanceStreamMarkerInfoINTEL* pMarkerInfo VkResult vkCmdSetPerformanceOverrideINTEL VkCommandBuffer commandBuffer const VkPerformanceOverrideInfoINTEL* pOverrideInfo VkResult vkAcquirePerformanceConfigurationINTEL VkDevice device const VkPerformanceConfigurationAcquireInfoINTEL* pAcquireInfo VkPerformanceConfigurationINTEL* pConfiguration VkResult vkReleasePerformanceConfigurationINTEL VkDevice device VkPerformanceConfigurationINTEL configuration VkResult vkQueueSetPerformanceConfigurationINTEL VkQueue queue VkPerformanceConfigurationINTEL configuration VkResult vkGetPerformanceParameterINTEL VkDevice device VkPerformanceParameterTypeINTEL parameter VkPerformanceValueINTEL* pValue uint64_t vkGetDeviceMemoryOpaqueCaptureAddress VkDevice device const VkDeviceMemoryOpaqueCaptureAddressInfo* pInfo VkResult vkGetPipelineExecutablePropertiesKHR VkDevice device const VkPipelineInfoKHR* pPipelineInfo uint32_t* pExecutableCount VkPipelineExecutablePropertiesKHR* pProperties VkResult vkGetPipelineExecutableStatisticsKHR VkDevice device const VkPipelineExecutableInfoKHR* pExecutableInfo uint32_t* pStatisticCount VkPipelineExecutableStatisticKHR* pStatistics VkResult vkGetPipelineExecutableInternalRepresentationsKHR VkDevice device const VkPipelineExecutableInfoKHR* pExecutableInfo uint32_t* pInternalRepresentationCount VkPipelineExecutableInternalRepresentationKHR* pInternalRepresentations void vkCmdSetLineStippleEXT VkCommandBuffer commandBuffer uint32_t lineStippleFactor uint16_t lineStipplePattern VkResult vkGetPhysicalDeviceToolProperties VkPhysicalDevice physicalDevice uint32_t* pToolCount VkPhysicalDeviceToolProperties* pToolProperties VkResult vkCreateAccelerationStructureKHR VkDevice device const VkAccelerationStructureCreateInfoKHR* pCreateInfo const VkAllocationCallbacks* pAllocator VkAccelerationStructureKHR* pAccelerationStructure void vkCmdBuildAccelerationStructuresKHR VkCommandBuffer commandBuffer uint32_t infoCount const VkAccelerationStructureBuildGeometryInfoKHR* pInfos const VkAccelerationStructureBuildRangeInfoKHR* const* ppBuildRangeInfos void vkCmdBuildAccelerationStructuresIndirectKHR VkCommandBuffer commandBuffer uint32_t infoCount const VkAccelerationStructureBuildGeometryInfoKHR* pInfos const VkDeviceAddress* pIndirectDeviceAddresses const uint32_t* pIndirectStrides const uint32_t* const* ppMaxPrimitiveCounts VkResult vkBuildAccelerationStructuresKHR VkDevice device VkDeferredOperationKHR deferredOperation uint32_t infoCount const VkAccelerationStructureBuildGeometryInfoKHR* pInfos const VkAccelerationStructureBuildRangeInfoKHR* const* ppBuildRangeInfos VkDeviceAddress vkGetAccelerationStructureDeviceAddressKHR VkDevice device const VkAccelerationStructureDeviceAddressInfoKHR* pInfo VkResult vkCreateDeferredOperationKHR VkDevice device const VkAllocationCallbacks* pAllocator VkDeferredOperationKHR* pDeferredOperation void vkDestroyDeferredOperationKHR VkDevice device VkDeferredOperationKHR operation const VkAllocationCallbacks* pAllocator uint32_t vkGetDeferredOperationMaxConcurrencyKHR VkDevice device VkDeferredOperationKHR operation VkResult vkGetDeferredOperationResultKHR VkDevice device VkDeferredOperationKHR operation VkResult vkDeferredOperationJoinKHR VkDevice device VkDeferredOperationKHR operation void vkCmdSetCullMode VkCommandBuffer commandBuffer VkCullModeFlags cullMode void vkCmdSetFrontFace VkCommandBuffer commandBuffer VkFrontFace frontFace void vkCmdSetPrimitiveTopology VkCommandBuffer commandBuffer VkPrimitiveTopology primitiveTopology void vkCmdSetViewportWithCount VkCommandBuffer commandBuffer uint32_t viewportCount const VkViewport* pViewports void vkCmdSetScissorWithCount VkCommandBuffer commandBuffer uint32_t scissorCount const VkRect2D* pScissors void vkCmdBindVertexBuffers2 VkCommandBuffer commandBuffer uint32_t firstBinding uint32_t bindingCount const VkBuffer* pBuffers const VkDeviceSize* pOffsets const VkDeviceSize* pSizes const VkDeviceSize* pStrides void vkCmdSetDepthTestEnable VkCommandBuffer commandBuffer VkBool32 depthTestEnable void vkCmdSetDepthWriteEnable VkCommandBuffer commandBuffer VkBool32 depthWriteEnable void vkCmdSetDepthCompareOp VkCommandBuffer commandBuffer VkCompareOp depthCompareOp void vkCmdSetDepthBoundsTestEnable VkCommandBuffer commandBuffer VkBool32 depthBoundsTestEnable void vkCmdSetStencilTestEnable VkCommandBuffer commandBuffer VkBool32 stencilTestEnable void vkCmdSetStencilOp VkCommandBuffer commandBuffer VkStencilFaceFlags faceMask VkStencilOp failOp VkStencilOp passOp VkStencilOp depthFailOp VkCompareOp compareOp void vkCmdSetPatchControlPointsEXT VkCommandBuffer commandBuffer uint32_t patchControlPoints void vkCmdSetRasterizerDiscardEnable VkCommandBuffer commandBuffer VkBool32 rasterizerDiscardEnable void vkCmdSetDepthBiasEnable VkCommandBuffer commandBuffer VkBool32 depthBiasEnable void vkCmdSetLogicOpEXT VkCommandBuffer commandBuffer VkLogicOp logicOp void vkCmdSetPrimitiveRestartEnable VkCommandBuffer commandBuffer VkBool32 primitiveRestartEnable VkResult vkCreatePrivateDataSlot VkDevice device const VkPrivateDataSlotCreateInfo* pCreateInfo const VkAllocationCallbacks* pAllocator VkPrivateDataSlot* pPrivateDataSlot void vkCmdSetTessellationDomainOriginEXT VkCommandBuffer commandBuffer VkTessellationDomainOrigin domainOrigin void vkCmdSetDepthClampEnableEXT VkCommandBuffer commandBuffer VkBool32 depthClampEnable void vkCmdSetPolygonModeEXT VkCommandBuffer commandBuffer VkPolygonMode polygonMode void vkCmdSetRasterizationSamplesEXT VkCommandBuffer commandBuffer VkSampleCountFlagBits rasterizationSamples void vkCmdSetSampleMaskEXT VkCommandBuffer commandBuffer VkSampleCountFlagBits samples const VkSampleMask* pSampleMask void vkCmdSetAlphaToCoverageEnableEXT VkCommandBuffer commandBuffer VkBool32 alphaToCoverageEnable void vkCmdSetAlphaToOneEnableEXT VkCommandBuffer commandBuffer VkBool32 alphaToOneEnable void vkCmdSetLogicOpEnableEXT VkCommandBuffer commandBuffer VkBool32 logicOpEnable void vkCmdSetColorBlendEnableEXT VkCommandBuffer commandBuffer uint32_t firstAttachment uint32_t attachmentCount const VkBool32* pColorBlendEnables void vkCmdSetColorBlendEquationEXT VkCommandBuffer commandBuffer uint32_t firstAttachment uint32_t attachmentCount const VkColorBlendEquationEXT* pColorBlendEquations void vkCmdSetColorWriteMaskEXT VkCommandBuffer commandBuffer uint32_t firstAttachment uint32_t attachmentCount const VkColorComponentFlags* pColorWriteMasks void vkCmdSetRasterizationStreamEXT VkCommandBuffer commandBuffer uint32_t rasterizationStream void vkCmdSetConservativeRasterizationModeEXT VkCommandBuffer commandBuffer VkConservativeRasterizationModeEXT conservativeRasterizationMode void vkCmdSetExtraPrimitiveOverestimationSizeEXT VkCommandBuffer commandBuffer float extraPrimitiveOverestimationSize void vkCmdSetDepthClipEnableEXT VkCommandBuffer commandBuffer VkBool32 depthClipEnable void vkCmdSetSampleLocationsEnableEXT VkCommandBuffer commandBuffer VkBool32 sampleLocationsEnable void vkCmdSetColorBlendAdvancedEXT VkCommandBuffer commandBuffer uint32_t firstAttachment uint32_t attachmentCount const VkColorBlendAdvancedEXT* pColorBlendAdvanced void vkCmdSetProvokingVertexModeEXT VkCommandBuffer commandBuffer VkProvokingVertexModeEXT provokingVertexMode void vkCmdSetLineRasterizationModeEXT VkCommandBuffer commandBuffer VkLineRasterizationModeEXT lineRasterizationMode void vkCmdSetLineStippleEnableEXT VkCommandBuffer commandBuffer VkBool32 stippledLineEnable void vkCmdSetDepthClipNegativeOneToOneEXT VkCommandBuffer commandBuffer VkBool32 negativeOneToOne void vkCmdSetViewportWScalingEnableNV VkCommandBuffer commandBuffer VkBool32 viewportWScalingEnable void vkCmdSetViewportSwizzleNV VkCommandBuffer commandBuffer uint32_t firstViewport uint32_t viewportCount const VkViewportSwizzleNV* pViewportSwizzles void vkCmdSetCoverageToColorEnableNV VkCommandBuffer commandBuffer VkBool32 coverageToColorEnable void vkCmdSetCoverageToColorLocationNV VkCommandBuffer commandBuffer uint32_t coverageToColorLocation void vkCmdSetCoverageModulationModeNV VkCommandBuffer commandBuffer VkCoverageModulationModeNV coverageModulationMode void vkCmdSetCoverageModulationTableEnableNV VkCommandBuffer commandBuffer VkBool32 coverageModulationTableEnable void vkCmdSetCoverageModulationTableNV VkCommandBuffer commandBuffer uint32_t coverageModulationTableCount const float* pCoverageModulationTable void vkCmdSetShadingRateImageEnableNV VkCommandBuffer commandBuffer VkBool32 shadingRateImageEnable void vkCmdSetCoverageReductionModeNV VkCommandBuffer commandBuffer VkCoverageReductionModeNV coverageReductionMode void vkCmdSetRepresentativeFragmentTestEnableNV VkCommandBuffer commandBuffer VkBool32 representativeFragmentTestEnable void vkDestroyPrivateDataSlot VkDevice device VkPrivateDataSlot privateDataSlot const VkAllocationCallbacks* pAllocator VkResult vkSetPrivateData VkDevice device VkObjectType objectType uint64_t objectHandle VkPrivateDataSlot privateDataSlot uint64_t data void vkGetPrivateData VkDevice device VkObjectType objectType uint64_t objectHandle VkPrivateDataSlot privateDataSlot uint64_t* pData void vkCmdCopyBuffer2 VkCommandBuffer commandBuffer const VkCopyBufferInfo2* pCopyBufferInfo void vkCmdCopyImage2 VkCommandBuffer commandBuffer const VkCopyImageInfo2* pCopyImageInfo void vkCmdBlitImage2 VkCommandBuffer commandBuffer const VkBlitImageInfo2* pBlitImageInfo void vkCmdCopyBufferToImage2 VkCommandBuffer commandBuffer const VkCopyBufferToImageInfo2* pCopyBufferToImageInfo void vkCmdCopyImageToBuffer2 VkCommandBuffer commandBuffer const VkCopyImageToBufferInfo2* pCopyImageToBufferInfo void vkCmdResolveImage2 VkCommandBuffer commandBuffer const VkResolveImageInfo2* pResolveImageInfo void vkCmdSetFragmentShadingRateKHR VkCommandBuffer commandBuffer const VkExtent2D* pFragmentSize const VkFragmentShadingRateCombinerOpKHR combinerOps[2] VkResult vkGetPhysicalDeviceFragmentShadingRatesKHR VkPhysicalDevice physicalDevice uint32_t* pFragmentShadingRateCount VkPhysicalDeviceFragmentShadingRateKHR* pFragmentShadingRates void vkCmdSetFragmentShadingRateEnumNV VkCommandBuffer commandBuffer VkFragmentShadingRateNV shadingRate const VkFragmentShadingRateCombinerOpKHR combinerOps[2] void vkGetAccelerationStructureBuildSizesKHR VkDevice device VkAccelerationStructureBuildTypeKHR buildType const VkAccelerationStructureBuildGeometryInfoKHR* pBuildInfo const uint32_t* pMaxPrimitiveCounts VkAccelerationStructureBuildSizesInfoKHR* pSizeInfo void vkCmdSetVertexInputEXT VkCommandBuffer commandBuffer uint32_t vertexBindingDescriptionCount const VkVertexInputBindingDescription2EXT* pVertexBindingDescriptions uint32_t vertexAttributeDescriptionCount const VkVertexInputAttributeDescription2EXT* pVertexAttributeDescriptions void vkCmdSetColorWriteEnableEXT VkCommandBuffer commandBuffer uint32_t attachmentCount const VkBool32* pColorWriteEnables void vkCmdSetEvent2 VkCommandBuffer commandBuffer VkEvent event const VkDependencyInfo* pDependencyInfo void vkCmdResetEvent2 VkCommandBuffer commandBuffer VkEvent event VkPipelineStageFlags2 stageMask void vkCmdWaitEvents2 VkCommandBuffer commandBuffer uint32_t eventCount const VkEvent* pEvents const VkDependencyInfo* pDependencyInfos void vkCmdPipelineBarrier2 VkCommandBuffer commandBuffer const VkDependencyInfo* pDependencyInfo VkResult vkQueueSubmit2 VkQueue queue uint32_t submitCount const VkSubmitInfo2* pSubmits VkFence fence void vkCmdWriteTimestamp2 VkCommandBuffer commandBuffer VkPipelineStageFlags2 stage VkQueryPool queryPool uint32_t query void vkCmdWriteBufferMarker2AMD VkCommandBuffer commandBuffer VkPipelineStageFlags2 stage VkBuffer dstBuffer VkDeviceSize dstOffset uint32_t marker void vkGetQueueCheckpointData2NV VkQueue queue uint32_t* pCheckpointDataCount VkCheckpointData2NV* pCheckpointData VkResult vkGetPhysicalDeviceVideoCapabilitiesKHR VkPhysicalDevice physicalDevice const VkVideoProfileInfoKHR* pVideoProfile VkVideoCapabilitiesKHR* pCapabilities VkResult vkGetPhysicalDeviceVideoFormatPropertiesKHR VkPhysicalDevice physicalDevice const VkPhysicalDeviceVideoFormatInfoKHR* pVideoFormatInfo uint32_t* pVideoFormatPropertyCount VkVideoFormatPropertiesKHR* pVideoFormatProperties VkResult vkCreateVideoSessionKHR VkDevice device const VkVideoSessionCreateInfoKHR* pCreateInfo const VkAllocationCallbacks* pAllocator VkVideoSessionKHR* pVideoSession void vkDestroyVideoSessionKHR VkDevice device VkVideoSessionKHR videoSession const VkAllocationCallbacks* pAllocator VkResult vkCreateVideoSessionParametersKHR VkDevice device const VkVideoSessionParametersCreateInfoKHR* pCreateInfo const VkAllocationCallbacks* pAllocator VkVideoSessionParametersKHR* pVideoSessionParameters VkResult vkUpdateVideoSessionParametersKHR VkDevice device VkVideoSessionParametersKHR videoSessionParameters const VkVideoSessionParametersUpdateInfoKHR* pUpdateInfo void vkDestroyVideoSessionParametersKHR VkDevice device VkVideoSessionParametersKHR videoSessionParameters const VkAllocationCallbacks* pAllocator VkResult vkGetVideoSessionMemoryRequirementsKHR VkDevice device VkVideoSessionKHR videoSession uint32_t* pMemoryRequirementsCount VkVideoSessionMemoryRequirementsKHR* pMemoryRequirements VkResult vkBindVideoSessionMemoryKHR VkDevice device VkVideoSessionKHR videoSession uint32_t bindSessionMemoryInfoCount const VkBindVideoSessionMemoryInfoKHR* pBindSessionMemoryInfos void vkCmdDecodeVideoKHR VkCommandBuffer commandBuffer const VkVideoDecodeInfoKHR* pDecodeInfo void vkCmdBeginVideoCodingKHR VkCommandBuffer commandBuffer const VkVideoBeginCodingInfoKHR* pBeginInfo void vkCmdControlVideoCodingKHR VkCommandBuffer commandBuffer const VkVideoCodingControlInfoKHR* pCodingControlInfo void vkCmdEndVideoCodingKHR VkCommandBuffer commandBuffer const VkVideoEndCodingInfoKHR* pEndCodingInfo void vkCmdEncodeVideoKHR VkCommandBuffer commandBuffer const VkVideoEncodeInfoKHR* pEncodeInfo VkResult vkCreateCuModuleNVX VkDevice device const VkCuModuleCreateInfoNVX* pCreateInfo const VkAllocationCallbacks* pAllocator VkCuModuleNVX* pModule VkResult vkCreateCuFunctionNVX VkDevice device const VkCuFunctionCreateInfoNVX* pCreateInfo const VkAllocationCallbacks* pAllocator VkCuFunctionNVX* pFunction void vkDestroyCuModuleNVX VkDevice device VkCuModuleNVX module const VkAllocationCallbacks* pAllocator void vkDestroyCuFunctionNVX VkDevice device VkCuFunctionNVX function const VkAllocationCallbacks* pAllocator void vkCmdCuLaunchKernelNVX VkCommandBuffer commandBuffer const VkCuLaunchInfoNVX* pLaunchInfo void vkSetDeviceMemoryPriorityEXT VkDevice device VkDeviceMemory memory float priority VkResult vkAcquireDrmDisplayEXT VkPhysicalDevice physicalDevice int32_t drmFd VkDisplayKHR display VkResult vkGetDrmDisplayEXT VkPhysicalDevice physicalDevice int32_t drmFd uint32_t connectorId VkDisplayKHR* display VkResult vkWaitForPresentKHR VkDevice device VkSwapchainKHR swapchain uint64_t presentId uint64_t timeout VkResult vkCreateBufferCollectionFUCHSIA VkDevice device const VkBufferCollectionCreateInfoFUCHSIA* pCreateInfo const VkAllocationCallbacks* pAllocator VkBufferCollectionFUCHSIA* pCollection VkResult vkSetBufferCollectionBufferConstraintsFUCHSIA VkDevice device VkBufferCollectionFUCHSIA collection const VkBufferConstraintsInfoFUCHSIA* pBufferConstraintsInfo VkResult vkSetBufferCollectionImageConstraintsFUCHSIA VkDevice device VkBufferCollectionFUCHSIA collection const VkImageConstraintsInfoFUCHSIA* pImageConstraintsInfo void vkDestroyBufferCollectionFUCHSIA VkDevice device VkBufferCollectionFUCHSIA collection const VkAllocationCallbacks* pAllocator VkResult vkGetBufferCollectionPropertiesFUCHSIA VkDevice device VkBufferCollectionFUCHSIA collection VkBufferCollectionPropertiesFUCHSIA* pProperties void vkCmdBeginRendering VkCommandBuffer commandBuffer const VkRenderingInfo* pRenderingInfo void vkCmdEndRendering VkCommandBuffer commandBuffer void vkGetDescriptorSetLayoutHostMappingInfoVALVE VkDevice device const VkDescriptorSetBindingReferenceVALVE* pBindingReference VkDescriptorSetLayoutHostMappingInfoVALVE* pHostMapping void vkGetDescriptorSetHostMappingVALVE VkDevice device VkDescriptorSet descriptorSet void** ppData VkResult vkCreateMicromapEXT VkDevice device const VkMicromapCreateInfoEXT* pCreateInfo const VkAllocationCallbacks* pAllocator VkMicromapEXT* pMicromap void vkCmdBuildMicromapsEXT VkCommandBuffer commandBuffer uint32_t infoCount const VkMicromapBuildInfoEXT* pInfos VkResult vkBuildMicromapsEXT VkDevice device VkDeferredOperationKHR deferredOperation uint32_t infoCount const VkMicromapBuildInfoEXT* pInfos void vkDestroyMicromapEXT VkDevice device VkMicromapEXT micromap const VkAllocationCallbacks* pAllocator void vkCmdCopyMicromapEXT VkCommandBuffer commandBuffer const VkCopyMicromapInfoEXT* pInfo VkResult vkCopyMicromapEXT VkDevice device VkDeferredOperationKHR deferredOperation const VkCopyMicromapInfoEXT* pInfo void vkCmdCopyMicromapToMemoryEXT VkCommandBuffer commandBuffer const VkCopyMicromapToMemoryInfoEXT* pInfo VkResult vkCopyMicromapToMemoryEXT VkDevice device VkDeferredOperationKHR deferredOperation const VkCopyMicromapToMemoryInfoEXT* pInfo void vkCmdCopyMemoryToMicromapEXT VkCommandBuffer commandBuffer const VkCopyMemoryToMicromapInfoEXT* pInfo VkResult vkCopyMemoryToMicromapEXT VkDevice device VkDeferredOperationKHR deferredOperation const VkCopyMemoryToMicromapInfoEXT* pInfo void vkCmdWriteMicromapsPropertiesEXT VkCommandBuffer commandBuffer uint32_t micromapCount const VkMicromapEXT* pMicromaps VkQueryType queryType VkQueryPool queryPool uint32_t firstQuery VkResult vkWriteMicromapsPropertiesEXT VkDevice device uint32_t micromapCount const VkMicromapEXT* pMicromaps VkQueryType queryType size_t dataSize void* pData size_t stride void vkGetDeviceMicromapCompatibilityEXT VkDevice device const VkMicromapVersionInfoEXT* pVersionInfo VkAccelerationStructureCompatibilityKHR* pCompatibility void vkGetMicromapBuildSizesEXT VkDevice device VkAccelerationStructureBuildTypeKHR buildType const VkMicromapBuildInfoEXT* pBuildInfo VkMicromapBuildSizesInfoEXT* pSizeInfo void vkGetShaderModuleIdentifierEXT VkDevice device VkShaderModule shaderModule VkShaderModuleIdentifierEXT* pIdentifier void vkGetShaderModuleCreateInfoIdentifierEXT VkDevice device const VkShaderModuleCreateInfo* pCreateInfo VkShaderModuleIdentifierEXT* pIdentifier void vkGetImageSubresourceLayout2EXT VkDevice device VkImage image const VkImageSubresource2EXT* pSubresource VkSubresourceLayout2EXT* pLayout VkResult vkGetPipelinePropertiesEXT VkDevice device const VkPipelineInfoEXT* pPipelineInfo VkBaseOutStructure* pPipelineProperties void vkExportMetalObjectsEXT VkDevice device VkExportMetalObjectsInfoEXT* pMetalObjectsInfo VkResult vkGetFramebufferTilePropertiesQCOM VkDevice device VkFramebuffer framebuffer uint32_t* pPropertiesCount VkTilePropertiesQCOM* pProperties VkResult vkGetDynamicRenderingTilePropertiesQCOM VkDevice device const VkRenderingInfo* pRenderingInfo VkTilePropertiesQCOM* pProperties VkResult vkGetPhysicalDeviceOpticalFlowImageFormatsNV VkPhysicalDevice physicalDevice const VkOpticalFlowImageFormatInfoNV* pOpticalFlowImageFormatInfo uint32_t* pFormatCount VkOpticalFlowImageFormatPropertiesNV* pImageFormatProperties VkResult vkCreateOpticalFlowSessionNV VkDevice device const VkOpticalFlowSessionCreateInfoNV* pCreateInfo const VkAllocationCallbacks* pAllocator VkOpticalFlowSessionNV* pSession void vkDestroyOpticalFlowSessionNV VkDevice device VkOpticalFlowSessionNV session const VkAllocationCallbacks* pAllocator VkResult vkBindOpticalFlowSessionImageNV VkDevice device VkOpticalFlowSessionNV session VkOpticalFlowSessionBindingPointNV bindingPoint VkImageView view VkImageLayout layout void vkCmdOpticalFlowExecuteNV VkCommandBuffer commandBuffer VkOpticalFlowSessionNV session const VkOpticalFlowExecuteInfoNV* pExecuteInfo VkResult vkGetDeviceFaultInfoEXT VkDevice device VkDeviceFaultCountsEXT* pFaultCounts VkDeviceFaultInfoEXT* pFaultInfo offset 1 reserved for the old VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO_KHX enum offset 2 reserved for the old VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO_KHX enum Additional dependent types / tokens extending enumerants, not explicitly mentioned Additional dependent types / tokens extending enumerants, not explicitly mentioned This duplicates definitions in VK_KHR_device_group below VK_ANDROID_native_buffer is used between the Android Vulkan loader and drivers to implement the WSI extensions. It is not exposed to applications and uses types that are not part of Android's stable public API, so it is left disabled to keep it out of the standard Vulkan headers. This duplicates definitions in other extensions, below enum offset=0 was mistakenly used for the 1.1 core enum VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_PROPERTIES (value=1000094000). Fortunately, no conflict resulted. This extension requires buffer_device_address functionality. VK_EXT_buffer_device_address is also acceptable, but since it is deprecated the KHR version is preferred. These enums are present only to inform downstream consumers like KTX2. There is no actual Vulkan extension corresponding to the enums. VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT and VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_YCBCR_2_PLANE_444_FORMATS_FEATURES_EXT were not promoted to Vulkan 1.3. VkPhysicalDevice4444FormatsFeaturesEXT and VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_4444_FORMATS_FEATURES_EXT were not promoted to Vulkan 1.3. NV internal use only NV internal use only glad-2.0.2/glad/files/vk_platform.h000066400000000000000000000054141432671066000171410ustar00rootroot00000000000000// // File: vk_platform.h // /* ** Copyright 2014-2022 The Khronos Group Inc. ** ** SPDX-License-Identifier: Apache-2.0 */ #ifndef VK_PLATFORM_H_ #define VK_PLATFORM_H_ #ifdef __cplusplus extern "C" { #endif // __cplusplus /* *************************************************************************************************** * Platform-specific directives and type declarations *************************************************************************************************** */ /* Platform-specific calling convention macros. * * Platforms should define these so that Vulkan clients call Vulkan commands * with the same calling conventions that the Vulkan implementation expects. * * VKAPI_ATTR - Placed before the return type in function declarations. * Useful for C++11 and GCC/Clang-style function attribute syntax. * VKAPI_CALL - Placed after the return type in function declarations. * Useful for MSVC-style calling convention syntax. * VKAPI_PTR - Placed between the '(' and '*' in function pointer types. * * Function declaration: VKAPI_ATTR void VKAPI_CALL vkCommand(void); * Function pointer type: typedef void (VKAPI_PTR *PFN_vkCommand)(void); */ #if defined(_WIN32) // On Windows, Vulkan commands use the stdcall convention #define VKAPI_ATTR #define VKAPI_CALL __stdcall #define VKAPI_PTR VKAPI_CALL #elif defined(__ANDROID__) && defined(__ARM_ARCH) && __ARM_ARCH < 7 #error "Vulkan is not supported for the 'armeabi' NDK ABI" #elif defined(__ANDROID__) && defined(__ARM_ARCH) && __ARM_ARCH >= 7 && defined(__ARM_32BIT_STATE) // On Android 32-bit ARM targets, Vulkan functions use the "hardfloat" // calling convention, i.e. float parameters are passed in registers. This // is true even if the rest of the application passes floats on the stack, // as it does by default when compiling for the armeabi-v7a NDK ABI. #define VKAPI_ATTR __attribute__((pcs("aapcs-vfp"))) #define VKAPI_CALL #define VKAPI_PTR VKAPI_ATTR #else // On other platforms, use the default calling convention #define VKAPI_ATTR #define VKAPI_CALL #define VKAPI_PTR #endif #if !defined(VK_NO_STDDEF_H) #include #endif // !defined(VK_NO_STDDEF_H) #if !defined(VK_NO_STDINT_H) #if defined(_MSC_VER) && (_MSC_VER < 1600) typedef signed __int8 int8_t; typedef unsigned __int8 uint8_t; typedef signed __int16 int16_t; typedef unsigned __int16 uint16_t; typedef signed __int32 int32_t; typedef unsigned __int32 uint32_t; typedef signed __int64 int64_t; typedef unsigned __int64 uint64_t; #else #include #endif #endif // !defined(VK_NO_STDINT_H) #ifdef __cplusplus } // extern "C" #endif // __cplusplus #endif glad-2.0.2/glad/files/wgl.xml000066400000000000000000003136441432671066000157660ustar00rootroot00000000000000 Copyright 2013-2020 The Khronos Group Inc. SPDX-License-Identifier: Apache-2.0 This file, wgl.xml, is the WGL API Registry. The canonical version of the registry, together with documentation, schema, and Python generator scripts used to generate C header files for WGL, can always be found in the Khronos Registry at https://github.com/KhronosGroup/OpenGL-Registry struct _GPU_DEVICE { DWORD cb; CHAR DeviceName[32]; CHAR DeviceString[128]; DWORD Flags; RECT rcVirtualScreen; }; DECLARE_HANDLE(HPBUFFERARB); DECLARE_HANDLE(HPBUFFEREXT); DECLARE_HANDLE(HVIDEOOUTPUTDEVICENV); DECLARE_HANDLE(HPVIDEODEV); DECLARE_HANDLE(HPGPUNV); DECLARE_HANDLE(HGPUNV); DECLARE_HANDLE(HVIDEOINPUTDEVICENV); typedef struct _GPU_DEVICE GPU_DEVICE; typedef struct _GPU_DEVICE *PGPU_DEVICE; int ChoosePixelFormat HDC hDc const PIXELFORMATDESCRIPTOR *pPfd int DescribePixelFormat HDC hdc int ipfd UINT cjpfd PIXELFORMATDESCRIPTOR *ppfd int GetPixelFormat HDC hdc BOOL SetPixelFormat HDC hdc int ipfd const PIXELFORMATDESCRIPTOR *ppfd BOOL SwapBuffers HDC hdc void *wglAllocateMemoryNV GLsizei size GLfloat readfreq GLfloat writefreq GLfloat priority BOOL wglAssociateImageBufferEventsI3D HDC hDC const HANDLE *pEvent const LPVOID *pAddress const DWORD *pSize UINT count BOOL wglBeginFrameTrackingI3D GLboolean wglBindDisplayColorTableEXT GLushort id BOOL wglBindSwapBarrierNV GLuint group GLuint barrier BOOL wglBindTexImageARB HPBUFFERARB hPbuffer int iBuffer BOOL wglBindVideoCaptureDeviceNV UINT uVideoSlot HVIDEOINPUTDEVICENV hDevice BOOL wglBindVideoDeviceNV HDC hDc unsigned int uVideoSlot HVIDEOOUTPUTDEVICENV hVideoDevice const int *piAttribList BOOL wglBindVideoImageNV HPVIDEODEV hVideoDevice HPBUFFERARB hPbuffer int iVideoBuffer VOID wglBlitContextFramebufferAMD HGLRC dstCtx GLint srcX0 GLint srcY0 GLint srcX1 GLint srcY1 GLint dstX0 GLint dstY0 GLint dstX1 GLint dstY1 GLbitfield mask GLenum filter BOOL wglChoosePixelFormatARB HDC hdc const int *piAttribIList const FLOAT *pfAttribFList UINT nMaxFormats int *piFormats UINT *nNumFormats BOOL wglChoosePixelFormatEXT HDC hdc const int *piAttribIList const FLOAT *pfAttribFList UINT nMaxFormats int *piFormats UINT *nNumFormats BOOL wglCopyContext HGLRC hglrcSrc HGLRC hglrcDst UINT mask BOOL wglCopyImageSubDataNV HGLRC hSrcRC GLuint srcName GLenum srcTarget GLint srcLevel GLint srcX GLint srcY GLint srcZ HGLRC hDstRC GLuint dstName GLenum dstTarget GLint dstLevel GLint dstX GLint dstY GLint dstZ GLsizei width GLsizei height GLsizei depth HDC wglCreateAffinityDCNV const HGPUNV *phGpuList HGLRC wglCreateAssociatedContextAMD UINT id HGLRC wglCreateAssociatedContextAttribsAMD UINT id HGLRC hShareContext const int *attribList HANDLE wglCreateBufferRegionARB HDC hDC int iLayerPlane UINT uType HGLRC wglCreateContext HDC hDc HGLRC wglCreateContextAttribsARB HDC hDC HGLRC hShareContext const int *attribList GLboolean wglCreateDisplayColorTableEXT GLushort id LPVOID wglCreateImageBufferI3D HDC hDC DWORD dwSize UINT uFlags HGLRC wglCreateLayerContext HDC hDc int level HPBUFFERARB wglCreatePbufferARB HDC hDC int iPixelFormat int iWidth int iHeight const int *piAttribList HPBUFFEREXT wglCreatePbufferEXT HDC hDC int iPixelFormat int iWidth int iHeight const int *piAttribList BOOL wglDelayBeforeSwapNV HDC hDC GLfloat seconds BOOL wglDeleteAssociatedContextAMD HGLRC hglrc VOID wglDeleteBufferRegionARB HANDLE hRegion BOOL wglDeleteContext HGLRC oldContext BOOL wglDeleteDCNV HDC hdc BOOL wglDescribeLayerPlane HDC hDc int pixelFormat int layerPlane UINT nBytes LAYERPLANEDESCRIPTOR *plpd VOID wglDestroyDisplayColorTableEXT GLushort id BOOL wglDestroyImageBufferI3D HDC hDC LPVOID pAddress BOOL wglDestroyPbufferARB HPBUFFERARB hPbuffer BOOL wglDestroyPbufferEXT HPBUFFEREXT hPbuffer BOOL wglDisableFrameLockI3D BOOL wglDisableGenlockI3D HDC hDC BOOL wglDXCloseDeviceNV HANDLE hDevice BOOL wglDXLockObjectsNV HANDLE hDevice GLint count HANDLE *hObjects BOOL wglDXObjectAccessNV HANDLE hObject GLenum access HANDLE wglDXOpenDeviceNV void *dxDevice HANDLE wglDXRegisterObjectNV HANDLE hDevice void *dxObject GLuint name GLenum type GLenum access BOOL wglDXSetResourceShareHandleNV void *dxObject HANDLE shareHandle BOOL wglDXUnlockObjectsNV HANDLE hDevice GLint count HANDLE *hObjects BOOL wglDXUnregisterObjectNV HANDLE hDevice HANDLE hObject BOOL wglEnableFrameLockI3D BOOL wglEnableGenlockI3D HDC hDC BOOL wglEndFrameTrackingI3D UINT wglEnumerateVideoCaptureDevicesNV HDC hDc HVIDEOINPUTDEVICENV *phDeviceList int wglEnumerateVideoDevicesNV HDC hDc HVIDEOOUTPUTDEVICENV *phDeviceList BOOL wglEnumGpuDevicesNV HGPUNV hGpu UINT iDeviceIndex PGPU_DEVICE lpGpuDevice BOOL wglEnumGpusFromAffinityDCNV HDC hAffinityDC UINT iGpuIndex HGPUNV *hGpu BOOL wglEnumGpusNV UINT iGpuIndex HGPUNV *phGpu void wglFreeMemoryNV void *pointer BOOL wglGenlockSampleRateI3D HDC hDC UINT uRate BOOL wglGenlockSourceDelayI3D HDC hDC UINT uDelay BOOL wglGenlockSourceEdgeI3D HDC hDC UINT uEdge BOOL wglGenlockSourceI3D HDC hDC UINT uSource UINT wglGetContextGPUIDAMD HGLRC hglrc HGLRC wglGetCurrentAssociatedContextAMD HGLRC wglGetCurrentContext HDC wglGetCurrentDC HDC wglGetCurrentReadDCARB HDC wglGetCurrentReadDCEXT PROC wglGetDefaultProcAddress LPCSTR lpszProc BOOL wglGetDigitalVideoParametersI3D HDC hDC int iAttribute int *piValue UINT GetEnhMetaFilePixelFormat HENHMETAFILE hemf UINT cbBuffer PIXELFORMATDESCRIPTOR *ppfd const char *wglGetExtensionsStringARB HDC hdc const char *wglGetExtensionsStringEXT BOOL wglGetFrameUsageI3D float *pUsage BOOL wglGetGammaTableI3D HDC hDC int iEntries USHORT *puRed USHORT *puGreen USHORT *puBlue BOOL wglGetGammaTableParametersI3D HDC hDC int iAttribute int *piValue BOOL wglGetGenlockSampleRateI3D HDC hDC UINT *uRate BOOL wglGetGenlockSourceDelayI3D HDC hDC UINT *uDelay BOOL wglGetGenlockSourceEdgeI3D HDC hDC UINT *uEdge BOOL wglGetGenlockSourceI3D HDC hDC UINT *uSource UINT wglGetGPUIDsAMD UINT maxCount UINT *ids INT wglGetGPUInfoAMD UINT id INT property GLenum dataType UINT size void *data int wglGetLayerPaletteEntries HDC hdc int iLayerPlane int iStart int cEntries COLORREF *pcr BOOL wglGetMscRateOML HDC hdc INT32 *numerator INT32 *denominator HDC wglGetPbufferDCARB HPBUFFERARB hPbuffer HDC wglGetPbufferDCEXT HPBUFFEREXT hPbuffer BOOL wglGetPixelFormatAttribfvARB HDC hdc int iPixelFormat int iLayerPlane UINT nAttributes const int *piAttributes FLOAT *pfValues BOOL wglGetPixelFormatAttribfvEXT HDC hdc int iPixelFormat int iLayerPlane UINT nAttributes int *piAttributes FLOAT *pfValues BOOL wglGetPixelFormatAttribivARB HDC hdc int iPixelFormat int iLayerPlane UINT nAttributes const int *piAttributes int *piValues BOOL wglGetPixelFormatAttribivEXT HDC hdc int iPixelFormat int iLayerPlane UINT nAttributes int *piAttributes int *piValues PROC wglGetProcAddress LPCSTR lpszProc int wglGetSwapIntervalEXT BOOL wglGetSyncValuesOML HDC hdc INT64 *ust INT64 *msc INT64 *sbc BOOL wglGetVideoDeviceNV HDC hDC int numDevices HPVIDEODEV *hVideoDevice BOOL wglGetVideoInfoNV HPVIDEODEV hpVideoDevice unsigned long *pulCounterOutputPbuffer unsigned long *pulCounterOutputVideo BOOL wglIsEnabledFrameLockI3D BOOL *pFlag BOOL wglIsEnabledGenlockI3D HDC hDC BOOL *pFlag BOOL wglJoinSwapGroupNV HDC hDC GLuint group GLboolean wglLoadDisplayColorTableEXT const GLushort *table GLuint length BOOL wglLockVideoCaptureDeviceNV HDC hDc HVIDEOINPUTDEVICENV hDevice BOOL wglMakeAssociatedContextCurrentAMD HGLRC hglrc BOOL wglMakeContextCurrentARB HDC hDrawDC HDC hReadDC HGLRC hglrc BOOL wglMakeContextCurrentEXT HDC hDrawDC HDC hReadDC HGLRC hglrc BOOL wglMakeCurrent HDC hDc HGLRC newContext BOOL wglQueryCurrentContextNV int iAttribute int *piValue BOOL wglQueryFrameCountNV HDC hDC GLuint *count BOOL wglQueryFrameLockMasterI3D BOOL *pFlag BOOL wglQueryFrameTrackingI3D DWORD *pFrameCount DWORD *pMissedFrames float *pLastMissedUsage BOOL wglQueryGenlockMaxSourceDelayI3D HDC hDC UINT *uMaxLineDelay UINT *uMaxPixelDelay BOOL wglQueryMaxSwapGroupsNV HDC hDC GLuint *maxGroups GLuint *maxBarriers BOOL wglQueryPbufferARB HPBUFFERARB hPbuffer int iAttribute int *piValue BOOL wglQueryPbufferEXT HPBUFFEREXT hPbuffer int iAttribute int *piValue BOOL wglQuerySwapGroupNV HDC hDC GLuint *group GLuint *barrier BOOL wglQueryVideoCaptureDeviceNV HDC hDc HVIDEOINPUTDEVICENV hDevice int iAttribute int *piValue BOOL wglRealizeLayerPalette HDC hdc int iLayerPlane BOOL bRealize BOOL wglReleaseImageBufferEventsI3D HDC hDC const LPVOID *pAddress UINT count int wglReleasePbufferDCARB HPBUFFERARB hPbuffer HDC hDC int wglReleasePbufferDCEXT HPBUFFEREXT hPbuffer HDC hDC BOOL wglReleaseTexImageARB HPBUFFERARB hPbuffer int iBuffer BOOL wglReleaseVideoCaptureDeviceNV HDC hDc HVIDEOINPUTDEVICENV hDevice BOOL wglReleaseVideoDeviceNV HPVIDEODEV hVideoDevice BOOL wglReleaseVideoImageNV HPBUFFERARB hPbuffer int iVideoBuffer BOOL wglResetFrameCountNV HDC hDC BOOL wglRestoreBufferRegionARB HANDLE hRegion int x int y int width int height int xSrc int ySrc BOOL wglSaveBufferRegionARB HANDLE hRegion int x int y int width int height BOOL wglSendPbufferToVideoNV HPBUFFERARB hPbuffer int iBufferType unsigned long *pulCounterPbuffer BOOL bBlock BOOL wglSetDigitalVideoParametersI3D HDC hDC int iAttribute const int *piValue BOOL wglSetGammaTableI3D HDC hDC int iEntries const USHORT *puRed const USHORT *puGreen const USHORT *puBlue BOOL wglSetGammaTableParametersI3D HDC hDC int iAttribute const int *piValue int wglSetLayerPaletteEntries HDC hdc int iLayerPlane int iStart int cEntries const COLORREF *pcr BOOL wglSetPbufferAttribARB HPBUFFERARB hPbuffer const int *piAttribList BOOL wglSetStereoEmitterState3DL HDC hDC UINT uState BOOL wglShareLists HGLRC hrcSrvShare HGLRC hrcSrvSource INT64 wglSwapBuffersMscOML HDC hdc INT64 target_msc INT64 divisor INT64 remainder BOOL wglSwapLayerBuffers HDC hdc UINT fuFlags BOOL wglSwapIntervalEXT int interval INT64 wglSwapLayerBuffersMscOML HDC hdc INT fuPlanes INT64 target_msc INT64 divisor INT64 remainder BOOL wglUseFontBitmaps HDC hDC DWORD first DWORD count DWORD listBase BOOL wglUseFontBitmapsA HDC hDC DWORD first DWORD count DWORD listBase BOOL wglUseFontBitmapsW HDC hDC DWORD first DWORD count DWORD listBase BOOL wglUseFontOutlines HDC hDC DWORD first DWORD count DWORD listBase FLOAT deviation FLOAT extrusion int format LPGLYPHMETRICSFLOAT lpgmf BOOL wglUseFontOutlinesA HDC hDC DWORD first DWORD count DWORD listBase FLOAT deviation FLOAT extrusion int format LPGLYPHMETRICSFLOAT lpgmf BOOL wglUseFontOutlinesW HDC hDC DWORD first DWORD count DWORD listBase FLOAT deviation FLOAT extrusion int format LPGLYPHMETRICSFLOAT lpgmf BOOL wglWaitForMscOML HDC hdc INT64 target_msc INT64 divisor INT64 remainder INT64 *ust INT64 *msc INT64 *sbc BOOL wglWaitForSbcOML HDC hdc INT64 target_sbc INT64 *ust INT64 *msc INT64 *sbc glad-2.0.2/glad/generator/000077500000000000000000000000001432671066000153245ustar00rootroot00000000000000glad-2.0.2/glad/generator/__init__.py000066400000000000000000000246641432671066000174510ustar00rootroot00000000000000from datetime import datetime import sys import collections import os.path from jinja2 import Environment, ChoiceLoader, PackageLoader import glad from glad.config import Config from glad.sink import LoggingSink from glad.opener import URLOpener from glad.util import makefiledir if sys.version_info >= (3, 0): from urllib.parse import urlencode else: from urllib import urlencode class NullConfig(Config): pass class BaseGenerator(object): DISPLAY_NAME = None Config = NullConfig def __init__(self, path, opener=None, gen_info_factory=None): self.path = os.path.abspath(path) self.opener = opener if self.opener is None: self.opener = URLOpener.default() self.gen_info_factory = gen_info_factory or GenerationInfo.create @property def name(self): return self.DISPLAY_NAME @property def id(self): raise NotImplementedError def select(self, spec, api, version, profile, extensions, config, sink=LoggingSink(__name__)): """ Basically equivalent to `Specification.select` but gives the generator a chance to add additionally required extension, modify the result, etc. :param spec: Specification to use :param api: API name :param version: API version, None means latest :param profile: desired profile :param extensions: a list of desired extension names, None means all :param config: instance of of config specified in `CONFIG` :param sink: sink used to collect non fatal errors and information :return: FeatureSet with the required types, enums, commands/functions """ return spec.select(api, version, profile, extensions, sink=sink) def generate(self, spec, feature_set, config, sink=LoggingSink(__name__)): """ Generates a feature set with the generator. :param spec: specification of `feature_set` :param feature_set: feature set to generate :param config: instance of config specified in `CONFIG` :param sink: sink used to collect non fatal errors and information """ raise NotImplementedError def _api_filter(api): if len(api) > 5: return api.capitalize() return api.upper() class JinjaGenerator(BaseGenerator): TEMPLATES = None def __init__(self, path, opener=None, gen_info_factory=None): BaseGenerator.__init__(self, path, opener=opener, gen_info_factory=gen_info_factory) assert self.TEMPLATES is not None self.environment = Environment( loader=ChoiceLoader(list(map(PackageLoader, self.TEMPLATES))), extensions=['jinja2.ext.do'], trim_blocks=True, lstrip_blocks=True, keep_trailing_newline=True, autoescape=False ) self.environment.globals.update( set_=set, zip=zip ) self.environment.tests.update( existsin=lambda value, other: value in other ) self.environment.filters.update( api=_api_filter ) @property def id(self): raise NotImplementedError def get_templates(self, spec, feature_set, config): """ Return a list of destination and template tuples for the desired feature set and configuration. :param spec: specification :param feature_set: feature set :param config: configuration :return: [(destination, name)] """ raise NotImplementedError def modify_feature_set(self, spec, feature_set, config): """ Called before `get_templates` and for every `generate` call. Mainly useful to update definitions in order to make the template interpret types correctly. Even though it is possible to return a new feature set, such modifications should rather be done in `select`. Default implementation does nothing. :param feature_set: feature set to modify (the one passed to `get_templates`) :return: modified feature set """ return feature_set def get_template_arguments(self, spec, feature_set, config): return dict( spec=spec, feature_set=feature_set, options=config.to_dict(transform=lambda x: x.lower()), gen_info=self.gen_info_factory(self, spec, feature_set, config) ) def generate(self, spec, feature_set, config, sink=LoggingSink(__name__)): feature_set = self.modify_feature_set(spec, feature_set, config) for template, output_path in self.get_templates(spec, feature_set, config): #try: template = self.environment.get_template(template) #except TemplateNotFound: # # TODO better error, maybe let get_templates throw # raise ValueError('Unsupported specification/configuration') result = template.render( **self.get_template_arguments(spec, feature_set, config) ) output_path = os.path.join(self.path, output_path) makefiledir(output_path) with open(output_path, 'w') as f: f.write(result) self.post_generate(spec, feature_set, config) def post_generate(self, spec, feature_set, config): pass class GenerationInfo(object): def __init__(self, generator_name, generator_id, spec, info, options, extensions, when=None, commandline=None, online=None): """ Collection of information used to describe a single "generation". All held information should either be a string or be "stringifyable". :param generator_name: the generator name :param generator_id: the generator id (as it was registered with glad.plugin) :param spec: the specification name :param info: feature set information, usually glad.parse.FeatureSetInfo :param options: dictionary containing all enabled options and their value :param when: datetime when the code was generated, defaults to now :param commandline: callable used to build commandline parameters (will be pased this instance) :param online: callable used to build online parameters (will be passed this instance) """ self.generator_name = generator_name self.generator_id = generator_id self.specification = spec self.info = info self.options = options self.extensions = extensions self.when = when or datetime.now().strftime('%c') self._commandline = commandline or Commandline() self._online = online or Online() @classmethod def create(cls, generator, spec, feature_set, config, **kwargs): return cls( generator.name, generator.id, spec.name, feature_set.info, config.to_dict(), [ext.name for ext in feature_set.extensions], **kwargs ) @property def version(self): return glad.__version__ @property def commandline(self): return self._commandline.build(self) @property def online(self): return self._online.build(self) class ParameterBuilder(object): def build(self, gen_info): raise NotImplementedError def __call__(self, gen_info): return self.build(gen_info) class NullParameterBuilder(ParameterBuilder): def build(self, gen_info): return '' class Commandline(ParameterBuilder): def __init__(self): """ Parameter builder which serializes a GeneratorInfo into commandline arguments. """ pass def format_argument(self, name, value): name = name.lower().replace('_', '-') if isinstance(value, bool): return '--{name}'.format(name=name) if value else None if isinstance(value, (list, tuple)): value = ','.join(str(element) for element in value) return '--{name}=\'{value}\''.format(name=name, value=value) def build(self, gen_info): args = [] def push(name, value): formatted = self.format_argument(name, value) if formatted is not None: args.append(formatted) # general options push('merge', gen_info.info.merged) push('api', list(gen_info.info)) push('extensions', gen_info.extensions) # generator options args.append(gen_info.generator_id) for name, value in gen_info.options.items(): push(name, value) return ' '.join(args) class Online(ParameterBuilder): def __init__(self, base_url='http://glad.sh'): """ Parameter builder which serializes a GeneratorInfo into commandline arguments. :param base_url: base url of the web generator. """ self.base_url = base_url self._max_len_threshold = 2000 def format_argument(self, name, value): name = name.lower().replace('-', '_') if isinstance(value, bool): return name, 'on' if value else 'off' if isinstance(value, (list, tuple)): result = list() for element in value: if isinstance(element, (list, tuple)) and len(element) == 2: if isinstance(element[1], bool): if element[1]: result.append(element[0].upper()) else: result.append('{0}={1}'.format(*element)) else: result.append(str(element)) value = ','.join(result) return name, value def build(self, gen_info): args = collections.OrderedDict() def push(name, value): name, value = self.format_argument(name, value) args[name] = value # general options push('api', list(gen_info.info)) push('extensions', gen_info.extensions) # generator options push('generator', gen_info.generator_id) options = [('merge', gen_info.info.merged)] options.extend(gen_info.options.items()) push('options', options) def build_url(): return '{base_url}/#{data}'.format( base_url=self.base_url.rstrip('/'), data=urlencode(args) ) url = build_url() if self._max_len_threshold and len(url) > self._max_len_threshold: args.pop('extensions') url = build_url() return url glad-2.0.2/glad/generator/c/000077500000000000000000000000001432671066000155465ustar00rootroot00000000000000glad-2.0.2/glad/generator/c/__init__.py000066400000000000000000000364301432671066000176650ustar00rootroot00000000000000import copy import itertools import jinja2 import os.path import re from collections import namedtuple from contextlib import closing from glad.config import Config, ConfigOption, RequirementConstraint, UnsupportedConstraint from glad.sink import LoggingSink from glad.generator import JinjaGenerator from glad.generator.util import ( is_device_command, strip_specification_prefix, collect_alias_information, find_extensions_with_aliases, jinja2_contextfunction, jinja2_contextfilter ) from glad.parse import Type, EnumType from glad.specification import VK, GL, WGL import glad.util _ARRAY_RE = re.compile(r'\[[\d\w]*\]') DebugArguments = namedtuple('_DebugParams', ['impl', 'function', 'pre_callback', 'post_callback', 'ret']) DebugReturn = namedtuple('_DebugReturn', ['declaration', 'assignment', 'ret']) Header = namedtuple('_Header', ['name', 'include', 'url']) def type_to_c(parsed_type): result = '' for text in glad.util.itertext(parsed_type._element, ignore=('comment',)): if text == parsed_type.name: # yup * is sometimes part of the name result += '*' * text.count('*') else: result += text result = _ARRAY_RE.sub('*', result) return result.strip() def params_to_c(params): result = ', '.join(param.type._raw for param in params) if params else 'void' result = ' '.join(result.split()) return result def param_names(params): return ', '.join(param.name for param in params) @jinja2_contextfunction def loadable(context, extensions=None, api=None): spec = context['spec'] feature_set = context['feature_set'] if extensions is None: extensions = (feature_set.features, feature_set.extensions) elif len(extensions) > 0: # allow loadable(feature_set.features), nicer syntax in templates try: iter(extensions[0]) except TypeError: extensions = [extensions] for extension in itertools.chain.from_iterable(extensions): if api is None or extension.supports(api): commands = extension.get_requirements(spec, feature_set=feature_set).commands if commands: yield extension, commands def is_void(t): # lower because of win API having VOID return type_to_c(t).lower() == 'void' def get_debug_impl(command, command_code_name=None): command_code_name = command_code_name or command.name impl = params_to_c(command.params) func = param_names(command.params) pre_callback = ', '.join(filter(None, [ '"{}"'.format(command.name), '(GLADapiproc) {}'.format(command_code_name), str(len(command.params)), func ])) is_void_ret = is_void(command.proto.ret) post_callback = ('NULL, ' if is_void_ret else '(void*) &ret, ') + pre_callback ret = DebugReturn('', '', '') if not is_void_ret: ret = DebugReturn( '{} ret;\n '.format(type_to_c(command.proto.ret)), 'ret = ', 'return ret;' ) return DebugArguments(impl, func, pre_callback, post_callback, ret) @jinja2_contextfilter def ctx(jinja_context, name, context='context', raw=False, name_only=False, member=False): options = jinja_context['options'] prefix = 'glad_' if options['mx']: prefix = context + '->' if name.startswith('GLAD_'): name = name[5:] if not raw: name = strip_specification_prefix(name, jinja_context['spec']) # it's a mx struct member if member: return name # you won't the name, only when we're not mx if name_only and not options['mx']: return name return prefix + name @jinja2_contextfilter def pfn(context, value): spec = context['spec'] if spec.name in (VK.NAME,): return 'PFN_' + value return 'PFN' + value.upper() + 'PROC' @jinja2_contextfilter def c_commands(context, commands): """ The c in c_commands refers to the c file. This function filters a list of commands for the generated .c file. WGL core functions are not dynamically loaded but need to be linked, this functions filters out wgl core functions for the .c file. :param context: jinja context :param commands: list of commands :return: commands filtered """ spec = context['spec'] if not spec.name == WGL.NAME: return commands feature_set = context['feature_set'] core = feature_set.features[0].get_requirements(spec, feature_set=feature_set) return [command for command in commands if not command in core] @jinja2_contextfunction def enum_member(context, type_, member, require_value=False): if member.alias is None: return member.value feature_set = context['feature_set'] enums_of_type = type_.enums_for(feature_set) def is_enum_before(target, before): for enum in enums_of_type: if enum.name == target: return True if enum.name == before: return False if not require_value: if is_enum_before(member.alias, member.name): return member.alias # This is the part where the spec is annoying again # an enum that has been moved into core in a later version # loses its _KHR postfix, but in an earlier version this still requires an extension... # Luckily glad automatically adds the necessary enum to the feature set, # but it doesn't get generated, because it is not actually part of the selected feature set. # Just have to get the actual value now def resolve(target): target = feature_set.find_enum(target) if target.alias is None: return target.value return resolve(target.alias) return resolve(member.alias) _CPP_STYLE_COMMENT_RE = re.compile(r'(^|\s|\))//(?P.*)$', flags=re.MULTILINE) def replace_cpp_style_comments(inp): return _CPP_STYLE_COMMENT_RE.sub(r'\1/*\2 */', inp) class CConfig(Config): DEBUG = ConfigOption( converter=bool, default=False, description='Enables generation of a debug build' ) ALIAS = ConfigOption( converter=bool, default=False, description='Enables function pointer aliasing' ) MX = ConfigOption( converter=bool, default=False, description='Enables support for multiple GL contexts' ) # MX_GLOBAL = ConfigOption( # converter=bool, # default=False, # description='Mimic global GL functions with context switching' # ) HEADER_ONLY = ConfigOption( converter=bool, default=False, description='Generate a header only version of glad' ) LOADER = ConfigOption( converter=bool, default=False, description='Include internal loaders for APIs' ) ON_DEMAND = ConfigOption( converter=bool, default=False, description='On-demand function pointer loading, initialize on use (experimental)' ) __constraints__ = [ # RequirementConstraint(['MX_GLOBAL'], 'MX'), UnsupportedConstraint(['MX'], 'DEBUG'), # RequirementConstraint(['MX', 'DEBUG'], 'MX_GLOBAL') UnsupportedConstraint(['MX'], 'ON_DEMAND') ] class CGenerator(JinjaGenerator): DISPLAY_NAME = 'C/C++' TEMPLATES = ['glad.generator.c'] Config = CConfig ADDITIONAL_HEADERS = [ Header( 'khrplatform', 'KHR/khrplatform.h', 'https://raw.githubusercontent.com/KhronosGroup/EGL-Registry/main/api/KHR/khrplatform.h' ), Header( 'eglplatform', 'EGL/eglplatform.h', 'https://raw.githubusercontent.com/KhronosGroup/EGL-Registry/main/api/EGL/eglplatform.h' ), Header( 'vk_platform', 'vk_platform.h', 'https://raw.githubusercontent.com/KhronosGroup/Vulkan-Docs/main/include/vulkan/vk_platform.h' ), ] def __init__(self, *args, **kwargs): JinjaGenerator.__init__(self, *args, **kwargs) self._headers = dict() self.environment.globals.update( get_debug_impl=get_debug_impl, loadable=loadable, enum_member=enum_member, chain=itertools.chain ) self.environment.filters.update( defined=lambda x: 'defined({})'.format(x), type_to_c=type_to_c, params_to_c=params_to_c, param_names=param_names, pfn=pfn, ctx=ctx, no_prefix=jinja2_contextfilter(lambda ctx, value: strip_specification_prefix(value, ctx['spec'])), c_commands=c_commands ) self.environment.tests.update( supports=lambda x, arg: x.supports(arg), void=is_void, ) @property def id(self): return 'c' def select(self, spec, api, version, profile, extensions, config, sink=LoggingSink(__name__)): if extensions is not None: extensions = set(extensions) if api == 'wgl': # See issue #40: https://github.com/Dav1dde/glad/issues/40 # > Currently if you generate a loader without these extensions # > (WGL_ARB_extensions_string and WGL_EXT_extensions_string) it won't compile. # Adds these 2 extensions if they are missing. extensions.update(('WGL_ARB_extensions_string', 'WGL_EXT_extensions_string')) if config['ALIAS']: extensions.update(find_extensions_with_aliases(spec, api, version, profile, extensions)) return JinjaGenerator.select(self, spec, api, version, profile, extensions, config, sink=sink) def get_template_arguments(self, spec, feature_set, config): args = JinjaGenerator.get_template_arguments(self, spec, feature_set, config) # TODO allow MX for every specification/api if spec.name not in (VK.NAME, GL.NAME): args['options']['mx'] = False args['options']['mx_global'] = False args.update( aliases=collect_alias_information(feature_set.commands), # required for vulkan loader: device_commands=list(filter(is_device_command, feature_set.commands)) ) return args def get_templates(self, spec, feature_set, config): header = 'include/glad/{}.h'.format(feature_set.name) source = 'src/{}.c'.format(feature_set.name) templates = list() if config['HEADER_ONLY']: templates.extend([ ('header_only.h', header) ]) else: templates.extend([ ('{}.h'.format(spec.name), header), ('{}.c'.format(spec.name), source) ]) return templates def post_generate(self, spec, feature_set, config): self._add_additional_headers(feature_set, config) def modify_feature_set(self, spec, feature_set, config): # TODO this takes rather lonng (~30%), maybe drop it? feature_set = copy.deepcopy(feature_set) self._fix_issue_70(feature_set) self._fix_cpp_style_comments(feature_set) self._fixup_enums(feature_set) self._replace_included_headers(feature_set, config) return feature_set def _fix_issue_70(self, feature_set): """ See issue #70: https://github.com/Dav1dde/glad/issues/70 > it seems OSX already includes GLsizeiptr and a few others. > The same problem happens with glad.h as well. > The workaround appears to be to use long instead of ptrdiff_t. """ for type_name in ('GLsizeiptr', 'GLintptr', 'GLsizeiptrARB', 'GLintptrARB'): if type_name in feature_set.types: index = feature_set.types.index(type_name) type_ = copy.deepcopy(feature_set.types[index]) type_._raw = \ '#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) ' + \ '&& (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ > 1060)\n' + \ type_._raw.replace('ptrdiff_t', 'long') + '\n#else\n' + type_._raw + '\n#endif' feature_set.types[index] = type_ def _fix_cpp_style_comments(self, feature_set): """ Turns CPP-Style comments `//` into C90 compatible comments `/**/` Currently the only "workaround" needed to make Vulkan compile with -ansi. See also: https://github.com/KhronosGroup/Vulkan-Docs/pull/700 """ for i, type_ in enumerate(feature_set.types): if '//' in type_._raw: new_type = copy.deepcopy(type_) new_type._raw = replace_cpp_style_comments(new_type._raw) feature_set.types[i] = new_type def _fixup_enums(self, feature_set): """ There are some enums which are simply empty: https://github.com/KhronosGroup/Vulkan-Docs/issues/1754 they need to be removed, we need to also remove any type which is an alias to that empty enum. Additionally we need to extend type information for enum alias types, if the alias points to an enum with bitwidth 64 copy over the bitwidth information so we can later produce the correct typedef. """ bitwidth_64 = set() to_remove = set() for typ in (t for t in feature_set.types if isinstance(t, EnumType)): if typ.bitwidth == '64': bitwidth_64.add(typ.name) if typ.alias is None and not typ.enums_for(feature_set): to_remove.add(typ.name) new_types = [] for typ in feature_set.types: if typ.alias: if typ.alias in bitwidth_64: typ.bitwidth = '64' if typ.name not in to_remove and typ.alias not in to_remove: new_types.append(typ) feature_set.types = new_types def _replace_included_headers(self, feature_set, config): if not config['HEADER_ONLY']: return feature_set types = feature_set.types for header in self.ADDITIONAL_HEADERS: try: type_index = types.index(header.name) except ValueError: continue content = self._read_header(header.url) for pheader in self.ADDITIONAL_HEADERS: content = re.sub('^#include\\s*<' + pheader.include + '>', r'/* \0 */', content, flags=re.MULTILINE) types[type_index] = Type(header.name, raw=content) def _add_additional_headers(self, feature_set, config): if config['HEADER_ONLY']: return for header in self.ADDITIONAL_HEADERS: if header.name not in feature_set.types: continue path = os.path.join(self.path, 'include/{}'.format(header.include)) directory_path = os.path.split(path)[0] if not os.path.exists(directory_path): os.makedirs(directory_path) if not os.path.exists(path): content = self._read_header(header.url) with open(path, 'w') as dest: dest.write(content) def _read_header(self, url): if url not in self._headers: with closing(self.opener.urlopen(url)) as src: header = src.read().decode('utf-8') header = replace_cpp_style_comments(header) self._headers[url] = header return self._headers[url] glad-2.0.2/glad/generator/c/templates/000077500000000000000000000000001432671066000175445ustar00rootroot00000000000000glad-2.0.2/glad/generator/c/templates/base_template.c000066400000000000000000000145761432671066000225320ustar00rootroot00000000000000{% import 'template_utils.h' as template_utils with context %} /** * SPDX-License-Identifier: (WTFPL OR CC0-1.0) AND Apache-2.0 */ {% block includes %} #include #include #include {% if not options.header_only %} {% block glad_include %} #include {% endblock %} {% endif %} {% include 'impl_util.c' %} {% endblock %} #ifdef __cplusplus extern "C" { #endif {% set global_context = 'glad_' + feature_set.name + '_context' -%} {% block variables %} {% if options.mx_global %} {% call template_utils.zero_initialized() %}Glad{{ feature_set.name|api }}Context {{ global_context }}_static{% endcall %} Glad{{ feature_set.name|api }}Context* {{ global_context }} = &{{ global_context }}_static; {% endif %} {% endblock %} {% block extensions %} {% if not options.mx and not options.on_demand %} {% for extension in chain(feature_set.features, feature_set.extensions) %} {% call template_utils.protect(extension) %} int GLAD_{{ extension.name }} = 0; {% endcall %} {% endfor %} {% endif %} {% endblock %} {% block on_demand %} {% if options.on_demand %} {% for api in feature_set.info.apis %} {% if options.loader %} static GLADapiproc glad_{{ api }}_internal_loader_get_proc(const char *name); static GLADloadfunc glad_global_on_demand_{{ api }}_loader_func = glad_{{ api }}_internal_loader_get_proc; {% else %} static GLADloadfunc glad_global_on_demand_{{ api }}_loader_func = NULL; {% endif %} void gladSet{{ api|api }}OnDemandLoader(GLADloadfunc loader) { glad_global_on_demand_{{ api }}_loader_func = loader; } {% endfor %} static GLADapiproc glad_{{ spec.name }}_on_demand_loader(const char *name) { GLADapiproc result = NULL; {% for api in feature_set.info.apis %} if (result == NULL && glad_global_on_demand_{{ api }}_loader_func != NULL) { result = glad_global_on_demand_{{ api }}_loader_func(name); } {% endfor %} /* this provokes a segmentation fault if there was no loader or no loader returned something useful */ return result; } {% endif %} {% endblock %} {% block debug %} {% if options.debug %} {% block debug_default_pre %} static void _pre_call_{{ feature_set.name }}_callback_default(const char *name, GLADapiproc apiproc, int len_args, ...) { GLAD_UNUSED(name); GLAD_UNUSED(apiproc); GLAD_UNUSED(len_args); } {% endblock %} {% block debug_default_post %} static void _post_call_{{ feature_set.name }}_callback_default(void *ret, const char *name, GLADapiproc apiproc, int len_args, ...) { GLAD_UNUSED(ret); GLAD_UNUSED(name); GLAD_UNUSED(apiproc); GLAD_UNUSED(len_args); } {% endblock %} static GLADprecallback _pre_call_{{ feature_set.name }}_callback = _pre_call_{{ feature_set.name }}_callback_default; void gladSet{{ feature_set.name|api }}PreCallback(GLADprecallback cb) { _pre_call_{{ feature_set.name }}_callback = cb; } static GLADpostcallback _post_call_{{ feature_set.name }}_callback = _post_call_{{ feature_set.name }}_callback_default; void gladSet{{ feature_set.name|api }}PostCallback(GLADpostcallback cb) { _post_call_{{ feature_set.name }}_callback = cb; } {% endif %} {% endblock %} {% if not options.mx %} {% block commands %} {% for command in feature_set.commands|c_commands %} {% call template_utils.protect(command) %} {% if options.on_demand %} static {{ command.proto.ret|type_to_c }} GLAD_API_PTR glad_on_demand_impl_{{ command.name }}({{ command.params|params_to_c }}) { glad_{{ command.name }} = ({{ command.name|pfn }}) glad_{{ spec.name }}_on_demand_loader("{{ command.name }}"); {% if command.proto.ret is void %} glad_{{ command.name }}({{ command.params|param_names }}); {% else %} return glad_{{ command.name }}({{ command.params|param_names }}); {% endif %} } {{ command.name|pfn }} glad_{{ command.name }} = glad_on_demand_impl_{{ command.name }}; {% else %} {{ command.name|pfn }} glad_{{ command.name }} = NULL; {% endif %} {% if options.debug %} {% set impl = get_debug_impl(command, command.name|ctx(context=global_context)) %} static {{ command.proto.ret|type_to_c }} GLAD_API_PTR glad_debug_impl_{{ command.name }}({{ impl.impl }}) { {{ impl.ret.declaration }}_pre_call_{{ feature_set.name }}_callback({{ impl.pre_callback }}); {{ impl.ret.assignment }}{{ command.name|ctx(context=global_context) }}({{ impl.function }}); _post_call_{{ feature_set.name }}_callback({{ impl.post_callback }}); {{ impl.ret.ret }} } {{ command.name|pfn }} glad_debug_{{ command.name }} = glad_debug_impl_{{ command.name }}; {% endif %} {% endcall %} {% endfor %} {% endblock %} {% endif %} {% if not options.on_demand %} {% block extension_loaders %} {% for extension, commands in loadable() %} {% call template_utils.protect(extension) %} static void glad_{{ spec.name }}_load_{{ extension.name }}({{ template_utils.context_arg(',') }} GLADuserptrloadfunc load, void* userptr) { if(!{{ ('GLAD_' + extension.name)|ctx(name_only=True) }}) return; {% for command in commands %} {{ command.name|ctx }} = ({{ command.name|pfn }}) load(userptr, "{{ command.name }}"); {% endfor %} } {% endcall %} {% endfor %} {% endblock %} {% block aliasing %} {% if options.alias %} static void glad_{{ spec.name }}_resolve_aliases({{ template_utils.context_arg(def='void') }}) { {% for command in feature_set.commands|sort(attribute='name') %} {% call template_utils.protect(command) %} {% for alias in aliases.get(command.name, [])|reject('equalto', command.name) %} {% call template_utils.protect(alias) %} if ({{ command.name|ctx }} == NULL && {{ alias|ctx }} != NULL) {{ command.name|ctx }} = ({{ command.name|pfn }}){{ alias|ctx }}; {% endcall %} {% endfor %} {% endcall %} {% endfor %} } {% endif %} {% endblock %} {% block loader %} {% endblock %} {% endif %} {# options.on_demand #} {% if options.debug %} void gladInstall{{ feature_set.name|api }}Debug() { {% for command in feature_set.commands|c_commands %} {% call template_utils.protect(command) %} glad_debug_{{ command.name }} = glad_debug_impl_{{ command.name }}; {% endcall %} {% endfor %} } void gladUninstall{{ feature_set.name|api }}Debug() { {% for command in feature_set.commands|c_commands %} {% call template_utils.protect(command) %} glad_debug_{{ command.name }} = glad_{{ command.name }}; {% endcall %} {% endfor %} } {% endif %} {% if options.loader %} {% block loader_impl %} {% for api in feature_set.info.apis %} {% include 'loader/' + api + '.c' %} {% endfor %} {% endblock %} {% endif %} #ifdef __cplusplus } #endif glad-2.0.2/glad/generator/c/templates/base_template.h000066400000000000000000000072631432671066000225320ustar00rootroot00000000000000{% import "template_utils.h" as template_utils with context %} {% block TODO %} /** * Loader generated by glad {{ gen_info.version }} on {{ gen_info.when }} * * SPDX-License-Identifier: (WTFPL OR CC0-1.0) AND Apache-2.0 * * Generator: {{ gen_info.generator_name }} * Specification: {{ gen_info.specification }} * Extensions: {{ gen_info.extensions|length }} * * APIs: {% for info in gen_info.info %} * - {{ info }} {% endfor %} * * Options: {% for name, value in gen_info.options.items() %} * - {{ name }} = {{ value }} {% endfor %} * * Commandline: * {{ gen_info.commandline }} * * Online: * {{ gen_info.online }} * */ {% endblock %} #ifndef GLAD_{{ feature_set.name|upper }}_H_ #define GLAD_{{ feature_set.name|upper }}_H_ {% block header %} {% endblock %} #define GLAD_{{ feature_set.name|upper }} {% for option in options %} {% if options[option] %} #define GLAD_OPTION_{{ feature_set.name|upper }}_{{ option|upper }} {% endif %} {% endfor %} #ifdef __cplusplus extern "C" { #endif {% block platform %} {% include 'platform.h' %} {% endblock %} {% block enums %} {{ template_utils.write_enumerations(feature_set.enums) }} {% endblock %} {% block types %} {{ template_utils.write_types(feature_set.types) }} {% endblock %} {% block feature_information %} {{ template_utils.write_feature_information(chain(feature_set.features, feature_set.extensions), with_runtime=not options.mx and not options.on_demand) }} {% endblock %} {% block commands %} {{ template_utils.write_function_typedefs(feature_set.commands) }} {% if not options.mx %} {{ template_utils.write_function_declarations(feature_set.commands, debug=options.debug) }} {% else %} typedef struct Glad{{ feature_set.name|api }}Context { void* userptr; {% for extension in chain(feature_set.features, feature_set.extensions) %} int {{ extension.name|ctx(member=True) }}; {% endfor %} {% for command in feature_set.commands %} {% call template_utils.protect(command) %} {{ command.name|pfn }} {{ command.name|ctx(member=True) }}; {% endcall %} {% endfor %} {% if options.loader %} void* glad_loader_handle; {% endif %} } Glad{{ feature_set.name|api }}Context; {% if options.mx_global %} GLAD_API_CALL Glad{{ feature_set.name|api }}Context* glad_{{ feature_set.name }}_context; {% for extension in chain(feature_set.features, feature_set.extensions) %} #define GLAD_{{ extension.name }} (glad_{{ feature_set.name }}_context->{{ extension.name|no_prefix }}) {% endfor %} {% for command in feature_set.commands %} #define {{ command.name }} (glad_{{ feature_set.name }}_context->{{ command.name|no_prefix }}) {% endfor %} {% endif %} {% endif %} {% endblock %} {% block declarations %} {% if options.on_demand %} {% for api in feature_set.info.apis %} GLAD_API_CALL void gladSet{{ api|api }}OnDemandLoader(GLADloadfunc loader); {% endfor %} {% endif %} {% if options.mx_global %} Glad{{ feature_set.name|api }}Context* gladGet{{ feature_set.name|api }}Context(void); GLAD_API_CALL void gladSet{{ feature_set.name|api }}Context(Glad{{ feature_set.name|api }}Context *context); {% endif %} {% if options.debug %} GLAD_API_CALL void gladSet{{ feature_set.name|api }}PreCallback(GLADprecallback cb); GLAD_API_CALL void gladSet{{ feature_set.name|api }}PostCallback(GLADpostcallback cb); GLAD_API_CALL void gladInstall{{ feature_set.name|api }}Debug(void); GLAD_API_CALL void gladUninstall{{ feature_set.name|api }}Debug(void); {% endif %} {% endblock %} {% if not options.on_demand %} {% block custom_declarations %} {% endblock %} {% endif %} {% if options.loader %} {% block loader_impl %} {% for api in feature_set.info.apis %} {% include 'loader/' + api + '.h' %} {% endfor %} {% endblock %} {% endif %} #ifdef __cplusplus } #endif #endif glad-2.0.2/glad/generator/c/templates/egl.c000066400000000000000000000070611432671066000204630ustar00rootroot00000000000000{% extends 'base_template.c' %} {% block loader %} static int glad_egl_get_extensions(EGLDisplay display, const char **extensions) { *extensions = eglQueryString(display, EGL_EXTENSIONS); return extensions != NULL; } static int glad_egl_has_extension(const char *extensions, const char *ext) { const char *loc; const char *terminator; if(extensions == 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; } } static GLADapiproc glad_egl_get_proc_from_userptr(void *userptr, const char *name) { return (GLAD_GNUC_EXTENSION (GLADapiproc (*)(const char *name)) userptr)(name); } {% for api in feature_set.info.apis %} static int glad_egl_find_extensions_{{ api|lower }}(EGLDisplay display) { const char *extensions; if (!glad_egl_get_extensions(display, &extensions)) return 0; {% for extension in feature_set.extensions %} GLAD_{{ extension.name }} = glad_egl_has_extension(extensions, "{{ extension.name }}"); {% else %} GLAD_UNUSED(glad_egl_has_extension); {% endfor %} return 1; } static int glad_egl_find_core_{{ api|lower }}(EGLDisplay display) { int major, minor; const char *version; if (display == NULL) { display = EGL_NO_DISPLAY; /* this is usually NULL, better safe than sorry */ } if (display == EGL_NO_DISPLAY) { display = eglGetCurrentDisplay(); } #ifdef EGL_VERSION_1_4 if (display == EGL_NO_DISPLAY) { display = eglGetDisplay(EGL_DEFAULT_DISPLAY); } #endif #ifndef EGL_VERSION_1_5 if (display == EGL_NO_DISPLAY) { return 0; } #endif version = eglQueryString(display, EGL_VERSION); (void) eglGetError(); if (version == NULL) { major = 1; minor = 0; } else { GLAD_IMPL_UTIL_SSCANF(version, "%d.%d", &major, &minor); } {% for feature in feature_set.features %} GLAD_{{ feature.name }} = (major == {{ feature.version.major }} && minor >= {{ feature.version.minor }}) || major > {{ feature.version.major }}; {% endfor %} return GLAD_MAKE_VERSION(major, minor); } int gladLoad{{ api|api }}UserPtr(EGLDisplay display, GLADuserptrloadfunc load, void* userptr) { int version; eglGetDisplay = (PFNEGLGETDISPLAYPROC) load(userptr, "eglGetDisplay"); eglGetCurrentDisplay = (PFNEGLGETCURRENTDISPLAYPROC) load(userptr, "eglGetCurrentDisplay"); eglQueryString = (PFNEGLQUERYSTRINGPROC) load(userptr, "eglQueryString"); eglGetError = (PFNEGLGETERRORPROC) load(userptr, "eglGetError"); if (eglGetDisplay == NULL || eglGetCurrentDisplay == NULL || eglQueryString == NULL || eglGetError == NULL) return 0; version = glad_egl_find_core_{{ api|lower }}(display); if (!version) return 0; {% for feature, _ in loadable(feature_set.features) %} glad_egl_load_{{ feature.name }}(load, userptr); {% endfor %} if (!glad_egl_find_extensions_{{ api|lower }}(display)) return 0; {% for extension, _ in loadable(feature_set.extensions) %} glad_egl_load_{{ extension.name }}(load, userptr); {% endfor %} {% if options.alias %} glad_egl_resolve_aliases(); {% endif %} return version; } int gladLoad{{ api|api }}(EGLDisplay display, GLADloadfunc load) { return gladLoad{{ api|api }}UserPtr(display, glad_egl_get_proc_from_userptr, GLAD_GNUC_EXTENSION (void*) load); } {% endfor %} {% endblock %}glad-2.0.2/glad/generator/c/templates/egl.h000066400000000000000000000005011432671066000204600ustar00rootroot00000000000000{% extends 'base_template.h' %} {% block custom_declarations %} {% for api in feature_set.info.apis %} GLAD_API_CALL int gladLoad{{ api|api }}UserPtr(EGLDisplay display, GLADuserptrloadfunc load, void *userptr); GLAD_API_CALL int gladLoad{{ api|api }}(EGLDisplay display, GLADloadfunc load); {% endfor %} {% endblock %} glad-2.0.2/glad/generator/c/templates/gl.c000066400000000000000000000173031432671066000203160ustar00rootroot00000000000000{% extends 'base_template.c' %} {% block debug_default_pre %} static void _pre_call_{{ feature_set.name }}_callback_default(const char *name, GLADapiproc apiproc, int len_args, ...) { GLAD_UNUSED(len_args); if (apiproc == NULL) { fprintf(stderr, "GLAD: ERROR %s is NULL!\n", name); return; } if (glad_glGetError == NULL) { fprintf(stderr, "GLAD: ERROR glGetError is NULL!\n"); return; } (void) glad_glGetError(); } {% endblock %} {% block debug_default_post %} static void _post_call_{{ feature_set.name }}_callback_default(void *ret, const char *name, GLADapiproc apiproc, int len_args, ...) { GLenum error_code; GLAD_UNUSED(ret); GLAD_UNUSED(apiproc); GLAD_UNUSED(len_args); error_code = glad_glGetError(); if (error_code != GL_NO_ERROR) { fprintf(stderr, "GLAD: ERROR %d in %s!\n", error_code, name); } } {% endblock %} {% block loader %} #if defined(GL_ES_VERSION_3_0) || defined(GL_VERSION_3_0) #define GLAD_GL_IS_SOME_NEW_VERSION 1 #else #define GLAD_GL_IS_SOME_NEW_VERSION 0 #endif static int glad_gl_get_extensions({{ template_utils.context_arg(',') }} int version, const char **out_exts, unsigned int *out_num_exts_i, char ***out_exts_i) { #if GLAD_GL_IS_SOME_NEW_VERSION if(GLAD_VERSION_MAJOR(version) < 3) { #else GLAD_UNUSED(version); GLAD_UNUSED(out_num_exts_i); GLAD_UNUSED(out_exts_i); #endif if ({{ 'glGetString'|ctx }} == NULL) { return 0; } *out_exts = (const char *){{ 'glGetString'|ctx }}(GL_EXTENSIONS); #if GLAD_GL_IS_SOME_NEW_VERSION } else { unsigned int index = 0; unsigned int num_exts_i = 0; char **exts_i = NULL; if ({{ 'glGetStringi'|ctx }} == NULL || {{ 'glGetIntegerv'|ctx }} == NULL) { return 0; } {{ 'glGetIntegerv'|ctx }}(GL_NUM_EXTENSIONS, (int*) &num_exts_i); if (num_exts_i > 0) { exts_i = (char **) malloc(num_exts_i * (sizeof *exts_i)); } if (exts_i == NULL) { return 0; } for(index = 0; index < num_exts_i; index++) { const char *gl_str_tmp = (const char*) {{ 'glGetStringi'|ctx }}(GL_EXTENSIONS, index); size_t len = strlen(gl_str_tmp) + 1; char *local_str = (char*) malloc(len * sizeof(char)); if(local_str != NULL) { memcpy(local_str, gl_str_tmp, len * sizeof(char)); } exts_i[index] = local_str; } *out_num_exts_i = num_exts_i; *out_exts_i = exts_i; } #endif return 1; } static void glad_gl_free_extensions(char **exts_i, unsigned int num_exts_i) { if (exts_i != NULL) { unsigned int index; for(index = 0; index < num_exts_i; index++) { free((void *) (exts_i[index])); } free((void *)exts_i); exts_i = NULL; } } static int glad_gl_has_extension(int version, const char *exts, unsigned int num_exts_i, char **exts_i, const char *ext) { if(GLAD_VERSION_MAJOR(version) < 3 || !GLAD_GL_IS_SOME_NEW_VERSION) { 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; } } else { unsigned int index; for(index = 0; index < num_exts_i; index++) { const char *e = exts_i[index]; if(strcmp(e, ext) == 0) { return 1; } } } 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); } {% for api in feature_set.info.apis %} static int glad_gl_find_extensions_{{ api|lower }}({{ template_utils.context_arg(',') }} int version) { const char *exts = NULL; unsigned int num_exts_i = 0; char **exts_i = NULL; if (!glad_gl_get_extensions({{ 'context, ' if options.mx }}version, &exts, &num_exts_i, &exts_i)) return 0; {% for extension in feature_set.extensions|select('supports', api) %} {{ ('GLAD_' + extension.name)|ctx(name_only=True) }} = glad_gl_has_extension(version, exts, num_exts_i, exts_i, "{{ extension.name }}"); {% else %} GLAD_UNUSED(glad_gl_has_extension); {% endfor %} glad_gl_free_extensions(exts_i, num_exts_i); return 1; } static int glad_gl_find_core_{{ api|lower }}({{ template_utils.context_arg(def='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*) {{ 'glGetString'|ctx }}(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); {% for feature in feature_set.features|select('supports', api) %} {{ ('GLAD_' + feature.name)|ctx(name_only=True) }} = (major == {{ feature.version.major }} && minor >= {{ feature.version.minor }}) || major > {{ feature.version.major }}; {% endfor %} return GLAD_MAKE_VERSION(major, minor); } int gladLoad{{ api|api }}{{ 'Context' if options.mx }}UserPtr({{ template_utils.context_arg(',') }} GLADuserptrloadfunc load, void *userptr) { int version; {{ 'glGetString'|ctx }} = (PFNGLGETSTRINGPROC) load(userptr, "glGetString"); if({{ 'glGetString'|ctx }} == NULL) return 0; if({{ 'glGetString'|ctx }}(GL_VERSION) == NULL) return 0; version = glad_gl_find_core_{{ api|lower }}({{ 'context' if options.mx }}); {% for feature, _ in loadable(feature_set.features, api=api) %} glad_gl_load_{{ feature.name }}({{'context, ' if options.mx }}load, userptr); {% endfor %} if (!glad_gl_find_extensions_{{ api|lower }}({{ 'context, ' if options.mx }}version)) return 0; {% for extension, _ in loadable(feature_set.extensions, api=api) %} glad_gl_load_{{ extension.name }}({{'context, ' if options.mx }}load, userptr); {% endfor %} {% if options.mx_global %} gladSet{{ feature_set.name|api }}Context(context); {% endif %} {% if options.alias %} glad_gl_resolve_aliases({{ 'context' if options.mx }}); {% endif %} return version; } {% if options.mx_global %} int gladLoad{{ api|api }}UserPtr(GLADuserptrloadfunc load, void *userptr) { return gladLoad{{ api|api }}ContextUserPtr(gladGet{{ feature_set.name|api }}Context(), load, userptr); } {% endif %} int gladLoad{{ api|api }}{{ 'Context' if options.mx }}({{ template_utils.context_arg(',') }} GLADloadfunc load) { return gladLoad{{ api|api }}{{ 'Context' if options.mx }}UserPtr({{'context,' if options.mx }} glad_gl_get_proc_from_userptr, GLAD_GNUC_EXTENSION (void*) load); } {% if options.mx_global %} int gladLoad{{ api|api }}(GLADloadfunc load) { return gladLoad{{ api|api }}Context(gladGet{{ feature_set.name|api }}Context(), load); } {% endif %} {% endfor %} {% if options.mx_global %} Glad{{ feature_set.name|api }}Context* gladGet{{ feature_set.name|api }}Context() { return {{ global_context }}; } void gladSet{{ feature_set.name|api }}Context(Glad{{ feature_set.name|api }}Context *context) { {{ global_context }} = context; } {% endif %} {% endblock %} glad-2.0.2/glad/generator/c/templates/gl.h000066400000000000000000000030111432671066000203120ustar00rootroot00000000000000{% extends 'base_template.h' %} {% block header %} #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wreserved-id-macro" #endif {% set header_data = [ ('gl', '__gl_h_', 'OpenGL (gl.h)'), ('gl', '__gl3_h_', 'OpenGL (gl3.h)'), ('gl', '__glext_h_', 'OpenGL (glext.h)'), ('gl', '__gl3ext_h_', 'OpenGL (gl3ext.h)'), ('gles1', '__gl_h_', 'OpenGL ES 1'), ('gles1', '__gles1_gl_h_', 'OpenGL ES 1'), ('gles2', '__gl2_h_', 'OpenGL ES 2'), ('gles2', '__gles2_gl2_h_', 'OpenGL ES 2'), ('gles2', '__gl3_h_', 'OpenGL ES 3'), ('gles2', '__gles2_gl3_h_', 'OpenGL ES 3'), ] %} {% set written = [] %} {% for api, header_name, name in header_data %} {% if api in feature_set.info.apis and header_name not in written -%} {{ template_utils.header_error(api, header_name, name) }} {%- do written.append(header_name) -%} {%- endif -%} {%- endfor -%} #ifdef __clang__ #pragma clang diagnostic pop #endif {% endblock %} {% block custom_declarations %} {% for api in feature_set.info.apis %} GLAD_API_CALL int gladLoad{{ api|api }}{{ 'Context' if options.mx }}UserPtr({{ template_utils.context_arg(',') }} GLADuserptrloadfunc load, void *userptr); GLAD_API_CALL int gladLoad{{ api|api }}{{ 'Context' if options.mx }}({{ template_utils.context_arg(',') }} GLADloadfunc load); {% if options.mx_global %} GLAD_API_CALL int gladLoad{{ api|api }}UserPtr(GLADuserptrloadfunc load, void *userptr); GLAD_API_CALL int gladLoad{{ api|api }}(GLADloadfunc load); {% endif %} {% endfor %} {% endblock %} glad-2.0.2/glad/generator/c/templates/glx.c000066400000000000000000000057111432671066000205060ustar00rootroot00000000000000{% extends 'base_template.c' %} {% block loader %} static int glad_glx_has_extension(Display *display, int screen, const char *ext) { #ifndef GLX_VERSION_1_1 GLAD_UNUSED(display); GLAD_UNUSED(screen); GLAD_UNUSED(ext); #else const char *terminator; const char *loc; const char *extensions; if (glXQueryExtensionsString == NULL) { return 0; } extensions = glXQueryExtensionsString(display, screen); if(extensions == NULL || ext == NULL) { return 0; } while(1) { loc = strstr(extensions, ext); if(loc == NULL) break; terminator = loc + strlen(ext); if((loc == extensions || *(loc - 1) == ' ') && (*terminator == ' ' || *terminator == '\0')) { return 1; } extensions = terminator; } #endif return 0; } static GLADapiproc glad_glx_get_proc_from_userptr(void *userptr, const char* name) { return (GLAD_GNUC_EXTENSION (GLADapiproc (*)(const char *name)) userptr)(name); } {% for api in feature_set.info.apis %} static int glad_glx_find_extensions(Display *display, int screen) { {% for extension in feature_set.extensions %} GLAD_{{ extension.name }} = glad_glx_has_extension(display, screen, "{{ extension.name }}"); {% else %} GLAD_UNUSED(glad_glx_has_extension); {% endfor %} return 1; } static int glad_glx_find_core_{{ api|lower }}(Display **display, int *screen) { int major = 0, minor = 0; if(*display == NULL) { #ifdef GLAD_GLX_NO_X11 GLAD_UNUSED(screen); return 0; #else *display = XOpenDisplay(0); if (*display == NULL) { return 0; } *screen = XScreenNumberOfScreen(XDefaultScreenOfDisplay(*display)); #endif } glXQueryVersion(*display, &major, &minor); {% for feature in feature_set.features %} GLAD_{{ feature.name }} = (major == {{ feature.version.major }} && minor >= {{ feature.version.minor }}) || major > {{ feature.version.major }}; {% endfor %} return GLAD_MAKE_VERSION(major, minor); } int gladLoad{{ api|api }}UserPtr(Display *display, int screen, GLADuserptrloadfunc load, void *userptr) { int version; glXQueryVersion = (PFNGLXQUERYVERSIONPROC) load(userptr, "glXQueryVersion"); if(glXQueryVersion == NULL) return 0; version = glad_glx_find_core_{{ api|lower }}(&display, &screen); {% for feature, _ in loadable(feature_set.features) %} glad_glx_load_{{ feature.name }}(load, userptr); {% endfor %} if (!glad_glx_find_extensions(display, screen)) return 0; {% for extension, _ in loadable(feature_set.extensions) %} glad_glx_load_{{ extension.name }}(load, userptr); {% endfor %} {% if options.alias %} glad_glx_resolve_aliases(); {% endif %} return version; } int gladLoad{{ api|api }}(Display *display, int screen, GLADloadfunc load) { return gladLoad{{ api|api }}UserPtr(display, screen, glad_glx_get_proc_from_userptr, GLAD_GNUC_EXTENSION (void*) load); } {% endfor %} {% endblock %}glad-2.0.2/glad/generator/c/templates/glx.h000066400000000000000000000010701432671066000205050ustar00rootroot00000000000000{% extends 'base_template.h' %} {% block header %} {{ template_utils.header_error(feature_set.name, feature_set.name|upper + '_H', feature_set.name|api) }} #include #include #include #include {% endblock %} {% block custom_declarations %} {% for api in feature_set.info.apis %} GLAD_API_CALL int gladLoad{{ api|api }}UserPtr(Display *display, int screen, GLADuserptrloadfunc load, void *userptr); GLAD_API_CALL int gladLoad{{ api|api }}(Display *display, int screen, GLADloadfunc load); {% endfor %} {% endblock %}glad-2.0.2/glad/generator/c/templates/header_only.h000066400000000000000000000003041432671066000222030ustar00rootroot00000000000000{% include spec.name + '.h' %} /* Source */ #ifdef GLAD_{{ feature_set.name|upper }}_IMPLEMENTATION {% include spec.name + '.c' %} #endif /* GLAD_{{ feature_set.name|upper }}_IMPLEMENTATION */ glad-2.0.2/glad/generator/c/templates/impl_util.c000066400000000000000000000002761432671066000217130ustar00rootroot00000000000000#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_ */ glad-2.0.2/glad/generator/c/templates/loader/000077500000000000000000000000001432671066000210125ustar00rootroot00000000000000glad-2.0.2/glad/generator/c/templates/loader/egl.c000066400000000000000000000052201432671066000217240ustar00rootroot00000000000000{% import "template_utils.h" as template_utils with context %} #ifdef GLAD_EGL {% include 'loader/library.c' %} struct _glad_egl_userptr { void *handle; PFNEGLGETPROCADDRESSPROC get_proc_address_ptr; }; static GLADapiproc glad_egl_get_proc(void *vuserptr, const char* name) { struct _glad_egl_userptr userptr = *(struct _glad_egl_userptr*) vuserptr; GLADapiproc result = NULL; result = glad_dlsym_handle(userptr.handle, name); if (result == NULL) { result = GLAD_GNUC_EXTENSION (GLADapiproc) userptr.get_proc_address_ptr(name); } return result; } static void* _egl_handle = NULL; static void* glad_egl_dlopen_handle(void) { #if GLAD_PLATFORM_APPLE static const char *NAMES[] = {"libEGL.dylib"}; #elif GLAD_PLATFORM_WIN32 static const char *NAMES[] = {"libEGL.dll", "EGL.dll"}; #else static const char *NAMES[] = {"libEGL.so.1", "libEGL.so"}; #endif if (_egl_handle == NULL) { _egl_handle = glad_get_dlopen_handle(NAMES, sizeof(NAMES) / sizeof(NAMES[0])); } return _egl_handle; } static struct _glad_egl_userptr glad_egl_build_userptr(void *handle) { struct _glad_egl_userptr userptr; userptr.handle = handle; userptr.get_proc_address_ptr = (PFNEGLGETPROCADDRESSPROC) glad_dlsym_handle(handle, "eglGetProcAddress"); return userptr; } {% if not options.on_demand %} int gladLoaderLoadEGL(EGLDisplay display) { int version = 0; void *handle = NULL; int did_load = 0; struct _glad_egl_userptr userptr; did_load = _egl_handle == NULL; handle = glad_egl_dlopen_handle(); if (handle != NULL) { userptr = glad_egl_build_userptr(handle); if (userptr.get_proc_address_ptr != NULL) { version = gladLoadEGLUserPtr(display, glad_egl_get_proc, &userptr); } if (!version && did_load) { gladLoaderUnloadEGL(); } } return version; } {% endif %} {% if options.on_demand %} {% call template_utils.zero_initialized() %}static struct _glad_egl_userptr glad_egl_internal_loader_global_userptr{% endcall %} static GLADapiproc glad_egl_internal_loader_get_proc(const char *name) { if (glad_egl_internal_loader_global_userptr.handle == NULL) { glad_egl_internal_loader_global_userptr = glad_egl_build_userptr(glad_egl_dlopen_handle()); } return glad_egl_get_proc((void *) &glad_egl_internal_loader_global_userptr, name); } {% endif %} void gladLoaderUnloadEGL() { if (_egl_handle != NULL) { glad_close_dlopen_handle(_egl_handle); _egl_handle = NULL; {% if options.on_demand %} glad_egl_internal_loader_global_userptr.handle = NULL; {% endif %} } } #endif /* GLAD_EGL */ glad-2.0.2/glad/generator/c/templates/loader/egl.h000066400000000000000000000002531432671066000217320ustar00rootroot00000000000000#ifdef GLAD_EGL {% if not options.on_demand %} GLAD_API_CALL int gladLoaderLoadEGL(EGLDisplay display); {% endif %} GLAD_API_CALL void gladLoaderUnloadEGL(void); #endifglad-2.0.2/glad/generator/c/templates/loader/gl.c000066400000000000000000000074721432671066000215720ustar00rootroot00000000000000{% import "template_utils.h" as template_utils with context %} #ifdef GLAD_GL {% include 'loader/library.c' %} typedef void* (GLAD_API_PTR *GLADglprocaddrfunc)(const char*); struct _glad_gl_userptr { void *handle; GLADglprocaddrfunc gl_get_proc_address_ptr; }; static GLADapiproc glad_gl_get_proc(void *vuserptr, const char *name) { struct _glad_gl_userptr userptr = *(struct _glad_gl_userptr*) vuserptr; GLADapiproc result = NULL; if(userptr.gl_get_proc_address_ptr != NULL) { result = GLAD_GNUC_EXTENSION (GLADapiproc) userptr.gl_get_proc_address_ptr(name); } if(result == NULL) { result = glad_dlsym_handle(userptr.handle, name); } return result; } {% if not options.mx %} static void* {{ template_utils.handle() }} = NULL; {% endif %} static void* glad_gl_dlopen_handle({{ template_utils.context_arg(def='void') }}) { #if GLAD_PLATFORM_APPLE static const char *NAMES[] = { "../Frameworks/OpenGL.framework/OpenGL", "/Library/Frameworks/OpenGL.framework/OpenGL", "/System/Library/Frameworks/OpenGL.framework/OpenGL", "/System/Library/Frameworks/OpenGL.framework/Versions/Current/OpenGL" }; #elif GLAD_PLATFORM_WIN32 static const char *NAMES[] = {"opengl32.dll"}; #else static const char *NAMES[] = { #if defined(__CYGWIN__) "libGL-1.so", #endif "libGL.so.1", "libGL.so" }; #endif if ({{ template_utils.handle() }} == NULL) { {{ template_utils.handle() }} = glad_get_dlopen_handle(NAMES, sizeof(NAMES) / sizeof(NAMES[0])); } return {{ template_utils.handle() }}; } static struct _glad_gl_userptr glad_gl_build_userptr(void *handle) { struct _glad_gl_userptr userptr; userptr.handle = handle; #if GLAD_PLATFORM_APPLE || defined(__HAIKU__) userptr.gl_get_proc_address_ptr = NULL; #elif GLAD_PLATFORM_WIN32 userptr.gl_get_proc_address_ptr = (GLADglprocaddrfunc) glad_dlsym_handle(handle, "wglGetProcAddress"); #else userptr.gl_get_proc_address_ptr = (GLADglprocaddrfunc) glad_dlsym_handle(handle, "glXGetProcAddressARB"); #endif return userptr; } {% if not options.on_demand %} int gladLoaderLoadGL{{ 'Context' if options.mx }}({{ template_utils.context_arg(def='void') }}) { int version = 0; void *handle; int did_load = 0; struct _glad_gl_userptr userptr; did_load = {{ template_utils.handle() }} == NULL; handle = glad_gl_dlopen_handle({{ 'context' if options.mx }}); if (handle) { userptr = glad_gl_build_userptr(handle); version = gladLoadGL{{ 'Context' if options.mx }}UserPtr({{ 'context,' if options.mx }}glad_gl_get_proc, &userptr); if (did_load) { gladLoaderUnloadGL{{ 'Context' if options.mx }}({{ 'context' if options.mx }}); } } return version; } {% endif %} {% if options.on_demand %} {% call template_utils.zero_initialized() %}static struct _glad_gl_userptr glad_gl_internal_loader_global_userptr{% endcall %} static GLADapiproc glad_gl_internal_loader_get_proc(const char *name) { if (glad_gl_internal_loader_global_userptr.handle == NULL) { glad_gl_internal_loader_global_userptr = glad_gl_build_userptr(glad_gl_dlopen_handle()); } return glad_gl_get_proc((void *) &glad_gl_internal_loader_global_userptr, name); } {% endif %} {% if options.mx_global %} int gladLoaderLoadGL(void) { return gladLoaderLoadGLContext(gladGet{{ feature_set.name|api }}Context()); } {% endif %} void gladLoaderUnloadGL{{ 'Context' if options.mx }}({{ template_utils.context_arg(def='void') }}) { if ({{ template_utils.handle() }} != NULL) { glad_close_dlopen_handle({{ template_utils.handle() }}); {{ template_utils.handle() }} = NULL; {% if options.on_demand %} glad_gl_internal_loader_global_userptr.handle = NULL; {% endif %} } } #endif /* GLAD_GL */ glad-2.0.2/glad/generator/c/templates/loader/gl.h000066400000000000000000000006641432671066000215730ustar00rootroot00000000000000{% import "template_utils.h" as template_utils with context %} #ifdef GLAD_GL {% if not options.on_demand %} GLAD_API_CALL int gladLoaderLoadGL{{ 'Context' if options.mx }}({{ template_utils.context_arg(def='void') }}); {% endif %} {% if options.mx_global %} GLAD_API_CALL int gladLoaderLoadGL(void); {% endif %} GLAD_API_CALL void gladLoaderUnloadGL{{ 'Context' if options.mx }}({{ template_utils.context_arg(def='void') }}); #endif glad-2.0.2/glad/generator/c/templates/loader/gles1.c000066400000000000000000000066561432671066000222060ustar00rootroot00000000000000{% import "template_utils.h" as template_utils with context %} #ifdef GLAD_GLES1 {% include 'loader/library.c' %} #include struct _glad_gles1_userptr { void *handle; PFNEGLGETPROCADDRESSPROC get_proc_address_ptr; }; static GLADapiproc glad_gles1_get_proc(void *vuserptr, const char* name) { struct _glad_gles1_userptr userptr = *(struct _glad_gles1_userptr*) vuserptr; GLADapiproc result = NULL; {# /* dlsym first, since some implementations don't return function pointers for core functions */ #} result = glad_dlsym_handle(userptr.handle, name); if (result == NULL) { result = userptr.get_proc_address_ptr(name); } return result; } {% if not options.mx %} static void* {{ template_utils.handle() }} = NULL; {% endif %} static void* glad_gles1_dlopen_handle({{ template_utils.context_arg(def='void') }}) { #if GLAD_PLATFORM_APPLE static const char *NAMES[] = {"libGLESv1_CM.dylib"}; #elif GLAD_PLATFORM_WIN32 static const char *NAMES[] = {"GLESv1_CM.dll", "libGLESv1_CM", "libGLES_CM.dll"}; #else static const char *NAMES[] = {"libGLESv1_CM.so.1", "libGLESv1_CM.so", "libGLES_CM.so.1"}; #endif if ({{ template_utils.handle() }} == NULL) { {{ template_utils.handle() }} = glad_get_dlopen_handle(NAMES, sizeof(NAMES) / sizeof(NAMES[0])); } return {{ template_utils.handle() }}; } static struct _glad_gles1_userptr glad_gles1_build_userptr(void *handle) { struct _glad_gles1_userptr userptr; userptr.handle = handle; userptr.get_proc_address_ptr = eglGetProcAddress; return userptr; } {% if not options.on_demand %} int gladLoaderLoadGLES1{{ 'Context' if options.mx }}({{ template_utils.context_arg(def='void') }}) { int version = 0; void *handle = NULL; int did_load = 0; struct _glad_gles1_userptr userptr; if (eglGetProcAddress == NULL) { return 0; } did_load = {{ template_utils.handle() }} == NULL; handle = glad_gles1_dlopen_handle({{ 'context' if options.mx }}); if (handle != NULL) { userptr = glad_gles1_build_userptr(handle); version = gladLoadGLES1{{ 'Context' if options.mx }}UserPtr({{ 'context, ' if options.mx }}glad_gles1_get_proc, &userptr); if (!version && did_load) { gladLoaderUnloadGLES1{{ 'Context' if options.mx }}({{ 'context' if options.mx }}); } } return version; } {% endif %} {% if options.on_demand %} {% call template_utils.zero_initialized() %}static struct _glad_gles1_userptr glad_gles1_internal_loader_global_userptr{% endcall %} static GLADapiproc glad_gles1_internal_loader_get_proc(const char *name) { if (glad_gles1_internal_loader_global_userptr.handle == NULL) { glad_gles1_internal_loader_global_userptr = glad_gles1_build_userptr(glad_gles1_dlopen_handle()); } return glad_gles1_get_proc((void *) &glad_gles1_internal_loader_global_userptr, name); } {% endif %} {% if options.mx_global %} int gladLoaderLoadGLES1(void) { return gladLoaderLoadGLES1Context(gladGet{{ feature_set.name|api }}Context()); } {% endif %} void gladLoaderUnloadGLES1{{ 'Context' if options.mx }}({{ template_utils.context_arg(def='void') }}) { if ({{ template_utils.handle() }} != NULL) { glad_close_dlopen_handle({{ template_utils.handle() }}); {{ template_utils.handle() }} = NULL; {% if options.on_demand %} glad_gles1_internal_loader_global_userptr.handle = NULL; {% endif %} } } #endif /* GLAD_GLES1 */ glad-2.0.2/glad/generator/c/templates/loader/gles1.h000066400000000000000000000011171432671066000221760ustar00rootroot00000000000000{% import "template_utils.h" as template_utils with context %} #ifdef GLAD_GLES1 {# #ifndef __egl_h_ #error "gles1 loader requires egl.h, include egl.h () before including the loader." #endif #} {% if not options.on_demand %} GLAD_API_CALL int gladLoaderLoadGLES1{{ 'Context' if options.mx }}({{ template_utils.context_arg(def='void') }}); {% endif %} {% if options.mx_global %} GLAD_API_CALL int gladLoaderLoadGLES1(void); {% endif %} GLAD_API_CALL void gladLoaderUnloadGLES1{{ 'Context' if options.mx }}({{ template_utils.context_arg(def='void') }}); #endif /* GLAD_GLES1 */ glad-2.0.2/glad/generator/c/templates/loader/gles2.c000066400000000000000000000106651432671066000222020ustar00rootroot00000000000000{% import "template_utils.h" as template_utils with context %} #ifdef GLAD_GLES2 {% include 'loader/library.c' %} #if GLAD_PLATFORM_EMSCRIPTEN #ifndef GLAD_EGL_H_ typedef void (*__eglMustCastToProperFunctionPointerType)(void); typedef __eglMustCastToProperFunctionPointerType (GLAD_API_PTR *PFNEGLGETPROCADDRESSPROC)(const char *name); #endif extern __eglMustCastToProperFunctionPointerType emscripten_GetProcAddress(const char *name); #else #include #endif struct _glad_gles2_userptr { void *handle; PFNEGLGETPROCADDRESSPROC get_proc_address_ptr; }; static GLADapiproc glad_gles2_get_proc(void *vuserptr, const char* name) { struct _glad_gles2_userptr userptr = *(struct _glad_gles2_userptr*) vuserptr; GLADapiproc result = NULL; #if GLAD_PLATFORM_EMSCRIPTEN GLAD_UNUSED(glad_dlsym_handle); #else {# /* dlsym first, since some implementations don't return function pointers for core functions */ #} result = glad_dlsym_handle(userptr.handle, name); #endif if (result == NULL) { result = userptr.get_proc_address_ptr(name); } return result; } {% if not options.mx %} static void* {{ template_utils.handle() }} = NULL; {% endif %} static void* glad_gles2_dlopen_handle({{ template_utils.context_arg(def='void') }}) { #if GLAD_PLATFORM_EMSCRIPTEN #elif GLAD_PLATFORM_APPLE static const char *NAMES[] = {"libGLESv2.dylib"}; #elif GLAD_PLATFORM_WIN32 static const char *NAMES[] = {"GLESv2.dll", "libGLESv2.dll"}; #else static const char *NAMES[] = {"libGLESv2.so.2", "libGLESv2.so"}; #endif #if GLAD_PLATFORM_EMSCRIPTEN GLAD_UNUSED(glad_get_dlopen_handle); return NULL; #else if ({{ template_utils.handle() }} == NULL) { {{ template_utils.handle() }} = glad_get_dlopen_handle(NAMES, sizeof(NAMES) / sizeof(NAMES[0])); } return {{ template_utils.handle() }}; #endif } static struct _glad_gles2_userptr glad_gles2_build_userptr(void *handle) { struct _glad_gles2_userptr userptr; #if GLAD_PLATFORM_EMSCRIPTEN GLAD_UNUSED(handle); userptr.get_proc_address_ptr = emscripten_GetProcAddress; #else userptr.handle = handle; userptr.get_proc_address_ptr = eglGetProcAddress; #endif return userptr; } {% if not options.on_demand %} int gladLoaderLoadGLES2{{ 'Context' if options.mx }}({{ template_utils.context_arg(def='void') }}) { int version = 0; void *handle = NULL; int did_load = 0; struct _glad_gles2_userptr userptr; #if GLAD_PLATFORM_EMSCRIPTEN GLAD_UNUSED(handle); GLAD_UNUSED(did_load); GLAD_UNUSED(glad_gles2_dlopen_handle); GLAD_UNUSED(glad_gles2_build_userptr); userptr.get_proc_address_ptr = emscripten_GetProcAddress; version = gladLoadGLES2{{ 'Context' if options.mx }}UserPtr({{ 'context, ' if options.mx }}glad_gles2_get_proc, &userptr); #else if (eglGetProcAddress == NULL) { return 0; } did_load = {{ template_utils.handle() }} == NULL; handle = glad_gles2_dlopen_handle({{ 'context' if options.mx }}); if (handle != NULL) { userptr = glad_gles2_build_userptr(handle); version = gladLoadGLES2{{ 'Context' if options.mx }}UserPtr({{ 'context, ' if options.mx }}glad_gles2_get_proc, &userptr); if (!version && did_load) { gladLoaderUnloadGLES2{{ 'Context' if options.mx }}({{ 'context' if options.mx }}); } } #endif return version; } {% endif %} {% if options.on_demand %} {% call template_utils.zero_initialized() %}static struct _glad_gles2_userptr glad_gles2_internal_loader_global_userptr{% endcall %} static GLADapiproc glad_gles2_internal_loader_get_proc(const char *name) { if (glad_gles2_internal_loader_global_userptr.get_proc_address_ptr == NULL) { glad_gles2_internal_loader_global_userptr = glad_gles2_build_userptr(glad_gles2_dlopen_handle()); } return glad_gles2_get_proc((void *) &glad_gles2_internal_loader_global_userptr, name); } {% endif %} {% if options.mx_global %} int gladLoaderLoadGLES2(void) { return gladLoaderLoadGLES2Context(gladGet{{ feature_set.name|api }}Context()); } {% endif %} void gladLoaderUnloadGLES2{{ 'Context' if options.mx }}({{ template_utils.context_arg(def='void') }}) { if ({{ template_utils.handle() }} != NULL) { glad_close_dlopen_handle({{ template_utils.handle() }}); {{ template_utils.handle() }} = NULL; {% if options.on_demand %} glad_gles2_internal_loader_global_userptr.get_proc_address_ptr = NULL; {% endif %} } } #endif /* GLAD_GLES2 */ glad-2.0.2/glad/generator/c/templates/loader/gles2.h000066400000000000000000000011201432671066000221710ustar00rootroot00000000000000{% import "template_utils.h" as template_utils with context %} #ifdef GLAD_GLES2 {# #ifndef __egl_h_ #error "gles2 loader requires egl.h, include egl.h () before including the loader." #endif #} {% if not options.on_demand %} GLAD_API_CALL int gladLoaderLoadGLES2{{ 'Context' if options.mx }}({{ template_utils.context_arg(def='void') }}); {% endif %} {% if options.mx_global %} GLAD_API_CALL int gladLoaderLoadGLES2(void); {% endif %} GLAD_API_CALL void gladLoaderUnloadGLES2{{ 'Context' if options.mx }}({{ template_utils.context_arg(def='void') }}); #endif /* GLAD_GLES2 */ glad-2.0.2/glad/generator/c/templates/loader/glsc2.c000066400000000000000000000000001432671066000221560ustar00rootroot00000000000000glad-2.0.2/glad/generator/c/templates/loader/glsc2.h000066400000000000000000000000001432671066000221630ustar00rootroot00000000000000glad-2.0.2/glad/generator/c/templates/loader/glx.c000066400000000000000000000040051432671066000217470ustar00rootroot00000000000000#ifdef GLAD_GLX {% include 'loader/library.c' %} typedef void* (GLAD_API_PTR *GLADglxprocaddrfunc)(const char*); static GLADapiproc glad_glx_get_proc(void *userptr, const char *name) { return GLAD_GNUC_EXTENSION ((GLADapiproc (*)(const char *name)) userptr)(name); } static void* _glx_handle; static void* glad_glx_dlopen_handle(void) { static const char *NAMES[] = { #if defined __CYGWIN__ "libGL-1.so", #endif "libGL.so.1", "libGL.so" }; if (_glx_handle == NULL) { _glx_handle = glad_get_dlopen_handle(NAMES, sizeof(NAMES) / sizeof(NAMES[0])); } return _glx_handle; } {% if not options.on_demand %} int gladLoaderLoadGLX(Display *display, int screen) { int version = 0; void *handle = NULL; int did_load = 0; GLADglxprocaddrfunc loader; did_load = _glx_handle == NULL; handle = glad_glx_dlopen_handle(); if (handle != NULL) { loader = (GLADglxprocaddrfunc) glad_dlsym_handle(handle, "glXGetProcAddressARB"); if (loader != NULL) { version = gladLoadGLXUserPtr(display, screen, glad_glx_get_proc, GLAD_GNUC_EXTENSION (void*) loader); } if (!version && did_load) { gladLoaderUnloadGLX(); } } return version; } {% endif %} {% if options.on_demand %} static GLADglxprocaddrfunc glad_glx_internal_loader_global_userptr = NULL; static GLADapiproc glad_glx_internal_loader_get_proc(const char *name) { if (glad_glx_internal_loader_global_userptr == NULL) { glad_glx_internal_loader_global_userptr = (GLADglxprocaddrfunc) glad_dlsym_handle(glad_glx_dlopen_handle(), "glXGetProcAddressARB"); } return glad_glx_get_proc(GLAD_GNUC_EXTENSION (void *) glad_glx_internal_loader_global_userptr, name); } {% endif %} void gladLoaderUnloadGLX() { if (_glx_handle != NULL) { glad_close_dlopen_handle(_glx_handle); _glx_handle = NULL; {% if options.on_demand %} glad_glx_internal_loader_global_userptr = NULL; {% endif %} } } #endif /* GLAD_GLX */ glad-2.0.2/glad/generator/c/templates/loader/glx.h000066400000000000000000000002651432671066000217600ustar00rootroot00000000000000#ifdef GLAD_GLX {% if not options.on_demand %} GLAD_API_CALL int gladLoaderLoadGLX(Display *display, int screen); {% endif %} GLAD_API_CALL void gladLoaderUnloadGLX(void); #endifglad-2.0.2/glad/generator/c/templates/loader/library.c000066400000000000000000000030041432671066000226170ustar00rootroot00000000000000#ifndef GLAD_LOADER_LIBRARY_C_ #define GLAD_LOADER_LIBRARY_C_ #include #include #if GLAD_PLATFORM_WIN32 #include #else #include #endif static void* glad_get_dlopen_handle(const char *lib_names[], int length) { void *handle = NULL; int i; for (i = 0; i < length; ++i) { #if GLAD_PLATFORM_WIN32 #if GLAD_PLATFORM_UWP size_t buffer_size = (strlen(lib_names[i]) + 1) * sizeof(WCHAR); LPWSTR buffer = (LPWSTR) malloc(buffer_size); if (buffer != NULL) { int ret = MultiByteToWideChar(CP_ACP, 0, lib_names[i], -1, buffer, buffer_size); if (ret != 0) { handle = (void*) LoadPackagedLibrary(buffer, 0); } free((void*) buffer); } #else handle = (void*) LoadLibraryA(lib_names[i]); #endif #else handle = dlopen(lib_names[i], RTLD_LAZY | RTLD_LOCAL); #endif if (handle != NULL) { return handle; } } return NULL; } static void glad_close_dlopen_handle(void* handle) { if (handle != NULL) { #if GLAD_PLATFORM_WIN32 FreeLibrary((HMODULE) handle); #else dlclose(handle); #endif } } static GLADapiproc glad_dlsym_handle(void* handle, const char *name) { if (handle == NULL) { return NULL; } #if GLAD_PLATFORM_WIN32 return (GLADapiproc) GetProcAddress((HMODULE) handle, name); #else return GLAD_GNUC_EXTENSION (GLADapiproc) dlsym(handle, name); #endif } #endif /* GLAD_LOADER_LIBRARY_C_ */ glad-2.0.2/glad/generator/c/templates/loader/vulkan.c000066400000000000000000000120151432671066000224550ustar00rootroot00000000000000{% import "template_utils.h" as template_utils with context %} #ifdef GLAD_VULKAN {% include 'loader/library.c' %} static const char* DEVICE_FUNCTIONS[] = { {% for command in device_commands %} "{{ command.name }}", {% endfor %} }; static int glad_vulkan_is_device_function(const char *name) { /* Exists as a workaround for: * https://github.com/KhronosGroup/Vulkan-LoaderAndValidationLayers/issues/2323 * * `vkGetDeviceProcAddr` does not return NULL for non-device functions. */ int i; int length = sizeof(DEVICE_FUNCTIONS) / sizeof(DEVICE_FUNCTIONS[0]); for (i=0; i < length; ++i) { if (strcmp(DEVICE_FUNCTIONS[i], name) == 0) { return 1; } } return 0; } struct _glad_vulkan_userptr { void *vk_handle; VkInstance vk_instance; VkDevice vk_device; PFN_vkGetInstanceProcAddr get_instance_proc_addr; PFN_vkGetDeviceProcAddr get_device_proc_addr; }; static GLADapiproc glad_vulkan_get_proc(void *vuserptr, const char *name) { struct _glad_vulkan_userptr userptr = *(struct _glad_vulkan_userptr*) vuserptr; PFN_vkVoidFunction result = NULL; if (userptr.vk_device != NULL && glad_vulkan_is_device_function(name)) { result = userptr.get_device_proc_addr(userptr.vk_device, name); } if (result == NULL && userptr.vk_instance != NULL) { result = userptr.get_instance_proc_addr(userptr.vk_instance, name); } if(result == NULL) { result = (PFN_vkVoidFunction) glad_dlsym_handle(userptr.vk_handle, name); } return (GLADapiproc) result; } {% if not options.mx %} static void* {{ template_utils.handle() }} = NULL; {% endif %} static void* glad_vulkan_dlopen_handle({{ template_utils.context_arg(def='void') }}) { static const char *NAMES[] = { #if GLAD_PLATFORM_APPLE "libvulkan.1.dylib", #elif GLAD_PLATFORM_WIN32 "vulkan-1.dll", "vulkan.dll", #else "libvulkan.so.1", "libvulkan.so", #endif }; if ({{ template_utils.handle() }} == NULL) { {{ template_utils.handle() }} = glad_get_dlopen_handle(NAMES, sizeof(NAMES) / sizeof(NAMES[0])); } return {{ template_utils.handle() }}; } static struct _glad_vulkan_userptr glad_vulkan_build_userptr(void *handle, VkInstance instance, VkDevice device) { struct _glad_vulkan_userptr userptr; userptr.vk_handle = handle; userptr.vk_instance = instance; userptr.vk_device = device; userptr.get_instance_proc_addr = (PFN_vkGetInstanceProcAddr) glad_dlsym_handle(handle, "vkGetInstanceProcAddr"); userptr.get_device_proc_addr = (PFN_vkGetDeviceProcAddr) glad_dlsym_handle(handle, "vkGetDeviceProcAddr"); return userptr; } {% if not options.on_demand %} int gladLoaderLoadVulkan{{ 'Context' if options.mx }}({{ template_utils.context_arg(',') }} VkInstance instance, VkPhysicalDevice physical_device, VkDevice device) { int version = 0; void *handle = NULL; int did_load = 0; struct _glad_vulkan_userptr userptr; did_load = {{ template_utils.handle() }} == NULL; handle = glad_vulkan_dlopen_handle({{ 'context' if options.mx }}); if (handle != NULL) { userptr = glad_vulkan_build_userptr(handle, instance, device); if (userptr.get_instance_proc_addr != NULL && userptr.get_device_proc_addr != NULL) { version = gladLoadVulkan{{ 'Context' if options.mx }}UserPtr({{ 'context,' if options.mx }} physical_device, glad_vulkan_get_proc, &userptr); } if (!version && did_load) { gladLoaderUnloadVulkan{{ 'Context' if options.mx }}({{ 'context' if options.mx }}); } } return version; } {% endif %} {% if options.on_demand %} {% call template_utils.zero_initialized() %}static struct _glad_vulkan_userptr glad_vulkan_internal_loader_global_userptr{% endcall %} void gladLoaderSetVulkanInstance(VkInstance instance) { glad_vulkan_internal_loader_global_userptr.vk_instance = instance; } void gladLoaderSetVulkanDevice(VkDevice device) { glad_vulkan_internal_loader_global_userptr.vk_device = device; } static GLADapiproc glad_vulkan_internal_loader_get_proc(const char *name) { if (glad_vulkan_internal_loader_global_userptr.vk_handle == NULL) { glad_vulkan_internal_loader_global_userptr = glad_vulkan_build_userptr(glad_vulkan_dlopen_handle(), NULL, NULL); } return glad_vulkan_get_proc((void *) &glad_vulkan_internal_loader_global_userptr, name); } {% endif %} {% if options.mx_global %} int gladLoaderLoadVulkan(VkInstance instance, VkPhysicalDevice physical_device, VkDevice device) { return gladLoaderLoadVulkanContext(gladGetVulkanContext(), instance, physical_device, device); } {% endif %} void gladLoaderUnloadVulkan{{ 'Context' if options.mx }}({{ template_utils.context_arg(def='void') }}) { if ({{ template_utils.handle() }} != NULL) { glad_close_dlopen_handle({{ template_utils.handle() }}); {{ template_utils.handle() }} = NULL; {% if options.on_demand %} glad_vulkan_internal_loader_global_userptr.vk_handle = NULL; {% endif %} } } #endif /* GLAD_VULKAN */ glad-2.0.2/glad/generator/c/templates/loader/vulkan.h000066400000000000000000000013631432671066000224660ustar00rootroot00000000000000{% import "template_utils.h" as template_utils with context %} #ifdef GLAD_VULKAN {% if not options.on_demand %} GLAD_API_CALL int gladLoaderLoadVulkan{{ 'Context' if options.mx }}({{ template_utils.context_arg(',') }} VkInstance instance, VkPhysicalDevice physical_device, VkDevice device); {% endif %} {% if options.mx_global %} GLAD_API_CALL int gladLoaderLoadVulkan(VkInstance instance, VkPhysicalDevice physical_device, VkDevice device); {% endif %} GLAD_API_CALL void gladLoaderUnloadVulkan{{ 'Context' if options.mx }}({{ template_utils.context_arg(def='void') }}); {% if options.on_demand %} GLAD_API_CALL void gladLoaderSetVulkanInstance(VkInstance instance); GLAD_API_CALL void gladLoaderSetVulkanDevice(VkDevice device); {% endif %} #endif glad-2.0.2/glad/generator/c/templates/loader/wgl.c000066400000000000000000000010311432671066000217420ustar00rootroot00000000000000#ifdef GLAD_WGL {% if not options.on_demand %} static GLADapiproc glad_wgl_get_proc(void *vuserptr, const char* name) { GLAD_UNUSED(vuserptr); return GLAD_GNUC_EXTENSION (GLADapiproc) wglGetProcAddress(name); } int gladLoaderLoadWGL(HDC hdc) { return gladLoadWGLUserPtr(hdc, glad_wgl_get_proc, NULL); } {% endif %} {% if options.on_demand %} static GLADapiproc glad_wgl_internal_loader_get_proc(const char *name) { return GLAD_GNUC_EXTENSION (GLADapiproc) wglGetProcAddress(name); } {% endif %} #endif /* GLAD_WGL */ glad-2.0.2/glad/generator/c/templates/loader/wgl.h000066400000000000000000000001611432671066000217520ustar00rootroot00000000000000#ifdef GLAD_WGL {% if not options.on_demand %} GLAD_API_CALL int gladLoaderLoadWGL(HDC hdc); {% endif %} #endifglad-2.0.2/glad/generator/c/templates/platform.h000066400000000000000000000057371432671066000215550ustar00rootroot00000000000000#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 "{{ gen_info.version }}" 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_ */ glad-2.0.2/glad/generator/c/templates/template_utils.h000066400000000000000000000073451432671066000227610ustar00rootroot00000000000000{% macro header_error(api, header_name, name) %} #ifdef {{ header_name }} #error {{ name }} header already included (API: {{ api }}), remove previous include! #endif #define {{ header_name }} 1 {% endmacro %} {% macro context_arg(suffix='', def='') -%} {{ 'Glad' + feature_set.name|api + 'Context *context' + suffix if options.mx else def }} {%- endmacro %} {% macro handle() -%} {{ 'context->glad' if options.mx else '_glad_' + feature_set.name|api }}_loader_handle {%- endmacro %} {% macro protect(symbol) %} {% set protections = spec.protections(symbol, feature_set=feature_set) %} {% if protections %} #if {{ protections|map('defined')|join(' || ') }} {% endif %} {{ caller() }} {%- if protections %} #endif {% endif %} {% endmacro %} {% macro write_feature_information(extensions, with_runtime=True) %} {% for extension in extensions %} {% call protect(extension) %} #define {{ extension.name }} 1 {% if with_runtime %} GLAD_API_CALL int GLAD_{{ extension.name }}; {% endif %} {% endcall %} {% endfor %} {% endmacro %} {% macro write_types(types) %} {# we assume the types are sorted correctly #} {% for type in types %} {{ write_type(type) }} {% endfor %} {% endmacro %} {% macro write_type(type) %} {% call protect(type) %} {% if type.category == 'enum' -%} {% if type.alias -%} {% if type.bitwidth == '64' -%} typedef {{ type.alias }} {{ type.name }}; {% else -%} typedef enum {{ type.alias }} {{ type.name }}; {% endif %} {% elif type.bitwidth == '64' %} typedef uint64_t {{ type.name }}; {% for member in type.enums_for(feature_set) %} static const {{ member.parent_type }} {{ member.name }} = {{ enum_member(type, member, require_value=True) }}; {% endfor %} {% else %} {%- if type.enums_for(feature_set) -%} typedef enum {{ type.name }} { {% for member in type.enums_for(feature_set) %} {{ member.name }} = {{ enum_member(type, member) }}, {% endfor %} {{ '{}_MAX_ENUM{}'.format(*type.expanded_name) }} = 0x7FFFFFFF } {{ type.name }}; {%- endif -%} {% endif -%} {% elif type.category in ('struct', 'union') -%} typedef {{ type.category }} {% if type.alias %}{{ type.alias }}{% else %}{{ type.name }}{% endif %} {% if type.members %}{ {% for member in type.members %} {{ member.type._raw }}; {% endfor %} }{% endif %} {{ type.name }}; {% elif type.alias %} #define {{ type.name }} {{ type.alias }} {%- elif type._raw|trim -%} {{ type._raw|trim|replace('APIENTRY', 'GLAD_API_PTR') }} {%- elif type.category == 'include' %} #include <{{ type.name }}> {%- endif -%} {% endcall %} {% endmacro %} {% macro write_enumerations(enumerations) %} {% for enum in enumerations %} {% call protect(enum) %} #define {{ enum.name }} {{ feature_set.find_enum(enum.alias, enum).value }} {% endcall %} {% endfor %} {% endmacro %} {% macro write_function_definitions(commands) %} {% for command in commands %} {% call protect(command) %} {{ command.proto.ret|type_to_c }} {{ command.name }}({{ command.params|params_to_c }}); {% endcall %} {% endfor %} {% endmacro %} {% macro write_function_typedefs(commands) %} {% for command in commands %} {% call protect(command) %} typedef {{ command.proto.ret|type_to_c }} (GLAD_API_PTR *{{ command.name|pfn }})({{ command.params|params_to_c }}); {% endcall %} {% endfor %} {% endmacro %} {% macro write_function_declarations(commands, debug=False) %} {% for command in commands %} {% call protect(command) %} GLAD_API_CALL {{ command.name|pfn }} glad_{{ command.name }}; {% if debug %} GLAD_API_CALL {{ command.name|pfn }} glad_debug_{{ command.name }}; #define {{ command.name }} glad_debug_{{ command.name }} {% else %} #define {{ command.name }} glad_{{ command.name }} {% endif %} {% endcall %} {% endfor %} {% endmacro %} {% macro zero_initialized(s) %} #ifdef __cplusplus {{ caller() }} = {}; #else {{ caller() }} = { 0 }; #endif {% endmacro %} glad-2.0.2/glad/generator/c/templates/vk.c000066400000000000000000000205031432671066000203300ustar00rootroot00000000000000{% extends 'base_template.c' %} {% block loader %} static int glad_vk_get_extensions({{ template_utils.context_arg(',') }} VkPhysicalDevice physical_device, uint32_t *out_extension_count, char ***out_extensions) { uint32_t i; uint32_t instance_extension_count = 0; uint32_t device_extension_count = 0; uint32_t max_extension_count = 0; uint32_t total_extension_count = 0; char **extensions = NULL; VkExtensionProperties *ext_properties = NULL; VkResult result; if ({{ 'vkEnumerateInstanceExtensionProperties'|ctx }} == NULL || (physical_device != NULL && {{ 'vkEnumerateDeviceExtensionProperties'|ctx }} == NULL)) { return 0; } result = {{ 'vkEnumerateInstanceExtensionProperties'|ctx }}(NULL, &instance_extension_count, NULL); if (result != VK_SUCCESS) { return 0; } if (physical_device != NULL) { result = {{ 'vkEnumerateDeviceExtensionProperties'|ctx }}(physical_device, NULL, &device_extension_count, NULL); if (result != VK_SUCCESS) { return 0; } } total_extension_count = instance_extension_count + device_extension_count; if (total_extension_count <= 0) { return 0; } max_extension_count = instance_extension_count > device_extension_count ? instance_extension_count : device_extension_count; ext_properties = (VkExtensionProperties*) malloc(max_extension_count * sizeof(VkExtensionProperties)); if (ext_properties == NULL) { goto glad_vk_get_extensions_error; } result = {{ 'vkEnumerateInstanceExtensionProperties'|ctx }}(NULL, &instance_extension_count, ext_properties); if (result != VK_SUCCESS) { goto glad_vk_get_extensions_error; } extensions = (char**) calloc(total_extension_count, sizeof(char*)); if (extensions == NULL) { goto glad_vk_get_extensions_error; } for (i = 0; i < instance_extension_count; ++i) { VkExtensionProperties ext = ext_properties[i]; size_t extension_name_length = strlen(ext.extensionName) + 1; extensions[i] = (char*) malloc(extension_name_length * sizeof(char)); if (extensions[i] == NULL) { goto glad_vk_get_extensions_error; } memcpy(extensions[i], ext.extensionName, extension_name_length * sizeof(char)); } if (physical_device != NULL) { result = {{ 'vkEnumerateDeviceExtensionProperties'|ctx }}(physical_device, NULL, &device_extension_count, ext_properties); if (result != VK_SUCCESS) { goto glad_vk_get_extensions_error; } for (i = 0; i < device_extension_count; ++i) { VkExtensionProperties ext = ext_properties[i]; size_t extension_name_length = strlen(ext.extensionName) + 1; extensions[instance_extension_count + i] = (char*) malloc(extension_name_length * sizeof(char)); if (extensions[instance_extension_count + i] == NULL) { goto glad_vk_get_extensions_error; } memcpy(extensions[instance_extension_count + i], ext.extensionName, extension_name_length * sizeof(char)); } } free((void*) ext_properties); *out_extension_count = total_extension_count; *out_extensions = extensions; return 1; glad_vk_get_extensions_error: free((void*) ext_properties); if (extensions != NULL) { for (i = 0; i < total_extension_count; ++i) { free((void*) extensions[i]); } free(extensions); } return 0; } static void glad_vk_free_extensions(uint32_t extension_count, char **extensions) { uint32_t i; for(i = 0; i < extension_count ; ++i) { free((void*) (extensions[i])); } free((void*) extensions); } static int glad_vk_has_extension(const char *name, uint32_t extension_count, char **extensions) { uint32_t i; for (i = 0; i < extension_count; ++i) { if(extensions[i] != NULL && strcmp(name, extensions[i]) == 0) { return 1; } } return 0; } static GLADapiproc glad_vk_get_proc_from_userptr(void *userptr, const char* name) { return (GLAD_GNUC_EXTENSION (GLADapiproc (*)(const char *name)) userptr)(name); } {% for api in feature_set.info.apis %} static int glad_vk_find_extensions_{{ api|lower }}({{ template_utils.context_arg(',') }} VkPhysicalDevice physical_device) { uint32_t extension_count = 0; char **extensions = NULL; if (!glad_vk_get_extensions({{'context, ' if options.mx }}physical_device, &extension_count, &extensions)) return 0; {% for extension in feature_set.extensions %} {% call template_utils.protect(extension) %} {{ ('GLAD_' + extension.name)|ctx(name_only=True) }} = glad_vk_has_extension("{{ extension.name }}", extension_count, extensions); {% endcall %} {% endfor %} {# Special case: only one extension which is protected -> unused at compile time only on some platforms #} GLAD_UNUSED(glad_vk_has_extension); glad_vk_free_extensions(extension_count, extensions); return 1; } static int glad_vk_find_core_{{ api|lower }}({{ template_utils.context_arg(',') }} VkPhysicalDevice physical_device) { int major = 1; int minor = 0; #ifdef VK_VERSION_1_1 if ({{ 'vkEnumerateInstanceVersion'|ctx }} != NULL) { uint32_t version; VkResult result; result = {{ 'vkEnumerateInstanceVersion'|ctx }}(&version); if (result == VK_SUCCESS) { major = (int) VK_VERSION_MAJOR(version); minor = (int) VK_VERSION_MINOR(version); } } #endif if (physical_device != NULL && {{ 'vkGetPhysicalDeviceProperties'|ctx }} != NULL) { VkPhysicalDeviceProperties properties; {{ 'vkGetPhysicalDeviceProperties'|ctx }}(physical_device, &properties); major = (int) VK_VERSION_MAJOR(properties.apiVersion); minor = (int) VK_VERSION_MINOR(properties.apiVersion); } {% for feature in feature_set.features %} {{ ('GLAD_' + feature.name)|ctx(name_only=True) }} = (major == {{ feature.version.major }} && minor >= {{ feature.version.minor }}) || major > {{ feature.version.major }}; {% endfor %} return GLAD_MAKE_VERSION(major, minor); } int gladLoad{{ api|api }}{{ 'Context' if options.mx }}UserPtr({{ template_utils.context_arg(',') }} VkPhysicalDevice physical_device, GLADuserptrloadfunc load, void *userptr) { int version; #ifdef VK_VERSION_1_1 {{ 'vkEnumerateInstanceVersion '|ctx }} = (PFN_vkEnumerateInstanceVersion) load(userptr, "vkEnumerateInstanceVersion"); #endif version = glad_vk_find_core_{{ api|lower }}({{ 'context,' if options.mx }} physical_device); if (!version) { return 0; } {% for feature, _ in loadable(feature_set.features) %} glad_vk_load_{{ feature.name }}({{'context, ' if options.mx }}load, userptr); {% endfor %} if (!glad_vk_find_extensions_{{ api|lower }}({{ 'context,' if options.mx }} physical_device)) return 0; {% for extension, _ in loadable(feature_set.extensions) %} {% call template_utils.protect(extension) %} glad_vk_load_{{ extension.name }}({{'context, ' if options.mx }}load, userptr); {% endcall %} {% endfor %} {% if options.mx_global %} gladSet{{ api|api }}Context(context); {% endif %} {%- if options.alias %} glad_vk_resolve_aliases({{ 'context' if options.mx }}); {% endif %} return version; } {% if options.mx_global %} int gladLoad{{ api|api }}UserPtr(VkPhysicalDevice physical_device, GLADuserptrloadfunc load, void *userptr) { return gladLoad{{ api|api }}ContextUserPtr(gladGet{{ api|api }}Context(), physical_device, load, userptr); } {% endif %} int gladLoad{{ api|api }}{{ 'Context' if options.mx }}({{ template_utils.context_arg(',') }} VkPhysicalDevice physical_device, GLADloadfunc load) { return gladLoad{{ api|api }}{{ 'Context' if options.mx }}UserPtr({{'context,' if options.mx }} physical_device, glad_vk_get_proc_from_userptr, GLAD_GNUC_EXTENSION (void*) load); } {% if options.mx_global %} int gladLoad{{ api|api }}(VkPhysicalDevice physical_device, GLADloadfunc load) { return gladLoad{{ api|api }}Context(gladGet{{ api|api }}Context(), physical_device, load); } {% endif %} {% endfor %} {% if options.mx_global %} Glad{{ feature_set.name|api }}Context* gladGet{{ feature_set.name|api }}Context() { return {{ global_context }}; } void gladSet{{ feature_set.name|api }}Context(Glad{{ feature_set.name|api }}Context *context) { {{ global_context }} = context; } {% endif %} {% endblock %} glad-2.0.2/glad/generator/c/templates/vk.h000066400000000000000000000017401432671066000203370ustar00rootroot00000000000000{% extends 'base_template.h' %} {% block header %} {{ template_utils.header_error(feature_set.name, feature_set.name.upper() + '_H_', name) }} {{ template_utils.header_error(feature_set.name, feature_set.name.upper() + '_CORE_H_', name) }} {% endblock %} {% block custom_declarations %} {% for api in feature_set.info.apis %} GLAD_API_CALL int gladLoad{{ api|api }}{{ 'Context' if options.mx }}UserPtr({{ template_utils.context_arg(',') }} VkPhysicalDevice physical_device, GLADuserptrloadfunc load, void *userptr); GLAD_API_CALL int gladLoad{{ api|api }}{{ 'Context' if options.mx }}({{ template_utils.context_arg(',') }} VkPhysicalDevice physical_device, GLADloadfunc load); {% endfor %} {% if options.mx_global %} GLAD_API_CALL int gladLoad{{ feature_set.name|api }}UserPtr(VkPhysicalDevice physical_device, GLADuserptrloadfunc load, void *userptr); GLAD_API_CALL int gladLoad{{ feature_set.name|api }}(VkPhysicalDevice physical_device, GLADloadfunc load); {% endif %} {% endblock %} glad-2.0.2/glad/generator/c/templates/wgl.c000066400000000000000000000064441432671066000205110ustar00rootroot00000000000000{% extends 'base_template.c' %} {% block extension_loaders %} {% for extension, commands in loadable((feature_set.features[1:], feature_set.extensions)) %} static void glad_wgl_load_{{ extension.name }}(GLADuserptrloadfunc load, void *userptr) { if(!GLAD_{{ extension.name }}) return; {% for command in commands %} glad_{{ command.name }} = ({{ command.name|pfn }}) load(userptr, "{{ command.name }}"); {% endfor %} } {% endfor %} {% endblock %} {% block loader %} static int glad_wgl_has_extension(HDC hdc, const char *ext) { const char *terminator; const char *loc; const char *extensions; if(wglGetExtensionsStringEXT == NULL && wglGetExtensionsStringARB == NULL) return 0; if(wglGetExtensionsStringARB == NULL || hdc == INVALID_HANDLE_VALUE) extensions = wglGetExtensionsStringEXT(); else extensions = wglGetExtensionsStringARB(hdc); if(extensions == NULL || ext == NULL) return 0; while(1) { loc = strstr(extensions, ext); if(loc == NULL) break; terminator = loc + strlen(ext); if((loc == extensions || *(loc - 1) == ' ') && (*terminator == ' ' || *terminator == '\0')) { return 1; } extensions = terminator; } return 0; } static GLADapiproc glad_wgl_get_proc_from_userptr(void *userptr, const char* name) { return (GLAD_GNUC_EXTENSION (GLADapiproc (*)(const char *name)) userptr)(name); } {% for api in feature_set.info.apis %} static int glad_wgl_find_extensions_{{ api|lower }}(HDC hdc) { {% for extension in feature_set.extensions %} GLAD_{{ extension.name }} = glad_wgl_has_extension(hdc, "{{ extension.name }}"); {% else %} GLAD_UNUSED(glad_wgl_has_extension); {% endfor %} return 1; } static int glad_wgl_find_core_{{ api|lower }}(void) { {% set hv = feature_set.features|select('supports', api)|list|last %} int major = {{ hv.version.major }}, minor = {{ hv.version.minor }}; {% for feature in feature_set.features|select('supports', api) %} GLAD_{{ feature.name }} = (major == {{ feature.version.major }} && minor >= {{ feature.version.minor }}) || major > {{ feature.version.major }}; {% endfor %} return GLAD_MAKE_VERSION(major, minor); } int gladLoad{{ api|api }}UserPtr(HDC hdc, GLADuserptrloadfunc load, void *userptr) { int version; wglGetExtensionsStringARB = (PFNWGLGETEXTENSIONSSTRINGARBPROC) load(userptr, "wglGetExtensionsStringARB"); wglGetExtensionsStringEXT = (PFNWGLGETEXTENSIONSSTRINGEXTPROC) load(userptr, "wglGetExtensionsStringEXT"); if(wglGetExtensionsStringARB == NULL && wglGetExtensionsStringEXT == NULL) return 0; version = glad_wgl_find_core_{{ api|lower }}(); {% for feature, _ in loadable(feature_set.features[1:], api=api) %} glad_wgl_load_{{ feature.name }}(load, userptr); {% endfor %} if (!glad_wgl_find_extensions_{{ api|lower }}(hdc)) return 0; {% for extension, _ in loadable(feature_set.extensions, api=api) %} glad_wgl_load_{{ extension.name }}(load, userptr); {% endfor %} {% if options.alias %} glad_wgl_resolve_aliases(); {% endif %} return version; } int gladLoad{{ api|api }}(HDC hdc, GLADloadfunc load) { return gladLoad{{ api|api }}UserPtr(hdc, glad_wgl_get_proc_from_userptr, GLAD_GNUC_EXTENSION (void*) load); } {% endfor %} {% endblock %} glad-2.0.2/glad/generator/c/templates/wgl.h000066400000000000000000000013331432671066000205060ustar00rootroot00000000000000{% extends 'base_template.h' %} {% block header %} #include #include {% endblock %} {% block commands %} {{ template_utils.write_function_typedefs(feature_set.commands) }} {# these are already defined in windows.h #} {% set blacklist = feature_set.features[0].get_requirements(spec, feature_set=feature_set).commands %} {{ template_utils.write_function_declarations(feature_set.commands|reject('existsin', blacklist)) }} {% endblock %} {% block custom_declarations %} {% for api in feature_set.info.apis %} GLAD_API_CALL int gladLoad{{ api|api }}UserPtr(HDC hdc, GLADuserptrloadfunc load, void *userptr); GLAD_API_CALL int gladLoad{{ api|api }}(HDC hdc, GLADloadfunc load); {% endfor %} {% endblock %} glad-2.0.2/glad/generator/rust/000077500000000000000000000000001432671066000163215ustar00rootroot00000000000000glad-2.0.2/glad/generator/rust/__init__.py000066400000000000000000000172231432671066000204370ustar00rootroot00000000000000import jinja2 import glad from glad.config import Config, ConfigOption from glad.generator import JinjaGenerator from glad.generator.util import ( strip_specification_prefix, collect_alias_information, find_extensions_with_aliases, jinja2_contextfilter ) from glad.parse import ParsedType, EnumType from glad.sink import LoggingSink _RUST_TYPE_MAPPING = { 'void': 'c_void', 'char': 'c_char', 'uchar': 'c_uchar', 'float': 'c_float', 'double': 'c_double', 'int': 'c_int', 'long': 'c_long', 'int8_t': 'i8', 'uint8_t': 'u8', 'int16_t': 'i16', 'uint16_t': 'u16', 'int32_t': 'i32', 'int64_t': 'i32', 'uint32_t': 'u32', 'uint64_t': 'u64', 'size_t': 'usize', 'ull': 'u64', } def enum_type(enum, feature_set): if enum.alias and enum.value is None: aliased = feature_set.find_enum(enum.alias) if aliased is None: raise ValueError('unable to resolve enum alias {} of enum {}'.format(enum.alias, enum)) enum = aliased # if the value links to another enum, resolve the enum right now if enum.value is not None: # enum = feature_set.find_enum(enum.value, default=enum) referenced = feature_set.find_enum(enum.value) # TODO currently every enum with a parent type is u32 if referenced is not None and referenced.parent_type is not None: return 'u32' # we could return GLenum and friends here # but thanks to type aliasing we don't have to # this makes handling types for different specifications # easier, since we don't have to swap types. GLenum -> XXenum. if enum.type: _RUST_TYPE_MAPPING.get(enum.type, 'c_uint') if enum.value.startswith('0x'): return 'u64' if len(enum.value[2:]) > 8 else 'c_uint' if enum.name in ('GL_TRUE', 'GL_FALSE'): return 'c_uchar' if enum.value.startswith('-'): return 'c_int' if enum.value.endswith('f') or enum.value.endswith('F'): return 'c_float' if enum.value.startswith('"'): # TODO figure out correct type return '&str' if enum.value.startswith('(('): # Casts: '((Type)value)' -> 'Type' raise NotImplementedError if enum.value.startswith('EGL_CAST'): # EGL_CAST(type,value) -> type return enum.value.split('(', 1)[1].split(',')[0] return 'c_uint' def enum_value(enum, feature_set): if enum.alias and enum.value is None: enum = feature_set.find_enum(enum.alias) # basically an alias to another enum (value contains another enum) # resolve it here and adjust value accordingly. referenced = feature_set.find_enum(enum.value) if referenced is None: pass elif referenced.parent_type is not None: # global value is a reference to a enum type value return '{}::{} as u32'.format(referenced.parent_type, enum.value) else: enum = referenced value = enum.value if value.endswith('"'): value = value[:-1] + r'\0"' return value if enum.value.startswith('EGL_CAST'): # EGL_CAST(type,value) -> value as type type_, value = enum.value.split('(', 1)[1].rsplit(')', 1)[0].split(',') return '{} as {}'.format(value, type_) if enum.type == 'float' and value.endswith('F'): value = value[:-1] for old, new in (('(', ''), (')', ''), ('f', ''), ('U', ''), ('L', ''), ('~', '!')): value = value.replace(old, new) return value def to_rust_type(type_): if type_ is None: return 'std::os::raw::c_void' parsed_type = type_ if isinstance(type_, ParsedType) else ParsedType.from_string(type_) if not parsed_type.is_pointer and parsed_type.type == 'void': return '()' prefix = '' if parsed_type.is_pointer > 0: if parsed_type.is_const: prefix = '*const ' * parsed_type.is_pointer else: prefix = '*mut ' * parsed_type.is_pointer type_ = _RUST_TYPE_MAPPING.get(parsed_type.type, parsed_type.type) if parsed_type.is_array > 0: type_ = '[{};{}]'.format(type_, parsed_type.is_array) return ' '.join(e.strip() for e in (prefix, type_)).strip() def to_rust_params(command, mode='full'): if mode == 'names': return ', '.join(identifier(param.name) for param in command.params) elif mode == 'types': return ', '.join(to_rust_type(param.type) for param in command.params) elif mode == 'full': return ', '.join( '{name}: {type}'.format(name=identifier(param.name), type=to_rust_type(param.type)) for param in command.params ) raise ValueError('invalid mode: ' + mode) def identifier(name): if name in ('type', 'ref', 'box', 'in'): return name + '_' return name class RustConfig(Config): ALIAS = ConfigOption( converter=bool, default=False, description='Automatically adds all extensions that ' + 'provide aliases for the current feature set.' ) MX = ConfigOption( converter=bool, default=False, description='Enables support for multiple GL contexts' ) class RustGenerator(JinjaGenerator): DISPLAY_NAME = 'Rust' TEMPLATES = ['glad.generator.rust'] Config = RustConfig def __init__(self, *args, **kwargs): JinjaGenerator.__init__(self, *args, **kwargs) self.environment.filters.update( feature=lambda x: 'feature = "{}"'.format(x), enum_type=jinja2_contextfilter(lambda ctx, enum: enum_type(enum, ctx['feature_set'])), enum_value=jinja2_contextfilter(lambda ctx, enum: enum_value(enum, ctx['feature_set'])), type=to_rust_type, params=to_rust_params, identifier=identifier, no_prefix=jinja2_contextfilter(lambda ctx, value: strip_specification_prefix(value, ctx['spec'])) ) @property def id(self): return 'rust' def select(self, spec, api, version, profile, extensions, config, sink=LoggingSink(__name__)): if extensions is not None: extensions = set(extensions) if config['ALIAS']: extensions.update(find_extensions_with_aliases(spec, api, version, profile, extensions)) return JinjaGenerator.select(self, spec, api, version, profile, extensions, config, sink=sink) def get_template_arguments(self, spec, feature_set, config): args = JinjaGenerator.get_template_arguments(self, spec, feature_set, config) args.update( version=glad.__version__, aliases=collect_alias_information(feature_set.commands) ) return args def get_templates(self, spec, feature_set, config): return [ ('Cargo.toml', 'glad-{}/Cargo.toml'.format(feature_set.name)), ('lib.rs', 'glad-{}/src/lib.rs'.format(feature_set.name)), ('impl.rs', 'glad-{}/src/{}.rs'.format(feature_set.name, spec.name)) ] def modify_feature_set(self, spec, feature_set, config): self._remove_empty_enums(feature_set) return feature_set def _remove_empty_enums(self, feature_set): """ There are some enums which are simply empty: https://github.com/KhronosGroup/Vulkan-Docs/issues/1754 they need to be removed, we need to also remove any type which is an alias to that empty enum. """ to_remove = set() for typ in (t for t in feature_set.types if isinstance(t, EnumType)): if typ.alias is None and not typ.enums_for(feature_set): to_remove.add(typ.name) feature_set.types = [t for t in feature_set.types if t.name not in to_remove and t.alias not in to_remove] glad-2.0.2/glad/generator/rust/templates/000077500000000000000000000000001432671066000203175ustar00rootroot00000000000000glad-2.0.2/glad/generator/rust/templates/Cargo.toml000066400000000000000000000004721432671066000222520ustar00rootroot00000000000000[package] name = "glad-{{ feature_set.name }}" version = "{{ version }}" authors = ["David Herberth "] license = "(WTFPL OR CC0-1.0) AND Apache-2.0" [features] {% for platform in spec.platforms.values() %} {{ platform.protect }} = [] {{ platform.name }} = ["{{ platform.protect }}"] {% endfor %} glad-2.0.2/glad/generator/rust/templates/impl.rs000066400000000000000000000103331432671066000216260ustar00rootroot00000000000000{% import 'template_utils.rs' as template_utils with context %} pub use self::types::*; pub use self::enumerations::*; pub use self::functions::*; use std::os::raw::c_void; {% set ctx_name = feature_set.name | capitalize %} #[derive(Copy, Clone)] struct FnPtr { ptr: *const c_void, is_loaded: bool } #[allow(dead_code)] impl FnPtr { fn new(ptr: *const c_void) -> FnPtr { if !ptr.is_null() { FnPtr { ptr, is_loaded: true } } else { FnPtr { ptr: FnPtr::not_initialized as *const c_void, is_loaded: false } } } fn set_ptr(&mut self, ptr: *const c_void) { *self = Self::new(ptr); } fn aliased(&mut self, other: &FnPtr) { if !self.is_loaded && other.is_loaded { *self = *other; } } #[inline(never)] fn not_initialized() -> ! { panic!("{{ feature_set.name }}: function not initialized") } } unsafe impl Sync for FnPtr {} unsafe impl Send for FnPtr {} pub mod types { {% include 'types/' + spec.name + '.rs' ignore missing with context %} } pub mod enumerations { #![allow(dead_code, non_upper_case_globals, unused_imports)] use std::os::raw::*; use super::types::*; {% for enum in feature_set.enums %} pub const {{ enum.name|no_prefix }}: {{ enum|enum_type }} = {{ enum|enum_value }}; {% endfor %} } pub mod functions { #![allow(non_snake_case, unused_variables, dead_code, unused_imports)] use std::mem::transmute; use std::os::raw::*; use super::*; use super::types::*; macro_rules! func { ($fun:ident, $ret:ty, $($name:ident: $typ:ty),*) => { #[inline] pub unsafe fn $fun({{ '&self, ' if options.mx }}$($name: $typ),*) -> $ret { transmute::<_, extern "system" fn($($typ),*) -> $ret>({{ 'self.' if options.mx else 'storage::' }}$fun.ptr)($($name),*) } } } {% if options.mx %} pub struct {{ ctx_name }} { {% for command in feature_set.commands %} {{ template_utils.protect(command) }} pub(super) {{ command.name|no_prefix }}: FnPtr, {% endfor %} } {% if not spec.name | capitalize == ctx_name %} pub type {{ spec.name | capitalize }} = {{ ctx_name }}; {% endif %} impl {{ ctx_name }} { {% endif %} {% for command in feature_set.commands %} {{ template_utils.protect(command) }} func!({{ command.name|no_prefix }}, {{ command.proto.ret|type }}, {{ command|params }}); {% endfor %} {{ '}' if options.mx }} } {% if not options.mx %} mod storage { #![allow(non_snake_case, non_upper_case_globals)] use super::FnPtr; use std::os::raw::*; macro_rules! store { ($name:ident) => { pub(super) static mut $name: FnPtr = FnPtr { ptr: FnPtr::not_initialized as *const c_void, is_loaded: false }; } } {% for command in feature_set.commands %} {{ template_utils.protect(command) }} store!({{ command.name|no_prefix }}); {% endfor %} } {% endif %} {% if options.mx %} pub fn load(mut loadfn: F) -> functions::{{ ctx_name }} where F: FnMut(&'static str) -> *const c_void { #[allow(unused_mut)] let mut ctx = {{ ctx_name }} { {% for command in feature_set.commands %} {{ template_utils.protect(command.name) }} {{ command.name|no_prefix }}: FnPtr::new(loadfn("{{ command.name }}")), {% endfor %} }; {% for command, caliases in aliases|dictsort %} {% for alias in caliases|reject('equalto', command) %} {{ template_utils.protect(command) }} ctx.{{ command|no_prefix }}.aliased(&ctx.{{ alias|no_prefix }}); {% endfor %} {% endfor %} ctx } {% else %} pub fn load(mut loadfn: F) where F: FnMut(&'static str) -> *const c_void { unsafe { {% for command in feature_set.commands %} {{ template_utils.protect(command) }} storage::{{ command.name | no_prefix }}.set_ptr(loadfn("{{ command.name }}")); {% endfor %} {% for command, caliases in aliases|dictsort %} {% for alias in caliases|reject('equalto', command) %} {{ template_utils.protect(command) }}{{ template_utils.protect(alias) }} storage::{{ command|no_prefix }}.aliased(&storage::{{ alias|no_prefix }}); {% endfor %} {% endfor %} } } {% endif %} glad-2.0.2/glad/generator/rust/templates/lib.rs000066400000000000000000000000561432671066000214340ustar00rootroot00000000000000#[allow(clippy::all)] pub mod {{ spec.name }};glad-2.0.2/glad/generator/rust/templates/template_utils.rs000066400000000000000000000003221432671066000237150ustar00rootroot00000000000000{% macro protect(symbol) %} {% set protections = spec.protections(symbol, feature_set=feature_set) %} {% if protections -%} #[cfg(any({{ protections|map('feature')|join(',') }}))] {%- endif -%} {%- endmacro %} glad-2.0.2/glad/generator/rust/templates/types/000077500000000000000000000000001432671066000214635ustar00rootroot00000000000000glad-2.0.2/glad/generator/rust/templates/types/egl.rs000066400000000000000000000056151432671066000226070ustar00rootroot00000000000000#![allow(dead_code, non_camel_case_types, non_snake_case)] {% include 'types/khrplatform.rs' %} pub type EGLint = khronos_int32_t; // TODO replace based on platform, see eglplatform.h #[cfg(target_os = "macos")] pub type EGLNativeDisplayType = i32; #[cfg(not(target_os = "macos"))] pub type EGLNativeDisplayType = *mut std::os::raw::c_void; pub type EGLNativeWindowType = *mut std::os::raw::c_void; pub type EGLNativePixmapType = *mut std::os::raw::c_void; // EGL types pub type EGLBoolean = std::os::raw::c_uint; pub type EGLenum = std::os::raw::c_uint; pub type EGLClientBuffer = *mut std::os::raw::c_void; pub type EGLConfig = *mut std::os::raw::c_void; pub type EGLContext = *mut std::os::raw::c_void; pub type EGLDeviceEXT = *mut std::os::raw::c_void; pub type EGLDisplay = *mut std::os::raw::c_void; pub type EGLImage = *mut std::os::raw::c_void; pub type EGLImageKHR = *mut std::os::raw::c_void; pub type EGLLabelKHR = *mut std::os::raw::c_void; pub type EGLObjectKHR = *mut std::os::raw::c_void; pub type EGLOutputLayerEXT = *mut std::os::raw::c_void; pub type EGLOutputPortEXT = *mut std::os::raw::c_void; pub type EGLStreamKHR = *mut std::os::raw::c_void; pub type EGLSurface = *mut std::os::raw::c_void; pub type EGLSync = *mut std::os::raw::c_void; pub type EGLSyncKHR = *mut std::os::raw::c_void; pub type EGLSyncNV = *mut std::os::raw::c_void; pub type EGLAttrib = isize; pub type EGLAttribKHR = isize; pub enum __eglMustCastToProperFunctionPointerType_fn {} pub type __eglMustCastToProperFunctionPointerType = *mut __eglMustCastToProperFunctionPointerType_fn; pub type EGLNativeFileDescriptorKHR = std::os::raw::c_int; pub type EGLnsecsANDROID = khronos_stime_nanoseconds_t; pub type EGLsizeiANDROID = khronos_ssize_t; pub type EGLTimeKHR = khronos_utime_nanoseconds_t; pub type EGLTime = khronos_utime_nanoseconds_t; pub type EGLTimeNV = khronos_utime_nanoseconds_t; pub type EGLuint64KHR = khronos_uint64_t; pub type EGLuint64NV = khronos_utime_nanoseconds_t; pub struct AHardwareBuffer; pub type EGLSetBlobFuncANDROID = extern "system" fn ( *const std::os::raw::c_void, EGLsizeiANDROID, *const std::os::raw::c_void, EGLsizeiANDROID ) -> (); pub type EGLGetBlobFuncANDROID = extern "system" fn ( *const std::os::raw::c_void, EGLsizeiANDROID, *mut std::os::raw::c_void, EGLsizeiANDROID ) -> EGLsizeiANDROID; pub type EGLDEBUGPROCKHR = extern "system" fn ( error: EGLenum, command: *mut std::os::raw::c_char, messageType: EGLint, threadLabel: EGLLabelKHR, objectLabel: EGLLabelKHR, message: *mut std::os::raw::c_char ) -> (); #[repr(C)] #[derive(Copy, Clone)] pub struct EGLClientPixmapHI { pData: *const std::os::raw::c_void, iWidth: EGLint, iHeight: EGLint, iStride: EGLint, } pub type wl_display = std::os::raw::c_void; pub type wl_surface = std::os::raw::c_void; pub type wl_buffer = std::os::raw::c_void; pub type wl_resource = std::os::raw::c_void; glad-2.0.2/glad/generator/rust/templates/types/gl.rs000066400000000000000000000043271432671066000224410ustar00rootroot00000000000000#![allow(dead_code, non_snake_case, non_camel_case_types)] use std::os::raw; pub type GLvoid = raw::c_void; pub type GLbyte = raw::c_char; pub type GLubyte = raw::c_uchar; pub type GLchar = raw::c_char; pub type GLboolean = raw::c_uchar; pub type GLshort = raw::c_short; pub type GLushort = raw::c_ushort; pub type GLint = raw::c_int; pub type GLuint = raw::c_uint; pub type GLint64 = i64; pub type GLuint64 = u64; pub type GLintptr = isize; pub type GLsizeiptr = isize; pub type GLintptrARB = isize; pub type GLsizeiptrARB = isize; pub type GLint64EXT = i64; pub type GLuint64EXT = u64; pub type GLsizei = GLint; pub type GLclampx = raw::c_int; pub type GLfixed = GLint; pub type GLhalf = raw::c_ushort; pub type GLhalfNV = raw::c_ushort; pub type GLhalfARB = raw::c_ushort; pub type GLenum = raw::c_uint; pub type GLbitfield = raw::c_uint; pub type GLfloat = raw::c_float; pub type GLdouble = raw::c_double; pub type GLclampf = raw::c_float; pub type GLclampd = raw::c_double; pub type GLcharARB = raw::c_char; #[cfg(target_os = "macos")] pub type GLhandleARB = *const raw::c_void; #[cfg(not(target_os = "macos"))] pub type GLhandleARB = raw::c_uint; pub enum __GLsync {} pub type GLsync = *const __GLsync; pub enum _cl_context {} pub enum _cl_event {} pub type GLvdpauSurfaceNV = GLintptr; pub type GLeglClientBufferEXT = *const raw::c_void; pub type GLeglImageOES = *const raw::c_void; pub type GLDEBUGPROC = extern "system" fn ( source: GLenum, type_: GLenum, id: GLuint, severity: GLenum, length: GLsizei, message: *const GLchar, userParam: *mut raw::c_void, ); pub type GLDEBUGPROCARB = extern "system" fn ( source: GLenum, type_: GLenum, id: GLuint, severity: GLenum, length: GLsizei, message: *const GLchar, userParam: *mut raw::c_void, ); pub type GLDEBUGPROCKHR = extern "system" fn ( source: GLenum, type_: GLenum, id: GLuint, severity: GLenum, length: GLsizei, message: *const GLchar, userParam: *mut GLvoid, ); pub type GLDEBUGPROCAMD = extern "system" fn ( id: GLuint, category: GLenum, severity: GLenum, length: GLsizei, message: *const GLchar, userParam: *mut GLvoid, ); pub type GLVULKANPROCNV = extern "system" fn (); glad-2.0.2/glad/generator/rust/templates/types/glx.rs000066400000000000000000000100751432671066000226260ustar00rootroot00000000000000#![allow(dead_code, non_camel_case_types, non_snake_case)] {% include 'types/gl.rs' %} use std; pub type XID = std::os::raw::c_ulong; pub type Bool = std::os::raw::c_int; pub enum Display {} pub type Font = XID; pub type Pixmap = XID; pub type Colormap = XID; pub type Status = XID; pub enum Visual {} pub type VisualID = std::os::raw::c_ulong; pub type Window = XID; pub type GLXFBConfigID = XID; pub type GLXFBConfig = *const std::os::raw::c_void; pub type GLXContextID = XID; pub type GLXContext = *const std::os::raw::c_void; pub type GLXPixmap = XID; pub type GLXDrawable = XID; pub type GLXWindow = XID; pub type GLXPbuffer = XID; pub enum __GLXextFuncPtr_fn {} pub type __GLXextFuncPtr = *mut __GLXextFuncPtr_fn; pub type GLXVideoCaptureDeviceNV = XID; pub type GLXVideoDeviceNV = std::os::raw::c_int; pub type GLXVideoSourceSGIX = XID; pub type GLXFBConfigIDSGIX = XID; pub type GLXFBConfigSGIX = *const std::os::raw::c_void; pub type GLXPbufferSGIX = XID; #[repr(C)] #[derive(Copy, Clone)] pub struct XVisualInfo { pub visual: *mut Visual, pub visualid: VisualID, pub screen: std::os::raw::c_int, pub depth: std::os::raw::c_int, pub class: std::os::raw::c_int, pub red_mask: std::os::raw::c_ulong, pub green_mask: std::os::raw::c_ulong, pub blue_mask: std::os::raw::c_ulong, pub colormap_size: std::os::raw::c_int, pub bits_per_rgb: std::os::raw::c_int, } #[repr(C)] #[derive(Copy, Clone)] pub struct GLXPbufferClobberEvent { pub event_type: std::os::raw::c_int, pub draw_type: std::os::raw::c_int, pub serial: std::os::raw::c_ulong, pub send_event: Bool, pub display: *const Display, pub drawable: GLXDrawable, pub buffer_mask: std::os::raw::c_uint, pub aux_buffer: std::os::raw::c_uint, pub x: std::os::raw::c_int, pub y: std::os::raw::c_int, pub width: std::os::raw::c_int, pub height: std::os::raw::c_int, pub count: std::os::raw::c_int, } #[repr(C)] #[derive(Copy, Clone)] pub struct GLXBufferSwapComplete { pub type_: std::os::raw::c_int, pub serial: std::os::raw::c_ulong, pub send_event: Bool, pub display: *const Display, pub drawable: GLXDrawable, pub event_type: std::os::raw::c_int, pub ust: i64, pub msc: i64, pub sbc: i64, } #[repr(C)] #[derive(Copy, Clone)] pub struct GLXBufferClobberEventSGIX { pub type_: std::os::raw::c_int, pub serial: std::os::raw::c_ulong, pub send_event: Bool, pub display: *const Display, pub drawable: GLXDrawable, pub event_type: std::os::raw::c_int, pub draw_type: std::os::raw::c_int, pub mask: std::os::raw::c_uint, pub x: std::os::raw::c_int, pub y: std::os::raw::c_int, pub width: std::os::raw::c_int, pub height: std::os::raw::c_int, pub count: std::os::raw::c_int, } #[repr(C)] #[derive(Copy, Clone)] pub struct GLXHyperpipeNetworkSGIX { pub pipeName: [std::os::raw::c_char; super::enumerations::HYPERPIPE_PIPE_NAME_LENGTH_SGIX as usize], pub networkId: std::os::raw::c_int, } #[repr(C)] #[derive(Copy, Clone)] pub struct GLXHyperpipeConfigSGIX { pub pipeName: [std::os::raw::c_char; super::enumerations::HYPERPIPE_PIPE_NAME_LENGTH_SGIX as usize], pub channel: std::os::raw::c_int, pub participationType: std::os::raw::c_uint, pub timeSlice: std::os::raw::c_int, } #[repr(C)] #[derive(Copy, Clone)] pub struct GLXPipeRect { pub pipeName: [std::os::raw::c_char; super::enumerations::HYPERPIPE_PIPE_NAME_LENGTH_SGIX as usize], pub srcXOrigin: std::os::raw::c_int, pub srcYOrigin: std::os::raw::c_int, pub srcWidth: std::os::raw::c_int, pub srcHeight: std::os::raw::c_int, pub destXOrigin: std::os::raw::c_int, pub destYOrigin: std::os::raw::c_int, pub destWidth: std::os::raw::c_int, pub destHeight: std::os::raw::c_int, } #[repr(C)] #[derive(Copy, Clone)] pub struct GLXPipeRectLimits { pub pipeName: [std::os::raw::c_char; super::enumerations::HYPERPIPE_PIPE_NAME_LENGTH_SGIX as usize], pub XOrigin: std::os::raw::c_int, pub YOrigin: std::os::raw::c_int, pub maxHeight: std::os::raw::c_int, pub maxWidth: std::os::raw::c_int, }glad-2.0.2/glad/generator/rust/templates/types/khrplatform.rs000066400000000000000000000012121432671066000243560ustar00rootroot00000000000000#![allow(non_camel_case_types)] use std; // see khrplatform.h for these types pub type khronos_int8_t = i8; pub type khronos_uint8_t = u8; pub type khronos_int16_t = i16; pub type khronos_uint16_t = u16; pub type khronos_int32_t = i32; pub type khronos_uint32_t = u32; pub type khronos_int64_t = i64; pub type khronos_uint64_t = u64; pub type khronos_intptr_t = isize; pub type khronos_uintptr_t = usize; pub type khronos_ssize_t = isize; pub type khronos_usize_t = usize; pub type khronos_float_t = std::os::raw::c_float; pub type khronos_time_ns_t = u64; pub type khronos_stime_nanoseconds_t = i64; pub type khronos_utime_nanoseconds_t = u64; glad-2.0.2/glad/generator/rust/templates/types/vk.rs000066400000000000000000000064511432671066000224570ustar00rootroot00000000000000#![allow(dead_code, non_camel_case_types, non_snake_case)] {% import 'template_utils.rs' as template_utils with context %} use std; use std::os::raw::*; // types required for: xcb pub type xcb_connection_t = std::os::raw::c_void; pub type xcb_window_t = u32; pub type xcb_visualid_t = u32; // types required for: xlib(_xrandr) pub type Display = std::os::raw::c_void; pub type RROutput = std::os::raw::c_ulong; pub type Window = std::os::raw::c_ulong; pub type VisualID = std::os::raw::c_ulong; // types required for: win32 pub type BOOL = std::os::raw::c_int; pub type DWORD = std::os::raw::c_ulong; pub type LPVOID = *mut std::os::raw::c_void; pub type HANDLE = *mut std::os::raw::c_void; pub type HMONITOR = *mut std::os::raw::c_void; pub type WCHAR = u16; pub type LPCWSTR = *const WCHAR; pub type HINSTANCE = *mut std::os::raw::c_void; pub type HWND = *mut std::os::raw::c_void; #[repr(C)] #[derive(Copy, Clone)] pub struct SECURITY_ATTRIBUTES { nLength: DWORD, lpSecurityDescriptor: LPVOID, bInheritHandle: BOOL, } // types required for: wayland pub type wl_display = std::os::raw::c_void; pub type wl_surface = std::os::raw::c_void; // types required for: mir pub type MirConnection = std::os::raw::c_void; pub type MirSurface = std::os::raw::c_void; #[macro_export] macro_rules! VK_MAKE_VERSION { ($major:expr, $minor:expr, $patch:expr) => ((($major) << 22) | (($minor) << 12) | ($patch)); } #[macro_export] macro_rules! VK_VERSION_MAJOR { ($version:expr) => ($version >> 22); } #[macro_export] macro_rules! VK_VERSION_MINOR { ($version:expr) => (($version >> 12) & 0x3ff); } #[macro_export] macro_rules! VK_VERSION_PATCH { ($version:expr) => ($version & 0xfff); } #[macro_export] macro_rules! VK_DEFINE_NON_DISPATCHABLE_HANDLE { ($name:ident) => ( #[repr(C)] #[derive(Copy, Clone)] pub struct $name(u64); ); } #[macro_export] macro_rules! VK_DEFINE_HANDLE { ($name:ident) => ( #[repr(C)] #[derive(Copy, Clone)] pub struct $name(*const std::os::raw::c_void); ); } {% for type in feature_set.types %} {% if type.alias %} pub type {{ type.name }} = {{ type.alias }}; {% elif type.category == 'basetype' %} pub type {{ type.name }} = {{ type.type|type }}; {% elif type.category == 'handle' %} {{ type.type }}!({{ type.name }}); {% elif type.category == 'enum' %} {% set members = type.enums_for(feature_set) %} {% if members %} {{ template_utils.protect(type) }} #[repr(i{{ type.bitwidth or '32' }})] #[derive(Copy, Clone, Eq, PartialEq, Debug)] pub enum {{ type.name }} { {% for member in members %} {% if not member.alias %} {# Aliasing of enums is not allowed in Rust #} {{ member.name }} = {{ member.value }}, {% endif %} {% endfor %} } {% endif %} {% elif type.category in ('struct', 'union') %} {{ template_utils.protect(type) }} #[allow(non_snake_case)] #[repr(C)] #[derive(Copy, Clone)] pub {{ type.category }} {{ type.name }} { {% for member in type.members %} {{ member.name|identifier }}: {{ member.type|type }}, {% endfor %} } {% elif type.category == 'bitmask' %} pub type {{ type.name }} = {{ type.type }}; {% elif type.category == 'funcpointer' %} pub type {{ type.name }} = extern "system" fn( {% for parameter in type.parameters %} {{ parameter.name }}: {{ parameter.type|type }}, {% endfor %} ) -> {{ type.ret|type }}; {% endif %} {% endfor %} glad-2.0.2/glad/generator/rust/templates/types/wgl.rs000066400000000000000000000066551432671066000226360ustar00rootroot00000000000000#![allow(dead_code, non_camel_case_types, non_snake_case)] {% include 'types/gl.rs' %} use std; pub type BOOL = std::os::raw::c_int; pub type BYTE = std::os::raw::c_uchar; pub type CHAR = std::os::raw::c_char; pub type COLORREF = DWORD; pub type DWORD = std::os::raw::c_ulong; pub type FLOAT = std::os::raw::c_float; pub type HANDLE = PVOID; pub type HDC = HANDLE; pub type HENHMETAFILE = HANDLE; pub type HGLRC = *const std::os::raw::c_void; pub type HGPUNV = *const std::os::raw::c_void; pub type HPBUFFERARB = *const std::os::raw::c_void; pub type HPBUFFEREXT = *const std::os::raw::c_void; pub type HPGPUNV = *const std::os::raw::c_void; pub type HPVIDEODEV = *const std::os::raw::c_void; pub type HVIDEOINPUTDEVICENV = *const std::os::raw::c_void; pub type HVIDEOOUTPUTDEVICENV = *const std::os::raw::c_void; pub type INT = std::os::raw::c_int; pub type INT32 = i32; pub type INT64 = i64; pub type LONG = std::os::raw::c_long; pub type LPCSTR = *const std::os::raw::c_char; pub type LPVOID = *const std::os::raw::c_void; pub type PVOID = *const std::os::raw::c_void; pub type UINT = std::os::raw::c_uint; pub type USHORT = std::os::raw::c_ushort; pub type VOID = (); pub type WORD = std::os::raw::c_ushort; pub enum __PROC_fn {} pub type PROC = *mut __PROC_fn; #[repr(C)] #[derive(Copy, Clone)] pub struct RECT { left: LONG, top: LONG, right: LONG, bottom: LONG, } #[repr(C)] #[derive(Copy, Clone)] pub struct POINTFLOAT { pub x: FLOAT, pub y: FLOAT, } #[repr(C)] #[derive(Copy, Clone)] pub struct GLYPHMETRICSFLOAT { pub gmfBlackBoxX: FLOAT, pub gmfBlackBoxY: FLOAT, pub gmfptGlyphOrigin: POINTFLOAT, pub gmfCellIncX: FLOAT, pub gmfCellIncY: FLOAT, } pub type LPGLYPHMETRICSFLOAT = *const GLYPHMETRICSFLOAT; #[repr(C)] #[derive(Copy, Clone)] pub struct LAYERPLANEDESCRIPTOR { pub nSize: WORD, pub nVersion: WORD, pub dwFlags: DWORD, pub iPixelType: BYTE, pub cColorBits: BYTE, pub cRedBits: BYTE, pub cRedShift: BYTE, pub cGreenBits: BYTE, pub cGreenShift: BYTE, pub cBlueBits: BYTE, pub cBlueShift: BYTE, pub cAlphaBits: BYTE, pub cAlphaShift: BYTE, pub cAccumBits: BYTE, pub cAccumRedBits: BYTE, pub cAccumGreenBits: BYTE, pub cAccumBlueBits: BYTE, pub cAccumAlphaBits: BYTE, pub cDepthBits: BYTE, pub cStencilBits: BYTE, pub cAuxBuffers: BYTE, pub iLayerType: BYTE, pub bReserved: BYTE, pub crTransparent: COLORREF, } #[repr(C)] #[derive(Copy, Clone)] pub struct PIXELFORMATDESCRIPTOR { pub nSize: WORD, pub nVersion: WORD, pub dwFlags: DWORD, pub iPixelType: BYTE, pub cColorBits: BYTE, pub cRedBits: BYTE, pub cRedShift: BYTE, pub cGreenBits: BYTE, pub cGreenShift: BYTE, pub cBlueBits: BYTE, pub cBlueShift: BYTE, pub cAlphaBits: BYTE, pub cAlphaShift: BYTE, pub cAccumBits: BYTE, pub cAccumRedBits: BYTE, pub cAccumGreenBits: BYTE, pub cAccumBlueBits: BYTE, pub cAccumAlphaBits: BYTE, pub cDepthBits: BYTE, pub cStencilBits: BYTE, pub cAuxBuffers: BYTE, pub iLayerType: BYTE, pub bReserved: BYTE, pub dwLayerMask: DWORD, pub dwVisibleMask: DWORD, pub dwDamageMask: DWORD, } #[repr(C)] #[derive(Copy, Clone)] pub struct _GPU_DEVICE { cb: DWORD, DeviceName: [CHAR; 32], DeviceString: [CHAR; 128], Flags: DWORD, rcVirtualScreen: RECT, } pub struct GPU_DEVICE(_GPU_DEVICE); pub struct PGPU_DEVICE(*const _GPU_DEVICE); glad-2.0.2/glad/generator/util.py000066400000000000000000000105251432671066000166560ustar00rootroot00000000000000from collections import OrderedDict import jinja2 import re if hasattr(jinja2, 'pass_context'): jinja2_contextfunction = jinja2.pass_context jinja2_contextfilter = jinja2.pass_context else: jinja2_contextfunction = jinja2.contextfunction jinja2_contextfilter = jinja2.contextfilter def is_device_command(self): """ Returns true if the command is a Vulkan device command. :return: boolean indicating if the command is a device command """ if len(self.params) == 0: return False first_param = self.params[0] # See: https://cgit.freedesktop.org/mesa/mesa/tree/src/intel/vulkan/anv_entrypoints_gen.py#n434 return first_param.type.type in ('VkDevice', 'VkCommandBuffer', 'VkQueue') def strip_specification_prefix(name, spec_name=None): """ Used to strip the specification name prefix from a command name and extension/feature name. E.g.: glFoo -> Foo GL_ARB_asd -> ARB_asd GL_3DFX_tbuffer -> _3DXF_tbffer :param name: input name to strip prefix from :param spec_name: name of the specification or a Specification :return: stripped name """ api_prefix = getattr(spec_name, 'name', spec_name) if name.lower().startswith(api_prefix): name = name[len(api_prefix):].lstrip('_') # 3DFX_tbuffer -> _3DFX_tbuffer if not name[0].isalpha(): name = '_' + name return name def collect_alias_information(commands): # Thanks @derhass # https://github.com/derhass/glad/commit/9302dc566c695aebece901809f170297627950c9#diff-25f472d6fbc5268fe9a449252923b693 # keep a dictionary, store the set of aliases known for each function # initialize it to identity, each function aliases itself alias = dict((command.name, set([command.name])) for command in commands) # now, add all further aliases for command in commands: if command.alias is not None: # aliases is the set of all aliases known for this function aliases = alias[command.name] aliases.add(command.alias) # unify all alias sets of all aliased functions new_aliases = set() missing_funcs = set() for aliased_func in aliases: try: new_aliases.update(alias[aliased_func]) except KeyError: missing_funcs.add(aliased_func) # remove all missing functions new_aliases = new_aliases - missing_funcs # add the alias set to all aliased functions for aliased_command in new_aliases: alias[aliased_command] = new_aliases # remove self-aliases and (then) empty entries for command in commands: if len(alias[command.name]) == 1: del alias[command.name] return OrderedDict( (command.name, sorted(alias[command.name])) for command in commands if command.name in alias ) def find_extensions_with_aliases(spec, api, version, profile, extensions): """ Finds all extensions that contain a command that is an alias to a command in the current feature set (api, version, profile, extensions). The resulting list of extensions can be added to the extensions list to generate a feature set which contains as many aliases as possible. :param spec: the specification :param api: the requested api :param version: the requested version :param profile: the requested profile :param extensions: the base extension list :return: all extensions that contain an alias to the desired feature set """ feature_set = spec.select(api, version, profile, extensions) command_names = set(command.name for command in feature_set.commands) new_extensions = set() for extension in spec.extensions[api].values(): if extension in feature_set.extensions: continue for command in extension.get_requirements(spec, api, profile).commands: # find all extensions which have an alias to a selected function if command.alias and command.alias in command_names: new_extensions.add(extension.name) break # find all extensions that have a function with the same name if command.name in command_names: new_extensions.add(extension.name) break return new_extensions glad-2.0.2/glad/opener.py000066400000000000000000000062311432671066000152020ustar00rootroot00000000000000from contextlib import closing import logging import sys if sys.version_info >= (3, 0): _is_py3 = True from urllib.request import build_opener, ContentTooShortError else: _is_py3 = False from urllib2 import build_opener from urllib import FancyURLopener logger = logging.getLogger('glad.opener') def build_urllib_opener(user_agent, *args, **kwargs): if _is_py3: return None class UrllibURLOpener(FancyURLopener): version = user_agent return UrllibURLOpener(*args, **kwargs) def _urlretrieve_with_opener(opener, url, filename, data=None): if not _is_py3: raise SyntaxError('Only call this in Python 3 code.') # borrowed from the original implementation at urllib.request.urlretrieve. with closing(opener.open(url, data=data)) as src: headers = src.info() with open(filename, 'wb') as dest: result = filename, headers bs = 1024*8 size = -1 read = 0 blocknum = 0 if "content-length" in headers: size = int(headers["Content-Length"]) while True: block = src.read(bs) if not block: break read += len(block) dest.write(block) blocknum += 1 if size >= 0 and read < size: raise ContentTooShortError( 'retrieval incomplete: got only %i out of %i bytes' % (read, size), result) return result class URLOpener(object): """ Class to download/find Khronos related files, like the official specs and khrplatform.h. Can also be used to download files, exists mainly because of Python 2 and Python 3 incompatibilities. """ def __init__(self, user_agent='Mozilla/5.0'): # the urllib2/urllib.request opener self.opener = build_opener() self.opener.addheaders = [('User-agent', user_agent)] # the urllib opener (Python 2 only) self.opener2 = build_urllib_opener(user_agent) def urlopen(self, url, data=None, *args, **kwargs): """ Same as urllib2.urlopen or urllib.request.urlopen, the only difference is that it links to the internal opener. """ logger.info('opening: \'%s\'', url) if data is None: return self.opener.open(url) return self.opener.open(url, data) def urlretrieve(self, url, filename, data=None): """ Similar to urllib.urlretrieve or urllib.request.urlretrieve only that *filname* is required. :param url: URL to download. :param filename: Filename to save the content to. :param data: Valid URL-encoded data. :return: Tuple containing path and headers. """ logger.info('saving: \'%s\' to \'%s\'', url, filename) if _is_py3: return _urlretrieve_with_opener(self.opener, url, filename, data=data) return self.opener2.retrieve(url, filename, data=data) # just a singleton helper: _default = None @classmethod def default(cls): if cls._default is None: cls._default = cls() return cls._default glad-2.0.2/glad/parse.py000066400000000000000000001417341432671066000150340ustar00rootroot00000000000000from glad.sink import LoggingSink try: from lxml import etree from lxml.etree import ETCompatXMLParser as parser def xml_fromstring(argument): return etree.fromstring(argument, parser=parser()) def xml_parse(path): return etree.parse(path, parser=parser()).getroot() except ImportError: try: import xml.etree.cElementTree as etree except ImportError: import xml.etree.ElementTree as etree def xml_fromstring(argument): return etree.fromstring(argument) def xml_parse(path): return etree.parse(path).getroot() import re import copy import logging import os.path import warnings from collections import defaultdict, OrderedDict, namedtuple, deque from contextlib import closing from itertools import chain from glad.opener import URLOpener from glad.util import Version, topological_sort, memoize import glad.util logger = logging.getLogger(__name__) _ARRAY_RE = re.compile(r'\[(\d+)\]') _FeatureExtensionCommands = namedtuple('_FeatureExtensionCommands', ['features', 'commands']) class FeatureSetInfo(object): class InfoItem(namedtuple('InfoItem', ['api', 'version', 'profile', 'identifier'])): def __str__(self): result = self.api if self.profile: result += ':{}'.format(self.profile) result += '={version.major}.{version.minor}'.format(version=self.version) if self.identifier: result += '-{!r}'.format(self.identifier) return result __repr__ = __str__ def __init__(self, items, merged=False): self._items = OrderedDict() for item in items: self._items.setdefault(item.api, []).append(item) self.merged = merged @classmethod def one(cls, api, version, profile, identifier=None): return cls([FeatureSetInfo.InfoItem(api, version, profile, identifier)]) @property def apis(self): return list(self._items.keys()) def __str__(self): return repr(list(self)) __repr__ = __str__ def __iter__(self): return iter(chain.from_iterable(self._items.values())) class FeatureSet(object): def __init__(self, name, info, features, extensions, types, enums, commands): self.name = name self.info = info self.features = features self.extensions = extensions self.types = types self.enums = enums self.commands = commands def __str__(self): return 'FeatureSet(name={self.name}, info={self.info}, extensions={extensions})' \ .format(self=self, extensions=len(self.extensions)) __repr__ = __str__ def __eq__(self, other): if isinstance(self, other.__class__): return self.__dict__ == other.__dict__ return NotImplemented def __ne__(self, other): return not self.__eq__(other) def __hash__(self): # good enough for now return hash(( self.info, len(self.features), len(self.extensions), len(self.types), len(self.enums), len(self.commands) )) @property @memoize(method=True) def _all_enums(self): """ Vulkan introduced grouping of enumerations, they turned from basic `#define`'s into actual enumerations `enum Foo { ... }`. Glad interprets the "actual" enumerations as types, it's an enumeration type with values. But sometimes it is necessary to just have all enumerations without grouping information available (e.g. for quickly looking up a value). This lives under the assumption that enum names are unique. :return: a dictionary of name:enum pairs. """ result = dict() for enum in self.enums: result[enum.name] = enum for type_ in self.types: if type_.category == 'enum': for enum in type_.enums: result[enum.name] = enum return result def find_enum(self, name, default=None): """ Finds any enum, this includes enums that are part of types, by its name. :param enum_name: name of the enum :param default: default value to return if not found :return: the enum if found or else the default """ if name is None: return default return self._all_enums.get(name, default) @classmethod def merge(cls, feature_sets, sink=LoggingSink()): def to_ordered_dict(items): return OrderedDict((item.name, item) for item in items) def merge_items(items, new_items): for new_item in new_items: # TODO merge strategy, prefer khronos types in_dict = items.setdefault(new_item.name, new_item) if not in_dict is new_item: if not in_dict.is_equivalent(new_item): sink.warning('potential incompatibility: {!r} <-> {!r}'.format(new_item, in_dict)) feature_set = feature_sets[0] others = feature_sets[1:] info = list(feature_set.info) features = to_ordered_dict(feature_set.features) extensions = to_ordered_dict(feature_set.extensions) types = to_ordered_dict(feature_set.types) enums = to_ordered_dict(feature_set.enums) commands = to_ordered_dict(feature_set.commands) for other in others: if other.info not in info: info.extend(other.info) merge_items(features, other.features) merge_items(extensions, other.extensions) merge_items(types, other.types) merge_items(enums, other.enums) merge_items(commands, other.commands) name = os.path.commonprefix(list(chain([feature_set.name], [f.name for f in others]))) if not name: name = feature_set.name return FeatureSet( name, FeatureSetInfo(info, merged=True), list(features.values()), list(extensions.values()), list(types.values()), list(enums.values()), list(commands.values()) ) class TypeEnumCommand(namedtuple('_TypeEnumCommand', ['types', 'enums', 'commands'])): def __contains__(self, item): return item in self.types or item in self.enums or item in self.commands class Specification(object): API = 'https://cvs.khronos.org/svn/repos/ogl/trunk/doc/registry/public/api/' NAME = None def __init__(self, root): self.root = root self._combined = None def _magic_require(self, api, profile): """ The specifications use a requirement system for most symbols, unfortunately this is only partially used for types. This method exists to fix the requirement system and require the symbols which are not explicitly required but yet are needed. By default requires all types which are not associated with a profile or are associated with the requested profile. The problem is some types should *only* be included through the requirement system (like khrplatform). If this is the case this method should be overwritten. :param api: requested api :param profile: requested profile :return: a requirement or None """ requirements = [name for name, types in self.types.items() if any(t.api in (None, api) for t in types)] return Require(api, profile, requirements) def _magic_are_enums_blacklisted(self, enums_element): """ Some specifications (Vulkan) have types referring to enums, usually by type. To not include these enum types as enum (they are already a type), this blacklist exists. :return: boolean if enums element is blacklisted """ return False @property def name(self): if self.NAME is None: raise NotImplementedError return self.NAME @classmethod def from_url(cls, url, opener=None): if opener is None: opener = URLOpener.default() with closing(opener.urlopen(url)) as f: raw = f.read() return cls(xml_fromstring(raw)) @classmethod def from_remote(cls, opener=None): return cls.from_url(cls.API + cls.NAME + '.xml', opener=opener) @classmethod def from_string(cls, string): return cls(xml_fromstring(string)) @classmethod def from_file(cls, path_or_file_like, opener=None): try: return cls.from_url('file:' + path_or_file_like, opener=opener) except TypeError: return cls(xml_parse(path_or_file_like)) @property def comment(self): return self.root.find('comment').text @property def groups(self): warnings.warn('the groups have been deprecated in the spec', DeprecationWarning) if self._groups is None: self._groups = dict((element.attrib['name'], Group(element)) for element in self.root.find('groups')) return self._groups @property @memoize(method=True) def platforms(self): platforms = dict() pe = self.root.find('platforms') if pe is None: pe = [] for element in pe: platform = Platform.from_element(element) platforms[platform.name] = platform return platforms @property @memoize(method=True) def types(self): types = OrderedDict() for element in filter(lambda e: e.tag == 'type', iter(self.root.find('types'))): t = Type.from_element(element) if t.category == 'enum': enums_element = self.root.findall('.//enums[@type][@name="{}"]'.format(t.name)) if len(enums_element) == 0: if t.alias is None: # yep the type exists but there is actually no enum for it... logger.debug('type {} with category enum but without '.format(t.name)) continue elif len(enums_element) > 1: # this should never happen, if it does ... well shit raise ValueError('multiple enums with type attribute and name {}'.format(t.name)) else: enums_element = enums_element[0] t.bitwidth = enums_element.get('bitwidth') kwargs = dict(namespace=enums_element.get('namespace'), parent_group=enums_element.get('group'), vendor=enums_element.get('vendor'), comment=enums_element.get('comment', '')) enums = OrderedDict() for e in (Enum.from_element(e, parent_type=t.name, **kwargs) for e in enums_element.findall('enum')): enums[e.name] = e for extension in self.root.findall('.//require/enum[@extends="{}"]/../..'.format(t.name)): try: extnumber = int(extension.attrib['number']) except ValueError: # Most likely a feature, if that happens every extending enum needs # to specify its own extnumber extnumber = None for extending_enum in extension.findall('.//require/enum[@extends="{}"]'.format(t.name)): enum = Enum.from_element(extending_enum, extnumber=extnumber, parent_type=t.name) if enum.name not in enums: enums[enum.name] = enum else: # technically not required, but better throw more # than generate broken code because of a broken specification if not enum.value == enums[enum.name].value: raise ValueError('extension enum {} required multiple times ' 'with different values'.format(e.name)) enums[enum.name].also_extended_by(extension.attrib['name']) t.enums = list(enums.values()) if t.name not in types: types[t.name] = list() types[t.name].append(t) def _type_dependencies(item): # all requirements of all types (types can exist more than once, e.g. specialized for an API) # but only requirements that are types as well requirements = set(r for r in chain.from_iterable(t.requires for t in item[1]) if r in types) # requirements.add(r.parent_type) aliases = set(t.alias for t in item[1] if t.alias and t.alias in types) dependencies = requirements.union(aliases) dependencies.discard(item[0]) return dependencies return OrderedDict(topological_sort(types.items(), lambda x: x[0], _type_dependencies)) @property def commands(self): commands = dict() for element in self.root.find('commands'): command = Command(element) commands.setdefault(command.name, []).append(command) # fixup aliases for command in chain.from_iterable(commands.values()): if command.alias is not None and command.proto is None: aliased_command = command while aliased_command.proto is None: aliased_command = next(c for c in commands[aliased_command.alias] if c.api == command.api) command.proto = Proto(command.name, copy.deepcopy(aliased_command.proto.ret)) command.params = copy.deepcopy(aliased_command.params) return commands @property @memoize(method=True) def enums(self): enums = dict() for element in self.root.iter('enums'): # check if the enum is actually a type if self._magic_are_enums_blacklisted(element): continue namespace = element.get('namespace') group = element.get('group') vendor = element.get('vendor') comment = element.get('comment', '') for enum in element: if enum.tag in ('unused', 'comment'): continue assert enum.tag == 'enum' name = enum.attrib['name'] enums.setdefault(name, []).append(Enum.from_element( enum, namespace=namespace, parent_group=group, vendor=vendor, comment=comment )) # add enums added through a for element in self.root.findall('.//require/enum'): # TODO element can be an alias (defined in value) to an extending enum if element.get('extends'): continue enum = Enum.from_element(element) enums.setdefault(enum.name, []).append(enum) return enums @property @memoize(method=True) def features(self): features = defaultdict(dict) for element in self.root.iter('feature'): num = Version(*map(int, element.attrib['number'].split('.'))) features[element.attrib['api']][num] = Feature.from_element(element) for api, api_features in features.items(): features[api] = OrderedDict(sorted(api_features.items(), key=lambda x: x[0])) return features def highest_version(self, api): return sorted(self.features[api].keys(), reverse=True)[0] @property @memoize(method=True) def extensions(self): extensions = defaultdict(dict) for element in self.root.find('extensions'): extension = Extension.from_element(element) for api in extension.supported: extensions[api][element.attrib['name']] = extension return extensions def is_extension(self, api, extension_name): return extension_name in self.extensions[api] def profiles_for_api(self, api): profiles = set() for feature in chain(self.features[api].values(), self.extensions[api].values()): for r in chain(getattr(feature, 'removes', []), feature.requires): if (r.api is None or r.api == api) and r.profile is not None: profiles.add(r.profile) return profiles def protections(self, symbol, api=None, profile=None, feature_set=None): """ Returns a list of protections for a symbol. Specifications that do not carry protection info may choose to override this function and always return an empty list. :param symbol: symbol like Enum, Type, Extension etc. :param api: api to evaluate for :param profile: profile to evaluate for :param feature_set: evaluate protections based on feature_set :return: a list of protection names """ if getattr(symbol, 'protect', []): return symbol.protect if getattr(symbol, 'platform', None): return [self.platforms[symbol.platform].protect] if feature_set: extensions = chain(feature_set.features, feature_set.extensions) else: extensions = chain(self.features, self.extensions) protections = list() for ext in extensions: requirements = ext.get_requirements(self, api=api, profile=profile, feature_set=feature_set) if symbol in requirements: if ext.protect: protections.extend(ext.protect) elif ext.platform is not None: protections.append(self.platforms[ext.platform].protect) else: # symbol found in at least one unprotected extension return list() return protections def find(self, require, api, profile, recursive=False): """ Find all requirements of a require 'instruction'. :param require: the require instruction to resolve :param api: the api to resolve for :param profile: the profile to resolve for :param recursive: recursively resolve requirements :return: iterator with all results """ if not ((require.profile is None or require.profile == profile) and (require.api is None or require.api == api)): return if self._combined is None: self._combined = dict() self._combined.update(self.types) self._combined.update(self.commands) self._combined.update(self.enums) requirements = set(require.requirements) open_requirements = deque(requirements) while open_requirements: name = open_requirements.popleft() if name in self._combined: results = self._combined[name] # Get the best match from a list of results, e.g.: # # # So here we would go for the latter definition for the API gles. best_match = None for result in results: # no match so far and result is a match if best_match is None and (result.api is None or result.api == api): best_match = result continue # we had a previous match, is it better? # a result is perfect when the APIs are matching if result.api == api: best_match = result # perfect match -> stop break # this should never happen and indicates broken XML!? assert best_match is not None # maybe we got more requirements (types can require other types) # TODO check if _magic_require is still necessary with recursive # TODO auto-require types from commands etc. requires = getattr(best_match, 'requires', None) if recursive and requires is not None: # just add new requirements new_requirements = set(requires).difference(requirements) if new_requirements: requirements.update(new_requirements) open_requirements.extend(new_requirements) # Everything that is not a command alias is generated as a define, typedef etc. # and not "copy-pasted", this means we have to resolve the alias of a type in order # to be able to alias it properly. # Commands are simply generated again instead of aliased. # The `isinstance` check can be replaced with `if not alias in self.commands`. if not isinstance(best_match, Command): alias = getattr(best_match, 'alias', None) if recursive and alias is not None: if alias not in requirements: requirements.add(alias) open_requirements.append(alias) yield best_match @property @memoize(method=True) def _all_enums(self): """ Vulkan introduced grouping of enumerations, they turned from basic `#define`'s into actual enumerations `enum Foo { ... }`. Glad interprets the "actual" enumerations as types, it's an enumeration type with values. But sometimes it is necessary to just have all enumerations without grouping information available (e.g. for quickly looking up a value). This lives under the assumption that enum names are unique. :return: a dictionary of name:enum pairs. """ result = dict() for type_ in self.types.values(): type_ = type_[0] if type_.category == 'enum': for enum in type_.enums: result[enum.name] = enum return result def find_enum(self, name, default=None): """ Finds any enum, this includes enums that are part of types, by its name. :param name: name of the enum :param default: default value to return if not found :return: the enum if found or else the default """ if name is None: return default return self._all_enums.get(name, default) @staticmethod def split_types(iterable, types): result = tuple(set() for _ in types) for obj in iterable: for i, type_ in enumerate(types): if isinstance(obj, type_): result[i].add(obj) return result def select(self, api, version, profile, extension_names, sink=LoggingSink(__name__)): """ Select a specific configuration from the specification. :param api: API name :param version: API version, None means latest :param profile: desired profile :param extension_names: a list of desired extension names, None means all :param sink: sink used to store informations, warnings and errors that are not fatal :return: FeatureSet with the required types, enums, commands/functions """ # make sure that there is a profile if one is required/available available_profiles = self.profiles_for_api(api) if len(available_profiles) == 1 and profile is None: # If there is only one profile, use that profile = next(iter(available_profiles)) if available_profiles and profile not in available_profiles: if profile is None: raise ValueError( 'Profile required for {!r}-API, one of {!r}' .format(api, tuple(available_profiles)) ) raise ValueError( 'Invalid profile {!r} for {!r}-API, expected one of {!r}' .format(profile, api, tuple(available_profiles)) ) if not self.features.get(api): raise ValueError('Invalid API {!r} for specification {!r}'.format(api, self.name)) # None means latest version, update the dictionary with the latest version if version is None: version = self.highest_version(api) sink.info('no explicit version given for api {}, using {}'.format(api, version)) # make sure the version is valid if version not in self.features[api]: raise ValueError( 'Unknown version {}.{} for API {} (specification: {})' .format(version[0], version[1], api, self.name) ) all_extensions = list(self.extensions[api].keys()) if extension_names is None: sink.info('adding all extensions for api {} to result'.format(api)) # None means all extensions extension_names = all_extensions else: # make sure only valid extensions are listed for extension in extension_names: if extension not in all_extensions: raise ValueError( 'Invalid extension {!r} for specification {!r}'.format( extension, self.name ) ) # remove duplicates extension_names = set(extension_names) # Remove weird GLX extensions which use undefined types for extension in ['GLX_SGIX_video_source', 'GLX_SGIX_dmbuffer']: try: extension_names.remove(extension) except KeyError: pass else: sink.warning('removed extension {}, it uses unsupported types'.format(extension)) # OpenGL version 3.3 includes all versions up to 3.3 # Collect a list of all required features grouped by API features = [feature for fversion, feature in self.features[api].items() if fversion <= version] # Collect a list of extensions grouped by API extensions = [self.extensions[api][name] for name in extension_names if name in self.extensions[api]] # Collect information result = set() # collect all required types, functions (=commands) and enums by API # features are special extensions for extension in chain(features, extensions): for require in extension.requires: found = self.find(require, api, profile, recursive=True) result = result.union(found) for remove in getattr(extension, 'removes', []): if ((remove.profile is None or remove.profile == profile) and (remove.api is None or remove.api == api)): result = result.difference(remove.removes) # At this point one could hope that the XML files would be sane, but of course they are not!? # There is a builtin requirement system which is used for functions and enums, # but only partially for types WHY!??!?!?!??!?! # So let's fix this here .... # require all types which are not associated with a profile or with this one specific # and to make it more fun, there are a few types which should only be included through # the requirement system (less includes .. mainly important for khrplatform) require = self._magic_require(api, profile) if require is not None: # find and add the requirements just defined result = result.union(self.find(require, api, profile, recursive=True)) # OH WAIT THERE IS MORE!? E.g. Opengl 1.0 HAS *ZERO* Enums? Why? # I dont know, maybe some lazy ass who didnt want to figure out which enums were introduced # in Opengl 1.1 and just added all of them to 1.1 and none to 1.0 # We do nothing here and hope 1.0 will stay an exception ... # Split information into types, enums and commands/function types, enums, commands = self.split_types( result, types=(Type, Enum, Command) ) # We need to sort the types since a few definitions depend on other types all_sorted_types = list(self.types.keys()) types = sorted(types, key=all_sorted_types.index) features = sorted(features, key=lambda x: x.name) extensions = sorted(extensions, key=lambda x: x.name) enums = sorted(enums, key=lambda x: x.name) commands = sorted(commands, key=lambda x: x.name) return FeatureSet(api, FeatureSetInfo.one(api, version, profile), features, extensions, types, enums, commands) class Group(object): def __init__(self, element): self.name = element.attrib['name'] self.enums = [enum.attrib['name'] for enum in element] # required for set operations in select (union/difference) # TODO find out if this is problematic class IdentifiedByName(object): def __hash__(self): return hash(self.name) def __eq__(self, other): name = getattr(other, 'name', other) return self.name == name class Platform(object): def __init__(self, name, protect, comment=''): self.name = name self.protect = protect self.comment = comment @classmethod def from_element(cls, element): name = element.attrib['name'] protect = element.attrib['protect'] comment = element.get('comment', '') return Platform(name, protect, comment=comment) class Type(IdentifiedByName): _FACTORIES = dict() @staticmethod def register(category, type_factory): Type._FACTORIES[category] = type_factory def __init__(self, name, api=None, category=None, alias=None, requires=None, parent=None, apientry=False, raw=None): self.name = name self.api = api self.category = category self.alias = alias self.requires = requires or [] self.parent = parent self.apientry = apientry self._raw = raw @classmethod def factory(cls, element, name, data): return cls(name, **data) @staticmethod def from_element(element): apientry = element.find('apientry') if apientry is not None: # not so great workaround to get APIENTRY included in the raw output apientry.text = 'APIENTRY' raw = ''.join(element.itertext()) api = element.get('api') category = element.get('category') name = element.get('name') or element.find('name').text alias = element.get('alias') parent = element.get('parent') # a type referenced by a struct/funcptr is required by this type requires = set(t.text for t in element.iter('type') if t is not element) requires.update(e.text for e in element.iter('enum')) if element.get('requires'): requires.add(element.get('requires')) data = dict( api=api, category=category, alias=alias, requires=requires, parent=parent, apientry=apientry is not None, raw=raw ) factory = Type._FACTORIES.get(category, Type.factory) return factory(element, name, data) def is_equivalent(self, other): return self._raw == other._raw def is_descendant(self, basetype, typeslist): if self.name == basetype: return True cur = self while cur.parent is not None: if cur.parent == basetype: return True cur = typeslist[cur.parent][0] return False; def __str__(self): return self.name def __repr__(self): return 'Type(raw={self._raw!r})'.format(self=self) class FuncPointerType(Type): _Parameters = namedtuple('Parameters', ['type', 'name']) def __init__(self, name, ret=None, parameters=None, **kwargs): Type.__init__(self, name, **kwargs) self.ret = ret self.parameters = parameters or [] @classmethod def factory(cls, element, name, data): raw = data['raw'].strip().replace('\r', '').replace('\n', '') # typedef {RETURN} (VKAPI_PTR *{NAME})({PARAMS...}); # extract {RETURN}, split the typedef away, # then take everything up to the first ( ret = raw.split(None, 1)[1].split('(', 1)[0].strip() # split to the 2nd (, take everything after, # then split to the next ). Leaving {PARAMS...} behind parameters = [p for p in raw.split('(', 2)[2].split(')')[0].strip().split(',') if p.strip()] # when {PARAMS...} is void if len(parameters) == 1 and parameters[0] == 'void': parameters = [] for i, parameter in enumerate(parameters): type_, pname = parameter.rsplit(None, 1) parameters[i] = FuncPointerType._Parameters( type_.replace(' ', ''), pname.strip() ) return cls(name, ret=ret, parameters=parameters, **data) class MemberType(Type): def __init__(self, name, members=None, **kwargs): Type.__init__(self, name, **kwargs) self.members = members or [] @classmethod def factory(cls, element, name, data): members = [Member.from_element(e) for e in element.findall('member')] return cls(name, members=members, **data) class UnionType(MemberType): pass class StructType(MemberType): pass class EnumType(Type): def __init__(self, name, enums=None, bitwidth=None, **kwargs): Type.__init__(self, name, **kwargs) self.enums = enums or [] self.bitwidth = bitwidth @property def expanded_name(self): return glad.util.expand_type_name(self.name) @memoize(method=True) def enums_for(self, feature_set): relevant = set(feature_set.features) | set(feature_set.extensions) required_names = set() result = list() # assume order, an alias must be after the enum it is aliased to # reverse here so we add the alias first then we can check if the # value that is referenced needs to be added as well for enum in reversed(self.enums): if len(enum.extended_by) == 0 or enum.extended_by & relevant: result.insert(0, enum) # restore order required_names.add(enum.alias) elif enum.name in required_names: result.insert(0, enum) # restore order return result class TypedType(Type): def __init__(self, name, type=None, **kwargs): Type.__init__(self, name, **kwargs) self.type = type @classmethod def factory(cls, element, name, data): # may be none if the handle is just aliased type_element = element.find('type') type_ = type_element.text if type_element is not None else None return cls(name, type=type_, **data) class HandleType(TypedType): pass class BasetypeType(TypedType): pass class BitmaskType(TypedType): pass Type.register('funcpointer', FuncPointerType.factory) Type.register('union', UnionType.factory) Type.register('struct', StructType.factory) Type.register('enum', EnumType.factory) Type.register('handle', HandleType.factory) Type.register('basetype', BasetypeType.factory) Type.register('bitmask', BitmaskType.factory) class Member(IdentifiedByName): def __init__(self, name, type, enum=None): self.name = name self.type = type self.enum = enum @classmethod def from_element(cls, element): type_ = ParsedType.from_element(element) enum = element.find('enum') return Member(type_.name, type_, enum=enum.text if enum is not None else None) def __str__(self): return 'Member(name={self.name}, type={self.type})'.format(self=self) __repr__ = __str__ class Enum(IdentifiedByName): BASE_EXTENSION_OFFSET = 1000000000 EXTENSION_NUMBER_MULTIPLIER = 1000 EXTENSION_NUMBER_OFFSET = -1 def __init__(self, name, value, bitpos, api, type_, alias=None, namespace=None, group=None, parent_group=None, vendor=None, comment='', parent_type=None, extended_by=None): """ :param name: name of the enum :param value: value of the enum :param bitpos: alternative way of specifying the value :param api: api as specified on the enum :param type_: type of the enum as specified on the element :param alias: alias of the enum :param namespace: namespace of the group e.g. GL :param group: group specified in on the enum, comma separated for multiple :param parent_group: if the enum was defined in an group :param vendor: vendor specified on group :param comment: comment specified on the group :param parent_type: parent type if the enums is grouped and not just a global define (Foo.BAR) :param extended_by: list of enums this is extended by """ self.name = name self.value = value if self.value is None and bitpos is not None: self.value = str(1 << int(bitpos)) self.bitpos = bitpos self.api = api self.type = type_ self.alias = alias self.namespace = namespace self.group = group self.parent_group = parent_group self.vendor = vendor self.comment = comment # name of the type this enum is a part of self.parent_type = parent_type self.extended_by = set(extended_by) if extended_by else set() @property def expanded_name(self): return glad.util.expand_type_name(self.name) def also_extended_by(self, name): self.extended_by.add(name) def is_equivalent(self, other): return self.name == other.name and self.value == other.value @property def groups(self): """ Returns a list of parsed groups, group is a comma separated value as used in the XML. :return: empty list or list of groups """ return [] if self.group is None else self.group.split(',') def __str__(self): return self.name def __repr__(self): return 'Enum(name={self.name}, value={self.value}, type={self.type})'.format(self=self) @classmethod def from_element(cls, element, extnumber=None, **kwargs): name = element.attrib['name'] value = element.get('value') bitpos = element.get('bitpos') api = element.get('api') type_ = element.get('type') group = element.get('group') alias = element.get('alias') if element.get('extnumber'): extnumber = int(element.get('extnumber')) if element.get('offset') is not None: if extnumber is None: raise ValueError('enum has offset, extnumber is required') extbase = (cls.EXTENSION_NUMBER_MULTIPLIER * (extnumber + cls.EXTENSION_NUMBER_OFFSET)) value = cls.BASE_EXTENSION_OFFSET + extbase + int(element.get('offset')) if element.get('dir') == '-': value = -value if value is not None: value = str(value) return cls(name, value, bitpos, api, type_, alias=alias, group=group, **kwargs) class Command(IdentifiedByName): def __init__(self, element): self.proto = None self.params = None proto = element.find('proto') if proto is not None: self.proto = Proto.from_element(proto) self.params = [Param(ele) for ele in filter(lambda e: e.tag == 'param', iter(element))] self.alias = element.get('alias') self._name = element.get('name') alias = element.find('alias') if alias is not None: self.alias = alias.attrib['name'] self.api = element.get('api') if self.alias is None and self.proto is None: raise ValueError("command is neither a full command nor an alias") @property def requires(self): if self.params is None: return list() requires = [param.type.original_type for param in self.params if param.type.original_type] if self.proto.ret.original_type: requires.append(self.proto.ret.original_type) return requires @property def name(self): return self._name or self.proto.name def is_equivalent(self, other): return self.proto == other.proto and self.params == other.params def __str__(self): return '{self.proto.name}({params})'.format( self=self, params=','.join(map(str, self.params)) ) __repr__ = __str__ class Proto(object): def __init__(self, name, ret): self.name = name self.ret = ret @classmethod def from_element(cls, element): return Proto(element.find('name').text, ParsedType.from_element(element)) def is_equivalent(self, other): return self.ret == other.ret def __str__(self): return '{self.ret} {self.name}'.format(self=self) class Param(object): def __init__(self, element): self.group = element.get('group') self.type = ParsedType.from_element(element) self.name = element.find('name').text.strip('*') def is_equivalent(self, other): return self.type == other.type def __str__(self): return '{0!r} {1}'.format(self.type, self.name) class ParsedType(object): def __init__(self, name, type_, original_type, is_pointer=0, is_array=0, is_struct=False, is_const=False, is_unsigned=False, comment='', raw=None, element=None): self.name = name self.original_type = original_type self.type = type_ self.is_pointer = is_pointer self.is_array = is_array self.is_struct = is_struct self.is_const = is_const self.is_unsigned = is_unsigned self.comment = comment self._raw = raw self._element = element def is_equivalent(self, other): return self._raw == other._raw @classmethod def from_string(cls, raw): type_ = raw.replace('const', '') \ .replace('unsigned', '') \ .replace('struct', '') \ .replace('*', '') \ .strip().split(None, 1)[0] # 0 if no pointer, 1 if *, 2 if ** is_pointer = 0 if raw is None else raw.count('*') array_match = _ARRAY_RE.search(raw) is_array = 0 if array_match is None else int(array_match.group(1)) is_const = False if raw is None else 'const' in raw is_unsigned = False if raw is None else 'unsigned' in raw is_struct = 'struct' in raw return cls(None, type_, raw, is_pointer=is_pointer, is_struct=is_struct, is_const=is_const, is_unsigned=is_unsigned, raw=raw) @classmethod def from_element(cls, element): # assume just one comment element comment = ' '.join(c.text for c in element.iter('comment')) raw = ' '.join(glad.util.itertext(element, ignore=('comment',))) name = element.find('name').text original_type = None if element.find('type') is None else element.find('type').text ptype = element.find('ptype') if ptype is not None: ptype = ptype.text if ptype is not None else None type_ = ptype.replace('struct', '') else: type_ = raw.replace('const', '') \ .replace('unsigned', '') \ .replace('struct', '') \ .replace('*', '') \ .strip().split(None, 1)[0] # 0 if no pointer, 1 if *, 2 if ** is_pointer = 0 if raw is None else raw.count('*') array_match = _ARRAY_RE.search(raw) is_array = 0 if array_match is None else int(array_match.group(1)) is_const = False if raw is None else 'const' in raw is_unsigned = False if raw is None else 'unsigned' in raw is_struct = 'struct' in raw return cls(name, type_, original_type, is_pointer=is_pointer, is_array=is_array, is_struct=is_struct, is_const=is_const, is_unsigned=is_unsigned, comment=comment, raw=raw, element=element) # TODO unify API class Require(object): def __init__(self, api, profile, requirements, extension=None, feature=None, comment=''): self.api = api self.profile = profile self.requirements = requirements self.extension = extension self.feature = feature self.comment = comment def is_equivalent(self, other): return self.requirements == other.requirements @classmethod def from_element(cls, element): requirements = [child.get('name') for child in element if not child.get('extends')] return cls(element.get('api'), element.get('profile'), requirements, element.get('extension'), element.get('feature'), element.get('comment')) class Remove(object): def __init__(self, element): self.api = element.get('api') self.profile = element.get('profile') self.removes = [child.get('name') for child in element] def is_equivalent(self, other): return self.removes == other.removes class Extension(IdentifiedByName): def __init__(self, name, supported=None, requires=None, type_=None, protect=None, platform=None): self.name = name self.supported = supported self.requires = requires or [] self.type = type_ self.protect = protect or [] self.platform = platform @classmethod def from_element(cls, element): name = element.attrib['name'] supported = element.attrib['supported'].split('|') requires = [Require.from_element(require) for require in element.findall('require')] type_ = element.get('type') protect = [p.strip() for p in element.get('protect', '').split(',') if p.strip()] platform = element.get('platform') return cls(name, supported=supported, requires=requires, type_=type_, protect=protect, platform=platform) def supports(self, api): return api in self.supported def is_equivalent(self, other): return self.requires == other.requires @memoize(method=True) def get_requirements(self, spec, api=None, profile=None, feature_set=None): """ Find all types, enums and commands/functions which are required for this extension/feature. :param spec: the specification :param api: requested api, takes precedence over feature_set.info :param profile: requested profile (requires `api`) :param feature_set: used to provide api and profile, if supplied uses all APIs and profiles stored in `feature_set.info`. Also limits the return values to symbols included in the feature set. :return TypeEnumCommand: returns a :py:class:`TypeEnumCommand` """ result = set() if api is None and feature_set is None: raise ValueError('either API or feature_set required') for require in self.requires: if api is not None: result.update(spec.find(require, api, profile, recursive=True)) else: for info in feature_set.info: result.update(spec.find(require, info.api, info.profile, recursive=True)) types, enums, commands = spec.split_types(result, (Type, Enum, Command)) if feature_set is None: return TypeEnumCommand( sorted(types, key=lambda x: x.name), sorted(enums, key=lambda x: x.name), sorted(commands, key=lambda x: x.name), ) return TypeEnumCommand( sorted(types.intersection(feature_set.types), key=lambda x: x.name), sorted(enums.intersection(feature_set.enums), key=lambda x: x.name), sorted(commands.intersection(feature_set.commands), key=lambda x: x.name), ) def __str__(self): return self.name __repr__ = __str__ class Feature(Extension): def __init__(self, name, api, version, removes=None, **kwargs): Extension.__init__(self, name, **kwargs) self.api = api self.version = version self.removes = removes or [] def is_equivalent(self, other): return Extension.is_equivalent(self, other) and self.removes == other.removes @classmethod def from_element(cls, element): name = element.attrib['name'] api = element.attrib['api'] version = Version(*tuple(map(int, element.attrib['number'].split('.')))) requires = [Require.from_element(require) for require in element.findall('require')] removes = [Remove(remove) for remove in element.findall('remove')] type_ = element.get('type') protect = [p.strip() for p in element.get('protect', '').split(',') if p.strip()] platform = element.get('platform') return cls(name, api, version, supported=[api], requires=requires, removes=removes, type_=type_, protect=protect, platform=platform) def __str__(self): return '{self.name}@{self.version!r}'.format(self=self) __repr__ = __str__ glad-2.0.2/glad/plugin.py000066400000000000000000000032421432671066000152070ustar00rootroot00000000000000import sys import logging import inspect try: from importlib.metadata import entry_points if sys.version_info < (3, 10): _entry_points = entry_points def entry_points(group=None): return _entry_points()[group] except ImportError: from pkg_resources import iter_entry_points as entry_points import glad.specification from glad.generator.c import CGenerator from glad.generator.rust import RustGenerator from glad.parse import Specification logger = logging.getLogger(__name__) GENERATOR_ENTRY_POINT = 'glad.generator' SPECIFICATION_ENTRY_POINT = 'glad.specification' DEFAULT_GENERATORS = dict( c=CGenerator, rust=RustGenerator ) DEFAULT_SPECIFICATIONS = dict() for name, cls in inspect.getmembers(glad.specification, inspect.isclass): if issubclass(cls, Specification) and cls is not Specification: DEFAULT_SPECIFICATIONS[cls.NAME] = cls def find_generators(default=None, entry_point=GENERATOR_ENTRY_POINT): generators = dict(DEFAULT_GENERATORS if default is None else default) for entry_point in entry_points(group=entry_point): generators[entry_point.name] = entry_point.load() logger.debug('loaded language %s: %s', entry_point.name, generators[entry_point.name]) return generators def find_specifications(default=None, entry_point=SPECIFICATION_ENTRY_POINT): specifications = dict(DEFAULT_SPECIFICATIONS if default is None else default) for entry_point in entry_points(group=entry_point): specifications[entry_point.name] = entry_point.load() logger.debug('loaded specification %s: %s', entry_point.name, specifications[entry_point.name]) return specifications glad-2.0.2/glad/sink.py000066400000000000000000000034141432671066000146560ustar00rootroot00000000000000import collections import logging class Sink(object): def info(self, message, exc=None): raise NotImplementedError def warning(self, message, exc=None): raise NotImplementedError def error(self, message, exc=None): raise NotImplementedError class NullSink(Sink): def info(self, message, exc=None): pass def warning(self, message, exc=None): pass def error(self, message, exc=None): pass class LoggingSink(Sink): _DEFAULT_LOGGER = logging.getLogger(__name__) def __init__(self, name=None, logger=None): self.logger = logger if self.logger is None and name is not None: self.logger = logging.getLogger(name) if self.logger is None: self.logger = self._DEFAULT_LOGGER def info(self, message, exc=None): self.logger.info(message) def warning(self, message, exc=None): self.logger.warning(message) def error(self, message, exc=None): self.logger.error(message) Message = collections.namedtuple('Message', ['type', 'content', 'exc']) class CollectingSink(Sink): def __init__(self): self.messages = list() def info(self, message, exc=None): self.messages.append(Message('info', message, exc)) def warning(self, message, exc=None): self.messages.append(Message('warning', message, exc)) def error(self, message, exc=None): self.messages.append(Message('error', message, exc)) @property def infos(self): return [m for m in self.messages if m.type == 'info'] @property def warnings(self): return [m for m in self.messages if m.type == 'warning'] @property def errors(self): return [m for m in self.messages if m.type == 'error'] glad-2.0.2/glad/specification.py000066400000000000000000000041331432671066000165310ustar00rootroot00000000000000from glad.parse import Specification, Require class EGL(Specification): DISPLAY_NAME = 'EGL' API = 'https://raw.githubusercontent.com/KhronosGroup/EGL-Registry/main/api/' NAME = 'egl' def protections(self, symbol, api=None, profile=None, feature_set=None): return list() class GL(Specification): DISPLAY_NAME = 'OpenGL' API = 'https://raw.githubusercontent.com/KhronosGroup/OpenGL-Registry/main/xml/' NAME = 'gl' def _magic_require(self, api, profile): require = Specification._magic_require(self, api, profile) magic_blacklist = ( 'stddef', 'khrplatform', 'inttypes', # gl.xml ) requirements = [r for r in require.requirements if r not in magic_blacklist] return Require(api, profile, requirements) def protections(self, symbol, api=None, profile=None, feature_set=None): return list() class GLX(Specification): DISPLAY_NAME = 'GLX' API = 'https://raw.githubusercontent.com/KhronosGroup/OpenGL-Registry/main/xml/' NAME = 'glx' def protections(self, symbol, api=None, profile=None, feature_set=None): return list() class WGL(Specification): DISPLAY_NAME = 'WGL' API = 'https://raw.githubusercontent.com/KhronosGroup/OpenGL-Registry/main/xml/' NAME = 'wgl' def protections(self, symbol, api=None, profile=None, feature_set=None): return list() class VK(Specification): DISPLAY_NAME = 'Vulkan' API = 'https://raw.githubusercontent.com/KhronosGroup/Vulkan-Docs/main/xml/' NAME = 'vk' def _magic_require(self, api, profile): # magic_categories = ( # 'define', 'basetype', 'handle' # ) # # requirements = [name for name, types in self.types.items() # if any(t.api in (None, api) and t.category in magic_categories for t in types)] # # return Require(api, profile, requirements) return None def _magic_are_enums_blacklisted(self, enums_element): # blacklist everything that has a type return enums_element.get('type') in ('enum', 'bitmask') glad-2.0.2/glad/util.py000066400000000000000000000127241432671066000146730ustar00rootroot00000000000000import functools import os import re import sys from collections import namedtuple, defaultdict if sys.version_info >= (3, 0, 0): basestring = str Version = namedtuple('Version', ['major', 'minor']) ExpandedName = namedtuple('ExpandedName', ['prefix', 'suffix']) _API_NAMES = { 'egl': 'EGL', 'gl': 'OpenGL', 'gles1': 'OpenGL ES', 'gles2': 'OpenGL ES', 'glsc2': 'OpenGL SC', 'glx': 'GLX', 'wgl': 'WGL', } def api_name(api): api = api.lower() return _API_NAMES.get(api, api.upper()) def makefiledir(path): dir = os.path.split(path)[0] if not os.path.exists(dir): os.makedirs(dir) ApiInformation = namedtuple('ApiInformation', ('specification', 'version', 'profile')) _API_SPEC_MAPPING = { 'gl': 'gl', 'gles1': 'gl', 'gles2': 'gl', 'glsc2': 'gl', 'egl': 'egl', 'glx': 'glx', 'wgl': 'wgl', 'vulkan': 'vk' } def parse_version(value): if value is None: return None value = value.strip() if not value: return None major, minor = (value + '.0').split('.')[:2] return Version(int(major), int(minor)) def parse_apis(value, api_spec_mapping=_API_SPEC_MAPPING): result = dict() for api in value.split(','): api = api.strip() m = re.match( r'^(?P\w+)(:(?P\w+))?(/(?P\w+))?(=(?P\d+(\.\d+)?)?)?$', api ) if m is None: raise ValueError('Invalid API {}'.format(api)) spec = m.group('spec') if spec is None: try: spec = api_spec_mapping[m.group('api')] except KeyError: raise ValueError('Can not resolve specification for API {}'.format(m.group('api'))) version = parse_version(m.group('version')) result[m.group('api')] = ApiInformation(spec, version, m.group('profile')) return result # based on https://stackoverflow.com/a/11564323/969534 def topological_sort(items, key, dependencies): pending = [(item, set(dependencies(item))) for item in items] emitted = [] while pending: next_pending = [] next_emitted = [] for entry in pending: item, deps = entry deps.difference_update(emitted) if deps: next_pending.append(entry) else: yield item key_item = key(item) emitted.append(key_item) next_emitted.append(key_item) if not next_emitted: raise ValueError("cyclic or missing dependency detected: %r" % (next_pending,)) pending = next_pending emitted = next_emitted class _HashedSeq(list): __slots__ = 'hashvalue' # noinspection PyMissingConstructor def __init__(self, tup, hash=hash): self[:] = tup self.hashvalue = hash(tup) def __hash__(self): return self.hashvalue def _default_key_func(*args, **kwargs): key = (tuple(args), tuple(kwargs.items())) return _HashedSeq(key) def memoize(key=None, method=False): """ Memoize decorator for functions and methods. :param key: a cache-key transformation function :param method: whether the cache should be attached to the `self` parameter """ key_func = key or _default_key_func def memoize_decorator(func): _cache = dict() @functools.wraps(func) def memoized(*args, **kwargs): cache_args = args if method: # This is an attempt to bind the cache to the instance of the currently # executed method. The idea is to not hoard references to the instance # and other values (arguments) to not prevent the GC from collecting those. # If we don't attach it this leaks memory all over the place, # especially since this implementation currently has an uncapped cache. self = args[0] cache_args = args[1:] try: funcs_cache = self._memoize_cache except AttributeError: funcs_cache = defaultdict(dict) self._memoize_cache = funcs_cache cache = funcs_cache[func] else: cache = _cache key = key_func(*cache_args, **kwargs) if key not in cache: cache[key] = func(*args, **kwargs) return cache[key] return memoized return memoize_decorator def itertext(element, ignore=()): tag = element.tag if not isinstance(tag, basestring) and tag is not None: return if element.text: yield element.text for e in element: if not e.tag in ignore: for s in itertext(e, ignore=ignore): yield s if e.tail: yield e.tail def expand_type_name(name): """ Transforms a type name into its expanded version, e.g. expands the type `VkShaderInfoTypeAMD` to the tuple `('VK_SHADER_INFO_TYPE', '_AMD')`. See: https://github.com/KhronosGroup/Vulkan-Docs/blob/main/scripts/generator.py#L60 buildEnumCDecl_Enum """ upper_name = re.sub(r'([0-9]+|[a-z_])([A-Z0-9])', r'\1_\2', name).upper() (prefix, suffix) = (upper_name, '') suffix_match = re.search(r'[A-Z][A-Z]+$', name) if suffix_match: suffix = '_' + suffix_match.group() # Strip off the suffix from the prefix prefix = upper_name.rsplit(suffix, 1)[0] return ExpandedName(prefix, suffix) glad-2.0.2/requirements-test.txt000066400000000000000000000000461432671066000166700ustar00rootroot00000000000000nose>=1.3.0,<2.0.0 mock>=2.0.0,<3.0.0 glad-2.0.2/requirements.txt000066400000000000000000000000211432671066000157040ustar00rootroot00000000000000Jinja2>=2.7,<4.0 glad-2.0.2/setup.py000066400000000000000000000051761432671066000141520ustar00rootroot00000000000000#!/usr/bin/env python """ Glad ---- Glad uses the official Khronos-XML specs to generate a GL/GLES/EGL/GLX/WGL Loader made for your needs. Checkout the GitHub repository: https://github.com/Dav1dde/glad """ from setuptools import setup, find_packages import ast import re # Thanks flask: https://github.com/mitsuhiko/flask/blob/master/setup.py _version_re = re.compile(r'__version__\s+=\s+(.*)') with open('glad/__init__.py', 'rb') as f: version = str(ast.literal_eval(_version_re.search( f.read().decode('utf-8')).group(1))) if __name__ == '__main__': setup( name='glad2', version=version, description='Multi-Language GL/GLES/EGL/GLX/WGL Loader-Generator based on the official specifications.', long_description=__doc__, packages=find_packages(), include_package_data=True, install_requires=['jinja2'], entry_points={ 'console_scripts': [ 'glad = glad.__main__:main' ], 'glad.generator': [ 'c = glad.generator.c.__init__:CGenerator', 'rust = glad.generator.rust.__init__:RustGenerator' ], 'glad.specification': [ 'egl = glad.specification:EGL', 'gl = glad.specification:GL', 'glx = glad.specification:GLX', 'wgl = glad.specification:WGL', 'vk = glad.specification:VK' ] }, classifiers=[ 'Development Status :: 5 - Production/Stable', 'Environment :: Console', 'Intended Audience :: Developers', 'Intended Audience :: Education', 'Intended Audience :: Science/Research', 'License :: OSI Approved :: MIT License', 'Natural Language :: English', 'Operating System :: OS Independent', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10', 'Programming Language :: Python :: 3.11', 'Topic :: Games/Entertainment', 'Topic :: Multimedia :: Graphics', 'Topic :: Multimedia :: Graphics :: 3D Rendering', 'Topic :: Software Development', 'Topic :: Software Development :: Build Tools', 'Topic :: Utilities' ], keywords='opengl glad generator gl wgl egl gles glx', author='David Herberth', author_email='github@dav1d.de', url='https://github.com/Dav1dde/glad', license='MIT', platforms='any' ) glad-2.0.2/test/000077500000000000000000000000001432671066000134065ustar00rootroot00000000000000glad-2.0.2/test/README.md000066400000000000000000000006741432671066000146740ustar00rootroot00000000000000Test ==== This directory contains integration tests ran by the [`/utility/test.sh`](../utility/test.sh) script. These tests are mainly for testing the generators. Python unit tests can be found in the [`/tests`](../tests) directory. ## Execution There are a few requirements for actually running the test suite: * Linux * Python environment * GCC * glfw * mingw * wine Depending on future generators being added there may be more. glad-2.0.2/test/c/000077500000000000000000000000001432671066000136305ustar00rootroot00000000000000glad-2.0.2/test/c/cmake/000077500000000000000000000000001432671066000147105ustar00rootroot00000000000000glad-2.0.2/test/c/cmake/CMakeLists.txt000066400000000000000000000047421432671066000174570ustar00rootroot00000000000000cmake_minimum_required(VERSION 3.8) project(glad_all_versions C) enable_testing() set(GLAD_CMAKE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake") add_subdirectory("${GLAD_CMAKE_PATH}" "glad_cmake") set(egl_VERSIONS 1.0 1.1 1.2 1.3 1.4 1.5) set(gl_VERSIONS 1.0 1.1 1.2 1.3 1.4 1.5 2.0 2.1 3.0 3.1 3.2 3.3 4.0 4.1 4.2 4.3 4.4 4.5 4.6) set(gles1_VERSIONS 1.0) set(gles2_VERSIONS 2.0 3.0 3.1 3.2) set(glsc2_VERSIONS 2.0) set(glx_VERSIONS 1.0 1.1 1.2 1.3 1.4) set(vulkan_VERSIONS 1.0 1.1) set(wgl_VERSIONS 1.0) set(gl_PROFILES core compatibility) set(egl_SYSTEMS Linux Windows Darwin) set(gl_SYSTEMS Linux Windows Darwin) set(gles1_SYSTEMS Linux Windows Darwin) set(gles2_SYSTEMS Linux Windows Darwin) set(glsc2_SYSTEMS Linux Windows Darwin) set(glx_SYSTEMS Linux) set(vulkan_SYSTEMS Linux Windows Darwin) set(wgl_SYSTEMS Windows) set(APIS egl gl gles1 gles2 glsc2 glx vulkan wgl) macro(merge_version RESULT VERSION) string(REPLACE "." "" "${RESULT}" "${VERSION}") endmacro() foreach(API ${APIS}) set(PROFILES "${${API}_PROFILES}") if(NOT PROFILES) set(PROFILES "X") endif() foreach(PROFILE ${PROFILES}) if(PROFILE STREQUAL "X") set(PROFILE "") endif() foreach(VERSION ${${API}_VERSIONS}) set(APISTR "${API}") string(REPLACE "." "" NAME_SUFFIX "${VERSION}") if(PROFILE) string(APPEND APISTR ":${PROFILE}") string(APPEND NAME_SUFFIX "_${PROFILE}") endif() set(TARGET "glad_${API}_${NAME_SUFFIX}") glad_add_library("${TARGET}" EXCLUDE_FROM_ALL LOCATION "${PROJECT_BINARY_DIR}/external/glad_${API}_${NAME_SUFFIX}" API ${APISTR}=${VERSION} ) if(CMAKE_SYSTEM_NAME IN_LIST "${API}_SYSTEMS") add_test( NAME "${TARGET}" COMMAND "${CMAKE_MAKE_PROGRAM}" "${TARGET}" VERBOSE=ON WORKING_DIRECTORY "${CMAKE_BINARY_DIR}" ) endif() endforeach() endforeach() endforeach() foreach(glx_VERSION ${glx_VERSIONS}) string(REPLACE "." "" NAME_SUFFIX "${glx_VERSION}") target_link_libraries(glad_glx_${NAME_SUFFIX} PUBLIC glad_gl_10_core ) endforeach() foreach(wgl_VERSION ${wgl_VERSIONS}) string(REPLACE "." "" NAME_SUFFIX "${wgl_VERSION}") target_link_libraries(glad_wgl_${NAME_SUFFIX} PUBLIC glad_gl_10_core ) endforeach() glad-2.0.2/test/c/cmake/test_disabled.sh000066400000000000000000000002261432671066000200520ustar00rootroot00000000000000#!/bin/sh # GLAD: true # COMPILE: echo "$(pwd) - $tmp | $test_dir" && cd $tmp && cmake $test_dir # RUN: ctest --no-compress-output -T Test --verbose glad-2.0.2/test/c/compile/000077500000000000000000000000001432671066000152605ustar00rootroot00000000000000glad-2.0.2/test/c/compile/egl/000077500000000000000000000000001432671066000160275ustar00rootroot00000000000000glad-2.0.2/test/c/compile/egl/alias/000077500000000000000000000000001432671066000171205ustar00rootroot00000000000000glad-2.0.2/test/c/compile/egl/alias/001/000077500000000000000000000000001432671066000174205ustar00rootroot00000000000000glad-2.0.2/test/c/compile/egl/alias/001/test.c000066400000000000000000000005411432671066000205430ustar00rootroot00000000000000/* * Issue #362, aliasing func is not called. * Note this does not actually verify the functions get properly initialized only that it compiles * * GLAD: $GLAD --out-path=$tmp --api="egl=" c --alias * COMPILE: $GCC $test -o $tmp/test -I$tmp/include $tmp/src/egl.c -ldl * RUN: $tmp/test */ #include int main(void) { return 0; } glad-2.0.2/test/c/compile/egl/default/000077500000000000000000000000001432671066000174535ustar00rootroot00000000000000glad-2.0.2/test/c/compile/egl/default/001/000077500000000000000000000000001432671066000177535ustar00rootroot00000000000000glad-2.0.2/test/c/compile/egl/default/001/test.c000066400000000000000000000005331432671066000210770ustar00rootroot00000000000000/* * Full EGL * * GLAD: $GLAD --out-path=$tmp --api="egl=" c --loader * COMPILE: $GCC $test -o $tmp/test -I$tmp/include $tmp/src/egl.c -ldl * RUN: $tmp/test */ #include #include int main(void) { EGLDisplay display = NULL; (void) gladLoaderLoadEGL(display); (void) gladLoaderUnloadEGL(); return 0; } glad-2.0.2/test/c/compile/egl/default/002/000077500000000000000000000000001432671066000177545ustar00rootroot00000000000000glad-2.0.2/test/c/compile/egl/default/002/test.c000066400000000000000000000005351432671066000211020ustar00rootroot00000000000000/* * EGL 1.0 * * GLAD: $GLAD --out-path=$tmp --api="egl=1.0" c --loader * COMPILE: $GCC $test -o $tmp/test -I$tmp/include $tmp/src/egl.c -ldl * RUN: $tmp/test */ #include #include int main(void) { EGLDisplay display = NULL; (void) gladLoaderLoadEGL(display); (void) gladLoaderUnloadEGL(); return 0; } glad-2.0.2/test/c/compile/egl/header-only/000077500000000000000000000000001432671066000202365ustar00rootroot00000000000000glad-2.0.2/test/c/compile/egl/header-only/001/000077500000000000000000000000001432671066000205365ustar00rootroot00000000000000glad-2.0.2/test/c/compile/egl/header-only/001/test.c000066400000000000000000000005671432671066000216710ustar00rootroot00000000000000/* * Full header only only EGL * * GLAD: $GLAD --out-path=$tmp --api="egl=" c --loader --header-only * COMPILE: $GCC $test -o $tmp/test -I$tmp/include -ldl * RUN: $tmp/test */ #define GLAD_EGL_IMPLEMENTATION #include int main(void) { EGLDisplay display = NULL; (void) gladLoaderLoadEGL(display); (void) gladLoaderUnloadEGL(); return 0; } glad-2.0.2/test/c/compile/egl/on-demand/000077500000000000000000000000001432671066000176715ustar00rootroot00000000000000glad-2.0.2/test/c/compile/egl/on-demand/001/000077500000000000000000000000001432671066000201715ustar00rootroot00000000000000glad-2.0.2/test/c/compile/egl/on-demand/001/test.c000066400000000000000000000003531432671066000213150ustar00rootroot00000000000000/* * Full on demand EGL * * GLAD: $GLAD --out-path=$tmp --api="egl" c --on-demand * COMPILE: $GCC $test -o $tmp/test -I$tmp/include $tmp/src/egl.c -ldl * RUN: $tmp/test */ #include int main(void) { return 0; } glad-2.0.2/test/c/compile/egl/on-demand/002/000077500000000000000000000000001432671066000201725ustar00rootroot00000000000000glad-2.0.2/test/c/compile/egl/on-demand/002/test.c000066400000000000000000000004001432671066000213070ustar00rootroot00000000000000/* * Full on demand EGL with loader * * GLAD: $GLAD --out-path=$tmp --api="egl" c --on-demand --loader * COMPILE: $GCC $test -o $tmp/test -I$tmp/include $tmp/src/egl.c -ldl * RUN: $tmp/test */ #include int main(void) { return 0; } glad-2.0.2/test/c/compile/gl/000077500000000000000000000000001432671066000156625ustar00rootroot00000000000000glad-2.0.2/test/c/compile/gl/alias/000077500000000000000000000000001432671066000167535ustar00rootroot00000000000000glad-2.0.2/test/c/compile/gl/alias/001/000077500000000000000000000000001432671066000172535ustar00rootroot00000000000000glad-2.0.2/test/c/compile/gl/alias/001/test.c000066400000000000000000000004611432671066000203770ustar00rootroot00000000000000/* * Full compatibility GL, with aliasing * * GLAD: $GLAD --out-path=$tmp --api="gl:compatibility" c --loader --alias * COMPILE: $GCC $test -o $tmp/test -I$tmp/include $tmp/src/gl.c -ldl * RUN: $tmp/test */ #include #ifndef GL_KHR_debug #error #endif int main(void) { return 0; } glad-2.0.2/test/c/compile/gl/alias/002/000077500000000000000000000000001432671066000172545ustar00rootroot00000000000000glad-2.0.2/test/c/compile/gl/alias/002/test.c000066400000000000000000000004371432671066000204030ustar00rootroot00000000000000/* * Full core GL, with aliasing * * GLAD: $GLAD --out-path=$tmp --api="gl:core" c --loader --alias * COMPILE: $GCC $test -o $tmp/test -I$tmp/include $tmp/src/gl.c -ldl * RUN: $tmp/test */ #include #ifndef GL_KHR_debug #error #endif int main(void) { return 0; } glad-2.0.2/test/c/compile/gl/alias/003/000077500000000000000000000000001432671066000172555ustar00rootroot00000000000000glad-2.0.2/test/c/compile/gl/alias/003/test.c000066400000000000000000000005661432671066000204070ustar00rootroot00000000000000/* * No extensions compatibility GL, with aliasing * * GLAD: $GLAD --out-path=$tmp --api="gl:compatibility" --extensions="" c --loader --alias * COMPILE: $GCC $test -o $tmp/test -I$tmp/include $tmp/src/gl.c -ldl * RUN: $tmp/test */ #include #ifndef GL_KHR_debug /* extension should be added by aliasing */ #error #endif int main(void) { return 0; } glad-2.0.2/test/c/compile/gl/alias/004/000077500000000000000000000000001432671066000172565ustar00rootroot00000000000000glad-2.0.2/test/c/compile/gl/alias/004/test.c000066400000000000000000000005441432671066000204040ustar00rootroot00000000000000/* * No extensions core GL, with aliasing * * GLAD: $GLAD --out-path=$tmp --api="gl:core" --extensions="" c --loader --alias * COMPILE: $GCC $test -o $tmp/test -I$tmp/include $tmp/src/gl.c -ldl * RUN: $tmp/test */ #include #ifndef GL_KHR_debug /* extension should be added by aliasing */ #error #endif int main(void) { return 0; } glad-2.0.2/test/c/compile/gl/alias/005/000077500000000000000000000000001432671066000172575ustar00rootroot00000000000000glad-2.0.2/test/c/compile/gl/alias/005/test.c000066400000000000000000000004651432671066000204070ustar00rootroot00000000000000/* * GL 2.1 All extensions, with aliasing * * GLAD: $GLAD --out-path=$tmp --api="gl:compatibility=2.1" c --loader --alias * COMPILE: $GCC $test -o $tmp/test -I$tmp/include $tmp/src/gl.c -ldl * RUN: $tmp/test */ #include #ifndef GL_KHR_debug #error #endif int main(void) { return 0; } glad-2.0.2/test/c/compile/gl/alias/006/000077500000000000000000000000001432671066000172605ustar00rootroot00000000000000glad-2.0.2/test/c/compile/gl/alias/006/test.c000066400000000000000000000005601432671066000204040ustar00rootroot00000000000000/* * GL 2.1 No extensions, with aliasing * * GLAD: $GLAD --out-path=$tmp --api="gl:compatibility=2.1" --extensions="" c --loader --alias * COMPILE: $GCC $test -o $tmp/test -I$tmp/include $tmp/src/gl.c -ldl * RUN: $tmp/test */ #include #ifndef GL_KHR_debug /* extension should be added by aliasing */ #error #endif int main(void) { return 0; } glad-2.0.2/test/c/compile/gl/alias/007/000077500000000000000000000000001432671066000172615ustar00rootroot00000000000000glad-2.0.2/test/c/compile/gl/alias/007/test.c000066400000000000000000000004551432671066000204100ustar00rootroot00000000000000/* * GL 4.6 No extensions, with aliasing * * GLAD: $GLAD --out-path=$tmp --api="gl:core=4.6" --extensions="" c --alias * COMPILE: $GCC $test -o $tmp/test -I$tmp/include $tmp/src/gl.c -ldl * RUN: $tmp/test */ #include int main(void) { (void) glActiveTextureARB; return 0; } glad-2.0.2/test/c/compile/gl/debug/000077500000000000000000000000001432671066000167505ustar00rootroot00000000000000glad-2.0.2/test/c/compile/gl/debug/001/000077500000000000000000000000001432671066000172505ustar00rootroot00000000000000glad-2.0.2/test/c/compile/gl/debug/001/test.c000066400000000000000000000006171432671066000203770ustar00rootroot00000000000000/* * Full compatibility debug GL * * GLAD: $GLAD --out-path=$tmp --api="gl:compatibility" c --loader --debug * COMPILE: $GCC $test -o $tmp/test -I$tmp/include $tmp/src/gl.c -ldl * RUN: $tmp/test */ #include #include int main(void) { gladSetGLPreCallback(NULL); gladSetGLPostCallback(NULL); gladInstallGLDebug(); gladUninstallGLDebug(); return 0; } glad-2.0.2/test/c/compile/gl/debug/002/000077500000000000000000000000001432671066000172515ustar00rootroot00000000000000glad-2.0.2/test/c/compile/gl/debug/002/test.c000066400000000000000000000003621432671066000203750ustar00rootroot00000000000000/* * Full core debug GL * * GLAD: $GLAD --out-path=$tmp --api="gl:core" c --loader --debug * COMPILE: $GCC $test -o $tmp/test -I$tmp/include $tmp/src/gl.c -ldl * RUN: $tmp/test */ #include int main(void) { return 0; } glad-2.0.2/test/c/compile/gl/debug/003/000077500000000000000000000000001432671066000172525ustar00rootroot00000000000000glad-2.0.2/test/c/compile/gl/debug/003/test.c000066400000000000000000000004351432671066000203770ustar00rootroot00000000000000/* * No extensions compatibility debug GL * * GLAD: $GLAD --out-path=$tmp --api="gl:compatibility" --extensions="" c --loader --debug * COMPILE: $GCC $test -o $tmp/test -I$tmp/include $tmp/src/gl.c -ldl * RUN: $tmp/test */ #include int main(void) { return 0; } glad-2.0.2/test/c/compile/gl/debug/004/000077500000000000000000000000001432671066000172535ustar00rootroot00000000000000glad-2.0.2/test/c/compile/gl/debug/004/test.c000066400000000000000000000004131432671066000203740ustar00rootroot00000000000000/* * No extensions core debug GL * * GLAD: $GLAD --out-path=$tmp --api="gl:core" --extensions="" c --loader --debug * COMPILE: $GCC $test -o $tmp/test -I$tmp/include $tmp/src/gl.c -ldl * RUN: $tmp/test */ #include int main(void) { return 0; } glad-2.0.2/test/c/compile/gl/debug/005/000077500000000000000000000000001432671066000172545ustar00rootroot00000000000000glad-2.0.2/test/c/compile/gl/debug/005/test.c000066400000000000000000000004101432671066000203720ustar00rootroot00000000000000/* * Debug GL 2.1 All extensions * * GLAD: $GLAD --out-path=$tmp --api="gl:compatibility=2.1" c --loader --debug * COMPILE: $GCC $test -o $tmp/test -I$tmp/include $tmp/src/gl.c -ldl * RUN: $tmp/test */ #include int main(void) { return 0; } glad-2.0.2/test/c/compile/gl/debug/006/000077500000000000000000000000001432671066000172555ustar00rootroot00000000000000glad-2.0.2/test/c/compile/gl/debug/006/test.c000066400000000000000000000004271432671066000204030ustar00rootroot00000000000000/* * Debug GL 2.1 No extensions * * GLAD: $GLAD --out-path=$tmp --api="gl:compatibility=2.1" --extensions="" c --loader --debug * COMPILE: $GCC $test -o $tmp/test -I$tmp/include $tmp/src/gl.c -ldl * RUN: $tmp/test */ #include int main(void) { return 0; } glad-2.0.2/test/c/compile/gl/default/000077500000000000000000000000001432671066000173065ustar00rootroot00000000000000glad-2.0.2/test/c/compile/gl/default/001/000077500000000000000000000000001432671066000176065ustar00rootroot00000000000000glad-2.0.2/test/c/compile/gl/default/001/test.c000066400000000000000000000004321432671066000207300ustar00rootroot00000000000000/* * Full compatibility GL * * GLAD: $GLAD --out-path=$tmp --api="gl:compatibility" c --loader * COMPILE: $GCC $test -o $tmp/test -I$tmp/include $tmp/src/gl.c -ldl * RUN: $tmp/test */ #include #ifndef GL_KHR_debug #error #endif int main(void) { return 0; } glad-2.0.2/test/c/compile/gl/default/002/000077500000000000000000000000001432671066000176075ustar00rootroot00000000000000glad-2.0.2/test/c/compile/gl/default/002/test.c000066400000000000000000000004101432671066000207250ustar00rootroot00000000000000/* * Full core GL * * GLAD: $GLAD --out-path=$tmp --api="gl:core" c --loader * COMPILE: $GCC $test -o $tmp/test -I$tmp/include $tmp/src/gl.c -ldl * RUN: $tmp/test */ #include #ifndef GL_KHR_debug #error #endif int main(void) { return 0; } glad-2.0.2/test/c/compile/gl/default/003/000077500000000000000000000000001432671066000176105ustar00rootroot00000000000000glad-2.0.2/test/c/compile/gl/default/003/test.c000066400000000000000000000004621432671066000207350ustar00rootroot00000000000000/* * No extensions compatibility GL * * GLAD: $GLAD --out-path=$tmp --api="gl:compatibility" --extensions="" c --loader * COMPILE: $GCC $test -o $tmp/test -I$tmp/include $tmp/src/gl.c -ldl * RUN: $tmp/test */ #include #ifdef GL_KHR_debug #error #endif int main(void) { return 0; } glad-2.0.2/test/c/compile/gl/default/004/000077500000000000000000000000001432671066000176115ustar00rootroot00000000000000glad-2.0.2/test/c/compile/gl/default/004/test.c000066400000000000000000000004401432671066000207320ustar00rootroot00000000000000/* * No extensions core GL * * GLAD: $GLAD --out-path=$tmp --api="gl:core" --extensions="" c --loader * COMPILE: $GCC $test -o $tmp/test -I$tmp/include $tmp/src/gl.c -ldl * RUN: $tmp/test */ #include #ifdef GL_KHR_debug #error #endif int main(void) { return 0; } glad-2.0.2/test/c/compile/gl/default/005/000077500000000000000000000000001432671066000176125ustar00rootroot00000000000000glad-2.0.2/test/c/compile/gl/default/005/test.c000066400000000000000000000004361432671066000207400ustar00rootroot00000000000000/* * GL 2.1 All extensions * * GLAD: $GLAD --out-path=$tmp --api="gl:compatibility=2.1" c --loader * COMPILE: $GCC $test -o $tmp/test -I$tmp/include $tmp/src/gl.c -ldl * RUN: $tmp/test */ #include #ifndef GL_KHR_debug #error #endif int main(void) { return 0; } glad-2.0.2/test/c/compile/gl/default/006/000077500000000000000000000000001432671066000176135ustar00rootroot00000000000000glad-2.0.2/test/c/compile/gl/default/006/test.c000066400000000000000000000004541432671066000207410ustar00rootroot00000000000000/* * GL 2.1 No extensions * * GLAD: $GLAD --out-path=$tmp --api="gl:compatibility=2.1" --extensions="" c --loader * COMPILE: $GCC $test -o $tmp/test -I$tmp/include $tmp/src/gl.c -ldl * RUN: $tmp/test */ #include #ifdef GL_KHR_debug #error #endif int main(void) { return 0; } glad-2.0.2/test/c/compile/gl/default/007/000077500000000000000000000000001432671066000176145ustar00rootroot00000000000000glad-2.0.2/test/c/compile/gl/default/007/test.c000066400000000000000000000007251432671066000207430ustar00rootroot00000000000000/* * Issue #171. Enums being aliased, but the enum that they are aliased to * do not exist (e.g. because they don't exist in this profile). * * GLAD: $GLAD --out-path=$tmp --api="gl:core=4.5" --extensions="" c --loader * COMPILE: $GCC $test -o $tmp/test -I$tmp/include $tmp/src/gl.c -ldl * RUN: $tmp/test */ #include #if GL_CLIP_DISTANCE0 != 0x3000 #error #endif #if GL_MAX_CLIP_DISTANCES != 0x0D32 #error #endif int main(void) { return 0; } glad-2.0.2/test/c/compile/gl/header-only+mx/000077500000000000000000000000001432671066000205115ustar00rootroot00000000000000glad-2.0.2/test/c/compile/gl/header-only+mx/001/000077500000000000000000000000001432671066000210115ustar00rootroot00000000000000glad-2.0.2/test/c/compile/gl/header-only+mx/001/test.c000066400000000000000000000005561432671066000221420ustar00rootroot00000000000000/* * Full compatibility GL MX header only * * GLAD: $GLAD --out-path=$tmp --api="gl:compatibility" c --loader --mx --header-only * COMPILE: $GCC $test -o $tmp/test -I$tmp/include -ldl * RUN: $tmp/test */ #define GLAD_GL_IMPLEMENTATION #include int main(void) { GladGLContext gl = {0}; (void) gladLoaderLoadGLContext(&gl); return 0; } glad-2.0.2/test/c/compile/gl/header-only+mx/002/000077500000000000000000000000001432671066000210125ustar00rootroot00000000000000glad-2.0.2/test/c/compile/gl/header-only+mx/002/test.c000066400000000000000000000005341432671066000221370ustar00rootroot00000000000000/* * Full core GL MX header only * * GLAD: $GLAD --out-path=$tmp --api="gl:core" c --loader --mx --header-only * COMPILE: $GCC $test -o $tmp/test -I$tmp/include -ldl * RUN: $tmp/test */ #define GLAD_GL_IMPLEMENTATION #include int main(void) { GladGLContext gl = {0}; (void) gladLoaderLoadGLContext(&gl); return 0; } glad-2.0.2/test/c/compile/gl/header-only+mx/003/000077500000000000000000000000001432671066000210135ustar00rootroot00000000000000glad-2.0.2/test/c/compile/gl/header-only+mx/003/test.c000066400000000000000000000006071432671066000221410ustar00rootroot00000000000000/* * No extensions compatibility GL MX header only * * GLAD: $GLAD --out-path=$tmp --api="gl:compatibility" --extensions="" c --loader --mx --header-only * COMPILE: $GCC $test -o $tmp/test -I$tmp/include -ldl * RUN: $tmp/test */ #define GLAD_GL_IMPLEMENTATION #include int main(void) { GladGLContext gl = {0}; (void) gladLoaderLoadGLContext(&gl); return 0; } glad-2.0.2/test/c/compile/gl/header-only+mx/004/000077500000000000000000000000001432671066000210145ustar00rootroot00000000000000glad-2.0.2/test/c/compile/gl/header-only+mx/004/test.c000066400000000000000000000005651432671066000221450ustar00rootroot00000000000000/* * No extensions core GL MX header only * * GLAD: $GLAD --out-path=$tmp --api="gl:core" --extensions="" c --loader --mx --header-only * COMPILE: $GCC $test -o $tmp/test -I$tmp/include -ldl * RUN: $tmp/test */ #define GLAD_GL_IMPLEMENTATION #include int main(void) { GladGLContext gl = {0}; (void) gladLoaderLoadGLContext(&gl); return 0; } glad-2.0.2/test/c/compile/gl/header-only+mx/005/000077500000000000000000000000001432671066000210155ustar00rootroot00000000000000glad-2.0.2/test/c/compile/gl/header-only+mx/005/test.c000066400000000000000000000005621432671066000221430ustar00rootroot00000000000000/* * MX header only GL 2.1 All extensions * * GLAD: $GLAD --out-path=$tmp --api="gl:compatibility=2.1" c --loader --mx --header-only * COMPILE: $GCC $test -o $tmp/test -I$tmp/include -ldl * RUN: $tmp/test */ #define GLAD_GL_IMPLEMENTATION #include int main(void) { GladGLContext gl = {0}; (void) gladLoaderLoadGLContext(&gl); return 0; } glad-2.0.2/test/c/compile/gl/header-only+mx/006/000077500000000000000000000000001432671066000210165ustar00rootroot00000000000000glad-2.0.2/test/c/compile/gl/header-only+mx/006/test.c000066400000000000000000000006011432671066000221360ustar00rootroot00000000000000/* * MX header only GL 2.1 No extensions * * GLAD: $GLAD --out-path=$tmp --api="gl:compatibility=2.1" --extensions="" c --loader --mx --header-only * COMPILE: $GCC $test -o $tmp/test -I$tmp/include -ldl * RUN: $tmp/test */ #define GLAD_GL_IMPLEMENTATION #include int main(void) { GladGLContext gl = {0}; (void) gladLoaderLoadGLContext(&gl); return 0; } glad-2.0.2/test/c/compile/gl/header-only+mx/007/000077500000000000000000000000001432671066000210175ustar00rootroot00000000000000glad-2.0.2/test/c/compile/gl/header-only+mx/007/test.c000066400000000000000000000012431432671066000221420ustar00rootroot00000000000000/* * MX header only, global generation, should compile basic API * * GLAD: $GLAD --out-path=$tmp --api="gl:compatibility" c --loader --mx --header-only * COMPILE: $GCC $test -o $tmp/test -I$tmp/include -ldl * RUN: $tmp/test */ #define GLAD_GL_IMPLEMENTATION #include typedef void (*VOID_FUNCPTR)(void); VOID_FUNCPTR loader_userptr(void *userptr, const char *name) { (void) name; (void) userptr; return NULL; } VOID_FUNCPTR loader(const char *name) { (void) name; return NULL; } int main(void) { GladGLContext gl = {0}; gladLoadGLContextUserPtr(&gl, loader_userptr, NULL); gladLoaderLoadGLContext(&gl); return 0; } glad-2.0.2/test/c/compile/gl/header-only/000077500000000000000000000000001432671066000200715ustar00rootroot00000000000000glad-2.0.2/test/c/compile/gl/header-only/001/000077500000000000000000000000001432671066000203715ustar00rootroot00000000000000glad-2.0.2/test/c/compile/gl/header-only/001/test.c000066400000000000000000000005001432671066000215070ustar00rootroot00000000000000/* * Full compatibility GL header only * * GLAD: $GLAD --out-path=$tmp --api="gl:compatibility" c --loader --header-only * COMPILE: $GCC $test -o $tmp/test -I$tmp/include -ldl * RUN: $tmp/test */ #define GLAD_GL_IMPLEMENTATION #include int main(void) { (void) gladLoaderLoadGL(); return 0; } glad-2.0.2/test/c/compile/gl/header-only/002/000077500000000000000000000000001432671066000203725ustar00rootroot00000000000000glad-2.0.2/test/c/compile/gl/header-only/002/test.c000066400000000000000000000004561432671066000215220ustar00rootroot00000000000000/* * Full core GL header only * * GLAD: $GLAD --out-path=$tmp --api="gl:core" c --loader --header-only * COMPILE: $GCC $test -o $tmp/test -I$tmp/include -ldl * RUN: $tmp/test */ #define GLAD_GL_IMPLEMENTATION #include int main(void) { (void) gladLoaderLoadGL(); return 0; } glad-2.0.2/test/c/compile/gl/header-only/003/000077500000000000000000000000001432671066000203735ustar00rootroot00000000000000glad-2.0.2/test/c/compile/gl/header-only/003/test.c000066400000000000000000000005311432671066000215150ustar00rootroot00000000000000/* * No extensions compatibility GL header only * * GLAD: $GLAD --out-path=$tmp --api="gl:compatibility" --extensions="" c --loader --header-only * COMPILE: $GCC $test -o $tmp/test -I$tmp/include -ldl * RUN: $tmp/test */ #define GLAD_GL_IMPLEMENTATION #include int main(void) { (void) gladLoaderLoadGL(); return 0; } glad-2.0.2/test/c/compile/gl/header-only/004/000077500000000000000000000000001432671066000203745ustar00rootroot00000000000000glad-2.0.2/test/c/compile/gl/header-only/004/test.c000066400000000000000000000005071432671066000215210ustar00rootroot00000000000000/* * No extensions core GL header only * * GLAD: $GLAD --out-path=$tmp --api="gl:core" --extensions="" c --loader --header-only * COMPILE: $GCC $test -o $tmp/test -I$tmp/include -ldl * RUN: $tmp/test */ #define GLAD_GL_IMPLEMENTATION #include int main(void) { (void) gladLoaderLoadGL(); return 0; } glad-2.0.2/test/c/compile/gl/header-only/005/000077500000000000000000000000001432671066000203755ustar00rootroot00000000000000glad-2.0.2/test/c/compile/gl/header-only/005/test.c000066400000000000000000000005041432671066000215170ustar00rootroot00000000000000/* * Header only GL 2.1 All extensions * * GLAD: $GLAD --out-path=$tmp --api="gl:compatibility=2.1" c --loader --header-only * COMPILE: $GCC $test -o $tmp/test -I$tmp/include -ldl * RUN: $tmp/test */ #define GLAD_GL_IMPLEMENTATION #include int main(void) { (void) gladLoaderLoadGL(); return 0; } glad-2.0.2/test/c/compile/gl/header-only/006/000077500000000000000000000000001432671066000203765ustar00rootroot00000000000000glad-2.0.2/test/c/compile/gl/header-only/006/test.c000066400000000000000000000005231432671066000215210ustar00rootroot00000000000000/* * Header only GL 2.1 No extensions * * GLAD: $GLAD --out-path=$tmp --api="gl:compatibility=2.1" --extensions="" c --loader --header-only * COMPILE: $GCC $test -o $tmp/test -I$tmp/include -ldl * RUN: $tmp/test */ #define GLAD_GL_IMPLEMENTATION #include int main(void) { (void) gladLoaderLoadGL(); return 0; } glad-2.0.2/test/c/compile/gl/mx+mx-global/000077500000000000000000000000001432671066000201645ustar00rootroot00000000000000glad-2.0.2/test/c/compile/gl/mx+mx-global/001/000077500000000000000000000000001432671066000204645ustar00rootroot00000000000000glad-2.0.2/test/c/compile/gl/mx+mx-global/001/test_disabled.c000066400000000000000000000005561432671066000234440ustar00rootroot00000000000000/* * Full compatibility GL MX * * GLAD: $GLAD --out-path=$tmp --api="gl:compatibility" c --loader --mx --mx-global * COMPILE: $GCC $test -o $tmp/test -I$tmp/include $tmp/src/gl.c -ldl * RUN: $tmp/test */ #include int main(void) { GladGLContext gl = {0}; (void) gladLoaderLoadGL(); (void) gladLoaderLoadGLContext(&gl); return 0; } glad-2.0.2/test/c/compile/gl/mx+mx-global/002/000077500000000000000000000000001432671066000204655ustar00rootroot00000000000000glad-2.0.2/test/c/compile/gl/mx+mx-global/002/test_disabled.c000066400000000000000000000005341432671066000234410ustar00rootroot00000000000000/* * Full core GL MX * * GLAD: $GLAD --out-path=$tmp --api="gl:core" c --loader --mx --mx-global * COMPILE: $GCC $test -o $tmp/test -I$tmp/include $tmp/src/gl.c -ldl * RUN: $tmp/test */ #include int main(void) { GladGLContext gl = {0}; (void) gladLoaderLoadGL(); (void) gladLoaderLoadGLContext(&gl); return 0; } glad-2.0.2/test/c/compile/gl/mx+mx-global/003/000077500000000000000000000000001432671066000204665ustar00rootroot00000000000000glad-2.0.2/test/c/compile/gl/mx+mx-global/003/test_disabled.c000066400000000000000000000006071432671066000234430ustar00rootroot00000000000000/* * No extensions compatibility GL MX * * GLAD: $GLAD --out-path=$tmp --api="gl:compatibility" --extensions="" c --loader --mx --mx-global * COMPILE: $GCC $test -o $tmp/test -I$tmp/include $tmp/src/gl.c -ldl * RUN: $tmp/test */ #include int main(void) { GladGLContext gl = {0}; (void) gladLoaderLoadGL(); (void) gladLoaderLoadGLContext(&gl); return 0; } glad-2.0.2/test/c/compile/gl/mx+mx-global/004/000077500000000000000000000000001432671066000204675ustar00rootroot00000000000000glad-2.0.2/test/c/compile/gl/mx+mx-global/004/test_disabled.c000066400000000000000000000005651432671066000234470ustar00rootroot00000000000000/* * No extensions core GL MX * * GLAD: $GLAD --out-path=$tmp --api="gl:core" --extensions="" c --loader --mx --mx-global * COMPILE: $GCC $test -o $tmp/test -I$tmp/include $tmp/src/gl.c -ldl * RUN: $tmp/test */ #include int main(void) { GladGLContext gl = {0}; (void) gladLoaderLoadGL(); (void) gladLoaderLoadGLContext(&gl); return 0; } glad-2.0.2/test/c/compile/gl/mx+mx-global/005/000077500000000000000000000000001432671066000204705ustar00rootroot00000000000000glad-2.0.2/test/c/compile/gl/mx+mx-global/005/test_disabled.c000066400000000000000000000005621432671066000234450ustar00rootroot00000000000000/* * MX GL 2.1 All extensions * * GLAD: $GLAD --out-path=$tmp --api="gl:compatibility=2.1" c --loader --mx --mx-global * COMPILE: $GCC $test -o $tmp/test -I$tmp/include $tmp/src/gl.c -ldl * RUN: $tmp/test */ #include int main(void) { GladGLContext gl = {0}; (void) gladLoaderLoadGL(); (void) gladLoaderLoadGLContext(&gl); return 0; } glad-2.0.2/test/c/compile/gl/mx+mx-global/006/000077500000000000000000000000001432671066000204715ustar00rootroot00000000000000glad-2.0.2/test/c/compile/gl/mx+mx-global/006/test_disabled.c000066400000000000000000000006011432671066000234400ustar00rootroot00000000000000/* * MX GL 2.1 No extensions * * GLAD: $GLAD --out-path=$tmp --api="gl:compatibility=2.1" --extensions="" c --loader --mx --mx-global * COMPILE: $GCC $test -o $tmp/test -I$tmp/include $tmp/src/gl.c -ldl * RUN: $tmp/test */ #include int main(void) { GladGLContext gl = {0}; (void) gladLoaderLoadGL(); (void) gladLoaderLoadGLContext(&gl); return 0; } glad-2.0.2/test/c/compile/gl/mx+mx-global/007/000077500000000000000000000000001432671066000204725ustar00rootroot00000000000000glad-2.0.2/test/c/compile/gl/mx+mx-global/007/test_disabled.c000066400000000000000000000015241432671066000234460ustar00rootroot00000000000000/* * MX global generation, should compile basic API * * GLAD: $GLAD --out-path=$tmp --api="gl:compatibility" c --loader --mx --mx-global * COMPILE: $GCC $test -o $tmp/test -I$tmp/include $tmp/src/gl.c -ldl * RUN: $tmp/test */ #include #include typedef void (*VOID_FUNCPTR)(void); VOID_FUNCPTR loader_userptr(void *userptr, const char *name) { (void) name; (void) userptr; return NULL; } VOID_FUNCPTR loader(const char *name) { (void) name; return NULL; } int main(void) { GladGLContext gl = {0}; gladLoadGLContextUserPtr(&gl, loader_userptr, NULL); gladLoadGLContext(&gl, loader); gladLoaderLoadGLContext(&gl); gladLoadGLUserPtr(loader_userptr, NULL); gladLoadGL(loader); gladLoaderLoadGL(); gladSetGLContext(&gl); (void) gladGetGLContext(); return 0; } glad-2.0.2/test/c/compile/gl/mx+mx-global/008/000077500000000000000000000000001432671066000204735ustar00rootroot00000000000000glad-2.0.2/test/c/compile/gl/mx+mx-global/008/test_disabled.c000066400000000000000000000010211432671066000234370ustar00rootroot00000000000000/* * Full compatibility GL MX should not contain any symbols in COMMON section, * to prevent linking issues with OSX. * * Only tested here under the assumption that this build contains the most symbols. * * See: https://github.com/Dav1dde/glad/issues/158 * * GLAD: $GLAD --out-path=$tmp --api="gl:compatibility" c --loader --mx --mx-global * COMPILE: $GCC -c -o $tmp/test.o -I$tmp/include $tmp/src/gl.c -ldl * RUN: [ "$(nm $tmp/test.o | grep ' C ' | wc -l)" -eq "0" ] */ #error "this testfile should not be compiled" glad-2.0.2/test/c/compile/gl/on-demand/000077500000000000000000000000001432671066000175245ustar00rootroot00000000000000glad-2.0.2/test/c/compile/gl/on-demand/001/000077500000000000000000000000001432671066000200245ustar00rootroot00000000000000glad-2.0.2/test/c/compile/gl/on-demand/001/test.c000066400000000000000000000003541432671066000211510ustar00rootroot00000000000000/* * Full on demand GL * * GLAD: $GLAD --out-path=$tmp --api="gl:core" c --on-demand * COMPILE: $GCC $test -o $tmp/test -I$tmp/include $tmp/src/gl.c -ldl * RUN: $tmp/test */ #include int main(void) { return 0; } glad-2.0.2/test/c/compile/gl/on-demand/002/000077500000000000000000000000001432671066000200255ustar00rootroot00000000000000glad-2.0.2/test/c/compile/gl/on-demand/002/test.c000066400000000000000000000004021432671066000211440ustar00rootroot00000000000000/* * Full on demand GL with loader * * GLAD: $GLAD --out-path=$tmp --api="gl:core" c --on-demand --loader * COMPILE: $GCC $test -o $tmp/test -I$tmp/include $tmp/src/gl.c -ldl * RUN: $tmp/test */ #include int main(void) { return 0; } glad-2.0.2/test/c/compile/gles1/000077500000000000000000000000001432671066000162735ustar00rootroot00000000000000glad-2.0.2/test/c/compile/gles1/default/000077500000000000000000000000001432671066000177175ustar00rootroot00000000000000glad-2.0.2/test/c/compile/gles1/default/001/000077500000000000000000000000001432671066000202175ustar00rootroot00000000000000glad-2.0.2/test/c/compile/gles1/default/001/test.c000066400000000000000000000003351432671066000213430ustar00rootroot00000000000000/* * Full GLES1 * * GLAD: $GLAD --out-path=$tmp --api="gles1" c * COMPILE: $GCC $test -o $tmp/test -I$tmp/include $tmp/src/gles1.c -ldl * RUN: $tmp/test */ #include int main(void) { return 0; } glad-2.0.2/test/c/compile/gles1/default/002/000077500000000000000000000000001432671066000202205ustar00rootroot00000000000000glad-2.0.2/test/c/compile/gles1/default/002/test.c000066400000000000000000000004051432671066000213420ustar00rootroot00000000000000/* * Full GLES1 with loader * * GLAD: $GLAD --out-path=$tmp --api="egl,gles1" c --loader * COMPILE: $GCC $test -o $tmp/test -I$tmp/include $tmp/src/egl.c $tmp/src/gles1.c -ldl * RUN: $tmp/test */ #include int main(void) { return 0; } glad-2.0.2/test/c/compile/gles1/on-demand/000077500000000000000000000000001432671066000201355ustar00rootroot00000000000000glad-2.0.2/test/c/compile/gles1/on-demand/001/000077500000000000000000000000001432671066000204355ustar00rootroot00000000000000glad-2.0.2/test/c/compile/gles1/on-demand/001/test.c000066400000000000000000000003631432671066000215620ustar00rootroot00000000000000/* * Full on demand GLES1 * * GLAD: $GLAD --out-path=$tmp --api="gles1" c --on-demand * COMPILE: $GCC $test -o $tmp/test -I$tmp/include $tmp/src/gles1.c -ldl * RUN: $tmp/test */ #include int main(void) { return 0; } glad-2.0.2/test/c/compile/gles1/on-demand/002/000077500000000000000000000000001432671066000204365ustar00rootroot00000000000000glad-2.0.2/test/c/compile/gles1/on-demand/002/test.c000066400000000000000000000004331432671066000215610ustar00rootroot00000000000000/* * Full on demand GLES1 with loader * * GLAD: $GLAD --out-path=$tmp --api="gles1,egl" c --on-demand --loader * COMPILE: $GCC $test -o $tmp/test -I$tmp/include $tmp/src/gles1.c $tmp/src/egl.c -ldl * RUN: $tmp/test */ #include int main(void) { return 0; } glad-2.0.2/test/c/compile/gles2/000077500000000000000000000000001432671066000162745ustar00rootroot00000000000000glad-2.0.2/test/c/compile/gles2/alias/000077500000000000000000000000001432671066000173655ustar00rootroot00000000000000glad-2.0.2/test/c/compile/gles2/alias/001/000077500000000000000000000000001432671066000176655ustar00rootroot00000000000000glad-2.0.2/test/c/compile/gles2/alias/001/test.c000066400000000000000000000005521432671066000210120ustar00rootroot00000000000000/* * GLES2 No extensions, with aliasing * * Issue: https://github.com/Dav1dde/glad/issues/334 * * GLAD: $GLAD --out-path=$tmp --api="gles2=3.2" --extensions="" c --alias * COMPILE: $GCC $test -o $tmp/test -I$tmp/include $tmp/src/gles2.c -ldl * RUN: $tmp/test */ #include int main(void) { (void) glGenVertexArraysOES; return 0; } glad-2.0.2/test/c/compile/gles2/default/000077500000000000000000000000001432671066000177205ustar00rootroot00000000000000glad-2.0.2/test/c/compile/gles2/default/001/000077500000000000000000000000001432671066000202205ustar00rootroot00000000000000glad-2.0.2/test/c/compile/gles2/default/001/test.c000066400000000000000000000003351432671066000213440ustar00rootroot00000000000000/* * Full GLES2 * * GLAD: $GLAD --out-path=$tmp --api="gles2" c * COMPILE: $GCC $test -o $tmp/test -I$tmp/include $tmp/src/gles2.c -ldl * RUN: $tmp/test */ #include int main(void) { return 0; } glad-2.0.2/test/c/compile/gles2/default/002/000077500000000000000000000000001432671066000202215ustar00rootroot00000000000000glad-2.0.2/test/c/compile/gles2/default/002/test.c000066400000000000000000000004051432671066000213430ustar00rootroot00000000000000/* * Full GLES2 with loader * * GLAD: $GLAD --out-path=$tmp --api="egl,gles2" c --loader * COMPILE: $GCC $test -o $tmp/test -I$tmp/include $tmp/src/egl.c $tmp/src/gles2.c -ldl * RUN: $tmp/test */ #include int main(void) { return 0; } glad-2.0.2/test/c/compile/gles2/default/003/000077500000000000000000000000001432671066000202225ustar00rootroot00000000000000glad-2.0.2/test/c/compile/gles2/default/003/test.c000066400000000000000000000011401432671066000213410ustar00rootroot00000000000000/* * Emscripten GLES2 + EGL header only. * Related Issues: #387 * * GLAD: $GLAD --out-path=$tmp --api="egl,gles2" c --loader --header-only * COMPILE: $GCC $test -o $tmp/test -I$tmp/include -ldl * RUN: $tmp/test */ #include #define GLAD_GLES2_IMPLEMENTATION #define GLAD_PLATFORM_EMSCRIPTEN 1 #include /* egl before gles2 */ #include __eglMustCastToProperFunctionPointerType emscripten_GetProcAddress(const char *name) { GLAD_UNUSED(name); return GLAD_GNUC_EXTENSION (__eglMustCastToProperFunctionPointerType) NULL; } int main(void) { return 0; } glad-2.0.2/test/c/compile/gles2/default/004/000077500000000000000000000000001432671066000202235ustar00rootroot00000000000000glad-2.0.2/test/c/compile/gles2/default/004/test.c000066400000000000000000000013261432671066000213500ustar00rootroot00000000000000/* * Emscripten GLES2 + header only. See also 003. * Related Issues: #387 * * GLAD: $GLAD --out-path=$tmp --api="egl,gles2" c --loader --header-only * COMPILE: $GCC $test -o $tmp/test -I$tmp/include -ldl -Wno-pedantic * RUN: $tmp/test */ #include #define GLAD_GLES2_IMPLEMENTATION #define GLAD_PLATFORM_EMSCRIPTEN 1 #include /* * egl after gles2 * this is not correct, that's why we disable pedantic but it should still compile without */ #include __eglMustCastToProperFunctionPointerType emscripten_GetProcAddress(const char *name) { GLAD_UNUSED(name); return GLAD_GNUC_EXTENSION (__eglMustCastToProperFunctionPointerType) NULL; } int main(void) { return 0; } glad-2.0.2/test/c/compile/gles2/default/005/000077500000000000000000000000001432671066000202245ustar00rootroot00000000000000glad-2.0.2/test/c/compile/gles2/default/005/test.c000066400000000000000000000010711432671066000213460ustar00rootroot00000000000000/* * Emscripten GLES2 + header only. See also 003. * Related Issues: #387 * * GLAD: $GLAD --out-path=$tmp --api="gles2" c --loader --header-only * COMPILE: $GCC $test -o $tmp/test -I$tmp/include -ldl * RUN: $tmp/test */ #include #define GLAD_GLES2_IMPLEMENTATION #define GLAD_PLATFORM_EMSCRIPTEN 1 #include __eglMustCastToProperFunctionPointerType emscripten_GetProcAddress(const char *name) { GLAD_UNUSED(name); return GLAD_GNUC_EXTENSION (__eglMustCastToProperFunctionPointerType) NULL; } int main(void) { return 0; } glad-2.0.2/test/c/compile/gles2/on-demand/000077500000000000000000000000001432671066000201365ustar00rootroot00000000000000glad-2.0.2/test/c/compile/gles2/on-demand/001/000077500000000000000000000000001432671066000204365ustar00rootroot00000000000000glad-2.0.2/test/c/compile/gles2/on-demand/001/test.c000066400000000000000000000003631432671066000215630ustar00rootroot00000000000000/* * Full on demand GLES2 * * GLAD: $GLAD --out-path=$tmp --api="gles2" c --on-demand * COMPILE: $GCC $test -o $tmp/test -I$tmp/include $tmp/src/gles2.c -ldl * RUN: $tmp/test */ #include int main(void) { return 0; } glad-2.0.2/test/c/compile/gles2/on-demand/002/000077500000000000000000000000001432671066000204375ustar00rootroot00000000000000glad-2.0.2/test/c/compile/gles2/on-demand/002/test.c000066400000000000000000000004331432671066000215620ustar00rootroot00000000000000/* * Full on demand GLES2 with loader * * GLAD: $GLAD --out-path=$tmp --api="gles2,egl" c --on-demand --loader * COMPILE: $GCC $test -o $tmp/test -I$tmp/include $tmp/src/gles2.c $tmp/src/egl.c -ldl * RUN: $tmp/test */ #include int main(void) { return 0; } glad-2.0.2/test/c/compile/glx/000077500000000000000000000000001432671066000160525ustar00rootroot00000000000000glad-2.0.2/test/c/compile/glx/alias/000077500000000000000000000000001432671066000171435ustar00rootroot00000000000000glad-2.0.2/test/c/compile/glx/alias/001/000077500000000000000000000000001432671066000174435ustar00rootroot00000000000000glad-2.0.2/test/c/compile/glx/alias/001/test.c000066400000000000000000000005561432671066000205740ustar00rootroot00000000000000/* * Issue #362, aliasing func is not called. * Note this does not actually verify the functions get properly initialized only that it compiles * * GLAD: $GLAD --out-path=$tmp --api="glx,gl:core" c --alias * COMPILE: $GCC $test -o $tmp/test -I$tmp/include $tmp/src/glx.c -ldl -lX11 * RUN: $tmp/test */ #include int main(void) { return 0; } glad-2.0.2/test/c/compile/glx/default/000077500000000000000000000000001432671066000174765ustar00rootroot00000000000000glad-2.0.2/test/c/compile/glx/default/001/000077500000000000000000000000001432671066000177765ustar00rootroot00000000000000glad-2.0.2/test/c/compile/glx/default/001/test.c000066400000000000000000000005251432671066000211230ustar00rootroot00000000000000/* * Full GLX * * GLAD: $GLAD --out-path=$tmp --api="glx,gl:core" c --loader * COMPILE: $GCC $test -o $tmp/test -I$tmp/include $tmp/src/glx.c -ldl -lX11 * RUN: $tmp/test */ #include int main(void) { Display *display = NULL; (void) gladLoaderLoadGLX(display, 0); (void) gladLoaderUnloadGLX(); return 0; } glad-2.0.2/test/c/compile/glx/default/002/000077500000000000000000000000001432671066000177775ustar00rootroot00000000000000glad-2.0.2/test/c/compile/glx/default/002/test.c000066400000000000000000000005741432671066000211300ustar00rootroot00000000000000/* * Full GLX, without X11 as dependency * * GLAD: $GLAD --out-path=$tmp --api="glx,gl:core" c --loader * COMPILE: $GCC $test -o $tmp/test -I$tmp/include $tmp/src/glx.c -ldl -DGLAD_GLX_NO_X11 * RUN: $tmp/test */ #include int main(void) { Display *display = NULL; (void) gladLoaderLoadGLX(display, 0); (void) gladLoaderUnloadGLX(); return 0; } glad-2.0.2/test/c/compile/glx/default/003/000077500000000000000000000000001432671066000200005ustar00rootroot00000000000000glad-2.0.2/test/c/compile/glx/default/003/test.c000066400000000000000000000005441432671066000211260ustar00rootroot00000000000000/* * GLX 1.0 * * GLAD: $GLAD --out-path=$tmp --api="glx=1.0,gl:core" c --loader * COMPILE: $GCC $test -o $tmp/test -I$tmp/include $tmp/src/glx.c -ldl -DGLAD_GLX_NO_X11 * RUN: $tmp/test */ #include int main(void) { Display *display = NULL; (void) gladLoaderLoadGLX(display, 0); (void) gladLoaderUnloadGLX(); return 0; } glad-2.0.2/test/c/compile/glx/header-only/000077500000000000000000000000001432671066000202615ustar00rootroot00000000000000glad-2.0.2/test/c/compile/glx/header-only/001/000077500000000000000000000000001432671066000205615ustar00rootroot00000000000000glad-2.0.2/test/c/compile/glx/header-only/001/test.c000066400000000000000000000006051432671066000217050ustar00rootroot00000000000000/* * Full header only only GLX * * GLAD: $GLAD --out-path=$tmp --api="glx,gl:core" c --loader --header-only * COMPILE: $GCC $test -o $tmp/test -I$tmp/include -ldl -lX11 * RUN: $tmp/test */ #define GLAD_GLX_IMPLEMENTATION #include int main(void) { Display *display = NULL; (void) gladLoaderLoadGLX(display, 0); (void) gladLoaderUnloadGLX(); return 0; } glad-2.0.2/test/c/compile/glx/header-only/002/000077500000000000000000000000001432671066000205625ustar00rootroot00000000000000glad-2.0.2/test/c/compile/glx/header-only/002/test.c000066400000000000000000000006541432671066000217120ustar00rootroot00000000000000/* * Full header only only GLX, without X11 as dependency * * GLAD: $GLAD --out-path=$tmp --api="glx,gl:core" c --loader --header-only * COMPILE: $GCC $test -o $tmp/test -I$tmp/include -ldl -DGLAD_GLX_NO_X11 * RUN: $tmp/test */ #define GLAD_GLX_IMPLEMENTATION #include int main(void) { Display *display = NULL; (void) gladLoaderLoadGLX(display, 0); (void) gladLoaderUnloadGLX(); return 0; } glad-2.0.2/test/c/compile/glx/on-demand/000077500000000000000000000000001432671066000177145ustar00rootroot00000000000000glad-2.0.2/test/c/compile/glx/on-demand/001/000077500000000000000000000000001432671066000202145ustar00rootroot00000000000000glad-2.0.2/test/c/compile/glx/on-demand/001/test.c000066400000000000000000000003631432671066000213410ustar00rootroot00000000000000/* * Full on demand GLX * * GLAD: $GLAD --out-path=$tmp --api="glx,gl:core" c --on-demand * COMPILE: $GCC $test -o $tmp/test -I$tmp/include $tmp/src/glx.c -ldl * RUN: $tmp/test */ #include int main(void) { return 0; } glad-2.0.2/test/c/compile/glx/on-demand/002/000077500000000000000000000000001432671066000202155ustar00rootroot00000000000000glad-2.0.2/test/c/compile/glx/on-demand/002/test.c000066400000000000000000000004101432671066000213330ustar00rootroot00000000000000/* * Full on demand GLX with loader * * GLAD: $GLAD --out-path=$tmp --api="glx,gl:core" c --on-demand --loader * COMPILE: $GCC $test -o $tmp/test -I$tmp/include $tmp/src/glx.c -ldl * RUN: $tmp/test */ #include int main(void) { return 0; } glad-2.0.2/test/c/compile/vulkan/000077500000000000000000000000001432671066000165605ustar00rootroot00000000000000glad-2.0.2/test/c/compile/vulkan/alias/000077500000000000000000000000001432671066000176515ustar00rootroot00000000000000glad-2.0.2/test/c/compile/vulkan/alias/001/000077500000000000000000000000001432671066000201515ustar00rootroot00000000000000glad-2.0.2/test/c/compile/vulkan/alias/001/test.c000066400000000000000000000006001432671066000212700ustar00rootroot00000000000000/* * Full Vulkan with aliasing * * GLAD: $GLAD --out-path=$tmp --api="vulkan" c --loader --alias * COMPILE: $GCC $test -o $tmp/test -I$tmp/include $tmp/src/vulkan.c -ldl * RUN: $tmp/test */ #include #if !defined(VK_EXT_debug_report) || !defined(VK_VERSION_1_0) #error #endif int main(void) { (void) gladLoaderLoadVulkan(NULL, NULL, NULL); return 0; } glad-2.0.2/test/c/compile/vulkan/alias/002/000077500000000000000000000000001432671066000201525ustar00rootroot00000000000000glad-2.0.2/test/c/compile/vulkan/alias/002/test.c000066400000000000000000000006461432671066000213030ustar00rootroot00000000000000/* * Full Vulkan with aliasing and without extensions * * GLAD: $GLAD --out-path=$tmp --api="vulkan" --extensions="" c --loader --alias * COMPILE: $GCC $test -o $tmp/test -I$tmp/include $tmp/src/vulkan.c -ldl * RUN: $tmp/test */ #include #if defined(VK_EXT_debug_report) || !defined(VK_VERSION_1_0) #error #endif int main(void) { (void) gladLoaderLoadVulkan(NULL, NULL, NULL); return 0; } glad-2.0.2/test/c/compile/vulkan/debug/000077500000000000000000000000001432671066000176465ustar00rootroot00000000000000glad-2.0.2/test/c/compile/vulkan/debug/001/000077500000000000000000000000001432671066000201465ustar00rootroot00000000000000glad-2.0.2/test/c/compile/vulkan/debug/001/test.c000066400000000000000000000005161432671066000212730ustar00rootroot00000000000000/* * Issue #335. Debug functions are not guarded/protected by platform. * * GLAD: $GLAD --out-path=$tmp --api="vulkan=1.1" --extensions=VK_KHR_external_memory_win32 c --debug * COMPILE: $GCC $test -o $tmp/test -I$tmp/include $tmp/src/vulkan.c -ldl * RUN: $tmp/test */ #include int main(void) { return 0; } glad-2.0.2/test/c/compile/vulkan/default/000077500000000000000000000000001432671066000202045ustar00rootroot00000000000000glad-2.0.2/test/c/compile/vulkan/default/001/000077500000000000000000000000001432671066000205045ustar00rootroot00000000000000glad-2.0.2/test/c/compile/vulkan/default/001/test.c000066400000000000000000000004351432671066000216310ustar00rootroot00000000000000/* * Full Vulkan * * GLAD: $GLAD --out-path=$tmp --api="vulkan" c --loader * COMPILE: $GCC $test -o $tmp/test -I$tmp/include $tmp/src/vulkan.c -ldl * RUN: $tmp/test */ #include int main(void) { (void) gladLoaderLoadVulkan(NULL, NULL, NULL); return 0; } glad-2.0.2/test/c/compile/vulkan/default/002/000077500000000000000000000000001432671066000205055ustar00rootroot00000000000000glad-2.0.2/test/c/compile/vulkan/default/002/test.c000066400000000000000000000005001432671066000216230ustar00rootroot00000000000000/* * Full Vulkan without extensions * * GLAD: $GLAD --out-path=$tmp --api="vulkan" --extensions="" c --loader * COMPILE: $GCC $test -o $tmp/test -I$tmp/include $tmp/src/vulkan.c -ldl * RUN: $tmp/test */ #include int main(void) { (void) gladLoaderLoadVulkan(NULL, NULL, NULL); return 0; } glad-2.0.2/test/c/compile/vulkan/default/003/000077500000000000000000000000001432671066000205065ustar00rootroot00000000000000glad-2.0.2/test/c/compile/vulkan/default/003/test.c000066400000000000000000000005031432671066000216270ustar00rootroot00000000000000/* * Vulkan 1.0 without extensions * * GLAD: $GLAD --out-path=$tmp --api="vulkan=1.0" --extensions="" c --loader * COMPILE: $GCC $test -o $tmp/test -I$tmp/include $tmp/src/vulkan.c -ldl * RUN: $tmp/test */ #include int main(void) { (void) gladLoaderLoadVulkan(NULL, NULL, NULL); return 0; } glad-2.0.2/test/c/compile/vulkan/default/004/000077500000000000000000000000001432671066000205075ustar00rootroot00000000000000glad-2.0.2/test/c/compile/vulkan/default/004/test.c000066400000000000000000000005041432671066000216310ustar00rootroot00000000000000/* * Vulkan 1.0 with extensions * * GLAD: $GLAD --out-path=$tmp --api="vulkan=1.0" c --loader * COMPILE: $GCC $test -o $tmp/test -I$tmp/include $tmp/src/vulkan.c -ldl * RUN: $tmp/test */ #include #include int main(void) { (void) gladLoaderLoadVulkan(NULL, NULL, NULL); return 0; } glad-2.0.2/test/c/compile/vulkan/default/005/000077500000000000000000000000001432671066000205105ustar00rootroot00000000000000glad-2.0.2/test/c/compile/vulkan/default/005/test.c000066400000000000000000000011631432671066000216340ustar00rootroot00000000000000/* * Issue #171. Enums being aliased, but the enum that they are aliased to * do not exist (e.g. because they don't exist in this profile). * This is to make sure Vulkan handles the enums correctly as well (since * the vulkan specification only specifies the alias and no value). * * See also c/compile/gl/default/007 * * GLAD: $GLAD --out-path=$tmp --api="vulkan=1.1" --extensions="VK_KHR_external_memory_capabilities" c * COMPILE: $GCC $test -o $tmp/test -I$tmp/include $tmp/src/vulkan.c -ldl * RUN: $tmp/test */ #include #if VK_LUID_SIZE_KHR != 8 #error #endif int main(void) { return 0; } glad-2.0.2/test/c/compile/vulkan/default/006/000077500000000000000000000000001432671066000205115ustar00rootroot00000000000000glad-2.0.2/test/c/compile/vulkan/default/006/test.c000066400000000000000000000007041432671066000216350ustar00rootroot00000000000000/* * Issue #350, missing ENUM_MAX values * * GLAD: $GLAD --out-path=$tmp --api="vulkan=1.1" c * COMPILE: $GCC $test -o $tmp/test -I$tmp/include $tmp/src/vulkan.c -ldl * RUN: $tmp/test */ #include int main(void) { VkDeviceGroupPresentModeFlagBitsKHR a = VK_DEVICE_GROUP_PRESENT_MODE_FLAG_BITS_MAX_ENUM_KHR; VkSubgroupFeatureFlagBits b = VK_SUBGROUP_FEATURE_FLAG_BITS_MAX_ENUM; (void) a; (void) b; return 0; } glad-2.0.2/test/c/compile/vulkan/header-only+mx/000077500000000000000000000000001432671066000214075ustar00rootroot00000000000000glad-2.0.2/test/c/compile/vulkan/header-only+mx/001/000077500000000000000000000000001432671066000217075ustar00rootroot00000000000000glad-2.0.2/test/c/compile/vulkan/header-only+mx/001/test.c000066400000000000000000000013451432671066000230350ustar00rootroot00000000000000/* * Full vulkan, header only, mx * * GLAD: $GLAD --out-path=$tmp --api="vulkan" c --loader --header-only --mx * COMPILE: $GCC $test -o $tmp/test -I$tmp/include -ldl * RUN: $tmp/test */ #define GLAD_VULKAN_IMPLEMENTATION #include typedef void (*VOID_FUNCPTR)(void); VOID_FUNCPTR loader_userptr(void *userptr, const char *name) { (void) name; (void) userptr; return NULL; } VOID_FUNCPTR loader(const char *name) { (void) name; return NULL; } int main(void) { GladVulkanContext context = {0}; (void) gladLoadVulkanContextUserPtr(&context, NULL, loader_userptr, NULL); (void) gladLoadVulkanContext(&context, NULL, loader); (void) gladLoaderLoadVulkanContext(&context, NULL, NULL, NULL); return 0; } glad-2.0.2/test/c/compile/vulkan/header-only+mx/002/000077500000000000000000000000001432671066000217105ustar00rootroot00000000000000glad-2.0.2/test/c/compile/vulkan/header-only+mx/002/test.c000066400000000000000000000014111432671066000230300ustar00rootroot00000000000000/* * Full vulkan without extensions, header only, mx * * GLAD: $GLAD --out-path=$tmp --api="vulkan" --extensions="" c --loader --header-only --mx * COMPILE: $GCC $test -o $tmp/test -I$tmp/include -ldl * RUN: $tmp/test */ #define GLAD_VULKAN_IMPLEMENTATION #include typedef void (*VOID_FUNCPTR)(void); VOID_FUNCPTR loader_userptr(void *userptr, const char *name) { (void) name; (void) userptr; return NULL; } VOID_FUNCPTR loader(const char *name) { (void) name; return NULL; } int main(void) { GladVulkanContext context = {0}; (void) gladLoadVulkanContextUserPtr(&context, NULL, loader_userptr, NULL); (void) gladLoadVulkanContext(&context, NULL, loader); (void) gladLoaderLoadVulkanContext(&context, NULL, NULL, NULL); return 0; } glad-2.0.2/test/c/compile/vulkan/header-only/000077500000000000000000000000001432671066000207675ustar00rootroot00000000000000glad-2.0.2/test/c/compile/vulkan/header-only/001/000077500000000000000000000000001432671066000212675ustar00rootroot00000000000000glad-2.0.2/test/c/compile/vulkan/header-only/001/test.c000066400000000000000000000006251432671066000224150ustar00rootroot00000000000000/* * Full Vulkan header only * * GLAD: $GLAD --out-path=$tmp --api="vulkan" c --loader --header-only * COMPILE: $GCC $test -o $tmp/test -I$tmp/include -ldl * RUN: $tmp/test */ #define GLAD_VULKAN_IMPLEMENTATION #include #if !defined(VK_EXT_debug_report) || !defined(VK_VERSION_1_0) #error #endif int main(void) { (void) gladLoaderLoadVulkan(NULL, NULL, NULL); return 0; } glad-2.0.2/test/c/compile/vulkan/header-only/002/000077500000000000000000000000001432671066000212705ustar00rootroot00000000000000glad-2.0.2/test/c/compile/vulkan/header-only/002/test.c000066400000000000000000000006701432671066000224160ustar00rootroot00000000000000/* * Full Vulkan without extensions, header only * * GLAD: $GLAD --out-path=$tmp --api="vulkan" --extensions="" c --loader --header-only * COMPILE: $GCC $test -o $tmp/test -I$tmp/include -ldl * RUN: $tmp/test */ #define GLAD_VULKAN_IMPLEMENTATION #include #if defined(VK_EXT_debug_report) || !defined(VK_VERSION_1_0) #error #endif int main(void) { (void) gladLoaderLoadVulkan(NULL, NULL, NULL); return 0; } glad-2.0.2/test/c/compile/vulkan/mx+mx-global/000077500000000000000000000000001432671066000210625ustar00rootroot00000000000000glad-2.0.2/test/c/compile/vulkan/mx+mx-global/001/000077500000000000000000000000001432671066000213625ustar00rootroot00000000000000glad-2.0.2/test/c/compile/vulkan/mx+mx-global/001/test_disabled.c000066400000000000000000000015401432671066000243340ustar00rootroot00000000000000/* * Full vulkan, mx * * GLAD: $GLAD --out-path=$tmp --api="vulkan" c --loader --mx --mx-global * COMPILE: $GCC $test -o $tmp/test -I$tmp/include $tmp/src/vulkan.c -ldl * RUN: $tmp/test */ #include typedef void (*VOID_FUNCPTR)(void); VOID_FUNCPTR loader_userptr(void *userptr, const char *name) { (void) name; (void) userptr; return NULL; } VOID_FUNCPTR loader(const char *name) { (void) name; return NULL; } int main(void) { GladVulkanContext context = {0}; (void) gladLoadVulkanUserPtr(NULL, loader_userptr, NULL); (void) gladLoadVulkanContextUserPtr(&context, NULL, loader_userptr, NULL); (void) gladLoadVulkan(NULL, loader); (void) gladLoadVulkanContext(&context, NULL, loader); (void) gladLoaderLoadVulkan(NULL, NULL, NULL); (void) gladLoaderLoadVulkanContext(&context, NULL, NULL, NULL); return 0; } glad-2.0.2/test/c/compile/vulkan/mx+mx-global/002/000077500000000000000000000000001432671066000213635ustar00rootroot00000000000000glad-2.0.2/test/c/compile/vulkan/mx+mx-global/002/test_disabled.c000066400000000000000000000016061432671066000243400ustar00rootroot00000000000000/* * Full vulkan without extensions, mx * * GLAD: $GLAD --out-path=$tmp --api="vulkan" --extensions="" c --loader --mx --mx-global * COMPILE: $GCC $test -o $tmp/test -I$tmp/include $tmp/src/vulkan.c -ldl -g * RUN: $tmp/test */ #include typedef void (*VOID_FUNCPTR)(void); VOID_FUNCPTR loader_userptr(void *userptr, const char *name) { (void) name; (void) userptr; return NULL; } VOID_FUNCPTR loader(const char *name) { (void) name; return NULL; } int main(void) { GladVulkanContext context = {0}; (void) gladLoadVulkanUserPtr(NULL, loader_userptr, NULL); (void) gladLoadVulkanContextUserPtr(&context, NULL, loader_userptr, NULL); (void) gladLoadVulkan(NULL, loader); (void) gladLoadVulkanContext(&context, NULL, loader); (void) gladLoaderLoadVulkan(NULL, NULL, NULL); (void) gladLoaderLoadVulkanContext(&context, NULL, NULL, NULL); return 0; } glad-2.0.2/test/c/compile/vulkan/on-demand/000077500000000000000000000000001432671066000204225ustar00rootroot00000000000000glad-2.0.2/test/c/compile/vulkan/on-demand/001/000077500000000000000000000000001432671066000207225ustar00rootroot00000000000000glad-2.0.2/test/c/compile/vulkan/on-demand/001/test.c000066400000000000000000000003671432671066000220530ustar00rootroot00000000000000/* * Full on demand Vulkan * * GLAD: $GLAD --out-path=$tmp --api="vulkan" c --on-demand * COMPILE: $GCC $test -o $tmp/test -I$tmp/include $tmp/src/vulkan.c -ldl * RUN: $tmp/test */ #include int main(void) { return 0; } glad-2.0.2/test/c/compile/vulkan/on-demand/002/000077500000000000000000000000001432671066000207235ustar00rootroot00000000000000glad-2.0.2/test/c/compile/vulkan/on-demand/002/test.c000066400000000000000000000004141432671066000220450ustar00rootroot00000000000000/* * Full on demand Vulkan with loader * * GLAD: $GLAD --out-path=$tmp --api="vulkan" c --on-demand --loader * COMPILE: $GCC $test -o $tmp/test -I$tmp/include $tmp/src/vulkan.c -ldl * RUN: $tmp/test */ #include int main(void) { return 0; } glad-2.0.2/test/c/parse/000077500000000000000000000000001432671066000147425ustar00rootroot00000000000000glad-2.0.2/test/c/parse/001/000077500000000000000000000000001432671066000152425ustar00rootroot00000000000000glad-2.0.2/test/c/parse/001/test.c000066400000000000000000000007071432671066000163710ustar00rootroot00000000000000/* * GL_VERTEX_ARRAY was removed in gl:core=3.2 and later reintroduced in gl=4.3. * Test checks if the symbol exists in the generated code. * Related Issues: #137, #139 * * GLAD: $GLAD --out-path=$tmp --api="gl:core=4.3" --extensions="" c * COMPILE: $GCC $test -o $tmp/test -I$tmp/include $tmp/src/gl.c -ldl * RUN: $tmp/test */ #include int main(void) { if (GL_VERTEX_ARRAY == 0x8074) { return 0; } return 1; } glad-2.0.2/test/c/parse/002/000077500000000000000000000000001432671066000152435ustar00rootroot00000000000000glad-2.0.2/test/c/parse/002/test.c000066400000000000000000000011641432671066000163700ustar00rootroot00000000000000/* * VK_NV_ray_tracing depends on a type which depends on an aliased type. * The aliased type is not part of the feature set. * Make sure the aliased type is part generated, since the alias is done through a typedef. * * GLAD: $GLAD --out-path=$tmp --api="vulkan=1.1" --extensions="VK_NV_ray_tracing" c * COMPILE: $GCC $test -o $tmp/test -I$tmp/include $tmp/src/vulkan.c -ldl * RUN: $tmp/test */ #include int main(void) { /* make sure something is referenced so stuff doesn't just get optimized away */ VkAccelerationStructureMemoryRequirementsInfoNV unused; (void) unused; return 0; } glad-2.0.2/test/c/parse/003/000077500000000000000000000000001432671066000152445ustar00rootroot00000000000000glad-2.0.2/test/c/parse/003/test.c000066400000000000000000000007271432671066000163750ustar00rootroot00000000000000/* * The GL_KHR_debug has suffixed symbols for GLES but symbols without suffix for GL. * Make sure only the suffixed symbols appear in the generated output for gles. * Related Issues: #281 * * See also: 004 * * GLAD: $GLAD --out-path=$tmp --api="gles2=3.1" --extensions="GL_KHR_debug" c * COMPILE: ! $GCC $test -o $tmp/test -I$tmp/include $tmp/src/gles2.c -ldl * RUN: true */ #include int main(void) { (void) glObjectLabel; return 0; } glad-2.0.2/test/c/parse/004/000077500000000000000000000000001432671066000152455ustar00rootroot00000000000000glad-2.0.2/test/c/parse/004/test.c000066400000000000000000000007321432671066000163720ustar00rootroot00000000000000/* * The GL_KHR_debug has suffixed symbols for GLES but symbols without suffix for GL. * Make sure only the symbols without suffix appear in the generated output for gl. * Related Issues: #281 * * See also: 003 * * GLAD: $GLAD --out-path=$tmp --api="gl:core=3.3" --extensions="GL_KHR_debug" c * COMPILE: ! $GCC $test -o $tmp/test -I$tmp/include $tmp/src/gl.c -ldl * RUN: true */ #include int main(void) { (void) glObjectLabelKHR; return 0; } glad-2.0.2/test/c/run/000077500000000000000000000000001432671066000144345ustar00rootroot00000000000000glad-2.0.2/test/c/run/gl/000077500000000000000000000000001432671066000150365ustar00rootroot00000000000000glad-2.0.2/test/c/run/gl/debug/000077500000000000000000000000001432671066000161245ustar00rootroot00000000000000glad-2.0.2/test/c/run/gl/debug/001/000077500000000000000000000000001432671066000164245ustar00rootroot00000000000000glad-2.0.2/test/c/run/gl/debug/001/test.c000066400000000000000000000070031432671066000175470ustar00rootroot00000000000000/* * Core 3.3 debug profile using glfw to load * * GLAD: $GLAD --out-path=$tmp --api="gl:core" --extensions="" c --debug * COMPILE: $GCC -Wno-pedantic $test -o $tmp/test -I$tmp/include $tmp/src/gl.c -ldl -lglfw * RUN: $tmp/test */ #include #include #include #include #include #include #define ASSERT(expression, message, args...) if(!(expression)) { fprintf(stderr, "%s(%d): " message "\n", __FILE__, __LINE__, ##args); exit(1); } #define WIDTH 50 #define HEIGHT 50 static int pre = 0; static int post = 0; static void pre_call_gl_callback(const char *name, GLADapiproc apiproc, int len_args, ...) { ASSERT(strcmp(name, "glClear") == 0, "got %s expected glClear", name); ASSERT(apiproc != NULL, "glClear proc is null"); ASSERT((void*) apiproc == (void*) glad_glClear, "passed in proc is not actual implementation"); ASSERT((void*) apiproc != (void*) glad_debug_glClear, "passed in proc is debug implementation"); ASSERT(len_args == 1, "expected only one argument, got %d", len_args); ++pre; va_list args; va_start(args, len_args); int value = va_arg(args, int); va_end(args); ASSERT(value == GL_COLOR_BUFFER_BIT || value == GL_DEPTH_BUFFER_BIT, "invalid argument in debug callback"); } static void post_call_gl_callback(void *ret, const char *name, GLADapiproc apiproc, int len_args, ...) { ASSERT(strcmp(name, "glClear") == 0, "got %s expected glClear", name); ASSERT(apiproc != NULL, "glClear proc is null"); ASSERT((void*) apiproc == (void*) glad_glClear, "passed in proc is not actual implementation"); ASSERT((void*) apiproc != (void*) glad_debug_glClear, "passed in proc is debug implementation"); ASSERT(len_args == 1, "expected only one argument, got %d", len_args); ASSERT(ret == NULL, "return value not null"); ++post; va_list args; va_start(args, len_args); int value = va_arg(args, int); va_end(args); ASSERT(value == GL_COLOR_BUFFER_BIT || value == GL_DEPTH_BUFFER_BIT, "invalid argument in debug callback"); } int main(void) { ASSERT(glfwInit(), "glfw init failed"); glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); GLFWwindow* window = glfwCreateWindow(WIDTH, HEIGHT, "", NULL, NULL); ASSERT(window != NULL, "glfw window creation failed"); glfwMakeContextCurrent(window); int version = gladLoadGL(glfwGetProcAddress); ASSERT(version >= 3003, "glad version %d < 3003", version); ASSERT(GLAD_VERSION_MAJOR(version) >= 3, "glad major version %d < 3", GLAD_VERSION_MAJOR(version)); ASSERT(GLAD_VERSION_MAJOR(version) > 3 || GLAD_VERSION_MINOR(version) >= 3, "glad minor version %d < 3", GLAD_VERSION_MINOR(version)); ASSERT(GLAD_GL_VERSION_3_3, "GL_VERSION_3_3 not set"); glViewport(0, 0, WIDTH, HEIGHT); glClearColor(0.2f, 0.3f, 0.3f, 1.0f); gladSetGLPreCallback(pre_call_gl_callback); gladSetGLPostCallback(post_call_gl_callback); glClear(GL_COLOR_BUFFER_BIT); /* make sure install/uninstall is working as expected */ gladUninstallGLDebug(); glViewport(0, 0, WIDTH, HEIGHT); glClear(GL_COLOR_BUFFER_BIT); gladInstallGLDebug(); glClear(GL_DEPTH_BUFFER_BIT); ASSERT(pre == 2, "pre callback called %d times, expected twice", pre); ASSERT(post == 2, "post callback called %d times, expected twice", post); glfwSwapBuffers(window); glfwTerminate(); return 0; } glad-2.0.2/test/c/run/gl/default/000077500000000000000000000000001432671066000164625ustar00rootroot00000000000000glad-2.0.2/test/c/run/gl/default/001/000077500000000000000000000000001432671066000167625ustar00rootroot00000000000000glad-2.0.2/test/c/run/gl/default/001/test.c000066400000000000000000000030101432671066000200770ustar00rootroot00000000000000/* * Core 3.3 profile using glfw to load * * GLAD: $GLAD --out-path=$tmp --api="gl:core" c * COMPILE: $GCC -Wno-pedantic $test -o $tmp/test -I$tmp/include $tmp/src/gl.c -ldl -lglfw * RUN: $tmp/test */ #include #include #include #include #define ASSERT(expression, message, args...) if(!(expression)) { fprintf(stderr, "%s(%d): " message "\n", __FILE__, __LINE__, ##args); exit(1); } #define WIDTH 50 #define HEIGHT 50 int main(void) { ASSERT(glfwInit(), "glfw init failed"); glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); GLFWwindow* window = glfwCreateWindow(WIDTH, HEIGHT, "", NULL, NULL); ASSERT(window != NULL, "glfw window creation failed"); glfwMakeContextCurrent(window); int version = gladLoadGL(glfwGetProcAddress); ASSERT(version >= 3003, "glad version %d < 3003", version); ASSERT(GLAD_VERSION_MAJOR(version) >= 3, "glad major version %d < 3", GLAD_VERSION_MAJOR(version)); ASSERT(GLAD_VERSION_MAJOR(version) > 3 || GLAD_VERSION_MINOR(version) >= 3, "glad minor version %d < 3", GLAD_VERSION_MINOR(version)); ASSERT(GLAD_GL_VERSION_3_3, "GL_VERSION_3_3 not set"); ASSERT(GLAD_GL_KHR_debug == 1, "KHR_debug not available"); glViewport(0, 0, WIDTH, HEIGHT); glClearColor(0.2f, 0.3f, 0.3f, 1.0f); glClear(GL_COLOR_BUFFER_BIT); glfwSwapBuffers(window); glfwTerminate(); return 0; }glad-2.0.2/test/c/run/gl/default/002/000077500000000000000000000000001432671066000167635ustar00rootroot00000000000000glad-2.0.2/test/c/run/gl/default/002/test.c000066400000000000000000000030201432671066000201010ustar00rootroot00000000000000/* * Core 3.3 profile using internal loader to load * * GLAD: $GLAD --out-path=$tmp --api="gl:core" c --loader * COMPILE: $GCC -Wno-pedantic $test -o $tmp/test -I$tmp/include $tmp/src/gl.c -ldl -lglfw * RUN: $tmp/test */ #include #include #include #include #define ASSERT(expression, message, args...) if(!(expression)) { fprintf(stderr, "%s(%d): " message "\n", __FILE__, __LINE__, ##args); exit(1); } #define WIDTH 50 #define HEIGHT 50 int main(void) { ASSERT(glfwInit(), "glfw init failed"); glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); GLFWwindow* window = glfwCreateWindow(WIDTH, HEIGHT, "", NULL, NULL); ASSERT(window != NULL, "glfw window creation failed"); glfwMakeContextCurrent(window); int version = gladLoaderLoadGL(); ASSERT(version >= 3003, "glad version %d < 3003", version); ASSERT(GLAD_VERSION_MAJOR(version) >= 3, "glad major version %d < 3", GLAD_VERSION_MAJOR(version)); ASSERT(GLAD_VERSION_MAJOR(version) > 3 || GLAD_VERSION_MINOR(version) >= 3, "glad minor version %d < 3", GLAD_VERSION_MINOR(version)); ASSERT(GLAD_GL_VERSION_3_3, "GL_VERSION_3_3 not set"); ASSERT(GLAD_GL_KHR_debug == 1, "KHR_debug not available"); glViewport(0, 0, WIDTH, HEIGHT); glClearColor(0.2f, 0.3f, 0.3f, 1.0f); glClear(GL_COLOR_BUFFER_BIT); glfwSwapBuffers(window); glfwTerminate(); return 0; }glad-2.0.2/test/c/run/gl/default/003/000077500000000000000000000000001432671066000167645ustar00rootroot00000000000000glad-2.0.2/test/c/run/gl/default/003/test.c000066400000000000000000000027041432671066000201120ustar00rootroot00000000000000/* * 2.1 using internal loader to load * * GLAD: $GLAD --out-path=$tmp --api="gl:core=2.1" c --loader * COMPILE: $GCC -Wno-pedantic $test -o $tmp/test -I$tmp/include $tmp/src/gl.c -ldl -lglfw * RUN: $tmp/test */ #include #include #include #include #define ASSERT(expression, message, args...) if(!(expression)) { fprintf(stderr, "%s(%d): " message "\n", __FILE__, __LINE__, ##args); exit(1); } #define WIDTH 50 #define HEIGHT 50 int main(void) { ASSERT(glfwInit(), "glfw init failed"); glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 2); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 1); GLFWwindow* window = glfwCreateWindow(WIDTH, HEIGHT, "", NULL, NULL); ASSERT(window != NULL, "glfw window creation failed"); glfwMakeContextCurrent(window); int version = gladLoaderLoadGL(); ASSERT(version >= 2001, "glad version %d < 2001", version); ASSERT(GLAD_VERSION_MAJOR(version) >= 2, "glad major version %d < 2", GLAD_VERSION_MAJOR(version)); ASSERT(GLAD_VERSION_MAJOR(version) > 2 || GLAD_VERSION_MINOR(version) >= 1, "glad minor version %d < 1", GLAD_VERSION_MINOR(version)); ASSERT(GLAD_GL_VERSION_2_1, "GL_VERSION_2_1 not set"); ASSERT(GLAD_GL_KHR_debug == 1, "KHR_debug not available"); glViewport(0, 0, WIDTH, HEIGHT); glClearColor(0.2f, 0.3f, 0.3f, 1.0f); glClear(GL_COLOR_BUFFER_BIT); glfwSwapBuffers(window); glfwTerminate(); return 0; }glad-2.0.2/test/c/run/gl/mx/000077500000000000000000000000001432671066000154625ustar00rootroot00000000000000glad-2.0.2/test/c/run/gl/mx/001/000077500000000000000000000000001432671066000157625ustar00rootroot00000000000000glad-2.0.2/test/c/run/gl/mx/001/test.c000066400000000000000000000034451432671066000171130ustar00rootroot00000000000000/* * MX Core 3.3 profile using glfw to load * * GLAD: $GLAD --out-path=$tmp --api="gl:core" c --mx * COMPILE: $GCC -Wno-pedantic $test -o $tmp/test -I$tmp/include $tmp/src/gl.c -ldl -lglfw * RUN: $tmp/test */ #include #include #include #include #define ASSERT(expression, message, args...) if(!(expression)) { fprintf(stderr, "%s(%d): " message "\n", __FILE__, __LINE__, ##args); exit(1); } #define WIDTH 50 #define HEIGHT 50 GLFWwindow* create_window(void) { glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); GLFWwindow *window = glfwCreateWindow(WIDTH, HEIGHT, "", NULL, NULL); ASSERT(window != NULL, "glfw window creation failed"); return window; } void run(GLFWwindow *window) { GladGLContext context = {0}; glfwMakeContextCurrent(window); int version = gladLoadGLContext(&context, glfwGetProcAddress); ASSERT(version >= 3003, "glad version %d < 3003", version); ASSERT(GLAD_VERSION_MAJOR(version) >= 3, "glad major version %d < 3", GLAD_VERSION_MAJOR(version)); ASSERT(GLAD_VERSION_MAJOR(version) > 3 || GLAD_VERSION_MINOR(version) >= 3, "glad minor version %d < 3", GLAD_VERSION_MINOR(version)); ASSERT(context.VERSION_3_3, "GL_VERSION_3_3 not set"); ASSERT(context.KHR_debug, "KHR_debug not available"); context.Viewport(0, 0, WIDTH, HEIGHT); context.ClearColor(0.2f, 0.3f, 0.3f, 1.0f); context.Clear(GL_COLOR_BUFFER_BIT); glfwSwapBuffers(window); } int main(void) { ASSERT(glfwInit(), "glfw init failed"); GLFWwindow *window1 = create_window(); GLFWwindow *window2 = create_window(); run(window1); run(window2); glfwTerminate(); return 0; }glad-2.0.2/test/c/run/gl/mx/002/000077500000000000000000000000001432671066000157635ustar00rootroot00000000000000glad-2.0.2/test/c/run/gl/mx/002/test.c000066400000000000000000000034431432671066000171120ustar00rootroot00000000000000/* * MX Core 3.3 profile using internal loader * * GLAD: $GLAD --out-path=$tmp --api="gl:core" c --mx --loader * COMPILE: $GCC -Wno-pedantic $test -o $tmp/test -I$tmp/include $tmp/src/gl.c -ldl -lglfw * RUN: $tmp/test */ #include #include #include #include #define ASSERT(expression, message, args...) if(!(expression)) { fprintf(stderr, "%s(%d): " message "\n", __FILE__, __LINE__, ##args); exit(1); } #define WIDTH 50 #define HEIGHT 50 GLFWwindow* create_window(void) { glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); GLFWwindow *window = glfwCreateWindow(WIDTH, HEIGHT, "", NULL, NULL); ASSERT(window != NULL, "glfw window creation failed"); return window; } void run(GLFWwindow *window) { GladGLContext context = {0}; glfwMakeContextCurrent(window); int version = gladLoaderLoadGLContext(&context); ASSERT(version >= 3003, "glad version %d < 3003", version); ASSERT(GLAD_VERSION_MAJOR(version) >= 3, "glad major version %d < 3", GLAD_VERSION_MAJOR(version)); ASSERT(GLAD_VERSION_MAJOR(version) > 3 || GLAD_VERSION_MINOR(version) >= 3, "glad minor version %d < 3", GLAD_VERSION_MINOR(version)); ASSERT(context.VERSION_3_3, "GL_VERSION_3_3 not set"); ASSERT(context.KHR_debug, "KHR_debug not available"); context.Viewport(0, 0, WIDTH, HEIGHT); context.ClearColor(0.2f, 0.3f, 0.3f, 1.0f); context.Clear(GL_COLOR_BUFFER_BIT); glfwSwapBuffers(window); } int main(void) { ASSERT(glfwInit(), "glfw init failed"); GLFWwindow *window1 = create_window(); GLFWwindow *window2 = create_window(); run(window1); run(window2); glfwTerminate(); return 0; }glad-2.0.2/test/c/run/gl/mx/003/000077500000000000000000000000001432671066000157645ustar00rootroot00000000000000glad-2.0.2/test/c/run/gl/mx/003/test_disabled.c000066400000000000000000000037451432671066000207470ustar00rootroot00000000000000/* * MX Core 3.3 profile using glfw to load. * Using MX Global for GL calls. * * GLAD: $GLAD --out-path=$tmp --api="gl:core" c --mx --mx-global * COMPILE: $GCC -Wno-pedantic $test -o $tmp/test -I$tmp/include $tmp/src/gl.c -ldl -lglfw * RUN: $tmp/test */ #include #include #include #include #include #define ASSERT(expression, message, args...) if(!(expression)) { fprintf(stderr, "%s(%d): " message "\n", __FILE__, __LINE__, ##args); exit(1); } #define WIDTH 50 #define HEIGHT 50 GLFWwindow* create_window(void) { glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); GLFWwindow *window = glfwCreateWindow(WIDTH, HEIGHT, "", NULL, NULL); ASSERT(window != NULL, "glfw window creation failed"); return window; } void run(GLFWwindow *window) { GladGLContext context = {0}; context.userptr = (void*) &context; glfwMakeContextCurrent(window); int version = gladLoadGLContext(&context, glfwGetProcAddress); ASSERT(memcmp(&context, gladGetGLContext(), sizeof(GladGLContext)) == 0, "invalid global context"); ASSERT(version >= 3003, "glad version %d < 3003", version); ASSERT(GLAD_VERSION_MAJOR(version) >= 3, "glad major version %d < 3", GLAD_VERSION_MAJOR(version)); ASSERT(GLAD_VERSION_MAJOR(version) > 3 || GLAD_VERSION_MINOR(version) >= 3, "glad minor version %d < 3", GLAD_VERSION_MINOR(version)); ASSERT(context.VERSION_3_3, "GL_VERSION_3_3 not set"); ASSERT(context.KHR_debug, "KHR_debug not available"); glViewport(0, 0, WIDTH, HEIGHT); glClearColor(0.2f, 0.3f, 0.3f, 1.0f); glClear(GL_COLOR_BUFFER_BIT); glfwSwapBuffers(window); } int main(void) { ASSERT(glfwInit(), "glfw init failed"); GLFWwindow *window1 = create_window(); GLFWwindow *window2 = create_window(); run(window1); run(window2); glfwTerminate(); return 0; }glad-2.0.2/test/c/run/gl/mx/004/000077500000000000000000000000001432671066000157655ustar00rootroot00000000000000glad-2.0.2/test/c/run/gl/mx/004/test_disabled.c000066400000000000000000000037431432671066000207460ustar00rootroot00000000000000/* * MX Core 3.3 profile using internal loader. * Using MX Global for GL calls. * * GLAD: $GLAD --out-path=$tmp --api="gl:core" c --mx --mx-global --loader * COMPILE: $GCC -Wno-pedantic $test -o $tmp/test -I$tmp/include $tmp/src/gl.c -ldl -lglfw * RUN: $tmp/test */ #include #include #include #include #include #define ASSERT(expression, message, args...) if(!(expression)) { fprintf(stderr, "%s(%d): " message "\n", __FILE__, __LINE__, ##args); exit(1); } #define WIDTH 50 #define HEIGHT 50 GLFWwindow* create_window(void) { glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); GLFWwindow *window = glfwCreateWindow(WIDTH, HEIGHT, "", NULL, NULL); ASSERT(window != NULL, "glfw window creation failed"); return window; } void run(GLFWwindow *window) { GladGLContext context = {0}; context.userptr = (void*) &context; glfwMakeContextCurrent(window); int version = gladLoaderLoadGLContext(&context); ASSERT(memcmp(&context, gladGetGLContext(), sizeof(GladGLContext)) == 0, "invalid global context"); ASSERT(version >= 3003, "glad version %d < 3003", version); ASSERT(GLAD_VERSION_MAJOR(version) >= 3, "glad major version %d < 3", GLAD_VERSION_MAJOR(version)); ASSERT(GLAD_VERSION_MAJOR(version) > 3 || GLAD_VERSION_MINOR(version) >= 3, "glad minor version %d < 3", GLAD_VERSION_MINOR(version)); ASSERT(context.VERSION_3_3, "GL_VERSION_3_3 not set"); ASSERT(context.KHR_debug, "KHR_debug not available"); glViewport(0, 0, WIDTH, HEIGHT); glClearColor(0.2f, 0.3f, 0.3f, 1.0f); glClear(GL_COLOR_BUFFER_BIT); glfwSwapBuffers(window); } int main(void) { ASSERT(glfwInit(), "glfw init failed"); GLFWwindow *window1 = create_window(); GLFWwindow *window2 = create_window(); run(window1); run(window2); glfwTerminate(); return 0; }glad-2.0.2/test/c/run/gl/mx/005/000077500000000000000000000000001432671066000157665ustar00rootroot00000000000000glad-2.0.2/test/c/run/gl/mx/005/test_disabled.c000066400000000000000000000035551432671066000207500ustar00rootroot00000000000000/* * MX Core 3.3 profile using glfw to load. * Using MX Global for GL calls and the global context. * * GLAD: $GLAD --out-path=$tmp --api="gl:core" c --mx --mx-global * COMPILE: $GCC -Wno-pedantic $test -o $tmp/test -I$tmp/include $tmp/src/gl.c -ldl -lglfw * RUN: $tmp/test */ #include #include #include #include #include #define ASSERT(expression, message, args...) if(!(expression)) { fprintf(stderr, "%s(%d): " message "\n", __FILE__, __LINE__, ##args); exit(1); } #define WIDTH 50 #define HEIGHT 50 GLFWwindow* create_window(void) { glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); GLFWwindow *window = glfwCreateWindow(WIDTH, HEIGHT, "", NULL, NULL); ASSERT(window != NULL, "glfw window creation failed"); return window; } void run(GLFWwindow *window) { GladGLContext *context = gladGetGLContext(); glfwMakeContextCurrent(window); int version = gladLoadGL(glfwGetProcAddress); ASSERT(version >= 3003, "glad version %d < 3003", version); ASSERT(GLAD_VERSION_MAJOR(version) >= 3, "glad major version %d < 3", GLAD_VERSION_MAJOR(version)); ASSERT(GLAD_VERSION_MAJOR(version) > 3 || GLAD_VERSION_MINOR(version) >= 3, "glad minor version %d < 3", GLAD_VERSION_MINOR(version)); ASSERT(context->VERSION_3_3, "GL_VERSION_3_3 not set"); ASSERT(context->KHR_debug, "KHR_debug not available"); glViewport(0, 0, WIDTH, HEIGHT); glClearColor(0.2f, 0.3f, 0.3f, 1.0f); glClear(GL_COLOR_BUFFER_BIT); glfwSwapBuffers(window); } int main(void) { ASSERT(glfwInit(), "glfw init failed"); GLFWwindow *window1 = create_window(); GLFWwindow *window2 = create_window(); run(window1); run(window2); glfwTerminate(); return 0; }glad-2.0.2/test/c/run/gl/mx/006/000077500000000000000000000000001432671066000157675ustar00rootroot00000000000000glad-2.0.2/test/c/run/gl/mx/006/test_disabled.c000066400000000000000000000035551432671066000207510ustar00rootroot00000000000000/* * MX Core 3.3 profile using internal loader. * Using MX Global for GL calls and the global context. * * GLAD: $GLAD --out-path=$tmp --api="gl:core" c --mx --mx-global --loader * COMPILE: $GCC -Wno-pedantic $test -o $tmp/test -I$tmp/include $tmp/src/gl.c -ldl -lglfw * RUN: $tmp/test */ #include #include #include #include #include #define ASSERT(expression, message, args...) if(!(expression)) { fprintf(stderr, "%s(%d): " message "\n", __FILE__, __LINE__, ##args); exit(1); } #define WIDTH 50 #define HEIGHT 50 GLFWwindow* create_window(void) { glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); GLFWwindow *window = glfwCreateWindow(WIDTH, HEIGHT, "", NULL, NULL); ASSERT(window != NULL, "glfw window creation failed"); return window; } void run(GLFWwindow *window) { GladGLContext *context = gladGetGLContext(); glfwMakeContextCurrent(window); int version = gladLoaderLoadGL(); ASSERT(version >= 3003, "glad version %d < 3003", version); ASSERT(GLAD_VERSION_MAJOR(version) >= 3, "glad major version %d < 3", GLAD_VERSION_MAJOR(version)); ASSERT(GLAD_VERSION_MAJOR(version) > 3 || GLAD_VERSION_MINOR(version) >= 3, "glad minor version %d < 3", GLAD_VERSION_MINOR(version)); ASSERT(context->VERSION_3_3, "GL_VERSION_3_3 not set"); ASSERT(context->KHR_debug, "KHR_debug not available"); glViewport(0, 0, WIDTH, HEIGHT); glClearColor(0.2f, 0.3f, 0.3f, 1.0f); glClear(GL_COLOR_BUFFER_BIT); glfwSwapBuffers(window); } int main(void) { ASSERT(glfwInit(), "glfw init failed"); GLFWwindow *window1 = create_window(); GLFWwindow *window2 = create_window(); run(window1); run(window2); glfwTerminate(); return 0; }glad-2.0.2/test/c/run/gl/on-demand+debug/000077500000000000000000000000001432671066000177625ustar00rootroot00000000000000glad-2.0.2/test/c/run/gl/on-demand+debug/001/000077500000000000000000000000001432671066000202625ustar00rootroot00000000000000glad-2.0.2/test/c/run/gl/on-demand+debug/001/test.c000066400000000000000000000034351432671066000214120ustar00rootroot00000000000000/* * Core 3.3 on demand debug profile using glad to load * * GLAD: $GLAD --out-path=$tmp --api="gl:core" --extensions="" c --debug --on-demand --loader * COMPILE: $GCC -Wno-pedantic $test -o $tmp/test -I$tmp/include $tmp/src/gl.c -ldl -lglfw * RUN: $tmp/test */ #include #include #include #include #include #include #define ASSERT(expression, message, args...) if(!(expression)) { fprintf(stderr, "%s(%d): " message "\n", __FILE__, __LINE__, ##args); exit(1); } #define WIDTH 50 #define HEIGHT 50 static int pre = 0; static int post = 0; static void pre_call_gl_callback(const char *name, GLADapiproc apiproc, int len_args, ...) { (void) name; (void) apiproc; (void) len_args; ++pre; } static void post_call_gl_callback(void *ret, const char *name, GLADapiproc apiproc, int len_args, ...) { (void) ret; (void) name; (void) apiproc; (void) len_args; ++post; } int main(void) { ASSERT(glfwInit(), "glfw init failed"); glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); GLFWwindow* window = glfwCreateWindow(WIDTH, HEIGHT, "", NULL, NULL); ASSERT(window != NULL, "glfw window creation failed"); glfwMakeContextCurrent(window); glViewport(0, 0, WIDTH, HEIGHT); gladSetGLPreCallback(pre_call_gl_callback); gladSetGLPostCallback(post_call_gl_callback); glClearColor(0.2f, 0.3f, 0.3f, 1.0f); glClear(GL_COLOR_BUFFER_BIT); ASSERT(pre == 2, "pre callback called %d times, expected twice", pre); ASSERT(post == 2, "post callback called %d times, expected twice", post); glfwSwapBuffers(window); glfwTerminate(); return 0; } glad-2.0.2/test/c/run/gl/on-demand+debug/002/000077500000000000000000000000001432671066000202635ustar00rootroot00000000000000glad-2.0.2/test/c/run/gl/on-demand+debug/002/test.c000066400000000000000000000035061432671066000214120ustar00rootroot00000000000000/* * Core 3.3 on demand debug profile using glfw to load * * GLAD: $GLAD --out-path=$tmp --api="gl:core" --extensions="" c --debug --on-demand * COMPILE: $GCC -Wno-pedantic $test -o $tmp/test -I$tmp/include $tmp/src/gl.c -ldl -lglfw * RUN: $tmp/test */ #include #include #include #include #include #include #define ASSERT(expression, message, args...) if(!(expression)) { fprintf(stderr, "%s(%d): " message "\n", __FILE__, __LINE__, ##args); exit(1); } #define WIDTH 50 #define HEIGHT 50 static int pre = 0; static int post = 0; static void pre_call_gl_callback(const char *name, GLADapiproc apiproc, int len_args, ...) { (void) name; (void) apiproc; (void) len_args; ++pre; } static void post_call_gl_callback(void *ret, const char *name, GLADapiproc apiproc, int len_args, ...) { (void) ret; (void) name; (void) apiproc; (void) len_args; ++post; } int main(void) { ASSERT(glfwInit(), "glfw init failed"); glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); GLFWwindow* window = glfwCreateWindow(WIDTH, HEIGHT, "", NULL, NULL); ASSERT(window != NULL, "glfw window creation failed"); glfwMakeContextCurrent(window); gladSetGLOnDemandLoader(glfwGetProcAddress); glViewport(0, 0, WIDTH, HEIGHT); gladSetGLPreCallback(pre_call_gl_callback); gladSetGLPostCallback(post_call_gl_callback); glClearColor(0.2f, 0.3f, 0.3f, 1.0f); glClear(GL_COLOR_BUFFER_BIT); ASSERT(pre == 2, "pre callback called %d times, expected twice", pre); ASSERT(post == 2, "post callback called %d times, expected twice", post); glfwSwapBuffers(window); glfwTerminate(); return 0; } glad-2.0.2/test/c/run/gl/on-demand/000077500000000000000000000000001432671066000167005ustar00rootroot00000000000000glad-2.0.2/test/c/run/gl/on-demand/001/000077500000000000000000000000001432671066000172005ustar00rootroot00000000000000glad-2.0.2/test/c/run/gl/on-demand/001/test.c000066400000000000000000000021611432671066000203230ustar00rootroot00000000000000/* * Core 3.3 profile using glfw to load on-demand * * GLAD: $GLAD --out-path=$tmp --api="gl:core" c --on-demand * COMPILE: $GCC -Wno-pedantic $test -o $tmp/test -I$tmp/include $tmp/src/gl.c -ldl -lglfw * RUN: $tmp/test */ #include #include #include #include #define ASSERT(expression, message, args...) if(!(expression)) { fprintf(stderr, "%s(%d): " message "\n", __FILE__, __LINE__, ##args); exit(1); } #define WIDTH 50 #define HEIGHT 50 int main(void) { ASSERT(glfwInit(), "glfw init failed"); glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); GLFWwindow* window = glfwCreateWindow(WIDTH, HEIGHT, "", NULL, NULL); ASSERT(window != NULL, "glfw window creation failed"); glfwMakeContextCurrent(window); gladSetGLOnDemandLoader(glfwGetProcAddress); glViewport(0, 0, WIDTH, HEIGHT); glClearColor(0.2f, 0.3f, 0.3f, 1.0f); glClear(GL_COLOR_BUFFER_BIT); glfwSwapBuffers(window); glfwTerminate(); return 0; } glad-2.0.2/test/c/run/gl/on-demand/002/000077500000000000000000000000001432671066000172015ustar00rootroot00000000000000glad-2.0.2/test/c/run/gl/on-demand/002/test.c000066400000000000000000000021041432671066000203210ustar00rootroot00000000000000/* * Core 3.3 profile builtin on-demand loader * * GLAD: $GLAD --out-path=$tmp --api="gl:core" c --on-demand --loader * COMPILE: $GCC -Wno-pedantic $test -o $tmp/test -I$tmp/include $tmp/src/gl.c -ldl -lglfw * RUN: $tmp/test */ #include #include #include #include #define ASSERT(expression, message, args...) if(!(expression)) { fprintf(stderr, "%s(%d): " message "\n", __FILE__, __LINE__, ##args); exit(1); } #define WIDTH 50 #define HEIGHT 50 int main(void) { ASSERT(glfwInit(), "glfw init failed"); glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); GLFWwindow* window = glfwCreateWindow(WIDTH, HEIGHT, "", NULL, NULL); ASSERT(window != NULL, "glfw window creation failed"); glfwMakeContextCurrent(window); glViewport(0, 0, WIDTH, HEIGHT); glClearColor(0.2f, 0.3f, 0.3f, 1.0f); glClear(GL_COLOR_BUFFER_BIT); glfwSwapBuffers(window); glfwTerminate(); return 0; } glad-2.0.2/test/c/run/wgl/000077500000000000000000000000001432671066000152255ustar00rootroot00000000000000glad-2.0.2/test/c/run/wgl/default/000077500000000000000000000000001432671066000166515ustar00rootroot00000000000000glad-2.0.2/test/c/run/wgl/default/001/000077500000000000000000000000001432671066000171515ustar00rootroot00000000000000glad-2.0.2/test/c/run/wgl/default/001/test.c000066400000000000000000000070121432671066000202740ustar00rootroot00000000000000/* * Full WGL, see examples/c/wgl.c for more information * * GLAD: $GLAD --out-path=$tmp --api="wgl,gl:core" c --loader --alias * COMPILE: $MINGW_GCC -Wno-pedantic $test -o $tmp/test.exe -I$tmp/include $tmp/src/wgl.c $tmp/src/gl.c -lgdi32 -lopengl32 * RUN: $WINE $tmp/test.exe */ #include #include #include #define WIN32_LEAN_AND_MEAN #include #include #include #include #define ASSERT(expression, message, args...) if(!(expression)) { fprintf(stderr, "%s(%d): " message "\n", __FILE__, __LINE__, ##args); exit(1); } int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { UNREFERENCED_PARAMETER(hPrevInstance); UNREFERENCED_PARAMETER(lpCmdLine); WNDCLASSEX wcex = { }; wcex.cbSize = sizeof(WNDCLASSEX); wcex.style = CS_HREDRAW | CS_VREDRAW; wcex.lpfnWndProc = DefWindowProc; wcex.hInstance = hInstance; wcex.hCursor = LoadCursor(NULL, IDC_ARROW); wcex.hbrBackground = (HBRUSH) (COLOR_WINDOW + 1); wcex.lpszClassName = _T(""); ATOM wndclass = RegisterClassEx(&wcex); HWND hWnd = CreateWindow(MAKEINTATOM(wndclass), _T(""), WS_OVERLAPPEDWINDOW, 0, 0, 50, 50, NULL, NULL, hInstance, NULL); ASSERT(hWnd != NULL, "window creation failed"); HDC hdc = GetDC(hWnd); ASSERT(hdc != NULL, "failed to get window's device context"); PIXELFORMATDESCRIPTOR pfd = { }; pfd.nSize = sizeof(pfd); pfd.nSize = sizeof(PIXELFORMATDESCRIPTOR); pfd.dwFlags = PFD_DOUBLEBUFFER | PFD_SUPPORT_OPENGL | PFD_DRAW_TO_WINDOW; pfd.iPixelType = PFD_TYPE_RGBA; pfd.cColorBits = 32; pfd.cDepthBits = 32; pfd.iLayerType = PFD_MAIN_PLANE; int format = ChoosePixelFormat(hdc, &pfd); ASSERT(format != 0 && SetPixelFormat(hdc, format, &pfd) != FALSE, "failed to set pixel format"); HGLRC temp_context = wglCreateContext(hdc); ASSERT(temp_context != NULL, "failed to create initial rendering context"); wglMakeCurrent(hdc, temp_context); int wgl_version = gladLoaderLoadWGL(hdc); ASSERT(wgl_version >= 1000, "failed to load WGL"); ASSERT(GLAD_VERSION_MAJOR(wgl_version) >= 1, "wgl major version %d < 1", GLAD_VERSION_MAJOR(wgl_version)); ASSERT(GLAD_VERSION_MINOR(wgl_version) >= 0, "wgl minor version %d < 0", GLAD_VERSION_MINOR(wgl_version)); int attributes[] = { WGL_CONTEXT_MAJOR_VERSION_ARB, 3, WGL_CONTEXT_MINOR_VERSION_ARB, 2, WGL_CONTEXT_FLAGS_ARB, WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB, 0 }; HGLRC opengl_context = wglCreateContextAttribsARB(hdc, NULL, attributes); ASSERT(opengl_context != NULL, "failed to create final rendering context"); wglMakeCurrent(NULL, NULL); wglDeleteContext(temp_context); wglMakeCurrent(hdc, opengl_context); int version = gladLoaderLoadGL(); ASSERT(version >= 3002, "glad version %d < 32", version); ASSERT(GLAD_VERSION_MAJOR(version) >= 3, "gl major version %d < 3", GLAD_VERSION_MAJOR(version)); ASSERT(GLAD_VERSION_MAJOR(version) > 3 || GLAD_VERSION_MINOR(version) >= 2, "gl minor version too small %d < 2", GLAD_VERSION_MINOR(version)); ShowWindow(hWnd, nCmdShow); UpdateWindow(hWnd); glClearColor(0.0f, 0.0f, 1.0f, 1.0f); glClear(GL_COLOR_BUFFER_BIT); SwapBuffers(hdc); wglDeleteContext(opengl_context); ReleaseDC(hWnd, hdc); DestroyWindow(hWnd); return 0; } glad-2.0.2/test/rust/000077500000000000000000000000001432671066000144035ustar00rootroot00000000000000glad-2.0.2/test/rust/compile/000077500000000000000000000000001432671066000160335ustar00rootroot00000000000000glad-2.0.2/test/rust/compile/egl/000077500000000000000000000000001432671066000166025ustar00rootroot00000000000000glad-2.0.2/test/rust/compile/egl/default/000077500000000000000000000000001432671066000202265ustar00rootroot00000000000000glad-2.0.2/test/rust/compile/egl/default/001/000077500000000000000000000000001432671066000205265ustar00rootroot00000000000000glad-2.0.2/test/rust/compile/egl/default/001/Cargo.toml000066400000000000000000000002311432671066000224520ustar00rootroot00000000000000[package] name = "compile-egl-default-001" version = "0.1.0" [[bin]] path = "test.rs" name = "test" [dependencies] glad-egl = { path = "./glad-egl/" } glad-2.0.2/test/rust/compile/egl/default/001/test.rs000066400000000000000000000005101432671066000220470ustar00rootroot00000000000000#![deny(warnings)] /** * Full EGL should compile * * GLAD: $GLAD --out-path=$tmp --api="egl=" rust * COMPILE: cp -r $test_dir/. $tmp && cd $tmp && cargo build * RUN: cargo run */ extern crate glad_egl; use glad_egl::egl; #[allow(path_statements)] fn main() { egl::GetProcAddress; egl::SwapBuffersWithDamageEXT; } glad-2.0.2/test/rust/compile/gl/000077500000000000000000000000001432671066000164355ustar00rootroot00000000000000glad-2.0.2/test/rust/compile/gl/default/000077500000000000000000000000001432671066000200615ustar00rootroot00000000000000glad-2.0.2/test/rust/compile/gl/default/001/000077500000000000000000000000001432671066000203615ustar00rootroot00000000000000glad-2.0.2/test/rust/compile/gl/default/001/Cargo.toml000066400000000000000000000002261432671066000223110ustar00rootroot00000000000000[package] name = "compile-gl-default-001" version = "0.1.0" [[bin]] path = "test.rs" name = "test" [dependencies] glad-gl = { path = "./glad-gl/" } glad-2.0.2/test/rust/compile/gl/default/001/test.rs000066400000000000000000000004771432671066000217160ustar00rootroot00000000000000#![deny(warnings)] /** * Full core GL, should compile * * GLAD: $GLAD --out-path=$tmp --api="gl:core=" rust * COMPILE: cp -r $test_dir/. $tmp && cd $tmp && cargo build * RUN: cargo run */ extern crate glad_gl; use glad_gl::gl; #[allow(path_statements)] fn main() { gl::Clear; gl::MultiDrawElementsEXT; } glad-2.0.2/test/rust/compile/gl/default/002/000077500000000000000000000000001432671066000203625ustar00rootroot00000000000000glad-2.0.2/test/rust/compile/gl/default/002/Cargo.toml000066400000000000000000000002261432671066000223120ustar00rootroot00000000000000[package] name = "compile-gl-default-002" version = "0.1.0" [[bin]] path = "test.rs" name = "test" [dependencies] glad-gl = { path = "./glad-gl/" } glad-2.0.2/test/rust/compile/gl/default/002/test.rs000066400000000000000000000005401432671066000217060ustar00rootroot00000000000000#![deny(warnings)] /** * Full compatibility GL, should compile * * GLAD: $GLAD --out-path=$tmp --api="gl:compatibility=" rust * COMPILE: cp -r $test_dir/. $tmp && cd $tmp && cargo build * RUN: cargo run */ extern crate glad_gl; use glad_gl::gl; #[allow(path_statements)] fn main() { gl::Begin; gl::Clear; gl::MultiDrawElementsEXT; } glad-2.0.2/test/rust/compile/gl/default/003/000077500000000000000000000000001432671066000203635ustar00rootroot00000000000000glad-2.0.2/test/rust/compile/gl/default/003/Cargo.toml000066400000000000000000000002261432671066000223130ustar00rootroot00000000000000[package] name = "compile-gl-default-003" version = "0.1.0" [[bin]] path = "test.rs" name = "test" [dependencies] glad-gl = { path = "./glad-gl/" } glad-2.0.2/test/rust/compile/gl/default/003/test.rs000066400000000000000000000005021432671066000217050ustar00rootroot00000000000000#![deny(warnings)] /** * Enums / Constants should not be prefixed. * * GLAD: $GLAD --out-path=$tmp --api="gl:core=" rust * COMPILE: cp -r $test_dir/. $tmp && cd $tmp && cargo build * RUN: cargo run */ extern crate glad_gl; use glad_gl::gl; #[allow(path_statements)] fn main() { gl::_1PASS_EXT; gl::ALPHA; } glad-2.0.2/test/rust/compile/glx/000077500000000000000000000000001432671066000166255ustar00rootroot00000000000000glad-2.0.2/test/rust/compile/glx/default/000077500000000000000000000000001432671066000202515ustar00rootroot00000000000000glad-2.0.2/test/rust/compile/glx/default/001/000077500000000000000000000000001432671066000205515ustar00rootroot00000000000000glad-2.0.2/test/rust/compile/glx/default/001/Cargo.toml000066400000000000000000000002311432671066000224750ustar00rootroot00000000000000[package] name = "compile-glx-default-001" version = "0.1.0" [[bin]] path = "test.rs" name = "test" [dependencies] glad-glx = { path = "./glad-glx/" } glad-2.0.2/test/rust/compile/glx/default/001/test.rs000066400000000000000000000004771432671066000221060ustar00rootroot00000000000000#![deny(warnings)] /** * Full GLX, should compile * * GLAD: $GLAD --out-path=$tmp --api="glx=" rust * COMPILE: cp -r $test_dir/. $tmp && cd $tmp && cargo build * RUN: cargo run */ extern crate glad_glx; use glad_glx::glx; #[allow(path_statements)] fn main() { glx::GetProcAddress; glx::FreeContextEXT; } glad-2.0.2/test/rust/compile/vulkan/000077500000000000000000000000001432671066000173335ustar00rootroot00000000000000glad-2.0.2/test/rust/compile/vulkan/default/000077500000000000000000000000001432671066000207575ustar00rootroot00000000000000glad-2.0.2/test/rust/compile/vulkan/default/001/000077500000000000000000000000001432671066000212575ustar00rootroot00000000000000glad-2.0.2/test/rust/compile/vulkan/default/001/Cargo.toml000066400000000000000000000004021432671066000232030ustar00rootroot00000000000000[package] name = "compile-vulkan-default-001" version = "0.1.0" [[bin]] path = "test.rs" name = "test" [dependencies] glad-vulkan = { path = "./glad-vulkan/", features = ["xcb", "macos", "xlib_xrandr", "xlib", "ios", "win32", "wayland", "vi", "android"] } glad-2.0.2/test/rust/compile/vulkan/default/001/test.rs000066400000000000000000000011531432671066000226040ustar00rootroot00000000000000#![deny(warnings)] /** * Full VK should compile * * GLAD: $GLAD --out-path=$tmp --api="vulkan=" rust * COMPILE: cp -r $test_dir/. $tmp && cd $tmp && cargo build * RUN: cargo run */ extern crate glad_vulkan; use glad_vulkan::vk; #[allow(path_statements)] fn main() { vk::GetDeviceProcAddr; vk::GetSwapchainImagesKHR; vk::GetMemoryWin32HandleNV; vk::CreateMacOSSurfaceMVK; vk::CreateWaylandSurfaceKHR; vk::CreateViSurfaceNN; vk::CreateIOSSurfaceMVK; vk::GetRandROutputDisplayEXT; vk::GetPhysicalDeviceXcbPresentationSupportKHR; vk::GetMemoryAndroidHardwareBufferANDROID; } glad-2.0.2/test/rust/compile/wgl/000077500000000000000000000000001432671066000166245ustar00rootroot00000000000000glad-2.0.2/test/rust/compile/wgl/default/000077500000000000000000000000001432671066000202505ustar00rootroot00000000000000glad-2.0.2/test/rust/compile/wgl/default/001/000077500000000000000000000000001432671066000205505ustar00rootroot00000000000000glad-2.0.2/test/rust/compile/wgl/default/001/Cargo.toml000066400000000000000000000002311432671066000224740ustar00rootroot00000000000000[package] name = "compile-wgl-default-001" version = "0.1.0" [[bin]] path = "test.rs" name = "test" [dependencies] glad-wgl = { path = "./glad-wgl/" } glad-2.0.2/test/rust/compile/wgl/default/001/test.rs000066400000000000000000000005021432671066000220720ustar00rootroot00000000000000#![deny(warnings)] /** * Full WGL should compile * * GLAD: $GLAD --out-path=$tmp --api="wgl=" rust * COMPILE: cp -r $test_dir/. $tmp && cd $tmp && cargo build * RUN: cargo run */ extern crate glad_wgl; use glad_wgl::wgl; #[allow(path_statements)] fn main() { wgl::GetProcAddress; wgl::GetSwapIntervalEXT; } glad-2.0.2/test/rust/gen/000077500000000000000000000000001432671066000151545ustar00rootroot00000000000000glad-2.0.2/test/rust/gen/mx/000077500000000000000000000000001432671066000156005ustar00rootroot00000000000000glad-2.0.2/test/rust/gen/mx/001/000077500000000000000000000000001432671066000161005ustar00rootroot00000000000000glad-2.0.2/test/rust/gen/mx/001/Cargo.toml000066400000000000000000000002121432671066000200230ustar00rootroot00000000000000[package] name = "gen-mx-001" version = "0.1.0" [[bin]] path = "test.rs" name = "test" [dependencies] glad-gl = { path = "./glad-gl/" } glad-2.0.2/test/rust/gen/mx/001/test.rs000066400000000000000000000010501432671066000174210ustar00rootroot00000000000000#![deny(warnings)] /** * Make sure the generated context struct is Send + Sync * * GLAD: $GLAD --out-path=$tmp --api="gl:core=" rust --mx * COMPILE: cp -r $test_dir/. $tmp && cd $tmp && cargo build * RUN: cargo run */ extern crate glad_gl; use glad_gl::gl; use std::mem::MaybeUninit; fn requires_sync(_x: &T) {} fn requires_send(_x: &T) {} #[allow(path_statements)] fn main() { #[allow(invalid_value)] let gl: gl::Gl = unsafe { MaybeUninit::uninit().assume_init() }; requires_send(&gl); requires_sync(&gl); } glad-2.0.2/test/rust/run/000077500000000000000000000000001432671066000152075ustar00rootroot00000000000000glad-2.0.2/test/rust/run/gl/000077500000000000000000000000001432671066000156115ustar00rootroot00000000000000glad-2.0.2/test/rust/run/gl/default/000077500000000000000000000000001432671066000172355ustar00rootroot00000000000000glad-2.0.2/test/rust/run/gl/default/001/000077500000000000000000000000001432671066000175355ustar00rootroot00000000000000glad-2.0.2/test/rust/run/gl/default/001/Cargo.toml000066400000000000000000000003121432671066000214610ustar00rootroot00000000000000[package] name = "run-gl-default-001" version = "0.1.0" [[bin]] path = "test.rs" name = "test" [dependencies] glad-gl = { path = "./glad-gl/" } glfw = { version = "0.23.0", default-features = false } glad-2.0.2/test/rust/run/gl/default/001/test.rs000066400000000000000000000015451432671066000210670ustar00rootroot00000000000000#![deny(warnings)] /** * Full core GL, should compile * * GLAD: $GLAD --out-path=$tmp --api="gl:core=" rust * COMPILE: cp -r $test_dir/. $tmp && cd $tmp && cargo build * RUN: cargo run */ extern crate glad_gl; extern crate glfw; use glad_gl::gl; use glfw::Context; fn main() { let mut glfw = glfw::init(glfw::LOG_ERRORS).unwrap(); let (mut window, _events) = glfw.create_window(300, 300, "[glad] Rust - OpenGL with GLFW", glfw::WindowMode::Windowed) .expect("Failed to create GLFW window."); window.set_key_polling(true); window.make_current(); gl::load(|e| glfw.get_proc_address_raw(e) as *const std::os::raw::c_void); glfw.poll_events(); unsafe { gl::Viewport(0, 0, 300, 300); gl::ClearColor(0.7, 0.9, 0.1, 1.0); gl::Clear(gl::COLOR_BUFFER_BIT); } window.swap_buffers(); } glad-2.0.2/tests/000077500000000000000000000000001432671066000135715ustar00rootroot00000000000000glad-2.0.2/tests/README.md000066400000000000000000000005641432671066000150550ustar00rootroot00000000000000Tests ===== Directory containing a small collection of unit tests for glad. Unit testing glad is rather hard to do since it would require many hand crafted test specifications. So most of the testing is done using integration tests which can be found in [`/test`](../test) directory. ## Execution Run with: python -m unittest discover tests/ or: nosetests glad-2.0.2/tests/test____main__.py000066400000000000000000000026571432671066000170730ustar00rootroot00000000000000import unittest import mock class Cli(unittest.TestCase): def setUp(self): for name, path in [('c_generator', 'glad.generator.c.CGenerator'), ('gl_from_url', 'glad.specification.GL.from_url')]: patcher = mock.patch(path) setattr(self, name, patcher.start()) self.addCleanup(patcher.stop) self.gl = self.gl_from_url() self.gl_extensions = type(self.gl).extensions = mock.PropertyMock() # import as late as possible so global instances/references aren't initialized yet import glad.__main__ self.main = glad.__main__ def tearDown(self): self.c_generator.stop() def test_help__should_exit_with_0(self): with self.assertRaises(SystemExit) as cm: self.main.main(['--help']) self.assertEqual(cm.exception.code, 0) def test_valid_extension__should_not_error(self): self.gl_extensions.return_value = dict(gl=set(['GL_SOME_ext'])) self.main.main(['--out-path=/tmp', '--api', 'gl:core=4.3', '--extensions', 'GL_SOME_ext', 'c']) def test_invalid_extension__should_exit_with_error(self): self.gl_extensions.return_value = dict(gl=set(['GL_SOME_ext'])) with self.assertRaises(SystemExit) as cm: self.main.main(['--out-path=/tmp', '--api', 'gl:core=4.3', '--extensions', 'GL_SOME_other', 'c']) self.assertEqual(cm.exception.code, 11) glad-2.0.2/utility/000077500000000000000000000000001432671066000141325ustar00rootroot00000000000000glad-2.0.2/utility/bump_version.sh000077500000000000000000000013561432671066000172060ustar00rootroot00000000000000#!/bin/bash -e if [ -z "$1" ]; then echo "No version supplied" exit 1 fi VERSION="$1" VERSION_PYTHON="__version__ = '${VERSION}'" OLD_VERSION=$(python -c "import glad; print(glad.__version__)") echo "Old Version: $OLD_VERSION" echo "New Version: $VERSION" echo if [ "$VERSION" == "$OLD_VERSION" ] then echo "Version equals the old version" exit 1 fi echo "Python: $VERSION_PYTHON" read -p "Do you want to update to version $VERSION? [y/n]: " -n 1 -r echo if [[ ! $REPLY =~ ^[Yy]$ ]] then echo "Aborted" exit 1 fi echo -e "\n$VERSION_PYTHON\n" > glad/__init__.py git commit -am "setup: Bumped version: $VERSION." git tag "v$VERSION" rm -rf build/ rm -rf dist/ python setup.py sdist bdist_wheel twine upload dist/* glad-2.0.2/utility/compiletest.sh000077500000000000000000000136661432671066000170350ustar00rootroot00000000000000#!/usr/bin/env bash set -e if [ -z ${PYTHON+x} ]; then PYTHON="/usr/bin/env python" fi echo "Using python \"$PYTHON\"" if [ "$1" != "no-download" ]; then ./utility/download.sh fi GCC_FLAGS="-o build/tmp.o -Wall -Wextra -Wsign-conversion -Wcast-qual -Wstrict-prototypes -Werror -ansi -c" GPP_FLAGS="-o build/tmp.o -Wall -Wextra -Wsign-conversion -Wcast-qual -Werror -c" function echorun { echo $@ $@ } function mingwc_compile { echorun i686-w64-mingw32-gcc $@ echorun x86_64-w64-mingw32-gcc $@ } function c_compile { echorun gcc $@ -ldl mingwc_compile $@ } function mingwcpp_compile { echorun i686-w64-mingw32-g++ $@ echorun x86_64-w64-mingw32-g++ $@ } function cpp_compile { echorun g++ $@ -ldl mingwcpp_compile $@ } function download_if_required { if [ ! -f $1 ]; then mkdir -p $(dirname "${1}") filename=$(basename "${1}") if [ ! -f ${filename} ]; then wget -O ${filename} $2 fi cp ${filename} $1 fi } # C echo -e "====================== Generating and compiling C/C++: ======================" rm -rf build download_if_required build/include/EGL/eglplatform.h "https://raw.githubusercontent.com/KhronosGroup/EGL-Registry/main/api/EGL/eglplatform.h" download_if_required build/include/KHR/khrplatform.h "https://raw.githubusercontent.com/KhronosGroup/EGL-Registry/main/api/KHR/khrplatform.h" ${PYTHON} -m glad --api="egl" --out-path=build c c_compile -Ibuild/include build/src/egl.c ${GCC_FLAGS} cpp_compile -Ibuild/include build/src/egl.c ${GPP_FLAGS} rm -rf build ${PYTHON} -m glad --api="gl:compatibility" --out-path=build c c_compile -Ibuild/include build/src/gl.c ${GCC_FLAGS} cpp_compile -Ibuild/include build/src/gl.c ${GPP_FLAGS} rm -rf build ${PYTHON} -m glad --api="gl:core" --out-path=build c c_compile -Ibuild/include build/src/gl.c ${GCC_FLAGS} cpp_compile -Ibuild/include build/src/gl.c ${GPP_FLAGS} rm -rf build ${PYTHON} -m glad --api="gl:core=2.1" --out-path=build c c_compile -Ibuild/include build/src/gl.c ${GCC_FLAGS} cpp_compile -Ibuild/include build/src/gl.c ${GPP_FLAGS} rm -rf build ${PYTHON} -m glad --api="gl:core" --out-path=build c ${PYTHON} -m glad --api="glx" --out-path=build c echorun gcc -Ibuild/include build/src/glx.c ${GCC_FLAGS} echorun g++ -Ibuild/include build/src/glx.c ${GPP_FLAGS} # Example # echorun gcc example/c/simple.c -o build/simple -Ibuild/include build/src/gl.c -lglut -ldl # mingwc_compile example/c/simple.c -o build/simple -Ibuild/include build/src/gl.c -lfreeglut # echorun g++ example/c++/hellowindow2.cpp -o build/hellowindow2 -Ibuild/include build/src/gl.c -lglfw -ldl # mingwcpp_compile example/c++/hellowindow2.cpp -o build/hellowindow2 -Ibuild/include build/src/gl.c -lglfw3 -lgdi32 rm -rf build ${PYTHON} -m glad --api="gl:core" --out-path=build c ${PYTHON} -m glad --api="wgl" --out-path=build c mingwc_compile -Ibuild/include build/src/wgl.c ${GCC_FLAGS} mingwcpp_compile -Ibuild/include build/src/wgl.c ${GPP_FLAGS} # C-Debug echo -e "====================== Generating and compiling C/C++ Debug: ======================" rm -rf build download_if_required build/include/EGL/eglplatform.h "https://raw.githubusercontent.com/KhronosGroup/EGL-Registry/main/api/EGL/eglplatform.h" download_if_required build/include/KHR/khrplatform.h "https://raw.githubusercontent.com/KhronosGroup/EGL-Registry/main/api/KHR/khrplatform.h" ${PYTHON} -m glad --api="egl" --out-path=build c --debug c_compile -Ibuild/include build/src/egl.c ${GCC_FLAGS} cpp_compile -Ibuild/include build/src/egl.c ${GPP_FLAGS} rm -rf build ${PYTHON} -m glad --api="gl:compatibility" --out-path=build c --debug c_compile -Ibuild/include build/src/gl.c ${GCC_FLAGS} cpp_compile -Ibuild/include build/src/gl.c ${GPP_FLAGS} rm -rf build ${PYTHON} -m glad --api="gl:core" --out-path=build c --debug c_compile -Ibuild/include build/src/gl.c ${GCC_FLAGS} cpp_compile -Ibuild/include build/src/gl.c ${GPP_FLAGS} rm -rf build ${PYTHON} -m glad --api="gl:core=2.1" --out-path=build c --debug c_compile -Ibuild/include build/src/gl.c ${GCC_FLAGS} cpp_compile -Ibuild/include build/src/gl.c ${GPP_FLAGS} rm -rf build ${PYTHON} -m glad --api="gl:core" --out-path=build c --debug ${PYTHON} -m glad --api="glx" --out-path=build c --debug echorun gcc -Ibuild/include build/src/glx.c ${GCC_FLAGS} echorun g++ -Ibuild/include build/src/glx.c ${GPP_FLAGS} # Example # echorun gcc example/c/simple.c -o build/simple -Ibuild/include build/src/gl.c -lglut -ldl # mingwc_compile example/c/simple.c -o build/simple -Ibuild/include build/src/gl.c -lfreeglut # echorun g++ example/c++/hellowindow2.cpp -o build/hellowindow2 -Ibuild/include build/src/gl.c -lglfw -ldl # mingwcpp_compile example/c++/hellowindow2.cpp -o build/hellowindow2 -Ibuild/include build/src/gl.c -lglfw3 -lgdi32 rm -rf build ${PYTHON} -m glad --api="gl:core" --out-path=build c --debug ${PYTHON} -m glad --api="wgl" --out-path=build c --debug mingwc_compile -Ibuild/include build/src/wgl.c ${GCC_FLAGS} mingwcpp_compile -Ibuild/include build/src/wgl.c ${GPP_FLAGS} # D echo -e "\n====================== Generating and compiling D: ======================" rm -rf build ${PYTHON} -m glad --api="egl=" --out-path=build d echorun dmd -o- build/glad/egl/*.d -c rm -rf build ${PYTHON} -m glad --api="gl=,gles1=,gles2=" --out-path=build d echorun dmd -o- build/glad/gl/*.d -c rm -rf build ${PYTHON} -m glad --generator=d --api="gl=" --out-path=build d ${PYTHON} -m glad --generator=d --api="glx=" --out-path=build d echorun dmd -o- build/glad/glx/*.d -c rm -rf build ${PYTHON} -m glad --generator=d --api="gl=" --out-path=build d ${PYTHON} -m glad --generator=d --api="wgl=" --out-path=build d echorun dmd -o- build/glad/wgl/*.d -c # Volt TODO echo -e "\n====================== Generating Volt: ======================" rm -rf build ${PYTHON} -m glad --api="egl=" --out-path=build volt ${PYTHON} -m glad --api="gl=" --out-path=build volt ${PYTHON} -m glad --api="glx=" --out-path=build volt ${PYTHON} -m glad --api="wgl=" --out-path=build volt rm -rf build glad-2.0.2/utility/download.sh000077500000000000000000000022371432671066000163040ustar00rootroot00000000000000#!/usr/bin/env bash set -e TARGET=${TARGET:="."} rm -f "${TARGET}/egl.xml" wget -O "${TARGET}/egl.xml" https://raw.githubusercontent.com/KhronosGroup/EGL-Registry/main/api/egl.xml rm -f "${TARGET}/gl.xml" wget -O "${TARGET}/gl.xml" https://raw.githubusercontent.com/KhronosGroup/OpenGL-Registry/main/xml/gl.xml rm -f "${TARGET}/glx.xml" wget -O "${TARGET}/glx.xml" https://raw.githubusercontent.com/KhronosGroup/OpenGL-Registry/main/xml/glx.xml rm -f "${TARGET}/wgl.xml" wget -O "${TARGET}/wgl.xml" https://raw.githubusercontent.com/KhronosGroup/OpenGL-Registry/main/xml/wgl.xml rm -f "${TARGET}/vk.xml" wget -O "${TARGET}/vk.xml" https://raw.githubusercontent.com/KhronosGroup/Vulkan-Docs/main/xml/vk.xml rm -f "${TARGET}/khrplatform.h" wget -O "${TARGET}/khrplatform.h" https://raw.githubusercontent.com/KhronosGroup/EGL-Registry/main/api/KHR/khrplatform.h rm -f "${TARGET}/eglplatform.h" wget -O "${TARGET}/eglplatform.h" https://raw.githubusercontent.com/KhronosGroup/EGL-Registry/main/api/EGL/eglplatform.h rm -f "${TARGET}/vk_platform.h" wget -O "${TARGET}/vk_platform.h" https://raw.githubusercontent.com/KhronosGroup/Vulkan-Docs/main/include/vulkan/vk_platform.h glad-2.0.2/utility/examples.sh000077500000000000000000000061511432671066000163120ustar00rootroot00000000000000#!/usr/bin/env bash set -e TMP=${TMP:="./build"} PYTHON=${PYTHON:="python"} GLAD=${GLAD:="$PYTHON -m glad --quiet"} _GCC=${_GCC:="gcc"} _GPP=${_GPP:="g++"} _MINGW_GCC=${_MINGW_GCC:="x86_64-w64-mingw32-gcc"} _GCC_FLAGS="-Wall -Wextra -Werror -Wno-unused-parameter" GCC=${GCC:="$_GCC $_GCC_FLAGS"} GPP=${GPP:="$_GPP $_GCC_FLAGS"} MINGW_GCC=${MINGW_GCC:="$_MINGW_GCC $_GCC_FLAGS"} WINE=${WINE:="wine"} function start { echo "-------> ${1}" rm -rf ${TMP} } function end { echo } start "egl_glfw.c" ${GLAD} --out-path="${TMP}" --api="gles1" c --loader ${GLAD} --out-path="${TMP}" --api="egl" c --loader ${GCC} example/c/egl_glfw.c -o ${TMP}/run -Ibuild/include ${TMP}/src/*.c -ldl -lglfw && ${TMP}/run end start "egl_x11.c" ${GLAD} --out-path="${TMP}" --api="gles2" c --loader ${GLAD} --out-path="${TMP}" --api="egl" c --loader ${GCC} example/c/egl_x11/egl_x11.c -o ${TMP}/run -Ibuild/include ${TMP}/src/*.c -ldl -lX11 && ${TMP}/run end start "gl_glfw.c" ${GLAD} --out-path="${TMP}" --api="gl:core" c ${GCC} example/c/gl_glfw.c -o ${TMP}/run -Ibuild/include ${TMP}/src/*.c -ldl -lglfw && ${TMP}/run end start "gl_sdl2.c" ${GLAD} --out-path="${TMP}" --api="gl:core" c ${GCC} example/c/gl_sdl2.c -o ${TMP}/run -Ibuild/include ${TMP}/src/*.c -ldl `sdl2-config --libs --cflags` && ${TMP}/run end start "glut.c" ${GLAD} --out-path="${TMP}" --api="gl:core" c --loader ${GCC} example/c/glut.c -o ${TMP}/run -Ibuild/include ${TMP}/src/*.c -ldl -lglut && ${TMP}/run end start "glx.c" ${GLAD} --out-path="${TMP}" --api="gl:core" c --loader ${GLAD} --out-path="${TMP}" --api="glx" c --loader ${GCC} example/c/glx.c -o ${TMP}/run -Ibuild/include ${TMP}/src/*.c -ldl -lX11 && ${TMP}/run end start "glx_modern.c" ${GLAD} --out-path="${TMP}" --api="gl:core" c --loader ${GLAD} --out-path="${TMP}" --api="glx" c --loader ${GCC} example/c/glx_modern.c -o ${TMP}/run -Ibuild/include ${TMP}/src/*.c -ldl -lX11 && ${TMP}/run end start "vulkan_tri_glfw.c" ${GLAD} --out-path="${TMP}" --api="vulkan" c --loader ${GCC} example/c/vulkan_tri_glfw/vulkan_tri_glfw.c -o ${TMP}/run -Ibuild/include ${TMP}/src/*.c -ldl -lglfw && ${TMP}/run end start "wgl.c" ${GLAD} --out-path="${TMP}" --api="gl:core" c --loader ${GLAD} --out-path="${TMP}" --api="wgl" c --loader ${MINGW_GCC} example/c/wgl.c -o ${TMP}/run -Ibuild/include ${TMP}/src/*.c -lgdi32 -lopengl32 && ${WINE} ${TMP}/run end start "hellowindow2.c" ${GLAD} --out-path="${TMP}" --api="gl:core" c --loader ${GPP} example/c++/hellowindow2.cpp -o ${TMP}/run -Ibuild/include ${TMP}/src/*.c -ldl -lglfw && ${TMP}/run end start "hellowindow2_macro.c" ${GLAD} --out-path="${TMP}" --api="gl:core" c --loader --header-only ${GPP} example/c++/hellowindow2_macro.cpp -o ${TMP}/run -Ibuild/include -ldl -lglfw && ${TMP}/run end start "hellowindow2_mx.c" ${GLAD} --out-path="${TMP}" --api="gl:core" c --loader --mx ${GPP} example/c++/hellowindow2_mx.cpp -o ${TMP}/run -Ibuild/include ${TMP}/src/*.c -ldl -lglfw && ${TMP}/run end start "multiwin_mx.c" ${GLAD} --out-path="${TMP}" --api="gl:core" c --loader --mx ${GPP} example/c++/multiwin_mx/multiwin_mx.cpp -o ${TMP}/run -Ibuild/include ${TMP}/src/*.c -ldl -lglfw && ${TMP}/run end glad-2.0.2/utility/generateall.sh000077500000000000000000000020341432671066000167530ustar00rootroot00000000000000#!/usr/bin/env bash set -e if [ -z ${PYTHON+x} ]; then PYTHON="/usr/bin/env python" fi echo "Using python \"$PYTHON\"" if [ "$1" != "no-download" ]; then ./utility/download.sh fi rm -rf build echo "Generating C" $PYTHON -m glad --out-path=build --spec=egl --generator=c $PYTHON -m glad --out-path=build --spec=gl --api="gl=,gles1=,gles2=" --generator=c $PYTHON -m glad --out-path=build --spec=glx --generator=c $PYTHON -m glad --out-path=build --spec=wgl --generator=c echo "Generating D" $PYTHON -m glad --out-path=build --spec=egl --generator=d $PYTHON -m glad --out-path=build --spec=gl --api="gl=,gles1=,gles2=" --generator=d $PYTHON -m glad --out-path=build --spec=glx --generator=d $PYTHON -m glad --out-path=build --spec=wgl --generator=d echo "Generating Volt" $PYTHON -m glad --out-path=build --spec=egl --generator=volt $PYTHON -m glad --out-path=build --spec=gl --api="gl=,gles1=,gles2=" --generator=volt $PYTHON -m glad --out-path=build --spec=glx --generator=volt $PYTHON -m glad --out-path=build --spec=wgl --generator=volt glad-2.0.2/utility/test.sh000077500000000000000000000070721432671066000154560ustar00rootroot00000000000000#!/bin/bash EXIT_ON_FAILURE=${EXIT_ON_FAILURE:=0} PRINT_MESSAGE=${PRINT_MESSAGE:=0} PYTHON=${PYTHON:="python"} GLAD_ARGS=${GLAD_ARGS:="--reproducible"} GLAD=${GLAD:="$PYTHON -m glad ${GLAD_ARGS}"} _GCC=${_GCC:="gcc"} _MINGW_GCC=${_MINGW_GCC:="x86_64-w64-mingw32-gcc"} _GCC_FLAGS="-Wall -Wextra -Werror -Wsign-conversion -Wcast-qual -Wstrict-prototypes -ansi -pedantic" GCC=${GCC:="$_GCC $_GCC_FLAGS"} MINGW_GCC=${MINGW_GCC:="$_MINGW_GCC $_GCC_FLAGS"} WINE=${WINE:="wine"} TEST_TMP=$(realpath ${TEST_TMP:="build"}) TEST_DIRECTORY=${TEST_DIRECTORY:="test"} TEST_PATTERN=${TEST_PATTERN:="test.*"} TESTS=(${TESTS:=$(find "${TEST_DIRECTORY}" -iname "${TEST_PATTERN}" | sort)}) TEST_REPORT_ENABLED=${TEST_REPORT_ENABLED:=1} TEST_REPORT=${TEST_REPORT:="test-report.xml"} function run_test { local test="$1" local glad=$(extract "GLAD" "$test") local compile=$(extract "COMPILE" "$test") local run=$(extract "RUN" "$test") rm -rf "${TEST_TMP}" mkdir -p "${TEST_TMP}" local time=$(date +%s) local wd=$(pwd) local output; output=$({ execute ${glad} && \ execute ${compile} && \ execute ${run} } 2>& 1) local status=$? time=$(($(date +%s) - ${time})) cd "$wd" log_failure "${status}" "${output}" report_test "${test}" "${status}" "${time}" "${output}" return ${status} } function report_start { if [ ${TEST_REPORT_ENABLED} -eq 0 ]; then return fi echo '' > ${TEST_REPORT} echo '' >> ${TEST_REPORT} } function report_test { if [ ${TEST_REPORT_ENABLED} -eq 0 ]; then return fi local test=${1#*/} local status="$2" local time="$3" local output=$(echo "$4" | sed 's/&/\&/g; s//\>/g; s/"/\"/g; s/'"'"'/\'/g') local class_name=${test%%/*} local test_name_with_suffix=${test#*/} local test_name=${test_name_with_suffix%/*} echo " " >> ${TEST_REPORT} if [ $status -ne 0 ]; then echo " " >> ${TEST_REPORT} fi echo " ${output}" >> ${TEST_REPORT} echo " " >> ${TEST_REPORT} } function report_end { if [ ${TEST_REPORT_ENABLED} -eq 0 ]; then return fi echo '' >> ${TEST_REPORT} } function extract { local variable="$1" local test="$2" local content; content=$(grep -oP "(?<=$variable: ).*" "$test") log_failure $? "Unable to extract variable '$variable'" echo "$content" } function execute { # define variables for use in test local tmp="$TEST_TMP" local test_dir="$(dirname ${test})" eval $@ return $? } function log_failure { local status="$1" local message="$2" if [ $status -ne 0 ]; then if [ $PRINT_MESSAGE -ne 0 ]; then echo echo "$message" >&2 echo fi fi } _tests_total=${#TESTS[@]} _tests_ran=0 _tests_failed=0 report_start for test in "${TESTS[@]}"; do _tests_ran=$((_tests_ran+1)) echo -n " 🡒 $test " test=$(realpath $test) run_test $test if [ $? -ne 0 ]; then echo "| ✕" _tests_failed=$((_tests_failed+1)) if [ $EXIT_ON_FAILURE -eq 1 ]; then report_end exit 1 fi else echo "| ✓" fi done report_end echo echo "Total tests: $_tests_total, Tests ran: $_tests_ran, Tests failed: $_tests_failed" if [ $_tests_failed -gt 0 ]; then exit 1 fi glad-2.0.2/utility/updatesub.sh000077500000000000000000000011421432671066000164630ustar00rootroot00000000000000#!/usr/bin/env bash set -e git checkout master ./utility/generateall.sh echo "Updating C" git checkout c git rm -rf include git rm -rf src mv build/include include/ mv build/src src/ git add --all include git add --all src git commit -am "automatically updated" git push origin c:c echo "Updating D" git checkout d git rm -rf glad mv build/glad glad/ git add --all glad git commit -am "automatically updated" git push origin d:d echo "Updating Volt" git checkout volt git rm -rf amp mv build/amp amp/ git add --all amp git commit -am "automatically updated" git push origin volt:volt git checkout master