diff --git a/CMakeLists.txt b/CMakeLists.txt index 904778e7..1902ffff 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,90 +10,17 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -w -fvisibility=hidden -funwind-tables -g -D_THREAD_SAFE -fPIC -stdlib=libc++") -#set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -w -g -std=gnu99 -funwind-tables -O3 -fvisibility=hidden") - -set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libstdc++") - -set(CMAKE_ANDROID_STL_TYPE c++_static) - -#set(CMAKE_BUILD_TYPE Release) - set(PROFILING OFF) find_library(GLSLANG_LIB glslang PATHS ${CMAKE_SOURCE_DIR}/libraries/arm64-v8a/) add_library(${CMAKE_PROJECT_NAME} SHARED - MG/Init.cpp - - # MG_GL/Implementations/GLX - MG/MG_GL/Implementations/GLX/GLXFuncsDefinitions/GLXFuncsDefinitions.cpp - - # MG_GL/Implementations/GL - MG/MG_GL/Implementations/GL/GLFuncsDefinitions/GLFuncsDefinitions.cpp - MG/MG_GL/Implementations/GL/Getter/GL_Getter.cpp - MG/MG_GL/Implementations/GL/Getter/BackendInfo.cpp - - MG/MG_GL/Implementations/GL/Framebuffer/GL_Framebuffer.cpp - - MG/MG_GL/Implementations/GL/Common/GL_Common.cpp - - MG/MG_GL/Implementations/GL/Buffer/GL_Buffer.cpp - - MG/MG_GL/Implementations/GL/Drawing/GL_Drawing.cpp - - MG/MG_GL/Implementations/GL/Program/GL_Program.cpp - - MG/MG_GL/Implementations/GL/Texture/GL_Texture.cpp - - MG/MG_GL/Implementations/GL/VertexArray/GL_VertexArray.cpp - - # MG_GL/Implementations/GLX - MG/MG_GL/Implementations/GLX/LookUp/LookUp.cpp - - # MG_GL/Implementations/EGL - MG/MG_GL/Implementations/EGL/VK/EGL_EMU.cpp - - MG/MG_GL/Implementations/EGL/GLES/EGL_WRAP.cpp - - MG/MG_GL/Implementations/EGL/Diligent/EGL_impl.cpp - - # MG_GL/State - MG/MG_GL/State/Core/GLState.cpp - - MG/MG_GL/State/Common/CommonState.cpp - - MG/MG_GL/State/Texture/TextureState.cpp - - MG/MG_GL/State/VertexArray/VertexArrayState.cpp - - MG/MG_GL/State/Buffer/BufferState.cpp - - MG/MG_GL/State/Program/ShaderObject.cpp - MG/MG_GL/State/Program/ProgramState.cpp - - MG/MG_GL/State/Framebuffer/FramebufferState.cpp - - # MG_GL/BackendLoader - MG/MG_GL/BackendLoader/GLES/Loader.cpp - - # MG_UTIL/Debug - MG/MG_UTIL/Debug/Debug.cpp - - # MG_UTIL/Program - MG/MG_UTIL/Program/DebugTool.cpp - MG/MG_UTIL/Program/GLSLTool.cpp - - # MG_RHI/GLES - MG/MG_RHI/GLES/Test/TestDrawing.cpp ) -target_include_directories(${CMAKE_PROJECT_NAME} PRIVATE ./includes) - target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE ${CMAKE_SOURCE_DIR}/library/arm64-v8a/libglslang.a ${CMAKE_SOURCE_DIR}/library/arm64-v8a/libspirv-cross-c-shared.so - #${CMAKE_SOURCE_DIR}/library/arm64-v8a/libshaderconv.so ${CMAKE_SOURCE_DIR}/library/arm64-v8a/libGenericCodeGen.a ${CMAKE_SOURCE_DIR}/library/arm64-v8a/libglslang-default-resource-limits.a ${CMAKE_SOURCE_DIR}/library/arm64-v8a/libMachineIndependent.a @@ -112,7 +39,7 @@ target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE vulkan ) -add_subdirectory(3rdparty/DiligentCore) +# add_subdirectory(3rdparty/DiligentCore) target_include_directories(MobileGL PUBLIC ${CMAKE_SOURCE_DIR}/include @@ -120,15 +47,7 @@ target_include_directories(MobileGL PUBLIC target_link_libraries(MobileGL PRIVATE - Diligent-Common - Diligent-GraphicsEngineOpenGL-shared - Diligent-GraphicsEngineVk-shared -) - -if (PROFILING) - find_package(Threads) - include_directories(${CMAKE_SOURCE_DIR}/3rdparty/perfetto/sdk) - add_library(perfetto STATIC ${CMAKE_SOURCE_DIR}/3rdparty/perfetto/sdk/perfetto.cc) - target_link_libraries(MobileGL PRIVATE perfetto ${CMAKE_THREAD_LIBS_INIT}) - target_compile_definitions(MobileGL PUBLIC PROFILING=1) -endif() + # Diligent-Common + # Diligent-GraphicsEngineOpenGL-shared + # Diligent-GraphicsEngineVk-shared +) \ No newline at end of file diff --git a/MG/Constants.h b/MG/Constants.h deleted file mode 100644 index 38d00d72..00000000 --- a/MG/Constants.h +++ /dev/null @@ -1,207 +0,0 @@ -// -// Created by BZLZHH on 2025/3/15. -// - -#ifndef MOBILEGL_CONSTANTS_H -#define MOBILEGL_CONSTANTS_H - -#include -#include -#include -#include -#include - -#ifdef __ANDROID__ -#define __ANDROID_API__ 26 -#endif - -#ifdef _WIN32 -#define MG_EXPORT extern "C" __declspec(dllexport) -#else -#define MG_EXPORT extern "C" __attribute__((visibility("default"))) -#endif - -namespace MG_Global { - template - using unordered_map = ankerl::unordered_dense::map; - - template - using unordered_set = ankerl::unordered_dense::set; -} - -namespace MG_Constants { - namespace Common { - inline constexpr int LOG_LEVEL_DEBUG = 0x0010; - inline constexpr int LOG_LEVEL_INFO = 0x0011; - inline constexpr int LOG_LEVEL_WARN = 0x0012; - inline constexpr int LOG_LEVEL_ERROR = 0x0013; - inline constexpr int LOG_LEVEL_FATAL = 0x0014; - - - inline constexpr int LOG_TARGET_NONE = 0x00; - inline constexpr int LOG_TARGET_CONSOLE = 0x01; - inline constexpr int LOG_TARGET_FILE = 0x02; - inline constexpr int LOG_TARGET_ANDROID = 0x04; // Android logcat - inline constexpr int LOG_TARGET_ALL = LOG_TARGET_CONSOLE | LOG_TARGET_FILE | LOG_TARGET_ANDROID; - - template - bool Contains(T item, const std::vector vec) { - return std::find(vec.begin(), vec.end(), item) != vec.end(); - } - } - - namespace Blend { - static const std::vector VALID_FACTORS = { - GL_ZERO, GL_ONE, GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR, - GL_DST_COLOR, GL_ONE_MINUS_DST_COLOR, GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, - GL_DST_ALPHA, GL_ONE_MINUS_DST_ALPHA, GL_CONSTANT_COLOR, GL_ONE_MINUS_CONSTANT_COLOR, - GL_CONSTANT_ALPHA, GL_ONE_MINUS_CONSTANT_ALPHA, GL_SRC_ALPHA_SATURATE - }; // OpenGL 3 - } - - namespace Depth { - static const std::vector VALID_FUNCS = { - GL_NEVER, GL_LESS, GL_EQUAL, GL_LEQUAL, GL_GREATER, GL_NOTEQUAL, GL_GEQUAL, GL_ALWAYS - }; // OpenGL 3 - } - - namespace CommonState { - static const std::vector VALID_CAPS = { - GL_BLEND, GL_DEPTH_TEST, GL_STENCIL_TEST, GL_SCISSOR_TEST, GL_CULL_FACE, - GL_POLYGON_OFFSET_FILL, GL_SAMPLE_ALPHA_TO_COVERAGE, GL_SAMPLE_COVERAGE - }; // OpenGL 3 - } - - namespace Framebuffer { - static const std::vector VALID_ATTACHMENTS = { - GL_COLOR_ATTACHMENT0, GL_DEPTH_ATTACHMENT, - GL_STENCIL_ATTACHMENT, GL_DEPTH_STENCIL_ATTACHMENT - }; // OpenGL 3 - - static const std::vector VALID_TARGETS = { - GL_FRAMEBUFFER, GL_DRAW_FRAMEBUFFER, GL_READ_FRAMEBUFFER - }; // OpenGL 3 - - static const std::vector VALID_ACCESS = { - GL_READ_ONLY, GL_WRITE_ONLY, GL_READ_WRITE - }; // OpenGL 3 - } - - namespace Buffer { - static const std::vector VALID_PARAM_NAMES = { - GL_BUFFER_ACCESS, GL_BUFFER_MAPPED, GL_BUFFER_SIZE, GL_BUFFER_USAGE - }; // OpenGL 3 - - static const std::vector VALID_TARGETS = { - GL_ARRAY_BUFFER, GL_COPY_READ_BUFFER, GL_COPY_WRITE_BUFFER, GL_ELEMENT_ARRAY_BUFFER, - GL_PIXEL_PACK_BUFFER, GL_PIXEL_UNPACK_BUFFER, GL_TEXTURE_BUFFER, - GL_TRANSFORM_FEEDBACK_BUFFER, GL_UNIFORM_BUFFER - }; // OpenGL 3 - - static const std::vector VALID_ACCESS = { - GL_READ_ONLY, GL_WRITE_ONLY, GL_READ_WRITE - }; // OpenGL 3 - } - - namespace VertexArray { - constexpr uint32_t MAX_VERTEX_ATTRIBS = 32; - } - - namespace PixelStore { - static const MG_Global::unordered_map DEFAULT_VALUES_MAP = { - {GL_PACK_SWAP_BYTES, GL_FALSE}, - {GL_PACK_LSB_FIRST, GL_FALSE}, - {GL_PACK_ROW_LENGTH, 0}, - {GL_PACK_IMAGE_HEIGHT, 0}, - {GL_PACK_SKIP_ROWS, 0}, - {GL_PACK_SKIP_PIXELS, 0}, - {GL_PACK_SKIP_IMAGES, 0}, - {GL_PACK_ALIGNMENT, 4}, - {GL_UNPACK_SWAP_BYTES, GL_FALSE}, - {GL_UNPACK_LSB_FIRST, GL_FALSE}, - {GL_UNPACK_ROW_LENGTH, 0}, - {GL_UNPACK_IMAGE_HEIGHT, 0}, - {GL_UNPACK_SKIP_ROWS, 0}, - {GL_UNPACK_SKIP_PIXELS,0}, - {GL_UNPACK_SKIP_IMAGES,0}, - {GL_UNPACK_ALIGNMENT, 4} - }; // OpenGL 3 - - static const std::vector VALID_PARAM_NAMES = { - GL_PACK_SWAP_BYTES, GL_PACK_LSB_FIRST, GL_PACK_ROW_LENGTH, GL_PACK_IMAGE_HEIGHT, - GL_PACK_SKIP_ROWS, GL_PACK_SKIP_PIXELS, GL_PACK_SKIP_IMAGES, GL_PACK_ALIGNMENT, - GL_UNPACK_SWAP_BYTES, GL_UNPACK_LSB_FIRST, GL_UNPACK_ROW_LENGTH, - GL_UNPACK_IMAGE_HEIGHT, - GL_UNPACK_SKIP_ROWS, GL_UNPACK_SKIP_PIXELS, GL_UNPACK_SKIP_IMAGES, - GL_UNPACK_ALIGNMENT - }; // OpenGL 3 - } - - namespace Texture { - inline const GLuint MAX_TEXTURE_UNITS = 80; - const GLsizei MAX_TEXTURE_SIZE = 32768; - const GLsizei MAX_ARRAY_LAYERS = 256; - inline const std::vector VALID_TARGETS = { - GL_TEXTURE_2D, GL_PROXY_TEXTURE_2D, GL_TEXTURE_1D_ARRAY, GL_PROXY_TEXTURE_1D_ARRAY, - GL_TEXTURE_RECTANGLE, GL_PROXY_TEXTURE_RECTANGLE, GL_TEXTURE_CUBE_MAP_POSITIVE_X, - GL_TEXTURE_CUBE_MAP_NEGATIVE_X, GL_TEXTURE_CUBE_MAP_POSITIVE_Y, GL_TEXTURE_CUBE_MAP_NEGATIVE_Y, - GL_TEXTURE_CUBE_MAP_POSITIVE_Z, GL_TEXTURE_CUBE_MAP_NEGATIVE_Z, GL_PROXY_TEXTURE_CUBE_MAP - }; // OpenGL 3 - - inline const std::vector VALID_FORMATS = { - GL_RED, GL_RG, GL_RGB, GL_BGR, GL_RGBA, GL_BGRA, GL_DEPTH_COMPONENT, GL_DEPTH_STENCIL - }; // OpenGL 3 - - inline const std::vector VALID_INTERNAL_FORMATS = { - GL_RED, GL_RG, GL_RGB, GL_BGR, GL_RGBA, GL_BGRA, GL_DEPTH_COMPONENT, GL_DEPTH_STENCIL, - GL_RGBA32F, GL_RGBA32I, GL_RGBA32UI, GL_RGBA16, GL_RGBA16F, GL_RGBA16I, - GL_RGBA16UI, GL_RGBA8, GL_RGBA8UI, GL_SRGB8_ALPHA8, GL_RGB10_A2, GL_RGB10_A2UI, - GL_R11F_G11F_B10F, GL_RG32F, GL_RG32I, GL_RG32UI, GL_RG16, GL_RG16F, GL_RGB16I, - GL_RGB16UI, GL_RG8, GL_RG8I, GL_RG8UI, GL_R32F, GL_R32I, GL_R32UI, GL_R16F, - GL_R16I, GL_R16UI, GL_R8, GL_R8I, GL_R8UI, GL_RGBA16_SNORM, GL_RGBA8_SNORM, - GL_RGB32F, GL_RGB32I, GL_RGB32UI, GL_RGB16_SNORM, GL_RGB16F, GL_RGB16I, GL_RGB16UI, - GL_RGB16, GL_RGB8_SNORM, GL_RGB8, GL_RGB8I, GL_RGB8UI, GL_SRGB8, GL_RGB9_E5, - GL_RG16_SNORM, GL_RG8_SNORM, GL_COMPRESSED_RG_RGTC2, GL_COMPRESSED_SIGNED_RG_RGTC2, - GL_R16_SNORM, GL_R8_SNORM, GL_COMPRESSED_RED_RGTC1, GL_COMPRESSED_SIGNED_RED_RGTC1, - GL_DEPTH_COMPONENT32F, GL_DEPTH_COMPONENT32, GL_DEPTH_COMPONENT24, GL_DEPTH_COMPONENT16, - GL_DEPTH32F_STENCIL8, GL_DEPTH24_STENCIL8 - }; // OpenGL 3 - - inline const std::vector VALID_TYPES = { - GL_UNSIGNED_BYTE, GL_BYTE, GL_UNSIGNED_SHORT, GL_SHORT, GL_UNSIGNED_INT, GL_INT, - GL_FLOAT, GL_UNSIGNED_BYTE_3_3_2, GL_UNSIGNED_BYTE_2_3_3_REV, GL_UNSIGNED_SHORT_5_6_5, - GL_UNSIGNED_SHORT_5_6_5_REV, GL_UNSIGNED_SHORT_4_4_4_4, GL_UNSIGNED_SHORT_4_4_4_4_REV, - GL_UNSIGNED_SHORT_5_5_5_1, GL_UNSIGNED_SHORT_1_5_5_5_REV, GL_UNSIGNED_INT_8_8_8_8, - GL_UNSIGNED_INT_8_8_8_8_REV, GL_UNSIGNED_INT_10_10_10_2, GL_UNSIGNED_INT_2_10_10_10_REV - }; // OpenGL 3 - - inline const std::vector VALID_TEXTURE_PARAM_NAMES = { - GL_TEXTURE_BASE_LEVEL, GL_TEXTURE_COMPARE_FUNC, GL_TEXTURE_COMPARE_MODE, GL_TEXTURE_MIN_FILTER, - GL_TEXTURE_MAG_FILTER, GL_TEXTURE_MAX_LEVEL, GL_TEXTURE_SWIZZLE_R, GL_TEXTURE_SWIZZLE_G, - GL_TEXTURE_SWIZZLE_B, GL_TEXTURE_SWIZZLE_A, GL_TEXTURE_SWIZZLE_RGBA, GL_TEXTURE_WRAP_S, - GL_TEXTURE_WRAP_T, GL_TEXTURE_WRAP_R, GL_TEXTURE_LOD_BIAS, GL_TEXTURE_MIN_LOD, GL_TEXTURE_MAX_LOD, GL_TEXTURE_BORDER_COLOR - }; // OpenGL 3 - - inline const std::vector VALID_QUERY_LEVEL_PROPERTY_PARAM_NAMES = { - GL_TEXTURE_WIDTH, GL_TEXTURE_HEIGHT, GL_TEXTURE_DEPTH, GL_TEXTURE_INTERNAL_FORMAT, - GL_TEXTURE_RED_SIZE, GL_TEXTURE_GREEN_SIZE, GL_TEXTURE_BLUE_SIZE, GL_TEXTURE_ALPHA_SIZE, - GL_TEXTURE_DEPTH_SIZE, GL_TEXTURE_COMPRESSED, GL_TEXTURE_COMPRESSED_IMAGE_SIZE - }; // OpenGL 3 - } - - namespace Backend { -#define BACKEND_VULKAN 0x0015 -#define BACKEND_METAL 0x0016 -#define BACKEND_GLES 0x0017 -#define BACKEND_DILIGENT 0x0018 - -inline const int BACKEND_DILIGENT_VULKAN = 0x0020; -inline const int BACKEND_DILIGENT_METAL = 0x0021; // not ready currently -inline const int BACKEND_DILIGENT_OPENGL = 0x0022; - - } - - inline const char* RenderName = "MobileGL"; -} - -#endif //MOBILEGL_CONSTANTS_H diff --git a/MG/Global.h b/MG/Global.h deleted file mode 100644 index ceaeeae4..00000000 --- a/MG/Global.h +++ /dev/null @@ -1,41 +0,0 @@ -// -// Created by BZLZHH on 2025/3/15. -// - -#ifndef MOBILEGL_GLOBAL_H -#define MOBILEGL_GLOBAL_H - -#include "Includes.h" - -namespace MG_Global { - namespace MG { - inline const int VersionMajor = 1; - inline const int VersionMinor = 0; - inline const int VersionRevision = 0; - inline const int VersionPatch = 0; - inline const std::string VersionSuffix = "-Dev"; - } - - namespace Backend { -// BACKEND_TYPE is defined in Includes.h - } - - namespace GL { - inline const int GLVersionMajor = 3; - inline const int GLVersionMinor = 2; - inline const int GLVersionRevision = 0; - } - - namespace Common { - inline constexpr int LogLevel = MG_Constants::Common::LOG_LEVEL_INFO; - inline constexpr int LogTarget = MG_Constants::Common::LOG_TARGET_ALL; - -#ifdef __ANDROID__ - inline const char* LOG_FILE_PATH = "/sdcard/MG/latest.log"; -#else - inline const char* LOG_FILE_PATH = nullptr; -#endif - } -} - -#endif //MOBILEGL_GLOBAL_H diff --git a/MG/Includes.h b/MG/Includes.h deleted file mode 100644 index 4e9d0d69..00000000 --- a/MG/Includes.h +++ /dev/null @@ -1,109 +0,0 @@ -// -// Created by BZLZHH on 2025/3/15. -// -#pragma once - -#define BACKEND_TYPE BACKEND_DILIGENT - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "MG_Include/UncertainBool.hpp" -#include "MG_Include/IndexGenerator.hpp" - -#ifdef _WIN32 -#include -#endif - -#ifndef _WIN32 -#include -#include -#include -#endif - -#ifdef __ANDROID__ -#include -#include -#include -#include -#elif _WIN32 -#include -#include -#else -#include -#endif - -#include -#include -#include - -#if BACKEND_TYPE == BACKEND_DILIGENT -#include "EngineFactory.h" -#include "EngineFactoryOpenGL.h" -#include "EngineFactoryVk.h" -#include "RefCntAutoPtr.hpp" - -#include "PipelineState.h" -#include "GraphicsTypes.h" -#include "DeviceContext.h" -#endif - - -#include "Constants.h" -#include "Global.h" -#include "MG_GL/Implementations/EGL/Diligent/DiligentConfig.h" -#include "MG_GL/BackendLoader/GLES/Loader.h" -#include "MG_GL/Implementations/GL/Framebuffer/GL_Framebuffer.h" -#include "MG_GL/Implementations/GL/Getter/GL_Getter.h" -#include "MG_GL/Implementations/GL/Getter/BackendInfo.h" -#include "MG_GL/Implementations/GL/Buffer/GL_Buffer.h" -#include "MG_GL/Implementations/GL/Drawing/GL_Drawing.h" -#include "MG_GL/Implementations/GL/Program/GL_Program.h" -#include "MG_GL/Implementations/GL/Texture/GL_Texture.h" -#include "MG_GL/Implementations/GL/VertexArray/GL_VertexArray.h" -#include "MG_GL/State/Common/CommonState.h" -#include "MG_GL/State/Texture/TextureState.h" -#include "MG_GL/State/VertexArray/VertexArrayState.h" -#include "MG_GL/State/Buffer/BufferState.h" -#include "MG_GL/State/Program/ShaderObject.h" -#include "MG_GL/State/Program/ProgramState.h" -#include "MG_GL/State/Framebuffer/FramebufferState.h" -#include "MG_GL/State/Core/GLState.h" -#include "MG_GL/Implementations/EGL/Diligent/EGL_impl.h" -#include "MG_GL/Implementations/GLX/LookUp/LookUp.h" -#include "MG_UTIL/Debug/Debug.h" -#include "MG_UTIL/Program/GLSLTool.h" -#include "MG_UTIL/Program/DebugTool.h" -#include "MG_GL/Implementations/GL/Common/GL_Common.h" -#include "MG_GL/Implementations/EGL/VK/EGL_EMU.h" -#include "MG_GL/Implementations/EGL/GLES/EGL_WRAP.h" -#include "MG_RHI/GLES/Test/TestDrawing.h" diff --git a/MG/Init.cpp b/MG/Init.cpp deleted file mode 100644 index f35dd933..00000000 --- a/MG/Init.cpp +++ /dev/null @@ -1,48 +0,0 @@ -// -// Created by BZLZHH on 2025/3/15. -// - -#include "Includes.h" - -void MG_Initialize() { - MG_Util::Debug::LogInit(); - MG_Util::Debug::LogI("MobileGL Initializing..."); - MG_State::Init(); -#if BACKEND_TYPE == BACKEND_GLES - MG_GL::BackendLoader::Init(); -#endif -} - -void MG_Destroy() { - MG_Util::Debug::LogI("MobileGL Exiting..."); - MG_State::Destroy(); -} - -#if defined(__linux__) || defined(__APPLE__) -__attribute__((constructor)) static void AutoInit() { - MG_Initialize(); -} - -__attribute__((destructor)) static void AutoDestroy() { - MG_Destroy(); -} -#endif - -#ifdef _WIN32 -BOOL WINAPI DllMain(HMODULE hModule, - DWORD ul_reason_for_call, - LPVOID lpReserved) -{ - switch (ul_reason_for_call) - { - case DLL_PROCESS_ATTACH: - MG_Initialize(); - break; - - case DLL_PROCESS_DETACH: - MG_Destroy(); - break; - } - return TRUE; -} -#endif \ No newline at end of file diff --git a/MG/MG_GL/BackendLoader/GLES/Loader.cpp b/MG/MG_GL/BackendLoader/GLES/Loader.cpp deleted file mode 100644 index 5cc53e92..00000000 --- a/MG/MG_GL/BackendLoader/GLES/Loader.cpp +++ /dev/null @@ -1,1059 +0,0 @@ -// -// Created by BZLZHH on 2025/4/26. -// - -#include "../../../Includes.h" - -#if BACKEND_TYPE == BACKEND_GLES - -// TODO: Take this code file apart into multiple files. - -#define GL_FUNC_DECL(name) \ -name##_PTR name; - -namespace GLES { - GL_FUNC_DECL(glActiveTexture) - GL_FUNC_DECL(glAttachShader) - GL_FUNC_DECL(glBindAttribLocation) - GL_FUNC_DECL(glBindBuffer) - GL_FUNC_DECL(glBindFramebuffer) - GL_FUNC_DECL(glBindRenderbuffer) - GL_FUNC_DECL(glBindTexture) - GL_FUNC_DECL(glBlendColor) - GL_FUNC_DECL(glBlendEquation) - GL_FUNC_DECL(glBlendEquationSeparate) - GL_FUNC_DECL(glBlendFunc) - GL_FUNC_DECL(glBlendFuncSeparate) - GL_FUNC_DECL(glBufferData) - GL_FUNC_DECL(glBufferSubData) - GL_FUNC_DECL(glCheckFramebufferStatus) - GL_FUNC_DECL(glClear) - GL_FUNC_DECL(glClearColor) - GL_FUNC_DECL(glClearDepthf) - GL_FUNC_DECL(glClearStencil) - GL_FUNC_DECL(glColorMask) - GL_FUNC_DECL(glCompileShader) - GL_FUNC_DECL(glCompressedTexImage2D) - GL_FUNC_DECL(glCompressedTexSubImage2D) - GL_FUNC_DECL(glCopyTexImage2D) - GL_FUNC_DECL(glCopyTexSubImage2D) - GL_FUNC_DECL(glCreateProgram) - GL_FUNC_DECL(glCreateShader) - GL_FUNC_DECL(glCullFace) - GL_FUNC_DECL(glDeleteBuffers) - GL_FUNC_DECL(glDeleteFramebuffers) - GL_FUNC_DECL(glDeleteProgram) - GL_FUNC_DECL(glDeleteRenderbuffers) - GL_FUNC_DECL(glDeleteShader) - GL_FUNC_DECL(glDeleteTextures) - GL_FUNC_DECL(glDepthFunc) - GL_FUNC_DECL(glDepthMask) - GL_FUNC_DECL(glDepthRangef) - GL_FUNC_DECL(glDetachShader) - GL_FUNC_DECL(glDisable) - GL_FUNC_DECL(glDisableVertexAttribArray) - GL_FUNC_DECL(glDrawArrays) - GL_FUNC_DECL(glDrawElements) - GL_FUNC_DECL(glEnable) - GL_FUNC_DECL(glEnableVertexAttribArray) - GL_FUNC_DECL(glFinish) - GL_FUNC_DECL(glFlush) - GL_FUNC_DECL(glFramebufferRenderbuffer) - GL_FUNC_DECL(glFramebufferTexture2D) - GL_FUNC_DECL(glFrontFace) - GL_FUNC_DECL(glGenBuffers) - GL_FUNC_DECL(glGenerateMipmap) - GL_FUNC_DECL(glGenFramebuffers) - GL_FUNC_DECL(glGenRenderbuffers) - GL_FUNC_DECL(glGenTextures) - GL_FUNC_DECL(glGetActiveAttrib) - GL_FUNC_DECL(glGetActiveUniform) - GL_FUNC_DECL(glGetAttachedShaders) - GL_FUNC_DECL(glGetAttribLocation) - GL_FUNC_DECL(glGetBooleanv) - GL_FUNC_DECL(glGetBufferParameteriv) - GL_FUNC_DECL(glGetError) - GL_FUNC_DECL(glGetString) - GL_FUNC_DECL(glGetStringi) - GL_FUNC_DECL(glGetFloatv) - GL_FUNC_DECL(glGetFramebufferAttachmentParameteriv) - GL_FUNC_DECL(glGetIntegerv) - GL_FUNC_DECL(glGetProgramiv) - GL_FUNC_DECL(glGetProgramInfoLog) - GL_FUNC_DECL(glGetRenderbufferParameteriv) - GL_FUNC_DECL(glGetShaderiv) - GL_FUNC_DECL(glGetShaderInfoLog) - GL_FUNC_DECL(glGetShaderPrecisionFormat) - GL_FUNC_DECL(glGetShaderSource) - GL_FUNC_DECL(glGetTexParameterfv) - GL_FUNC_DECL(glGetTexParameteriv) - GL_FUNC_DECL(glGetUniformfv) - GL_FUNC_DECL(glGetUniformiv) - GL_FUNC_DECL(glGetUniformLocation) - GL_FUNC_DECL(glGetVertexAttribfv) - GL_FUNC_DECL(glGetVertexAttribiv) - GL_FUNC_DECL(glGetVertexAttribPointerv) - GL_FUNC_DECL(glHint) - GL_FUNC_DECL(glIsBuffer) - GL_FUNC_DECL(glIsEnabled) - GL_FUNC_DECL(glIsFramebuffer) - GL_FUNC_DECL(glIsProgram) - GL_FUNC_DECL(glIsRenderbuffer) - GL_FUNC_DECL(glIsShader) - GL_FUNC_DECL(glIsTexture) - GL_FUNC_DECL(glLineWidth) - GL_FUNC_DECL(glLinkProgram) - GL_FUNC_DECL(glPixelStorei) - GL_FUNC_DECL(glPolygonOffset) - GL_FUNC_DECL(glReadPixels) - GL_FUNC_DECL(glReleaseShaderCompiler) - GL_FUNC_DECL(glRenderbufferStorage) - GL_FUNC_DECL(glSampleCoverage) - GL_FUNC_DECL(glScissor) - GL_FUNC_DECL(glShaderBinary) - GL_FUNC_DECL(glShaderSource) - GL_FUNC_DECL(glStencilFunc) - GL_FUNC_DECL(glStencilFuncSeparate) - GL_FUNC_DECL(glStencilMask) - GL_FUNC_DECL(glStencilMaskSeparate) - GL_FUNC_DECL(glStencilOp) - GL_FUNC_DECL(glStencilOpSeparate) - GL_FUNC_DECL(glTexImage2D) - GL_FUNC_DECL(glTexParameterf) - GL_FUNC_DECL(glTexParameterfv) - GL_FUNC_DECL(glTexParameteri) - GL_FUNC_DECL(glTexParameteriv) - GL_FUNC_DECL(glTexSubImage2D) - GL_FUNC_DECL(glUniform1f) - GL_FUNC_DECL(glUniform1fv) - GL_FUNC_DECL(glUniform1i) - GL_FUNC_DECL(glUniform1iv) - GL_FUNC_DECL(glUniform2f) - GL_FUNC_DECL(glUniform2fv) - GL_FUNC_DECL(glUniform2i) - GL_FUNC_DECL(glUniform2iv) - GL_FUNC_DECL(glUniform3f) - GL_FUNC_DECL(glUniform3fv) - GL_FUNC_DECL(glUniform3i) - GL_FUNC_DECL(glUniform3iv) - GL_FUNC_DECL(glUniform4f) - GL_FUNC_DECL(glUniform4fv) - GL_FUNC_DECL(glUniform4i) - GL_FUNC_DECL(glUniform4iv) - GL_FUNC_DECL(glUniformMatrix2fv) - GL_FUNC_DECL(glUniformMatrix3fv) - GL_FUNC_DECL(glUniformMatrix4fv) - GL_FUNC_DECL(glUseProgram) - GL_FUNC_DECL(glValidateProgram) - GL_FUNC_DECL(glVertexAttrib1f) - GL_FUNC_DECL(glVertexAttrib1fv) - GL_FUNC_DECL(glVertexAttrib2f) - GL_FUNC_DECL(glVertexAttrib2fv) - GL_FUNC_DECL(glVertexAttrib3f) - GL_FUNC_DECL(glVertexAttrib3fv) - GL_FUNC_DECL(glVertexAttrib4f) - GL_FUNC_DECL(glVertexAttrib4fv) - GL_FUNC_DECL(glVertexAttribPointer) - GL_FUNC_DECL(glViewport) - GL_FUNC_DECL(glReadBuffer) - GL_FUNC_DECL(glDrawRangeElements) - GL_FUNC_DECL(glTexImage3D) - GL_FUNC_DECL(glTexSubImage3D) - GL_FUNC_DECL(glCopyTexSubImage3D) - GL_FUNC_DECL(glCompressedTexImage3D) - GL_FUNC_DECL(glCompressedTexSubImage3D) - GL_FUNC_DECL(glGenQueries) - GL_FUNC_DECL(glDeleteQueries) - GL_FUNC_DECL(glIsQuery) - GL_FUNC_DECL(glBeginQuery) - GL_FUNC_DECL(glEndQuery) - GL_FUNC_DECL(glGetQueryiv) - GL_FUNC_DECL(glGetQueryObjectuiv) - GL_FUNC_DECL(glUnmapBuffer) - GL_FUNC_DECL(glGetBufferPointerv) - GL_FUNC_DECL(glDrawBuffers) - GL_FUNC_DECL(glUniformMatrix2x3fv) - GL_FUNC_DECL(glUniformMatrix3x2fv) - GL_FUNC_DECL(glUniformMatrix2x4fv) - GL_FUNC_DECL(glUniformMatrix4x2fv) - GL_FUNC_DECL(glUniformMatrix3x4fv) - GL_FUNC_DECL(glUniformMatrix4x3fv) - GL_FUNC_DECL(glBlitFramebuffer) - GL_FUNC_DECL(glRenderbufferStorageMultisample) - GL_FUNC_DECL(glFramebufferTextureLayer) - GL_FUNC_DECL(glFlushMappedBufferRange) - GL_FUNC_DECL(glBindVertexArray) - GL_FUNC_DECL(glDeleteVertexArrays) - GL_FUNC_DECL(glGenVertexArrays) - GL_FUNC_DECL(glIsVertexArray) - GL_FUNC_DECL(glGetIntegeri_v) - GL_FUNC_DECL(glBeginTransformFeedback) - GL_FUNC_DECL(glEndTransformFeedback) - GL_FUNC_DECL(glBindBufferRange) - GL_FUNC_DECL(glBindBufferBase) - GL_FUNC_DECL(glTransformFeedbackVaryings) - GL_FUNC_DECL(glGetTransformFeedbackVarying) - GL_FUNC_DECL(glVertexAttribIPointer) - GL_FUNC_DECL(glGetVertexAttribIiv) - GL_FUNC_DECL(glGetVertexAttribIuiv) - GL_FUNC_DECL(glVertexAttribI4i) - GL_FUNC_DECL(glVertexAttribI4ui) - GL_FUNC_DECL(glVertexAttribI4iv) - GL_FUNC_DECL(glVertexAttribI4uiv) - GL_FUNC_DECL(glGetUniformuiv) - GL_FUNC_DECL(glGetFragDataLocation) - GL_FUNC_DECL(glUniform1ui) - GL_FUNC_DECL(glUniform2ui) - GL_FUNC_DECL(glUniform3ui) - GL_FUNC_DECL(glUniform4ui) - GL_FUNC_DECL(glUniform1uiv) - GL_FUNC_DECL(glUniform2uiv) - GL_FUNC_DECL(glUniform3uiv) - GL_FUNC_DECL(glUniform4uiv) - GL_FUNC_DECL(glClearBufferiv) - GL_FUNC_DECL(glClearBufferuiv) - GL_FUNC_DECL(glClearBufferfv) - GL_FUNC_DECL(glClearBufferfi) - GL_FUNC_DECL(glCopyBufferSubData) - GL_FUNC_DECL(glGetUniformIndices) - GL_FUNC_DECL(glGetActiveUniformsiv) - GL_FUNC_DECL(glGetUniformBlockIndex) - GL_FUNC_DECL(glGetActiveUniformBlockiv) - GL_FUNC_DECL(glGetActiveUniformBlockName) - GL_FUNC_DECL(glUniformBlockBinding) - GL_FUNC_DECL(glDrawArraysInstanced) - GL_FUNC_DECL(glDrawElementsInstanced) - GL_FUNC_DECL(glFenceSync) - GL_FUNC_DECL(glIsSync) - GL_FUNC_DECL(glDeleteSync) - GL_FUNC_DECL(glClientWaitSync) - GL_FUNC_DECL(glWaitSync) - GL_FUNC_DECL(glGetInteger64v) - GL_FUNC_DECL(glGetSynciv) - GL_FUNC_DECL(glGetInteger64i_v) - GL_FUNC_DECL(glGetBufferParameteri64v) - GL_FUNC_DECL(glGenSamplers) - GL_FUNC_DECL(glDeleteSamplers) - GL_FUNC_DECL(glIsSampler) - GL_FUNC_DECL(glBindSampler) - GL_FUNC_DECL(glSamplerParameteri) - GL_FUNC_DECL(glSamplerParameteriv) - GL_FUNC_DECL(glSamplerParameterf) - GL_FUNC_DECL(glSamplerParameterfv) - GL_FUNC_DECL(glGetSamplerParameteriv) - GL_FUNC_DECL(glGetSamplerParameterfv) - GL_FUNC_DECL(glVertexAttribDivisor) - GL_FUNC_DECL(glBindTransformFeedback) - GL_FUNC_DECL(glDeleteTransformFeedbacks) - GL_FUNC_DECL(glGenTransformFeedbacks) - GL_FUNC_DECL(glIsTransformFeedback) - GL_FUNC_DECL(glPauseTransformFeedback) - GL_FUNC_DECL(glResumeTransformFeedback) - GL_FUNC_DECL(glGetProgramBinary) - GL_FUNC_DECL(glProgramBinary) - GL_FUNC_DECL(glProgramParameteri) - GL_FUNC_DECL(glInvalidateFramebuffer) - GL_FUNC_DECL(glInvalidateSubFramebuffer) - GL_FUNC_DECL(glTexStorage2D) - GL_FUNC_DECL(glTexStorage3D) - GL_FUNC_DECL(glGetInternalformativ) - GL_FUNC_DECL(glDispatchCompute) - GL_FUNC_DECL(glDispatchComputeIndirect) - GL_FUNC_DECL(glDrawArraysIndirect) - GL_FUNC_DECL(glDrawElementsIndirect) - GL_FUNC_DECL(glFramebufferParameteri) - GL_FUNC_DECL(glGetFramebufferParameteriv) - GL_FUNC_DECL(glGetProgramInterfaceiv) - GL_FUNC_DECL(glGetProgramResourceIndex) - GL_FUNC_DECL(glGetProgramResourceName) - GL_FUNC_DECL(glGetProgramResourceiv) - GL_FUNC_DECL(glGetProgramResourceLocation) - GL_FUNC_DECL(glUseProgramStages) - GL_FUNC_DECL(glActiveShaderProgram) - GL_FUNC_DECL(glCreateShaderProgramv) - GL_FUNC_DECL(glBindProgramPipeline) - GL_FUNC_DECL(glDeleteProgramPipelines) - GL_FUNC_DECL(glGenProgramPipelines) - GL_FUNC_DECL(glIsProgramPipeline) - GL_FUNC_DECL(glGetProgramPipelineiv) - GL_FUNC_DECL(glProgramUniform1i) - GL_FUNC_DECL(glProgramUniform2i) - GL_FUNC_DECL(glProgramUniform3i) - GL_FUNC_DECL(glProgramUniform4i) - GL_FUNC_DECL(glProgramUniform1ui) - GL_FUNC_DECL(glProgramUniform2ui) - GL_FUNC_DECL(glProgramUniform3ui) - GL_FUNC_DECL(glProgramUniform4ui) - GL_FUNC_DECL(glProgramUniform1f) - GL_FUNC_DECL(glProgramUniform2f) - GL_FUNC_DECL(glProgramUniform3f) - GL_FUNC_DECL(glProgramUniform4f) - GL_FUNC_DECL(glProgramUniform1iv) - GL_FUNC_DECL(glProgramUniform2iv) - GL_FUNC_DECL(glProgramUniform3iv) - GL_FUNC_DECL(glProgramUniform4iv) - GL_FUNC_DECL(glProgramUniform1uiv) - GL_FUNC_DECL(glProgramUniform2uiv) - GL_FUNC_DECL(glProgramUniform3uiv) - GL_FUNC_DECL(glProgramUniform4uiv) - GL_FUNC_DECL(glProgramUniform1fv) - GL_FUNC_DECL(glProgramUniform2fv) - GL_FUNC_DECL(glProgramUniform3fv) - GL_FUNC_DECL(glProgramUniform4fv) - GL_FUNC_DECL(glProgramUniformMatrix2fv) - GL_FUNC_DECL(glProgramUniformMatrix3fv) - GL_FUNC_DECL(glProgramUniformMatrix4fv) - GL_FUNC_DECL(glProgramUniformMatrix2x3fv) - GL_FUNC_DECL(glProgramUniformMatrix3x2fv) - GL_FUNC_DECL(glProgramUniformMatrix2x4fv) - GL_FUNC_DECL(glProgramUniformMatrix4x2fv) - GL_FUNC_DECL(glProgramUniformMatrix3x4fv) - GL_FUNC_DECL(glProgramUniformMatrix4x3fv) - GL_FUNC_DECL(glValidateProgramPipeline) - GL_FUNC_DECL(glGetProgramPipelineInfoLog) - GL_FUNC_DECL(glBindImageTexture) - GL_FUNC_DECL(glGetBooleani_v) - GL_FUNC_DECL(glMemoryBarrier) - GL_FUNC_DECL(glMemoryBarrierByRegion) - GL_FUNC_DECL(glTexStorage2DMultisample) - GL_FUNC_DECL(glGetMultisamplefv) - GL_FUNC_DECL(glSampleMaski) - GL_FUNC_DECL(glGetTexLevelParameteriv) - GL_FUNC_DECL(glGetTexLevelParameterfv) - GL_FUNC_DECL(glBindVertexBuffer) - GL_FUNC_DECL(glVertexAttribFormat) - GL_FUNC_DECL(glVertexAttribIFormat) - GL_FUNC_DECL(glVertexAttribBinding) - GL_FUNC_DECL(glVertexBindingDivisor) - GL_FUNC_DECL(glBlendBarrier) - GL_FUNC_DECL(glCopyImageSubData) - GL_FUNC_DECL(glDebugMessageControl) - GL_FUNC_DECL(glDebugMessageInsert) - GL_FUNC_DECL(glDebugMessageCallback) - GL_FUNC_DECL(glGetDebugMessageLog) - GL_FUNC_DECL(glPushDebugGroup) - GL_FUNC_DECL(glPopDebugGroup) - GL_FUNC_DECL(glObjectLabel) - GL_FUNC_DECL(glGetObjectLabel) - GL_FUNC_DECL(glObjectPtrLabel) - GL_FUNC_DECL(glGetObjectPtrLabel) - GL_FUNC_DECL(glGetPointerv) - GL_FUNC_DECL(glEnablei) - GL_FUNC_DECL(glDisablei) - GL_FUNC_DECL(glBlendEquationi) - GL_FUNC_DECL(glBlendEquationSeparatei) - GL_FUNC_DECL(glBlendFunci) - GL_FUNC_DECL(glBlendFuncSeparatei) - GL_FUNC_DECL(glColorMaski) - GL_FUNC_DECL(glIsEnabledi) - GL_FUNC_DECL(glDrawElementsBaseVertex) - GL_FUNC_DECL(glDrawRangeElementsBaseVertex) - GL_FUNC_DECL(glDrawElementsInstancedBaseVertex) - GL_FUNC_DECL(glFramebufferTexture) - GL_FUNC_DECL(glPrimitiveBoundingBox) - GL_FUNC_DECL(glGetGraphicsResetStatus) - GL_FUNC_DECL(glReadnPixels) - GL_FUNC_DECL(glGetnUniformfv) - GL_FUNC_DECL(glGetnUniformiv) - GL_FUNC_DECL(glGetnUniformuiv) - GL_FUNC_DECL(glMinSampleShading) - GL_FUNC_DECL(glPatchParameteri) - GL_FUNC_DECL(glTexParameterIiv) - GL_FUNC_DECL(glTexParameterIuiv) - GL_FUNC_DECL(glGetTexParameterIiv) - GL_FUNC_DECL(glGetTexParameterIuiv) - GL_FUNC_DECL(glSamplerParameterIiv) - GL_FUNC_DECL(glSamplerParameterIuiv) - GL_FUNC_DECL(glGetSamplerParameterIiv) - GL_FUNC_DECL(glGetSamplerParameterIuiv) - GL_FUNC_DECL(glTexBuffer) - GL_FUNC_DECL(glTexBufferRange) - GL_FUNC_DECL(glTexStorage3DMultisample) - GL_FUNC_DECL(glMapBufferRange) - GL_FUNC_DECL(glBufferStorageEXT) - GL_FUNC_DECL(glGetQueryObjectivEXT) - GL_FUNC_DECL(glGetQueryObjecti64vEXT) - GL_FUNC_DECL(glBindFragDataLocationEXT) - GL_FUNC_DECL(glMapBufferOES) - - GL_FUNC_DECL(glMultiDrawArraysIndirectEXT) - GL_FUNC_DECL(glMultiDrawElementsIndirectEXT) - GL_FUNC_DECL(glMultiDrawElementsBaseVertexEXT) - - GL_FUNC_DECL(glBruh) -} - -#undef GL_FUNC_DECL - -namespace MG_GL::BackendLoader { - void Init() { - GLESBackend::LoadLibs(); - GLESBackend::InitEGL(); - GLESBackend::InitGLES(); - GLESBackend::DestroyTempEGLCtx(); - } -} - -namespace MG_GL::BackendLoader::GLESBackend { - void *libGLES = nullptr, *libEGL = nullptr; - - static const char *LibPathPrefixes[] = { - "", - "/opt/vc/lib/", - "/usr/local/lib/", - "/usr/lib/", - nullptr - }; - - static const char *LibExts[] = { - "so", - "so.1", - "so.2", - "dylib", - "dll", - nullptr - }; - - static const char *GLES3Libs[] = { - "libGLESv3_CM", - "libGLESv3", - nullptr - }; - - static const char *EGLLibs[] = { - "libEGL", - nullptr - }; - - void *OpenLib(const char **names, const char *override) { - void *lib = nullptr; - - char path_name[PATH_MAX + 1]; - int flags = RTLD_LOCAL | RTLD_NOW; - if (override) { - if ((lib = dlopen(override, flags))) { - strncpy(path_name, override, PATH_MAX); - return lib; - } else { - MG_Util::Debug::LogE("LIBGL_GLES override failed: %s\n", dlerror()); - } - } - for (int p = 0; LibPathPrefixes[p]; p++) { - for (int i = 0; names[i]; i++) { - for (int e = 0; LibExts[e]; e++) { - snprintf(path_name, PATH_MAX, "%s%s.%s", LibPathPrefixes[p], names[i], LibExts[e]); - if ((lib = dlopen(path_name, flags))) { - return lib; - } - } - } - } - return lib; - } - - void LoadLibs() { - static int first = 1; - if (!first) return; - first = 0; - - // TODO: Add ANGLE override? - libGLES = OpenLib(GLES3Libs, nullptr); - libEGL = OpenLib(EGLLibs, nullptr); - } - - void *ProcAddress(void *lib, const char *name) { - return dlsym(lib, name); - } - - void LogOpenGLExtensions() { - const GLubyte *raw_extensions = glGetString(GL_EXTENSIONS); - MG_Util::Debug::LogD("Extensions list using glGetString:\n%s", - raw_extensions ? (const char *) raw_extensions : "(nullptr)"); - GLint num_extensions = 0; - glGetIntegerv(GL_NUM_EXTENSIONS, &num_extensions); - MG_Util::Debug::LogD("Extensions list using glGetStringi:\n"); - for (GLint i = 0; i < num_extensions; ++i) { - const GLubyte *extension = glGetStringi(GL_EXTENSIONS, i); - if (extension) { - MG_Util::Debug::LogD("%s", (const char *) extension); - } else { - MG_Util::Debug::LogD("(nullptr)"); - } - } - } - - void InitGLESCapabilities() { - GLES::glGetIntegerv(GL_MAJOR_VERSION, &GLES::Caps::Version::Major); - GLES::glGetIntegerv(GL_MINOR_VERSION, &GLES::Caps::Version::Minor); - - GLint num_es_extensions = 0; - GLES::glGetIntegerv(GL_NUM_EXTENSIONS, &num_es_extensions); - MG_Util::Debug::LogD("Detected %d OpenGL ES extensions.", num_es_extensions); - for (GLint i = 0; i < num_es_extensions; ++i) { - const char *extension = (const char *) GLES::glGetStringi(GL_EXTENSIONS, i); - if (extension) { - MG_Util::Debug::LogD("%s", (const char *) extension); - if (strcmp(extension, "GL_EXT_buffer_storage") == 0) { - GLES::Caps::Exts::GL_EXT_buffer_storage = 1; - } else if (strcmp(extension, "GL_EXT_disjoint_timer_query") == 0) { - GLES::Caps::Exts::GL_EXT_disjoint_timer_query = 1; - } else if (strcmp(extension, "GL_QCOM_texture_lod_bias") == 0) { - GLES::Caps::Exts::GL_QCOM_texture_lod_bias = 1; - } else if (strcmp(extension, "GL_EXT_blend_func_extended") == 0) { - GLES::Caps::Exts::GL_EXT_blend_func_extended = 1; - } else if (strcmp(extension, "GL_EXT_texture_format_BGRA8888") == 0) { - GLES::Caps::Exts::GL_EXT_texture_format_BGRA8888 = 1; - } else if (strcmp(extension, "GL_EXT_read_format_bgra") == 0) { - GLES::Caps::Exts::GL_EXT_read_format_bgra = 1; - } else if (strcmp(extension, "GL_OES_mapbuffer") == 0) { - GLES::Caps::Exts::GL_OES_mapbuffer = 1; - } else if (strcmp(extension, "GL_EXT_multi_draw_indirect") == 0) { - GLES::Caps::Exts::GL_EXT_multi_draw_indirect = 1; - } else if (strcmp(extension, "GL_OES_draw_elements_base_vertex") == 0) { - GLES::Caps::Exts::GL_OES_draw_elements_base_vertex = 1; - } else if (strcmp(extension, "GL_OES_depth_texture") == 0) { - GLES::Caps::Exts::GL_OES_depth_texture = 1; - } else if (strcmp(extension, "GL_OES_depth24") == 0) { - GLES::Caps::Exts::GL_OES_depth24 = 1; - } else if (strcmp(extension, "GL_OES_depth_texture_float") == 0) { - GLES::Caps::Exts::GL_OES_depth_texture_float = 1; - } else if (strcmp(extension, "GL_EXT_texture_norm16") == 0) { - GLES::Caps::Exts::GL_EXT_texture_norm16 = 1; - } else if (strcmp(extension, "GL_EXT_texture_rg") == 0) { - GLES::Caps::Exts::GL_EXT_texture_rg = 1; - } - } else { - MG_Util::Debug::LogD("(nullptr)"); - } - } - - MG_Util::Debug::LogD("Detected GL_QCOM_texture_lod_bias!"); - - if (GLES::Caps::Exts::GL_EXT_buffer_storage) { - // TODO: Complete AppendExtension. -//AppendExtension("GL_ARB_buffer_storage"); - } - - if (GLES::Caps::Exts::GL_EXT_disjoint_timer_query) { - // TODO: Complete AppendExtension. -//AppendExtension("GL_ARB_timer_query"); - // TODO: Complete AppendExtension. -//AppendExtension("GL_EXT_timer_query"); - } - } - - void InitGLES() { - INIT_GLES_FUNC(glActiveTexture) - INIT_GLES_FUNC(glAttachShader) - INIT_GLES_FUNC(glBindAttribLocation) - INIT_GLES_FUNC(glBindBuffer) - INIT_GLES_FUNC(glBindFramebuffer) - INIT_GLES_FUNC(glBindRenderbuffer) - INIT_GLES_FUNC(glBindTexture) - INIT_GLES_FUNC(glBlendColor) - INIT_GLES_FUNC(glBlendEquation) - INIT_GLES_FUNC(glBlendEquationSeparate) - INIT_GLES_FUNC(glBlendFunc) - INIT_GLES_FUNC(glBlendFuncSeparate) - INIT_GLES_FUNC(glBufferData) - INIT_GLES_FUNC(glBufferSubData) - INIT_GLES_FUNC(glCheckFramebufferStatus) - INIT_GLES_FUNC(glClear) - INIT_GLES_FUNC(glClearColor) - INIT_GLES_FUNC(glClearDepthf) - INIT_GLES_FUNC(glClearStencil) - INIT_GLES_FUNC(glColorMask) - INIT_GLES_FUNC(glCompileShader) - INIT_GLES_FUNC(glCompressedTexImage2D) - INIT_GLES_FUNC(glCompressedTexSubImage2D) -// INIT_GLES_FUNC(glCopyTexImage1D) - INIT_GLES_FUNC(glCopyTexImage2D) - INIT_GLES_FUNC(glCopyTexSubImage2D) - INIT_GLES_FUNC(glCreateProgram) - INIT_GLES_FUNC(glCreateShader) - INIT_GLES_FUNC(glCullFace) - INIT_GLES_FUNC(glDeleteBuffers) - INIT_GLES_FUNC(glDeleteFramebuffers) - INIT_GLES_FUNC(glDeleteProgram) - INIT_GLES_FUNC(glDeleteRenderbuffers) - INIT_GLES_FUNC(glDeleteShader) - INIT_GLES_FUNC(glDeleteTextures) - INIT_GLES_FUNC(glDepthFunc) - INIT_GLES_FUNC(glDepthMask) - INIT_GLES_FUNC(glDepthRangef) - INIT_GLES_FUNC(glDetachShader) - INIT_GLES_FUNC(glDisable) - INIT_GLES_FUNC(glDisableVertexAttribArray) - INIT_GLES_FUNC(glDrawArrays) - INIT_GLES_FUNC(glDrawElements) - INIT_GLES_FUNC(glEnable) - INIT_GLES_FUNC(glEnableVertexAttribArray) - INIT_GLES_FUNC(glFinish) - INIT_GLES_FUNC(glFlush) - INIT_GLES_FUNC(glFramebufferRenderbuffer) - INIT_GLES_FUNC(glFramebufferTexture2D) - INIT_GLES_FUNC(glFrontFace) - INIT_GLES_FUNC(glGenBuffers) - INIT_GLES_FUNC(glGenerateMipmap) - INIT_GLES_FUNC(glGenFramebuffers) - INIT_GLES_FUNC(glGenRenderbuffers) - INIT_GLES_FUNC(glGenTextures) - INIT_GLES_FUNC(glGetActiveAttrib) - INIT_GLES_FUNC(glGetActiveUniform) - INIT_GLES_FUNC(glGetAttachedShaders) - INIT_GLES_FUNC(glGetAttribLocation) - INIT_GLES_FUNC(glGetBooleanv) - INIT_GLES_FUNC(glGetBufferParameteriv) - INIT_GLES_FUNC(glGetError) - INIT_GLES_FUNC(glGetString) - INIT_GLES_FUNC(glGetStringi) - INIT_GLES_FUNC(glGetFloatv) - INIT_GLES_FUNC(glGetFramebufferAttachmentParameteriv) - INIT_GLES_FUNC(glGetIntegerv) - INIT_GLES_FUNC(glGetProgramiv) - INIT_GLES_FUNC(glGetProgramInfoLog) - INIT_GLES_FUNC(glGetRenderbufferParameteriv) - INIT_GLES_FUNC(glGetShaderiv) - INIT_GLES_FUNC(glGetShaderInfoLog) - INIT_GLES_FUNC(glGetShaderPrecisionFormat) - INIT_GLES_FUNC(glGetShaderSource) - INIT_GLES_FUNC(glGetTexParameterfv) - INIT_GLES_FUNC(glGetTexParameteriv) - INIT_GLES_FUNC(glGetUniformfv) - INIT_GLES_FUNC(glGetUniformiv) - INIT_GLES_FUNC(glGetUniformLocation) - INIT_GLES_FUNC(glGetVertexAttribfv) - INIT_GLES_FUNC(glGetVertexAttribiv) - INIT_GLES_FUNC(glGetVertexAttribPointerv) - INIT_GLES_FUNC(glHint) - INIT_GLES_FUNC(glIsBuffer) - INIT_GLES_FUNC(glIsEnabled) - INIT_GLES_FUNC(glIsFramebuffer) - INIT_GLES_FUNC(glIsProgram) - INIT_GLES_FUNC(glIsRenderbuffer) - INIT_GLES_FUNC(glIsShader) - INIT_GLES_FUNC(glIsTexture) - INIT_GLES_FUNC(glLineWidth) - INIT_GLES_FUNC(glLinkProgram) - INIT_GLES_FUNC(glPixelStorei) - INIT_GLES_FUNC(glPolygonOffset) - INIT_GLES_FUNC(glReadPixels) - INIT_GLES_FUNC(glReleaseShaderCompiler) - INIT_GLES_FUNC(glRenderbufferStorage) - INIT_GLES_FUNC(glSampleCoverage) - INIT_GLES_FUNC(glScissor) - INIT_GLES_FUNC(glShaderBinary) - INIT_GLES_FUNC(glShaderSource) - INIT_GLES_FUNC(glStencilFunc) - INIT_GLES_FUNC(glStencilFuncSeparate) - INIT_GLES_FUNC(glStencilMask) - INIT_GLES_FUNC(glStencilMaskSeparate) - INIT_GLES_FUNC(glStencilOp) - INIT_GLES_FUNC(glStencilOpSeparate) -// INIT_GLES_FUNC(glTexImage1D) - INIT_GLES_FUNC(glTexImage2D) -// INIT_GLES_FUNC(glTexStorage1D) - INIT_GLES_FUNC(glTexParameterf) - INIT_GLES_FUNC(glTexParameterfv) - INIT_GLES_FUNC(glTexParameteri) - INIT_GLES_FUNC(glTexParameteriv) - INIT_GLES_FUNC(glTexSubImage2D) - INIT_GLES_FUNC(glUniform1f) - INIT_GLES_FUNC(glUniform1fv) - INIT_GLES_FUNC(glUniform1i) - INIT_GLES_FUNC(glUniform1iv) - INIT_GLES_FUNC(glUniform2f) - INIT_GLES_FUNC(glUniform2fv) - INIT_GLES_FUNC(glUniform2i) - INIT_GLES_FUNC(glUniform2iv) - INIT_GLES_FUNC(glUniform3f) - INIT_GLES_FUNC(glUniform3fv) - INIT_GLES_FUNC(glUniform3i) - INIT_GLES_FUNC(glUniform3iv) - INIT_GLES_FUNC(glUniform4f) - INIT_GLES_FUNC(glUniform4fv) - INIT_GLES_FUNC(glUniform4i) - INIT_GLES_FUNC(glUniform4iv) - INIT_GLES_FUNC(glUniformMatrix2fv) - INIT_GLES_FUNC(glUniformMatrix3fv) - INIT_GLES_FUNC(glUniformMatrix4fv) - INIT_GLES_FUNC(glUseProgram) - INIT_GLES_FUNC(glValidateProgram) - INIT_GLES_FUNC(glVertexAttrib1f) - INIT_GLES_FUNC(glVertexAttrib1fv) - INIT_GLES_FUNC(glVertexAttrib2f) - INIT_GLES_FUNC(glVertexAttrib2fv) - INIT_GLES_FUNC(glVertexAttrib3f) - INIT_GLES_FUNC(glVertexAttrib3fv) - INIT_GLES_FUNC(glVertexAttrib4f) - INIT_GLES_FUNC(glVertexAttrib4fv) - INIT_GLES_FUNC(glVertexAttribPointer) - INIT_GLES_FUNC(glViewport) - INIT_GLES_FUNC(glReadBuffer) - INIT_GLES_FUNC(glDrawRangeElements) - INIT_GLES_FUNC(glTexImage3D) - INIT_GLES_FUNC(glTexSubImage3D) - INIT_GLES_FUNC(glCopyTexSubImage3D) - INIT_GLES_FUNC(glCompressedTexImage3D) - INIT_GLES_FUNC(glCompressedTexSubImage3D) - INIT_GLES_FUNC(glGenQueries) - INIT_GLES_FUNC(glDeleteQueries) - INIT_GLES_FUNC(glIsQuery) - INIT_GLES_FUNC(glBeginQuery) - INIT_GLES_FUNC(glEndQuery) - INIT_GLES_FUNC(glGetQueryiv) - INIT_GLES_FUNC(glGetQueryObjectuiv) - INIT_GLES_FUNC(glUnmapBuffer) - INIT_GLES_FUNC(glGetBufferPointerv) - INIT_GLES_FUNC(glDrawBuffers) - INIT_GLES_FUNC(glUniformMatrix2x3fv) - INIT_GLES_FUNC(glUniformMatrix3x2fv) - INIT_GLES_FUNC(glUniformMatrix2x4fv) - INIT_GLES_FUNC(glUniformMatrix4x2fv) - INIT_GLES_FUNC(glUniformMatrix3x4fv) - INIT_GLES_FUNC(glUniformMatrix4x3fv) - INIT_GLES_FUNC(glBlitFramebuffer) - INIT_GLES_FUNC(glRenderbufferStorageMultisample) - INIT_GLES_FUNC(glFramebufferTextureLayer) - INIT_GLES_FUNC(glFlushMappedBufferRange) - INIT_GLES_FUNC(glBindVertexArray) - INIT_GLES_FUNC(glDeleteVertexArrays) - INIT_GLES_FUNC(glGenVertexArrays) - INIT_GLES_FUNC(glIsVertexArray) - INIT_GLES_FUNC(glGetIntegeri_v) - INIT_GLES_FUNC(glBeginTransformFeedback) - INIT_GLES_FUNC(glEndTransformFeedback) - INIT_GLES_FUNC(glBindBufferRange) - INIT_GLES_FUNC(glBindBufferBase) - INIT_GLES_FUNC(glTransformFeedbackVaryings) - INIT_GLES_FUNC(glGetTransformFeedbackVarying) - INIT_GLES_FUNC(glVertexAttribIPointer) - INIT_GLES_FUNC(glGetVertexAttribIiv) - INIT_GLES_FUNC(glGetVertexAttribIuiv) - INIT_GLES_FUNC(glVertexAttribI4i) - INIT_GLES_FUNC(glVertexAttribI4ui) - INIT_GLES_FUNC(glVertexAttribI4iv) - INIT_GLES_FUNC(glVertexAttribI4uiv) - INIT_GLES_FUNC(glGetUniformuiv) - INIT_GLES_FUNC(glGetFragDataLocation) - INIT_GLES_FUNC(glUniform1ui) - INIT_GLES_FUNC(glUniform2ui) - INIT_GLES_FUNC(glUniform3ui) - INIT_GLES_FUNC(glUniform4ui) - INIT_GLES_FUNC(glUniform1uiv) - INIT_GLES_FUNC(glUniform2uiv) - INIT_GLES_FUNC(glUniform3uiv) - INIT_GLES_FUNC(glUniform4uiv) - INIT_GLES_FUNC(glClearBufferiv) - INIT_GLES_FUNC(glClearBufferuiv) - INIT_GLES_FUNC(glClearBufferfv) - INIT_GLES_FUNC(glClearBufferfi) - INIT_GLES_FUNC(glCopyBufferSubData) - INIT_GLES_FUNC(glGetUniformIndices) - INIT_GLES_FUNC(glGetActiveUniformsiv) - INIT_GLES_FUNC(glGetUniformBlockIndex) - INIT_GLES_FUNC(glGetActiveUniformBlockiv) - INIT_GLES_FUNC(glGetActiveUniformBlockName) - INIT_GLES_FUNC(glUniformBlockBinding) - INIT_GLES_FUNC(glDrawArraysInstanced) - INIT_GLES_FUNC(glDrawElementsInstanced) - INIT_GLES_FUNC(glFenceSync) - INIT_GLES_FUNC(glIsSync) - INIT_GLES_FUNC(glDeleteSync) - INIT_GLES_FUNC(glClientWaitSync) - INIT_GLES_FUNC(glWaitSync) - INIT_GLES_FUNC(glGetInteger64v) - INIT_GLES_FUNC(glGetSynciv) - INIT_GLES_FUNC(glGetInteger64i_v) - INIT_GLES_FUNC(glGetBufferParameteri64v) - INIT_GLES_FUNC(glGenSamplers) - INIT_GLES_FUNC(glDeleteSamplers) - INIT_GLES_FUNC(glIsSampler) - INIT_GLES_FUNC(glBindSampler) - INIT_GLES_FUNC(glSamplerParameteri) - INIT_GLES_FUNC(glSamplerParameteriv) - INIT_GLES_FUNC(glSamplerParameterf) - INIT_GLES_FUNC(glSamplerParameterfv) - INIT_GLES_FUNC(glGetSamplerParameteriv) - INIT_GLES_FUNC(glGetSamplerParameterfv) - INIT_GLES_FUNC(glVertexAttribDivisor) - INIT_GLES_FUNC(glBindTransformFeedback) - INIT_GLES_FUNC(glDeleteTransformFeedbacks) - INIT_GLES_FUNC(glGenTransformFeedbacks) - INIT_GLES_FUNC(glIsTransformFeedback) - INIT_GLES_FUNC(glPauseTransformFeedback) - INIT_GLES_FUNC(glResumeTransformFeedback) - INIT_GLES_FUNC(glGetProgramBinary) - INIT_GLES_FUNC(glProgramBinary) - INIT_GLES_FUNC(glProgramParameteri) - INIT_GLES_FUNC(glInvalidateFramebuffer) - INIT_GLES_FUNC(glInvalidateSubFramebuffer) - INIT_GLES_FUNC(glTexStorage2D) - INIT_GLES_FUNC(glTexStorage3D) - INIT_GLES_FUNC(glGetInternalformativ) - INIT_GLES_FUNC(glDispatchCompute) - INIT_GLES_FUNC(glDispatchComputeIndirect) - INIT_GLES_FUNC(glDrawArraysIndirect) - INIT_GLES_FUNC(glDrawElementsIndirect) - INIT_GLES_FUNC(glFramebufferParameteri) - INIT_GLES_FUNC(glGetFramebufferParameteriv) - INIT_GLES_FUNC(glGetProgramInterfaceiv) - INIT_GLES_FUNC(glGetProgramResourceIndex) - INIT_GLES_FUNC(glGetProgramResourceName) - INIT_GLES_FUNC(glGetProgramResourceiv) - INIT_GLES_FUNC(glGetProgramResourceLocation) - INIT_GLES_FUNC(glUseProgramStages) - INIT_GLES_FUNC(glActiveShaderProgram) - INIT_GLES_FUNC(glCreateShaderProgramv) - INIT_GLES_FUNC(glBindProgramPipeline) - INIT_GLES_FUNC(glDeleteProgramPipelines) - INIT_GLES_FUNC(glGenProgramPipelines) - INIT_GLES_FUNC(glIsProgramPipeline) - INIT_GLES_FUNC(glGetProgramPipelineiv) - INIT_GLES_FUNC(glProgramUniform1i) - INIT_GLES_FUNC(glProgramUniform2i) - INIT_GLES_FUNC(glProgramUniform3i) - INIT_GLES_FUNC(glProgramUniform4i) - INIT_GLES_FUNC(glProgramUniform1ui) - INIT_GLES_FUNC(glProgramUniform2ui) - INIT_GLES_FUNC(glProgramUniform3ui) - INIT_GLES_FUNC(glProgramUniform4ui) - INIT_GLES_FUNC(glProgramUniform1f) - INIT_GLES_FUNC(glProgramUniform2f) - INIT_GLES_FUNC(glProgramUniform3f) - INIT_GLES_FUNC(glProgramUniform4f) - INIT_GLES_FUNC(glProgramUniform1iv) - INIT_GLES_FUNC(glProgramUniform2iv) - INIT_GLES_FUNC(glProgramUniform3iv) - INIT_GLES_FUNC(glProgramUniform4iv) - INIT_GLES_FUNC(glProgramUniform1uiv) - INIT_GLES_FUNC(glProgramUniform2uiv) - INIT_GLES_FUNC(glProgramUniform3uiv) - INIT_GLES_FUNC(glProgramUniform4uiv) - INIT_GLES_FUNC(glProgramUniform1fv) - INIT_GLES_FUNC(glProgramUniform2fv) - INIT_GLES_FUNC(glProgramUniform3fv) - INIT_GLES_FUNC(glProgramUniform4fv) - INIT_GLES_FUNC(glProgramUniformMatrix2fv) - INIT_GLES_FUNC(glProgramUniformMatrix3fv) - INIT_GLES_FUNC(glProgramUniformMatrix4fv) - INIT_GLES_FUNC(glProgramUniformMatrix2x3fv) - INIT_GLES_FUNC(glProgramUniformMatrix3x2fv) - INIT_GLES_FUNC(glProgramUniformMatrix2x4fv) - INIT_GLES_FUNC(glProgramUniformMatrix4x2fv) - INIT_GLES_FUNC(glProgramUniformMatrix3x4fv) - INIT_GLES_FUNC(glProgramUniformMatrix4x3fv) - INIT_GLES_FUNC(glValidateProgramPipeline) - INIT_GLES_FUNC(glGetProgramPipelineInfoLog) - INIT_GLES_FUNC(glBindImageTexture) - INIT_GLES_FUNC(glGetBooleani_v) - INIT_GLES_FUNC(glMemoryBarrier) - INIT_GLES_FUNC(glMemoryBarrierByRegion) - INIT_GLES_FUNC(glTexStorage2DMultisample) - INIT_GLES_FUNC(glGetMultisamplefv) - INIT_GLES_FUNC(glSampleMaski) - INIT_GLES_FUNC(glGetTexLevelParameteriv) - INIT_GLES_FUNC(glGetTexLevelParameterfv) - INIT_GLES_FUNC(glBindVertexBuffer) - INIT_GLES_FUNC(glVertexAttribFormat) - INIT_GLES_FUNC(glVertexAttribIFormat) - INIT_GLES_FUNC(glVertexAttribBinding) - INIT_GLES_FUNC(glVertexBindingDivisor) - INIT_GLES_FUNC(glBlendBarrier) - INIT_GLES_FUNC(glCopyImageSubData) - INIT_GLES_FUNC(glDebugMessageControl) - INIT_GLES_FUNC(glDebugMessageInsert) - INIT_GLES_FUNC(glDebugMessageCallback) - INIT_GLES_FUNC(glGetDebugMessageLog) - INIT_GLES_FUNC(glPushDebugGroup) - INIT_GLES_FUNC(glPopDebugGroup) - INIT_GLES_FUNC(glObjectLabel) - INIT_GLES_FUNC(glGetObjectLabel) - INIT_GLES_FUNC(glObjectPtrLabel) - INIT_GLES_FUNC(glGetObjectPtrLabel) - INIT_GLES_FUNC(glGetPointerv) - INIT_GLES_FUNC(glEnablei) - INIT_GLES_FUNC(glDisablei) - INIT_GLES_FUNC(glBlendEquationi) - INIT_GLES_FUNC(glBlendEquationSeparatei) - INIT_GLES_FUNC(glBlendFunci) - INIT_GLES_FUNC(glBlendFuncSeparatei) - INIT_GLES_FUNC(glColorMaski) - INIT_GLES_FUNC(glIsEnabledi) - INIT_GLES_FUNC(glDrawElementsBaseVertex) - INIT_GLES_FUNC(glDrawRangeElementsBaseVertex) - INIT_GLES_FUNC(glDrawElementsInstancedBaseVertex) - INIT_GLES_FUNC(glFramebufferTexture) - INIT_GLES_FUNC(glPrimitiveBoundingBox) - INIT_GLES_FUNC(glGetGraphicsResetStatus) - INIT_GLES_FUNC(glReadnPixels) - INIT_GLES_FUNC(glGetnUniformfv) - INIT_GLES_FUNC(glGetnUniformiv) - INIT_GLES_FUNC(glGetnUniformuiv) - INIT_GLES_FUNC(glMinSampleShading) - INIT_GLES_FUNC(glPatchParameteri) - INIT_GLES_FUNC(glTexParameterIiv) - INIT_GLES_FUNC(glTexParameterIuiv) - INIT_GLES_FUNC(glGetTexParameterIiv) - INIT_GLES_FUNC(glGetTexParameterIuiv) - INIT_GLES_FUNC(glSamplerParameterIiv) - INIT_GLES_FUNC(glSamplerParameterIuiv) - INIT_GLES_FUNC(glGetSamplerParameterIiv) - INIT_GLES_FUNC(glGetSamplerParameterIuiv) - INIT_GLES_FUNC(glTexBuffer) - INIT_GLES_FUNC(glTexBufferRange) - INIT_GLES_FUNC(glTexStorage3DMultisample) - INIT_GLES_FUNC(glMapBufferRange) - INIT_GLES_FUNC(glBufferStorageEXT) - INIT_GLES_FUNC(glGetQueryObjectivEXT) - INIT_GLES_FUNC(glGetQueryObjecti64vEXT) - INIT_GLES_FUNC(glBindFragDataLocationEXT) - INIT_GLES_FUNC(glMapBufferOES) - - INIT_GLES_FUNC(glMultiDrawArraysIndirectEXT) - INIT_GLES_FUNC(glMultiDrawElementsIndirectEXT) - INIT_GLES_FUNC(glMultiDrawElementsBaseVertexEXT) - - MG_Util::Debug::LogD("glMultiDrawArraysIndirectEXT() @ 0x%x", GLES::glMultiDrawArraysIndirectEXT); - MG_Util::Debug::LogD("glMultiDrawElementsIndirectEXT() @ 0x%x", GLES::glMultiDrawElementsIndirectEXT); - MG_Util::Debug::LogD("glMultiDrawElementsBaseVertexEXT() @ 0x%x", GLES::glMultiDrawElementsBaseVertexEXT); - - InitGLESCapabilities(); - LogOpenGLExtensions(); - } - - static EGLDisplay eglDisplay = EGL_NO_DISPLAY; - static EGLSurface eglSurface = EGL_NO_SURFACE; - static EGLContext eglContext = EGL_NO_CONTEXT; - -#define LOAD_EGL(name) \ -static EGL::name##_PTR egl_##name = NULL; \ -{ \ - static bool first = true; \ - if (first) { \ - first = false; \ - if (libEGL != NULL) { \ - egl_##name = (EGL::name##_PTR)ProcAddress(libEGL, #name); \ - } \ - } \ -} - - void InitEGL() { - LOAD_EGL(eglGetProcAddress) - LOAD_EGL(eglBindAPI) - LOAD_EGL(eglInitialize) - LOAD_EGL(eglGetDisplay) - LOAD_EGL(eglCreatePbufferSurface) - LOAD_EGL(eglDestroySurface) - LOAD_EGL(eglDestroyContext) - LOAD_EGL(eglMakeCurrent) - LOAD_EGL(eglChooseConfig) - LOAD_EGL(eglCreateContext) - LOAD_EGL(eglQueryString) - LOAD_EGL(eglTerminate) - LOAD_EGL(eglGetError) - - - EGLint configAttribs[] = { - EGL_RED_SIZE, 8, - EGL_GREEN_SIZE, 8, - EGL_BLUE_SIZE, 8, - EGL_ALPHA_SIZE, 8, - EGL_SURFACE_TYPE, EGL_PBUFFER_BIT, - EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT, - EGL_NONE - }; - - EGLint ctxAttribs[] = { EGL_CONTEXT_CLIENT_VERSION, 2, EGL_NONE }; - - EGLint pbAttribs[] = { EGL_WIDTH, 32, EGL_HEIGHT, 32, EGL_NONE }; - - EGLConfig pbufConfig; - EGLint configsFound = 0; - - eglDisplay = egl_eglGetDisplay(EGL_DEFAULT_DISPLAY); - if (eglDisplay == EGL_NO_DISPLAY) { - MG_Util::Debug::LogE("eglGetDisplay failed (0x%x)", egl_eglGetError()); - goto cleanup; - } - - if (egl_eglInitialize(eglDisplay, NULL, NULL) != EGL_TRUE) { - MG_Util::Debug::LogE("eglInitialize failed (0x%x)", egl_eglGetError()); - goto cleanup; - } - - if (egl_eglBindAPI(EGL_OPENGL_ES_API) != EGL_TRUE) { - MG_Util::Debug::LogE("eglBindAPI failed (0x%x)", egl_eglGetError()); - goto cleanup; - } - - if (egl_eglChooseConfig(eglDisplay, configAttribs, &pbufConfig, 1, &configsFound) != EGL_TRUE) { - MG_Util::Debug::LogE("eglChooseConfig failed (0x%x)", egl_eglGetError()); - goto cleanup; - } - - if (configsFound == 0) { - configAttribs[6] = 0; - if (egl_eglChooseConfig(eglDisplay, configAttribs, &pbufConfig, 1, &configsFound) != EGL_TRUE) { - MG_Util::Debug::LogE("Retry eglChooseConfig failed (0x%x)", egl_eglGetError()); - goto cleanup; - } - if (configsFound) { - MG_Util::Debug::LogD("Using config without alpha channel"); - } else { - MG_Util::Debug::LogE("No valid EGL config found"); - goto cleanup; - } - } - - eglContext = egl_eglCreateContext(eglDisplay, pbufConfig, EGL_NO_CONTEXT, ctxAttribs); - if (eglContext == EGL_NO_CONTEXT) { - MG_Util::Debug::LogE("eglCreateContext failed (0x%x)", egl_eglGetError()); - goto cleanup; - } - - eglSurface = egl_eglCreatePbufferSurface(eglDisplay, pbufConfig, pbAttribs); - if (eglSurface == EGL_NO_SURFACE) { - MG_Util::Debug::LogE("eglCreatePbufferSurface failed (0x%x)", egl_eglGetError()); - goto cleanup; - } - - if (egl_eglMakeCurrent(eglDisplay, eglSurface, eglSurface, eglContext) != EGL_TRUE) { - MG_Util::Debug::LogE("eglMakeCurrent failed (0x%x)", egl_eglGetError()); - goto cleanup; - } - - MG_Util::Debug::LogD("EGL initialized successfully"); - return; - - cleanup: - if (eglSurface != EGL_NO_SURFACE) { - egl_eglDestroySurface(eglDisplay, eglSurface); - } - if (eglContext != EGL_NO_CONTEXT) { - egl_eglDestroyContext(eglDisplay, eglContext); - } - if (eglDisplay != EGL_NO_DISPLAY) { - egl_eglTerminate(eglDisplay); - } - MG_Util::Debug::LogE("EGL initialization failed"); - } - - void DestroyTempEGLCtx() { - LOAD_EGL(eglDestroySurface) - LOAD_EGL(eglDestroyContext) - LOAD_EGL(eglMakeCurrent) - LOAD_EGL(eglTerminate) - - egl_eglMakeCurrent(eglDisplay, 0, 0, EGL_NO_CONTEXT); - egl_eglDestroySurface(eglDisplay, eglSurface); - egl_eglDestroyContext(eglDisplay, eglContext); - - egl_eglTerminate(eglDisplay); - } - -#undef LOAD_EGL - -} - -#endif \ No newline at end of file diff --git a/MG/MG_GL/BackendLoader/GLES/Loader.h b/MG/MG_GL/BackendLoader/GLES/Loader.h deleted file mode 100644 index 4d4ff4e7..00000000 --- a/MG/MG_GL/BackendLoader/GLES/Loader.h +++ /dev/null @@ -1,1024 +0,0 @@ -// -// Created by BZLZHH on 2025/4/26. -// - -#ifndef MOBILEGL_GLES_LOADER_H -#define MOBILEGL_GLES_LOADER_H - -#if BACKEND_TYPE == BACKEND_GLES - -#define APIENTRY_GLES - -#define GL_FUNC_TYPEDEF(type,name,...) \ - typedef type (APIENTRY_GLES *name##_PTR)(__VA_ARGS__); - -GL_FUNC_TYPEDEF(void, glActiveTexture, GLenum texture) -GL_FUNC_TYPEDEF(void, glAttachShader, GLuint program, GLuint shader) -GL_FUNC_TYPEDEF(void, glBindAttribLocation, GLuint program, GLuint index, const GLchar *name) -GL_FUNC_TYPEDEF(void, glBindBuffer, GLenum target, GLuint buffer) -GL_FUNC_TYPEDEF(void, glBindFramebuffer, GLenum target, GLuint framebuffer) -GL_FUNC_TYPEDEF(void, glBindRenderbuffer, GLenum target, GLuint renderbuffer) -GL_FUNC_TYPEDEF(void, glBindTexture, GLenum target, GLuint texture) -GL_FUNC_TYPEDEF(void, glBlendColor, GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) -GL_FUNC_TYPEDEF(void, glBlendEquation, GLenum mode) -GL_FUNC_TYPEDEF(void, glBlendEquationSeparate, GLenum modeRGB, GLenum modeAlpha) -GL_FUNC_TYPEDEF(void, glBlendFunc, GLenum sfactor, GLenum dfactor) -GL_FUNC_TYPEDEF(void, glBlendFuncSeparate, GLenum sfactorRGB, GLenum dfactorRGB, - GLenum sfactorAlpha, GLenum dfactorAlpha) -GL_FUNC_TYPEDEF(void, glBufferData, GLenum target, GLsizeiptr size, const void *data, GLenum usage) -GL_FUNC_TYPEDEF(void, glBufferSubData, GLenum target, GLintptr offset, GLsizeiptr size, - const void *data) -GL_FUNC_TYPEDEF(GLenum, glCheckFramebufferStatus, GLenum target) -GL_FUNC_TYPEDEF(void, glClear, GLbitfield mask) -GL_FUNC_TYPEDEF(void, glClearColor, GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) -GL_FUNC_TYPEDEF(void, glClearDepthf, GLfloat d) -GL_FUNC_TYPEDEF(void, glClearStencil, GLint s) -GL_FUNC_TYPEDEF(void, glColorMask, GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) -GL_FUNC_TYPEDEF(void, glCompileShader, GLuint shader) -GL_FUNC_TYPEDEF(void, glCompressedTexImage2D, GLenum target, GLint level, GLenum internalformat, - GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data) -GL_FUNC_TYPEDEF(void, glCompressedTexSubImage2D, GLenum target, GLint level, GLint xoffset, - GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, - const void *data) -GL_FUNC_TYPEDEF(void, glCopyTexImage2D, GLenum target, GLint level, GLenum internalformat, GLint x, - GLint y, GLsizei width, GLsizei height, GLint border) -GL_FUNC_TYPEDEF(void, glCopyTexSubImage2D, GLenum target, GLint level, GLint xoffset, GLint yoffset, - GLint x, GLint y, GLsizei width, GLsizei height) -GL_FUNC_TYPEDEF(GLuint, glCreateProgram) -GL_FUNC_TYPEDEF(GLuint, glCreateShader, GLenum type) -GL_FUNC_TYPEDEF(void, glCullFace, GLenum mode) -GL_FUNC_TYPEDEF(void, glDeleteBuffers, GLsizei n, const GLuint *buffers) -GL_FUNC_TYPEDEF(void, glDeleteFramebuffers, GLsizei n, const GLuint *framebuffers) -GL_FUNC_TYPEDEF(void, glDeleteProgram, GLuint program) -GL_FUNC_TYPEDEF(void, glDeleteRenderbuffers, GLsizei n, const GLuint *renderbuffers) -GL_FUNC_TYPEDEF(void, glDeleteShader, GLuint shader) -GL_FUNC_TYPEDEF(void, glDeleteTextures, GLsizei n, const GLuint *textures) -GL_FUNC_TYPEDEF(void, glDepthFunc, GLenum func) -GL_FUNC_TYPEDEF(void, glDepthMask, GLboolean flag) -GL_FUNC_TYPEDEF(void, glDepthRangef, GLfloat n, GLfloat f) -GL_FUNC_TYPEDEF(void, glDetachShader, GLuint program, GLuint shader) -GL_FUNC_TYPEDEF(void, glDisable, GLenum cap) -GL_FUNC_TYPEDEF(void, glDisableVertexAttribArray, GLuint index) -GL_FUNC_TYPEDEF(void, glDrawArrays, GLenum mode, GLint first, GLsizei count) -GL_FUNC_TYPEDEF(void, glDrawElements, GLenum mode, GLsizei count, GLenum type, const void *indices) -GL_FUNC_TYPEDEF(void, glEnable, GLenum cap) -GL_FUNC_TYPEDEF(void, glEnableVertexAttribArray, GLuint index) -GL_FUNC_TYPEDEF(void, glFinish) -GL_FUNC_TYPEDEF(void, glFlush) -GL_FUNC_TYPEDEF(void, glFramebufferRenderbuffer, GLenum target, GLenum attachment, - GLenum renderbuffertarget, GLuint renderbuffer) -GL_FUNC_TYPEDEF(void, glFramebufferTexture2D, GLenum target, GLenum attachment, GLenum textarget, - GLuint texture, GLint level) -GL_FUNC_TYPEDEF(void, glFrontFace, GLenum mode) -GL_FUNC_TYPEDEF(void, glGenBuffers, GLsizei n, GLuint *buffers) -GL_FUNC_TYPEDEF(void, glGenerateMipmap, GLenum target) -GL_FUNC_TYPEDEF(void, glGenFramebuffers, GLsizei n, GLuint *framebuffers) -GL_FUNC_TYPEDEF(void, glGenRenderbuffers, GLsizei n, GLuint *renderbuffers) -GL_FUNC_TYPEDEF(void, glGenTextures, GLsizei n, GLuint *textures) -GL_FUNC_TYPEDEF(void, glGetActiveAttrib, GLuint program, GLuint index, GLsizei bufSize, - GLsizei *length, GLint *size, GLenum *type, GLchar *name) -GL_FUNC_TYPEDEF(void, glGetActiveUniform, GLuint program, GLuint index, GLsizei bufSize, - GLsizei *length, GLint *size, GLenum *type, GLchar *name) -GL_FUNC_TYPEDEF(void, glGetAttachedShaders, GLuint program, GLsizei maxCount, GLsizei *count, - GLuint *shaders) -GL_FUNC_TYPEDEF(GLint, glGetAttribLocation, GLuint program, const GLchar *name) -GL_FUNC_TYPEDEF(void, glGetBooleanv, GLenum pname, GLboolean *data) -GL_FUNC_TYPEDEF(void, glGetBufferParameteriv, GLenum target, GLenum pname, GLint *params) -GL_FUNC_TYPEDEF(GLenum, glGetError) -GL_FUNC_TYPEDEF(const GLubyte *, glGetString, GLenum) -GL_FUNC_TYPEDEF(const GLubyte *, glGetStringi, GLenum, GLuint) -GL_FUNC_TYPEDEF(void, glGetFloatv, GLenum pname, GLfloat *data) -GL_FUNC_TYPEDEF(void, glGetFramebufferAttachmentParameteriv, GLenum target, GLenum attachment, - GLenum pname, GLint *params) -GL_FUNC_TYPEDEF(void, glGetIntegerv, GLenum pname, GLint *data) -GL_FUNC_TYPEDEF(void, glGetProgramiv, GLuint program, GLenum pname, GLint *params) -GL_FUNC_TYPEDEF(void, glGetProgramInfoLog, GLuint program, GLsizei bufSize, GLsizei *length, - GLchar *infoLog) -GL_FUNC_TYPEDEF(void, glGetRenderbufferParameteriv, GLenum target, GLenum pname, GLint *params) -GL_FUNC_TYPEDEF(void, glGetShaderiv, GLuint shader, GLenum pname, GLint *params) -GL_FUNC_TYPEDEF(void, glGetShaderInfoLog, GLuint shader, GLsizei bufSize, GLsizei *length, - GLchar *infoLog) -GL_FUNC_TYPEDEF(void, glGetShaderPrecisionFormat, GLenum shadertype, GLenum precisiontype, - GLint *range, GLint *precision) -GL_FUNC_TYPEDEF(void, glGetShaderSource, GLuint shader, GLsizei bufSize, GLsizei *length, - GLchar *source) -GL_FUNC_TYPEDEF(void, glGetTexParameterfv, GLenum target, GLenum pname, GLfloat *params) -GL_FUNC_TYPEDEF(void, glGetTexParameteriv, GLenum target, GLenum pname, GLint *params) -GL_FUNC_TYPEDEF(void, glGetUniformfv, GLuint program, GLint location, GLfloat *params) -GL_FUNC_TYPEDEF(void, glGetUniformiv, GLuint program, GLint location, GLint *params) -GL_FUNC_TYPEDEF(GLint, glGetUniformLocation, GLuint program, const GLchar *name) -GL_FUNC_TYPEDEF(void, glGetVertexAttribfv, GLuint index, GLenum pname, GLfloat *params) -GL_FUNC_TYPEDEF(void, glGetVertexAttribiv, GLuint index, GLenum pname, GLint *params) -GL_FUNC_TYPEDEF(void, glGetVertexAttribPointerv, GLuint index, GLenum pname, void **pointer) -GL_FUNC_TYPEDEF(void, glHint, GLenum target, GLenum mode) -GL_FUNC_TYPEDEF(GLboolean, glIsBuffer, GLuint buffer) -GL_FUNC_TYPEDEF(GLboolean, glIsEnabled, GLenum cap) -GL_FUNC_TYPEDEF(GLboolean, glIsFramebuffer, GLuint framebuffer) -GL_FUNC_TYPEDEF(GLboolean, glIsProgram, GLuint program) -GL_FUNC_TYPEDEF(GLboolean, glIsRenderbuffer, GLuint renderbuffer) -GL_FUNC_TYPEDEF(GLboolean, glIsShader, GLuint shader) -GL_FUNC_TYPEDEF(GLboolean, glIsTexture, GLuint texture) -GL_FUNC_TYPEDEF(void, glLineWidth, GLfloat width) -GL_FUNC_TYPEDEF(void, glLinkProgram, GLuint program) -GL_FUNC_TYPEDEF(void, glPixelStorei, GLenum pname, GLint param) -GL_FUNC_TYPEDEF(void, glPolygonOffset, GLfloat factor, GLfloat units) -GL_FUNC_TYPEDEF(void, glReadPixels, GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, - GLenum type, void *pixels) -GL_FUNC_TYPEDEF(void, glReleaseShaderCompiler) -GL_FUNC_TYPEDEF(void, glRenderbufferStorage, GLenum target, GLenum internalformat, GLsizei width, - GLsizei height) -GL_FUNC_TYPEDEF(void, glSampleCoverage, GLfloat value, GLboolean invert) -GL_FUNC_TYPEDEF(void, glScissor, GLint x, GLint y, GLsizei width, GLsizei height) -GL_FUNC_TYPEDEF(void, glShaderBinary, GLsizei count, const GLuint *shaders, GLenum binaryformat, - const void *binary, GLsizei length) -GL_FUNC_TYPEDEF(void, glShaderSource, GLuint shader, GLsizei count, const GLchar *const *string, - const GLint *length) -GL_FUNC_TYPEDEF(void, glStencilFunc, GLenum func, GLint ref, GLuint mask) -GL_FUNC_TYPEDEF(void, glStencilFuncSeparate, GLenum face, GLenum func, GLint ref, GLuint mask) -GL_FUNC_TYPEDEF(void, glStencilMask, GLuint mask) -GL_FUNC_TYPEDEF(void, glStencilMaskSeparate, GLenum face, GLuint mask) -GL_FUNC_TYPEDEF(void, glStencilOp, GLenum fail, GLenum zfail, GLenum zpass) -GL_FUNC_TYPEDEF(void, glStencilOpSeparate, GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass) -GL_FUNC_TYPEDEF(void, glTexImage2D, GLenum target, GLint level, GLint internalformat, GLsizei width, - GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels) -GL_FUNC_TYPEDEF(void, glTexParameterf, GLenum target, GLenum pname, GLfloat param) -GL_FUNC_TYPEDEF(void, glTexParameterfv, GLenum target, GLenum pname, const GLfloat *params) -GL_FUNC_TYPEDEF(void, glTexParameteri, GLenum target, GLenum pname, GLint param) -GL_FUNC_TYPEDEF(void, glTexParameteriv, GLenum target, GLenum pname, const GLint *params) -GL_FUNC_TYPEDEF(void, glTexSubImage2D, GLenum target, GLint level, GLint xoffset, GLint yoffset, - GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels) -GL_FUNC_TYPEDEF(void, glUniform1f, GLint location, GLfloat v0) -GL_FUNC_TYPEDEF(void, glUniform1fv, GLint location, GLsizei count, const GLfloat *value) -GL_FUNC_TYPEDEF(void, glUniform1i, GLint location, GLint v0) -GL_FUNC_TYPEDEF(void, glUniform1iv, GLint location, GLsizei count, const GLint *value) -GL_FUNC_TYPEDEF(void, glUniform2f, GLint location, GLfloat v0, GLfloat v1) -GL_FUNC_TYPEDEF(void, glUniform2fv, GLint location, GLsizei count, const GLfloat *value) -GL_FUNC_TYPEDEF(void, glUniform2i, GLint location, GLint v0, GLint v1) -GL_FUNC_TYPEDEF(void, glUniform2iv, GLint location, GLsizei count, const GLint *value) -GL_FUNC_TYPEDEF(void, glUniform3f, GLint location, GLfloat v0, GLfloat v1, GLfloat v2) -GL_FUNC_TYPEDEF(void, glUniform3fv, GLint location, GLsizei count, const GLfloat *value) -GL_FUNC_TYPEDEF(void, glUniform3i, GLint location, GLint v0, GLint v1, GLint v2) -GL_FUNC_TYPEDEF(void, glUniform3iv, GLint location, GLsizei count, const GLint *value) -GL_FUNC_TYPEDEF(void, glUniform4f, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3) -GL_FUNC_TYPEDEF(void, glUniform4fv, GLint location, GLsizei count, const GLfloat *value) -GL_FUNC_TYPEDEF(void, glUniform4i, GLint location, GLint v0, GLint v1, GLint v2, GLint v3) -GL_FUNC_TYPEDEF(void, glUniform4iv, GLint location, GLsizei count, const GLint *value) -GL_FUNC_TYPEDEF(void, glUniformMatrix2fv, GLint location, GLsizei count, GLboolean transpose, - const GLfloat *value) -GL_FUNC_TYPEDEF(void, glUniformMatrix3fv, GLint location, GLsizei count, GLboolean transpose, - const GLfloat *value) -GL_FUNC_TYPEDEF(void, glUniformMatrix4fv, GLint location, GLsizei count, GLboolean transpose, - const GLfloat *value) -GL_FUNC_TYPEDEF(void, glUseProgram, GLuint program) -GL_FUNC_TYPEDEF(void, glValidateProgram, GLuint program) -GL_FUNC_TYPEDEF(void, glVertexAttrib1f, GLuint index, GLfloat x) -GL_FUNC_TYPEDEF(void, glVertexAttrib1fv, GLuint index, const GLfloat *v) -GL_FUNC_TYPEDEF(void, glVertexAttrib2f, GLuint index, GLfloat x, GLfloat y) -GL_FUNC_TYPEDEF(void, glVertexAttrib2fv, GLuint index, const GLfloat *v) -GL_FUNC_TYPEDEF(void, glVertexAttrib3f, GLuint index, GLfloat x, GLfloat y, GLfloat z) -GL_FUNC_TYPEDEF(void, glVertexAttrib3fv, GLuint index, const GLfloat *v) -GL_FUNC_TYPEDEF(void, glVertexAttrib4f, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w) -GL_FUNC_TYPEDEF(void, glVertexAttrib4fv, GLuint index, const GLfloat *v) -GL_FUNC_TYPEDEF(void, glVertexAttribPointer, GLuint index, GLint size, GLenum type, - GLboolean normalized, GLsizei stride, const void *pointer) -GL_FUNC_TYPEDEF(void, glViewport, GLint x, GLint y, GLsizei width, GLsizei height) -GL_FUNC_TYPEDEF(void, glReadBuffer, GLenum src) -GL_FUNC_TYPEDEF(void, glDrawRangeElements, GLenum mode, GLuint start, GLuint end, GLsizei count, - GLenum type, const void *indices) -GL_FUNC_TYPEDEF(void, glTexImage3D, GLenum target, GLint level, GLint internalformat, GLsizei width, - GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, - const void *pixels) -GL_FUNC_TYPEDEF(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) -GL_FUNC_TYPEDEF(void, glCopyTexSubImage3D, GLenum target, GLint level, GLint xoffset, GLint yoffset, - GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height) -GL_FUNC_TYPEDEF(void, glCompressedTexImage3D, GLenum target, GLint level, GLenum internalformat, - GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, - const void *data) -GL_FUNC_TYPEDEF(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) -GL_FUNC_TYPEDEF(void, glGenQueries, GLsizei n, GLuint *ids) -GL_FUNC_TYPEDEF(void, glDeleteQueries, GLsizei n, const GLuint *ids) -GL_FUNC_TYPEDEF(GLboolean, glIsQuery, GLuint id) -GL_FUNC_TYPEDEF(void, glBeginQuery, GLenum target, GLuint id) -GL_FUNC_TYPEDEF(void, glEndQuery, GLenum target) -GL_FUNC_TYPEDEF(void, glGetQueryiv, GLenum target, GLenum pname, GLint *params) -GL_FUNC_TYPEDEF(void, glGetQueryObjectuiv, GLuint id, GLenum pname, GLuint *params) -GL_FUNC_TYPEDEF(GLboolean, glUnmapBuffer, GLenum target) -GL_FUNC_TYPEDEF(void, glGetBufferPointerv, GLenum target, GLenum pname, void **params) -GL_FUNC_TYPEDEF(void, glDrawBuffers, GLsizei n, const GLenum *bufs) -GL_FUNC_TYPEDEF(void, glUniformMatrix2x3fv, GLint location, GLsizei count, GLboolean transpose, - const GLfloat *value) -GL_FUNC_TYPEDEF(void, glUniformMatrix3x2fv, GLint location, GLsizei count, GLboolean transpose, - const GLfloat *value) -GL_FUNC_TYPEDEF(void, glUniformMatrix2x4fv, GLint location, GLsizei count, GLboolean transpose, - const GLfloat *value) -GL_FUNC_TYPEDEF(void, glUniformMatrix4x2fv, GLint location, GLsizei count, GLboolean transpose, - const GLfloat *value) -GL_FUNC_TYPEDEF(void, glUniformMatrix3x4fv, GLint location, GLsizei count, GLboolean transpose, - const GLfloat *value) -GL_FUNC_TYPEDEF(void, glUniformMatrix4x3fv, GLint location, GLsizei count, GLboolean transpose, - const GLfloat *value) -GL_FUNC_TYPEDEF(void, glBlitFramebuffer, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, - GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter) -GL_FUNC_TYPEDEF(void, glRenderbufferStorageMultisample, GLenum target, GLsizei samples, - GLenum internalformat, GLsizei width, GLsizei height) -GL_FUNC_TYPEDEF(void, glFramebufferTextureLayer, GLenum target, GLenum attachment, GLuint texture, - GLint level, GLint layer) -GL_FUNC_TYPEDEF(void, glFlushMappedBufferRange, GLenum target, GLintptr offset, GLsizeiptr length) -GL_FUNC_TYPEDEF(void, glBindVertexArray, GLuint array) -GL_FUNC_TYPEDEF(void, glDeleteVertexArrays, GLsizei n, const GLuint *arrays) -GL_FUNC_TYPEDEF(void, glGenVertexArrays, GLsizei n, GLuint *arrays) -GL_FUNC_TYPEDEF(GLboolean, glIsVertexArray, GLuint array) -GL_FUNC_TYPEDEF(void, glGetIntegeri_v, GLenum target, GLuint index, GLint *data) -GL_FUNC_TYPEDEF(void, glBeginTransformFeedback, GLenum primitiveMode) -GL_FUNC_TYPEDEF(void, glEndTransformFeedback) -GL_FUNC_TYPEDEF(void, glBindBufferRange, GLenum target, GLuint index, GLuint buffer, - GLintptr offset, GLsizeiptr size) -GL_FUNC_TYPEDEF(void, glBindBufferBase, GLenum target, GLuint index, GLuint buffer) -GL_FUNC_TYPEDEF(void, glTransformFeedbackVaryings, GLuint program, GLsizei count, - const GLchar *const *varyings, GLenum bufferMode) -GL_FUNC_TYPEDEF(void, glGetTransformFeedbackVarying, GLuint program, GLuint index, GLsizei bufSize, - GLsizei *length, GLsizei *size, GLenum *type, GLchar *name) -GL_FUNC_TYPEDEF(void, glVertexAttribIPointer, GLuint index, GLint size, GLenum type, GLsizei stride, - const void *pointer) -GL_FUNC_TYPEDEF(void, glGetVertexAttribIiv, GLuint index, GLenum pname, GLint *params) -GL_FUNC_TYPEDEF(void, glGetVertexAttribIuiv, GLuint index, GLenum pname, GLuint *params) -GL_FUNC_TYPEDEF(void, glVertexAttribI4i, GLuint index, GLint x, GLint y, GLint z, GLint w) -GL_FUNC_TYPEDEF(void, glVertexAttribI4ui, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w) -GL_FUNC_TYPEDEF(void, glVertexAttribI4iv, GLuint index, const GLint *v) -GL_FUNC_TYPEDEF(void, glVertexAttribI4uiv, GLuint index, const GLuint *v) -GL_FUNC_TYPEDEF(void, glGetUniformuiv, GLuint program, GLint location, GLuint *params) -GL_FUNC_TYPEDEF(GLint, glGetFragDataLocation, GLuint program, const GLchar *name) -GL_FUNC_TYPEDEF(void, glUniform1ui, GLint location, GLuint v0) -GL_FUNC_TYPEDEF(void, glUniform2ui, GLint location, GLuint v0, GLuint v1) -GL_FUNC_TYPEDEF(void, glUniform3ui, GLint location, GLuint v0, GLuint v1, GLuint v2) -GL_FUNC_TYPEDEF(void, glUniform4ui, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3) -GL_FUNC_TYPEDEF(void, glUniform1uiv, GLint location, GLsizei count, const GLuint *value) -GL_FUNC_TYPEDEF(void, glUniform2uiv, GLint location, GLsizei count, const GLuint *value) -GL_FUNC_TYPEDEF(void, glUniform3uiv, GLint location, GLsizei count, const GLuint *value) -GL_FUNC_TYPEDEF(void, glUniform4uiv, GLint location, GLsizei count, const GLuint *value) -GL_FUNC_TYPEDEF(void, glClearBufferiv, GLenum buffer, GLint drawbuffer, const GLint *value) -GL_FUNC_TYPEDEF(void, glClearBufferuiv, GLenum buffer, GLint drawbuffer, const GLuint *value) -GL_FUNC_TYPEDEF(void, glClearBufferfv, GLenum buffer, GLint drawbuffer, const GLfloat *value) -GL_FUNC_TYPEDEF(void, glClearBufferfi, GLenum buffer, GLint drawbuffer, GLfloat depth, - GLint stencil) -GL_FUNC_TYPEDEF(void, glCopyBufferSubData, GLenum readTarget, GLenum writeTarget, - GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size) -GL_FUNC_TYPEDEF(void, glGetUniformIndices, GLuint program, GLsizei uniformCount, - const GLchar *const *uniformNames, GLuint *uniformIndices) -GL_FUNC_TYPEDEF(void, glGetActiveUniformsiv, GLuint program, GLsizei uniformCount, - const GLuint *uniformIndices, GLenum pname, GLint *params) -GL_FUNC_TYPEDEF(GLuint, glGetUniformBlockIndex, GLuint program, const GLchar *uniformBlockName) -GL_FUNC_TYPEDEF(void, glGetActiveUniformBlockiv, GLuint program, GLuint uniformBlockIndex, - GLenum pname, GLint *params) -GL_FUNC_TYPEDEF(void, glGetActiveUniformBlockName, GLuint program, GLuint uniformBlockIndex, - GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName) -GL_FUNC_TYPEDEF(void, glUniformBlockBinding, GLuint program, GLuint uniformBlockIndex, - GLuint uniformBlockBinding) -GL_FUNC_TYPEDEF(void, glDrawArraysInstanced, GLenum mode, GLint first, GLsizei count, - GLsizei instancecount) -GL_FUNC_TYPEDEF(void, glDrawElementsInstanced, GLenum mode, GLsizei count, GLenum type, - const void *indices, GLsizei instancecount) -GL_FUNC_TYPEDEF(GLsync, glFenceSync, GLenum condition, GLbitfield flags) -GL_FUNC_TYPEDEF(GLboolean, glIsSync, GLsync sync) -GL_FUNC_TYPEDEF(void, glDeleteSync, GLsync sync) -GL_FUNC_TYPEDEF(GLenum, glClientWaitSync, GLsync sync, GLbitfield flags, GLuint64 timeout) -GL_FUNC_TYPEDEF(void, glWaitSync, GLsync sync, GLbitfield flags, GLuint64 timeout) -GL_FUNC_TYPEDEF(void, glGetInteger64v, GLenum pname, GLint64 *data) -GL_FUNC_TYPEDEF(void, glGetSynciv, GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, - GLint *values) -GL_FUNC_TYPEDEF(void, glGetInteger64i_v, GLenum target, GLuint index, GLint64 *data) -GL_FUNC_TYPEDEF(void, glGetBufferParameteri64v, GLenum target, GLenum pname, GLint64 *params) -GL_FUNC_TYPEDEF(void, glGenSamplers, GLsizei count, GLuint *samplers) -GL_FUNC_TYPEDEF(void, glDeleteSamplers, GLsizei count, const GLuint *samplers) -GL_FUNC_TYPEDEF(GLboolean, glIsSampler, GLuint sampler) -GL_FUNC_TYPEDEF(void, glBindSampler, GLuint unit, GLuint sampler) -GL_FUNC_TYPEDEF(void, glSamplerParameteri, GLuint sampler, GLenum pname, GLint param) -GL_FUNC_TYPEDEF(void, glSamplerParameteriv, GLuint sampler, GLenum pname, const GLint *param) -GL_FUNC_TYPEDEF(void, glSamplerParameterf, GLuint sampler, GLenum pname, GLfloat param) -GL_FUNC_TYPEDEF(void, glSamplerParameterfv, GLuint sampler, GLenum pname, const GLfloat *param) -GL_FUNC_TYPEDEF(void, glGetSamplerParameteriv, GLuint sampler, GLenum pname, GLint *params) -GL_FUNC_TYPEDEF(void, glGetSamplerParameterfv, GLuint sampler, GLenum pname, GLfloat *params) -GL_FUNC_TYPEDEF(void, glVertexAttribDivisor, GLuint index, GLuint divisor) -GL_FUNC_TYPEDEF(void, glBindTransformFeedback, GLenum target, GLuint id) -GL_FUNC_TYPEDEF(void, glDeleteTransformFeedbacks, GLsizei n, const GLuint *ids) -GL_FUNC_TYPEDEF(void, glGenTransformFeedbacks, GLsizei n, GLuint *ids) -GL_FUNC_TYPEDEF(GLboolean, glIsTransformFeedback, GLuint id) -GL_FUNC_TYPEDEF(void, glPauseTransformFeedback) -GL_FUNC_TYPEDEF(void, glResumeTransformFeedback) -GL_FUNC_TYPEDEF(void, glGetProgramBinary, GLuint program, GLsizei bufSize, GLsizei *length, - GLenum *binaryFormat, void *binary) -GL_FUNC_TYPEDEF(void, glProgramBinary, GLuint program, GLenum binaryFormat, const void *binary, - GLsizei length) -GL_FUNC_TYPEDEF(void, glProgramParameteri, GLuint program, GLenum pname, GLint value) -GL_FUNC_TYPEDEF(void, glInvalidateFramebuffer, GLenum target, GLsizei numAttachments, - const GLenum *attachments) -GL_FUNC_TYPEDEF(void, glInvalidateSubFramebuffer, GLenum target, GLsizei numAttachments, - const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height) -GL_FUNC_TYPEDEF(void, glTexStorage2D, GLenum target, GLsizei levels, GLenum internalformat, - GLsizei width, GLsizei height) -GL_FUNC_TYPEDEF(void, glTexStorage3D, GLenum target, GLsizei levels, GLenum internalformat, - GLsizei width, GLsizei height, GLsizei depth) -GL_FUNC_TYPEDEF(void, glGetInternalformativ, GLenum target, GLenum internalformat, GLenum pname, - GLsizei bufSize, GLint *params) -GL_FUNC_TYPEDEF(void, glDispatchCompute, GLuint num_groups_x, GLuint num_groups_y, - GLuint num_groups_z) -GL_FUNC_TYPEDEF(void, glDispatchComputeIndirect, GLintptr indirect) -GL_FUNC_TYPEDEF(void, glDrawArraysIndirect, GLenum mode, const void *indirect) -GL_FUNC_TYPEDEF(void, glDrawElementsIndirect, GLenum mode, GLenum type, const void *indirect) -GL_FUNC_TYPEDEF(void, glFramebufferParameteri, GLenum target, GLenum pname, GLint param) -GL_FUNC_TYPEDEF(void, glGetFramebufferParameteriv, GLenum target, GLenum pname, GLint *params) -GL_FUNC_TYPEDEF(void, glGetProgramInterfaceiv, GLuint program, GLenum programInterface, - GLenum pname, GLint *params) -GL_FUNC_TYPEDEF(GLuint, glGetProgramResourceIndex, GLuint program, GLenum programInterface, - const GLchar *name) -GL_FUNC_TYPEDEF(void, glGetProgramResourceName, GLuint program, GLenum programInterface, - GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name) -GL_FUNC_TYPEDEF(void, glGetProgramResourceiv, GLuint program, GLenum programInterface, GLuint index, - GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, - GLint *params) -GL_FUNC_TYPEDEF(GLint, glGetProgramResourceLocation, GLuint program, GLenum programInterface, - const GLchar *name) -GL_FUNC_TYPEDEF(void, glUseProgramStages, GLuint pipeline, GLbitfield stages, GLuint program) -GL_FUNC_TYPEDEF(void, glActiveShaderProgram, GLuint pipeline, GLuint program) -GL_FUNC_TYPEDEF(GLuint, glCreateShaderProgramv, GLenum type, GLsizei count, - const GLchar *const *strings) -GL_FUNC_TYPEDEF(void, glBindProgramPipeline, GLuint pipeline) -GL_FUNC_TYPEDEF(void, glDeleteProgramPipelines, GLsizei n, const GLuint *pipelines) -GL_FUNC_TYPEDEF(void, glGenProgramPipelines, GLsizei n, GLuint *pipelines) -GL_FUNC_TYPEDEF(GLboolean, glIsProgramPipeline, GLuint pipeline) -GL_FUNC_TYPEDEF(void, glGetProgramPipelineiv, GLuint pipeline, GLenum pname, GLint *params) -GL_FUNC_TYPEDEF(void, glProgramUniform1i, GLuint program, GLint location, GLint v0) -GL_FUNC_TYPEDEF(void, glProgramUniform2i, GLuint program, GLint location, GLint v0, GLint v1) -GL_FUNC_TYPEDEF(void, glProgramUniform3i, GLuint program, GLint location, GLint v0, GLint v1, - GLint v2) -GL_FUNC_TYPEDEF(void, glProgramUniform4i, GLuint program, GLint location, GLint v0, GLint v1, - GLint v2, GLint v3) -GL_FUNC_TYPEDEF(void, glProgramUniform1ui, GLuint program, GLint location, GLuint v0) -GL_FUNC_TYPEDEF(void, glProgramUniform2ui, GLuint program, GLint location, GLuint v0, GLuint v1) -GL_FUNC_TYPEDEF(void, glProgramUniform3ui, GLuint program, GLint location, GLuint v0, GLuint v1, - GLuint v2) -GL_FUNC_TYPEDEF(void, glProgramUniform4ui, GLuint program, GLint location, GLuint v0, GLuint v1, - GLuint v2, GLuint v3) -GL_FUNC_TYPEDEF(void, glProgramUniform1f, GLuint program, GLint location, GLfloat v0) -GL_FUNC_TYPEDEF(void, glProgramUniform2f, GLuint program, GLint location, GLfloat v0, GLfloat v1) -GL_FUNC_TYPEDEF(void, glProgramUniform3f, GLuint program, GLint location, GLfloat v0, GLfloat v1, - GLfloat v2) -GL_FUNC_TYPEDEF(void, glProgramUniform4f, GLuint program, GLint location, GLfloat v0, GLfloat v1, - GLfloat v2, GLfloat v3) -GL_FUNC_TYPEDEF(void, glProgramUniform1iv, GLuint program, GLint location, GLsizei count, - const GLint *value) -GL_FUNC_TYPEDEF(void, glProgramUniform2iv, GLuint program, GLint location, GLsizei count, - const GLint *value) -GL_FUNC_TYPEDEF(void, glProgramUniform3iv, GLuint program, GLint location, GLsizei count, - const GLint *value) -GL_FUNC_TYPEDEF(void, glProgramUniform4iv, GLuint program, GLint location, GLsizei count, - const GLint *value) -GL_FUNC_TYPEDEF(void, glProgramUniform1uiv, GLuint program, GLint location, GLsizei count, - const GLuint *value) -GL_FUNC_TYPEDEF(void, glProgramUniform2uiv, GLuint program, GLint location, GLsizei count, - const GLuint *value) -GL_FUNC_TYPEDEF(void, glProgramUniform3uiv, GLuint program, GLint location, GLsizei count, - const GLuint *value) -GL_FUNC_TYPEDEF(void, glProgramUniform4uiv, GLuint program, GLint location, GLsizei count, - const GLuint *value) -GL_FUNC_TYPEDEF(void, glProgramUniform1fv, GLuint program, GLint location, GLsizei count, - const GLfloat *value) -GL_FUNC_TYPEDEF(void, glProgramUniform2fv, GLuint program, GLint location, GLsizei count, - const GLfloat *value) -GL_FUNC_TYPEDEF(void, glProgramUniform3fv, GLuint program, GLint location, GLsizei count, - const GLfloat *value) -GL_FUNC_TYPEDEF(void, glProgramUniform4fv, GLuint program, GLint location, GLsizei count, - const GLfloat *value) -GL_FUNC_TYPEDEF(void, glProgramUniformMatrix2fv, GLuint program, GLint location, GLsizei count, - GLboolean transpose, const GLfloat *value) -GL_FUNC_TYPEDEF(void, glProgramUniformMatrix3fv, GLuint program, GLint location, GLsizei count, - GLboolean transpose, const GLfloat *value) -GL_FUNC_TYPEDEF(void, glProgramUniformMatrix4fv, GLuint program, GLint location, GLsizei count, - GLboolean transpose, const GLfloat *value) -GL_FUNC_TYPEDEF(void, glProgramUniformMatrix2x3fv, GLuint program, GLint location, GLsizei count, - GLboolean transpose, const GLfloat *value) -GL_FUNC_TYPEDEF(void, glProgramUniformMatrix3x2fv, GLuint program, GLint location, GLsizei count, - GLboolean transpose, const GLfloat *value) -GL_FUNC_TYPEDEF(void, glProgramUniformMatrix2x4fv, GLuint program, GLint location, GLsizei count, - GLboolean transpose, const GLfloat *value) -GL_FUNC_TYPEDEF(void, glProgramUniformMatrix4x2fv, GLuint program, GLint location, GLsizei count, - GLboolean transpose, const GLfloat *value) -GL_FUNC_TYPEDEF(void, glProgramUniformMatrix3x4fv, GLuint program, GLint location, GLsizei count, - GLboolean transpose, const GLfloat *value) -GL_FUNC_TYPEDEF(void, glProgramUniformMatrix4x3fv, GLuint program, GLint location, GLsizei count, - GLboolean transpose, const GLfloat *value) -GL_FUNC_TYPEDEF(void, glValidateProgramPipeline, GLuint pipeline) -GL_FUNC_TYPEDEF(void, glGetProgramPipelineInfoLog, GLuint pipeline, GLsizei bufSize, - GLsizei *length, GLchar *infoLog) -GL_FUNC_TYPEDEF(void, glBindImageTexture, GLuint unit, GLuint texture, GLint level, - GLboolean layered, GLint layer, GLenum access, GLenum format) -GL_FUNC_TYPEDEF(void, glGetBooleani_v, GLenum target, GLuint index, GLboolean *data) -GL_FUNC_TYPEDEF(void, glMemoryBarrier, GLbitfield barriers) -GL_FUNC_TYPEDEF(void, glMemoryBarrierByRegion, GLbitfield barriers) -GL_FUNC_TYPEDEF(void, glTexStorage2DMultisample, GLenum target, GLsizei samples, - GLenum internalformat, GLsizei width, GLsizei height, - GLboolean fixedsamplelocations) -GL_FUNC_TYPEDEF(void, glGetMultisamplefv, GLenum pname, GLuint index, GLfloat *val) -GL_FUNC_TYPEDEF(void, glSampleMaski, GLuint maskNumber, GLbitfield mask) -GL_FUNC_TYPEDEF(void, glGetTexLevelParameteriv, GLenum target, GLint level, GLenum pname, - GLint *params) -GL_FUNC_TYPEDEF(void, glGetTexLevelParameterfv, GLenum target, GLint level, GLenum pname, - GLfloat *params) -GL_FUNC_TYPEDEF(void, glBindVertexBuffer, GLuint bindingindex, GLuint buffer, GLintptr offset, - GLsizei stride) -GL_FUNC_TYPEDEF(void, glVertexAttribFormat, GLuint attribindex, GLint size, GLenum type, - GLboolean normalized, GLuint relativeoffset) -GL_FUNC_TYPEDEF(void, glVertexAttribIFormat, GLuint attribindex, GLint size, GLenum type, - GLuint relativeoffset) -GL_FUNC_TYPEDEF(void, glVertexAttribBinding, GLuint attribindex, GLuint bindingindex) -GL_FUNC_TYPEDEF(void, glVertexBindingDivisor, GLuint bindingindex, GLuint divisor) -GL_FUNC_TYPEDEF(void, glBlendBarrier) -GL_FUNC_TYPEDEF(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) -GL_FUNC_TYPEDEF(void, glDebugMessageControl, GLenum source, GLenum type, GLenum severity, - GLsizei count, const GLuint *ids, GLboolean enabled) -GL_FUNC_TYPEDEF(void, glDebugMessageInsert, GLenum source, GLenum type, GLuint id, GLenum severity, - GLsizei length, const GLchar *buf) -GL_FUNC_TYPEDEF(void, glDebugMessageCallback, GLDEBUGPROC callback, const void *userParam) -GL_FUNC_TYPEDEF(GLuint, glGetDebugMessageLog, GLuint count, GLsizei bufSize, GLenum *sources, - GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, - GLchar *messageLog) -GL_FUNC_TYPEDEF(void, glPushDebugGroup, GLenum source, GLuint id, GLsizei length, - const GLchar *message) -GL_FUNC_TYPEDEF(void, glPopDebugGroup) -GL_FUNC_TYPEDEF(void, glObjectLabel, GLenum identifier, GLuint name, GLsizei length, - const GLchar *label) -GL_FUNC_TYPEDEF(void, glGetObjectLabel, GLenum identifier, GLuint name, GLsizei bufSize, - GLsizei *length, GLchar *label) -GL_FUNC_TYPEDEF(void, glObjectPtrLabel, const void *ptr, GLsizei length, const GLchar *label) -GL_FUNC_TYPEDEF(void, glGetObjectPtrLabel, const void *ptr, GLsizei bufSize, GLsizei *length, - GLchar *label) -GL_FUNC_TYPEDEF(void, glGetPointerv, GLenum pname, void **params) -GL_FUNC_TYPEDEF(void, glEnablei, GLenum target, GLuint index) -GL_FUNC_TYPEDEF(void, glDisablei, GLenum target, GLuint index) -GL_FUNC_TYPEDEF(void, glBlendEquationi, GLuint buf, GLenum mode) -GL_FUNC_TYPEDEF(void, glBlendEquationSeparatei, GLuint buf, GLenum modeRGB, GLenum modeAlpha) -GL_FUNC_TYPEDEF(void, glBlendFunci, GLuint buf, GLenum src, GLenum dst) -GL_FUNC_TYPEDEF(void, glBlendFuncSeparatei, GLuint buf, GLenum srcRGB, GLenum dstRGB, - GLenum srcAlpha, GLenum dstAlpha) -GL_FUNC_TYPEDEF(void, glColorMaski, GLuint index, GLboolean r, GLboolean g, GLboolean b, - GLboolean a) -GL_FUNC_TYPEDEF(GLboolean, glIsEnabledi, GLenum target, GLuint index) -GL_FUNC_TYPEDEF(void, glDrawElementsBaseVertex, GLenum mode, GLsizei count, GLenum type, - const void *indices, GLint basevertex) -GL_FUNC_TYPEDEF(void, glDrawRangeElementsBaseVertex, GLenum mode, GLuint start, GLuint end, - GLsizei count, GLenum type, const void *indices, GLint basevertex) -GL_FUNC_TYPEDEF(void, glDrawElementsInstancedBaseVertex, GLenum mode, GLsizei count, GLenum type, - const void *indices, GLsizei instancecount, GLint basevertex) -GL_FUNC_TYPEDEF(void, glFramebufferTexture, GLenum target, GLenum attachment, GLuint texture, - GLint level) -GL_FUNC_TYPEDEF(void, glPrimitiveBoundingBox, GLfloat minX, GLfloat minY, GLfloat minZ, - GLfloat minW, GLfloat maxX, GLfloat maxY, GLfloat maxZ, GLfloat maxW) -GL_FUNC_TYPEDEF(GLenum, glGetGraphicsResetStatus) -GL_FUNC_TYPEDEF(void, glReadnPixels, GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, - GLenum type, GLsizei bufSize, void *data) -GL_FUNC_TYPEDEF(void, glGetnUniformfv, GLuint program, GLint location, GLsizei bufSize, - GLfloat *params) -GL_FUNC_TYPEDEF(void, glGetnUniformiv, GLuint program, GLint location, GLsizei bufSize, - GLint *params) -GL_FUNC_TYPEDEF(void, glGetnUniformuiv, GLuint program, GLint location, GLsizei bufSize, - GLuint *params) -GL_FUNC_TYPEDEF(void, glMinSampleShading, GLfloat value) -GL_FUNC_TYPEDEF(void, glPatchParameteri, GLenum pname, GLint value) -GL_FUNC_TYPEDEF(void, glTexParameterIiv, GLenum target, GLenum pname, const GLint *params) -GL_FUNC_TYPEDEF(void, glTexParameterIuiv, GLenum target, GLenum pname, const GLuint *params) -GL_FUNC_TYPEDEF(void, glGetTexParameterIiv, GLenum target, GLenum pname, GLint *params) -GL_FUNC_TYPEDEF(void, glGetTexParameterIuiv, GLenum target, GLenum pname, GLuint *params) -GL_FUNC_TYPEDEF(void, glSamplerParameterIiv, GLuint sampler, GLenum pname, const GLint *param) -GL_FUNC_TYPEDEF(void, glSamplerParameterIuiv, GLuint sampler, GLenum pname, const GLuint *param) -GL_FUNC_TYPEDEF(void, glGetSamplerParameterIiv, GLuint sampler, GLenum pname, GLint *params) -GL_FUNC_TYPEDEF(void, glGetSamplerParameterIuiv, GLuint sampler, GLenum pname, GLuint *params) -GL_FUNC_TYPEDEF(void, glTexBuffer, GLenum target, GLenum internalformat, GLuint buffer) -GL_FUNC_TYPEDEF(void, glTexBufferRange, GLenum target, GLenum internalformat, GLuint buffer, - GLintptr offset, GLsizeiptr size) -GL_FUNC_TYPEDEF(void, glTexStorage3DMultisample, GLenum target, GLsizei samples, - GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, - GLboolean fixedsamplelocations) -GL_FUNC_TYPEDEF(void*, glMapBufferRange, GLenum target, GLintptr offset, GLsizeiptr length, - GLbitfield access) -GL_FUNC_TYPEDEF(void, glBufferStorageEXT, GLenum target, GLsizeiptr size, const void *data, - GLbitfield flags) -GL_FUNC_TYPEDEF(void, glGetQueryObjectivEXT, GLuint id, GLenum pname, GLint *params) -GL_FUNC_TYPEDEF(void, glGetQueryObjecti64vEXT, GLuint id, GLenum pname, GLint64 *params) -GL_FUNC_TYPEDEF(void, glBindFragDataLocationEXT, GLuint program, GLuint colorNumber, - const GLchar *name) -GL_FUNC_TYPEDEF(void*, glMapBufferOES, GLenum target, GLenum access) - -GL_FUNC_TYPEDEF(void, glMultiDrawArraysIndirectEXT, GLenum mode, const void *indirect, GLsizei drawcount, GLsizei stride) -GL_FUNC_TYPEDEF(void, glMultiDrawElementsIndirectEXT, GLenum mode, GLenum type, const void *indirect, GLsizei drawcount, GLsizei stride) -GL_FUNC_TYPEDEF(void, glBruh) -GL_FUNC_TYPEDEF(void, glMultiDrawElementsBaseVertexEXT, GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei drawcount, const GLint *basevertex) - -#undef APIENTRY_GLES -#undef GL_FUNC_TYPEDEF - -namespace EGL { - typedef EGLBoolean (*eglBindAPI_PTR)(EGLenum api); - typedef EGLBoolean (*eglBindTexImage_PTR)(EGLDisplay dpy, EGLSurface surface, EGLint buffer); - typedef EGLBoolean (*eglChooseConfig_PTR)(EGLDisplay dpy, const EGLint *attrib_list, - EGLConfig *configs, EGLint config_size, - EGLint *num_config); - typedef EGLBoolean (*eglCopyBuffers_PTR)(EGLDisplay dpy, EGLSurface surface, - EGLNativePixmapType target); - typedef EGLContext (*eglCreateContext_PTR)(EGLDisplay dpy, EGLConfig config, - EGLContext share_context, const EGLint *attrib_list); - typedef EGLSurface (*eglCreatePbufferFromClientBuffer_PTR)(EGLDisplay dpy, EGLenum buftype, - EGLClientBuffer buffer, EGLConfig config, - const EGLint *attrib_list); - typedef EGLSurface (*eglCreatePbufferSurface_PTR)(EGLDisplay dpy, EGLConfig config, - const EGLint *attrib_list); - typedef EGLSurface (*eglCreatePixmapSurface_PTR)(EGLDisplay dpy, EGLConfig config, - EGLNativePixmapType pixmap, - const EGLint *attrib_list); - typedef EGLSurface (*eglCreatePlatformWindowSurface_PTR)(EGLDisplay display, EGLConfig config, - void *native_window, - const EGLint *attrib_list); - typedef EGLSurface (*eglCreateWindowSurface_PTR)(EGLDisplay dpy, EGLConfig config, - EGLNativeWindowType win, - const EGLint *attrib_list); - typedef EGLBoolean (*eglDestroyContext_PTR)(EGLDisplay dpy, EGLContext ctx); - typedef EGLBoolean (*eglDestroySurface_PTR)(EGLDisplay dpy, EGLSurface surface); - typedef EGLBoolean (*eglGetConfigAttrib_PTR)(EGLDisplay dpy, EGLConfig config, EGLint attribute, - EGLint *value); - typedef EGLBoolean (*eglGetConfigs_PTR)(EGLDisplay dpy, EGLConfig *configs, EGLint config_size, - EGLint *num_config); - typedef EGLContext (*eglGetCurrentContext_PTR)(); - typedef EGLDisplay (*eglGetCurrentDisplay_PTR)(); - typedef EGLSurface (*eglGetCurrentSurface_PTR)(EGLint readdraw); - typedef EGLDisplay (*eglGetDisplay_PTR)(EGLNativeDisplayType display_id); - typedef EGLDisplay (*eglGetPlatformDisplay_PTR)(EGLenum platform, void *native_display, - const EGLint *attrib_list); - typedef EGLint (*eglGetError_PTR)(); - typedef __eglMustCastToProperFunctionPointerType (*eglGetProcAddress_PTR)(const char *procname); - typedef EGLBoolean (*eglInitialize_PTR)(EGLDisplay dpy, EGLint *major, EGLint *minor); - typedef EGLBoolean (*eglMakeCurrent_PTR)(EGLDisplay dpy, EGLSurface draw, EGLSurface read, - EGLContext ctx); - typedef EGLenum (*eglQueryAPI_PTR)(); - typedef EGLBoolean (*eglQueryContext_PTR)(EGLDisplay dpy, EGLContext ctx, EGLint attribute, - EGLint *value); - typedef const char *(*eglQueryString_PTR)(EGLDisplay dpy, EGLint name); - typedef EGLBoolean (*eglQuerySurface_PTR)(EGLDisplay dpy, EGLSurface surface, EGLint attribute, - EGLint *value); - typedef EGLBoolean (*eglReleaseTexImage_PTR)(EGLDisplay dpy, EGLSurface surface, EGLint buffer); - typedef EGLBoolean (*eglReleaseThread_PTR)(); - typedef EGLBoolean (*eglSurfaceAttrib_PTR)(EGLDisplay dpy, EGLSurface surface, EGLint attribute, - EGLint value); - typedef EGLBoolean (*eglSwapBuffers_PTR)(EGLDisplay dpy, EGLSurface surface); - typedef EGLBoolean (*eglSwapBuffersWithDamageEXT_PTR)(EGLDisplay dpy, EGLSurface surface, - EGLint *rects, EGLint n_rects); - typedef EGLBoolean (*eglSwapInterval_PTR)(EGLDisplay dpy, EGLint interval); - typedef EGLBoolean (*eglTerminate_PTR)(EGLDisplay dpy); - typedef EGLBoolean (*eglUnlockSurfaceKHR_PTR)(EGLDisplay display, EGLSurface surface); - typedef EGLBoolean (*eglWaitClient_PTR)(); - typedef EGLBoolean (*eglWaitGL_PTR)(); - typedef EGLBoolean (*eglWaitNative_PTR)(EGLint engine); - -}; - -#define GL_FUNC_DECL(name) \ -extern name##_PTR name; - -namespace GLES { - namespace Caps { - namespace Version { - static int Major; - static int Minor; - } - - namespace Exts { - static int GL_EXT_buffer_storage; - static int GL_EXT_disjoint_timer_query; - static int GL_QCOM_texture_lod_bias; - [[maybe_unused]] static int GL_EXT_blend_func_extended; - [[maybe_unused]] static int GL_EXT_texture_format_BGRA8888; - [[maybe_unused]] static int GL_EXT_read_format_bgra; - static int GL_OES_mapbuffer; - static int GL_EXT_multi_draw_indirect; - static int GL_OES_draw_elements_base_vertex; - static int GL_OES_depth_texture; - static int GL_OES_depth24; - static int GL_OES_depth_texture_float; - static int GL_EXT_texture_norm16; - static int GL_EXT_texture_rg; - } - } - - GL_FUNC_DECL(glActiveTexture) - GL_FUNC_DECL(glAttachShader) - GL_FUNC_DECL(glBindAttribLocation) - GL_FUNC_DECL(glBindBuffer) - GL_FUNC_DECL(glBindFramebuffer) - GL_FUNC_DECL(glBindRenderbuffer) - GL_FUNC_DECL(glBindTexture) - GL_FUNC_DECL(glBlendColor) - GL_FUNC_DECL(glBlendEquation) - GL_FUNC_DECL(glBlendEquationSeparate) - GL_FUNC_DECL(glBlendFunc) - GL_FUNC_DECL(glBlendFuncSeparate) - GL_FUNC_DECL(glBufferData) - GL_FUNC_DECL(glBufferSubData) - GL_FUNC_DECL(glCheckFramebufferStatus) - GL_FUNC_DECL(glClear) - GL_FUNC_DECL(glClearColor) - GL_FUNC_DECL(glClearDepthf) - GL_FUNC_DECL(glClearStencil) - GL_FUNC_DECL(glColorMask) - GL_FUNC_DECL(glCompileShader) - GL_FUNC_DECL(glCompressedTexImage2D) - GL_FUNC_DECL(glCompressedTexSubImage2D) - GL_FUNC_DECL(glCopyTexImage2D) - GL_FUNC_DECL(glCopyTexSubImage2D) - GL_FUNC_DECL(glCreateProgram) - GL_FUNC_DECL(glCreateShader) - GL_FUNC_DECL(glCullFace) - GL_FUNC_DECL(glDeleteBuffers) - GL_FUNC_DECL(glDeleteFramebuffers) - GL_FUNC_DECL(glDeleteProgram) - GL_FUNC_DECL(glDeleteRenderbuffers) - GL_FUNC_DECL(glDeleteShader) - GL_FUNC_DECL(glDeleteTextures) - GL_FUNC_DECL(glDepthFunc) - GL_FUNC_DECL(glDepthMask) - GL_FUNC_DECL(glDepthRangef) - GL_FUNC_DECL(glDetachShader) - GL_FUNC_DECL(glDisable) - GL_FUNC_DECL(glDisableVertexAttribArray) - GL_FUNC_DECL(glDrawArrays) - GL_FUNC_DECL(glDrawElements) - GL_FUNC_DECL(glEnable) - GL_FUNC_DECL(glEnableVertexAttribArray) - GL_FUNC_DECL(glFinish) - GL_FUNC_DECL(glFlush) - GL_FUNC_DECL(glFramebufferRenderbuffer) - GL_FUNC_DECL(glFramebufferTexture2D) - GL_FUNC_DECL(glFrontFace) - GL_FUNC_DECL(glGenBuffers) - GL_FUNC_DECL(glGenerateMipmap) - GL_FUNC_DECL(glGenFramebuffers) - GL_FUNC_DECL(glGenRenderbuffers) - GL_FUNC_DECL(glGenTextures) - GL_FUNC_DECL(glGetActiveAttrib) - GL_FUNC_DECL(glGetActiveUniform) - GL_FUNC_DECL(glGetAttachedShaders) - GL_FUNC_DECL(glGetAttribLocation) - GL_FUNC_DECL(glGetBooleanv) - GL_FUNC_DECL(glGetBufferParameteriv) - GL_FUNC_DECL(glGetError) - GL_FUNC_DECL(glGetString) - GL_FUNC_DECL(glGetStringi) - GL_FUNC_DECL(glGetFloatv) - GL_FUNC_DECL(glGetFramebufferAttachmentParameteriv) - GL_FUNC_DECL(glGetIntegerv) - GL_FUNC_DECL(glGetProgramiv) - GL_FUNC_DECL(glGetProgramInfoLog) - GL_FUNC_DECL(glGetRenderbufferParameteriv) - GL_FUNC_DECL(glGetShaderiv) - GL_FUNC_DECL(glGetShaderInfoLog) - GL_FUNC_DECL(glGetShaderPrecisionFormat) - GL_FUNC_DECL(glGetShaderSource) - GL_FUNC_DECL(glGetTexParameterfv) - GL_FUNC_DECL(glGetTexParameteriv) - GL_FUNC_DECL(glGetUniformfv) - GL_FUNC_DECL(glGetUniformiv) - GL_FUNC_DECL(glGetUniformLocation) - GL_FUNC_DECL(glGetVertexAttribfv) - GL_FUNC_DECL(glGetVertexAttribiv) - GL_FUNC_DECL(glGetVertexAttribPointerv) - GL_FUNC_DECL(glHint) - GL_FUNC_DECL(glIsBuffer) - GL_FUNC_DECL(glIsEnabled) - GL_FUNC_DECL(glIsFramebuffer) - GL_FUNC_DECL(glIsProgram) - GL_FUNC_DECL(glIsRenderbuffer) - GL_FUNC_DECL(glIsShader) - GL_FUNC_DECL(glIsTexture) - GL_FUNC_DECL(glLineWidth) - GL_FUNC_DECL(glLinkProgram) - GL_FUNC_DECL(glPixelStorei) - GL_FUNC_DECL(glPolygonOffset) - GL_FUNC_DECL(glReadPixels) - GL_FUNC_DECL(glReleaseShaderCompiler) - GL_FUNC_DECL(glRenderbufferStorage) - GL_FUNC_DECL(glSampleCoverage) - GL_FUNC_DECL(glScissor) - GL_FUNC_DECL(glShaderBinary) - GL_FUNC_DECL(glShaderSource) - GL_FUNC_DECL(glStencilFunc) - GL_FUNC_DECL(glStencilFuncSeparate) - GL_FUNC_DECL(glStencilMask) - GL_FUNC_DECL(glStencilMaskSeparate) - GL_FUNC_DECL(glStencilOp) - GL_FUNC_DECL(glStencilOpSeparate) - GL_FUNC_DECL(glTexImage2D) - GL_FUNC_DECL(glTexParameterf) - GL_FUNC_DECL(glTexParameterfv) - GL_FUNC_DECL(glTexParameteri) - GL_FUNC_DECL(glTexParameteriv) - GL_FUNC_DECL(glTexSubImage2D) - GL_FUNC_DECL(glUniform1f) - GL_FUNC_DECL(glUniform1fv) - GL_FUNC_DECL(glUniform1i) - GL_FUNC_DECL(glUniform1iv) - GL_FUNC_DECL(glUniform2f) - GL_FUNC_DECL(glUniform2fv) - GL_FUNC_DECL(glUniform2i) - GL_FUNC_DECL(glUniform2iv) - GL_FUNC_DECL(glUniform3f) - GL_FUNC_DECL(glUniform3fv) - GL_FUNC_DECL(glUniform3i) - GL_FUNC_DECL(glUniform3iv) - GL_FUNC_DECL(glUniform4f) - GL_FUNC_DECL(glUniform4fv) - GL_FUNC_DECL(glUniform4i) - GL_FUNC_DECL(glUniform4iv) - GL_FUNC_DECL(glUniformMatrix2fv) - GL_FUNC_DECL(glUniformMatrix3fv) - GL_FUNC_DECL(glUniformMatrix4fv) - GL_FUNC_DECL(glUseProgram) - GL_FUNC_DECL(glValidateProgram) - GL_FUNC_DECL(glVertexAttrib1f) - GL_FUNC_DECL(glVertexAttrib1fv) - GL_FUNC_DECL(glVertexAttrib2f) - GL_FUNC_DECL(glVertexAttrib2fv) - GL_FUNC_DECL(glVertexAttrib3f) - GL_FUNC_DECL(glVertexAttrib3fv) - GL_FUNC_DECL(glVertexAttrib4f) - GL_FUNC_DECL(glVertexAttrib4fv) - GL_FUNC_DECL(glVertexAttribPointer) - GL_FUNC_DECL(glViewport) - GL_FUNC_DECL(glReadBuffer) - GL_FUNC_DECL(glDrawRangeElements) - GL_FUNC_DECL(glTexImage3D) - GL_FUNC_DECL(glTexSubImage3D) - GL_FUNC_DECL(glCopyTexSubImage3D) - GL_FUNC_DECL(glCompressedTexImage3D) - GL_FUNC_DECL(glCompressedTexSubImage3D) - GL_FUNC_DECL(glGenQueries) - GL_FUNC_DECL(glDeleteQueries) - GL_FUNC_DECL(glIsQuery) - GL_FUNC_DECL(glBeginQuery) - GL_FUNC_DECL(glEndQuery) - GL_FUNC_DECL(glGetQueryiv) - GL_FUNC_DECL(glGetQueryObjectuiv) - GL_FUNC_DECL(glUnmapBuffer) - GL_FUNC_DECL(glGetBufferPointerv) - GL_FUNC_DECL(glDrawBuffers) - GL_FUNC_DECL(glUniformMatrix2x3fv) - GL_FUNC_DECL(glUniformMatrix3x2fv) - GL_FUNC_DECL(glUniformMatrix2x4fv) - GL_FUNC_DECL(glUniformMatrix4x2fv) - GL_FUNC_DECL(glUniformMatrix3x4fv) - GL_FUNC_DECL(glUniformMatrix4x3fv) - GL_FUNC_DECL(glBlitFramebuffer) - GL_FUNC_DECL(glRenderbufferStorageMultisample) - GL_FUNC_DECL(glFramebufferTextureLayer) - GL_FUNC_DECL(glFlushMappedBufferRange) - GL_FUNC_DECL(glBindVertexArray) - GL_FUNC_DECL(glDeleteVertexArrays) - GL_FUNC_DECL(glGenVertexArrays) - GL_FUNC_DECL(glIsVertexArray) - GL_FUNC_DECL(glGetIntegeri_v) - GL_FUNC_DECL(glBeginTransformFeedback) - GL_FUNC_DECL(glEndTransformFeedback) - GL_FUNC_DECL(glBindBufferRange) - GL_FUNC_DECL(glBindBufferBase) - GL_FUNC_DECL(glTransformFeedbackVaryings) - GL_FUNC_DECL(glGetTransformFeedbackVarying) - GL_FUNC_DECL(glVertexAttribIPointer) - GL_FUNC_DECL(glGetVertexAttribIiv) - GL_FUNC_DECL(glGetVertexAttribIuiv) - GL_FUNC_DECL(glVertexAttribI4i) - GL_FUNC_DECL(glVertexAttribI4ui) - GL_FUNC_DECL(glVertexAttribI4iv) - GL_FUNC_DECL(glVertexAttribI4uiv) - GL_FUNC_DECL(glGetUniformuiv) - GL_FUNC_DECL(glGetFragDataLocation) - GL_FUNC_DECL(glUniform1ui) - GL_FUNC_DECL(glUniform2ui) - GL_FUNC_DECL(glUniform3ui) - GL_FUNC_DECL(glUniform4ui) - GL_FUNC_DECL(glUniform1uiv) - GL_FUNC_DECL(glUniform2uiv) - GL_FUNC_DECL(glUniform3uiv) - GL_FUNC_DECL(glUniform4uiv) - GL_FUNC_DECL(glClearBufferiv) - GL_FUNC_DECL(glClearBufferuiv) - GL_FUNC_DECL(glClearBufferfv) - GL_FUNC_DECL(glClearBufferfi) - GL_FUNC_DECL(glCopyBufferSubData) - GL_FUNC_DECL(glGetUniformIndices) - GL_FUNC_DECL(glGetActiveUniformsiv) - GL_FUNC_DECL(glGetUniformBlockIndex) - GL_FUNC_DECL(glGetActiveUniformBlockiv) - GL_FUNC_DECL(glGetActiveUniformBlockName) - GL_FUNC_DECL(glUniformBlockBinding) - GL_FUNC_DECL(glDrawArraysInstanced) - GL_FUNC_DECL(glDrawElementsInstanced) - GL_FUNC_DECL(glFenceSync) - GL_FUNC_DECL(glIsSync) - GL_FUNC_DECL(glDeleteSync) - GL_FUNC_DECL(glClientWaitSync) - GL_FUNC_DECL(glWaitSync) - GL_FUNC_DECL(glGetInteger64v) - GL_FUNC_DECL(glGetSynciv) - GL_FUNC_DECL(glGetInteger64i_v) - GL_FUNC_DECL(glGetBufferParameteri64v) - GL_FUNC_DECL(glGenSamplers) - GL_FUNC_DECL(glDeleteSamplers) - GL_FUNC_DECL(glIsSampler) - GL_FUNC_DECL(glBindSampler) - GL_FUNC_DECL(glSamplerParameteri) - GL_FUNC_DECL(glSamplerParameteriv) - GL_FUNC_DECL(glSamplerParameterf) - GL_FUNC_DECL(glSamplerParameterfv) - GL_FUNC_DECL(glGetSamplerParameteriv) - GL_FUNC_DECL(glGetSamplerParameterfv) - GL_FUNC_DECL(glVertexAttribDivisor) - GL_FUNC_DECL(glBindTransformFeedback) - GL_FUNC_DECL(glDeleteTransformFeedbacks) - GL_FUNC_DECL(glGenTransformFeedbacks) - GL_FUNC_DECL(glIsTransformFeedback) - GL_FUNC_DECL(glPauseTransformFeedback) - GL_FUNC_DECL(glResumeTransformFeedback) - GL_FUNC_DECL(glGetProgramBinary) - GL_FUNC_DECL(glProgramBinary) - GL_FUNC_DECL(glProgramParameteri) - GL_FUNC_DECL(glInvalidateFramebuffer) - GL_FUNC_DECL(glInvalidateSubFramebuffer) - GL_FUNC_DECL(glTexStorage2D) - GL_FUNC_DECL(glTexStorage3D) - GL_FUNC_DECL(glGetInternalformativ) - GL_FUNC_DECL(glDispatchCompute) - GL_FUNC_DECL(glDispatchComputeIndirect) - GL_FUNC_DECL(glDrawArraysIndirect) - GL_FUNC_DECL(glDrawElementsIndirect) - GL_FUNC_DECL(glFramebufferParameteri) - GL_FUNC_DECL(glGetFramebufferParameteriv) - GL_FUNC_DECL(glGetProgramInterfaceiv) - GL_FUNC_DECL(glGetProgramResourceIndex) - GL_FUNC_DECL(glGetProgramResourceName) - GL_FUNC_DECL(glGetProgramResourceiv) - GL_FUNC_DECL(glGetProgramResourceLocation) - GL_FUNC_DECL(glUseProgramStages) - GL_FUNC_DECL(glActiveShaderProgram) - GL_FUNC_DECL(glCreateShaderProgramv) - GL_FUNC_DECL(glBindProgramPipeline) - GL_FUNC_DECL(glDeleteProgramPipelines) - GL_FUNC_DECL(glGenProgramPipelines) - GL_FUNC_DECL(glIsProgramPipeline) - GL_FUNC_DECL(glGetProgramPipelineiv) - GL_FUNC_DECL(glProgramUniform1i) - GL_FUNC_DECL(glProgramUniform2i) - GL_FUNC_DECL(glProgramUniform3i) - GL_FUNC_DECL(glProgramUniform4i) - GL_FUNC_DECL(glProgramUniform1ui) - GL_FUNC_DECL(glProgramUniform2ui) - GL_FUNC_DECL(glProgramUniform3ui) - GL_FUNC_DECL(glProgramUniform4ui) - GL_FUNC_DECL(glProgramUniform1f) - GL_FUNC_DECL(glProgramUniform2f) - GL_FUNC_DECL(glProgramUniform3f) - GL_FUNC_DECL(glProgramUniform4f) - GL_FUNC_DECL(glProgramUniform1iv) - GL_FUNC_DECL(glProgramUniform2iv) - GL_FUNC_DECL(glProgramUniform3iv) - GL_FUNC_DECL(glProgramUniform4iv) - GL_FUNC_DECL(glProgramUniform1uiv) - GL_FUNC_DECL(glProgramUniform2uiv) - GL_FUNC_DECL(glProgramUniform3uiv) - GL_FUNC_DECL(glProgramUniform4uiv) - GL_FUNC_DECL(glProgramUniform1fv) - GL_FUNC_DECL(glProgramUniform2fv) - GL_FUNC_DECL(glProgramUniform3fv) - GL_FUNC_DECL(glProgramUniform4fv) - GL_FUNC_DECL(glProgramUniformMatrix2fv) - GL_FUNC_DECL(glProgramUniformMatrix3fv) - GL_FUNC_DECL(glProgramUniformMatrix4fv) - GL_FUNC_DECL(glProgramUniformMatrix2x3fv) - GL_FUNC_DECL(glProgramUniformMatrix3x2fv) - GL_FUNC_DECL(glProgramUniformMatrix2x4fv) - GL_FUNC_DECL(glProgramUniformMatrix4x2fv) - GL_FUNC_DECL(glProgramUniformMatrix3x4fv) - GL_FUNC_DECL(glProgramUniformMatrix4x3fv) - GL_FUNC_DECL(glValidateProgramPipeline) - GL_FUNC_DECL(glGetProgramPipelineInfoLog) - GL_FUNC_DECL(glBindImageTexture) - GL_FUNC_DECL(glGetBooleani_v) - GL_FUNC_DECL(glMemoryBarrier) - GL_FUNC_DECL(glMemoryBarrierByRegion) - GL_FUNC_DECL(glTexStorage2DMultisample) - GL_FUNC_DECL(glGetMultisamplefv) - GL_FUNC_DECL(glSampleMaski) - GL_FUNC_DECL(glGetTexLevelParameteriv) - GL_FUNC_DECL(glGetTexLevelParameterfv) - GL_FUNC_DECL(glBindVertexBuffer) - GL_FUNC_DECL(glVertexAttribFormat) - GL_FUNC_DECL(glVertexAttribIFormat) - GL_FUNC_DECL(glVertexAttribBinding) - GL_FUNC_DECL(glVertexBindingDivisor) - GL_FUNC_DECL(glBlendBarrier) - GL_FUNC_DECL(glCopyImageSubData) - GL_FUNC_DECL(glDebugMessageControl) - GL_FUNC_DECL(glDebugMessageInsert) - GL_FUNC_DECL(glDebugMessageCallback) - GL_FUNC_DECL(glGetDebugMessageLog) - GL_FUNC_DECL(glPushDebugGroup) - GL_FUNC_DECL(glPopDebugGroup) - GL_FUNC_DECL(glObjectLabel) - GL_FUNC_DECL(glGetObjectLabel) - GL_FUNC_DECL(glObjectPtrLabel) - GL_FUNC_DECL(glGetObjectPtrLabel) - GL_FUNC_DECL(glGetPointerv) - GL_FUNC_DECL(glEnablei) - GL_FUNC_DECL(glDisablei) - GL_FUNC_DECL(glBlendEquationi) - GL_FUNC_DECL(glBlendEquationSeparatei) - GL_FUNC_DECL(glBlendFunci) - GL_FUNC_DECL(glBlendFuncSeparatei) - GL_FUNC_DECL(glColorMaski) - GL_FUNC_DECL(glIsEnabledi) - GL_FUNC_DECL(glDrawElementsBaseVertex) - GL_FUNC_DECL(glDrawRangeElementsBaseVertex) - GL_FUNC_DECL(glDrawElementsInstancedBaseVertex) - GL_FUNC_DECL(glFramebufferTexture) - GL_FUNC_DECL(glPrimitiveBoundingBox) - GL_FUNC_DECL(glGetGraphicsResetStatus) - GL_FUNC_DECL(glReadnPixels) - GL_FUNC_DECL(glGetnUniformfv) - GL_FUNC_DECL(glGetnUniformiv) - GL_FUNC_DECL(glGetnUniformuiv) - GL_FUNC_DECL(glMinSampleShading) - GL_FUNC_DECL(glPatchParameteri) - GL_FUNC_DECL(glTexParameterIiv) - GL_FUNC_DECL(glTexParameterIuiv) - GL_FUNC_DECL(glGetTexParameterIiv) - GL_FUNC_DECL(glGetTexParameterIuiv) - GL_FUNC_DECL(glSamplerParameterIiv) - GL_FUNC_DECL(glSamplerParameterIuiv) - GL_FUNC_DECL(glGetSamplerParameterIiv) - GL_FUNC_DECL(glGetSamplerParameterIuiv) - GL_FUNC_DECL(glTexBuffer) - GL_FUNC_DECL(glTexBufferRange) - GL_FUNC_DECL(glTexStorage3DMultisample) - GL_FUNC_DECL(glMapBufferRange) - GL_FUNC_DECL(glBufferStorageEXT) - GL_FUNC_DECL(glGetQueryObjectivEXT) - GL_FUNC_DECL(glGetQueryObjecti64vEXT) - GL_FUNC_DECL(glBindFragDataLocationEXT) - GL_FUNC_DECL(glMapBufferOES) - - GL_FUNC_DECL(glMultiDrawArraysIndirectEXT) - GL_FUNC_DECL(glMultiDrawElementsIndirectEXT) - GL_FUNC_DECL(glMultiDrawElementsBaseVertexEXT) - - GL_FUNC_DECL(glBruh) -} - -#undef GL_FUNC_DECL - -#define LOAD_EGL(name) \ - static EGL::name##_PTR egl_##name = NULL; \ - { \ - static bool first = true; \ - if (first) { \ - first = false; \ - if (MG_GL::BackendLoader::GLESBackend::libEGL != NULL) { \ - egl_##name = (EGL::name##_PTR)MG_GL::BackendLoader::GLESBackend::ProcAddress(MG_GL::BackendLoader::GLESBackend::libEGL, #name); \ - } \ - } \ - } - -namespace MG_GL::BackendLoader { - void Init(); - - namespace GLESBackend { - extern void *libGLES, *libEGL; - - void *ProcAddress(void *lib, const char *name); - void InitGLES(); - void InitEGL(); - void DestroyTempEGLCtx(); - void LoadLibs(); - void *OpenLib(const char **names, const char *override); - - #define INIT_GLES_FUNC(name) \ - { \ - GLES::name = (name##_PTR)ProcAddress(libGLES, #name); \ - } - } -} - -#endif - -#endif //MOBILEGL_GLES_LOADER_H diff --git a/MG/MG_GL/Implementations/EGL/Diligent/DiligentConfig.h b/MG/MG_GL/Implementations/EGL/Diligent/DiligentConfig.h deleted file mode 100644 index 01e53e08..00000000 --- a/MG/MG_GL/Implementations/EGL/Diligent/DiligentConfig.h +++ /dev/null @@ -1,9 +0,0 @@ -// -// Created by BZLZHH on 2025/5/25. -// - -#pragma once - -namespace MG_Diligent { - inline const int DILIGENT_BACKEND_TYPE = MG_Constants::Backend::BACKEND_DILIGENT_VULKAN; -} \ No newline at end of file diff --git a/MG/MG_GL/Implementations/EGL/Diligent/EGL_impl.cpp b/MG/MG_GL/Implementations/EGL/Diligent/EGL_impl.cpp deleted file mode 100644 index b009ac08..00000000 --- a/MG/MG_GL/Implementations/EGL/Diligent/EGL_impl.cpp +++ /dev/null @@ -1,1076 +0,0 @@ -// -// Created by Swung 0x48 on 2025-05-18. -// - -#include "../../../../Includes.h" - -typedef Diligent::IEngineFactoryVk* (*Diligent_GetEngineFactoryVk_t)(); -typedef Diligent::IEngineFactoryOpenGL* (*Diligent_GetEngineFactoryOpenGL_t)(); - -namespace MG_Diligent { - Diligent::IEngineFactory* g_pFactory; - Diligent::IRenderDevice* g_pDevice; - Diligent::IDeviceContext* g_pContext; - Diligent::ISwapChain* g_pSwapChain; - MG_Global::unordered_map g_BufferMap; - MG_Global::unordered_map g_TextureMap; - MG_Global::unordered_map g_TextureViewMap; - MG_Global::unordered_map g_FramebufferMap; - MG_Global::unordered_map g_ShaderMap; - MG_Global::unordered_map g_ProgramMap; - MG_Global::unordered_map g_SamplerMap; - MG_Global::unordered_map g_UniformBufferMap; - Diligent::IBuffer* g_TriangleFanIndexBuffer = nullptr; - GLuint g_NextResourceId = 0; -// bool IsInRenderPass = false; - bool initialized = false; - - void BuildInputLayout(GLuint program, VertexArrayState& vaState, - std::vector& inputLayout) { - inputLayout.clear(); - - auto& programObj = MG_State_T::programState->programs_[program]; - -// for (const auto& [attribIndex, attrib] : vaState.vaos_[vaState.currentVao_].attribs) { - for (uint32_t attribIndex = 0; attribIndex < MG_Constants::VertexArray::MAX_VERTEX_ATTRIBS; ++attribIndex) { - const auto& attrib = vaState.vaos_[vaState.currentVao_].attribs[attribIndex]; - if (!attrib.enabled) continue; - - std::string attribName; - for (auto [name, loc] : programObj.attribLocations) { - if (loc == attribIndex) { - attribName = name; - break; - } - } - - if (attribName.empty()) { - continue; - // This can happen if an attribute is bound but not used by the shader program. - } - - MG_State::QueryProgramAttributeLocation(program, attribName.c_str()); - if (attribIndex == -1) { - continue; - } - - Diligent::LayoutElement element; - element.InputIndex = attribIndex; - element.BufferSlot = 0; - element.NumComponents = attrib.size; - - switch (attrib.type) { - case GL_BYTE: element.ValueType = Diligent::VT_INT8; break; - case GL_UNSIGNED_BYTE: element.ValueType = Diligent::VT_UINT8; break; - case GL_SHORT: element.ValueType = Diligent::VT_INT16; break; - case GL_UNSIGNED_SHORT: element.ValueType = Diligent::VT_UINT16; break; - case GL_INT: element.ValueType = Diligent::VT_INT32; break; - case GL_UNSIGNED_INT: element.ValueType = Diligent::VT_UINT32; break; - case GL_FLOAT: element.ValueType = Diligent::VT_FLOAT32; break; - case GL_HALF_FLOAT: element.ValueType = Diligent::VT_FLOAT16; break; - case GL_DOUBLE: element.ValueType = Diligent::VT_FLOAT64; break; - default: element.ValueType = Diligent::VT_UNDEFINED; break; - } - - element.IsNormalized = attrib.normalized; - element.Stride = attrib.stride; // Set stride by attrib.stride - - element.RelativeOffset = static_cast(reinterpret_cast(attrib.pointer)); - - inputLayout.push_back(element); - - MG_Util::Debug::LogD("Built LayoutElement for attrib '%s' (location %d): " - "NumComponents=%d, ValueType=%d, IsNormalized=%s, RelativeOffset=%u, Stride=%u", - attribName.c_str(), attribIndex, - element.NumComponents, element.ValueType, - element.IsNormalized ? "true" : "false", - element.RelativeOffset, element.Stride); - } - } - - namespace { - template - inline void hash_combine(std::size_t& seed, const T& v) { - std::hash hasher; - seed ^= hasher(v) + 0x9e3779b9 + (seed << 6) + (seed >> 2); - } - } - - uint64_t PipelineStateManager::CalculateStateHash( - CommonState &commonState, - VertexArrayState &vaState, - GLFramebufferInfo& fbInfo, - GLenum primitiveTopology) { - size_t hash = 0; - - auto& capabilities = commonState.capabilities; - - hash_combine(hash, commonState.blendSrcRGB); - hash_combine(hash, commonState.blendDstRGB); - hash_combine(hash, commonState.blendSrcAlpha); - hash_combine(hash, commonState.blendDstAlpha); - uint32_t colorMask = (commonState.colorMask[0] ? 1 : 0) | - (commonState.colorMask[1] ? 2 : 0) | - (commonState.colorMask[2] ? 4 : 0) | - (commonState.colorMask[3] ? 8 : 0); - hash_combine(hash, colorMask); - hash_combine(hash, capabilities[GL_BLEND]); - - hash_combine(hash, commonState.depthFunc); - hash_combine(hash, commonState.depthMask); - hash_combine(hash, capabilities[GL_DEPTH_TEST]); - - hash_combine(hash, primitiveTopology); - hash_combine(hash, 0); // TODO: Cull Face Mode - hash_combine(hash, capabilities[GL_CULL_FACE]); - hash_combine(hash, capabilities[GL_STENCIL_TEST]); - - auto *pVAO = vaState.GetCurrentVAO(); - - for (uint32_t i = 0; i < MG_Constants::VertexArray::MAX_VERTEX_ATTRIBS; ++i) { - const auto& attrib = pVAO->attribs[i]; - if (attrib.enabled) { - hash_combine(hash, i); - hash_combine(hash, attrib.size); - hash_combine(hash, attrib.type); - hash_combine(hash, attrib.normalized); - } - } - - hash_combine(hash, fbInfo.ColorRTVs.size()); -// if (!fbInfo.pRenderPass) { - for (const auto& rtv : fbInfo.ColorRTVs) { - if (rtv) { - hash_combine(hash, rtv->GetDesc().Format); - } - } -// } - hash_combine(hash, fbInfo.DepthStencilFormat); - auto& programObj = MG_State_T::programState->programs_[MG_State_T::programState->currentProgram_]; - - for (auto& [name, uniform] : programObj.uniformValues) { - if (!MG_GL::GL::IsSamplerType(uniform.type)) continue; - - std::string textureIDStr; - if (!uniform.intData.empty()) { - auto textureUnit = static_cast(uniform.intData[0]); - auto unitState = &MG_State_T::textureState->textureUnits_[textureUnit]; - textureIDStr = "tex" + std::to_string(unitState->GetBoundTexture(unitState->activeTarget)); - hash_combine(hash, textureIDStr); - MG_Util::Debug::LogD("Hashing sampler: %s, texture: %s", name.c_str(), textureIDStr.c_str()); - } - } - return hash; - } - - void PipelineStateManager::ConfigurePSO( - Diligent::GraphicsPipelineStateCreateInfo &PSOCreateInfo, - GLProgramInfo &programInfo, - CommonState &commonState, - VertexArrayState &vaState, - GLFramebufferInfo& fbInfo, - GLenum primitiveTopology) { - PSOCreateInfo.PSODesc.Name = "Program_PSO"; - PSOCreateInfo.PSODesc.PipelineType = Diligent::PIPELINE_TYPE_GRAPHICS; - - MG_Util::Debug::LogD("Num AttachedShaders: %zu", programInfo.AttachedShaders.size()); - for (auto shader: programInfo.AttachedShaders) { - MG_Util::Debug::LogD("AttachedShader: %p, Type: %d", shader, shader->GetDesc().ShaderType); - switch (shader->GetDesc().ShaderType) { - case Diligent::SHADER_TYPE_VERTEX: - PSOCreateInfo.pVS = shader; - break; - case Diligent::SHADER_TYPE_PIXEL: - PSOCreateInfo.pPS = shader; - break; - case Diligent::SHADER_TYPE_GEOMETRY: - PSOCreateInfo.pGS = shader; - break; - default: - break; - } - } - - PSOCreateInfo.GraphicsPipeline.InputLayout.LayoutElements = programInfo.inputLayout.data(); - PSOCreateInfo.GraphicsPipeline.InputLayout.NumElements = programInfo.inputLayout.size(); - -// if (fbInfo.pRenderPass) { -// PSOCreateInfo.GraphicsPipeline.pRenderPass = fbInfo.pRenderPass; -// } else { -// PSOCreateInfo.GraphicsPipeline.pRenderPass = g_FramebufferMap[0].pRenderPass; // Default render pass -// } - - PSOCreateInfo.GraphicsPipeline.PrimitiveTopology = GLPrimitiveTopologyToDiligent(primitiveTopology); - -// if (fbInfo.pRenderPass) { -// PSOCreateInfo.GraphicsPipeline.NumRenderTargets = 0; -// } else - { - PSOCreateInfo.GraphicsPipeline.NumRenderTargets = fbInfo.ColorRTVs.size(); - if (PSOCreateInfo.GraphicsPipeline.NumRenderTargets == 0) { - PSOCreateInfo.GraphicsPipeline.NumRenderTargets = 1; - PSOCreateInfo.GraphicsPipeline.RTVFormats[0] = Diligent::TEX_FORMAT_RGBA8_UNORM; - } else { - for (size_t i = 0; i < fbInfo.ColorRTVs.size(); ++i) { - if (fbInfo.ColorRTVs[i]) { - PSOCreateInfo.GraphicsPipeline.RTVFormats[i] = - fbInfo.ColorRTVs[i]->GetDesc().Format; - } else { - PSOCreateInfo.GraphicsPipeline.RTVFormats[i] = Diligent::TEX_FORMAT_RGBA8_UNORM; - } - } - } - } - - PSOCreateInfo.GraphicsPipeline.DSVFormat = fbInfo.DepthStencilFormat; - - Diligent::BlendStateDesc &blendDesc = PSOCreateInfo.GraphicsPipeline.BlendDesc; - blendDesc.IndependentBlendEnable = false; - blendDesc.RenderTargets[0].BlendEnable = commonState.capabilities[GL_BLEND]; - blendDesc.RenderTargets[0].SrcBlend = ConvertGLBlendFactor(commonState.blendSrcRGB); - blendDesc.RenderTargets[0].DestBlend = ConvertGLBlendFactor(commonState.blendDstRGB); - blendDesc.RenderTargets[0].BlendOp = Diligent::BLEND_OPERATION_ADD; - blendDesc.RenderTargets[0].SrcBlendAlpha = ConvertGLBlendFactor( - commonState.blendSrcAlpha); - blendDesc.RenderTargets[0].DestBlendAlpha = ConvertGLBlendFactor( - commonState.blendDstAlpha); - blendDesc.RenderTargets[0].BlendOpAlpha = Diligent::BLEND_OPERATION_ADD; - blendDesc.RenderTargets[0].RenderTargetWriteMask = (Diligent::COLOR_MASK)( - (commonState.colorMask[0] ? Diligent::COLOR_MASK_RED : 0) | - (commonState.colorMask[1] ? Diligent::COLOR_MASK_GREEN : 0) | - (commonState.colorMask[2] ? Diligent::COLOR_MASK_BLUE : 0) | - (commonState.colorMask[3] ? Diligent::COLOR_MASK_ALPHA : 0)); - - MG_Util::Debug::LogD("Configured Blend State:"); -// MG_Util::Debug::LogD(" Using explicit render pass: %s", fbInfo.pRenderPass ? "true" : "false"); - MG_Util::Debug::LogD(" NumRenderTargets: %u", PSOCreateInfo.GraphicsPipeline.NumRenderTargets); - MG_Util::Debug::LogD(" IndependentBlendEnable: %s", blendDesc.IndependentBlendEnable ? "true" : "false"); - MG_Util::Debug::LogD(" RenderTargets[0].BlendEnable: %s", blendDesc.RenderTargets[0].BlendEnable ? "true" : "false"); - MG_Util::Debug::LogD(" RenderTargets[0].SrcBlend: %d (GL: %s)", - blendDesc.RenderTargets[0].SrcBlend, - MG_Util::Debug::GLEnumToString(commonState.blendSrcRGB)); - MG_Util::Debug::LogD(" RenderTargets[0].DestBlend: %d (GL: %s)", - blendDesc.RenderTargets[0].DestBlend, - MG_Util::Debug::GLEnumToString(commonState.blendDstRGB)); - MG_Util::Debug::LogD(" RenderTargets[0].BlendOp: %d", blendDesc.RenderTargets[0].BlendOp); - MG_Util::Debug::LogD(" RenderTargets[0].SrcBlendAlpha: %d (GL: %s)", - blendDesc.RenderTargets[0].SrcBlendAlpha, - MG_Util::Debug::GLEnumToString(commonState.blendSrcAlpha)); - MG_Util::Debug::LogD(" RenderTargets[0].DestBlendAlpha: %d (GL: %s)", - blendDesc.RenderTargets[0].DestBlendAlpha, - MG_Util::Debug::GLEnumToString(commonState.blendDstAlpha)); - MG_Util::Debug::LogD(" RenderTargets[0].BlendOpAlpha: %d", blendDesc.RenderTargets[0].BlendOpAlpha); - MG_Util::Debug::LogD(" RenderTargets[0].RenderTargetWriteMask: %u", blendDesc.RenderTargets[0].RenderTargetWriteMask); - - Diligent::DepthStencilStateDesc &depthStencilDesc = PSOCreateInfo.GraphicsPipeline.DepthStencilDesc; - depthStencilDesc.DepthEnable = commonState.capabilities[GL_DEPTH_TEST]; - depthStencilDesc.DepthWriteEnable = commonState.depthMask; - depthStencilDesc.DepthFunc = ConvertGLDepthFunc(commonState.depthFunc); - - Diligent::RasterizerStateDesc &rasterizerDesc = PSOCreateInfo.GraphicsPipeline.RasterizerDesc; - rasterizerDesc.CullMode = commonState.capabilities[GL_CULL_FACE] ? - Diligent::CULL_MODE_BACK : Diligent::CULL_MODE_NONE; - rasterizerDesc.FrontCounterClockwise = false; - // TODO: Get correct FrontCounterClockwise state and re-enable backface culling. - - if (!programInfo.inputLayout.empty()) { - PSOCreateInfo.GraphicsPipeline.InputLayout.LayoutElements = programInfo.inputLayout.data(); - PSOCreateInfo.GraphicsPipeline.InputLayout.NumElements = - static_cast(programInfo.inputLayout.size()); - - MG_Util::Debug::LogD("Configured InputLayout with %zu elements", - programInfo.inputLayout.size()); - } else { - MG_Util::Debug::LogW("No input layout elements for PSO"); - PSOCreateInfo.GraphicsPipeline.InputLayout.LayoutElements = nullptr; - PSOCreateInfo.GraphicsPipeline.InputLayout.NumElements = 0; - } - - - ConfigureResourceLayout(PSOCreateInfo, programInfo); - } - - void PipelineStateManager::ReleasePSO(GLuint program) { - if (program == 0) - return; - auto &programInfo = g_ProgramMap[program]; - if (programInfo.pPipelineState) { - MG_Util::Debug::LogD("Releasing PSO for program %u", program); - programInfo.pPipelineState->Release(); - programInfo.pPipelineState = nullptr; - MG_Util::Debug::LogD("PSO released for program %u", program); - } - programInfo.psoDirty = true; - } - - void PipelineStateManager::MarkPSODirty(GLuint program) { - if (program == 0) - return; - auto &programInfo = g_ProgramMap[program]; - programInfo.psoDirty = true; - MG_Util::Debug::LogD("Marked PSO dirty for program %u", program); - } - - Diligent::IPipelineState *PipelineStateManager::GetOrCreatePSO( - GLuint program, - GLProgramInfo &programInfo, - CommonState &commonState, - VertexArrayState &vaState, - GLFramebufferInfo& fbInfo, - GLenum primitiveTopology) { - uint64_t currentStateHash = CalculateStateHash(commonState, vaState, fbInfo, primitiveTopology); - - if (programInfo.pPipelineState && - programInfo.psoStateHash == currentStateHash && - !programInfo.psoDirty) { - MG_Util::Debug::LogD("PSO unchanged"); - return programInfo.pPipelineState; - } - - MG_Util::Debug::LogD("commonState - Blend states: "); - MG_Util::Debug::LogD(" SrcBlend: %s", MG_Util::Debug::GLEnumToString(commonState.blendSrcRGB)); - MG_Util::Debug::LogD(" DestBlend: %s", MG_Util::Debug::GLEnumToString(commonState.blendDstRGB)); - MG_Util::Debug::LogD(" SrcBlendAlpha: %s", MG_Util::Debug::GLEnumToString(commonState.blendSrcAlpha)); - MG_Util::Debug::LogD(" DestBlendAlpha: %s", MG_Util::Debug::GLEnumToString(commonState.blendDstAlpha)); - - PSOKey key{program, currentStateHash}; - - auto it = psoCache.find(key); - if (it != psoCache.end() && it->second) { - MG_Util::Debug::LogD("Found cached PSO: %04X%04X", it->first.programHash, it->first.stateHash); - - auto& desc = it->second->GetGraphicsPipelineDesc(); - MG_Util::Debug::LogD("PSO state - Blend states: "); - MG_Util::Debug::LogD(" SrcBlend: %s", MG_Util::Debug::DiligentBlendFactorToString(desc.BlendDesc.RenderTargets[0].SrcBlend)); - MG_Util::Debug::LogD(" DestBlend: %s", MG_Util::Debug::DiligentBlendFactorToString(desc.BlendDesc.RenderTargets[0].DestBlend)); - MG_Util::Debug::LogD(" SrcBlendAlpha: %s", MG_Util::Debug::DiligentBlendFactorToString(desc.BlendDesc.RenderTargets[0].SrcBlendAlpha)); - MG_Util::Debug::LogD(" DestBlendAlpha: %s", MG_Util::Debug::DiligentBlendFactorToString(desc.BlendDesc.RenderTargets[0].DestBlendAlpha)); - // These asserts can fail - assert(ConvertGLBlendFactor(commonState.blendSrcRGB) == desc.BlendDesc.RenderTargets[0].SrcBlend); - assert(ConvertGLBlendFactor(commonState.blendDstRGB) == desc.BlendDesc.RenderTargets[0].DestBlend); - assert(ConvertGLBlendFactor(commonState.blendSrcAlpha) == desc.BlendDesc.RenderTargets[0].SrcBlendAlpha); - assert(ConvertGLBlendFactor(commonState.blendDstAlpha) == desc.BlendDesc.RenderTargets[0].DestBlendAlpha); - - assert(ConvertGLDepthFunc(commonState.depthFunc) == desc.DepthStencilDesc.DepthFunc); -// assert(commonState.capabilities[GL_DEPTH_TEST] == desc.DepthStencilDesc.DepthEnable); -// if ((ConvertGLBlendFactor(commonState.blendSrcRGB) == desc.BlendDesc.RenderTargets[0].SrcBlend) && -// (ConvertGLBlendFactor(commonState.blendDstRGB) == desc.BlendDesc.RenderTargets[0].DestBlend) && -// (ConvertGLBlendFactor(commonState.blendSrcAlpha) == desc.BlendDesc.RenderTargets[0].SrcBlendAlpha) && -// (ConvertGLBlendFactor(commonState.blendDstAlpha) == desc.BlendDesc.RenderTargets[0].DestBlendAlpha)) - return it->second; - } - - MG_Diligent::BuildInputLayout(program, vaState, programInfo.inputLayout); - - Diligent::GraphicsPipelineStateCreateInfo PSOCreateInfo; - ConfigurePSO(PSOCreateInfo, programInfo, commonState, vaState, fbInfo, primitiveTopology); - - MG_Util::Debug::LogD("Dumping PSOCreateInfo for program %u:", program); - MG_Util::Debug::LogD(" PSODesc.Name: %s", PSOCreateInfo.PSODesc.Name); - MG_Util::Debug::LogD(" PSODesc.PipelineType: %d", PSOCreateInfo.PSODesc.PipelineType); - MG_Util::Debug::LogD(" PSODesc.ResourceLayout.DefaultVariableType: %d", PSOCreateInfo.PSODesc.ResourceLayout.DefaultVariableType); - MG_Util::Debug::LogD(" PSODesc.ResourceLayout.NumVariables: %u", PSOCreateInfo.PSODesc.ResourceLayout.NumVariables); - if (PSOCreateInfo.PSODesc.ResourceLayout.Variables) { - for (Diligent::Uint32 i = 0; i < PSOCreateInfo.PSODesc.ResourceLayout.NumVariables; ++i) { - MG_Util::Debug::LogD(" Variable %u:", i); - MG_Util::Debug::LogD(" Name: %s", PSOCreateInfo.PSODesc.ResourceLayout.Variables[i].Name); - MG_Util::Debug::LogD(" ShaderStages: %u", PSOCreateInfo.PSODesc.ResourceLayout.Variables[i].ShaderStages); - MG_Util::Debug::LogD(" Type: %d", PSOCreateInfo.PSODesc.ResourceLayout.Variables[i].Type); - } - } - MG_Util::Debug::LogD(" PSODesc.ResourceLayout.NumImmutableSamplers: %u", PSOCreateInfo.PSODesc.ResourceLayout.NumImmutableSamplers); - if (PSOCreateInfo.PSODesc.ResourceLayout.ImmutableSamplers) { - for (Diligent::Uint32 i = 0; i < PSOCreateInfo.PSODesc.ResourceLayout.NumImmutableSamplers; ++i) { - MG_Util::Debug::LogD(" ImmutableSampler %u:", i); - MG_Util::Debug::LogD(" ShaderStages: %u", PSOCreateInfo.PSODesc.ResourceLayout.ImmutableSamplers[i].ShaderStages); - MG_Util::Debug::LogD(" SamplerOrTextureName: %s", PSOCreateInfo.PSODesc.ResourceLayout.ImmutableSamplers[i].SamplerOrTextureName); - // SamplerDesc - MG_Util::Debug::LogD(" Desc.MinFilter: %d", PSOCreateInfo.PSODesc.ResourceLayout.ImmutableSamplers[i].Desc.MinFilter); - MG_Util::Debug::LogD(" Desc.MagFilter: %d", PSOCreateInfo.PSODesc.ResourceLayout.ImmutableSamplers[i].Desc.MagFilter); - MG_Util::Debug::LogD(" Desc.MipFilter: %d", PSOCreateInfo.PSODesc.ResourceLayout.ImmutableSamplers[i].Desc.MipFilter); - MG_Util::Debug::LogD(" Desc.AddressU: %d", PSOCreateInfo.PSODesc.ResourceLayout.ImmutableSamplers[i].Desc.AddressU); - MG_Util::Debug::LogD(" Desc.AddressV: %d", PSOCreateInfo.PSODesc.ResourceLayout.ImmutableSamplers[i].Desc.AddressV); - MG_Util::Debug::LogD(" Desc.AddressW: %d", PSOCreateInfo.PSODesc.ResourceLayout.ImmutableSamplers[i].Desc.AddressW); - } - } - MG_Util::Debug::LogD(" pVS: %p (Shader Type: %d)", PSOCreateInfo.pVS, PSOCreateInfo.pVS ? PSOCreateInfo.pVS->GetDesc().ShaderType : -1); - MG_Util::Debug::LogD(" pPS: %p (Shader Type: %d)", PSOCreateInfo.pPS, PSOCreateInfo.pPS ? PSOCreateInfo.pPS->GetDesc().ShaderType : -1); - MG_Util::Debug::LogD(" pGS: %p (Shader Type: %d)", PSOCreateInfo.pGS, PSOCreateInfo.pGS ? PSOCreateInfo.pGS->GetDesc().ShaderType : -1); - // GraphicsPipeline - MG_Util::Debug::LogD(" GraphicsPipeline.InputLayout.NumElements: %u", PSOCreateInfo.GraphicsPipeline.InputLayout.NumElements); - if (PSOCreateInfo.GraphicsPipeline.InputLayout.LayoutElements) { - for (Diligent::Uint32 i = 0; i < PSOCreateInfo.GraphicsPipeline.InputLayout.NumElements; ++i) { - MG_Util::Debug::LogD(" LayoutElement %u:", i); - MG_Util::Debug::LogD(" InputIndex: %u", PSOCreateInfo.GraphicsPipeline.InputLayout.LayoutElements[i].InputIndex); - MG_Util::Debug::LogD(" BufferSlot: %u", PSOCreateInfo.GraphicsPipeline.InputLayout.LayoutElements[i].BufferSlot); - MG_Util::Debug::LogD(" NumComponents: %u", PSOCreateInfo.GraphicsPipeline.InputLayout.LayoutElements[i].NumComponents); - MG_Util::Debug::LogD(" ValueType: %d", PSOCreateInfo.GraphicsPipeline.InputLayout.LayoutElements[i].ValueType); - MG_Util::Debug::LogD(" IsNormalized: %s", PSOCreateInfo.GraphicsPipeline.InputLayout.LayoutElements[i].IsNormalized ? "true" : "false"); - } - MG_Util::Debug::LogD(" GraphicsPipeline.pRenderPass: %p", PSOCreateInfo.GraphicsPipeline.pRenderPass); - } - MG_Util::Debug::LogD(" GraphicsPipeline.PrimitiveTopology: %d", PSOCreateInfo.GraphicsPipeline.PrimitiveTopology); - MG_Util::Debug::LogD(" GraphicsPipeline.NumRenderTargets: %u", PSOCreateInfo.GraphicsPipeline.NumRenderTargets); - for (Diligent::Uint8 i = 0; i < PSOCreateInfo.GraphicsPipeline.NumRenderTargets; ++i) { - MG_Util::Debug::LogD(" RTVFormats[%u]: %d", i, PSOCreateInfo.GraphicsPipeline.RTVFormats[i]); - } - MG_Util::Debug::LogD(" GraphicsPipeline.DSVFormat: %d", PSOCreateInfo.GraphicsPipeline.DSVFormat); - MG_Util::Debug::LogD(" GraphicsPipeline.BlendDesc.IndependentBlendEnable: %s", PSOCreateInfo.GraphicsPipeline.BlendDesc.IndependentBlendEnable ? "true" : "false"); - MG_Util::Debug::LogD(" GraphicsPipeline.DepthStencilDesc.DepthEnable: %s", PSOCreateInfo.GraphicsPipeline.DepthStencilDesc.DepthEnable ? "true" : "false"); - MG_Util::Debug::LogD(" GraphicsPipeline.DepthStencilDesc.DepthFunc: 0x%x", PSOCreateInfo.GraphicsPipeline.DepthStencilDesc.DepthFunc); - MG_Util::Debug::LogD(" GraphicsPipeline.RasterizerDesc.CullMode: %d", PSOCreateInfo.GraphicsPipeline.RasterizerDesc.CullMode); - - MG_Util::Debug::LogD("Blend states: "); - MG_Util::Debug::LogD(" GraphicsPipeline.BlendDesc.RenderTargets[0].BlendEnable: %s", PSOCreateInfo.GraphicsPipeline.BlendDesc.RenderTargets[0].BlendEnable ? "true" : "false"); - MG_Util::Debug::LogD(" GraphicsPipeline.BlendDesc.RenderTargets[0].SrcBlend: %s", MG_Util::Debug::GLEnumToString(commonState.blendSrcRGB)); - MG_Util::Debug::LogD(" GraphicsPipeline.BlendDesc.RenderTargets[0].DestBlend: %s", MG_Util::Debug::GLEnumToString(commonState.blendDstRGB)); - MG_Util::Debug::LogD(" GraphicsPipeline.BlendDesc.RenderTargets[0].SrcBlendAlpha: %s", MG_Util::Debug::GLEnumToString(commonState.blendSrcAlpha)); - MG_Util::Debug::LogD(" GraphicsPipeline.BlendDesc.RenderTargets[0].DestBlendAlpha: %s", MG_Util::Debug::GLEnumToString(commonState.blendDstAlpha)); - - Diligent::IPipelineState *pNewPSO = nullptr; - MG_Util::Debug::LogD("Creating new PSO for program %u", program); - g_pDevice->CreateGraphicsPipelineState(PSOCreateInfo, &pNewPSO); - if (pNewPSO) { - MG_Util::Debug::LogD("PSO created successfully for program %u: %p, key = %04X%04X", program, pNewPSO, key.programHash, key.stateHash); - } else { - MG_Util::Debug::LogE("Failed to create PSO for program %u", program); - } - - psoCache[key] = pNewPSO; - - if constexpr (MG_Global::Common::LogLevel >= MG_Constants::Common::LOG_LEVEL_DEBUG) { - MG_Util::Debug::LogD("PSO list = ["); - for (auto& pso: psoCache) { - MG_Util::Debug::LogD(" %04X%04X,", pso.first.programHash, pso.first.stateHash); - } - MG_Util::Debug::LogD("] // PSO list end"); - } - - return pNewPSO; - } - - void PipelineStateManager::ConfigureResourceLayout( - Diligent::GraphicsPipelineStateCreateInfo& PSOCreateInfo, - GLProgramInfo& programInfo) - { - MG_Util::Debug::LogD("Begin configuring resource layout for pipeline"); - - auto& ResourceLayout = PSOCreateInfo.PSODesc.ResourceLayout; - ResourceLayout.DefaultVariableType = Diligent::SHADER_RESOURCE_VARIABLE_TYPE_MUTABLE; - - static std::vector Variables; - Variables.clear(); - - MG_Global::unordered_map shaderSourcesMap; - - ProgramObject programObj = MG_State_T::programState->programs_[programInfo.id]; - - for (GLuint shaderId : programObj.attachedShaders) { - auto it = MG_State_T::programState->shaders_.find(shaderId); - if (it != MG_State_T::programState->shaders_.end()) { - std::string shaderSource; - if (it->second.type == GL_VERTEX_SHADER) { - std::string infoLog; - auto spirv = - MG_Util::Program::CompileGLSLToSPIRV(it->second.type, - it->second.source, - infoLog); - if (spirv.empty()) { - MG_Util::Debug::LogE("Shader Source for %u:\n%s", shaderId, - it->second.source.c_str()); - MG_Util::Debug::LogE("Failed to compile shader %u: %s", shaderId, - infoLog.c_str()); - continue; - } - - shaderSource = MG_Util::Program::BindInputLayoutLocationsForGLSL(spirv, - programObj.attribLocations); - // MG_Util::Program::RenameGLSLBuiltinsForVulkan(shaderSource); - } else { - shaderSource = it->second.source; - } - shaderSourcesMap[it->first] = shaderSource; - } - } - - MG_Util::Program::GenerateDefaultUBOForGLSL_Multi(shaderSourcesMap, programInfo.uniformBufferNames); - MG_Util::Debug::LogD("ConfigureResourceLayout: uniformBufferNames for %u:", programInfo.id); - for (auto& name: programInfo.uniformBufferNames) { - MG_Util::Debug::LogD(" %s", name.c_str()); - } - - for (auto shaderId : programInfo.AttachedShadersID) { - auto shader = MG_Diligent::g_ShaderMap[shaderId]; - MG_Util::Debug::LogD("Processing shader ID: %u", shaderId); - - auto& shaderObj = MG_State_T::programState->shaders_[shaderId]; - MG_Util::Debug::LogD("Shader source for %u before SPIR-V compilation:\n%s", shaderId, - shaderSourcesMap[shaderId].c_str()); - - std::string compilationLog; - auto spirv = - MG_Util::Program::CompileGLSLToSPIRV(shaderObj.type, - shaderSourcesMap[shaderId], - compilationLog); - if (spirv.empty()) { - MG_Util::Debug::LogE("Failed to compile shader %u: %s", shaderId, compilationLog.c_str()); - continue; - } else { - MG_Util::Debug::LogD("Shader %u (modified) compiled to SPIR-V successfully", shaderId); - } - - spvc_context context = nullptr; - spvc_parsed_ir parsed_ir = nullptr; - spvc_compiler compiler = nullptr; - spvc_resources resources = nullptr; - - spvc_result result = spvc_context_create(&context); - if (result != SPVC_SUCCESS) { - MG_Util::Debug::LogE("spvc_context_create failed for shader %u", shaderId); - continue; - } - - result = spvc_context_parse_spirv(context, - spirv.data(), - spirv.size(), - &parsed_ir); - - if (result != SPVC_SUCCESS) { - MG_Util::Debug::LogE("spvc_context_parse_spirv failed for shader %u", shaderId); - spvc_context_destroy(context); - continue; - } - - result = spvc_context_create_compiler(context, SPVC_BACKEND_GLSL, - parsed_ir, SPVC_CAPTURE_MODE_TAKE_OWNERSHIP, &compiler); - - if (result != SPVC_SUCCESS) { - MG_Util::Debug::LogE("spvc_context_create_compiler failed for shader %u", shaderId); - spvc_context_destroy(context); - continue; - } - - result = spvc_compiler_create_shader_resources(compiler, &resources); - if (result != SPVC_SUCCESS) { - MG_Util::Debug::LogE("spvc_compiler_create_shader_resources failed for shader %u", shaderId); - spvc_context_destroy(context); - continue; - } - - Diligent::SHADER_TYPE shaderType; - switch (shaderObj.type) { - case GL_VERTEX_SHADER: - shaderType = Diligent::SHADER_TYPE_VERTEX; - break; - case GL_FRAGMENT_SHADER: - shaderType = Diligent::SHADER_TYPE_PIXEL; - break; - case GL_GEOMETRY_SHADER: - shaderType = Diligent::SHADER_TYPE_GEOMETRY; - break; - case GL_COMPUTE_SHADER: - shaderType = Diligent::SHADER_TYPE_COMPUTE; - break; - default: - shaderType = Diligent::SHADER_TYPE_UNKNOWN; - } - - MG_Util::Debug::LogD("Shader %u mapped to Diligent shader type %d", shaderId, shaderType); - - const spvc_reflected_resource* resourceList = nullptr; - size_t resourceCount = 0; - - spvc_resources_get_resource_list_for_type( - resources, SPVC_RESOURCE_TYPE_UNIFORM_BUFFER, - &resourceList, &resourceCount); - MG_Util::Debug::LogD("Shader %u has %zu uniform buffers", shaderId, resourceCount); - - for (size_t i = 0; i < resourceCount; i++) { - bool already_added = false; - for(const auto& existing_var : Variables) { - if (strcmp(existing_var.Name, resourceList[i].name) == 0) { - already_added = true; - MG_Util::Debug::LogD("Uniform buffer %s already added, skipping.", resourceList[i].name); - break; - } - } - if (already_added) continue; - - Diligent::ShaderResourceVariableDesc varDesc; - varDesc.Name = strdup(resourceList[i].name); - varDesc.ShaderStages = shaderType; - varDesc.Type = Diligent::SHADER_RESOURCE_VARIABLE_TYPE_MUTABLE; - MG_Util::Debug::LogD("Uniform buffer: %s, Stage: %u, Type: %u", varDesc.Name, varDesc.ShaderStages, varDesc.Type); - Variables.push_back(varDesc); - } - - spvc_resources_get_resource_list_for_type( - resources, SPVC_RESOURCE_TYPE_SAMPLED_IMAGE, - &resourceList, &resourceCount); - MG_Util::Debug::LogD("Shader %u has %zu sampled images", shaderId, resourceCount); - - for (size_t i = 0; i < resourceCount; i++) { - Diligent::ShaderResourceVariableDesc varDesc; - varDesc.Name = strdup(resourceList[i].name); - varDesc.ShaderStages = shaderType; - varDesc.Type = Diligent::SHADER_RESOURCE_VARIABLE_TYPE_MUTABLE; - MG_Util::Debug::LogD("Sampled image: %s", varDesc.Name); - Variables.push_back(varDesc); - } - - spvc_resources_get_resource_list_for_type( - resources, SPVC_RESOURCE_TYPE_SEPARATE_SAMPLERS, - &resourceList, &resourceCount); - MG_Util::Debug::LogD("Shader %u has %zu separate samplers", shaderId, resourceCount); - - for (size_t i = 0; i < resourceCount; i++) { - Diligent::ShaderResourceVariableDesc varDesc; - varDesc.Name = strdup(resourceList[i].name); - varDesc.ShaderStages = shaderType; - varDesc.Type = Diligent::SHADER_RESOURCE_VARIABLE_TYPE_MUTABLE; - Variables.push_back(varDesc); - MG_Util::Debug::LogD("Separate sampler: %s", varDesc.Name); - } - - spvc_resources_get_resource_list_for_type( - resources, SPVC_RESOURCE_TYPE_STORAGE_IMAGE, - &resourceList, &resourceCount); - MG_Util::Debug::LogD("Shader %u has %zu storage images", shaderId, resourceCount); - - for (size_t i = 0; i < resourceCount; i++) { - Diligent::ShaderResourceVariableDesc varDesc; - varDesc.Name = strdup(resourceList[i].name); - varDesc.ShaderStages = shaderType; - varDesc.Type = Diligent::SHADER_RESOURCE_VARIABLE_TYPE_MUTABLE; - MG_Util::Debug::LogD("Storage image: %s", varDesc.Name); - Variables.push_back(varDesc); - } - - spvc_context_destroy(context); - } - - if (!Variables.empty()) { - ResourceLayout.Variables = Variables.data(); - ResourceLayout.NumVariables = static_cast(Variables.size()); - MG_Util::Debug::LogD("Added %u shader resource variables", ResourceLayout.NumVariables); - } - - ResourceLayout.ImmutableSamplers = nullptr; - ResourceLayout.NumImmutableSamplers = 0; - MG_Util::Debug::LogD("Immutable samplers disabled"); - - MG_Util::Debug::LogD("Finished configuring resource layout"); - } - - - - PipelineStateManager g_PSOManager; -} - -using namespace Diligent; - -namespace MG_EGL::Diligent { - void CreateWindowDiligentCoreOpenGL(NativeWindowType window) { - void *handle = dlopen("libGraphicsEngineOpenGL.so", RTLD_LAZY); - auto Diligent_GetEngineFactoryOpenGL = - (Diligent_GetEngineFactoryOpenGL_t) dlsym(handle, - "Diligent_GetEngineFactoryOpenGL"); - - auto *pFactoryOpenGL = Diligent_GetEngineFactoryOpenGL(); - ::Diligent::EngineGLCreateInfo EngineCI; - auto *nativeWindow = static_cast(window); - EngineCI.Window.pAWindow = nativeWindow; - - ::Diligent::SwapChainDesc SCDesc; - - MG_Util::Debug::LogD("Creating OpenGL device and swap chain"); - pFactoryOpenGL->CreateDeviceAndSwapChainGL( - EngineCI, &MG_Diligent::g_pDevice, &MG_Diligent::g_pContext, SCDesc, &MG_Diligent::g_pSwapChain); - if (MG_Diligent::g_pDevice && MG_Diligent::g_pContext && MG_Diligent::g_pSwapChain) { - MG_Util::Debug::LogD("OpenGL device created: device=%p, context=%p, swapchain=%p", - MG_Diligent::g_pDevice, MG_Diligent::g_pContext, MG_Diligent::g_pSwapChain); - } else { - MG_Util::Debug::LogE("Failed to create OpenGL device"); - } - } - - void CreateWindowDiligentCoreVulkan(NativeWindowType window) { - AndroidNativeWindow nativeWindow{window}; - auto* pFactoryVk = static_cast(MG_Diligent::g_pFactory); - MG_Util::Debug::LogD("Creating Vulkan swap chain"); - - ::Diligent::SwapChainDesc SCDesc; - SCDesc.ColorBufferFormat = TEX_FORMAT_RGBA8_UNORM; - SCDesc.PreTransform = SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_180; - - pFactoryVk->CreateSwapChainVk( - MG_Diligent::g_pDevice, MG_Diligent::g_pContext, SCDesc, nativeWindow, &MG_Diligent::g_pSwapChain); - if (MG_Diligent::g_pSwapChain) { - MG_Util::Debug::LogD("Vulkan swap chain created: %p", MG_Diligent::g_pSwapChain); - } else { - MG_Util::Debug::LogE("Failed to create Vulkan swap chain"); - } - } - - void CreateWindowDiligentCore(NativeWindowType window) { - switch (MG_Diligent::DILIGENT_BACKEND_TYPE) { - case MG_Constants::Backend::BACKEND_DILIGENT_VULKAN: - CreateWindowDiligentCoreVulkan(window); - break; - case MG_Constants::Backend::BACKEND_DILIGENT_OPENGL: - default: - CreateWindowDiligentCoreOpenGL(window); - break; - } - } - - void LoadDiligentCoreVulkan() { - void *handle = dlopen("libGraphicsEngineVk.so", RTLD_LAZY); - auto Diligent_GetEngineFactoryVk = - (Diligent_GetEngineFactoryVk_t) dlsym(handle, - "Diligent_GetEngineFactoryVk"); - - auto *pFactoryVk = Diligent_GetEngineFactoryVk(); - MG_Diligent::g_pFactory = pFactoryVk; - ::Diligent::EngineVkCreateInfo EngineCI; - EngineCI.DynamicHeapSize = 512 << 20; - EngineCI.Features.NativeMultiDraw = DEVICE_FEATURE_STATE_OPTIONAL; - - MG_Util::Debug::LogD("Creating Vulkan device and contexts"); - pFactoryVk->CreateDeviceAndContextsVk( - EngineCI, &MG_Diligent::g_pDevice, &MG_Diligent::g_pContext); - - if (MG_Diligent::g_pDevice && MG_Diligent::g_pContext) { - MG_Util::Debug::LogD("Vulkan device created: device=%p, context=%p", - MG_Diligent::g_pDevice, MG_Diligent::g_pContext); - auto version = MG_Diligent::g_pDevice->GetDeviceInfo().APIVersion; - std::string apiVersion; - switch (MG_Diligent::DILIGENT_BACKEND_TYPE) { - case MG_Constants::Backend::BACKEND_DILIGENT_VULKAN: - apiVersion = std::format("Vulkan {}.{}", version.Major, version.Minor); - break; - case MG_Constants::Backend::BACKEND_DILIGENT_METAL: - apiVersion = std::format("Metal {}.{}", version.Major, version.Minor); - break; - case MG_Constants::Backend::BACKEND_DILIGENT_OPENGL: - apiVersion = std::format("OpenGL {}.{}", version.Major, version.Minor); - break; - default: - apiVersion = ""; - } - MG_Util::Debug::LogI("Running on %s, %s", MG_Diligent::g_pDevice->GetAdapterInfo().Description, apiVersion.c_str()); - MG_Util::Debug::LogI("NativeMultiDraw is%s supported.", (MG_Diligent::g_pDevice->GetDeviceInfo().Features.NativeMultiDraw != DEVICE_FEATURE_STATE_DISABLED) ? " " : " not"); - } else { - MG_Util::Debug::LogE("Failed to create Vulkan device"); - } - - } - - void LoadDiligentCore() { - switch (MG_Diligent::DILIGENT_BACKEND_TYPE) { - case MG_Constants::Backend::BACKEND_DILIGENT_VULKAN: - LoadDiligentCoreVulkan(); - break; - case MG_Constants::Backend::BACKEND_DILIGENT_OPENGL: - default: -// CreateWindowDiligentCoreOpenGL(window); - break; - } - } - - void CreateDefaultRenderPass() { - ::Diligent::RenderPassDesc RPDesc; - RPDesc.AttachmentCount = 2; - ::Diligent::RenderPassAttachmentDesc Attachments[2]; - RPDesc.pAttachments = Attachments; - - Attachments[0].Format = ::Diligent::TEX_FORMAT_RGBA8_UNORM; - Attachments[0].InitialState = ::Diligent::RESOURCE_STATE_RENDER_TARGET; - Attachments[0].FinalState = ::Diligent::RESOURCE_STATE_RENDER_TARGET; - Attachments[0].LoadOp = ::Diligent::ATTACHMENT_LOAD_OP_CLEAR; - Attachments[0].StoreOp = ::Diligent::ATTACHMENT_STORE_OP_STORE; - - Attachments[1].Format = ::Diligent::TEX_FORMAT_D24_UNORM_S8_UINT; - Attachments[1].InitialState = ::Diligent::RESOURCE_STATE_DEPTH_WRITE; - Attachments[1].FinalState = ::Diligent::RESOURCE_STATE_DEPTH_WRITE; - Attachments[1].LoadOp = ::Diligent::ATTACHMENT_LOAD_OP_CLEAR; - Attachments[1].StoreOp = ::Diligent::ATTACHMENT_STORE_OP_STORE; - - ::Diligent::AttachmentReference RTAttachmentRef{0, ::Diligent::RESOURCE_STATE_RENDER_TARGET}; - ::Diligent::AttachmentReference DSAttachmentRef{1, ::Diligent::RESOURCE_STATE_DEPTH_WRITE}; - - ::Diligent::SubpassDesc Subpasses[1]; - Subpasses[0].RenderTargetAttachmentCount = 1; - Subpasses[0].pRenderTargetAttachments = &RTAttachmentRef; - Subpasses[0].pDepthStencilAttachment = &DSAttachmentRef; - - RPDesc.SubpassCount = 1; - RPDesc.pSubpasses = Subpasses; - -// MG_Util::Debug::LogD("Creating default render pass"); -// MG_Diligent::g_pDevice->CreateRenderPass(RPDesc, &MG_Diligent::g_FramebufferMap[0].pRenderPass); -// if (MG_Diligent::g_FramebufferMap[0].pRenderPass) { -// MG_Util::Debug::LogD("Default render pass created: %p", MG_Diligent::g_FramebufferMap[0].pRenderPass); -// } else { -// MG_Util::Debug::LogE("Failed to create default render pass"); -// } - } - - EGLSurface eglCreateWindowSurface(EGLDisplay dpy, EGLConfig config, NativeWindowType window, - const EGLint *attrib_list) { - CreateWindowDiligentCore(window); - MG_GL::GL::UpdateDefaultFramebuffer(); - return (EGLSurface) 1; - } - - EGLBoolean eglChooseConfig(EGLDisplay dpy, const EGLint *attrib_list, EGLConfig *configs, - EGLint config_size, EGLint *num_config) { - *num_config = 1; - return EGL_TRUE; - } - - EGLContext eglCreateContext(EGLDisplay dpy, EGLConfig config, EGLContext shareCtx, - const EGLint *attrib_list) { - return (EGLContext) 1; - } - - EGLBoolean eglInitialize(EGLDisplay dpy, EGLint *major, EGLint *minor) { - LoadDiligentCore(); - if (major) *major = 1; - if (minor) *minor = 5; - return EGL_TRUE; - } - - EGLDisplay eglGetDisplay(NativeDisplayType display) { - return (EGLDisplay) 1; - } - - EGLint eglGetError() { - return EGL_SUCCESS; - } - - EGLBoolean eglMakeCurrent(EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext ctx) { - return EGL_TRUE; - } - - EGLBoolean eglDestroyContext(EGLDisplay dpy, EGLContext ctx) { - return EGL_TRUE; - } - - EGLBoolean eglDestroySurface(EGLDisplay dpy, EGLSurface surface) { - return EGL_TRUE; - } - - EGLBoolean eglTerminate(EGLDisplay dpy) { - return EGL_TRUE; - } - - EGLBoolean eglReleaseThread(void) { - return EGL_TRUE; - } - - EGLContext eglGetCurrentContext(void) { - return (EGLContext) 1; - } - - EGLBoolean - eglGetConfigAttrib(EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint *value) { - if (attribute == EGL_NATIVE_VISUAL_ID) - *value = AHARDWAREBUFFER_FORMAT_R8G8B8A8_UNORM; - return EGL_TRUE; - } - - EGLBoolean eglBindAPI(EGLenum api) { - return EGL_TRUE; - } - - EGLSurface eglGetCurrentSurface(EGLint readdraw) { - return (EGLSurface) 1; - } - - EGLBoolean - eglQuerySurface(EGLDisplay display, EGLSurface surface, EGLint attribute, EGLint *value) { - return EGL_TRUE; - } - - EGLBoolean eglSwapInterval(EGLDisplay dpy, EGLint interval) { - return EGL_TRUE; - } - - EGLBoolean eglSwapBuffers(EGLDisplay dpy, EGLSurface draw) { - MG_Util::Debug::LogD("Flushing context"); -// if (MG_Diligent::IsInRenderPass) { -// MG_Util::Debug::LogD("Ending current render pass."); -// MG_Diligent::g_pContext->EndRenderPass(); -// MG_Diligent::IsInRenderPass = false; -// MG_Util::Debug::LogD("Current render pass ended."); -// } else { -// MG_Util::Debug::LogD("No active render pass to end."); -// } - MG_Diligent::g_pContext->Flush(); - - MG_Util::Debug::LogD("Presenting swap chain"); - MG_Diligent::g_pSwapChain->Present(0); - MG_GL::GL::UpdateDefaultFramebuffer(); -// if (MG_Diligent::IsInRenderPass) { -// MG_Util::Debug::LogD("Ending current render pass."); -// MG_Diligent::g_pContext->EndRenderPass(); -// MG_Diligent::IsInRenderPass = false; -// MG_Util::Debug::LogD("Current render pass ended."); -// } else { -// MG_Util::Debug::LogD("No active render pass to end."); -// } - MG_Diligent::g_pContext->Flush(); - - MG_Util::Debug::LogD("Finishing frame"); - MG_Diligent::g_pContext->FinishFrame(); - - auto& fbInfo = MG_Diligent::g_FramebufferMap[0]; -// if (/*fbInfo.pRenderPass &&*/ fbInfo.pFramebuffer) { - MG_Util::Debug::LogD("Setting render targets: %zu color attachments", fbInfo.ColorRTVs.size()); - MG_Diligent::g_pContext->SetRenderTargets( - static_cast(fbInfo.ColorRTVs.size()), - fbInfo.ColorRTVs.data(), - fbInfo.pDepthStencilRTV, - ::Diligent::RESOURCE_STATE_TRANSITION_MODE_TRANSITION - ); - - static ::Diligent::OptimizedClearValue DefaultClearValues[2]; - DefaultClearValues[0].Format = fbInfo.ColorRTVs[0]->GetDesc().Format; - DefaultClearValues[0].Color[0] = 0.0f; - DefaultClearValues[0].Color[1] = 0.0f; - DefaultClearValues[0].Color[2] = 0.0f; - DefaultClearValues[0].Color[3] = 1.0f; - DefaultClearValues[1].Format = fbInfo.DepthStencilFormat; - DefaultClearValues[1].DepthStencil.Depth = 1.0f; - DefaultClearValues[1].DepthStencil.Stencil = 0; - -// MG_Util::Debug::LogD("Beginning render pass: pass=%p, fb=%p", fbInfo.pRenderPass, fbInfo.pFramebuffer); -// MG_Diligent::g_pContext->BeginRenderPass( -// ::Diligent::BeginRenderPassAttribs{ fbInfo.pRenderPass, fbInfo.pFramebuffer, -// 2, DefaultClearValues, -// ::Diligent::RESOURCE_STATE_TRANSITION_MODE_TRANSITION} -// ); -// MG_Diligent::IsInRenderPass = true; -// } -// const auto& SCDesc = MG_Diligent::g_pSwapChain->GetDesc(); -// MG_Util::Debug::LogD("Setting viewport: width=%d, height=%d", SCDesc.Width, SCDesc.Height); - -// ::Diligent::Viewport viewport; -// viewport.TopLeftX = 0.f; -// viewport.TopLeftY = SCDesc.Height; -// viewport.Width = SCDesc.Width; -// viewport.Height = SCDesc.Height; -// viewport.MinDepth = 0.f; -// viewport.MaxDepth = 1.f; - MG_Diligent::g_pContext->SetViewports(1, nullptr, 0, 0); - return EGL_TRUE; - } - - EGLSurface - eglCreatePbufferSurface(EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list) { - return (EGLSurface) 1; - } - -} - -void *libGLES = nullptr, *libEGL = nullptr; - -static const char *LibPathPrefixes[] = { - "", - "/opt/vc/lib/", - "/usr/local/lib/", - "/usr/lib/", - nullptr -}; - -static const char *LibExts[] = { - "so", - "so.1", - "so.2", - "dylib", - "dll", - nullptr -}; - -static const char *GLES3Libs[] = { - "libGLESv3_CM", - "libGLESv3", - nullptr -}; - -static const char *EGLLibs[] = { - "libEGL", - nullptr -}; - -void *OpenLib(const char **names, const char *override) { - void *lib = nullptr; - - char path_name[PATH_MAX + 1]; - int flags = RTLD_LOCAL | RTLD_NOW; - if (override) { - if ((lib = dlopen(override, flags))) { - strncpy(path_name, override, PATH_MAX); - return lib; - } else { - MG_Util::Debug::LogE("LIBGL_GLES override failed: %s\n", dlerror()); - } - } - for (int p = 0; LibPathPrefixes[p]; p++) { - for (int i = 0; names[i]; i++) { - for (int e = 0; LibExts[e]; e++) { - snprintf(path_name, PATH_MAX, "%s%s.%s", LibPathPrefixes[p], names[i], LibExts[e]); - if ((lib = dlopen(path_name, flags))) { - return lib; - } - } - } - } - return lib; -} - -typedef __eglMustCastToProperFunctionPointerType (* eglGetProcAddress_t)(const char *procname); -eglGetProcAddress_t real_eglGetProcAddress = nullptr; - -__eglMustCastToProperFunctionPointerType eglGetProcAddress(const char *procname) { - if (strncmp(procname, "eglGetProcAddress", strlen("eglGetProcAddress")) == 0) { - return (__eglMustCastToProperFunctionPointerType)(&eglGetProcAddress); - } - -#define MG_EGL_PROC_EXPORT(name) \ - if (strncmp(procname, #name, strlen(#name)) == 0) { \ - return (__eglMustCastToProperFunctionPointerType)(&MG_EGL::Diligent::name); \ - } - - MG_EGL_PROC_EXPORT(eglCreateWindowSurface); - MG_EGL_PROC_EXPORT(eglChooseConfig); - MG_EGL_PROC_EXPORT(eglCreateContext); - MG_EGL_PROC_EXPORT(eglInitialize); - MG_EGL_PROC_EXPORT(eglGetDisplay); - MG_EGL_PROC_EXPORT(eglGetError); - MG_EGL_PROC_EXPORT(eglMakeCurrent); - MG_EGL_PROC_EXPORT(eglDestroyContext); - MG_EGL_PROC_EXPORT(eglDestroySurface); - MG_EGL_PROC_EXPORT(eglTerminate); - MG_EGL_PROC_EXPORT(eglReleaseThread); - MG_EGL_PROC_EXPORT(eglGetCurrentContext); - MG_EGL_PROC_EXPORT(eglGetConfigAttrib); - MG_EGL_PROC_EXPORT(eglBindAPI); - MG_EGL_PROC_EXPORT(eglGetCurrentSurface); - MG_EGL_PROC_EXPORT(eglQuerySurface); - MG_EGL_PROC_EXPORT(eglSwapInterval); - MG_EGL_PROC_EXPORT(eglSwapBuffers); - MG_EGL_PROC_EXPORT(eglCreatePbufferSurface); -#undef MG_EGL_PROC_EXPORT - - /* TODO: Call real eglGetProcAddress() to get the rest (should be real native GLES functions) */ - if (!libEGL) { - libEGL = OpenLib(EGLLibs, nullptr); - real_eglGetProcAddress = (eglGetProcAddress_t)dlsym(libEGL, "eglGetProcAddress"); - } - if (real_eglGetProcAddress) - return real_eglGetProcAddress(procname); - - return nullptr; -} \ No newline at end of file diff --git a/MG/MG_GL/Implementations/EGL/Diligent/EGL_impl.h b/MG/MG_GL/Implementations/EGL/Diligent/EGL_impl.h deleted file mode 100644 index 1c185752..00000000 --- a/MG/MG_GL/Implementations/EGL/Diligent/EGL_impl.h +++ /dev/null @@ -1,264 +0,0 @@ -// -// Created by Swung 0x48 on 2025-05-18. -// - -#ifndef MOBILEGL_DILIGENT_EGL_IMPL_H -#define MOBILEGL_DILIGENT_EGL_IMPL_H - -#if BACKEND_TYPE == BACKEND_DILIGENT - -namespace MG_Diligent { - extern Diligent::IRenderDevice* g_pDevice; - extern Diligent::IDeviceContext* g_pContext; - extern Diligent::ISwapChain* g_pSwapChain; - extern MG_Global::unordered_map g_BufferMap; - extern MG_Global::unordered_map g_TextureMap; - extern MG_Global::unordered_map g_TextureViewMap; - - struct GLFramebufferInfo - { -// Diligent::IFramebuffer* pFramebuffer = nullptr; -// Diligent::IRenderPass* pRenderPass = nullptr; - std::vector ColorRTVs; - Diligent::ITextureView* pDepthStencilRTV = nullptr; - Diligent::TEXTURE_FORMAT DepthStencilFormat = Diligent::TEX_FORMAT_UNKNOWN; - bool HasDepthStencil = false; - std::vector ClearValues; - // ... - }; - extern MG_Global::unordered_map g_FramebufferMap; - extern MG_Global::unordered_map g_ShaderMap; - struct GLProgramInfo - { - GLuint id; - std::vector AttachedShaders; - std::vector AttachedShadersID; - Diligent::IPipelineState* pPipelineState = nullptr; - Diligent::IShaderResourceBinding* pResourceBinding = nullptr; - uint64_t psoStateHash = 0; - bool psoDirty = true; - std::vector inputLayout; - GLuint DefaultFBO = 0; - ProgramObject programObj; - - // Uniform names, in the order of their index in uniform buffer - std::vector uniformBufferNames; - - Diligent::IBuffer* pDefaultUBO = nullptr; - - std::unordered_map uniformStages; - std::unordered_map uniformOffsets; - // ... - }; - extern MG_Global::unordered_map g_ProgramMap; - - extern MG_Global::unordered_map g_SamplerMap; - extern MG_Global::unordered_map g_UniformBufferMap; - extern Diligent::IBuffer* g_TriangleFanIndexBuffer; - - inline Diligent::PRIMITIVE_TOPOLOGY GLPrimitiveTopologyToDiligent(GLenum Topology) - { - switch (Topology) - { - case GL_TRIANGLE_STRIP: - return Diligent::PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP; - case GL_TRIANGLES: - return Diligent::PRIMITIVE_TOPOLOGY_TRIANGLE_LIST; - case GL_TRIANGLE_FAN: - return Diligent::PRIMITIVE_TOPOLOGY_TRIANGLE_LIST; - // TODO: Handle other topologies - default: - return Diligent::PRIMITIVE_TOPOLOGY_TRIANGLE_LIST; - } - } - - class PipelineStateManager { - private: - struct PSOKey { - uint64_t programHash; - uint64_t stateHash; - - bool operator==(const PSOKey &other) const { - return programHash == other.programHash && stateHash == other.stateHash; - } - }; - - struct PSOKeyHash { - size_t operator()(const PSOKey &key) const { - return std::hash()(key.programHash) ^ - std::hash()(key.stateHash); - } - }; - - std::unordered_map psoCache; - - public: - Diligent::IPipelineState *GetOrCreatePSO( - GLuint program, - GLProgramInfo &programInfo, - CommonState &commonState, - VertexArrayState &vaState, - GLFramebufferInfo& fbInfo, - GLenum primitiveTopology); - - void MarkPSODirty(GLuint program); - - void ReleasePSO(GLuint program); - - private: - Diligent::FILTER_TYPE ConvertGLFilter(GLenum filter) { - switch (filter) { - case GL_NEAREST: - case GL_NEAREST_MIPMAP_NEAREST: - case GL_NEAREST_MIPMAP_LINEAR: - return Diligent::FILTER_TYPE_POINT; - case GL_LINEAR: - case GL_LINEAR_MIPMAP_NEAREST: - case GL_LINEAR_MIPMAP_LINEAR: - return Diligent::FILTER_TYPE_LINEAR; - default: - return Diligent::FILTER_TYPE_LINEAR; - } - } - - Diligent::FILTER_TYPE ConvertGLMipFilter(GLenum filter) { - switch (filter) { - case GL_NEAREST_MIPMAP_NEAREST: - case GL_LINEAR_MIPMAP_NEAREST: - return Diligent::FILTER_TYPE_POINT; - case GL_NEAREST_MIPMAP_LINEAR: - case GL_LINEAR_MIPMAP_LINEAR: - return Diligent::FILTER_TYPE_LINEAR; - case GL_NEAREST: - case GL_LINEAR: - return Diligent::FILTER_TYPE_LINEAR; - default: - return Diligent::FILTER_TYPE_LINEAR; - } - } - - Diligent::TEXTURE_ADDRESS_MODE ConvertGLWrapMode(GLenum wrap) { - switch (wrap) { - case GL_REPEAT: - return Diligent::TEXTURE_ADDRESS_WRAP; - case GL_MIRRORED_REPEAT: - return Diligent::TEXTURE_ADDRESS_MIRROR; - case GL_CLAMP_TO_EDGE: - return Diligent::TEXTURE_ADDRESS_CLAMP; - case GL_CLAMP_TO_BORDER: - return Diligent::TEXTURE_ADDRESS_BORDER; - case GL_MIRROR_CLAMP_TO_EDGE: - return Diligent::TEXTURE_ADDRESS_MIRROR_ONCE; - default: - return Diligent::TEXTURE_ADDRESS_WRAP; - } - } - - Diligent::BLEND_FACTOR ConvertGLBlendFactor(GLenum factor) { - switch (factor) { - case GL_ZERO: - return Diligent::BLEND_FACTOR_ZERO; - case GL_ONE: - return Diligent::BLEND_FACTOR_ONE; - case GL_SRC_COLOR: - return Diligent::BLEND_FACTOR_SRC_COLOR; - case GL_ONE_MINUS_SRC_COLOR: - return Diligent::BLEND_FACTOR_INV_SRC_COLOR; - case GL_DST_COLOR: - return Diligent::BLEND_FACTOR_DEST_COLOR; - case GL_ONE_MINUS_DST_COLOR: - return Diligent::BLEND_FACTOR_INV_DEST_COLOR; - case GL_SRC_ALPHA: - return Diligent::BLEND_FACTOR_SRC_ALPHA; - case GL_ONE_MINUS_SRC_ALPHA: - return Diligent::BLEND_FACTOR_INV_SRC_ALPHA; - case GL_DST_ALPHA: - return Diligent::BLEND_FACTOR_DEST_ALPHA; - case GL_ONE_MINUS_DST_ALPHA: - return Diligent::BLEND_FACTOR_INV_DEST_ALPHA; - default: - return Diligent::BLEND_FACTOR_ONE; - } - } - - Diligent::COMPARISON_FUNCTION ConvertGLDepthFunc(GLenum func) { - switch (func) { - case GL_LESS: - return Diligent::COMPARISON_FUNC_LESS; - case GL_LEQUAL: - return Diligent::COMPARISON_FUNC_LESS_EQUAL; - case GL_GREATER: - return Diligent::COMPARISON_FUNC_GREATER; - case GL_GEQUAL: - return Diligent::COMPARISON_FUNC_GREATER_EQUAL; - case GL_EQUAL: - return Diligent::COMPARISON_FUNC_EQUAL; - case GL_NOTEQUAL: - return Diligent::COMPARISON_FUNC_NOT_EQUAL; - case GL_ALWAYS: - return Diligent::COMPARISON_FUNC_ALWAYS; - case GL_NEVER: - return Diligent::COMPARISON_FUNC_NEVER; - default: - return Diligent::COMPARISON_FUNC_LESS; - } - } - - uint64_t CalculateStateHash( - CommonState &commonState, - VertexArrayState &vaState, - GLFramebufferInfo& fbInfo, - GLenum primitiveTopology); - - void ConfigurePSO( - Diligent::GraphicsPipelineStateCreateInfo &PSOCreateInfo, - GLProgramInfo &programInfo, - CommonState &commonState, - VertexArrayState &vaState, - GLFramebufferInfo& fbInfo, - GLenum primitiveTopology); - - void ConfigureResourceLayout( - Diligent::GraphicsPipelineStateCreateInfo& PSOCreateInfo, - GLProgramInfo& programInfo); - }; - - extern PipelineStateManager g_PSOManager; - - void BuildInputLayout(GLuint program, VertexArrayState& vaState, - std::vector& inputLayout); - - extern bool initialized; -// extern bool IsInRenderPass; - extern GLuint g_NextResourceId; -} - -namespace MG_EGL::Diligent { - - EGLSurface eglCreateWindowSurface(EGLDisplay dpy, EGLConfig config, NativeWindowType window, const EGLint* attrib_list); - EGLBoolean eglChooseConfig(EGLDisplay dpy, const EGLint* attrib_list, EGLConfig* configs, EGLint config_size, EGLint* num_config); - EGLContext eglCreateContext(EGLDisplay dpy, EGLConfig config, EGLContext shareCtx, const EGLint* attrib_list); - EGLBoolean eglInitialize(EGLDisplay dpy, EGLint* major, EGLint* minor); - EGLDisplay eglGetDisplay(NativeDisplayType display); - EGLint eglGetError(); - EGLBoolean eglMakeCurrent(EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext ctx); - EGLBoolean eglDestroyContext(EGLDisplay dpy, EGLContext ctx); - EGLBoolean eglDestroySurface(EGLDisplay dpy, EGLSurface surface); - EGLBoolean eglTerminate(EGLDisplay dpy); - EGLBoolean eglReleaseThread(void); - EGLContext eglGetCurrentContext(void); - EGLBoolean eglGetConfigAttrib(EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint *value); - EGLBoolean eglBindAPI(EGLenum api); - EGLSurface eglGetCurrentSurface(EGLint readdraw); - EGLBoolean eglQuerySurface(EGLDisplay display, EGLSurface surface, EGLint attribute, EGLint *value); - EGLBoolean eglSwapInterval(EGLDisplay dpy, EGLint interval); - EGLBoolean eglSwapBuffers(EGLDisplay dpy, EGLSurface draw); - EGLSurface eglCreatePbufferSurface(EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list); -} - -MG_EXPORT __eglMustCastToProperFunctionPointerType eglGetProcAddress(const char *procname); - -#endif - - -#endif //MOBILEGL_DILIGENT_EGL_IMPL_H diff --git a/MG/MG_GL/Implementations/EGL/GLES/EGL_WRAP.cpp b/MG/MG_GL/Implementations/EGL/GLES/EGL_WRAP.cpp deleted file mode 100644 index 217bda16..00000000 --- a/MG/MG_GL/Implementations/EGL/GLES/EGL_WRAP.cpp +++ /dev/null @@ -1,184 +0,0 @@ -// -// Created by BZLZHH on 2025/4/26. -// - -#include "../../../../Includes.h" - -#if BACKEND_TYPE == BACKEND_GLES - -MG_EXPORT EGLint eglGetError(void) { - LOAD_EGL(eglGetError) - return egl_eglGetError(); -} - -MG_EXPORT EGLDisplay eglGetDisplay(EGLNativeDisplayType display_id) { - LOAD_EGL(eglGetDisplay) - return egl_eglGetDisplay(display_id); -} - -MG_EXPORT EGLBoolean eglInitialize(EGLDisplay dpy, EGLint *major, EGLint *minor) { - LOAD_EGL(eglInitialize) - return egl_eglInitialize(dpy, major, minor); -} - -MG_EXPORT EGLBoolean eglTerminate(EGLDisplay dpy) { - LOAD_EGL(eglTerminate) - return egl_eglTerminate(dpy); -} - -MG_EXPORT const char *eglQueryString(EGLDisplay dpy, EGLint name) { - LOAD_EGL(eglQueryString) - return egl_eglQueryString(dpy, name); -} - -MG_EXPORT EGLBoolean eglGetConfigs(EGLDisplay dpy, EGLConfig *configs, EGLint config_size, EGLint *num_config) { - LOAD_EGL(eglGetConfigs) - return egl_eglGetConfigs(dpy, configs, config_size, num_config); -} - -MG_EXPORT EGLBoolean eglChooseConfig(EGLDisplay dpy, const EGLint *attrib_list, EGLConfig *configs, EGLint config_size, EGLint *num_config) { - LOAD_EGL(eglChooseConfig) - return egl_eglChooseConfig(dpy, attrib_list, configs, config_size, num_config); -} - -MG_EXPORT EGLBoolean eglGetConfigAttrib(EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint *value) { - LOAD_EGL(eglGetConfigAttrib) - return egl_eglGetConfigAttrib(dpy, config, attribute, value); -} - -MG_EXPORT EGLSurface eglCreateWindowSurface(EGLDisplay dpy, EGLConfig config, EGLNativeWindowType win, const EGLint *attrib_list) { - LOAD_EGL(eglCreateWindowSurface) - EGLSurface surface = egl_eglCreateWindowSurface(dpy, config, win, attrib_list); - -// auto* pFactoryOpenGL = GetEngineFactoryOpenGL(); - - - return surface; -} - -MG_EXPORT EGLSurface eglCreatePbufferSurface(EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list) { - LOAD_EGL(eglCreatePbufferSurface) - return egl_eglCreatePbufferSurface(dpy, config, attrib_list); -} - -MG_EXPORT EGLSurface eglCreatePixmapSurface(EGLDisplay dpy, EGLConfig config, EGLNativePixmapType pixmap, const EGLint *attrib_list) { - LOAD_EGL(eglCreatePixmapSurface) - return egl_eglCreatePixmapSurface(dpy, config, pixmap, attrib_list); -} - -MG_EXPORT EGLBoolean eglDestroySurface(EGLDisplay dpy, EGLSurface surface) { - LOAD_EGL(eglDestroySurface) - return egl_eglDestroySurface(dpy, surface); -} - -MG_EXPORT EGLBoolean eglQuerySurface(EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint *value) { - LOAD_EGL(eglQuerySurface) - return egl_eglQuerySurface(dpy, surface, attribute, value); -} - -MG_EXPORT EGLBoolean eglBindAPI(EGLenum api) { - LOAD_EGL(eglBindAPI) - return egl_eglBindAPI(api); -} - -MG_EXPORT EGLenum eglQueryAPI(void) { - LOAD_EGL(eglQueryAPI) - return egl_eglQueryAPI(); -} - -MG_EXPORT EGLBoolean eglWaitClient(void) { - LOAD_EGL(eglWaitClient) - return egl_eglWaitClient(); -} - -MG_EXPORT EGLBoolean eglReleaseThread(void) { - LOAD_EGL(eglReleaseThread) - return egl_eglReleaseThread(); -} - -MG_EXPORT EGLSurface eglCreatePbufferFromClientBuffer(EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer, EGLConfig config, const EGLint *attrib_list) { - LOAD_EGL(eglCreatePbufferFromClientBuffer) - return egl_eglCreatePbufferFromClientBuffer(dpy, buftype, buffer, config, attrib_list); -} - -MG_EXPORT EGLBoolean eglSurfaceAttrib(EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint value) { - LOAD_EGL(eglSurfaceAttrib) - return egl_eglSurfaceAttrib(dpy, surface, attribute, value); -} - -MG_EXPORT EGLBoolean eglBindTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer) { - LOAD_EGL(eglBindTexImage) - return egl_eglBindTexImage(dpy, surface, buffer); -} - -MG_EXPORT EGLBoolean eglReleaseTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer) { - LOAD_EGL(eglReleaseTexImage) - return egl_eglReleaseTexImage(dpy, surface, buffer); -} - -MG_EXPORT EGLBoolean eglSwapInterval(EGLDisplay dpy, EGLint interval) { - LOAD_EGL(eglSwapInterval) - return egl_eglSwapInterval(dpy, interval); -} - -MG_EXPORT EGLContext eglCreateContext(EGLDisplay dpy, EGLConfig config, EGLContext share_context, const EGLint *attrib_list) { - LOAD_EGL(eglCreateContext) - return egl_eglCreateContext(dpy, config, share_context, attrib_list); -} - -MG_EXPORT EGLBoolean eglDestroyContext(EGLDisplay dpy, EGLContext ctx) { - LOAD_EGL(eglDestroyContext) - return egl_eglDestroyContext(dpy, ctx); -} - -MG_EXPORT EGLBoolean eglMakeCurrent(EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext ctx) { - LOAD_EGL(eglMakeCurrent) - return egl_eglMakeCurrent(dpy, draw, read, ctx); -} - -MG_EXPORT EGLContext eglGetCurrentContext(void) { - LOAD_EGL(eglGetCurrentContext) - return egl_eglGetCurrentContext(); -} - -MG_EXPORT EGLSurface eglGetCurrentSurface(EGLint readdraw) { - LOAD_EGL(eglGetCurrentSurface) - return egl_eglGetCurrentSurface(readdraw); -} - -MG_EXPORT EGLDisplay eglGetCurrentDisplay(void) { - LOAD_EGL(eglGetCurrentDisplay) - return egl_eglGetCurrentDisplay(); -} - -MG_EXPORT EGLBoolean eglQueryContext(EGLDisplay dpy, EGLContext ctx, EGLint attribute, EGLint *value) { - LOAD_EGL(eglQueryContext) - return egl_eglQueryContext(dpy, ctx, attribute, value); -} - -MG_EXPORT EGLBoolean eglWaitGL(void) { - LOAD_EGL(eglWaitGL) - return egl_eglWaitGL(); -} - -MG_EXPORT EGLBoolean eglWaitNative(EGLint engine) { - LOAD_EGL(eglWaitNative) - return egl_eglWaitNative(engine); -} - -MG_EXPORT EGLBoolean eglSwapBuffers(EGLDisplay dpy, EGLSurface surface) { - LOAD_EGL(eglSwapBuffers) - return egl_eglSwapBuffers(dpy, surface); -} - -MG_EXPORT EGLBoolean eglCopyBuffers(EGLDisplay dpy, EGLSurface surface, EGLNativePixmapType target) { - LOAD_EGL(eglCopyBuffers) - return egl_eglCopyBuffers(dpy, surface, target); -} - -MG_EXPORT EGLDisplay eglGetPlatformDisplay(EGLenum platform, void *native_display, const EGLAttrib *attrib_list) { - LOAD_EGL(eglGetPlatformDisplay) - return egl_eglGetPlatformDisplay(platform, native_display, (const EGLint *)attrib_list); -} - -#endif \ No newline at end of file diff --git a/MG/MG_GL/Implementations/EGL/GLES/EGL_WRAP.h b/MG/MG_GL/Implementations/EGL/GLES/EGL_WRAP.h deleted file mode 100644 index 2348eadd..00000000 --- a/MG/MG_GL/Implementations/EGL/GLES/EGL_WRAP.h +++ /dev/null @@ -1,14 +0,0 @@ -// -// Created by BZLZHH on 2025/4/26. -// - -#ifndef MOBILEGL_EGL_GLES_EGL_WRAP_H -#define MOBILEGL_EGL_GLES_EGL_WRAP_H - -#if BACKEND_TYPE == BACKEND_GLES - - - -#endif - -#endif //MOBILEGL_EGL_GLES_EGL_WRAP_H diff --git a/MG/MG_GL/Implementations/EGL/VK/EGL_EMU.cpp b/MG/MG_GL/Implementations/EGL/VK/EGL_EMU.cpp deleted file mode 100644 index 1ead1a72..00000000 --- a/MG/MG_GL/Implementations/EGL/VK/EGL_EMU.cpp +++ /dev/null @@ -1,551 +0,0 @@ -// -// Created by BZLZHH on 2025/3/30. -// - -#include "../../../../Includes.h" - -#if BACKEND_TYPE == BACKEND_VULKAN - -std::atomic g_nextContextId{1}; -std::atomic g_nextSurfaceId{1}; -EGLenum g_currentAPI = EGL_OPENGL_ES_API; - -std::mutex g_globalMutex; -MG_Global::unordered_map g_displays; -MG_Global::unordered_map g_surfaces; -MG_Global::unordered_map g_contexts; -EGLint g_lastError = EGL_SUCCESS; - -thread_local EGLContext tls_currentContext = EGL_NO_CONTEXT; -thread_local EGLSurface tls_drawSurface = EGL_NO_SURFACE; -thread_local EGLSurface tls_readSurface = EGL_NO_SURFACE; - -static VkResult CreateRenderPass(VulkanDisplay& display, VulkanContext& ctx) { - VkAttachmentDescription colorAttachment{}; - colorAttachment.format = VK_FORMAT_B8G8R8A8_SRGB; - colorAttachment.samples = VK_SAMPLE_COUNT_1_BIT; - colorAttachment.loadOp = VK_ATTACHMENT_LOAD_OP_CLEAR; - colorAttachment.storeOp = VK_ATTACHMENT_STORE_OP_STORE; - colorAttachment.stencilLoadOp = VK_ATTACHMENT_LOAD_OP_DONT_CARE; - colorAttachment.stencilStoreOp = VK_ATTACHMENT_STORE_OP_DONT_CARE; - colorAttachment.initialLayout = VK_IMAGE_LAYOUT_UNDEFINED; - colorAttachment.finalLayout = VK_IMAGE_LAYOUT_PRESENT_SRC_KHR; - - VkAttachmentReference colorRef{0, VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL}; - - VkSubpassDescription subpass{}; - subpass.pipelineBindPoint = VK_PIPELINE_BIND_POINT_GRAPHICS; - subpass.colorAttachmentCount = 1; - subpass.pColorAttachments = &colorRef; - - VkRenderPassCreateInfo rpInfo{}; - rpInfo.sType = VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO; - rpInfo.subpassCount = 1; - rpInfo.pSubpasses = &subpass; - rpInfo.attachmentCount = 1; - rpInfo.pAttachments = &colorAttachment; - - return vkCreateRenderPass(display.device, &rpInfo, nullptr, &ctx.renderPass); -} - -EGLDisplay eglGetDisplay(NativeDisplayType display) { - std::lock_guard lock(g_globalMutex); - static uintptr_t nextDisplayId = 1; - EGLDisplay newDisplay = (EGLDisplay)nextDisplayId++; - g_displays[newDisplay].initialized = false; - return newDisplay; -} - -EGLBoolean eglInitialize(EGLDisplay dpy, EGLint* major, EGLint* minor) { - VulkanDisplay& vkDpy = g_displays[dpy]; - if (vkDpy.initialized) return EGL_TRUE; - - VkInstanceCreateInfo instInfo{}; - instInfo.sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO; - const char* extensions[] = { - VK_KHR_SURFACE_EXTENSION_NAME, - VK_KHR_ANDROID_SURFACE_EXTENSION_NAME - }; - instInfo.enabledExtensionCount = 2; - instInfo.ppEnabledExtensionNames = extensions; - - if (vkCreateInstance(&instInfo, nullptr, &vkDpy.instance) != VK_SUCCESS) { - g_lastError = EGL_NOT_INITIALIZED; - return EGL_FALSE; - } - - uint32_t devCount = 0; - vkEnumeratePhysicalDevices(vkDpy.instance, &devCount, nullptr); - std::vector devices(devCount); - vkEnumeratePhysicalDevices(vkDpy.instance, &devCount, devices.data()); - vkDpy.physicalDevice = devices[0]; - - - uint32_t queueFamilyCount = 0; - vkGetPhysicalDeviceQueueFamilyProperties(vkDpy.physicalDevice, &queueFamilyCount, nullptr); - std::vector queueFamilies(queueFamilyCount); - vkGetPhysicalDeviceQueueFamilyProperties(vkDpy.physicalDevice, &queueFamilyCount, queueFamilies.data()); - - // 寻找支持图形和呈现的队列家族 - bool foundQueue = false; - for (uint32_t i = 0; i < queueFamilyCount; ++i) { - VkBool32 presentSupport = VK_FALSE; - vkGetPhysicalDeviceSurfaceSupportKHR(vkDpy.physicalDevice, i, VK_NULL_HANDLE, &presentSupport); - - if ((queueFamilies[i].queueFlags & VK_QUEUE_GRAPHICS_BIT) && presentSupport) { - vkDpy.graphicsQueueFamily = i; - foundQueue = true; - break; - } - } - - if (!foundQueue) { - g_lastError = EGL_NOT_INITIALIZED; - return EGL_FALSE; - } - - // 创建逻辑设备时请求队列 - float queuePriority = 1.0f; - VkDeviceQueueCreateInfo queueInfo{}; - queueInfo.sType = VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO; - queueInfo.queueFamilyIndex = vkDpy.graphicsQueueFamily; - queueInfo.queueCount = 1; - queueInfo.pQueuePriorities = &queuePriority; - - const char* devExtensions[] = {VK_KHR_SWAPCHAIN_EXTENSION_NAME}; - VkDeviceCreateInfo devInfo{}; - devInfo.sType = VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO; - devInfo.pQueueCreateInfos = &queueInfo; - devInfo.queueCreateInfoCount = 1; - devInfo.ppEnabledExtensionNames = devExtensions; - devInfo.enabledExtensionCount = 1; - - if (vkCreateDevice(vkDpy.physicalDevice, &devInfo, nullptr, &vkDpy.device) != VK_SUCCESS) { - g_lastError = EGL_NOT_INITIALIZED; - return EGL_FALSE; - } - - vkDpy.vkCreateSwapchainKHR = (PFN_vkCreateSwapchainKHR)vkGetDeviceProcAddr(vkDpy.device, "vkCreateSwapchainKHR"); - vkDpy.vkDestroySwapchainKHR = (PFN_vkDestroySwapchainKHR)vkGetDeviceProcAddr(vkDpy.device, "vkDestroySwapchainKHR"); - vkDpy.vkGetSwapchainImagesKHR = (PFN_vkGetSwapchainImagesKHR)vkGetDeviceProcAddr(vkDpy.device, "vkGetSwapchainImagesKHR"); - vkDpy.vkAcquireNextImageKHR = (PFN_vkAcquireNextImageKHR)vkGetDeviceProcAddr(vkDpy.device, "vkAcquireNextImageKHR"); - vkDpy.vkQueuePresentKHR = (PFN_vkQueuePresentKHR)vkGetDeviceProcAddr(vkDpy.device, "vkQueuePresentKHR"); - vkGetDeviceQueue(vkDpy.device, vkDpy.graphicsQueueFamily, 0, &vkDpy.graphicsQueue); - vkDpy.presentQueue = vkDpy.graphicsQueue; - vkDpy.initialized = true; - if (major) *major = 1; - if (minor) *minor = 5; - return EGL_TRUE; -} - -EGLBoolean eglChooseConfig(EGLDisplay dpy, const EGLint* attrib_list, EGLConfig* configs, EGLint config_size, EGLint* num_config) { - VulkanDisplay& vkDpy = g_displays[dpy]; - EGLInternalConfig defaultConfig{ VK_FORMAT_B8G8R8A8_SRGB, VK_COLOR_SPACE_SRGB_NONLINEAR_KHR, 1 }; - vkDpy.configs = {defaultConfig}; - - EGLint returnCount = 1; - if (configs && config_size > 0) { - configs[0] = (EGLConfig)0; - } - - if (num_config) *num_config = returnCount; - return EGL_TRUE; -} - -EGLSurface eglCreateWindowSurface(EGLDisplay dpy, EGLConfig config, NativeWindowType window, const EGLint* attrib_list) { - VulkanDisplay& disp = g_displays[dpy]; - static uintptr_t nextSurfId = 1; - - ANativeWindow* nativeWindow = static_cast(window); - if (!nativeWindow || ANativeWindow_getWidth(nativeWindow) <= 0 || ANativeWindow_getHeight(nativeWindow) <= 0) { - g_lastError = EGL_BAD_NATIVE_WINDOW; - return EGL_NO_SURFACE; - } - - auto vkCreateAndroidSurfaceKHR = (PFN_vkCreateAndroidSurfaceKHR)vkGetInstanceProcAddr( - disp.instance, "vkCreateAndroidSurfaceKHR"); - if (!vkCreateAndroidSurfaceKHR) { - g_lastError = EGL_BAD_ALLOC; - return EGL_NO_SURFACE; - } - - VulkanSurface surface{}; - surface.type = VulkanSurface::WINDOW; - - VkAndroidSurfaceCreateInfoKHR createInfo{}; - createInfo.sType = VK_STRUCTURE_TYPE_ANDROID_SURFACE_CREATE_INFO_KHR; - createInfo.window = nativeWindow; - VkResult result = vkCreateAndroidSurfaceKHR(disp.instance, &createInfo, nullptr, &surface.surface); - if (result != VK_SUCCESS) { - g_lastError = (result == VK_ERROR_NATIVE_WINDOW_IN_USE_KHR) ? - EGL_BAD_NATIVE_WINDOW : EGL_BAD_ALLOC; - return EGL_NO_SURFACE; - } - - VkBool32 supported = VK_FALSE; - vkGetPhysicalDeviceSurfaceSupportKHR(disp.physicalDevice, - disp.graphicsQueueFamily, - surface.surface, - &supported); - if (!supported) { - vkDestroySurfaceKHR(disp.instance, surface.surface, nullptr); - g_lastError = EGL_BAD_MATCH; - return EGL_NO_SURFACE; - } - - VkSurfaceCapabilitiesKHR caps; - vkGetPhysicalDeviceSurfaceCapabilitiesKHR(disp.physicalDevice, surface.surface, &caps); - - const VkExtent2D swapchainExtent = { - (std::max)(caps.minImageExtent.width, (uint32_t)ANativeWindow_getWidth(nativeWindow)), - (std::max)(caps.minImageExtent.height, (uint32_t)ANativeWindow_getHeight(nativeWindow)) - }; - - VkSwapchainCreateInfoKHR swapInfo{}; - swapInfo.sType = VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR; - swapInfo.surface = surface.surface; - swapInfo.minImageCount = 3; - swapInfo.imageFormat = VK_FORMAT_R8G8B8A8_SRGB; - swapInfo.imageColorSpace = VK_COLOR_SPACE_SRGB_NONLINEAR_KHR; - swapInfo.imageExtent = swapchainExtent; - swapInfo.imageArrayLayers = 1; - swapInfo.imageUsage = VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT; - swapInfo.preTransform = caps.currentTransform; - swapInfo.compositeAlpha = VK_COMPOSITE_ALPHA_INHERIT_BIT_KHR; - swapInfo.presentMode = VK_PRESENT_MODE_MAILBOX_KHR; - - if (disp.vkCreateSwapchainKHR(disp.device, &swapInfo, nullptr, &surface.swapchain) != VK_SUCCESS) { - vkDestroySurfaceKHR(disp.instance, surface.surface, nullptr); - g_lastError = EGL_BAD_ALLOC; - return EGL_NO_SURFACE; - } - - uint32_t imageCount = 0; - disp.vkGetSwapchainImagesKHR(disp.device, surface.swapchain, &imageCount, nullptr); - surface.images.resize(imageCount); - disp.vkGetSwapchainImagesKHR(disp.device, surface.swapchain, &imageCount, surface.images.data()); - - surface.imageViews.resize(imageCount); - for (uint32_t i = 0; i < imageCount; ++i) { - VkImageViewCreateInfo viewInfo{}; - viewInfo.sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO; - viewInfo.image = surface.images[i]; - viewInfo.viewType = VK_IMAGE_VIEW_TYPE_2D; - viewInfo.format = swapInfo.imageFormat; - viewInfo.subresourceRange = {VK_IMAGE_ASPECT_COLOR_BIT, 0, 1, 0, 1}; - - if (vkCreateImageView(disp.device, &viewInfo, nullptr, &surface.imageViews[i]) != VK_SUCCESS) { - // Handle error - } - } - - ANativeWindow_acquire(nativeWindow); - ANativeWindow_setBuffersGeometry(nativeWindow, - swapchainExtent.width, - swapchainExtent.height, - AHARDWAREBUFFER_FORMAT_R8G8B8A8_UNORM); - EGLSurface surfId = (EGLSurface)nextSurfId++; - g_surfaces[surfId] = std::move(surface); - return surfId; -} - -EGLContext eglCreateContext(EGLDisplay dpy, EGLConfig config, EGLContext shareCtx, const EGLint* attrib_list) { - static uintptr_t nextCtxId = 1; - VulkanDisplay &disp = g_displays[dpy]; - - VulkanContext ctx{}; - VkCommandPoolCreateInfo poolInfo{}; - poolInfo.sType = VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO; - poolInfo.queueFamilyIndex = 0; - if (vkCreateCommandPool(disp.device, &poolInfo, nullptr, &ctx.cmdPool) != VK_SUCCESS) { - g_lastError = EGL_BAD_ALLOC; - return EGL_NO_CONTEXT; - } - - ctx.frameFences.resize(2); - ctx.acquireSemaphores.resize(2); - ctx.presentSemaphores.resize(2); - for (uint32_t i = 0; i < 2; ++i) { - VkFenceCreateInfo fenceInfo{VK_STRUCTURE_TYPE_FENCE_CREATE_INFO, nullptr, - VK_FENCE_CREATE_SIGNALED_BIT}; - vkCreateFence(disp.device, &fenceInfo, nullptr, &ctx.frameFences[i]); - - VkSemaphoreCreateInfo semInfo{VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO}; - vkCreateSemaphore(disp.device, &semInfo, nullptr, &ctx.acquireSemaphores[i]); - vkCreateSemaphore(disp.device, &semInfo, nullptr, &ctx.presentSemaphores[i]); - } - - if (CreateRenderPass(disp, ctx) != VK_SUCCESS) { - g_lastError = EGL_BAD_CONFIG; - return EGL_NO_CONTEXT; - } - - EGLContext ctxId = (EGLContext)nextCtxId++; - g_contexts[ctxId] = std::move(ctx); - return ctxId; -} - -EGLint eglGetError() { - return EGL_SUCCESS; -} - -EGLBoolean eglMakeCurrent(EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext ctx) { - std::lock_guard lock(g_globalMutex); - - if (dpy == EGL_NO_DISPLAY || (ctx != EGL_NO_CONTEXT && !g_contexts.count(ctx)) || - (draw != EGL_NO_SURFACE && !g_surfaces.count(draw)) || - (read != EGL_NO_SURFACE && !g_surfaces.count(read))) { - g_lastError = EGL_BAD_PARAMETER; - return EGL_FALSE; - } - - if (tls_currentContext != EGL_NO_CONTEXT) { - VulkanContext& oldCtx = g_contexts[tls_currentContext]; - if (oldCtx.currentCmdBuffer) { - vkEndCommandBuffer(oldCtx.currentCmdBuffer); - oldCtx.currentCmdBuffer = VK_NULL_HANDLE; - } - } - - if (ctx != EGL_NO_CONTEXT) { - VulkanContext& newCtx = g_contexts[ctx]; - VulkanDisplay& disp = g_displays[dpy]; - - VkCommandBufferAllocateInfo allocInfo{}; - allocInfo.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO; - allocInfo.commandPool = newCtx.cmdPool; - allocInfo.level = VK_COMMAND_BUFFER_LEVEL_PRIMARY; - allocInfo.commandBufferCount = 1; - - if (vkAllocateCommandBuffers(disp.device, &allocInfo, &newCtx.currentCmdBuffer) != VK_SUCCESS) { - g_lastError = EGL_BAD_ALLOC; - return EGL_FALSE; - } - - VkCommandBufferBeginInfo beginInfo{}; - beginInfo.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO; - vkBeginCommandBuffer(newCtx.currentCmdBuffer, &beginInfo); - } - - tls_currentContext = ctx; - tls_drawSurface = draw; - tls_readSurface = read; - return EGL_TRUE; -} - -EGLBoolean eglDestroyContext(EGLDisplay dpy, EGLContext ctx) { - std::lock_guard lock(g_globalMutex); - - if (!g_contexts.count(ctx)) { - g_lastError = EGL_BAD_CONTEXT; - return EGL_FALSE; - } - - VulkanContext& vkCtx = g_contexts[ctx]; - VulkanDisplay& disp = g_displays[dpy]; - - vkDeviceWaitIdle(disp.device); - - vkDestroyCommandPool(disp.device, vkCtx.cmdPool, nullptr); - vkDestroyRenderPass(disp.device, vkCtx.renderPass, nullptr); - - for (auto& fence : vkCtx.frameFences) - vkDestroyFence(disp.device, fence, nullptr); - for (auto& sem : vkCtx.acquireSemaphores) - vkDestroySemaphore(disp.device, sem, nullptr); - for (auto& sem : vkCtx.presentSemaphores) - vkDestroySemaphore(disp.device, sem, nullptr); - - g_contexts.erase(ctx); - if (tls_currentContext == ctx) - tls_currentContext = EGL_NO_CONTEXT; - - return EGL_TRUE; -} - -EGLBoolean eglDestroySurface(EGLDisplay dpy, EGLSurface surface) { - std::lock_guard lock(g_globalMutex); - - if (!g_surfaces.count(surface)) { - g_lastError = EGL_BAD_SURFACE; - return EGL_FALSE; - } - - VulkanSurface& surf = g_surfaces[surface]; - VulkanDisplay& disp = g_displays[dpy]; - - vkDeviceWaitIdle(disp.device); - - if (surf.type == VulkanSurface::WINDOW) { - disp.vkDestroySwapchainKHR(disp.device, surf.swapchain, nullptr); - vkDestroySurfaceKHR(disp.instance, surf.surface, nullptr); - for (auto& view : surf.imageViews) - vkDestroyImageView(disp.device, view, nullptr); - } else { - vkDestroyImageView(disp.device, surf.pbufferImageView, nullptr); - vkDestroyImage(disp.device, surf.pbufferImage, nullptr); - } - - g_surfaces.erase(surface); - return EGL_TRUE; -} - -EGLBoolean eglTerminate(EGLDisplay dpy) { - std::lock_guard lock(g_globalMutex); - - if (!g_displays.count(dpy)) { - g_lastError = EGL_BAD_DISPLAY; - return EGL_FALSE; - } - - VulkanDisplay& disp = g_displays[dpy]; - - for (auto& [ctxId, ctx] : g_contexts) - eglDestroyContext(dpy, ctxId); - for (auto& [surfId, surf] : g_surfaces) - eglDestroySurface(dpy, surfId); - - vkDestroyDevice(disp.device, nullptr); - vkDestroyInstance(disp.instance, nullptr); - - g_displays.erase(dpy); - return EGL_TRUE; -} - -EGLBoolean eglReleaseThread(void) { - tls_currentContext = EGL_NO_CONTEXT; - tls_drawSurface = EGL_NO_SURFACE; - tls_readSurface = EGL_NO_SURFACE; - return EGL_TRUE; -} - -EGLContext eglGetCurrentContext(void) { - return tls_currentContext; -} - -EGLBoolean eglGetConfigAttrib(EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint *value) { - VulkanDisplay& disp = g_displays[dpy]; - if (!disp.configs.empty() && config == (EGLConfig)0) { - switch (attribute) { - case EGL_BUFFER_SIZE: *value = 32; break; - case EGL_RED_SIZE: *value = 8; break; - case EGL_GREEN_SIZE: *value = 8; break; - case EGL_BLUE_SIZE: *value = 8; break; - case EGL_ALPHA_SIZE: *value = 8; break; - case EGL_CONFIG_ID: *value = 1; break; - default: return EGL_FALSE; - } - return EGL_TRUE; - } - return EGL_FALSE; -} - -EGLBoolean eglBindAPI(EGLenum api) { - if (api == EGL_OPENGL_ES_API) { - g_currentAPI = api; - return EGL_TRUE; - } - return EGL_FALSE; -} - -EGLSurface eglCreatePbufferSurface(EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list) { - VulkanDisplay& disp = g_displays[dpy]; - VulkanSurface surface{}; - surface.type = VulkanSurface::PBUFFER; - - VkImageCreateInfo imgInfo{}; - imgInfo.sType = VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO; - imgInfo.imageType = VK_IMAGE_TYPE_2D; - imgInfo.format = VK_FORMAT_R8G8B8A8_SRGB; - imgInfo.extent = {512, 512, 1}; - imgInfo.mipLevels = 1; - imgInfo.arrayLayers = 1; - imgInfo.samples = VK_SAMPLE_COUNT_1_BIT; - imgInfo.tiling = VK_IMAGE_TILING_OPTIMAL; - imgInfo.usage = VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT; - imgInfo.initialLayout = VK_IMAGE_LAYOUT_UNDEFINED; - - if (vkCreateImage(disp.device, &imgInfo, nullptr, &surface.pbufferImage) != VK_SUCCESS) { - g_lastError = EGL_BAD_ALLOC; - return EGL_NO_SURFACE; - } - - VkImageViewCreateInfo viewInfo{}; - viewInfo.sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO; - viewInfo.image = surface.pbufferImage; - viewInfo.viewType = VK_IMAGE_VIEW_TYPE_2D; - viewInfo.format = imgInfo.format; - viewInfo.subresourceRange = {VK_IMAGE_ASPECT_COLOR_BIT, 0, 1, 0, 1}; - - if (vkCreateImageView(disp.device, &viewInfo, nullptr, &surface.pbufferImageView) != VK_SUCCESS) { - vkDestroyImage(disp.device, surface.pbufferImage, nullptr); - g_lastError = EGL_BAD_ALLOC; - return EGL_NO_SURFACE; - } - - EGLSurface surfId = (EGLSurface)g_nextSurfaceId++; - g_surfaces[surfId] = surface; - return surfId; -} - -EGLBoolean eglSwapBuffers(EGLDisplay dpy, EGLSurface draw) { - VulkanSurface& surf = g_surfaces[draw]; - VulkanDisplay& disp = g_displays[dpy]; - VulkanContext& ctx = g_contexts[tls_currentContext]; - - if (!disp.presentQueue) { - g_lastError = EGL_BAD_DISPLAY; - return EGL_FALSE; - } - - if (surf.type != VulkanSurface::WINDOW) { - g_lastError = EGL_BAD_SURFACE; - return EGL_FALSE; - } - - vkEndCommandBuffer(ctx.currentCmdBuffer); - - VkSubmitInfo submitInfo{}; - submitInfo.sType = VK_STRUCTURE_TYPE_SUBMIT_INFO; - submitInfo.commandBufferCount = 1; - submitInfo.pCommandBuffers = &ctx.currentCmdBuffer; - - vkQueueSubmit(disp.graphicsQueue, 1, &submitInfo, VK_NULL_HANDLE); - - VkPresentInfoKHR presentInfo{}; - presentInfo.sType = VK_STRUCTURE_TYPE_PRESENT_INFO_KHR; - presentInfo.swapchainCount = 1; - presentInfo.pSwapchains = &surf.swapchain; - presentInfo.pImageIndices = &ctx.frameIndex; - - VkResult result = disp.vkQueuePresentKHR(disp.presentQueue, &presentInfo); - if (result != VK_SUCCESS) { - g_lastError = EGL_BAD_ALLOC; - return EGL_FALSE; - } - - ctx.frameIndex = (ctx.frameIndex + 1) % surf.images.size(); - return EGL_TRUE; -} - -EGLBoolean eglSwapInterval(EGLDisplay dpy, EGLint interval) { - // TODO - return EGL_TRUE; -} - -EGLSurface eglGetCurrentSurface(EGLint readdraw) { - return (readdraw == EGL_READ) ? tls_readSurface : tls_drawSurface; -} - -EGLBoolean eglQuerySurface(EGLDisplay display, EGLSurface surface, EGLint attribute, EGLint *value) { - VulkanSurface& surf = g_surfaces[surface]; - switch (attribute) { - case EGL_WIDTH: *value = surf.extent.width; break; - case EGL_HEIGHT: *value = surf.extent.height; break; - case EGL_CONFIG_ID: *value = 1; break; - default: return EGL_FALSE; - } - return EGL_TRUE; -} - -#endif \ No newline at end of file diff --git a/MG/MG_GL/Implementations/EGL/VK/EGL_EMU.h b/MG/MG_GL/Implementations/EGL/VK/EGL_EMU.h deleted file mode 100644 index de0dc7db..00000000 --- a/MG/MG_GL/Implementations/EGL/VK/EGL_EMU.h +++ /dev/null @@ -1,101 +0,0 @@ -// -// Created by BZLZHH on 2025/3/30. -// - -#ifndef MOBILEGL_EGL_VK_EMU_H -#define MOBILEGL_EGL_VK_EMU_H - -#if BACKEND_TYPE == BACKEND_VULKAN - -struct EGLInternalConfig { - VkFormat format; - VkColorSpaceKHR colorSpace; - uint32_t samples; -}; - -struct VulkanDisplay { - VkInstance instance; - VkPhysicalDevice physicalDevice; - VkDevice device; - uint32_t graphicsQueueFamily; - VkQueue graphicsQueue; - std::vector configs; - bool initialized = false; - PFN_vkCreateSwapchainKHR vkCreateSwapchainKHR; - PFN_vkDestroySwapchainKHR vkDestroySwapchainKHR; - PFN_vkGetSwapchainImagesKHR vkGetSwapchainImagesKHR; - PFN_vkAcquireNextImageKHR vkAcquireNextImageKHR; - PFN_vkQueuePresentKHR vkQueuePresentKHR; - VkRenderPass defaultRenderPass; - VkQueue presentQueue = VK_NULL_HANDLE; -}; - -struct VulkanSurface { - enum Type { WINDOW, PBUFFER } type; - VkSurfaceKHR surface; - VkSwapchainKHR swapchain; - std::vector images; - std::vector imageViews; - VkExtent2D extent; - VkFormat format; - VkImage pbImage; - VkImageView pbImageView; - VkDeviceMemory pbMemory; - VkFramebuffer framebuffer; - VkImage pbufferImage; - VkImageView pbufferImageView; -}; - -struct VulkanContext { - VkCommandPool cmdPool; - std::vector cmdBuffers; - uint32_t currentFrame = 0; - VkRenderPass renderPass; - VkPipelineLayout pipelineLayout; - VkPipeline graphicsPipeline; - std::vector frameFences; - std::vector acquireSemaphores; - std::vector presentSemaphores; - VulkanSurface* boundSurface = nullptr; - VkCommandBuffer currentCmdBuffer; - uint32_t frameIndex; - VkClearColorValue clearColor; -}; - -extern std::atomic g_nextContextId; -extern std::atomic g_nextSurfaceId; -extern EGLenum g_currentAPI; - -extern std::mutex g_globalMutex; -extern MG_Global::unordered_map g_displays; -extern MG_Global::unordered_map g_surfaces; -extern MG_Global::unordered_map g_contexts; -extern EGLint g_lastError; - -extern thread_local EGLContext tls_currentContext; -extern thread_local EGLSurface tls_drawSurface; -extern thread_local EGLSurface tls_readSurface; - -MG_EXPORT EGLSurface eglCreateWindowSurface(EGLDisplay dpy, EGLConfig config, NativeWindowType window, const EGLint* attrib_list); -MG_EXPORT EGLBoolean eglChooseConfig(EGLDisplay dpy, const EGLint* attrib_list, EGLConfig* configs, EGLint config_size, EGLint* num_config); -MG_EXPORT EGLContext eglCreateContext(EGLDisplay dpy, EGLConfig config, EGLContext shareCtx, const EGLint* attrib_list); -MG_EXPORT EGLBoolean eglInitialize(EGLDisplay dpy, EGLint* major, EGLint* minor); -MG_EXPORT EGLDisplay eglGetDisplay(NativeDisplayType display); -MG_EXPORT EGLint eglGetError(); -MG_EXPORT EGLBoolean eglMakeCurrent(EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext ctx); -MG_EXPORT EGLBoolean eglDestroyContext(EGLDisplay dpy, EGLContext ctx); -MG_EXPORT EGLBoolean eglDestroySurface(EGLDisplay dpy, EGLSurface surface); -MG_EXPORT EGLBoolean eglTerminate(EGLDisplay dpy); -MG_EXPORT EGLBoolean eglReleaseThread(void); -MG_EXPORT EGLContext eglGetCurrentContext(void); -MG_EXPORT EGLBoolean eglGetConfigAttrib(EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint *value); -MG_EXPORT EGLBoolean eglBindAPI(EGLenum api); -MG_EXPORT EGLSurface eglGetCurrentSurface(EGLint readdraw); -MG_EXPORT EGLBoolean eglQuerySurface(EGLDisplay display, EGLSurface surface, EGLint attribute, EGLint *value); -MG_EXPORT EGLBoolean eglSwapInterval(EGLDisplay dpy, EGLint interval); -MG_EXPORT EGLBoolean eglSwapBuffers(EGLDisplay dpy, EGLSurface draw); -MG_EXPORT EGLSurface eglCreatePbufferSurface(EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list); - -#endif - -#endif //MOBILEGL_EGL_VK_EMU_H diff --git a/MG/MG_GL/Implementations/GL/Buffer/GL_Buffer.cpp b/MG/MG_GL/Implementations/GL/Buffer/GL_Buffer.cpp deleted file mode 100644 index 8b49bf9b..00000000 --- a/MG/MG_GL/Implementations/GL/Buffer/GL_Buffer.cpp +++ /dev/null @@ -1,379 +0,0 @@ -// -// Created by BZLZHH on 2025/3/15. -// - -#include "../../../../Includes.h" - -namespace MG_GL::GL { - Diligent::VALUE_TYPE ConvertGLIndexTypeToDiligent(GLenum type) { - switch (type) { - case GL_UNSIGNED_BYTE: return Diligent::VT_UINT8; - case GL_UNSIGNED_SHORT: return Diligent::VT_UINT16; - case GL_UNSIGNED_INT: return Diligent::VT_UINT32; - default: return Diligent::VT_UNDEFINED; - } - } - - void* MapBufferRange(GLenum target, GLintptr offset, GLsizeiptr length, - GLbitfield access) { - MG_Util::Debug::LogD("glMapBufferRange, target: %s, offset: %lld, length: %lld, access: 0x%X", - MG_Util::Debug::GLEnumToString(target), - static_cast(offset), - static_cast(length), - access); - void* mappedPointer = nullptr; - GLenum result = MG_State::AcquireBufferMemoryRange(target, offset, length, access, &mappedPointer); - - if (result == GL_NO_ERROR) { - MG_Util::Debug::LogD("Mapped pointer: %p", mappedPointer); - return mappedPointer; - } - MG_State::SetError(result); - MG_Util::Debug::LogE("Error mapping buffer range: %s", MG_Util::Debug::GLEnumToString(result)); - return nullptr; - } - - void FlushMappedBufferRange(GLenum target, GLintptr offset, GLsizeiptr length) { - MG_Util::Debug::LogD("glFlushMappedBufferRange, target: %s, offset: %lld, length: %lld", - MG_Util::Debug::GLEnumToString(target), - static_cast(offset), - static_cast(length)); - GLenum result = MG_State::SyncBufferMemory(target, offset, length); - if (result == GL_NO_ERROR) { - GLuint buffer = MG_State_T::bufferState->GetCurrentBinding(target); - if (buffer == 0) return; - - auto& bufferObj = *MG_State_T::bufferState->GetBufferObject(buffer); - if (!bufferObj.isMapped) return; - - size_t start = static_cast(offset); - size_t end = start + static_cast(length); - - auto it = MG_Diligent::g_BufferMap.find(buffer); - if (it == MG_Diligent::g_BufferMap.end()) - return; - Diligent::IBuffer* pBuffer = it->second; - if (pBuffer && bufferObj.data.size() >= end) { - const auto& Desc = pBuffer->GetDesc(); - if (Desc.Usage == Diligent::USAGE_STAGING || Desc.Usage == Diligent::USAGE_DYNAMIC || Desc.Usage == Diligent::USAGE_UNIFIED) { - void * data; - MG_Diligent::g_pContext->MapBuffer(pBuffer, Diligent::MAP_WRITE, - Diligent::MAP_FLAG_DISCARD, data); - - if (data) { - void* dst = static_cast(data) + offset; - const void* src = bufferObj.data.data() + offset; - memcpy(dst, src, length); - - MG_Diligent::g_pContext->UnmapBuffer(pBuffer, Diligent::MAP_WRITE); - } - } else { - // For USAGE_DEFAULT or USAGE_IMMUTABLE, use UpdateBuffer - MG_Diligent::g_pContext->UpdateBuffer(pBuffer, static_cast(offset), static_cast(length), bufferObj.data.data() + offset, Diligent::RESOURCE_STATE_TRANSITION_MODE_TRANSITION); - } - } - return; - } - MG_State::SetError(result); - MG_Util::Debug::LogE("Error flushing mapped buffer range: %s", - MG_Util::Debug::GLEnumToString(result)); - } - - void CopyBufferSubData(GLenum readTarget, GLenum writeTarget, - GLintptr readOffset, GLintptr writeOffset, - GLsizeiptr size) { - MG_Util::Debug::LogD("glCopyBufferSubData, readTarget: %s, writeTarget: %s, " - "readOffset: %lld, writeOffset: %lld, size: %lld", - MG_Util::Debug::GLEnumToString(readTarget), - MG_Util::Debug::GLEnumToString(writeTarget), - static_cast(readOffset), - static_cast(writeOffset), - static_cast(size)); - GLenum result = MG_State::CopyBufferRange(readTarget, writeTarget, readOffset, writeOffset, size); - if (result == GL_NO_ERROR) { - GLuint srcBuffer = MG_State_T::bufferState->GetCurrentBinding(readTarget); - GLuint dstBuffer = MG_State_T::bufferState->GetCurrentBinding(writeTarget); - - if (srcBuffer == 0 || dstBuffer == 0) return; - auto itsrc = MG_Diligent::g_BufferMap.find(srcBuffer); - auto itdst = MG_Diligent::g_BufferMap.find(dstBuffer); - if (itsrc == MG_Diligent::g_BufferMap.end() || itdst == MG_Diligent::g_BufferMap.end()) return; - - Diligent::IBuffer* pSrcBuffer = itsrc->second; - Diligent::IBuffer* pDstBuffer = itdst->second; - - if (pSrcBuffer && pDstBuffer) { - MG_Diligent::g_pContext->CopyBuffer(pSrcBuffer, static_cast(readOffset), - Diligent::RESOURCE_STATE_TRANSITION_MODE_TRANSITION, - pDstBuffer, static_cast(writeOffset), - static_cast(size), - Diligent::RESOURCE_STATE_TRANSITION_MODE_TRANSITION); - } - - return; - } - MG_State::SetError(result); - MG_Util::Debug::LogE("Error copying buffer subdata: %s", - MG_Util::Debug::GLEnumToString(result)); - } - - void* MapBuffer(GLenum target, GLenum access) { - MG_Util::Debug::LogD("glMapBuffer(target=0x%x, access=0x%x)", target, access); - void* mappedPtr = nullptr; - GLenum err = MG_State::AcquireBufferMemory(target, access, &mappedPtr); - if (err != GL_NO_ERROR) { - MG_State::SetError(err); - MG_Util::Debug::LogE("glMapBuffer failed: %s", MG_Util::Debug::GLEnumToString(err)); - return nullptr; - } - MG_Util::Debug::LogD("glMapBuffer returns %p", mappedPtr); - return mappedPtr; - } - - GLboolean UnmapBuffer(GLenum target) { - MG_Util::Debug::LogD("glUnmapBuffer(target=0x%x)", target); - GLenum err = MG_State::ReleaseBufferMemory(target); - if (err != GL_NO_ERROR) { - MG_State::SetError(err); - MG_Util::Debug::LogE("glUnmapBuffer failed: %s", MG_Util::Debug::GLEnumToString(err)); - return GL_FALSE; - } - - GLuint buffer = MG_State_T::bufferState->currentBindings_[target]; - auto& bufferObj = *MG_State_T::bufferState->GetBufferObject(buffer); - - auto it = MG_Diligent::g_BufferMap.find(buffer); - if (it == MG_Diligent::g_BufferMap.end()) - return GL_FALSE; - Diligent::IBuffer* pBuffer = it->second; - if (pBuffer) { - const auto& Desc = pBuffer->GetDesc(); - if (Desc.Usage == Diligent::USAGE_STAGING || Desc.Usage == Diligent::USAGE_DYNAMIC || Desc.Usage == Diligent::USAGE_UNIFIED) { - void * data; - MG_Diligent::g_pContext->MapBuffer(pBuffer, Diligent::MAP_WRITE, - Diligent::MAP_FLAG_DISCARD, data); - - if (data) { - memcpy(data, bufferObj.data.data(), bufferObj.data.size()); - MG_Diligent::g_pContext->UnmapBuffer(pBuffer, Diligent::MAP_WRITE); - } - } else { - // For USAGE_DEFAULT or USAGE_IMMUTABLE, use UpdateBuffer - MG_Diligent::g_pContext->UpdateBuffer(pBuffer, 0, bufferObj.data.size(), bufferObj.data.data(), Diligent::RESOURCE_STATE_TRANSITION_MODE_TRANSITION); - } - } - - MG_Util::Debug::LogD("glUnmapBuffer succeeded"); - return GL_TRUE; - } - - void BindBuffer(GLenum target, GLuint buffer) { - MG_Util::Debug::LogD("glBindBuffer, target: %s, buffer: %d", MG_Util::Debug::GLEnumToString(target), buffer); - if (buffer != 0 && - MG_State::ValidateGeneratedName(buffer) && - !MG_State::ValidateAllocatedBufferHandle(buffer)) { - MG_Util::Debug::LogD("Actually creating buffer: %u", buffer); - GLenum result = MG_State::CreateBuffer(buffer); - if (result != GL_NO_ERROR) { - MG_State::SetError(result); - MG_Util::Debug::LogE("Error from MG State: %s", MG_Util::Debug::GLEnumToString(result)); - return; - } - } - - if (buffer != 0 && !MG_State::ValidateAllocatedBufferHandle(buffer)) { - MG_State::SetError(GL_INVALID_VALUE); - MG_Util::Debug::LogE("Invalid buffer handle: %u", buffer); - return; - } - GLenum result = MG_State::BindBuffer(target, buffer); - if (result == GL_NO_ERROR) - return; - MG_State::SetError(result); - MG_Util::Debug::LogE("Error from MG State: %s", MG_Util::Debug::GLEnumToString(result)); - } - - void BufferData(GLenum target, GLsizeiptr size, const void* data, GLenum usage) { - MG_Util::Debug::LogD("glBufferData, target: %s, size: %zd, data: %p, usage: %s", - MG_Util::Debug::GLEnumToString(target), size, data, MG_Util::Debug::GLEnumToString(usage)); - GLenum result = MG_State::CommitBufferStorage(target, size, data, usage); - if (result == GL_NO_ERROR) { - GLuint buffer = MG_State_T::bufferState->GetCurrentBinding(target); - if (buffer == 0) return; - auto& bufferObj = *MG_State_T::bufferState->GetBufferObject(buffer); - if (bufferObj.isDynamic) return; // Dynamic buffer should be created by glDraw* - if (size <= 0) return; // ignore 0-sized reallocation - - bufferObj.dirty = false; - - auto it = MG_Diligent::g_BufferMap.find(buffer); - if (it == MG_Diligent::g_BufferMap.end()) - return; - - Diligent::IBuffer*& pBuffer = it->second; - - Diligent::BufferDesc BuffDesc; - std::string name; - BuffDesc.Size = static_cast(size); - - switch (target) { - case GL_ARRAY_BUFFER: -// BuffDesc.BindFlags = Diligent::BIND_VERTEX_BUFFER; - name += std::format("VBO {}", buffer); - break; - case GL_ELEMENT_ARRAY_BUFFER: -// BuffDesc.BindFlags = Diligent::BIND_INDEX_BUFFER; - name += std::format("IBO {}", buffer); - break; - case GL_UNIFORM_BUFFER: -// BuffDesc.BindFlags = Diligent::BIND_UNIFORM_BUFFER; - name += std::format("UBO {}", buffer); - break; - default: - BuffDesc.BindFlags = Diligent::BIND_SHADER_RESOURCE; - name += std::format("SRV {}", buffer); - break; - } - - BuffDesc.BindFlags |= Diligent::BIND_VERTEX_BUFFER | - Diligent::BIND_INDEX_BUFFER | - Diligent::BIND_UNIFORM_BUFFER; - BuffDesc.Name = name.c_str(); - BuffDesc.Usage = Diligent::USAGE_DEFAULT; - - if (!pBuffer || (pBuffer && pBuffer->GetDesc().Size != bufferObj.data.size()) ) { - if (pBuffer) { - pBuffer->Release(); - pBuffer = nullptr; - } - Diligent::BufferData BuffData; - // Initial data must not be null for immutable buffers - BuffData.pData = BuffDesc.Usage != Diligent::USAGE_IMMUTABLE ? nullptr : bufferObj.data.data(); - BuffData.DataSize = static_cast(size); - MG_Diligent::g_pDevice->CreateBuffer(BuffDesc, &BuffData, &pBuffer); - } - - if (data != nullptr && BuffDesc.Usage != Diligent::USAGE_IMMUTABLE) { - MG_Diligent::g_pContext->UpdateBuffer(pBuffer, 0, - static_cast(size), data, - Diligent::RESOURCE_STATE_TRANSITION_MODE_TRANSITION); - } - return; - } - MG_State::SetError(result); - MG_Util::Debug::LogE("Error from MG State: %s", MG_Util::Debug::GLEnumToString(result)); - } - - void GetBufferParameteriv(GLenum target, GLenum pname, GLint* params) { - MG_Util::Debug::LogD("glGetBufferParameteriv, target: %d, pname: %d, params: %p", - target, pname, params); - GLenum result = MG_State::QueryBufferPropertyIntVector(target, pname, params); - if (result == GL_NO_ERROR) - return; - MG_State::SetError(result); - MG_Util::Debug::LogE("GetBufferParameteriv not implemented"); - } - - void GenBuffers(GLsizei n, GLuint* buffers) { - MG_Util::Debug::LogD("glGenBuffers, n: %d, buffers: %p", n, buffers); - - if (n < 0) { - MG_State::SetError(GL_INVALID_VALUE); - MG_Util::Debug::LogE("Invalid buffer count: %d", n); - return; - } - - GLenum result = MG_State::GenBufferNames(n, buffers); - if (result == GL_NO_ERROR) { - MG_Util::Debug::LogD("Generated buffer names:"); - for (GLsizei i = 0; i < n; ++i) { - MG_Util::Debug::LogD(" Buffer[%d] = %u", i, buffers[i]); - MG_Diligent::g_BufferMap[buffers[i]] = nullptr; - } - return; - } - - MG_State::SetError(result); - MG_Util::Debug::LogE("Error from MG State: %s", MG_Util::Debug::GLEnumToString(result)); - } - - GLboolean IsBuffer(GLuint buffer) { - MG_Util::Debug::LogD("glIsBuffer, buffer: %u", buffer); - - if (buffer == 0) { - return GL_FALSE; - } - - bool isValid = MG_State::ValidateAllocatedBufferHandle(buffer); - // Should we report gl error here or in MG_State? - MG_Util::Debug::LogD("Buffer %u is %s", buffer, isValid ? "valid" : "invalid"); - return isValid ? GL_TRUE : GL_FALSE; - } - - void BufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, const void* data) { - MG_Util::Debug::LogD("glBufferSubData, target: %s, offset: %lld, size: %lld, data: %p", - MG_Util::Debug::GLEnumToString(target), - static_cast(offset), - static_cast(size), - data); - GLenum result = MG_State::CommitBufferStorageRegion(target, offset, size, data); - if (result != GL_NO_ERROR) { - MG_State::SetError(result); - MG_Util::Debug::LogE("Error from MG State: %s", MG_Util::Debug::GLEnumToString(result)); - } - - GLuint buffer = MG_State_T::bufferState->GetCurrentBinding(target); - if (buffer == 0) return; - - auto& bufferObj = *MG_State_T::bufferState->GetBufferObject(buffer); - if (bufferObj.isDynamic) return; // Dynamic buffer should be created by glDraw* - - auto it = MG_Diligent::g_BufferMap.find(buffer); - if (it == MG_Diligent::g_BufferMap.end()) - return; - Diligent::IBuffer* pBuffer = it->second; - if (pBuffer) { - const auto& Desc = pBuffer->GetDesc(); - if (Desc.Usage == Diligent::USAGE_STAGING || Desc.Usage == Diligent::USAGE_DYNAMIC || Desc.Usage == Diligent::USAGE_UNIFIED) { - void* pMappedData = nullptr; - MG_Diligent::g_pContext->MapBuffer(pBuffer, Diligent::MAP_WRITE, Diligent::MAP_FLAG_DISCARD, pMappedData); - if (pMappedData) - { - memcpy(static_cast(pMappedData) + offset, data, size); - MG_Diligent::g_pContext->UnmapBuffer(pBuffer, Diligent::MAP_WRITE); - } else { - MG_Util::Debug::LogE("Failed to map buffer for BufferSubData"); - } - } else { - // For USAGE_DEFAULT or USAGE_IMMUTABLE, use UpdateBuffer - MG_Diligent::g_pContext->UpdateBuffer(pBuffer, static_cast(offset), - static_cast(size), data, - Diligent::RESOURCE_STATE_TRANSITION_MODE_TRANSITION); - } - } - } - void DeleteBuffers(GLsizei n, const GLuint *buffers) { - MG_Util::Debug::LogD("glDeleteBuffers, n: %d, buffers: %p", n, buffers); - - GLenum result = MG_State::DeleteBuffers(n, buffers); - if (result == GL_NO_ERROR) { - for (GLsizei i = 0; i < n; ++i) { - GLuint buffer = buffers[i]; - if (buffer != 0) { - auto it = MG_Diligent::g_BufferMap.find(buffer); - if (it != MG_Diligent::g_BufferMap.end()) { - if (it->second) { - it->second->Release(); - } - MG_Diligent::g_BufferMap.erase(it); - } - - } - } - return; - } - - MG_State::SetError(result); - MG_Util::Debug::LogE("Error from MG State: %s", MG_Util::Debug::GLEnumToString(result)); - } -} \ No newline at end of file diff --git a/MG/MG_GL/Implementations/GL/Buffer/GL_Buffer.h b/MG/MG_GL/Implementations/GL/Buffer/GL_Buffer.h deleted file mode 100644 index 4b2d1a8b..00000000 --- a/MG/MG_GL/Implementations/GL/Buffer/GL_Buffer.h +++ /dev/null @@ -1,23 +0,0 @@ -// -// Created by BZLZHH on 2025/3/15. -// - -#ifndef MOBILEGL_GL_BUFFER_H -#define MOBILEGL_GL_BUFFER_H - -namespace MG_GL::GL { - void* MapBufferRange(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access); - void FlushMappedBufferRange(GLenum target, GLintptr offset, GLsizeiptr length); - void CopyBufferSubData(GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); - void* MapBuffer(GLenum target, GLenum access); - GLboolean UnmapBuffer(GLenum target); - void BindBuffer(GLenum target, GLuint buffer); - void BufferData(GLenum target, GLsizeiptr size, const void* data, GLenum usage); - void BufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, const void* data); - void GetBufferParameteriv(GLenum target, GLenum pname, GLint* params); - void GenBuffers(GLsizei n, GLuint* buffers); - void DeleteBuffers(GLsizei n, const GLuint *buffers); - GLboolean IsBuffer(GLuint buffer); -} - -#endif //MOBILEGL_GL_BUFFER_H diff --git a/MG/MG_GL/Implementations/GL/Common/GL_Common.cpp b/MG/MG_GL/Implementations/GL/Common/GL_Common.cpp deleted file mode 100644 index 46feb169..00000000 --- a/MG/MG_GL/Implementations/GL/Common/GL_Common.cpp +++ /dev/null @@ -1,218 +0,0 @@ -// -// Created by BZLZHH on 2025/3/15. -// - -#include "../../../../Includes.h" - -namespace MG_GL::GL { - void CreateRenderPassAndFramebuffer(GLuint framebuffer, - const FramebufferObject& fbo, - MG_Diligent::GLFramebufferInfo& fbInfo); - - void Clear(GLbitfield mask) { - GLuint drawFramebuffer = MG_State_T::framebufferState->currentBindings_[GL_DRAW_FRAMEBUFFER]; - if (drawFramebuffer == 0) { - drawFramebuffer = 0; - } - - auto it = MG_Diligent::g_FramebufferMap.find(drawFramebuffer); - if (it == MG_Diligent::g_FramebufferMap.end()) { - MG_Util::Debug::LogE("Framebuffer not found: %u", drawFramebuffer); - return; - } - - MG_Diligent::GLFramebufferInfo& fbInfo = it->second; - auto& commonState = *MG_State_T::commonState; - - MG_Util::Debug::LogD("Setting render targets: %zu color attachments", fbInfo.ColorRTVs.size()); - MG_Diligent::g_pContext->SetRenderTargets( - static_cast(fbInfo.ColorRTVs.size()), - fbInfo.ColorRTVs.data(), - fbInfo.pDepthStencilRTV, - ::Diligent::RESOURCE_STATE_TRANSITION_MODE_TRANSITION - ); - -// if (MG_Diligent::IsInRenderPass) { -// MG_Util::Debug::LogD("Ending render pass before clear operation"); -// MG_Diligent::g_pContext->EndRenderPass(); -// MG_Diligent::IsInRenderPass = false; -// } - -// MG_Util::Debug::LogD("Beginning render pass for clear operation"); - -// if (!fbInfo.pRenderPass) { -// MG_GL::GL::CreateRenderPassAndFramebuffer(drawFramebuffer, -// *MG_State_T::framebufferState->GetCurrentFBO(GL_DRAW_FRAMEBUFFER), fbInfo); -// } -// Diligent::BeginRenderPassAttribs beginAttribs; -// beginAttribs.pRenderPass = fbInfo.pRenderPass; -// beginAttribs.pFramebuffer = fbInfo.pFramebuffer; -// beginAttribs.StateTransitionMode = Diligent::RESOURCE_STATE_TRANSITION_MODE_TRANSITION; -// beginAttribs.ClearValueCount = 0; -// beginAttribs.pClearValues = nullptr; - -// MG_Diligent::g_pContext->BeginRenderPass(beginAttribs); -// MG_Diligent::IsInRenderPass = true; - - if (mask & GL_COLOR_BUFFER_BIT) { - for (size_t i = 0; i < fbInfo.ColorRTVs.size(); ++i) { - if (fbInfo.ColorRTVs[i]) { - MG_Util::Debug::LogD("Clearing color attachment %zu", i); - MG_Diligent::g_pContext->ClearRenderTarget( - fbInfo.ColorRTVs[i], - commonState.clearColor, - Diligent::RESOURCE_STATE_TRANSITION_MODE_TRANSITION - ); - } - } - } - - if (mask & (GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT)) { - if (fbInfo.pDepthStencilRTV) { - Diligent::Uint32 clearFlags = 0; - if (mask & GL_DEPTH_BUFFER_BIT) clearFlags |= Diligent::CLEAR_DEPTH_FLAG; - if (mask & GL_STENCIL_BUFFER_BIT) clearFlags |= Diligent::CLEAR_STENCIL_FLAG; - - MG_Util::Debug::LogD("Clearing depth/stencil (flags: %u)", clearFlags); - MG_Diligent::g_pContext->ClearDepthStencil( - fbInfo.pDepthStencilRTV, - static_cast(clearFlags), - commonState.clearDepth, - 0, - Diligent::RESOURCE_STATE_TRANSITION_MODE_TRANSITION - ); - } - } - -// MG_Util::Debug::LogD("Ending render pass after clear operation"); -// MG_Diligent::g_pContext->EndRenderPass(); -// MG_Diligent::IsInRenderPass = false; - } - - void Enable(GLenum cap) { - MG_Util::Debug::LogD("glEnable, cap: %s", MG_Util::Debug::GLEnumToString(cap)); - GLenum result = MG_State::glEnable(cap); - if (result == GL_NO_ERROR) { - MG_Diligent::g_PSOManager.MarkPSODirty(MG_State_T::programState->currentProgram_); - return; - } - MG_State::SetError(result); - MG_Util::Debug::LogE("Error enabling capability: %s", MG_Util::Debug::GLEnumToString(result)); - } - - void Disable(GLenum cap) { - MG_Util::Debug::LogD("glDisable, cap: %s", MG_Util::Debug::GLEnumToString(cap)); - GLenum result = MG_State::glDisable(cap); - if (result == GL_NO_ERROR) { - MG_Diligent::g_PSOManager.MarkPSODirty(MG_State_T::programState->currentProgram_); - return; - } - MG_State::SetError(result); - MG_Util::Debug::LogE("Error disabling capability: %s", MG_Util::Debug::GLEnumToString(result)); - } - - void BlendFunc(GLenum sfactor, GLenum dfactor) { - MG_Util::Debug::LogD("glBlendFunc, sfactor: %s, dfactor: %s", - MG_Util::Debug::GLEnumToString(sfactor), - MG_Util::Debug::GLEnumToString(dfactor)); - GLenum result = MG_State::glBlendFunc(sfactor, dfactor); - if (result == GL_NO_ERROR) { - MG_Diligent::g_PSOManager.MarkPSODirty(MG_State_T::programState->currentProgram_); - return; - } - MG_State::SetError(result); - MG_Util::Debug::LogE("Error setting blend func: %s", MG_Util::Debug::GLEnumToString(result)); - } - - void BlendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) { - MG_Util::Debug::LogD("glBlendFuncSeparate, srcRGB: %s, dstRGB: %s, srcAlpha: %s, dstAlpha: %s", - MG_Util::Debug::GLEnumToString(srcRGB), - MG_Util::Debug::GLEnumToString(dstRGB), - MG_Util::Debug::GLEnumToString(srcAlpha), - MG_Util::Debug::GLEnumToString(dstAlpha)); - GLenum result = MG_State::glBlendFuncSeparate(srcRGB, dstRGB, srcAlpha, dstAlpha); - if (result == GL_NO_ERROR) { - MG_Diligent::g_PSOManager.MarkPSODirty(MG_State_T::programState->currentProgram_); - return; - } - MG_State::SetError(result); - MG_Util::Debug::LogE("Error setting separate blend func: %s", MG_Util::Debug::GLEnumToString(result)); - } - - void ClearColor(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) { - MG_Util::Debug::LogD("glClearColor, rgba: [%.2f, %.2f, %.2f, %.2f]", red, green, blue, alpha); - GLenum result = MG_State::glClearColor(red, green, blue, alpha); - if (result == GL_NO_ERROR) { - MG_Diligent::g_PSOManager.MarkPSODirty(MG_State_T::programState->currentProgram_); - return; - } - MG_State::SetError(result); - MG_Util::Debug::LogE("Error setting clear color: %s", MG_Util::Debug::GLEnumToString(result)); - } - - void ClearDepth(GLdouble depth) { - MG_Util::Debug::LogD("glClearDepth, depth: %.3f", depth); - GLenum result = MG_State::glClearDepth(depth); - if (result == GL_NO_ERROR) { - MG_Diligent::g_PSOManager.MarkPSODirty(MG_State_T::programState->currentProgram_); - return; - } - MG_State::SetError(result); - MG_Util::Debug::LogE("Error setting clear depth: %s", MG_Util::Debug::GLEnumToString(result)); - } - - void ColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) { - MG_Util::Debug::LogD("glColorMask, rgba: [%d, %d, %d, %d]", red, green, blue, alpha); - GLenum result = MG_State::glColorMask(red, green, blue, alpha); - if (result == GL_NO_ERROR) { - MG_Diligent::g_PSOManager.MarkPSODirty(MG_State_T::programState->currentProgram_); - return; - } - MG_State::SetError(result); - MG_Util::Debug::LogE("Error setting color mask: %s", MG_Util::Debug::GLEnumToString(result)); - } - - void DepthFunc(GLenum func) { - MG_Util::Debug::LogD("glDepthFunc, func: %s", MG_Util::Debug::GLEnumToString(func)); - GLenum result = MG_State::glDepthFunc(func); - if (result == GL_NO_ERROR) { - MG_Diligent::g_PSOManager.MarkPSODirty(MG_State_T::programState->currentProgram_); - return; - } - MG_State::SetError(result); - MG_Util::Debug::LogE("Error setting depth func: %s", MG_Util::Debug::GLEnumToString(result)); - } - - void DepthMask(GLboolean flag) { - MG_Util::Debug::LogD("glDepthMask, flag: %d", flag); - GLenum result = MG_State::glDepthMask(flag); - if (result == GL_NO_ERROR) { - MG_Diligent::g_PSOManager.MarkPSODirty(MG_State_T::programState->currentProgram_); - return; - } - MG_State::SetError(result); - MG_Util::Debug::LogE("Error setting depth mask: %s", MG_Util::Debug::GLEnumToString(result)); - } - - void Viewport(GLint x, GLint y, GLsizei width, GLsizei height) { - MG_Util::Debug::LogD("glViewport, x: %d, y: %d, width: %d, height: %d", - x, y, width, height); - GLenum result = MG_State::glViewport(x, y, width, height); - if (result == GL_NO_ERROR) { - return; - } - MG_State::SetError(result); - MG_Util::Debug::LogE("Error setting viewport: %s", MG_Util::Debug::GLEnumToString(result)); - } - - void PixelStorei(GLenum pname, GLint param) { - MG_Util::Debug::LogD("glPixelStorei, pname: %s, param: %d", MG_Util::Debug::GLEnumToString(pname), param); - GLenum result = MG_State::SetPixelStoreInt(pname,param); - if (result == GL_NO_ERROR) { - MG_Diligent::g_PSOManager.MarkPSODirty(MG_State_T::programState->currentProgram_); - return; - } - MG_State::SetError(result); - MG_Util::Debug::LogE("Error from MG State: %s", MG_Util::Debug::GLEnumToString(result)); - } -} \ No newline at end of file diff --git a/MG/MG_GL/Implementations/GL/Common/GL_Common.h b/MG/MG_GL/Implementations/GL/Common/GL_Common.h deleted file mode 100644 index c1a2b518..00000000 --- a/MG/MG_GL/Implementations/GL/Common/GL_Common.h +++ /dev/null @@ -1,23 +0,0 @@ -// -// Created by BZLZHH on 2025/3/15. -// - -#ifndef MOBILEGL_GL_COMMON_H -#define MOBILEGL_GL_COMMON_H - -namespace MG_GL::GL { - void ClearDepth(GLdouble depth); - void ClearColor(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); - void Clear(GLbitfield mask); - void PixelStorei(GLenum pname, GLint param); - void Enable(GLenum cap); - void Disable(GLenum cap); - void BlendFunc(GLenum sfactor, GLenum dfactor); - void BlendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); - void ColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); - void DepthFunc(GLenum func); - void DepthMask(GLboolean flag); - void Viewport(GLint x, GLint y, GLsizei width, GLsizei height); -} - -#endif //MOBILEGL_GL_COMMON_H diff --git a/MG/MG_GL/Implementations/GL/Drawing/GL_Drawing.cpp b/MG/MG_GL/Implementations/GL/Drawing/GL_Drawing.cpp deleted file mode 100644 index a8c3f968..00000000 --- a/MG/MG_GL/Implementations/GL/Drawing/GL_Drawing.cpp +++ /dev/null @@ -1,1123 +0,0 @@ -// -// Created by BZLZHH on 2025/3/15. -// - -#include "../../../../Includes.h" - -namespace MG_GL::GL { - bool IsSamplerType(GLenum type) { - switch (type) { - case GL_SAMPLER_2D: - case GL_SAMPLER_3D: - case GL_SAMPLER_CUBE: - case GL_SAMPLER_2D_SHADOW: - case GL_SAMPLER_2D_ARRAY: - case GL_SAMPLER_2D_ARRAY_SHADOW: - case GL_SAMPLER_CUBE_SHADOW: - return true; - default: - return false; - } - } - - inline size_t GetUniformSize(GLenum type) { - switch (type) { - case GL_FLOAT: return sizeof(float); - case GL_FLOAT_VEC2: return 2 * sizeof(float); - case GL_FLOAT_VEC3: return 3 * sizeof(float); - case GL_FLOAT_VEC4: - case GL_FLOAT_MAT2: return 4 * sizeof(float); - case GL_FLOAT_MAT3: return 9 * sizeof(float); - case GL_FLOAT_MAT4: return 16 * sizeof(float); - case GL_INT: - case GL_BOOL: - return sizeof(int); - case GL_INT_VEC2: return 2 * sizeof(int); - case GL_INT_VEC3: return 3 * sizeof(int); - case GL_INT_VEC4: return 4 * sizeof(int); - case GL_UNSIGNED_INT: return sizeof(uint32_t); - case GL_UNSIGNED_INT_VEC2: return 2 * sizeof(uint32_t); - case GL_UNSIGNED_INT_VEC3: return 3 * sizeof(uint32_t); - case GL_UNSIGNED_INT_VEC4: return 4 * sizeof(uint32_t); - default: return 0; - } - } - - inline size_t AlignSize(size_t size, size_t alignment) { - return (size + alignment - 1) & ~(alignment - 1); - } - - inline Diligent::SHADER_TYPE GetDiligentShaderType(GLenum shaderType) { - switch (shaderType) { - case GL_VERTEX_SHADER: - return Diligent::SHADER_TYPE_VERTEX; - case GL_FRAGMENT_SHADER: - return Diligent::SHADER_TYPE_PIXEL; - case GL_GEOMETRY_SHADER: - return Diligent::SHADER_TYPE_GEOMETRY; - case GL_COMPUTE_SHADER: - return Diligent::SHADER_TYPE_COMPUTE; - case GL_TESS_CONTROL_SHADER: - return Diligent::SHADER_TYPE_DOMAIN; - case GL_TESS_EVALUATION_SHADER: - return Diligent::SHADER_TYPE_HULL; - default: - return Diligent::SHADER_TYPE_UNKNOWN; - } - } - - Diligent::SHADER_TYPE GetShaderStageForUniform(GLuint program, const std::string& name, - Diligent::PipelineResourceLayoutDesc desc) { - auto& programInfo = MG_Diligent::g_ProgramMap[program]; - auto& programObj = MG_State_T::programState->programs_[program]; - - auto it = programInfo.uniformStages.find(name); - if (it != programInfo.uniformStages.end()) { - return it->second; - } - - Diligent::SHADER_TYPE stage = Diligent::SHADER_TYPE_ALL; - - // Try to get it from the PipelineResourceLayoutDesc first. - if (desc.DefaultVariableType != Diligent::SHADER_RESOURCE_VARIABLE_TYPE_STATIC) { - for (Diligent::Uint32 i = 0; i < desc.NumVariables; ++i) { - if (desc.Variables[i].Name == name) { - stage = desc.Variables[i].ShaderStages; - programInfo.uniformStages[name] = stage; - return stage; - } - } - } - - for (Diligent::Uint32 i = 0; i < desc.NumImmutableSamplers; ++i) { - if (desc.ImmutableSamplers[i].ShaderStages != Diligent::SHADER_TYPE_UNKNOWN && - strcmp(desc.ImmutableSamplers[i].SamplerOrTextureName, name.c_str()) == 0) { - stage = desc.ImmutableSamplers[i].ShaderStages; - programInfo.uniformStages[name] = stage; - return stage; - } - } - - // The code below is useless, we should remove it. - for (auto shader : programInfo.AttachedShadersID) { - auto& shaderObj = MG_State_T::programState->shaders_[shader]; - if (shaderObj.compiledSpirv.empty()) continue; - - spvc_context context = nullptr; - spvc_parsed_ir parsed_ir = nullptr; - spvc_compiler compiler = nullptr; - spvc_resources resources = nullptr; - - spvc_result result = spvc_context_create(&context); - if (result != SPVC_SUCCESS) continue; - - result = spvc_context_parse_spirv(context, - reinterpret_cast(shaderObj.compiledSpirv.data()), - shaderObj.compiledSpirv.size() / sizeof(SpvId), - &parsed_ir); - - if (result != SPVC_SUCCESS) { - spvc_context_destroy(context); - continue; - } - - result = spvc_context_create_compiler(context, SPVC_BACKEND_GLSL, - parsed_ir, SPVC_CAPTURE_MODE_TAKE_OWNERSHIP, &compiler); - - if (result != SPVC_SUCCESS) { - spvc_context_destroy(context); - continue; - } - - result = spvc_compiler_create_shader_resources(compiler, &resources); - if (result != SPVC_SUCCESS) { - spvc_context_destroy(context); - continue; - } - - const spvc_reflected_resource* resourceList = nullptr; - size_t resourceCount = 0; - - spvc_resources_get_resource_list_for_type( - resources, SPVC_RESOURCE_TYPE_UNIFORM_BUFFER, - &resourceList, &resourceCount); - - for (size_t i = 0; i < resourceCount; i++) { - if (strcmp(resourceList[i].name, name.c_str()) == 0) { - stage = GetDiligentShaderType(shaderObj.type); - break; - } - } - - spvc_resources_get_resource_list_for_type( - resources, SPVC_RESOURCE_TYPE_SAMPLED_IMAGE, - &resourceList, &resourceCount); - - for (size_t i = 0; i < resourceCount; i++) { - if (strcmp(resourceList[i].name, name.c_str()) == 0) { - stage = GetDiligentShaderType(shaderObj.type); - break; - } - } - - spvc_resources_get_resource_list_for_type( - resources, SPVC_RESOURCE_TYPE_STORAGE_IMAGE, - &resourceList, &resourceCount); - - for (size_t i = 0; i < resourceCount; i++) { - if (strcmp(resourceList[i].name, name.c_str()) == 0) { - stage = GetDiligentShaderType(shaderObj.type); - break; - } - } - - spvc_resources_get_resource_list_for_type( - resources, SPVC_RESOURCE_TYPE_SEPARATE_SAMPLERS, - &resourceList, &resourceCount); - - for (size_t i = 0; i < resourceCount; i++) { - if (strcmp(resourceList[i].name, name.c_str()) == 0) { - stage = GetDiligentShaderType(shaderObj.type); - break; - } - } - - spvc_context_destroy(context); - } - if (stage == Diligent::SHADER_TYPE_ALL) - stage = Diligent::SHADER_TYPE_PIXEL; - programInfo.uniformStages[name] = stage; - - return stage; - } - - - size_t HashPipelineResourceLayoutDesc(const Diligent::PipelineResourceLayoutDesc& desc) - { - size_t seed = 0; - auto hash_combine = [&](auto v) { - seed ^= std::hash()(v) + 0x9e3779b9 + (seed << 6) + (seed >> 2); - }; - - hash_combine(static_cast(desc.DefaultVariableType)); - hash_combine(static_cast(desc.DefaultVariableMergeStages)); - hash_combine(desc.NumVariables); - hash_combine(desc.NumImmutableSamplers); - - for (Diligent::Uint32 i = 0; i < desc.NumVariables; ++i) - { - const auto& var = desc.Variables[i]; - if (var.Name) - hash_combine(std::string_view(var.Name)); - else - hash_combine(0); - - hash_combine(static_cast(var.ShaderStages)); - hash_combine(static_cast(var.Type)); - } - - for (Diligent::Uint32 i = 0; i < desc.NumImmutableSamplers; ++i) - { - const auto& sampler = desc.ImmutableSamplers[i]; - if (sampler.SamplerOrTextureName) - hash_combine(std::string_view(sampler.SamplerOrTextureName)); - else - hash_combine(0); - - hash_combine(static_cast(sampler.ShaderStages)); - - const auto& desc = sampler.Desc; - - hash_combine(static_cast(desc.MinFilter)); - hash_combine(static_cast(desc.MagFilter)); - hash_combine(static_cast(desc.MipFilter)); - - hash_combine(static_cast(desc.AddressU)); - hash_combine(static_cast(desc.AddressV)); - hash_combine(static_cast(desc.AddressW)); - - hash_combine(desc.MipLODBias); - hash_combine(desc.MaxAnisotropy); - hash_combine(static_cast(desc.ComparisonFunc)); - - hash_combine(desc.BorderColor[0]); - hash_combine(desc.BorderColor[1]); - hash_combine(desc.BorderColor[2]); - hash_combine(desc.BorderColor[3]); - - hash_combine(desc.MinLOD); - hash_combine(desc.MaxLOD); - hash_combine(static_cast(desc.UnnormalizedCoords)); - } - - return seed; - } - - void UpdateSamplerAndTextureUniforms(GLuint program, Diligent::IShaderResourceBinding& pSRB, - Diligent::PipelineResourceLayoutDesc desc) { - MG_Util::Debug::LogD("Updating sampler and texture uniforms for program %u", program); - auto& programObj = MG_State_T::programState->programs_[program]; - - for (auto& [name, uniform] : programObj.uniformValues) { - if (!IsSamplerType(uniform.type)) continue; - - GLuint textureID = 0; - if (!uniform.intData.empty()) { - auto textureUnit = static_cast(uniform.intData[0]); - auto unitState = &MG_State_T::textureState->textureUnits_[textureUnit]; - textureID = unitState->GetBoundTexture(unitState->activeTarget); - MG_Util::Debug::LogD("Sampler '%s' (type: %X) uses texture ID: %u", name.c_str(), uniform.type, textureID); - } - - Diligent::ITextureView* pTextureView = nullptr; - if (textureID != 0) { - auto it = MG_Diligent::g_TextureViewMap.find(textureID); - if (it != MG_Diligent::g_TextureViewMap.end()) { - pTextureView = it->second; - MG_Util::Debug::LogD("Found ITextureView for texture ID %u.", textureID); - } else { - MG_Util::Debug::LogW("ITextureView not found for texture ID %u (sampler '%s').", textureID, name.c_str()); - } - } - - if (pTextureView) { - static MG_Global::unordered_map, Diligent::SHADER_TYPE> g_UniformStageCache; - - size_t descKey = HashPipelineResourceLayoutDesc(desc); - auto key = std::make_tuple(program, name, descKey); - - Diligent::SHADER_TYPE stage; - auto itStage = g_UniformStageCache.find(key); - if (itStage != g_UniformStageCache.end()) { - stage = itStage->second; - } - else { - stage = GetShaderStageForUniform(program, name, desc); - g_UniformStageCache[key] = stage; - } - - MG_Util::Debug::LogD("Setting texture view for sampler '%s' in stage %d.", name.c_str(), stage); - auto* pVar = pSRB.GetVariableByName(stage, name.c_str()); - if (pVar) { - pTextureView->SetSampler(MG_Diligent::g_SamplerMap[textureID]); - pVar->Set(pTextureView, Diligent::SET_SHADER_RESOURCE_FLAG_ALLOW_OVERWRITE); - } else { - MG_Util::Debug::LogE("Failed to get shader variable for sampler '%s' in stage %d. Skipping.", name.c_str(), stage); - } - - } else { - MG_Util::Debug::LogW("No ITextureView available for sampler '%s' (texture ID: %u). Skipping.", name.c_str(), textureID); - } - } - MG_Util::Debug::LogD("Finished updating sampler and texture uniforms for program %u.", program); - } - - void UpdateUniformsToDefaultUBO(GLuint program, Diligent::IShaderResourceBinding& pSRB) { - MG_Util::Debug::LogD("Updating uniforms to default UBO for program %u", program); - auto& programInfo = MG_Diligent::g_ProgramMap[program]; - auto& programObj = MG_State_T::programState->programs_[program]; - - if (!programInfo.pDefaultUBO) { - MG_Util::Debug::LogE("Program %u does not have a default UBO. Skipping uniform update.", program); - return; - } - if (programObj.uniformValues.empty()) { - MG_Util::Debug::LogE("Program %u has no uniforms. Skipping uniform update.", program); - return; - } - - void * mapped; - MG_Util::Debug::LogD("Mapping UBO for program %u", program); - MG_Diligent::g_pContext->MapBuffer(programInfo.pDefaultUBO, Diligent::MAP_WRITE, - Diligent::MAP_FLAG_DISCARD, mapped); - - if (mapped) { - MG_Util::Debug::LogD("UBO mapped successfully for program %u. Updating uniform values.", program); - auto* uboData = static_cast(mapped); - - for (auto& name: programInfo.uniformBufferNames) { - MG_Util::Debug::LogW("Attempting to update uniform '%s' for program %u", name.c_str(), program); - auto& uniform = programObj.uniformValues[name]; - if (IsSamplerType(uniform.type)) continue; - - auto it = programInfo.uniformOffsets.find(name); - if (it != programInfo.uniformOffsets.end()) { - size_t offset = it->second; - MG_Util::Debug::LogD("Updating uniform '%s' at offset %zu for program %u", name.c_str(), offset, program); - - size_t dataSize = 0; - const void* dataPtr = nullptr; - - if (!uniform.floatData.empty()) { - dataSize = uniform.floatData.size() * sizeof(float); - dataPtr = uniform.floatData.data(); - } else if (!uniform.intData.empty()) { - dataSize = uniform.intData.size() * sizeof(int); - dataPtr = uniform.intData.data(); - } else if (!uniform.uintData.empty()) { - dataSize = uniform.uintData.size() * sizeof(uint32_t); - dataPtr = uniform.uintData.data(); - } - - if (dataPtr && dataSize > 0 && dataSize <= GetUniformSize(uniform.type)) { - memcpy(uboData + offset, dataPtr, dataSize); - } else { - if (!dataPtr || dataSize == 0) { - MG_Util::Debug::LogW("Cannot copy data for uniform '%s': data is null or size is zero.", name.c_str()); - } else if (dataSize > GetUniformSize(uniform.type)) { - MG_Util::Debug::LogW("Cannot copy data for uniform '%s': provided data size (%zu) exceeds uniform size (%zu).", name.c_str(), dataSize, GetUniformSize(uniform.type)); - } - // Fallback to individual assignments if memcpy is not suitable or data is malformed - switch (uniform.type) { - case GL_FLOAT: - if (!uniform.floatData.empty()) *reinterpret_cast(uboData + offset) = uniform.floatData[0]; - break; - case GL_FLOAT_VEC2: - case GL_FLOAT_VEC3: - case GL_FLOAT_VEC4: - case GL_FLOAT_MAT2: - case GL_FLOAT_MAT3: - case GL_FLOAT_MAT4: - // memcpy handled above if data is valid - break; - case GL_INT: - case GL_BOOL: - if (!uniform.intData.empty()) *reinterpret_cast(uboData + offset) = uniform.intData[0]; - break; - case GL_INT_VEC2: - case GL_INT_VEC3: - case GL_INT_VEC4: - // memcpy handled above if data is valid - break; - case GL_UNSIGNED_INT: - if (!uniform.uintData.empty()) *reinterpret_cast(uboData + offset) = uniform.uintData[0]; - break; - case GL_UNSIGNED_INT_VEC2: - case GL_UNSIGNED_INT_VEC3: - case GL_UNSIGNED_INT_VEC4: - // memcpy handled above if data is valid - break; - } - } - } else { - MG_Util::Debug::LogW("Cannot update uniform '%s' for program %u, offset not found", name.c_str(), program); - } - } - MG_Util::Debug::LogD("Finished updating uniform values in UBO for program %u.", program); - } else { - MG_Util::Debug::LogE("Failed to map UBO for program %u.", program); - } - - MG_Util::Debug::LogD("Unmapping UBO for program %u", program); - if (programInfo.pDefaultUBO) { - MG_Diligent::g_pContext->UnmapBuffer(programInfo.pDefaultUBO, Diligent::MAP_WRITE); - auto* pVarVertex = pSRB.GetVariableByName(Diligent::SHADER_TYPE_VERTEX, "MG_DEFAULT_UBO"); - if (pVarVertex) { - pVarVertex->Set(programInfo.pDefaultUBO, Diligent::SET_SHADER_RESOURCE_FLAG_ALLOW_OVERWRITE); - } else { - MG_Util::Debug::LogE("Failed to get vertex shader variable 'MG_DEFAULT_UBO' for program %u.", program); - } - auto* pVarPixel = pSRB.GetVariableByName(Diligent::SHADER_TYPE_PIXEL, "MG_DEFAULT_UBO"); - if (pVarPixel) { - pVarPixel->Set(programInfo.pDefaultUBO, Diligent::SET_SHADER_RESOURCE_FLAG_ALLOW_OVERWRITE); - } else { - MG_Util::Debug::LogE("Failed to get pixel shader variable 'MG_DEFAULT_UBO' for program %u.", program); - } - } else { - MG_Util::Debug::LogW("Default UBO is null for program %u. Skipping setting shader variables.", program); - } - } - - template - void generate_triangle_fan_indices(std::vector& out_data, const void* in_indices, size_t count) { - const auto* pIn = static_cast(in_indices); - std::vector new_indices; - new_indices.reserve((count - 2) * 3); - T i0 = pIn[0]; - for (size_t i = 1; i < count - 1; ++i) { - new_indices.push_back(i0); - new_indices.push_back(pIn[i]); - new_indices.push_back(pIn[i+1]); - } - out_data.resize(new_indices.size() * sizeof(T)); - memcpy(out_data.data(), new_indices.data(), out_data.size()); - } - - static Diligent::IBuffer* g_ConvertedIndexBuffer = nullptr; - static std::vector g_ConvertedIndices; - - const void* ConvertUint8IndicesToUint16(const uint8_t* src, GLsizei count) - { - g_ConvertedIndices.resize(count); - for (GLsizei i = 0; i < count; ++i) - { - g_ConvertedIndices[i] = static_cast(src[i]); - } - return g_ConvertedIndices.data(); - } - - static bool isConvertedIBO = false; - void PrepareForDraw(GLenum mode, GLsizei* pCount, GLenum& type, const void*& pIndices) - { - auto* pVAO = MG_State_T::vertexArrayState->GetCurrentVAO(); - if (!pVAO) - { - MG_Util::Debug::LogE("No current VAO found. A VAO must be bound before drawing."); - return; - } - - isConvertedIBO = false; - - if (type == GL_UNSIGNED_BYTE) - { - isConvertedIBO = true; - GLsizei count = *pCount; - const uint8_t* src = nullptr; - - if (pVAO->elementBuffer != 0) - { - auto* bufObj = MG_State_T::bufferState->GetBufferObject(pVAO->elementBuffer); - if (!bufObj) - { - MG_Util::Debug::LogE("EBO not found for VAO"); - return; - } - size_t offset = reinterpret_cast(pIndices); - if (offset + count > bufObj->data.size()) - { - MG_Util::Debug::LogE("Index offset out of bounds in EBO"); - return; - } - src = bufObj->data.data() + offset; - } - else - { - src = static_cast(pIndices); - } - - if (!src) - { - MG_Util::Debug::LogE("No valid index data for GL_UNSIGNED_BYTE indices"); - return; - } - - // ת - const void* convertedIndices = ConvertUint8IndicesToUint16(src, count); - type = GL_UNSIGNED_SHORT; - - if (!g_ConvertedIndexBuffer || - g_ConvertedIndexBuffer->GetDesc().Size < g_ConvertedIndices.size() * sizeof(uint16_t)) - { - if (g_ConvertedIndexBuffer) { - g_ConvertedIndexBuffer->Release(); - g_ConvertedIndexBuffer = nullptr; - } - - Diligent::BufferDesc BuffDesc; - BuffDesc.Name = "Converted U8 to U16 Temp Index Buffer"; - BuffDesc.Size = g_ConvertedIndices.size() * sizeof(uint16_t); - BuffDesc.Usage = Diligent::USAGE_DYNAMIC; - BuffDesc.BindFlags = Diligent::BIND_INDEX_BUFFER; - //BuffDesc.CPUAccessFlags = Diligent::CPU_ACCESS_WRITE; // CPUʱ־ - MG_Diligent::g_pDevice->CreateBuffer(BuffDesc, nullptr, &g_ConvertedIndexBuffer); - } - - if (g_ConvertedIndexBuffer) { - void* pMappedData = nullptr; - MG_Diligent::g_pContext->MapBuffer(g_ConvertedIndexBuffer, Diligent::MAP_WRITE, - Diligent::MAP_FLAG_DISCARD, pMappedData); - if (pMappedData) { - memcpy(pMappedData, g_ConvertedIndices.data(), - g_ConvertedIndices.size() * sizeof(uint16_t)); - MG_Diligent::g_pContext->UnmapBuffer(g_ConvertedIndexBuffer, Diligent::MAP_WRITE); - } - - // ؼ޸ģȷ - MG_Diligent::g_pContext->SetIndexBuffer(g_ConvertedIndexBuffer, 0, - Diligent::RESOURCE_STATE_TRANSITION_MODE_TRANSITION); - - // pIndices Ϊ nullptr ʾʹ - pIndices = nullptr; - } - else { - MG_Util::Debug::LogE("Failed to create converted index buffer for GL_UNSIGNED_BYTE indices"); - // pIndices Ϊ nullptr - pIndices = nullptr; - } - } - - GLuint program = MG_State::GetCurrentProgram(); - - if (program == 0) { - MG_Util::Debug::LogE("No active program for DrawElements"); - return; - } - - auto& programInfo = MG_Diligent::g_ProgramMap[program]; - - GLuint drawFB = MG_State_T::framebufferState->currentBindings_[GL_DRAW_FRAMEBUFFER]; - - auto itFB = MG_Diligent::g_FramebufferMap.find(drawFB); - if (itFB == MG_Diligent::g_FramebufferMap.end()) { - MG_Util::Debug::LogE("Framebuffer not found: %u", drawFB); - return; - } - MG_Diligent::GLFramebufferInfo& fbInfo = itFB->second; - - MG_Util::Debug::LogD("Fetching PSO for program %u", program); - programInfo.pPipelineState = MG_Diligent::g_PSOManager.GetOrCreatePSO( - program, - programInfo, - *MG_State_T::commonState, - *MG_State_T::vertexArrayState, - fbInfo, - mode - ); - - if (!programInfo.pPipelineState) { - MG_Util::Debug::LogE("Failed to get or create PSO for program %u", program); - return; - } - MG_Util::Debug::LogD("Successfully obtained PSO for program %u", program); - - if (!programInfo.pResourceBinding) { - MG_Util::Debug::LogD("Creating ShaderResourceBinding for program %u", program); - programInfo.pPipelineState->CreateShaderResourceBinding( - &programInfo.pResourceBinding, true); - if (!programInfo.pResourceBinding) { - MG_Util::Debug::LogE("Failed to create ShaderResourceBinding for program %u", program); - return; - } - - MG_Util::Debug::LogD("Successfully created ShaderResourceBinding for program %u", program); - } - - MG_Diligent::g_pContext->SetPipelineState(programInfo.pPipelineState); - - for (uint32_t attribIndex = 0; attribIndex < MG_Constants::VertexArray::MAX_VERTEX_ATTRIBS; ++attribIndex) { - const auto& attrib = pVAO->attribs[attribIndex]; - if (!attrib.enabled || attrib.buffer == 0) continue; - - GLuint buffer = attrib.buffer; - auto* pBufferObj = MG_State_T::bufferState->GetBufferObject(buffer); - assert(pBufferObj != nullptr); - auto& bufferObj = *pBufferObj; - - Diligent::IBuffer *&pBuffer = MG_Diligent::g_BufferMap[buffer]; - if (bufferObj.isDynamic && (!pBuffer || (pBuffer && pBuffer->GetDesc().Size != bufferObj.data.size()))) { - if (pBuffer) { - pBuffer->Release(); - pBuffer = nullptr; - } - - Diligent::BufferDesc BuffDesc; - std::string bufferName = "Dynamic VBO " + std::to_string(buffer); - BuffDesc.Name = bufferName.c_str(); - BuffDesc.Size = bufferObj.data.size(); - BuffDesc.Usage = Diligent::USAGE_DYNAMIC; - BuffDesc.BindFlags = Diligent::BIND_VERTEX_BUFFER | - Diligent::BIND_INDEX_BUFFER | - Diligent::BIND_UNIFORM_BUFFER; - BuffDesc.CPUAccessFlags = Diligent::CPU_ACCESS_WRITE; - - MG_Diligent::g_pDevice->CreateBuffer(BuffDesc, nullptr, &pBuffer); - - if (!pBuffer) { - MG_Util::Debug::LogE("Failed to create dynamic vertex buffer %u", buffer); - continue; - } - } - } - - if (mode == GL_TRIANGLE_FAN) - { - if (*pCount < 3) return; - - const void* pOriginalIndices = nullptr; - if (pVAO->elementBuffer != 0) - { - auto* pBufferObj = MG_State_T::bufferState->GetBufferObject(pVAO->elementBuffer); - assert(pBufferObj != nullptr); - auto& bufferObj = *pBufferObj; - pOriginalIndices = bufferObj.data.data() + reinterpret_cast(pIndices); - } - else - { - pOriginalIndices = pIndices; - } - - std::vector newIndexData; - switch(type) { - case GL_UNSIGNED_BYTE: - generate_triangle_fan_indices(newIndexData, pOriginalIndices, *pCount); - break; - case GL_UNSIGNED_SHORT: - generate_triangle_fan_indices(newIndexData, pOriginalIndices, *pCount); - break; - case GL_UNSIGNED_INT: - generate_triangle_fan_indices(newIndexData, pOriginalIndices, *pCount); - break; - default: - MG_Util::Debug::LogE("Unsupported index type for triangle fan conversion: %X", type); - return; - } - - *pCount = (static_cast(*pCount) - 2) * 3; - pIndices = nullptr; - - if (!MG_Diligent::g_TriangleFanIndexBuffer || MG_Diligent::g_TriangleFanIndexBuffer->GetDesc().Size < newIndexData.size()) - { - if (MG_Diligent::g_TriangleFanIndexBuffer) { - MG_Diligent::g_TriangleFanIndexBuffer->Release(); - MG_Diligent::g_TriangleFanIndexBuffer = nullptr; - } - - Diligent::BufferDesc BuffDesc; - BuffDesc.Name = "Triangle Fan Temp Index Buffer"; - BuffDesc.Size = newIndexData.size(); - BuffDesc.Usage = Diligent::USAGE_DYNAMIC; - BuffDesc.BindFlags = Diligent::BIND_INDEX_BUFFER; - BuffDesc.CPUAccessFlags = Diligent::CPU_ACCESS_WRITE; - MG_Diligent::g_pDevice->CreateBuffer(BuffDesc, nullptr, &MG_Diligent::g_TriangleFanIndexBuffer); - } - - if (MG_Diligent::g_TriangleFanIndexBuffer) - { - void* pMappedData = nullptr; - MG_Diligent::g_pContext->MapBuffer(MG_Diligent::g_TriangleFanIndexBuffer, Diligent::MAP_WRITE, Diligent::MAP_FLAG_DISCARD, pMappedData); - if (pMappedData) - { - memcpy(pMappedData, newIndexData.data(), newIndexData.size()); - MG_Diligent::g_pContext->UnmapBuffer(MG_Diligent::g_TriangleFanIndexBuffer, Diligent::MAP_WRITE); - } - MG_Diligent::g_pContext->SetIndexBuffer(MG_Diligent::g_TriangleFanIndexBuffer, 0, Diligent::RESOURCE_STATE_TRANSITION_MODE_TRANSITION); - } - } else if (pVAO->elementBuffer != 0) { - GLuint buffer = pVAO->elementBuffer; - auto* pBufferObj = MG_State_T::bufferState->GetBufferObject(buffer); - assert(pBufferObj != nullptr); - auto& bufferObj = *pBufferObj; - - Diligent::IBuffer*& pBuffer = MG_Diligent::g_BufferMap[buffer]; - if (bufferObj.isDynamic || (!pBuffer || (pBuffer && pBuffer->GetDesc().Size != bufferObj.data.size()))) { - if (pBuffer) { - pBuffer->Release(); - pBuffer = nullptr; - } - - Diligent::BufferDesc BuffDesc; - std::string bufferName = "Dynamic IBO " + std::to_string(buffer); - BuffDesc.Name = bufferName.c_str(); - BuffDesc.Size = bufferObj.data.size(); - BuffDesc.Usage = Diligent::USAGE_DYNAMIC; - BuffDesc.BindFlags = Diligent::BIND_VERTEX_BUFFER | - Diligent::BIND_INDEX_BUFFER | - Diligent::BIND_UNIFORM_BUFFER; - BuffDesc.CPUAccessFlags = Diligent::CPU_ACCESS_WRITE; - - MG_Diligent::g_pDevice->CreateBuffer(BuffDesc, nullptr, &pBuffer); - - if (!pBuffer) { - MG_Util::Debug::LogE("Failed to create dynamic index buffer %u", buffer); - } - } - if (pBuffer && !isConvertedIBO) - { - MG_Diligent::g_pContext->SetIndexBuffer(pBuffer, 0, Diligent::RESOURCE_STATE_TRANSITION_MODE_TRANSITION); - } - } - - // Update data for all dynamic buffers - MG_Util::Debug::LogD("g_BufferMap size: %d", MG_Diligent::g_BufferMap.size()); // Moved out of loop - - for (auto& [bufferID, pBuffer] : MG_Diligent::g_BufferMap) { - auto* pBufferObject = MG_State_T::bufferState->GetBufferObject(bufferID); - if (!pBufferObject || !pBuffer) { - if (!pBufferObject) { - MG_Util::Debug::LogW("Buffer ID %u not found in bufferState. Skipping update.", bufferID); - } - continue; - } - - auto& bufferObj = *pBufferObject; - if (!bufferObj.isDynamic) continue; - - MG_Util::Debug::LogD("Mapping dynamic buffer %u for data update.", bufferID); - void* pMappedData = nullptr; - MG_Diligent::g_pContext->MapBuffer( - pBuffer, - Diligent::MAP_WRITE, - Diligent::MAP_FLAG_DISCARD, - pMappedData); - - if (!pMappedData) { - MG_Util::Debug::LogE("Failed to map dynamic buffer %u for data update.", bufferID); - continue; - } - - memcpy(pMappedData, bufferObj.data.data(), bufferObj.data.size()); - MG_Diligent::g_pContext->UnmapBuffer(pBuffer, Diligent::MAP_WRITE); - bufferObj.dirty = false; - MG_Util::Debug::LogD("Successfully updated data for dynamic buffer %u.", bufferID); - } - - std::vector vertexBuffers; - std::vector offsets; - - for (uint32_t attribIndex = 0; attribIndex < MG_Constants::VertexArray::MAX_VERTEX_ATTRIBS; ++attribIndex) { - const auto& attrib = pVAO->attribs[attribIndex]; - if (!attrib.enabled || attrib.buffer == 0) continue; - - GLuint buffer = attrib.buffer; - auto it = MG_Diligent::g_BufferMap.find(buffer); - if (it == MG_Diligent::g_BufferMap.end() || !it->second) continue; - - vertexBuffers.push_back(it->second); - offsets.push_back(static_cast(reinterpret_cast(attrib.pointer))); - } - - if (!vertexBuffers.empty()) { - MG_Util::Debug::LogD("Setting Vertex Buffers:"); - MG_Util::Debug::LogD(" NumBuffers: %u", static_cast(vertexBuffers.size())); - for (size_t i = 0; i < vertexBuffers.size(); ++i) { - MG_Util::Debug::LogD(" Buffer %zu:", i); - if (vertexBuffers[i]) { - const auto& desc = vertexBuffers[i]->GetDesc(); - MG_Util::Debug::LogD(" Name: %s", desc.Name ? desc.Name : "N/A"); - MG_Util::Debug::LogD(" Size: %llu", desc.Size); - MG_Util::Debug::LogD(" Usage: %d", desc.Usage); - MG_Util::Debug::LogD(" BindFlags: %u", desc.BindFlags); - MG_Util::Debug::LogD(" CPUAccessFlags: %u", desc.CPUAccessFlags); - } else { - MG_Util::Debug::LogD(" "); - } - MG_Util::Debug::LogD(" Offset: %llu", offsets[i]); - } - - MG_Diligent::g_pContext->SetVertexBuffers( - 0, - static_cast(vertexBuffers.size()), - vertexBuffers.data(), - offsets.data(), - Diligent::RESOURCE_STATE_TRANSITION_MODE_TRANSITION, - Diligent::SET_VERTEX_BUFFERS_FLAG_NONE - ); - } - - MG_Util::Debug::LogD("Updating uniforms for program %u", program); - UpdateUniformsToDefaultUBO(program, *programInfo.pResourceBinding); - UpdateSamplerAndTextureUniforms(program, *programInfo.pResourceBinding, - programInfo.pPipelineState->GetDesc().ResourceLayout); - - MG_Util::Debug::LogD("Committing shader resources for program %u", program); - MG_Diligent::g_pContext->CommitShaderResources( - programInfo.pResourceBinding, - Diligent::RESOURCE_STATE_TRANSITION_MODE_TRANSITION - ); - } - - void DrawElements(GLenum mode, GLsizei count, GLenum type, const void* indices) { - GLenum actualType = type; - const void* pIndices = indices; - PrepareForDraw(mode, &count, actualType, pIndices); - - Diligent::DrawIndexedAttribs drawAttrs; - drawAttrs.NumIndices = count; - drawAttrs.Flags = Diligent::DRAW_FLAG_VERIFY_ALL; - Diligent::VALUE_TYPE indexType = ConvertGLTypeToDiligent(actualType); - drawAttrs.IndexType = indexType; - auto* pVAO = MG_State_T::vertexArrayState->GetCurrentVAO(); - if (pIndices != nullptr && pVAO != nullptr && pVAO->elementBuffer != 0) { - size_t indexSize = 1; - if (drawAttrs.IndexType == Diligent::VT_UINT16) indexSize = 2; - else if (drawAttrs.IndexType == Diligent::VT_UINT32) indexSize = 4; - if (isConvertedIBO) - drawAttrs.FirstIndexLocation = 0; - else - drawAttrs.FirstIndexLocation = static_cast(reinterpret_cast(pIndices) / indexSize); - } - - MG_Util::Debug::LogD("DrawIndexedAttribs Dump:"); - MG_Util::Debug::LogD(" NumIndices: %u", drawAttrs.NumIndices); - MG_Util::Debug::LogD(" IndexType: %d", drawAttrs.IndexType); - MG_Util::Debug::LogD(" Flags: %u", drawAttrs.Flags); - MG_Util::Debug::LogD(" NumInstances: %u", drawAttrs.NumInstances); - MG_Util::Debug::LogD(" BaseVertex: %u", drawAttrs.BaseVertex); - MG_Util::Debug::LogD(" FirstIndexLocation: %u", drawAttrs.FirstIndexLocation); - MG_Util::Debug::LogD(" FirstInstanceLocation: %u", drawAttrs.FirstInstanceLocation); - -// EnsureRenderPassActive(); - MG_Diligent::g_pContext->DrawIndexed(drawAttrs); -// MG_Diligent::g_pContext->EndRenderPass(); -// MG_Diligent::IsInRenderPass = false; - MG_Util::Debug::LogD("DrawIndexed completed."); - } - - void DrawArrays(GLenum mode, GLint first, GLsizei count) { - // TODO - } - - void DrawElementsBaseVertex(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLint basevertex) { - GLenum actualType = type; - const void* pIndices = indices; - PrepareForDraw(mode, &count, actualType, pIndices); - - auto* pVAO = MG_State_T::vertexArrayState->GetCurrentVAO(); - if (pVAO->elementBuffer != 0) { - GLuint buffer = pVAO->elementBuffer; - auto it = MG_Diligent::g_BufferMap.find(buffer); - if (it != MG_Diligent::g_BufferMap.end() && it->second) { - auto offset = reinterpret_cast(indices); - - MG_Diligent::g_pContext->SetIndexBuffer( - it->second, - offset, - Diligent::RESOURCE_STATE_TRANSITION_MODE_TRANSITION - ); - } - } - - Diligent::DrawIndexedAttribs drawAttrs; - drawAttrs.NumIndices = count; - drawAttrs.Flags = Diligent::DRAW_FLAG_VERIFY_ALL; - drawAttrs.IndexType = ConvertGLTypeToDiligent(type); - drawAttrs.BaseVertex = basevertex; // Apply basevertex - MG_Util::Debug::LogD("DrawIndexedAttribs Dump (BaseVertex):"); - MG_Util::Debug::LogD(" NumIndices: %u", drawAttrs.NumIndices); - MG_Util::Debug::LogD(" IndexType: %d", drawAttrs.IndexType); - MG_Util::Debug::LogD(" Flags: %u", drawAttrs.Flags); - MG_Util::Debug::LogD(" NumInstances: %u", drawAttrs.NumInstances); - MG_Util::Debug::LogD(" BaseVertex: %u", drawAttrs.BaseVertex); - MG_Util::Debug::LogD(" FirstIndexLocation: %u", drawAttrs.FirstIndexLocation); - MG_Util::Debug::LogD(" FirstInstanceLocation: %u", drawAttrs.FirstInstanceLocation); - - MG_Diligent::g_pContext->DrawIndexed(drawAttrs); - MG_Util::Debug::LogD("DrawIndexed (BaseVertex) completed."); - } - - struct DrawIndexedArguments - { - Diligent::Uint32 IndexCount; - Diligent::Uint32 InstanceCount; - Diligent::Uint32 FirstIndex; - Diligent::Uint32 BaseVertex; - Diligent::Uint32 FirstInstance; - }; - - void MultiDrawElements(GLenum mode, const GLsizei *count, GLenum type, const GLvoid *const *indices, GLsizei drawcount) { - return; - // PrepareForDraw(); - - /* - if (MG_Diligent::IsInRenderPass) { - MG_Util::Debug::LogD("Ending current render pass."); - MG_Diligent::g_pContext->EndRenderPass(); - MG_Diligent::IsInRenderPass = false; - MG_Util::Debug::LogD("Current render pass ended."); - } else { - MG_Util::Debug::LogD("No active render pass to end."); - } - - auto* pVAO = MG_State_T::vertexArrayState->GetCurrentVAO(); - Diligent::IBuffer* pIndexBuffer = nullptr; - if (pVAO->elementBuffer != 0) { - auto it = MG_Diligent::g_BufferMap.find(pVAO->elementBuffer); - if (it != MG_Diligent::g_BufferMap.end()) - pIndexBuffer = it->second; - } - if (!pIndexBuffer) { - MG_Util::Debug::LogE("No valid index buffer bound for multi-draw"); - return; - } - - MG_Diligent::g_pContext->SetIndexBuffer( - pIndexBuffer, - 0, - Diligent::RESOURCE_STATE_TRANSITION_MODE_TRANSITION - ); - - Diligent::VALUE_TYPE indexType = ConvertGLTypeToDiligent(type); - Diligent::Uint32 indexSize = 0; - switch (indexType) { - case Diligent::VT_UINT16: indexSize = 2; break; - case Diligent::VT_UINT32: indexSize = 4; break; - default: - MG_Util::Debug::LogE("Unsupported index type for multi-draw: %d", type); - return; - } - - std::vector indirectCmds; - indirectCmds.reserve(drawcount); - indirectCmds.clear(); - for (GLsizei i = 0; i < drawcount; ++i) { - if (count[i] <= 0) continue; - - DrawIndexedArguments cmd{}; - cmd.IndexCount = static_cast(count[i]); - cmd.InstanceCount = 1; - cmd.FirstIndex = static_cast(reinterpret_cast(indices[i]) / indexSize); - cmd.BaseVertex = 0; - cmd.FirstInstance = 0; - - indirectCmds.push_back(cmd); - } - - if (indirectCmds.empty()) { - MG_Util::Debug::LogW("No valid draw items in multi-draw"); - return; - } - - static GLuint indirectBufId = 0; - Diligent::IBuffer* pIndirectBuffer = nullptr; - if (indirectBufId == 0) { - bool isIdFree = false; - while (!isIdFree) { - MG_Diligent::g_NextResourceId++; - bool isIdAlreadyExist = false; - for (auto& [id, bufferObj] : MG_State_T::bufferState->buffers_) { - if (MG_Diligent::g_NextResourceId == id) { - isIdAlreadyExist = true; - break; - } - } - isIdFree = !isIdAlreadyExist; - } - indirectBufId = MG_Diligent::g_NextResourceId; - MG_Diligent::g_NextResourceId++; - } - - auto& bufEntry = MG_Diligent::g_BufferMap[indirectBufId]; - const auto requiredSize = indirectCmds.size() * sizeof(DrawIndexedArguments); - - bool recreateBuffer = !bufEntry || bufEntry->GetDesc().Size != requiredSize; - - if (recreateBuffer) { - if (bufEntry) { - bufEntry->Release(); - bufEntry = nullptr; - } - - Diligent::BufferDesc desc; - desc.Name = "MultiDrawIndirectArgs"; - desc.Usage = Diligent::USAGE_DYNAMIC; - desc.BindFlags = Diligent::BIND_INDIRECT_DRAW_ARGS; - desc.Size = static_cast(requiredSize); - desc.CPUAccessFlags = Diligent::CPU_ACCESS_WRITE; - MG_Diligent::g_pDevice->CreateBuffer(desc, nullptr, &bufEntry); - } - pIndirectBuffer = bufEntry; - - void* pMappedData = nullptr; - - MG_Util::Debug::LogD("Mapping indirect draw buffer for multi-draw."); - MG_Diligent::g_pContext->MapBuffer( - pIndirectBuffer, - Diligent::MAP_WRITE, - Diligent::MAP_FLAG_DISCARD, - pMappedData - ); - - if (pMappedData) { - memcpy(pMappedData, indirectCmds.data(), requiredSize); - MG_Diligent::g_pContext->UnmapBuffer(pIndirectBuffer, Diligent::MAP_WRITE); - MG_Util::Debug::LogD("Successfully updated indirect draw buffer."); - } else { - MG_Util::Debug::LogE("Failed to map indirect draw buffer for multi-draw."); - return; - } - - // Execute multi-draw indirect! - EnsureRenderPassActive(); - Diligent::DrawIndexedIndirectAttribs mdAttribs; - mdAttribs.IndexType = indexType; - mdAttribs.pAttribsBuffer = pIndirectBuffer; - mdAttribs.DrawCount = static_cast(indirectCmds.size()); - - MG_Diligent::g_pContext->DrawIndexedIndirect(mdAttribs); - - MG_Diligent::g_pContext->EndRenderPass(); - MG_Diligent::IsInRenderPass = false; - - MG_Util::Debug::LogD("MultiDrawElements completed with %d draws.", indirectCmds.size()); - */ - } - - void MultiDrawElementsBaseVertex(GLenum mode, const GLsizei *count, GLenum type, const GLvoid *const *indices, GLsizei drawcount, const GLint *basevertex) { - GLenum actualType = type; - PrepareForDraw(mode, (GLsizei *)count, actualType, (const void*&)indices[0]); - - auto* pVAO = MG_State_T::vertexArrayState->GetCurrentVAO(); - Diligent::IBuffer* pIndexBuffer = nullptr; - if (pVAO->elementBuffer != 0) { - auto it = MG_Diligent::g_BufferMap.find(pVAO->elementBuffer); - if (it != MG_Diligent::g_BufferMap.end() && it->second) { - pIndexBuffer = it->second; - } - } - - if (!pIndexBuffer) { - MG_Util::Debug::LogE("No valid index buffer bound for multi-draw"); - return; - } - - MG_Diligent::g_pContext->SetIndexBuffer( - pIndexBuffer, - 0, - Diligent::RESOURCE_STATE_TRANSITION_MODE_TRANSITION - ); - - std::vector drawItems; - drawItems.reserve(drawcount); - - Diligent::VALUE_TYPE indexType = ConvertGLTypeToDiligent(actualType); - Diligent::Uint32 indexSize = 0; - switch (indexType) { - case Diligent::VT_UINT16: indexSize = 2; break; - case Diligent::VT_UINT32: indexSize = 4; break; - default: - MG_Util::Debug::LogE("Unsupported index type for multi-draw: %d", actualType); - return; - } - - for (GLsizei i = 0; i < drawcount; i++) { - if (count[i] <= 0) continue; - Diligent::MultiDrawIndexedItem item; - item.NumIndices = static_cast(count[i]); - auto byteOffset = reinterpret_cast(indices[i]); - item.FirstIndexLocation = static_cast(byteOffset / indexSize); - item.BaseVertex = static_cast(basevertex[i]); - drawItems.push_back(item); - } - - if (drawItems.empty()) { - MG_Util::Debug::LogW("No valid draw items in multi-draw"); - return; - } - - Diligent::MultiDrawIndexedAttribs drawAttrs; - drawAttrs.DrawCount = static_cast(drawItems.size()); - drawAttrs.pDrawItems = drawItems.data(); - drawAttrs.IndexType = indexType; - drawAttrs.Flags = Diligent::DRAW_FLAG_VERIFY_ALL; - drawAttrs.NumInstances = 1; - drawAttrs.FirstInstanceLocation = 0; - - MG_Util::Debug::LogD("MultiDrawIndexedAttribs Dump:"); - MG_Util::Debug::LogD(" DrawCount: %u", drawAttrs.DrawCount); - MG_Util::Debug::LogD(" IndexType: %d", drawAttrs.IndexType); - MG_Util::Debug::LogD(" Flags: %u", drawAttrs.Flags); - MG_Util::Debug::LogD(" NumInstances: %u", drawAttrs.NumInstances); - MG_Util::Debug::LogD(" FirstInstanceLocation: %u", drawAttrs.FirstInstanceLocation); - - for (Diligent::Uint32 i = 0; i < drawAttrs.DrawCount; i++) { - const auto& item = drawAttrs.pDrawItems[i]; - MG_Util::Debug::LogD(" DrawItem[%u]:", i); - MG_Util::Debug::LogD(" NumIndices: %u", item.NumIndices); - MG_Util::Debug::LogD(" FirstIndexLocation: %u", item.FirstIndexLocation); - MG_Util::Debug::LogD(" BaseVertex: %d", item.BaseVertex); - } - - MG_Diligent::g_pContext->MultiDrawIndexed(drawAttrs); - MG_Util::Debug::LogD("MultiDrawIndexed completed."); - } -} \ No newline at end of file diff --git a/MG/MG_GL/Implementations/GL/Drawing/GL_Drawing.h b/MG/MG_GL/Implementations/GL/Drawing/GL_Drawing.h deleted file mode 100644 index f6d1c39a..00000000 --- a/MG/MG_GL/Implementations/GL/Drawing/GL_Drawing.h +++ /dev/null @@ -1,20 +0,0 @@ -// -// Created by BZLZHH on 2025/3/15. -// - -#ifndef MOBILEGL_GL_DRAWING_H -#define MOBILEGL_GL_DRAWING_H - -namespace MG_GL::GL { - bool IsSamplerType(GLenum type); - Diligent::VALUE_TYPE ConvertGLTypeToDiligent(GLenum type); - void PrepareForDraw(GLenum mode, GLsizei* pCount, GLenum& type, const void*& pIndices); - - void DrawElements(GLenum mode, GLsizei count, GLenum type, const void *indices); - void DrawArrays(GLenum mode, GLint first, GLsizei count); - void DrawElementsBaseVertex(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLint basevertex); - void MultiDrawElements(GLenum mode, const GLsizei *count, GLenum type, const GLvoid *const *indices, GLsizei drawcount); - void MultiDrawElementsBaseVertex(GLenum mode, const GLsizei *count, GLenum type, const GLvoid *const *indices, GLsizei drawcount, const GLint *basevertex); -} - -#endif //MOBILEGL_GL_DRAWING_H diff --git a/MG/MG_GL/Implementations/GL/Framebuffer/GL_Framebuffer.cpp b/MG/MG_GL/Implementations/GL/Framebuffer/GL_Framebuffer.cpp deleted file mode 100644 index d75e0cba..00000000 --- a/MG/MG_GL/Implementations/GL/Framebuffer/GL_Framebuffer.cpp +++ /dev/null @@ -1,606 +0,0 @@ -// -// Created by BZLZHH on 2025/3/15. -// - -#include "../../../../Includes.h" - -namespace MG_GL::GL { - void ReleaseFramebufferResources(MG_Diligent::GLFramebufferInfo& fbInfo) { -// if (fbInfo.pFramebuffer) { -// fbInfo.pFramebuffer->Release(); -// fbInfo.pFramebuffer = nullptr; -// } - -// if (fbInfo.pRenderPass) { -// fbInfo.pRenderPass->Release(); -// fbInfo.pRenderPass = nullptr; -// } - } - - void CreateRenderPassAndFramebuffer(GLuint framebuffer, - const FramebufferObject& fbo, - MG_Diligent::GLFramebufferInfo& fbInfo) { - Diligent::Uint32 width = 0; - Diligent::Uint32 height = 0; - - if (framebuffer == 0) { - if (MG_Diligent::g_pSwapChain) { - width = MG_Diligent::g_pSwapChain->GetDesc().Width; - height = MG_Diligent::g_pSwapChain->GetDesc().Height; - MG_Util::Debug::LogD("CreateRenderPassAndFramebuffer: Using swap chain dimensions: %ux%u", width, height); - } else { - MG_Util::Debug::LogE("CreateRenderPassAndFramebuffer: Swap chain not initialized for default framebuffer"); - return; - } - } else if (!fbInfo.ColorRTVs.empty() && fbInfo.ColorRTVs[0]) { - const auto& desc = fbInfo.ColorRTVs[0]->GetTexture()->GetDesc(); - width = desc.Width; - height = desc.Height; - MG_Util::Debug::LogD("CreateRenderPassAndFramebuffer: Using color attachment 0 for dimensions: %ux%u", width, height); - } else if (fbInfo.pDepthStencilRTV) { - const auto& desc = fbInfo.pDepthStencilRTV->GetTexture()->GetDesc(); - width = desc.Width; - height = desc.Height; - MG_Util::Debug::LogD("CreateRenderPassAndFramebuffer: Using depth/stencil attachment for dimensions: %ux%u", width, height); - } else { - MG_Util::Debug::LogD("CreateRenderPassAndFramebuffer: Failed to determine framebuffer dimensions. No attachments."); - return; - } - - if (width == 0 || height == 0) { - MG_Util::Debug::LogE("CreateRenderPassAndFramebuffer: Failed to determine framebuffer dimensions. Width or Height is 0."); - return; - } - -// Diligent::RenderPassDesc RPDesc; -// std::vector Attachments; -// std::vector Subpasses; -// std::vector ColorRefs; -// -// for (size_t i = 0; i < fbInfo.ColorRTVs.size(); ++i) { -// if (fbInfo.ColorRTVs[i]) { -// Diligent::RenderPassAttachmentDesc ColorAttachment; -// ColorAttachment.Format = framebuffer != 0 ? fbInfo.ColorRTVs[i]->GetDesc().Format: -// MG_Diligent::g_pSwapChain->GetDesc().ColorBufferFormat; -// ColorAttachment.SampleCount = 1; -// ColorAttachment.InitialState = Diligent::RESOURCE_STATE_RENDER_TARGET; -// ColorAttachment.FinalState = Diligent::RESOURCE_STATE_RENDER_TARGET; -// ColorAttachment.LoadOp = Diligent::ATTACHMENT_LOAD_OP_LOAD; -// ColorAttachment.StoreOp = Diligent::ATTACHMENT_STORE_OP_STORE; -// Attachments.push_back(ColorAttachment); -// -// Diligent::AttachmentReference ColorRef; -// ColorRef.AttachmentIndex = static_cast(Attachments.size() - 1); -// ColorRef.State = Diligent::RESOURCE_STATE_RENDER_TARGET; -// ColorRefs.push_back(ColorRef); -// MG_Util::Debug::LogD("CreateRenderPassAndFramebuffer: Added color attachment %zu", i); -// } -// } - -// Diligent::AttachmentReference DepthRef; -// if (fbInfo.pDepthStencilRTV) { -// Diligent::RenderPassAttachmentDesc DepthAttachment; -// DepthAttachment.Format = fbInfo.DepthStencilFormat; -// DepthAttachment.SampleCount = 1; -// DepthAttachment.InitialState = Diligent::RESOURCE_STATE_DEPTH_WRITE; -// DepthAttachment.FinalState = Diligent::RESOURCE_STATE_DEPTH_WRITE; -// DepthAttachment.LoadOp = Diligent::ATTACHMENT_LOAD_OP_LOAD; -// DepthAttachment.StoreOp = Diligent::ATTACHMENT_STORE_OP_STORE; -// DepthAttachment.StencilLoadOp = Diligent::ATTACHMENT_LOAD_OP_LOAD; -// DepthAttachment.StencilStoreOp = Diligent::ATTACHMENT_STORE_OP_STORE; -// Attachments.push_back(DepthAttachment); -// -// DepthRef.AttachmentIndex = static_cast(Attachments.size() - 1); -// DepthRef.State = Diligent::RESOURCE_STATE_DEPTH_WRITE; -// MG_Util::Debug::LogD("CreateRenderPassAndFramebuffer: Added depth/stencil attachment"); -// } - -// Diligent::SubpassDesc Subpass; -// Subpass.RenderTargetAttachmentCount = static_cast(ColorRefs.size()); -// Subpass.pRenderTargetAttachments = ColorRefs.empty() ? nullptr : ColorRefs.data(); -// Subpass.pDepthStencilAttachment = fbInfo.pDepthStencilRTV ? &DepthRef : nullptr; -// Subpasses.push_back(Subpass); -// -// RPDesc.AttachmentCount = static_cast(Attachments.size()); -// RPDesc.pAttachments = Attachments.empty() ? nullptr : Attachments.data(); -// RPDesc.SubpassCount = static_cast(Subpasses.size()); -// RPDesc.pSubpasses = Subpasses.data(); -// -// MG_Util::Debug::LogD("CreateRenderPassAndFramebuffer: Creating RenderPass with %u attachments and %u subpasses.", -// RPDesc.AttachmentCount, RPDesc.SubpassCount); -// -// MG_Diligent::g_pDevice->CreateRenderPass(RPDesc, &fbInfo.pRenderPass); -// if (!fbInfo.pRenderPass) { -// MG_Util::Debug::LogE("CreateRenderPassAndFramebuffer: Failed to create RenderPass."); -// return; -// } -// MG_Util::Debug::LogD("CreateRenderPassAndFramebuffer: RenderPass created successfully."); - -// Diligent::FramebufferDesc FBDesc; -// FBDesc.Name = "Framebuffer"; -//// FBDesc.pRenderPass = fbInfo.pRenderPass; -// FBDesc.AttachmentCount = static_cast(Attachments.size()); -// -// std::vector FBAtachments(Attachments.size()); -// for (size_t i = 0; i < ColorRefs.size(); ++i) { -// if (i < fbInfo.ColorRTVs.size() && fbInfo.ColorRTVs[i]) { -// FBAtachments[i] = fbInfo.ColorRTVs[i]; -// } -// } -// -// if (fbInfo.pDepthStencilRTV) { -// FBAtachments[ColorRefs.size()] = fbInfo.pDepthStencilRTV; -// } - -// FBDesc.ppAttachments = FBAtachments.data(); -// FBDesc.Width = width; -// FBDesc.Height = height; -// FBDesc.NumArraySlices = 1; -// -// MG_Util::Debug::LogD("CreateRenderPassAndFramebuffer: FramebufferDesc Details:"); -// MG_Util::Debug::LogD(" Name: %s", FBDesc.Name ? FBDesc.Name : "N/A"); -// MG_Util::Debug::LogD(" pRenderPass: %p", FBDesc.pRenderPass); -// MG_Util::Debug::LogD(" AttachmentCount: %u", FBDesc.AttachmentCount); -// for (Diligent::Uint32 i = 0; i < FBDesc.AttachmentCount; ++i) { -// if (FBDesc.ppAttachments && FBDesc.ppAttachments[i]) { -// Diligent::ITexture* pTexture = FBDesc.ppAttachments[i]->GetTexture(); -// if (pTexture) { -// const auto& texDesc = pTexture->GetDesc(); -// MG_Util::Debug::LogD(" Attachment %u: Texture '%s', Dim: %ux%u", -// i, texDesc.Name ? texDesc.Name : "N/A", texDesc.Width, texDesc.Height); -// } else { -// MG_Util::Debug::LogW(" Attachment %u: TextureView's texture is nullptr", i); -// } -// } else if (!FBDesc.ppAttachments) { -// MG_Util::Debug::LogW(" FBDesc.ppAttachments is nullptr. Cannot access attachment %u.", i); -// } else { -// MG_Util::Debug::LogD(" Attachment %u: nullptr", i); -// } -// } -// MG_Util::Debug::LogD(" Width: %u", FBDesc.Width); -// MG_Util::Debug::LogD(" Height: %u", FBDesc.Height); -// MG_Util::Debug::LogD(" NumArraySlices: %u", FBDesc.NumArraySlices); -// MG_Util::Debug::LogD(" fbInfo.pFramebuffer: %p", fbInfo.pFramebuffer); - - fbInfo.ClearValues.clear(); - for (size_t i = 0; i < fbInfo.ColorRTVs.size(); ++i) { - Diligent::OptimizedClearValue clearValue; - clearValue.Color[0] = 0.0f; - clearValue.Color[1] = 0.0f; - clearValue.Color[2] = 0.0f; - clearValue.Color[3] = 1.0f; - fbInfo.ClearValues.push_back(clearValue); - } - - if (fbInfo.pDepthStencilRTV) { - Diligent::OptimizedClearValue clearValue; - clearValue.DepthStencil.Depth = 1.0f; - clearValue.DepthStencil.Stencil = 0; - fbInfo.ClearValues.push_back(clearValue); - } - -// MG_Diligent::g_pDevice->CreateFramebuffer(FBDesc, &fbInfo.pFramebuffer); -// if (!fbInfo.pFramebuffer) { -// MG_Util::Debug::LogE("CreateRenderPassAndFramebuffer: Failed to create Framebuffer."); -// return; -// } -// MG_Util::Debug::LogD("CreateRenderPassAndFramebuffer: Framebuffer created successfully."); - } - - void UpdateDefaultFramebuffer() { - auto it = MG_Diligent::g_FramebufferMap.find(0); - if (it == MG_Diligent::g_FramebufferMap.end()) { - MG_Diligent::g_FramebufferMap[0] = MG_Diligent::GLFramebufferInfo(); - } - - MG_Diligent::GLFramebufferInfo& fbInfo = MG_Diligent::g_FramebufferMap[0]; - - ReleaseFramebufferResources(fbInfo); - - if (MG_Diligent::g_pSwapChain) { - Diligent::ITextureView* pRTV = MG_Diligent::g_pSwapChain->GetCurrentBackBufferRTV(); - Diligent::ITextureView* pDSV = MG_Diligent::g_pSwapChain->GetDepthBufferDSV(); - - if (pRTV) { - fbInfo.ColorRTVs = { pRTV }; - } else { - MG_Util::Debug::LogE("Failed to get swap chain back buffer RTV"); - } - - if (pDSV) { - fbInfo.pDepthStencilRTV = pDSV; - fbInfo.DepthStencilFormat = MG_Diligent::g_pSwapChain->GetDesc().DepthBufferFormat; - fbInfo.HasDepthStencil = true; - } else { - MG_Util::Debug::LogE("Failed to get swap chain depth buffer DSV"); - } - - CreateRenderPassAndFramebuffer(0, FramebufferObject(), fbInfo); - } else { - MG_Util::Debug::LogE("Swap chain not initialized for default framebuffer"); - } - } - - void GenFramebuffers(GLsizei n, GLuint* framebuffers) { - MG_Util::Debug::LogD("glGenFramebuffers, n: %d, framebuffers: %p", n, framebuffers); - GLenum result = MG_State::CreateFramebuffers(n, framebuffers); - if (result == GL_NO_ERROR) { - for (GLsizei i = 0; i < n; ++i) { - MG_Diligent::GLFramebufferInfo fbInfo; - MG_Diligent::g_FramebufferMap[framebuffers[i]] = fbInfo; - } - return; - }; - MG_State::SetError(result); - MG_Util::Debug::LogE("Framebuffer generation failed: %s", MG_Util::Debug::GLEnumToString(result)); - } - - void DeleteFramebuffers(GLsizei n, const GLuint* framebuffers) { - MG_Util::Debug::LogD("glDeleteFramebuffers, n: %d, framebuffers: %p", n, framebuffers); - for (GLsizei i = 0; i < n; ++i) { - GLenum result = MG_State::DeleteFramebuffer(framebuffers[i]); - if (result != GL_NO_ERROR) { - MG_State::SetError(result); - MG_Util::Debug::LogE("Failed to delete framebuffer %u: %s", - framebuffers[i], MG_Util::Debug::GLEnumToString(result)); - } else { - GLuint fb = framebuffers[i]; - auto it = MG_Diligent::g_FramebufferMap.find(fb); - if (it != MG_Diligent::g_FramebufferMap.end()) { - MG_Diligent::GLFramebufferInfo& fbInfo = it->second; - -// if (fbInfo.pFramebuffer) { -// fbInfo.pFramebuffer->Release(); -// } - -// if (fbInfo.pRenderPass) { -// fbInfo.pRenderPass->Release(); -// } - - for (auto& rtv : fbInfo.ColorRTVs) { - if (rtv) rtv->Release(); - } - - if (fbInfo.pDepthStencilRTV) { - fbInfo.pDepthStencilRTV->Release(); - } - - MG_Diligent::g_FramebufferMap.erase(it); - } - } - } - } - - void BindFramebuffer(GLenum target, GLuint framebuffer) { - MG_Util::Debug::LogD("BindFramebuffer: Start. Target: %s, Framebuffer: %u", - MG_Util::Debug::GLEnumToString(target), framebuffer); - - GLenum result = MG_State::BindFramebuffer(target, framebuffer); - if (result == GL_NO_ERROR) { - MG_Util::Debug::LogD("BindFramebuffer: MG_State::BindFramebuffer successful."); - -// if (MG_Diligent::IsInRenderPass) { -// MG_Util::Debug::LogD("BindFramebuffer: Ending current render pass."); -// MG_Diligent::g_pContext->EndRenderPass(); -// MG_Diligent::IsInRenderPass = false; -// MG_Util::Debug::LogD("BindFramebuffer: Current render pass ended."); -// } else { -// MG_Util::Debug::LogD("BindFramebuffer: No active render pass to end."); -// } - - - if (framebuffer == 0) { - MG_Util::Debug::LogD("BindFramebuffer: Framebuffer is 0 (default framebuffer). Updating default framebuffer."); - UpdateDefaultFramebuffer(); - MG_Util::Debug::LogD("BindFramebuffer: Default framebuffer updated."); - } - - - FramebufferObject* pFBO = MG_State_T::framebufferState->GetCurrentFBO(target); - MG_Util::Debug::LogD("BindFramebuffer: Retrieved FBO from state: %p", pFBO); - - auto it = MG_Diligent::g_FramebufferMap.find(framebuffer); - - if (it == MG_Diligent::g_FramebufferMap.end()) { - MG_Util::Debug::LogE("BindFramebuffer: Framebuffer %u not found in g_FramebufferMap. Aborting.", framebuffer); - return; - } - MG_Util::Debug::LogD("BindFramebuffer: Framebuffer %u found in g_FramebufferMap.", framebuffer); - - MG_Diligent::GLFramebufferInfo& fbInfo = it->second; - -// if (/*!fbInfo.pRenderPass || */!fbInfo.pFramebuffer) { -// MG_Util::Debug::LogD("BindFramebuffer: RenderPass or Framebuffer not yet created for framebuffer %u. Creating now.", framebuffer); -// CreateRenderPassAndFramebuffer(framebuffer, pFBO ? *pFBO : FramebufferObject(), fbInfo); -// MG_Util::Debug::LogD("BindFramebuffer: RenderPass and Framebuffer creation attempted for framebuffer %u.", framebuffer); -// } else { -// MG_Util::Debug::LogD("BindFramebuffer: RenderPass and Framebuffer already exist for framebuffer %u.", framebuffer); -// } - - MG_Util::Debug::LogD("BindFramebuffer: Setting render targets. ColorRTVs count: %zu, DepthStencilRTV: %p", - fbInfo.ColorRTVs.size(), fbInfo.pDepthStencilRTV); - - MG_Diligent::g_pContext->SetRenderTargets( - static_cast(fbInfo.ColorRTVs.size()), - fbInfo.ColorRTVs.empty() ? nullptr : fbInfo.ColorRTVs.data(), - fbInfo.pDepthStencilRTV, - Diligent::RESOURCE_STATE_TRANSITION_MODE_TRANSITION - ); - MG_Util::Debug::LogD("BindFramebuffer: SetRenderTargets called."); - return; - } - MG_State::SetError(result); - MG_Util::Debug::LogE("Framebuffer bind error: %s", MG_Util::Debug::GLEnumToString(result)); - } - - void AttachTexture2DToFramebuffer(GLuint fbo, GLuint texture, GLenum attachment, GLint level) { - auto it = MG_Diligent::g_FramebufferMap.find(fbo); - if (it == MG_Diligent::g_FramebufferMap.end()) { - MG_Util::Debug::LogE("Framebuffer %u not found in map", fbo); - return; - } - - MG_Diligent::GLFramebufferInfo& fbInfo = it->second; - -// if (fbInfo.pFramebuffer) { -// fbInfo.pFramebuffer->Release(); -// fbInfo.pFramebuffer = nullptr; -// MG_Util::Debug::LogD("Released existing framebuffer"); -// } -// if (fbInfo.pRenderPass) { -// fbInfo.pRenderPass->Release(); -// fbInfo.pRenderPass = nullptr; -// MG_Util::Debug::LogD("Released existing render pass"); -// } - - if (texture == 0) { - MG_Util::Debug::LogD("Unbinding attachment: %s", MG_Util::Debug::GLEnumToString(attachment)); - - if (attachment == GL_DEPTH_ATTACHMENT || - attachment == GL_STENCIL_ATTACHMENT || - attachment == GL_DEPTH_STENCIL_ATTACHMENT) { - if (fbInfo.pDepthStencilRTV) { - fbInfo.pDepthStencilRTV->Release(); - fbInfo.pDepthStencilRTV = nullptr; - MG_Util::Debug::LogD("Released depth/stencil attachment"); - } - } else { - size_t index = attachment - GL_COLOR_ATTACHMENT0; - if (index < fbInfo.ColorRTVs.size() && fbInfo.ColorRTVs[index]) { - fbInfo.ColorRTVs[index]->Release(); - fbInfo.ColorRTVs[index] = nullptr; - bool allNull = true; - for (const auto& rtv : fbInfo.ColorRTVs) { - if (rtv != nullptr) { - allNull = false; - break; - } - } - if (allNull) fbInfo.ColorRTVs.clear(); - MG_Util::Debug::LogD("Released color attachment %zu", index); - } - } - } else { - Diligent::ITexture* pTexture = MG_Diligent::g_TextureMap[texture]; - if (!pTexture) { - MG_Util::Debug::LogE("Texture %u exists in map but pointer is null", texture); - return; - } - const auto& texDesc = pTexture->GetDesc(); - MG_Util::Debug::LogD("Attaching texture: %s (size: %ux%u)", - texDesc.Name, - texDesc.Width, texDesc.Height); - Diligent::TextureViewDesc ViewDesc; - ViewDesc.TextureDim = Diligent::RESOURCE_DIM_TEX_2D; - ViewDesc.MostDetailedMip = level; - ViewDesc.NumMipLevels = 1; - - if (attachment == GL_DEPTH_ATTACHMENT || - attachment == GL_STENCIL_ATTACHMENT || - attachment == GL_DEPTH_STENCIL_ATTACHMENT) { - MG_Util::Debug::LogD("Creating depth/stencil attachment"); - - if (fbInfo.pDepthStencilRTV) { - fbInfo.pDepthStencilRTV->Release(); - fbInfo.pDepthStencilRTV = nullptr; - MG_Util::Debug::LogD("Released existing depth/stencil attachment"); - } - - ViewDesc.ViewType = Diligent::TEXTURE_VIEW_DEPTH_STENCIL; - fbInfo.DepthStencilFormat = texDesc.Format; - pTexture->CreateView(ViewDesc, &fbInfo.pDepthStencilRTV); - - if (fbInfo.pDepthStencilRTV) { - fbInfo.HasDepthStencil = true; - MG_Util::Debug::LogD("Created new depth/stencil RTV"); - } else { - MG_Util::Debug::LogE("Failed to create depth/stencil RTV"); - } - } else { - size_t index = attachment - GL_COLOR_ATTACHMENT0; - MG_Util::Debug::LogD("Creating color attachment at index %zu", index); - - if (index >= fbInfo.ColorRTVs.size()) { - fbInfo.ColorRTVs.resize(index + 1, nullptr); - MG_Util::Debug::LogD("Resized color attachments to %zu", fbInfo.ColorRTVs.size()); - } - - if (fbInfo.ColorRTVs[index]) { - fbInfo.ColorRTVs[index]->Release(); - fbInfo.ColorRTVs[index] = nullptr; - MG_Util::Debug::LogD("Released existing color attachment %zu", index); - } - - ViewDesc.ViewType = Diligent::TEXTURE_VIEW_RENDER_TARGET; - pTexture->CreateView(ViewDesc, &fbInfo.ColorRTVs[index]); - - if (fbInfo.ColorRTVs[index]) { - MG_Util::Debug::LogD("Created new color RTV at index %zu", index); - } else { - MG_Util::Debug::LogE("Failed to create color RTV at index %zu", index); - } - } - } - } - - void FramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, - GLuint texture, GLint level) { - MG_Util::Debug::LogD("glFramebufferTexture2D, target: %s, attach: %s, textarget: %s, tex: %u, level: %d", - MG_Util::Debug::GLEnumToString(target), - MG_Util::Debug::GLEnumToString(attachment), - MG_Util::Debug::GLEnumToString(textarget), - texture, - level); - - if (target == GL_FRAMEBUFFER) { - MG_Util::Debug::LogD("Got target == GL_FRAMEBUFFER, treating as GL_DRAW_FRAMEBUFFER"); - target = GL_DRAW_FRAMEBUFFER; - } - - MG_Util::Debug::LogD(" Current READ_FRAMEBUFFER binding: %u", MG_State_T::framebufferState->currentBindings_[GL_READ_FRAMEBUFFER]); - MG_Util::Debug::LogD(" Current DRAW_FRAMEBUFFER binding: %u", MG_State_T::framebufferState->currentBindings_[GL_DRAW_FRAMEBUFFER]); - - GLenum result = MG_State::AttachTexture2DToFramebuffer( - target, attachment, textarget, texture, level - ); - - if (result == GL_NO_ERROR) { -// if (target == GL_FRAMEBUFFER) { -// if (MG_State_T::framebufferState->currentBindings_[GL_READ_FRAMEBUFFER] == MG_State_T::framebufferState->currentBindings_[GL_DRAW_FRAMEBUFFER]) { -// MG_Util::Debug::LogD(" Target is GL_FRAMEBUFFER and READ/DRAW bindings are the same (%u). Applying to GL_DRAW_FRAMEBUFFER.", -// MG_State_T::framebufferState->currentBindings_[GL_DRAW_FRAMEBUFFER]); -// target = GL_DRAW_FRAMEBUFFER; -// } else { -// MG_Util::Debug::LogD(" Target is GL_FRAMEBUFFER and READ/DRAW bindings differ. Applying to both if non-zero."); -// if (MG_State_T::framebufferState->currentBindings_[GL_READ_FRAMEBUFFER] != 0) { -// MG_Util::Debug::LogD(" Attaching to READ_FRAMEBUFFER: %u", MG_State_T::framebufferState->currentBindings_[GL_READ_FRAMEBUFFER]); -// AttachTexture2DToFramebuffer(MG_State_T::framebufferState->currentBindings_[GL_READ_FRAMEBUFFER], -// texture, attachment, level); -// } -// if (MG_State_T::framebufferState->currentBindings_[GL_DRAW_FRAMEBUFFER] != 0) { -// MG_Util::Debug::LogD(" Attaching to DRAW_FRAMEBUFFER: %u", MG_State_T::framebufferState->currentBindings_[GL_DRAW_FRAMEBUFFER]); -// AttachTexture2DToFramebuffer(MG_State_T::framebufferState->currentBindings_[GL_DRAW_FRAMEBUFFER], -// texture, attachment, level); -// } -// MG_Util::Debug::LogD("FramebufferTexture2D completed successfully after separate READ/DRAW attachments."); -// return; -// } -// } - GLuint fboToModify = MG_State_T::framebufferState->currentBindings_[target]; - MG_Util::Debug::LogD(" Target is %s. Applying to bound FBO: %u", - MG_Util::Debug::GLEnumToString(target), fboToModify); - AttachTexture2DToFramebuffer(fboToModify, - texture, attachment, level); - - MG_Util::Debug::LogD("FramebufferTexture2D completed successfully for target %s (FBO %u).", MG_Util::Debug::GLEnumToString(target), fboToModify); - return; - } - MG_State::SetError(result); - MG_Util::Debug::LogE("Texture attachment failed: %s", MG_Util::Debug::GLEnumToString(result)); - } - - GLenum CheckFramebufferStatus(GLenum target) { - MG_Util::Debug::LogD("glCheckFramebufferStatus, target: %s", - MG_Util::Debug::GLEnumToString(target)); - GLenum result = MG_State::ValidateFramebufferCompleteness(target); - if (result >= GL_FRAMEBUFFER_COMPLETE) { - MG_Util::Debug::LogD("Framebuffer status: %s", MG_Util::Debug::GLEnumToString(result)); - return result; - } - MG_State::SetError(result); - MG_Util::Debug::LogE("Framebuffer incomplete: %s", - MG_Util::Debug::GLEnumToString(result)); - return result; - } - - void BlitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, - GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter) { -// if (MG_Diligent::IsInRenderPass) { -// MG_Util::Debug::LogD("Ending current render pass."); -// MG_Diligent::g_pContext->EndRenderPass(); -// MG_Diligent::IsInRenderPass = false; -// MG_Util::Debug::LogD("Current render pass ended."); -// } - - // explicitly unbind the texture - MG_Diligent::g_pContext->SetRenderTargets(0, nullptr, nullptr, Diligent::RESOURCE_STATE_TRANSITION_MODE_NONE); - - GLuint readFB = MG_State_T::framebufferState->currentBindings_[GL_READ_FRAMEBUFFER]; - GLuint drawFB = MG_State_T::framebufferState->currentBindings_[GL_DRAW_FRAMEBUFFER]; - - MG_Diligent::GLFramebufferInfo* pSrcFB = nullptr; - MG_Diligent::GLFramebufferInfo* pDstFB = nullptr; - - if (readFB != 0) pSrcFB = &MG_Diligent::g_FramebufferMap[readFB]; - if (drawFB != 0) pDstFB = &MG_Diligent::g_FramebufferMap[drawFB]; - - if (!pSrcFB) pSrcFB = &MG_Diligent::g_FramebufferMap[0]; - if (!pDstFB) pDstFB = &MG_Diligent::g_FramebufferMap[0]; - - bool copyColor = (mask & GL_COLOR_BUFFER_BIT) != 0; - bool copyDepth = (mask & GL_DEPTH_BUFFER_BIT) != 0; - bool copyStencil = (mask & GL_STENCIL_BUFFER_BIT) != 0; - - if (copyColor && !pSrcFB->ColorRTVs.empty() && !pDstFB->ColorRTVs.empty()) { - for (size_t i = 0; i < pSrcFB->ColorRTVs.size() && i < pDstFB->ColorRTVs.size(); ++i) { - if (pSrcFB->ColorRTVs[i] && pDstFB->ColorRTVs[i]) { - Diligent::CopyTextureAttribs CopyAttribs; - CopyAttribs.pSrcTexture = pSrcFB->ColorRTVs[i]->GetTexture(); - CopyAttribs.pDstTexture = pDstFB->ColorRTVs[i]->GetTexture(); - CopyAttribs.SrcTextureTransitionMode = Diligent::RESOURCE_STATE_TRANSITION_MODE_TRANSITION; - CopyAttribs.DstTextureTransitionMode = Diligent::RESOURCE_STATE_TRANSITION_MODE_TRANSITION; - - Diligent::Box SrcBox; - SrcBox.MinX = srcX0; - SrcBox.MinY = srcY0; - SrcBox.MaxX = srcX1; - SrcBox.MaxY = srcY1; - CopyAttribs.pSrcBox = &SrcBox; - - CopyAttribs.DstX = dstX0; - CopyAttribs.DstY = dstY0; - - MG_Diligent::g_pContext->CopyTexture(CopyAttribs); - } - } - } - - if ((copyDepth || copyStencil) && pSrcFB->pDepthStencilRTV && pDstFB->pDepthStencilRTV) { - Diligent::CopyTextureAttribs CopyAttribs; - CopyAttribs.pSrcTexture = pSrcFB->pDepthStencilRTV->GetTexture(); - CopyAttribs.pDstTexture = pDstFB->pDepthStencilRTV->GetTexture(); - CopyAttribs.SrcTextureTransitionMode = Diligent::RESOURCE_STATE_TRANSITION_MODE_TRANSITION; - CopyAttribs.DstTextureTransitionMode = Diligent::RESOURCE_STATE_TRANSITION_MODE_TRANSITION; - - Diligent::Box SrcBox; - SrcBox.MinX = srcX0; - SrcBox.MinY = srcY0; - SrcBox.MaxX = srcX1; - SrcBox.MaxY = srcY1; - CopyAttribs.pSrcBox = &SrcBox; - - CopyAttribs.DstX = dstX0; - CopyAttribs.DstY = dstY0; - - MG_Diligent::g_pContext->CopyTexture(CopyAttribs); - } - } - - void DrawBuffer(GLenum buf) { - MG_Util::Debug::LogD("glDrawBuffer, buf: %s", MG_Util::Debug::GLEnumToString(buf)); - } - - void DrawBuffers(GLsizei n, const GLenum *bufs) { - MG_Util::Debug::LogD("glDrawBuffers, n: %d, bufs: [", n); - for (int i = 0; i < n; ++i) { - MG_Util::Debug::LogD("%s,", MG_Util::Debug::GLEnumToString(bufs[i])); - } - MG_Util::Debug::LogD("]"); - - } - - void ReadBuffer(GLenum buf) { - MG_Util::Debug::LogD("glReadBuffer, buf: %s", MG_Util::Debug::GLEnumToString(buf)); - - } -} diff --git a/MG/MG_GL/Implementations/GL/Framebuffer/GL_Framebuffer.h b/MG/MG_GL/Implementations/GL/Framebuffer/GL_Framebuffer.h deleted file mode 100644 index d3809022..00000000 --- a/MG/MG_GL/Implementations/GL/Framebuffer/GL_Framebuffer.h +++ /dev/null @@ -1,22 +0,0 @@ -// -// Created by BZLZHH on 2025/3/15. -// - -#ifndef MOBILEGL_GL_FRAMEBUFFER_H -#define MOBILEGL_GL_FRAMEBUFFER_H - -namespace MG_GL::GL { - void UpdateDefaultFramebuffer(); - - void GenFramebuffers(GLsizei n, GLuint* framebuffers); - void DeleteFramebuffers(GLsizei n, const GLuint* framebuffers); - void BindFramebuffer(GLenum target, GLuint framebuffer); - void FramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); - GLenum CheckFramebufferStatus(GLenum target); - void BlitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); - void DrawBuffer(GLenum buf); - void DrawBuffers(GLsizei n, const GLenum *bufs); - void ReadBuffer(GLenum mode); -} - -#endif //MOBILEGL_GL_FRAMEBUFFER_H diff --git a/MG/MG_GL/Implementations/GL/GLFuncsDefinitions/GLFuncsDefinitions.cpp b/MG/MG_GL/Implementations/GL/GLFuncsDefinitions/GLFuncsDefinitions.cpp deleted file mode 100644 index 2c409b3c..00000000 --- a/MG/MG_GL/Implementations/GL/GLFuncsDefinitions/GLFuncsDefinitions.cpp +++ /dev/null @@ -1,2799 +0,0 @@ -// -// Created by BZLZHH on 2025/3/15. -// - -#include "../../../../Includes.h" - -#define DECLARE_GL_FUNCTION_STUB_HEAD(type,name,...) \ -MG_EXPORT type gl##name(__VA_ARGS__) { - -#define DECLARE_GL_FUNCTION_STUB_END(type,name,...) \ - MG_Util::Debug::LogW("Stub function: %s(...)", __FUNCTION__); \ - return (type)1; \ -} - -#define DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(type,name,...) \ - MG_Util::Debug::LogW("Stub function: %s(...)", __FUNCTION__); \ -} - -#define DECLARE_GL_FUNCTION_HEAD(type,name,...) \ -MG_EXPORT type gl##name(__VA_ARGS__) { - -#define DECLARE_GL_FUNCTION_END(type,name,...) \ - MG_Util::Debug::LogD("Implementing function: %s(...)", __FUNCTION__); \ - return MG_GL::GL::name(__VA_ARGS__); \ -} - -#define DECLARE_GL_FUNCTION_END_NO_RETURN(type,name,...) \ - MG_Util::Debug::LogD("Implementing function: %s(...)", __FUNCTION__); \ - MG_GL::GL::name(__VA_ARGS__); \ -} - -DECLARE_GL_FUNCTION_HEAD(const GLubyte*, GetStringi, GLenum name, GLuint index) DECLARE_GL_FUNCTION_END(const GLubyte*, GetStringi, name, index) -DECLARE_GL_FUNCTION_HEAD(const GLubyte*, GetString, GLenum name) DECLARE_GL_FUNCTION_END(const GLubyte*, GetString, name) -DECLARE_GL_FUNCTION_HEAD(void*, MapBuffer, GLenum target, GLenum access) DECLARE_GL_FUNCTION_END(void*, MapBuffer, target, access) -DECLARE_GL_FUNCTION_HEAD(void, ClearDepth, GLclampd depth) DECLARE_GL_FUNCTION_END_NO_RETURN(void, ClearDepth, depth) -DECLARE_GL_FUNCTION_HEAD(void, ActiveTexture, GLenum texture) DECLARE_GL_FUNCTION_END_NO_RETURN(void, ActiveTexture, texture) -DECLARE_GL_FUNCTION_HEAD(void, AttachShader, GLuint program, GLuint shader) DECLARE_GL_FUNCTION_END_NO_RETURN(void, AttachShader, program,shader) -DECLARE_GL_FUNCTION_HEAD(void, BindAttribLocation, GLuint program, GLuint index, const GLchar *name) DECLARE_GL_FUNCTION_END_NO_RETURN(void, BindAttribLocation, program,index,name) -DECLARE_GL_FUNCTION_HEAD(void, BindBuffer, GLenum target, GLuint buffer) DECLARE_GL_FUNCTION_END_NO_RETURN(void, BindBuffer, target,buffer) -DECLARE_GL_FUNCTION_HEAD(void, BindFramebuffer, GLenum target, GLuint framebuffer) DECLARE_GL_FUNCTION_END_NO_RETURN(void, BindFramebuffer, target,framebuffer) -DECLARE_GL_FUNCTION_STUB_HEAD(void, BindRenderbuffer, GLenum target, GLuint renderbuffer) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, BindRenderbuffer, target,renderbuffer) -DECLARE_GL_FUNCTION_HEAD(void, BindTexture, GLenum target, GLuint texture) DECLARE_GL_FUNCTION_END_NO_RETURN(void, BindTexture, target,texture) -DECLARE_GL_FUNCTION_STUB_HEAD(void, BlendColor, GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, BlendColor, red,green,blue,alpha) -DECLARE_GL_FUNCTION_STUB_HEAD(void, BlendEquation, GLenum mode) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, BlendEquation, mode) -DECLARE_GL_FUNCTION_STUB_HEAD(void, BlendEquationSeparate, GLenum modeRGB, GLenum modeAlpha) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, BlendEquationSeparate, modeRGB,modeAlpha) -DECLARE_GL_FUNCTION_HEAD(void, BlendFunc, GLenum sfactor, GLenum dfactor) DECLARE_GL_FUNCTION_END_NO_RETURN(void, BlendFunc, sfactor,dfactor) -DECLARE_GL_FUNCTION_HEAD(void, BlendFuncSeparate, GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha) DECLARE_GL_FUNCTION_END_NO_RETURN(void, BlendFuncSeparate, sfactorRGB,dfactorRGB,sfactorAlpha,dfactorAlpha) -DECLARE_GL_FUNCTION_HEAD(void, BufferData, GLenum target, GLsizeiptr size, const void *data, GLenum usage) DECLARE_GL_FUNCTION_END_NO_RETURN(void, BufferData, target,size,data,usage) -DECLARE_GL_FUNCTION_HEAD(void, BufferSubData, GLenum target, GLintptr offset, GLsizeiptr size, const void *data) DECLARE_GL_FUNCTION_END_NO_RETURN(void, BufferSubData, target,offset,size,data) -DECLARE_GL_FUNCTION_HEAD(GLenum, CheckFramebufferStatus, GLenum target) DECLARE_GL_FUNCTION_END(GLenum, CheckFramebufferStatus, target) -DECLARE_GL_FUNCTION_HEAD(void, Clear, GLbitfield mask) DECLARE_GL_FUNCTION_END_NO_RETURN(void, Clear, mask) -DECLARE_GL_FUNCTION_HEAD(void, ClearColor, GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) DECLARE_GL_FUNCTION_END_NO_RETURN(void, ClearColor, red,green,blue,alpha) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ClearDepthf, GLfloat d) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ClearDepthf, d) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ClearStencil, GLint s) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ClearStencil, s) -DECLARE_GL_FUNCTION_HEAD(void, ColorMask, GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) DECLARE_GL_FUNCTION_END_NO_RETURN(void, ColorMask, red,green,blue,alpha) -DECLARE_GL_FUNCTION_HEAD(void, CompileShader, GLuint shader) DECLARE_GL_FUNCTION_END_NO_RETURN(void, CompileShader, shader) -DECLARE_GL_FUNCTION_STUB_HEAD(void, CompressedTexImage2D, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, CompressedTexImage2D, target,level,internalformat,width,height,border,imageSize,data) -DECLARE_GL_FUNCTION_STUB_HEAD(void, CompressedTexSubImage2D, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, CompressedTexSubImage2D, target,level,xoffset,yoffset,width,height,format,imageSize,data) -DECLARE_GL_FUNCTION_STUB_HEAD(void, CopyTexImage2D, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, CopyTexImage2D, target,level,internalformat,x,y,width,height,border) -DECLARE_GL_FUNCTION_STUB_HEAD(void, CopyTexSubImage2D, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height) DECLARE_GL_FUNCTION_END_NO_RETURN(void, CopyTexSubImage2D, target,level,xoffset,yoffset,x,y,width,height) -DECLARE_GL_FUNCTION_HEAD(GLuint, CreateProgram) DECLARE_GL_FUNCTION_END(GLuint, CreateProgram) -DECLARE_GL_FUNCTION_HEAD(GLuint, CreateShader, GLenum type) DECLARE_GL_FUNCTION_END(GLuint, CreateShader, type) -DECLARE_GL_FUNCTION_STUB_HEAD(void, CullFace, GLenum mode) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, CullFace, mode) -DECLARE_GL_FUNCTION_HEAD(void, DeleteBuffers, GLsizei n, const GLuint *buffers) DECLARE_GL_FUNCTION_END_NO_RETURN(void, DeleteBuffers, n,buffers) -DECLARE_GL_FUNCTION_HEAD(void, DeleteFramebuffers, GLsizei n, const GLuint *framebuffers) DECLARE_GL_FUNCTION_END_NO_RETURN(void, DeleteFramebuffers, n,framebuffers) -DECLARE_GL_FUNCTION_HEAD(void, DeleteProgram, GLuint program) DECLARE_GL_FUNCTION_END_NO_RETURN(void, DeleteProgram, program) -DECLARE_GL_FUNCTION_STUB_HEAD(void, DeleteRenderbuffers, GLsizei n, const GLuint *renderbuffers) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, DeleteRenderbuffers, n,renderbuffers) -DECLARE_GL_FUNCTION_HEAD(void, DeleteShader, GLuint shader) DECLARE_GL_FUNCTION_END_NO_RETURN(void, DeleteShader, shader) -DECLARE_GL_FUNCTION_HEAD(void, DeleteTextures, GLsizei n, const GLuint *textures) DECLARE_GL_FUNCTION_END_NO_RETURN(void, DeleteTextures, n,textures) -DECLARE_GL_FUNCTION_HEAD(void, DepthFunc, GLenum func) DECLARE_GL_FUNCTION_END_NO_RETURN(void, DepthFunc, func) -DECLARE_GL_FUNCTION_HEAD(void, DepthMask, GLboolean flag) DECLARE_GL_FUNCTION_END_NO_RETURN(void, DepthMask, flag) -DECLARE_GL_FUNCTION_STUB_HEAD(void, DepthRangef, GLfloat n, GLfloat f) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, DepthRangef, n,f) -DECLARE_GL_FUNCTION_STUB_HEAD(void, DetachShader, GLuint program, GLuint shader) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, DetachShader, program,shader) -DECLARE_GL_FUNCTION_HEAD(void, Disable, GLenum cap) DECLARE_GL_FUNCTION_END_NO_RETURN(void, Disable, cap) -DECLARE_GL_FUNCTION_STUB_HEAD(void, DisableVertexAttribArray, GLuint index) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, DisableVertexAttribArray, index) -DECLARE_GL_FUNCTION_HEAD(void, DrawArrays, GLenum mode, GLint first, GLsizei count) DECLARE_GL_FUNCTION_END_NO_RETURN(void, DrawArrays, mode,first,count) -DECLARE_GL_FUNCTION_HEAD(void, DrawElements, GLenum mode, GLsizei count, GLenum type, const void *indices) DECLARE_GL_FUNCTION_END_NO_RETURN(void, DrawElements, mode,count,type,indices) -DECLARE_GL_FUNCTION_HEAD(void, Enable, GLenum cap) DECLARE_GL_FUNCTION_END_NO_RETURN(void, Enable, cap) -DECLARE_GL_FUNCTION_HEAD(void, EnableVertexAttribArray, GLuint index) DECLARE_GL_FUNCTION_END_NO_RETURN(void, EnableVertexAttribArray, index) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Finish) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Finish) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Flush) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Flush) -DECLARE_GL_FUNCTION_STUB_HEAD(void, FramebufferRenderbuffer, GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, FramebufferRenderbuffer, target,attachment,renderbuffertarget,renderbuffer) -DECLARE_GL_FUNCTION_HEAD(void, FramebufferTexture2D, GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) DECLARE_GL_FUNCTION_END_NO_RETURN(void, FramebufferTexture2D, target,attachment,textarget,texture,level) -DECLARE_GL_FUNCTION_STUB_HEAD(void, FrontFace, GLenum mode) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, FrontFace, mode) -DECLARE_GL_FUNCTION_HEAD(void, GenBuffers, GLsizei n, GLuint *buffers) DECLARE_GL_FUNCTION_END_NO_RETURN(void, GenBuffers, n,buffers) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GenerateMipmap, GLenum target) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GenerateMipmap, target) -DECLARE_GL_FUNCTION_HEAD(void, GenFramebuffers, GLsizei n, GLuint *framebuffers) DECLARE_GL_FUNCTION_END_NO_RETURN(void, GenFramebuffers, n,framebuffers) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GenRenderbuffers, GLsizei n, GLuint *renderbuffers) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GenRenderbuffers, n,renderbuffers) -DECLARE_GL_FUNCTION_HEAD(void, GenTextures, GLsizei n, GLuint *textures) DECLARE_GL_FUNCTION_END_NO_RETURN(void, GenTextures, n,textures) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetActiveAttrib, GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetActiveAttrib, program,index,bufSize,length,size,type,name) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetActiveUniform, GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetActiveUniform, program,index,bufSize,length,size,type,name) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetAttachedShaders, GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetAttachedShaders, program,maxCount,count,shaders) -DECLARE_GL_FUNCTION_HEAD(GLint, GetAttribLocation, GLuint program, const GLchar *name) DECLARE_GL_FUNCTION_END(GLint, GetAttribLocation, program,name) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetBooleanv, GLenum pname, GLboolean *data) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetBooleanv, pname,data) -DECLARE_GL_FUNCTION_HEAD(void, GetBufferParameteriv, GLenum target, GLenum pname, GLint *params) DECLARE_GL_FUNCTION_END_NO_RETURN(void, GetBufferParameteriv, target,pname,params) -DECLARE_GL_FUNCTION_HEAD(GLenum, GetError) DECLARE_GL_FUNCTION_END(GLenum, GetError) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetFloatv, GLenum pname, GLfloat *data) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetFloatv, pname,data) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetFramebufferAttachmentParameteriv, GLenum target, GLenum attachment, GLenum pname, GLint *params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetFramebufferAttachmentParameteriv, target,attachment,pname,params) -DECLARE_GL_FUNCTION_HEAD(void, GetIntegerv, GLenum pname, GLint *data) DECLARE_GL_FUNCTION_END_NO_RETURN(void, GetIntegerv, pname,data) -DECLARE_GL_FUNCTION_HEAD(void, GetProgramiv, GLuint program, GLenum pname, GLint *params) DECLARE_GL_FUNCTION_END_NO_RETURN(void, GetProgramiv, program,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetProgramInfoLog, GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetProgramInfoLog, program,bufSize,length,infoLog) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetRenderbufferParameteriv, GLenum target, GLenum pname, GLint *params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetRenderbufferParameteriv, target,pname,params) -DECLARE_GL_FUNCTION_HEAD(void, GetShaderiv, GLuint shader, GLenum pname, GLint *params) DECLARE_GL_FUNCTION_END_NO_RETURN(void, GetShaderiv, shader,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetShaderInfoLog, GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetShaderInfoLog, shader,bufSize,length,infoLog) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetShaderPrecisionFormat, GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetShaderPrecisionFormat, shadertype,precisiontype,range,precision) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetShaderSource, GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetShaderSource, shader,bufSize,length,source) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetTexParameterfv, GLenum target, GLenum pname, GLfloat *params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetTexParameterfv, target,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetTexParameteriv, GLenum target, GLenum pname, GLint *params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetTexParameteriv, target,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetUniformfv, GLuint program, GLint location, GLfloat *params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetUniformfv, program,location,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetUniformiv, GLuint program, GLint location, GLint *params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetUniformiv, program,location,params) -DECLARE_GL_FUNCTION_HEAD(GLint, GetUniformLocation, GLuint program, const GLchar *name) DECLARE_GL_FUNCTION_END(GLint, GetUniformLocation, program,name) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetVertexAttribfv, GLuint index, GLenum pname, GLfloat *params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetVertexAttribfv, index,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetVertexAttribiv, GLuint index, GLenum pname, GLint *params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetVertexAttribiv, index,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetVertexAttribPointerv, GLuint index, GLenum pname, void **pointer) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetVertexAttribPointerv, index,pname,pointer) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Hint, GLenum target, GLenum mode) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Hint, target,mode) -DECLARE_GL_FUNCTION_HEAD(GLboolean, IsBuffer, GLuint buffer) DECLARE_GL_FUNCTION_END(GLboolean, IsBuffer, buffer) -DECLARE_GL_FUNCTION_STUB_HEAD(GLboolean, IsEnabled, GLenum cap) DECLARE_GL_FUNCTION_STUB_END(GLboolean, IsEnabled, cap) -DECLARE_GL_FUNCTION_STUB_HEAD(GLboolean, IsFramebuffer, GLuint framebuffer) DECLARE_GL_FUNCTION_STUB_END(GLboolean, IsFramebuffer, framebuffer) -DECLARE_GL_FUNCTION_STUB_HEAD(GLboolean, IsProgram, GLuint program) DECLARE_GL_FUNCTION_STUB_END(GLboolean, IsProgram, program) -DECLARE_GL_FUNCTION_STUB_HEAD(GLboolean, IsRenderbuffer, GLuint renderbuffer) DECLARE_GL_FUNCTION_STUB_END(GLboolean, IsRenderbuffer, renderbuffer) -DECLARE_GL_FUNCTION_STUB_HEAD(GLboolean, IsShader, GLuint shader) DECLARE_GL_FUNCTION_STUB_END(GLboolean, IsShader, shader) -DECLARE_GL_FUNCTION_STUB_HEAD(GLboolean, IsTexture, GLuint texture) DECLARE_GL_FUNCTION_STUB_END(GLboolean, IsTexture, texture) -DECLARE_GL_FUNCTION_STUB_HEAD(void, LineWidth, GLfloat width) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, LineWidth, width) -DECLARE_GL_FUNCTION_HEAD(void, LinkProgram, GLuint program) DECLARE_GL_FUNCTION_END_NO_RETURN(void, LinkProgram, program) -DECLARE_GL_FUNCTION_HEAD(void, PixelStorei, GLenum pname, GLint param) DECLARE_GL_FUNCTION_END_NO_RETURN(void, PixelStorei, pname,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, PolygonOffset, GLfloat factor, GLfloat units) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, PolygonOffset, factor,units) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ReadPixels, GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ReadPixels, x,y,width,height,format,type,pixels) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ReleaseShaderCompiler) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ReleaseShaderCompiler) -DECLARE_GL_FUNCTION_STUB_HEAD(void, RenderbufferStorage, GLenum target, GLenum internalformat, GLsizei width, GLsizei height) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, RenderbufferStorage, target,internalformat,width,height) -DECLARE_GL_FUNCTION_STUB_HEAD(void, SampleCoverage, GLfloat value, GLboolean invert) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, SampleCoverage, value,invert) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Scissor, GLint x, GLint y, GLsizei width, GLsizei height) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Scissor, x,y,width,height) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ShaderBinary, GLsizei count, const GLuint *shaders, GLenum binaryformat, const void *binary, GLsizei length) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ShaderBinary, count,shaders,binaryformat,binary,length) -DECLARE_GL_FUNCTION_HEAD(void, ShaderSource, GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length) DECLARE_GL_FUNCTION_END_NO_RETURN(void, ShaderSource, shader,count,string,length) -DECLARE_GL_FUNCTION_STUB_HEAD(void, StencilFunc, GLenum func, GLint ref, GLuint mask) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, StencilFunc, func,ref,mask) -DECLARE_GL_FUNCTION_STUB_HEAD(void, StencilFuncSeparate, GLenum face, GLenum func, GLint ref, GLuint mask) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, StencilFuncSeparate, face,func,ref,mask) -DECLARE_GL_FUNCTION_STUB_HEAD(void, StencilMask, GLuint mask) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, StencilMask, mask) -DECLARE_GL_FUNCTION_STUB_HEAD(void, StencilMaskSeparate, GLenum face, GLuint mask) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, StencilMaskSeparate, face,mask) -DECLARE_GL_FUNCTION_STUB_HEAD(void, StencilOp, GLenum fail, GLenum zfail, GLenum zpass) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, StencilOp, fail,zfail,zpass) -DECLARE_GL_FUNCTION_STUB_HEAD(void, StencilOpSeparate, GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, StencilOpSeparate, face,sfail,dpfail,dppass) -DECLARE_GL_FUNCTION_HEAD(void, TexImage2D, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels) DECLARE_GL_FUNCTION_END_NO_RETURN(void, TexImage2D, target,level,internalformat,width,height,border,format,type,pixels) -DECLARE_GL_FUNCTION_HEAD(void, TexParameterf, GLenum target, GLenum pname, GLfloat param) DECLARE_GL_FUNCTION_END_NO_RETURN(void, TexParameterf, target,pname,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexParameterfv, GLenum target, GLenum pname, const GLfloat *params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexParameterfv, target,pname,params) -DECLARE_GL_FUNCTION_HEAD(void, TexParameteri, GLenum target, GLenum pname, GLint param) DECLARE_GL_FUNCTION_END_NO_RETURN(void, TexParameteri, target,pname,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexParameteriv, GLenum target, GLenum pname, const GLint *params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexParameteriv, target,pname,params) -DECLARE_GL_FUNCTION_HEAD(void, TexSubImage2D, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels) DECLARE_GL_FUNCTION_END_NO_RETURN(void, TexSubImage2D, target,level,xoffset,yoffset,width,height,format,type,pixels) -DECLARE_GL_FUNCTION_HEAD(void, Uniform1f, GLint location, GLfloat v0) DECLARE_GL_FUNCTION_END_NO_RETURN(void, Uniform1f, location,v0) -DECLARE_GL_FUNCTION_HEAD(void, Uniform1fv, GLint location, GLsizei count, const GLfloat *value) DECLARE_GL_FUNCTION_END_NO_RETURN(void, Uniform1fv, location,count,value) -DECLARE_GL_FUNCTION_HEAD(void, Uniform1i, GLint location, GLint v0) DECLARE_GL_FUNCTION_END_NO_RETURN(void, Uniform1i, location,v0) -DECLARE_GL_FUNCTION_HEAD(void, Uniform1iv, GLint location, GLsizei count, const GLint *value) DECLARE_GL_FUNCTION_END_NO_RETURN(void, Uniform1iv, location,count,value) -DECLARE_GL_FUNCTION_HEAD(void, Uniform2f, GLint location, GLfloat v0, GLfloat v1) DECLARE_GL_FUNCTION_END_NO_RETURN(void, Uniform2f, location,v0,v1) -DECLARE_GL_FUNCTION_HEAD(void, Uniform2fv, GLint location, GLsizei count, const GLfloat *value) DECLARE_GL_FUNCTION_END_NO_RETURN(void, Uniform2fv, location,count,value) -DECLARE_GL_FUNCTION_HEAD(void, Uniform2i, GLint location, GLint v0, GLint v1) DECLARE_GL_FUNCTION_END_NO_RETURN(void, Uniform2i, location,v0,v1) -DECLARE_GL_FUNCTION_HEAD(void, Uniform2iv, GLint location, GLsizei count, const GLint *value) DECLARE_GL_FUNCTION_END_NO_RETURN(void, Uniform2iv, location,count,value) -DECLARE_GL_FUNCTION_HEAD(void, Uniform3f, GLint location, GLfloat v0, GLfloat v1, GLfloat v2) DECLARE_GL_FUNCTION_END_NO_RETURN(void, Uniform3f, location,v0,v1,v2) -DECLARE_GL_FUNCTION_HEAD(void, Uniform3fv, GLint location, GLsizei count, const GLfloat *value) DECLARE_GL_FUNCTION_END_NO_RETURN(void, Uniform3fv, location,count,value) -DECLARE_GL_FUNCTION_HEAD(void, Uniform3i, GLint location, GLint v0, GLint v1, GLint v2) DECLARE_GL_FUNCTION_END_NO_RETURN(void, Uniform3i, location,v0,v1,v2) -DECLARE_GL_FUNCTION_HEAD(void, Uniform3iv, GLint location, GLsizei count, const GLint *value) DECLARE_GL_FUNCTION_END_NO_RETURN(void, Uniform3iv, location,count,value) -DECLARE_GL_FUNCTION_HEAD(void, Uniform4f, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3) DECLARE_GL_FUNCTION_END_NO_RETURN(void, Uniform4f, location,v0,v1,v2,v3) -DECLARE_GL_FUNCTION_HEAD(void, Uniform4fv, GLint location, GLsizei count, const GLfloat *value) DECLARE_GL_FUNCTION_END_NO_RETURN(void, Uniform4fv, location,count,value) -DECLARE_GL_FUNCTION_HEAD(void, Uniform4i, GLint location, GLint v0, GLint v1, GLint v2, GLint v3) DECLARE_GL_FUNCTION_END_NO_RETURN(void, Uniform4i, location,v0,v1,v2,v3) -DECLARE_GL_FUNCTION_HEAD(void, Uniform4iv, GLint location, GLsizei count, const GLint *value) DECLARE_GL_FUNCTION_END_NO_RETURN(void, Uniform4iv, location,count,value) -DECLARE_GL_FUNCTION_HEAD(void, UniformMatrix2fv, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) DECLARE_GL_FUNCTION_END_NO_RETURN(void, UniformMatrix2fv, location,count,transpose,value) -DECLARE_GL_FUNCTION_HEAD(void, UniformMatrix3fv, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) DECLARE_GL_FUNCTION_END_NO_RETURN(void, UniformMatrix3fv, location,count,transpose,value) -DECLARE_GL_FUNCTION_HEAD(void, UniformMatrix4fv, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) DECLARE_GL_FUNCTION_END_NO_RETURN(void, UniformMatrix4fv, location,count,transpose,value) -DECLARE_GL_FUNCTION_HEAD(void, UseProgram, GLuint program) DECLARE_GL_FUNCTION_END_NO_RETURN(void, UseProgram, program) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ValidateProgram, GLuint program) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ValidateProgram, program) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttrib1f, GLuint index, GLfloat x) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttrib1f, index,x) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttrib1fv, GLuint index, const GLfloat *v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttrib1fv, index,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttrib2f, GLuint index, GLfloat x, GLfloat y) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttrib2f, index,x,y) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttrib2fv, GLuint index, const GLfloat *v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttrib2fv, index,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttrib3f, GLuint index, GLfloat x, GLfloat y, GLfloat z) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttrib3f, index,x,y,z) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttrib3fv, GLuint index, const GLfloat *v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttrib3fv, index,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttrib4f, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttrib4f, index,x,y,z,w) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttrib4fv, GLuint index, const GLfloat *v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttrib4fv, index,v) -DECLARE_GL_FUNCTION_HEAD(void, VertexAttribPointer, GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer) DECLARE_GL_FUNCTION_END_NO_RETURN(void, VertexAttribPointer, index,size,type,normalized,stride,pointer) -DECLARE_GL_FUNCTION_HEAD(void, Viewport, GLint x, GLint y, GLsizei width, GLsizei height) DECLARE_GL_FUNCTION_END_NO_RETURN(void, Viewport, x,y,width,height) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ReadBuffer, GLenum src) DECLARE_GL_FUNCTION_END_NO_RETURN(void, ReadBuffer, src) -DECLARE_GL_FUNCTION_STUB_HEAD(void, DrawRangeElements, GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, DrawRangeElements, mode,start,end,count,type,indices) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexImage3D, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexImage3D, target,level,internalformat,width,height,depth,border,format,type,pixels) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexSubImage3D, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexSubImage3D, target,level,xoffset,yoffset,zoffset,width,height,depth,format,type,pixels) -DECLARE_GL_FUNCTION_STUB_HEAD(void, CopyTexSubImage3D, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, CopyTexSubImage3D, target,level,xoffset,yoffset,zoffset,x,y,width,height) -DECLARE_GL_FUNCTION_STUB_HEAD(void, CompressedTexImage3D, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, CompressedTexImage3D, target,level,internalformat,width,height,depth,border,imageSize,data) -DECLARE_GL_FUNCTION_STUB_HEAD(void, CompressedTexSubImage3D, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, CompressedTexSubImage3D, target,level,xoffset,yoffset,zoffset,width,height,depth,format,imageSize,data) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GenQueries, GLsizei n, GLuint *ids) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GenQueries, n,ids) -DECLARE_GL_FUNCTION_STUB_HEAD(void, DeleteQueries, GLsizei n, const GLuint *ids) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, DeleteQueries, n,ids) -DECLARE_GL_FUNCTION_STUB_HEAD(GLboolean, IsQuery, GLuint id) DECLARE_GL_FUNCTION_STUB_END(GLboolean, IsQuery, id) -DECLARE_GL_FUNCTION_STUB_HEAD(void, BeginQuery, GLenum target, GLuint id) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, BeginQuery, target,id) -DECLARE_GL_FUNCTION_STUB_HEAD(void, EndQuery, GLenum target) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, EndQuery, target) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetQueryiv, GLenum target, GLenum pname, GLint *params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetQueryiv, target,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetQueryObjectuiv, GLuint id, GLenum pname, GLuint *params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetQueryObjectuiv, id,pname,params) -DECLARE_GL_FUNCTION_HEAD(GLboolean, UnmapBuffer, GLenum target) DECLARE_GL_FUNCTION_END(GLboolean, UnmapBuffer, target) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetBufferPointerv, GLenum target, GLenum pname, void **params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetBufferPointerv, target,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, DrawBuffers, GLsizei n, const GLenum *bufs) DECLARE_GL_FUNCTION_END_NO_RETURN(void, DrawBuffers, n,bufs) -DECLARE_GL_FUNCTION_HEAD(void, UniformMatrix2x3fv, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) DECLARE_GL_FUNCTION_END_NO_RETURN(void, UniformMatrix2x3fv, location,count,transpose,value) -DECLARE_GL_FUNCTION_HEAD(void, UniformMatrix3x2fv, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) DECLARE_GL_FUNCTION_END_NO_RETURN(void, UniformMatrix3x2fv, location,count,transpose,value) -DECLARE_GL_FUNCTION_HEAD(void, UniformMatrix2x4fv, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) DECLARE_GL_FUNCTION_END_NO_RETURN(void, UniformMatrix2x4fv, location,count,transpose,value) -DECLARE_GL_FUNCTION_HEAD(void, UniformMatrix4x2fv, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) DECLARE_GL_FUNCTION_END_NO_RETURN(void, UniformMatrix4x2fv, location,count,transpose,value) -DECLARE_GL_FUNCTION_HEAD(void, UniformMatrix3x4fv, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) DECLARE_GL_FUNCTION_END_NO_RETURN(void, UniformMatrix3x4fv, location,count,transpose,value) -DECLARE_GL_FUNCTION_HEAD(void, UniformMatrix4x3fv, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) DECLARE_GL_FUNCTION_END_NO_RETURN(void, UniformMatrix4x3fv, location,count,transpose,value) -DECLARE_GL_FUNCTION_HEAD(void, BlitFramebuffer, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter) DECLARE_GL_FUNCTION_END_NO_RETURN(void, BlitFramebuffer, srcX0,srcY0,srcX1,srcY1,dstX0,dstY0,dstX1,dstY1,mask,filter) -//DECLARE_GL_FUNCTION_STUB_HEAD(void, BlitFramebuffer, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, BlitFramebuffer, srcX0,srcY0,srcX1,srcY1,dstX0,dstY0,dstX1,dstY1,mask,filter) -DECLARE_GL_FUNCTION_STUB_HEAD(void, RenderbufferStorageMultisample, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, RenderbufferStorageMultisample, target,samples,internalformat,width,height) -DECLARE_GL_FUNCTION_STUB_HEAD(void, FramebufferTextureLayer, GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, FramebufferTextureLayer, target,attachment,texture,level,layer) -DECLARE_GL_FUNCTION_HEAD(void, FlushMappedBufferRange, GLenum target, GLintptr offset, GLsizeiptr length) DECLARE_GL_FUNCTION_END_NO_RETURN(void, FlushMappedBufferRange, target,offset,length) -DECLARE_GL_FUNCTION_HEAD(void, BindVertexArray, GLuint array) DECLARE_GL_FUNCTION_END_NO_RETURN(void, BindVertexArray, array) -DECLARE_GL_FUNCTION_STUB_HEAD(void, DeleteVertexArrays, GLsizei n, const GLuint *arrays) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, DeleteVertexArrays, n,arrays) -DECLARE_GL_FUNCTION_HEAD(void, GenVertexArrays, GLsizei n, GLuint *arrays) DECLARE_GL_FUNCTION_END_NO_RETURN(void, GenVertexArrays, n,arrays) -DECLARE_GL_FUNCTION_STUB_HEAD(GLboolean, IsVertexArray, GLuint array) DECLARE_GL_FUNCTION_STUB_END(GLboolean, IsVertexArray, array) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetIntegeri_v, GLenum target, GLuint index, GLint *data) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetIntegeri_v, target,index,data) -DECLARE_GL_FUNCTION_STUB_HEAD(void, BeginTransformFeedback, GLenum primitiveMode) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, BeginTransformFeedback, primitiveMode) -DECLARE_GL_FUNCTION_STUB_HEAD(void, EndTransformFeedback) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, EndTransformFeedback) -DECLARE_GL_FUNCTION_STUB_HEAD(void, BindBufferRange, GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, BindBufferRange, target,index,buffer,offset,size) -DECLARE_GL_FUNCTION_STUB_HEAD(void, BindBufferBase, GLenum target, GLuint index, GLuint buffer) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, BindBufferBase, target,index,buffer) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TransformFeedbackVaryings, GLuint program, GLsizei count, const GLchar *const*varyings, GLenum bufferMode) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TransformFeedbackVaryings, program,count,varyings,bufferMode) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetTransformFeedbackVarying, GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetTransformFeedbackVarying, program,index,bufSize,length,size,type,name) -DECLARE_GL_FUNCTION_HEAD(void, VertexAttribIPointer, GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer) DECLARE_GL_FUNCTION_END_NO_RETURN(void, VertexAttribIPointer, index,size,type,stride,pointer) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetVertexAttribIiv, GLuint index, GLenum pname, GLint *params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetVertexAttribIiv, index,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetVertexAttribIuiv, GLuint index, GLenum pname, GLuint *params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetVertexAttribIuiv, index,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribI4i, GLuint index, GLint x, GLint y, GLint z, GLint w) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribI4i, index,x,y,z,w) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribI4ui, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribI4ui, index,x,y,z,w) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribI4iv, GLuint index, const GLint *v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribI4iv, index,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribI4uiv, GLuint index, const GLuint *v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribI4uiv, index,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetUniformuiv, GLuint program, GLint location, GLuint *params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetUniformuiv, program,location,params) -DECLARE_GL_FUNCTION_STUB_HEAD(GLint, GetFragDataLocation, GLuint program, const GLchar *name) DECLARE_GL_FUNCTION_STUB_END(GLint, GetFragDataLocation, program,name) -DECLARE_GL_FUNCTION_HEAD(void, Uniform1ui, GLint location, GLuint v0) DECLARE_GL_FUNCTION_END_NO_RETURN(void, Uniform1ui, location,v0) -DECLARE_GL_FUNCTION_HEAD(void, Uniform2ui, GLint location, GLuint v0, GLuint v1) DECLARE_GL_FUNCTION_END_NO_RETURN(void, Uniform2ui, location,v0,v1) -DECLARE_GL_FUNCTION_HEAD(void, Uniform3ui, GLint location, GLuint v0, GLuint v1, GLuint v2) DECLARE_GL_FUNCTION_END_NO_RETURN(void, Uniform3ui, location,v0,v1,v2) -DECLARE_GL_FUNCTION_HEAD(void, Uniform4ui, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3) DECLARE_GL_FUNCTION_END_NO_RETURN(void, Uniform4ui, location,v0,v1,v2,v3) -DECLARE_GL_FUNCTION_HEAD(void, Uniform1uiv, GLint location, GLsizei count, const GLuint *value) DECLARE_GL_FUNCTION_END_NO_RETURN(void, Uniform1uiv, location,count,value) -DECLARE_GL_FUNCTION_HEAD(void, Uniform2uiv, GLint location, GLsizei count, const GLuint *value) DECLARE_GL_FUNCTION_END_NO_RETURN(void, Uniform2uiv, location,count,value) -DECLARE_GL_FUNCTION_HEAD(void, Uniform3uiv, GLint location, GLsizei count, const GLuint *value) DECLARE_GL_FUNCTION_END_NO_RETURN(void, Uniform3uiv, location,count,value) -DECLARE_GL_FUNCTION_HEAD(void, Uniform4uiv, GLint location, GLsizei count, const GLuint *value) DECLARE_GL_FUNCTION_END_NO_RETURN(void, Uniform4uiv, location,count,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ClearBufferiv, GLenum buffer, GLint drawbuffer, const GLint *value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ClearBufferiv, buffer,drawbuffer,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ClearBufferuiv, GLenum buffer, GLint drawbuffer, const GLuint *value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ClearBufferuiv, buffer,drawbuffer,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ClearBufferfv, GLenum buffer, GLint drawbuffer, const GLfloat *value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ClearBufferfv, buffer,drawbuffer,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ClearBufferfi, GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ClearBufferfi, buffer,drawbuffer,depth,stencil) -DECLARE_GL_FUNCTION_HEAD(void, CopyBufferSubData, GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size) DECLARE_GL_FUNCTION_END_NO_RETURN(void, CopyBufferSubData, readTarget,writeTarget,readOffset,writeOffset,size) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetUniformIndices, GLuint program, GLsizei uniformCount, const GLchar *const*uniformNames, GLuint *uniformIndices) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetUniformIndices, program,uniformCount,uniformNames,uniformIndices) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetActiveUniformsiv, GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetActiveUniformsiv, program,uniformCount,uniformIndices,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(GLuint, GetUniformBlockIndex, GLuint program, const GLchar *uniformBlockName) DECLARE_GL_FUNCTION_STUB_END(GLuint, GetUniformBlockIndex, program,uniformBlockName) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetActiveUniformBlockiv, GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetActiveUniformBlockiv, program,uniformBlockIndex,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetActiveUniformBlockName, GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetActiveUniformBlockName, program,uniformBlockIndex,bufSize,length,uniformBlockName) -DECLARE_GL_FUNCTION_STUB_HEAD(void, UniformBlockBinding, GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, UniformBlockBinding, program,uniformBlockIndex,uniformBlockBinding) -DECLARE_GL_FUNCTION_STUB_HEAD(void, DrawArraysInstanced, GLenum mode, GLint first, GLsizei count, GLsizei instancecount) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, DrawArraysInstanced, mode,first,count,instancecount) -DECLARE_GL_FUNCTION_STUB_HEAD(void, DrawElementsInstanced, GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, DrawElementsInstanced, mode,count,type,indices,instancecount) -DECLARE_GL_FUNCTION_STUB_HEAD(GLsync, FenceSync, GLenum condition, GLbitfield flags) DECLARE_GL_FUNCTION_STUB_END(GLsync, FenceSync, condition,flags) -DECLARE_GL_FUNCTION_STUB_HEAD(GLboolean, IsSync, GLsync sync) DECLARE_GL_FUNCTION_STUB_END(GLboolean, IsSync, sync) -DECLARE_GL_FUNCTION_STUB_HEAD(void, DeleteSync, GLsync sync) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, DeleteSync, sync) -DECLARE_GL_FUNCTION_STUB_HEAD(GLenum, ClientWaitSync, GLsync sync, GLbitfield flags, GLuint64 timeout) DECLARE_GL_FUNCTION_STUB_END(GLenum, ClientWaitSync, sync,flags,timeout) -DECLARE_GL_FUNCTION_STUB_HEAD(void, WaitSync, GLsync sync, GLbitfield flags, GLuint64 timeout) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, WaitSync, sync,flags,timeout) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetInteger64v, GLenum pname, GLint64 *data) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetInteger64v, pname,data) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetSynciv, GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetSynciv, sync,pname,bufSize,length,values) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetInteger64i_v, GLenum target, GLuint index, GLint64 *data) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetInteger64i_v, target,index,data) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetBufferParameteri64v, GLenum target, GLenum pname, GLint64 *params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetBufferParameteri64v, target,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GenSamplers, GLsizei count, GLuint *samplers) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GenSamplers, count,samplers) -DECLARE_GL_FUNCTION_STUB_HEAD(void, DeleteSamplers, GLsizei count, const GLuint *samplers) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, DeleteSamplers, count,samplers) -DECLARE_GL_FUNCTION_STUB_HEAD(GLboolean, IsSampler, GLuint sampler) DECLARE_GL_FUNCTION_STUB_END(GLboolean, IsSampler, sampler) -DECLARE_GL_FUNCTION_STUB_HEAD(void, BindSampler, GLuint unit, GLuint sampler) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, BindSampler, unit,sampler) -DECLARE_GL_FUNCTION_STUB_HEAD(void, SamplerParameteri, GLuint sampler, GLenum pname, GLint param) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, SamplerParameteri, sampler,pname,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, SamplerParameteriv, GLuint sampler, GLenum pname, const GLint *param) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, SamplerParameteriv, sampler,pname,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, SamplerParameterf, GLuint sampler, GLenum pname, GLfloat param) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, SamplerParameterf, sampler,pname,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, SamplerParameterfv, GLuint sampler, GLenum pname, const GLfloat *param) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, SamplerParameterfv, sampler,pname,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetSamplerParameteriv, GLuint sampler, GLenum pname, GLint *params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetSamplerParameteriv, sampler,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetSamplerParameterfv, GLuint sampler, GLenum pname, GLfloat *params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetSamplerParameterfv, sampler,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribDivisor, GLuint index, GLuint divisor) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribDivisor, index,divisor) -DECLARE_GL_FUNCTION_STUB_HEAD(void, BindTransformFeedback, GLenum target, GLuint id) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, BindTransformFeedback, target,id) -DECLARE_GL_FUNCTION_STUB_HEAD(void, DeleteTransformFeedbacks, GLsizei n, const GLuint *ids) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, DeleteTransformFeedbacks, n,ids) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GenTransformFeedbacks, GLsizei n, GLuint *ids) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GenTransformFeedbacks, n,ids) -DECLARE_GL_FUNCTION_STUB_HEAD(GLboolean, IsTransformFeedback, GLuint id) DECLARE_GL_FUNCTION_STUB_END(GLboolean, IsTransformFeedback, id) -DECLARE_GL_FUNCTION_STUB_HEAD(void, PauseTransformFeedback) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, PauseTransformFeedback) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ResumeTransformFeedback) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ResumeTransformFeedback) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetProgramBinary, GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetProgramBinary, program,bufSize,length,binaryFormat,binary) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramBinary, GLuint program, GLenum binaryFormat, const void *binary, GLsizei length) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramBinary, program,binaryFormat,binary,length) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramParameteri, GLuint program, GLenum pname, GLint value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramParameteri, program,pname,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, InvalidateFramebuffer, GLenum target, GLsizei numAttachments, const GLenum *attachments) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, InvalidateFramebuffer, target,numAttachments,attachments) -DECLARE_GL_FUNCTION_STUB_HEAD(void, InvalidateSubFramebuffer, GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, InvalidateSubFramebuffer, target,numAttachments,attachments,x,y,width,height) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexStorage2D, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexStorage2D, target,levels,internalformat,width,height) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexStorage3D, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexStorage3D, target,levels,internalformat,width,height,depth) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetInternalformativ, GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetInternalformativ, target,internalformat,pname,bufSize,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, DispatchCompute, GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, DispatchCompute, num_groups_x,num_groups_y,num_groups_z) -DECLARE_GL_FUNCTION_STUB_HEAD(void, DispatchComputeIndirect, GLintptr indirect) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, DispatchComputeIndirect, indirect) -DECLARE_GL_FUNCTION_STUB_HEAD(void, DrawArraysIndirect, GLenum mode, const void *indirect) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, DrawArraysIndirect, mode,indirect) -DECLARE_GL_FUNCTION_STUB_HEAD(void, DrawElementsIndirect, GLenum mode, GLenum type, const void *indirect) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, DrawElementsIndirect, mode,type,indirect) -DECLARE_GL_FUNCTION_STUB_HEAD(void, FramebufferParameteri, GLenum target, GLenum pname, GLint param) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, FramebufferParameteri, target,pname,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetFramebufferParameteriv, GLenum target, GLenum pname, GLint *params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetFramebufferParameteriv, target,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetProgramInterfaceiv, GLuint program, GLenum programInterface, GLenum pname, GLint *params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetProgramInterfaceiv, program,programInterface,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(GLuint, GetProgramResourceIndex, GLuint program, GLenum programInterface, const GLchar *name) DECLARE_GL_FUNCTION_STUB_END(GLuint, GetProgramResourceIndex, program,programInterface,name) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetProgramResourceName, GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetProgramResourceName, program,programInterface,index,bufSize,length,name) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetProgramResourceiv, GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLint *params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetProgramResourceiv, program,programInterface,index,propCount,props,bufSize,length,params) -DECLARE_GL_FUNCTION_STUB_HEAD(GLint, GetProgramResourceLocation, GLuint program, GLenum programInterface, const GLchar *name) DECLARE_GL_FUNCTION_STUB_END(GLint, GetProgramResourceLocation, program,programInterface,name) -DECLARE_GL_FUNCTION_STUB_HEAD(void, UseProgramStages, GLuint pipeline, GLbitfield stages, GLuint program) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, UseProgramStages, pipeline,stages,program) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ActiveShaderProgram, GLuint pipeline, GLuint program) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ActiveShaderProgram, pipeline,program) -DECLARE_GL_FUNCTION_STUB_HEAD(GLuint, CreateShaderProgramv, GLenum type, GLsizei count, const GLchar *const*strings) DECLARE_GL_FUNCTION_STUB_END(GLuint, CreateShaderProgramv, type,count,strings) -DECLARE_GL_FUNCTION_STUB_HEAD(void, BindProgramPipeline, GLuint pipeline) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, BindProgramPipeline, pipeline) -DECLARE_GL_FUNCTION_STUB_HEAD(void, DeleteProgramPipelines, GLsizei n, const GLuint *pipelines) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, DeleteProgramPipelines, n,pipelines) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GenProgramPipelines, GLsizei n, GLuint *pipelines) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GenProgramPipelines, n,pipelines) -DECLARE_GL_FUNCTION_STUB_HEAD(GLboolean, IsProgramPipeline, GLuint pipeline) DECLARE_GL_FUNCTION_STUB_END(GLboolean, IsProgramPipeline, pipeline) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetProgramPipelineiv, GLuint pipeline, GLenum pname, GLint *params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetProgramPipelineiv, pipeline,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniform1i, GLuint program, GLint location, GLint v0) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniform1i, program,location,v0) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniform2i, GLuint program, GLint location, GLint v0, GLint v1) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniform2i, program,location,v0,v1) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniform3i, GLuint program, GLint location, GLint v0, GLint v1, GLint v2) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniform3i, program,location,v0,v1,v2) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniform4i, GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniform4i, program,location,v0,v1,v2,v3) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniform1ui, GLuint program, GLint location, GLuint v0) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniform1ui, program,location,v0) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniform2ui, GLuint program, GLint location, GLuint v0, GLuint v1) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniform2ui, program,location,v0,v1) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniform3ui, GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniform3ui, program,location,v0,v1,v2) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniform4ui, GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniform4ui, program,location,v0,v1,v2,v3) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniform1f, GLuint program, GLint location, GLfloat v0) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniform1f, program,location,v0) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniform2f, GLuint program, GLint location, GLfloat v0, GLfloat v1) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniform2f, program,location,v0,v1) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniform3f, GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniform3f, program,location,v0,v1,v2) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniform4f, GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniform4f, program,location,v0,v1,v2,v3) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniform1iv, GLuint program, GLint location, GLsizei count, const GLint *value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniform1iv, program,location,count,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniform2iv, GLuint program, GLint location, GLsizei count, const GLint *value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniform2iv, program,location,count,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniform3iv, GLuint program, GLint location, GLsizei count, const GLint *value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniform3iv, program,location,count,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniform4iv, GLuint program, GLint location, GLsizei count, const GLint *value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniform4iv, program,location,count,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniform1uiv, GLuint program, GLint location, GLsizei count, const GLuint *value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniform1uiv, program,location,count,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniform2uiv, GLuint program, GLint location, GLsizei count, const GLuint *value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniform2uiv, program,location,count,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniform3uiv, GLuint program, GLint location, GLsizei count, const GLuint *value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniform3uiv, program,location,count,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniform4uiv, GLuint program, GLint location, GLsizei count, const GLuint *value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniform4uiv, program,location,count,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniform1fv, GLuint program, GLint location, GLsizei count, const GLfloat *value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniform1fv, program,location,count,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniform2fv, GLuint program, GLint location, GLsizei count, const GLfloat *value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniform2fv, program,location,count,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniform3fv, GLuint program, GLint location, GLsizei count, const GLfloat *value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniform3fv, program,location,count,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniform4fv, GLuint program, GLint location, GLsizei count, const GLfloat *value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniform4fv, program,location,count,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniformMatrix2fv, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniformMatrix2fv, program,location,count,transpose,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniformMatrix3fv, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniformMatrix3fv, program,location,count,transpose,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniformMatrix4fv, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniformMatrix4fv, program,location,count,transpose,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniformMatrix2x3fv, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniformMatrix2x3fv, program,location,count,transpose,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniformMatrix3x2fv, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniformMatrix3x2fv, program,location,count,transpose,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniformMatrix2x4fv, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniformMatrix2x4fv, program,location,count,transpose,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniformMatrix4x2fv, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniformMatrix4x2fv, program,location,count,transpose,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniformMatrix3x4fv, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniformMatrix3x4fv, program,location,count,transpose,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniformMatrix4x3fv, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniformMatrix4x3fv, program,location,count,transpose,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ValidateProgramPipeline, GLuint pipeline) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ValidateProgramPipeline, pipeline) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetProgramPipelineInfoLog, GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetProgramPipelineInfoLog, pipeline,bufSize,length,infoLog) -DECLARE_GL_FUNCTION_STUB_HEAD(void, BindImageTexture, GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, BindImageTexture, unit,texture,level,layered,layer,access,format) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetBooleani_v, GLenum target, GLuint index, GLboolean *data) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetBooleani_v, target,index,data) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MemoryBarrier, GLbitfield barriers) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MemoryBarrier, barriers) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MemoryBarrierByRegion, GLbitfield barriers) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MemoryBarrierByRegion, barriers) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexStorage2DMultisample, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexStorage2DMultisample, target,samples,internalformat,width,height,fixedsamplelocations) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetMultisamplefv, GLenum pname, GLuint index, GLfloat *val) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetMultisamplefv, pname,index,val) -DECLARE_GL_FUNCTION_STUB_HEAD(void, SampleMaski, GLuint maskNumber, GLbitfield mask) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, SampleMaski, maskNumber,mask) -DECLARE_GL_FUNCTION_HEAD(void, GetTexLevelParameteriv, GLenum target, GLint level, GLenum pname, GLint *params) DECLARE_GL_FUNCTION_END_NO_RETURN(void, GetTexLevelParameteriv, target,level,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetTexLevelParameterfv, GLenum target, GLint level, GLenum pname, GLfloat *params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetTexLevelParameterfv, target,level,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, BindVertexBuffer, GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, BindVertexBuffer, bindingindex,buffer,offset,stride) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribFormat, GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribFormat, attribindex,size,type,normalized,relativeoffset) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribIFormat, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribIFormat, attribindex,size,type,relativeoffset) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribBinding, GLuint attribindex, GLuint bindingindex) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribBinding, attribindex,bindingindex) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexBindingDivisor, GLuint bindingindex, GLuint divisor) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexBindingDivisor, bindingindex,divisor) -DECLARE_GL_FUNCTION_STUB_HEAD(void, BlendBarrier) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, BlendBarrier) -DECLARE_GL_FUNCTION_STUB_HEAD(void, CopyImageSubData, 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) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, CopyImageSubData, srcName,srcTarget,srcLevel,srcX,srcY,srcZ,dstName,dstTarget,dstLevel,dstX,dstY,dstZ,srcWidth,srcHeight,srcDepth) -DECLARE_GL_FUNCTION_STUB_HEAD(void, DebugMessageControl, GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, DebugMessageControl, source,type,severity,count,ids,enabled) -DECLARE_GL_FUNCTION_STUB_HEAD(void, DebugMessageInsert, GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, DebugMessageInsert, source,type,id,severity,length,buf) -DECLARE_GL_FUNCTION_STUB_HEAD(void, DebugMessageCallback, GLDEBUGPROC callback, const void *userParam) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, DebugMessageCallback, callback,userParam) -DECLARE_GL_FUNCTION_STUB_HEAD(GLuint, GetDebugMessageLog, GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog) DECLARE_GL_FUNCTION_STUB_END(GLuint, GetDebugMessageLog, count,bufSize,sources,types,ids,severities,lengths,messageLog) -DECLARE_GL_FUNCTION_STUB_HEAD(void, PushDebugGroup, GLenum source, GLuint id, GLsizei length, const GLchar *message) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, PushDebugGroup, source,id,length,message) -DECLARE_GL_FUNCTION_STUB_HEAD(void, PopDebugGroup) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, PopDebugGroup) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ObjectLabel, GLenum identifier, GLuint name, GLsizei length, const GLchar *label) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ObjectLabel, identifier,name,length,label) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetObjectLabel, GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetObjectLabel, identifier,name,bufSize,length,label) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ObjectPtrLabel, const void *ptr, GLsizei length, const GLchar *label) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ObjectPtrLabel, ptr,length,label) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetObjectPtrLabel, const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetObjectPtrLabel, ptr,bufSize,length,label) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetPointerv, GLenum pname, void **params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetPointerv, pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Enablei, GLenum target, GLuint index) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Enablei, target,index) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Disablei, GLenum target, GLuint index) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Disablei, target,index) -DECLARE_GL_FUNCTION_STUB_HEAD(void, BlendEquationi, GLuint buf, GLenum mode) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, BlendEquationi, buf,mode) -DECLARE_GL_FUNCTION_STUB_HEAD(void, BlendEquationSeparatei, GLuint buf, GLenum modeRGB, GLenum modeAlpha) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, BlendEquationSeparatei, buf,modeRGB,modeAlpha) -DECLARE_GL_FUNCTION_STUB_HEAD(void, BlendFunci, GLuint buf, GLenum src, GLenum dst) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, BlendFunci, buf,src,dst) -DECLARE_GL_FUNCTION_STUB_HEAD(void, BlendFuncSeparatei, GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, BlendFuncSeparatei, buf,srcRGB,dstRGB,srcAlpha,dstAlpha) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ColorMaski, GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ColorMaski, index,r,g,b,a) -DECLARE_GL_FUNCTION_STUB_HEAD(GLboolean, IsEnabledi, GLenum target, GLuint index) DECLARE_GL_FUNCTION_STUB_END(GLboolean, IsEnabledi, target,index) -DECLARE_GL_FUNCTION_HEAD(void, DrawElementsBaseVertex, GLenum mode, GLsizei count, GLenum type, const void *indices, GLint basevertex) DECLARE_GL_FUNCTION_END_NO_RETURN(void, DrawElementsBaseVertex, mode,count,type,indices,basevertex) -DECLARE_GL_FUNCTION_STUB_HEAD(void, DrawRangeElementsBaseVertex, GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices, GLint basevertex) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, DrawRangeElementsBaseVertex, mode,start,end,count,type,indices,basevertex) -DECLARE_GL_FUNCTION_STUB_HEAD(void, DrawElementsInstancedBaseVertex, GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, DrawElementsInstancedBaseVertex, mode,count,type,indices,instancecount,basevertex) -DECLARE_GL_FUNCTION_STUB_HEAD(void, FramebufferTexture, GLenum target, GLenum attachment, GLuint texture, GLint level) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, FramebufferTexture, target,attachment,texture,level) -DECLARE_GL_FUNCTION_STUB_HEAD(void, PrimitiveBoundingBox, GLfloat minX, GLfloat minY, GLfloat minZ, GLfloat minW, GLfloat maxX, GLfloat maxY, GLfloat maxZ, GLfloat maxW) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, PrimitiveBoundingBox, minX,minY,minZ,minW,maxX,maxY,maxZ,maxW) -DECLARE_GL_FUNCTION_STUB_HEAD(GLenum, GetGraphicsResetStatus) DECLARE_GL_FUNCTION_STUB_END(GLenum, GetGraphicsResetStatus) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ReadnPixels, GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ReadnPixels, x,y,width,height,format,type,bufSize,data) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetnUniformfv, GLuint program, GLint location, GLsizei bufSize, GLfloat *params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetnUniformfv, program,location,bufSize,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetnUniformiv, GLuint program, GLint location, GLsizei bufSize, GLint *params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetnUniformiv, program,location,bufSize,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetnUniformuiv, GLuint program, GLint location, GLsizei bufSize, GLuint *params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetnUniformuiv, program,location,bufSize,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MinSampleShading, GLfloat value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MinSampleShading, value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, PatchParameteri, GLenum pname, GLint value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, PatchParameteri, pname,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexParameterIiv, GLenum target, GLenum pname, const GLint *params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexParameterIiv, target,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexParameterIuiv, GLenum target, GLenum pname, const GLuint *params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexParameterIuiv, target,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetTexParameterIiv, GLenum target, GLenum pname, GLint *params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetTexParameterIiv, target,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetTexParameterIuiv, GLenum target, GLenum pname, GLuint *params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetTexParameterIuiv, target,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, SamplerParameterIiv, GLuint sampler, GLenum pname, const GLint *param) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, SamplerParameterIiv, sampler,pname,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, SamplerParameterIuiv, GLuint sampler, GLenum pname, const GLuint *param) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, SamplerParameterIuiv, sampler,pname,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetSamplerParameterIiv, GLuint sampler, GLenum pname, GLint *params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetSamplerParameterIiv, sampler,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetSamplerParameterIuiv, GLuint sampler, GLenum pname, GLuint *params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetSamplerParameterIuiv, sampler,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexBuffer, GLenum target, GLenum internalformat, GLuint buffer) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexBuffer, target,internalformat,buffer) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexBufferRange, GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexBufferRange, target,internalformat,buffer,offset,size) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexStorage3DMultisample, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexStorage3DMultisample, target,samples,internalformat,width,height,depth,fixedsamplelocations) -DECLARE_GL_FUNCTION_HEAD(void*, MapBufferRange, GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access) DECLARE_GL_FUNCTION_END(void*, MapBufferRange, target,offset,length,access) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ClearIndex, GLfloat c ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ClearIndex,c) -DECLARE_GL_FUNCTION_STUB_HEAD(void, IndexMask, GLuint mask ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, IndexMask,mask) -DECLARE_GL_FUNCTION_STUB_HEAD(void, AlphaFunc, GLenum func, GLclampf ref ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, AlphaFunc,func,ref) -DECLARE_GL_FUNCTION_STUB_HEAD(void, LogicOp, GLenum opcode ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, LogicOp,opcode) -DECLARE_GL_FUNCTION_STUB_HEAD(void, PointSize, GLfloat size ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, PointSize,size) -DECLARE_GL_FUNCTION_STUB_HEAD(void, LineStipple, GLint factor, GLushort pattern ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, LineStipple,factor,pattern) -DECLARE_GL_FUNCTION_STUB_HEAD(void, PolygonMode, GLenum face, GLenum mode ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, PolygonMode,face,mode) -DECLARE_GL_FUNCTION_STUB_HEAD(void, PolygonStipple, const GLubyte *mask ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, PolygonStipple,mask) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetPolygonStipple, GLubyte *mask ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetPolygonStipple,mask) -DECLARE_GL_FUNCTION_STUB_HEAD(void, EdgeFlag, GLboolean flag ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, EdgeFlag,flag) -DECLARE_GL_FUNCTION_STUB_HEAD(void, EdgeFlagv, const GLboolean *flag ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, EdgeFlagv,flag) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ClipPlane, GLenum plane, const GLdouble *equation ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ClipPlane,plane,equation) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetClipPlane, GLenum plane, GLdouble *equation ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetClipPlane,plane,equation) -DECLARE_GL_FUNCTION_HEAD(void, DrawBuffer, GLenum mode ) DECLARE_GL_FUNCTION_END_NO_RETURN(void, DrawBuffer,mode) -DECLARE_GL_FUNCTION_STUB_HEAD(void, EnableClientState, GLenum cap ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, EnableClientState,cap) -DECLARE_GL_FUNCTION_STUB_HEAD(void, DisableClientState, GLenum cap ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, DisableClientState,cap) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetDoublev, GLenum pname, GLdouble *params ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetDoublev,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, PushAttrib, GLbitfield mask ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, PushAttrib,mask) -DECLARE_GL_FUNCTION_STUB_HEAD(void, PopAttrib) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, PopAttrib) -DECLARE_GL_FUNCTION_STUB_HEAD(void, PushClientAttrib, GLbitfield mask ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, PushClientAttrib,mask) -DECLARE_GL_FUNCTION_STUB_HEAD(void, PopClientAttrib) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, PopClientAttrib) -DECLARE_GL_FUNCTION_STUB_HEAD(GLint, RenderMode, GLenum mode) DECLARE_GL_FUNCTION_STUB_END(GLint, RenderMode,mode) -DECLARE_GL_FUNCTION_STUB_HEAD(void, DepthRange, GLclampd near_val, GLclampd far_val ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, DepthRange, near_val, far_val) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ClearAccum, GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ClearAccum,red,green,blue,alpha) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Accum, GLenum op, GLfloat value ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Accum,op,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MatrixMode, GLenum mode ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MatrixMode,mode) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Ortho, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble near_val, GLdouble far_val ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Ortho,left,right,bottom,top,near_val,far_val) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Frustum, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble near_val, GLdouble far_val ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Frustum,left,right,bottom,top,near_val,far_val) -DECLARE_GL_FUNCTION_STUB_HEAD(void, PushMatrix) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, PushMatrix) -DECLARE_GL_FUNCTION_STUB_HEAD(void, PopMatrix) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, PopMatrix) -DECLARE_GL_FUNCTION_STUB_HEAD(void, LoadIdentity) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, LoadIdentity) -DECLARE_GL_FUNCTION_STUB_HEAD(void, LoadMatrixd, const GLdouble *m ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, LoadMatrixd,m) -DECLARE_GL_FUNCTION_STUB_HEAD(void, LoadMatrixf, const GLfloat *m ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, LoadMatrixf,m) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultMatrixd, const GLdouble *m ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultMatrixd,m) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultMatrixf, const GLfloat *m ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultMatrixf,m) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Rotated, GLdouble ane, GLdouble x, GLdouble y, GLdouble z ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Rotated,ane,x,y,z) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Rotatef, GLfloat ane, GLfloat x, GLfloat y, GLfloat z ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Rotatef,ane,x,y,z) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Scaled, GLdouble x, GLdouble y, GLdouble z ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Scaled,x,y,z) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Scalef, GLfloat x, GLfloat y, GLfloat z ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Scalef,x,y,z) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Translated, GLdouble x, GLdouble y, GLdouble z ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Translated,x,y,z) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Translatef, GLfloat x, GLfloat y, GLfloat z ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Translatef,x,y,z) -DECLARE_GL_FUNCTION_STUB_HEAD(GLboolean, IsList, GLuint list ) DECLARE_GL_FUNCTION_STUB_END(GLboolean, IsList,list) -DECLARE_GL_FUNCTION_STUB_HEAD(void, DeleteLists, GLuint list, GLsizei range ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, DeleteLists,list,range) -DECLARE_GL_FUNCTION_STUB_HEAD(GLuint, GenLists, GLsizei range ) DECLARE_GL_FUNCTION_STUB_END(GLuint, GenLists,range) -DECLARE_GL_FUNCTION_STUB_HEAD(void, NewList, GLuint list, GLenum mode ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, NewList,list,mode) -DECLARE_GL_FUNCTION_STUB_HEAD(void, EndList) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, EndList) -DECLARE_GL_FUNCTION_STUB_HEAD(void, CallList, GLuint list ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, CallList,list) -DECLARE_GL_FUNCTION_STUB_HEAD(void, CallLists, GLsizei n, GLenum type,const GLvoid* lists ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, CallLists,n,type,lists) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ListBase, GLuint base ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ListBase,base) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Begin, GLenum mode ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Begin,mode) -DECLARE_GL_FUNCTION_STUB_HEAD(void, End) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, End) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Vertex2d, GLdouble x, GLdouble y ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Vertex2d,x,y) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Vertex2f, GLfloat x, GLfloat y ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Vertex2f,x,y) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Vertex2i, GLint x, GLint y ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Vertex2i,x,y) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Vertex2s, GLshort x, GLshort y ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Vertex2s,x,y) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Vertex3d, GLdouble x, GLdouble y, GLdouble z ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Vertex3d,x,y,z) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Vertex3f, GLfloat x, GLfloat y, GLfloat z ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Vertex3f,x,y,z) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Vertex3i, GLint x, GLint y, GLint z ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Vertex3i,x,y,z) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Vertex3s, GLshort x, GLshort y, GLshort z ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Vertex3s,x,y,z) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Vertex4d, GLdouble x, GLdouble y, GLdouble z, GLdouble w ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Vertex4d,x,y,z,w) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Vertex4f, GLfloat x, GLfloat y, GLfloat z, GLfloat w ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Vertex4f,x,y,z,w) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Vertex4i, GLint x, GLint y, GLint z, GLint w ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Vertex4i,x,y,z,w) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Vertex4s, GLshort x, GLshort y, GLshort z, GLshort w ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Vertex4s,x,y,z,w) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Vertex2dv, const GLdouble *v ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Vertex2dv,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Vertex2fv, const GLfloat *v ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Vertex2fv,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Vertex2iv, const GLint *v ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Vertex2iv,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Vertex2sv, const GLshort *v ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Vertex2sv,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Vertex3dv, const GLdouble *v ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Vertex3dv,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Vertex3fv, const GLfloat *v ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Vertex3fv,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Vertex3iv, const GLint *v ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Vertex3iv,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Vertex3sv, const GLshort *v ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Vertex3sv,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Vertex4dv, const GLdouble *v ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Vertex4dv,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Vertex4fv, const GLfloat *v ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Vertex4fv,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Vertex4iv, const GLint *v ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Vertex4iv,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Vertex4sv, const GLshort *v ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Vertex4sv,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Normal3b, GLbyte nx, GLbyte ny, GLbyte nz ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Normal3b,nx,ny,nz) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Normal3d, GLdouble nx, GLdouble ny, GLdouble nz ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Normal3d,nx,ny,nz) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Normal3f, GLfloat nx, GLfloat ny, GLfloat nz ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Normal3f,nx,ny,nz) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Normal3i, GLint nx, GLint ny, GLint nz ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Normal3i,nx,ny,nz) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Normal3s, GLshort nx, GLshort ny, GLshort nz ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Normal3s,nx,ny,nz) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Normal3bv, const GLbyte *v ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Normal3bv,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Normal3dv, const GLdouble *v ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Normal3dv,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Normal3fv, const GLfloat *v ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Normal3fv,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Normal3iv, const GLint *v ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Normal3iv,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Normal3sv, const GLshort *v ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Normal3sv,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Indexd, GLdouble c ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Indexd,c) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Indexf, GLfloat c ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Indexf,c) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Indexi, GLint c ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Indexi,c) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Indexs, GLshort c ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Indexs,c) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Indexub, GLubyte c ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Indexub,c) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Indexdv, const GLdouble *c ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Indexdv,c) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Indexfv, const GLfloat *c ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Indexfv,c) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Indexiv, const GLint *c ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Indexiv,c) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Indexsv, const GLshort *c ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Indexsv,c) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Indexubv, const GLubyte *c ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Indexubv,c) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Color3b, GLbyte red, GLbyte green, GLbyte blue ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Color3b,red,green,blue) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Color3d, GLdouble red, GLdouble green, GLdouble blue ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Color3d,red,green,blue) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Color3f, GLfloat red, GLfloat green, GLfloat blue ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Color3f,red,green,blue) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Color3i, GLint red, GLint green, GLint blue ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Color3i,red,green,blue) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Color3s, GLshort red, GLshort green, GLshort blue ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Color3s,red,green,blue) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Color3ub, GLubyte red, GLubyte green, GLubyte blue ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Color3ub,red,green,blue) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Color3ui, GLuint red, GLuint green, GLuint blue ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Color3ui,red,green,blue) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Color3us, GLushort red, GLushort green, GLushort blue ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Color3us,red,green,blue) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Color4b, GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Color4b,red,green,blue,alpha) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Color4d, GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Color4d,red,green,blue,alpha) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Color4f, GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Color4f,red,green,blue,alpha) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Color4i, GLint red, GLint green, GLint blue, GLint alpha ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Color4i,red,green,blue,alpha) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Color4s, GLshort red, GLshort green, GLshort blue, GLshort alpha ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Color4s,red,green,blue,alpha) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Color4ub, GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Color4ub,red,green,blue,alpha) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Color4ui, GLuint red, GLuint green, GLuint blue, GLuint alpha ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Color4ui,red,green,blue,alpha) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Color4us, GLushort red, GLushort green, GLushort blue, GLushort alpha ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Color4us,red,green,blue,alpha) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Color3bv, const GLbyte *v ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Color3bv,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Color3dv, const GLdouble *v ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Color3dv,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Color3fv, const GLfloat *v ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Color3fv,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Color3iv, const GLint *v ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Color3iv,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Color3sv, const GLshort *v ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Color3sv,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Color3ubv, const GLubyte *v ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Color3ubv,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Color3uiv, const GLuint *v ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Color3uiv,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Color3usv, const GLushort *v ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Color3usv,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Color4bv, const GLbyte *v ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Color4bv,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Color4dv, const GLdouble *v ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Color4dv,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Color4fv, const GLfloat *v ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Color4fv,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Color4iv, const GLint *v ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Color4iv,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Color4sv, const GLshort *v ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Color4sv,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Color4ubv, const GLubyte *v ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Color4ubv,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Color4uiv, const GLuint *v ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Color4uiv,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Color4usv, const GLushort *v ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Color4usv,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexCoord1d, GLdouble s ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexCoord1d,s) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexCoord1f, GLfloat s ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexCoord1f,s) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexCoord1i, GLint s ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexCoord1i,s) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexCoord1s, GLshort s ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexCoord1s,s) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexCoord2d, GLdouble s, GLdouble t ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexCoord2d,s,t) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexCoord2f, GLfloat s, GLfloat t ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexCoord2f,s,t) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexCoord2i, GLint s, GLint t ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexCoord2i,s,t) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexCoord2s, GLshort s, GLshort t ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexCoord2s,s,t) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexCoord3d, GLdouble s, GLdouble t, GLdouble r ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexCoord3d,s,t,r) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexCoord3f, GLfloat s, GLfloat t, GLfloat r ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexCoord3f,s,t,r) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexCoord3i, GLint s, GLint t, GLint r ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexCoord3i,s,t,r) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexCoord3s, GLshort s, GLshort t, GLshort r ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexCoord3s,s,t,r) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexCoord4d, GLdouble s, GLdouble t, GLdouble r, GLdouble q ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexCoord4d,s,t,r,q) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexCoord4f, GLfloat s, GLfloat t, GLfloat r, GLfloat q ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexCoord4f,s,t,r,q) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexCoord4i, GLint s, GLint t, GLint r, GLint q ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexCoord4i,s,t,r,q) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexCoord4s, GLshort s, GLshort t, GLshort r, GLshort q ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexCoord4s,s,t,r,q) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexCoord1dv, const GLdouble *v ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexCoord1dv,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexCoord1fv, const GLfloat *v ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexCoord1fv,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexCoord1iv, const GLint *v ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexCoord1iv,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexCoord1sv, const GLshort *v ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexCoord1sv,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexCoord2dv, const GLdouble *v ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexCoord2dv,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexCoord2fv, const GLfloat *v ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexCoord2fv,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexCoord2iv, const GLint *v ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexCoord2iv,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexCoord2sv, const GLshort *v ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexCoord2sv,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexCoord3dv, const GLdouble *v ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexCoord3dv,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexCoord3fv, const GLfloat *v ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexCoord3fv,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexCoord3iv, const GLint *v ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexCoord3iv,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexCoord3sv, const GLshort *v ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexCoord3sv,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexCoord4dv, const GLdouble *v ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexCoord4dv,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexCoord4fv, const GLfloat *v ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexCoord4fv,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexCoord4iv, const GLint *v ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexCoord4iv,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexCoord4sv, const GLshort *v ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexCoord4sv,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, RasterPos2d, GLdouble x, GLdouble y ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, RasterPos2d,x,y) -DECLARE_GL_FUNCTION_STUB_HEAD(void, RasterPos2f, GLfloat x, GLfloat y ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, RasterPos2f,x,y) -DECLARE_GL_FUNCTION_STUB_HEAD(void, RasterPos2i, GLint x, GLint y ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, RasterPos2i,x,y) -DECLARE_GL_FUNCTION_STUB_HEAD(void, RasterPos2s, GLshort x, GLshort y ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, RasterPos2s,x,y) -DECLARE_GL_FUNCTION_STUB_HEAD(void, RasterPos3d, GLdouble x, GLdouble y, GLdouble z ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, RasterPos3d,x,y,z) -DECLARE_GL_FUNCTION_STUB_HEAD(void, RasterPos3f, GLfloat x, GLfloat y, GLfloat z ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, RasterPos3f,x,y,z) -DECLARE_GL_FUNCTION_STUB_HEAD(void, RasterPos3i, GLint x, GLint y, GLint z ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, RasterPos3i,x,y,z) -DECLARE_GL_FUNCTION_STUB_HEAD(void, RasterPos3s, GLshort x, GLshort y, GLshort z ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, RasterPos3s,x,y,z) -DECLARE_GL_FUNCTION_STUB_HEAD(void, RasterPos4d, GLdouble x, GLdouble y, GLdouble z, GLdouble w ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, RasterPos4d,x,y,z,w) -DECLARE_GL_FUNCTION_STUB_HEAD(void, RasterPos4f, GLfloat x, GLfloat y, GLfloat z, GLfloat w ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, RasterPos4f,x,y,z,w) -DECLARE_GL_FUNCTION_STUB_HEAD(void, RasterPos4i, GLint x, GLint y, GLint z, GLint w ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, RasterPos4i,x,y,z,w) -DECLARE_GL_FUNCTION_STUB_HEAD(void, RasterPos4s, GLshort x, GLshort y, GLshort z, GLshort w ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, RasterPos4s,x,y,z,w) -DECLARE_GL_FUNCTION_STUB_HEAD(void, RasterPos2dv, const GLdouble *v ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, RasterPos2dv,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, RasterPos2fv, const GLfloat *v ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, RasterPos2fv,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, RasterPos2iv, const GLint *v ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, RasterPos2iv,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, RasterPos2sv, const GLshort *v ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, RasterPos2sv,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, RasterPos3dv, const GLdouble *v ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, RasterPos3dv,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, RasterPos3fv, const GLfloat *v ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, RasterPos3fv,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, RasterPos3iv, const GLint *v ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, RasterPos3iv,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, RasterPos3sv, const GLshort *v ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, RasterPos3sv,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, RasterPos4dv, const GLdouble *v ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, RasterPos4dv,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, RasterPos4fv, const GLfloat *v ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, RasterPos4fv,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, RasterPos4iv, const GLint *v ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, RasterPos4iv,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, RasterPos4sv, const GLshort *v ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, RasterPos4sv,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Rectd, GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2 ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Rectd,x1,y1,x2,y2) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Rectf, GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2 ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Rectf,x1,y1,x2,y2) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Recti, GLint x1, GLint y1, GLint x2, GLint y2 ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Recti,x1,y1,x2,y2) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Rects, GLshort x1, GLshort y1, GLshort x2, GLshort y2 ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Rects,x1,y1,x2,y2) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Rectdv, const GLdouble *v1, const GLdouble *v2 ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Rectdv,v1,v2) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Rectfv, const GLfloat *v1, const GLfloat *v2 ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Rectfv,v1,v2) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Rectiv, const GLint *v1, const GLint *v2 ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Rectiv,v1,v2) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Rectsv, const GLshort *v1, const GLshort *v2 ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Rectsv,v1,v2) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexPointer, GLint size, GLenum type, GLsizei stride, const GLvoid* ptr ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexPointer,size,type,stride,ptr) -DECLARE_GL_FUNCTION_STUB_HEAD(void, NormalPointer, GLenum type, GLsizei stride,const GLvoid* ptr ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, NormalPointer,type,stride,ptr) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ColorPointer, GLint size, GLenum type, GLsizei stride, const GLvoid* ptr ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ColorPointer,size,type,stride,ptr) -DECLARE_GL_FUNCTION_STUB_HEAD(void, IndexPointer, GLenum type, GLsizei stride,const GLvoid* ptr ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, IndexPointer,type,stride,ptr) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexCoordPointer, GLint size, GLenum type, GLsizei stride, const GLvoid* ptr ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexCoordPointer,size,type,stride,ptr) -DECLARE_GL_FUNCTION_STUB_HEAD(void, EdgeFlagPointer, GLsizei stride, const GLvoid* ptr ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, EdgeFlagPointer,stride,ptr) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ArrayElement, GLint i ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ArrayElement,i) -DECLARE_GL_FUNCTION_STUB_HEAD(void, InterleavedArrays, GLenum format, GLsizei stride,const GLvoid* pointer ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, InterleavedArrays,format,stride,pointer) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ShadeModel, GLenum mode ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ShadeModel,mode) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Lightf, GLenum light, GLenum pname, GLfloat param ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Lightf,light,pname,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Lighti, GLenum light, GLenum pname, GLint param ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Lighti,light,pname,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Lightfv, GLenum light, GLenum pname,const GLfloat *params ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Lightfv,light,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Lightiv, GLenum light, GLenum pname,const GLint *params ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Lightiv,light,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetLightfv, GLenum light, GLenum pname, GLfloat *params ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetLightfv,light,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetLightiv, GLenum light, GLenum pname, GLint *params ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetLightiv,light,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, LightModelf, GLenum pname, GLfloat param ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, LightModelf,pname,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, LightModeli, GLenum pname, GLint param ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, LightModeli,pname,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, LightModelfv, GLenum pname, const GLfloat *params ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, LightModelfv,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, LightModeliv, GLenum pname, const GLint *params ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, LightModeliv,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Materialf, GLenum face, GLenum pname, GLfloat param ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Materialf,face,pname,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Materiali, GLenum face, GLenum pname, GLint param ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Materiali,face,pname,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Materialfv, GLenum face, GLenum pname, const GLfloat *params ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Materialfv,face,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Materialiv, GLenum face, GLenum pname, const GLint *params ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Materialiv,face,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetMaterialfv, GLenum face, GLenum pname, GLfloat *params ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetMaterialfv,face,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetMaterialiv, GLenum face, GLenum pname, GLint *params ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetMaterialiv,face,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ColorMaterial, GLenum face, GLenum mode ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ColorMaterial,face,mode) -DECLARE_GL_FUNCTION_STUB_HEAD(void, PixelZoom, GLfloat xfactor, GLfloat yfactor ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, PixelZoom,xfactor,yfactor) -DECLARE_GL_FUNCTION_STUB_HEAD(void, PixelStoref, GLenum pname, GLfloat param ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, PixelStoref,pname,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, PixelTransferf, GLenum pname, GLfloat param ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, PixelTransferf,pname,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, PixelTransferi, GLenum pname, GLint param ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, PixelTransferi,pname,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, PixelMapfv, GLenum map, GLsizei mapsize,const GLfloat *values ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, PixelMapfv,map,mapsize,values) -DECLARE_GL_FUNCTION_STUB_HEAD(void, PixelMapuiv, GLenum map, GLsizei mapsize,const GLuint *values ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, PixelMapuiv,map,mapsize,values) -DECLARE_GL_FUNCTION_STUB_HEAD(void, PixelMapusv, GLenum map, GLsizei mapsize,const GLushort *values ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, PixelMapusv,map,mapsize,values) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetPixelMapfv, GLenum map, GLfloat *values ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetPixelMapfv,map,values) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetPixelMapuiv, GLenum map, GLuint *values ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetPixelMapuiv,map,values) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetPixelMapusv, GLenum map, GLushort *values ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetPixelMapusv,map,values) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Bitmap, GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove,const GLubyte *bitmap ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Bitmap,width,height,xorig,yorig,xmove,ymove,bitmap) -DECLARE_GL_FUNCTION_STUB_HEAD(void, DrawPixels, GLsizei width, GLsizei height, GLenum format, GLenum type,const GLvoid* pixels ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, DrawPixels,width,height,format,type,pixels) -DECLARE_GL_FUNCTION_STUB_HEAD(void, CopyPixels, GLint x, GLint y, GLsizei width, GLsizei height, GLenum type ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, CopyPixels,x,y,width,height,type) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexGend, GLenum coord, GLenum pname, GLdouble param ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexGend,coord,pname,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexGenf, GLenum coord, GLenum pname, GLfloat param ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexGenf,coord,pname,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexGeni, GLenum coord, GLenum pname, GLint param ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexGeni,coord,pname,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexGendv, GLenum coord, GLenum pname, const GLdouble *params ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexGendv,coord,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexGenfv, GLenum coord, GLenum pname, const GLfloat *params ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexGenfv,coord,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexGeniv, GLenum coord, GLenum pname, const GLint *params ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexGeniv,coord,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetTexGendv, GLenum coord, GLenum pname, GLdouble *params ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetTexGendv,coord,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetTexGenfv, GLenum coord, GLenum pname, GLfloat *params ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetTexGenfv,coord,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetTexGeniv, GLenum coord, GLenum pname, GLint *params ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetTexGeniv,coord,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexEnvf, GLenum target, GLenum pname, GLfloat param ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexEnvf,target,pname,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexEnvi, GLenum target, GLenum pname, GLint param ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexEnvi,target,pname,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexEnvfv, GLenum target, GLenum pname, const GLfloat *params ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexEnvfv,target,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexEnviv, GLenum target, GLenum pname, const GLint *params ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexEnviv,target,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetTexEnvfv, GLenum target, GLenum pname, GLfloat *params ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetTexEnvfv,target,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetTexEnviv, GLenum target, GLenum pname, GLint *params ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetTexEnviv,target,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexImage1D, GLenum target, GLint level, GLint internalFormat, GLsizei width, GLint border, GLenum format, GLenum type,const GLvoid* pixels ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexImage1D,target,level,internalFormat,width,border,format,type,pixels) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetTexImage, GLenum target, GLint level, GLenum format, GLenum type, GLvoid* pixels ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetTexImage,target,level,format,type,pixels) -DECLARE_GL_FUNCTION_STUB_HEAD(void, PrioritizeTextures, GLsizei n,const GLuint *textures,const GLclampf *priorities ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, PrioritizeTextures,n,textures,priorities) -DECLARE_GL_FUNCTION_STUB_HEAD(GLboolean, AreTexturesResident, GLsizei n,const GLuint *textures, GLboolean *residences ) DECLARE_GL_FUNCTION_STUB_END(GLboolean, AreTexturesResident,n,textures,residences) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexSubImage1D, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid* pixels ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexSubImage1D,target,level,xoffset,width,format,type,pixels) -DECLARE_GL_FUNCTION_STUB_HEAD(void, CopyTexImage1D, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, CopyTexImage1D,target,level,internalformat,x,y,width,border) -DECLARE_GL_FUNCTION_STUB_HEAD(void, CopyTexSubImage1D, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, CopyTexSubImage1D,target,level,xoffset,x,y,width) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Map1d, GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Map1d,target,u1,u2,stride,order,points) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Map1f, GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Map1f,target,u1,u2,stride,order,points) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Map2d, GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder,const GLdouble *points ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Map2d,target,u1,u2,ustride,uorder,v1,v2,vstride,vorder,points) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Map2f, GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder,const GLfloat *points ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Map2f,target,u1,u2,ustride,uorder,v1,v2,vstride,vorder,points) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetMapdv, GLenum target, GLenum query, GLdouble *v ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetMapdv,target,query,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetMapfv, GLenum target, GLenum query, GLfloat *v ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetMapfv,target,query,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetMapiv, GLenum target, GLenum query, GLint *v ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetMapiv,target,query,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, EvalCoord1d, GLdouble u ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, EvalCoord1d,u) -DECLARE_GL_FUNCTION_STUB_HEAD(void, EvalCoord1f, GLfloat u ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, EvalCoord1f,u) -DECLARE_GL_FUNCTION_STUB_HEAD(void, EvalCoord1dv, const GLdouble *u ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, EvalCoord1dv,u) -DECLARE_GL_FUNCTION_STUB_HEAD(void, EvalCoord1fv, const GLfloat *u ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, EvalCoord1fv,u) -DECLARE_GL_FUNCTION_STUB_HEAD(void, EvalCoord2d, GLdouble u, GLdouble v ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, EvalCoord2d,u,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, EvalCoord2f, GLfloat u, GLfloat v ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, EvalCoord2f,u,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, EvalCoord2dv, const GLdouble *u ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, EvalCoord2dv,u) -DECLARE_GL_FUNCTION_STUB_HEAD(void, EvalCoord2fv, const GLfloat *u ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, EvalCoord2fv,u) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MapGrid1d, GLint un, GLdouble u1, GLdouble u2 ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MapGrid1d,un,u1,u2) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MapGrid1f, GLint un, GLfloat u1, GLfloat u2 ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MapGrid1f,un,u1,u2) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MapGrid2d, GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2 ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MapGrid2d,un,u1,u2,vn,v1,v2) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MapGrid2f, GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2 ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MapGrid2f,un,u1,u2,vn,v1,v2) -DECLARE_GL_FUNCTION_STUB_HEAD(void, EvalPoint1, GLint i ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, EvalPoint1,i) -DECLARE_GL_FUNCTION_STUB_HEAD(void, EvalPoint2, GLint i, GLint j ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, EvalPoint2,i,j) -DECLARE_GL_FUNCTION_STUB_HEAD(void, EvalMesh1, GLenum mode, GLint i1, GLint i2 ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, EvalMesh1,mode,i1,i2) -DECLARE_GL_FUNCTION_STUB_HEAD(void, EvalMesh2, GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2 ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, EvalMesh2,mode,i1,i2,j1,j2) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Fogf, GLenum pname, GLfloat param ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Fogf,pname,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Fogi, GLenum pname, GLint param ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Fogi,pname,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Fogfv, GLenum pname, const GLfloat *params ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Fogfv,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Fogiv, GLenum pname, const GLint *params ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Fogiv,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, FeedbackBuffer, GLsizei size, GLenum type, GLfloat *buffer ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, FeedbackBuffer,size,type,buffer) -DECLARE_GL_FUNCTION_STUB_HEAD(void, PassThrough, GLfloat token ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, PassThrough,token) -DECLARE_GL_FUNCTION_STUB_HEAD(void, SelectBuffer, GLsizei size, GLuint *buffer ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, SelectBuffer,size,buffer) -DECLARE_GL_FUNCTION_STUB_HEAD(void, InitNames) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, InitNames) -DECLARE_GL_FUNCTION_STUB_HEAD(void, LoadName, GLuint name ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, LoadName,name) -DECLARE_GL_FUNCTION_STUB_HEAD(void, PushName, GLuint name ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, PushName,name) -DECLARE_GL_FUNCTION_STUB_HEAD(void, PopName) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, PopName) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ClampColor, GLenum target, GLenum clamp) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ClampColor,target,clamp) -DECLARE_GL_FUNCTION_STUB_HEAD(void, BeginConditionalRender, GLuint id, GLenum mode) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, BeginConditionalRender,id,mode) -DECLARE_GL_FUNCTION_STUB_HEAD(void, EndConditionalRender,void ) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, EndConditionalRender) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribI1i, GLuint index, GLint x) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribI1i,index,x) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribI2i, GLuint index, GLint x, GLint y) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribI2i,index,x,y) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribI3i, GLuint index, GLint x, GLint y, GLint z) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribI3i,index,x,y,z) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribI1ui, GLuint index, GLuint x) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribI1ui,index,x) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribI2ui, GLuint index, GLuint x, GLuint y) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribI2ui,index,x,y) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribI3ui, GLuint index, GLuint x, GLuint y, GLuint z) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribI3ui,index,x,y,z) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribI1iv, GLuint index, const GLint *v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribI1iv,index,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribI2iv, GLuint index, const GLint *v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribI2iv,index,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribI3iv, GLuint index, const GLint *v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribI3iv,index,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribI1uiv, GLuint index, const GLuint *v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribI1uiv,index,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribI2uiv, GLuint index, const GLuint *v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribI2uiv,index,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribI3uiv, GLuint index, const GLuint *v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribI3uiv,index,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribI4bv, GLuint index, const GLbyte *v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribI4bv,index,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribI4sv, GLuint index, const GLshort *v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribI4sv,index,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribI4ubv, GLuint index, const GLubyte *v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribI4ubv,index,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribI4usv, GLuint index, const GLushort *v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribI4usv,index,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, BindFragDataLocation, GLuint program, GLuint color, const GLchar *name) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, BindFragDataLocation,program,color,name) -DECLARE_GL_FUNCTION_STUB_HEAD(void, FramebufferTexture1D, GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, FramebufferTexture1D,target,attachment,textarget,texture,level) -DECLARE_GL_FUNCTION_STUB_HEAD(void, FramebufferTexture3D, GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, FramebufferTexture3D,target,attachment,textarget,texture,level,zoffset) -DECLARE_GL_FUNCTION_STUB_HEAD(void, CompressedTexImage1D, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void* data) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, CompressedTexImage1D,target,level,internalformat,width,border,imageSize,data) -DECLARE_GL_FUNCTION_STUB_HEAD(void, CompressedTexSubImage1D, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void* data) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, CompressedTexSubImage1D,target,level,xoffset,width,format,imageSize,data) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetCompressedTexImage, GLenum target, GLint level, void* img) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetCompressedTexImage,target,level,img) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ClientActiveTexture, GLenum texture) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ClientActiveTexture,texture) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexCoord1d, GLenum target, GLdouble s) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexCoord1d,target,s) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexCoord1dv, GLenum target, const GLdouble* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexCoord1dv,target,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexCoord1f, GLenum target, GLfloat s) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexCoord1f,target,s) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexCoord1fv, GLenum target, const GLfloat* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexCoord1fv,target,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexCoord1i, GLenum target, GLint s) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexCoord1i,target,s) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexCoord1iv, GLenum target, const GLint* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexCoord1iv,target,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexCoord1s, GLenum target, GLshort s) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexCoord1s,target,s) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexCoord1sv, GLenum target, const GLshort* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexCoord1sv,target,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexCoord2d, GLenum target, GLdouble s, GLdouble t) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexCoord2d,target,s,t) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexCoord2dv, GLenum target, const GLdouble* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexCoord2dv,target,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexCoord2f, GLenum target, GLfloat s, GLfloat t) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexCoord2f,target,s,t) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexCoord2fv, GLenum target, const GLfloat* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexCoord2fv,target,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexCoord2i, GLenum target, GLint s, GLint t) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexCoord2i,target,s,t) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexCoord2iv, GLenum target, const GLint* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexCoord2iv,target,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexCoord2s, GLenum target, GLshort s, GLshort t) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexCoord2s,target,s,t) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexCoord2sv, GLenum target, const GLshort* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexCoord2sv,target,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexCoord3d, GLenum target, GLdouble s, GLdouble t, GLdouble r) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexCoord3d,target,s,t,r) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexCoord3dv, GLenum target, const GLdouble* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexCoord3dv,target,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexCoord3f, GLenum target, GLfloat s, GLfloat t, GLfloat r) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexCoord3f,target,s,t,r) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexCoord3fv, GLenum target, const GLfloat* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexCoord3fv,target,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexCoord3i, GLenum target, GLint s, GLint t, GLint r) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexCoord3i,target,s,t,r) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexCoord3iv, GLenum target, const GLint* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexCoord3iv,target,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexCoord3s, GLenum target, GLshort s, GLshort t, GLshort r) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexCoord3s,target,s,t,r) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexCoord3sv, GLenum target, const GLshort* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexCoord3sv,target,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexCoord4d, GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexCoord4d,target,s,t,r,q) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexCoord4dv, GLenum target, const GLdouble* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexCoord4dv,target,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexCoord4f, GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexCoord4f,target,s,t,r,q) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexCoord4fv, GLenum target, const GLfloat* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexCoord4fv,target,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexCoord4i, GLenum target, GLint s, GLint t, GLint r, GLint q) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexCoord4i,target,s,t,r,q) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexCoord4iv, GLenum target, const GLint* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexCoord4iv,target,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexCoord4s, GLenum target, GLshort s, GLshort t, GLshort r, GLshort q) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexCoord4s,target,s,t,r,q) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexCoord4sv, GLenum target, const GLshort* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexCoord4sv,target,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, LoadTransposeMatrixf,const GLfloat* m) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, LoadTransposeMatrixf,m) -DECLARE_GL_FUNCTION_STUB_HEAD(void, LoadTransposeMatrixd,const GLdouble* m) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, LoadTransposeMatrixd,m) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultTransposeMatrixf,const GLfloat* m) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultTransposeMatrixf,m) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultTransposeMatrixd,const GLdouble* m) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultTransposeMatrixd,m) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiDrawArrays, GLenum mode, const GLint* first, const GLsizei* count, GLsizei drawcount) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiDrawArrays,mode,first,count,drawcount) -DECLARE_GL_FUNCTION_HEAD(void, MultiDrawElements, GLenum mode, const GLsizei* count, GLenum type, const void* const*indices, GLsizei drawcount) DECLARE_GL_FUNCTION_END_NO_RETURN(void, MultiDrawElements,mode,count,type,indices,drawcount) -DECLARE_GL_FUNCTION_STUB_HEAD(void, PointParameterf, GLenum pname, GLfloat param) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, PointParameterf,pname,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, PointParameterfv, GLenum pname, const GLfloat* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, PointParameterfv,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, PointParameteri, GLenum pname, GLint param) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, PointParameteri,pname,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, PointParameteriv, GLenum pname, const GLint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, PointParameteriv,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, FogCoordf, GLfloat coord) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, FogCoordf,coord) -DECLARE_GL_FUNCTION_STUB_HEAD(void, FogCoordfv,const GLfloat* coord) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, FogCoordfv,coord) -DECLARE_GL_FUNCTION_STUB_HEAD(void, FogCoordd, GLdouble coord) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, FogCoordd,coord) -DECLARE_GL_FUNCTION_STUB_HEAD(void, FogCoorddv,const GLdouble* coord) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, FogCoorddv,coord) -DECLARE_GL_FUNCTION_STUB_HEAD(void, FogCoordPointer, GLenum type, GLsizei stride, const void* pointer) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, FogCoordPointer,type,stride,pointer) -DECLARE_GL_FUNCTION_STUB_HEAD(void, SecondaryColor3b, GLbyte red, GLbyte green, GLbyte blue) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, SecondaryColor3b,red,green,blue) -DECLARE_GL_FUNCTION_STUB_HEAD(void, SecondaryColor3bv,const GLbyte* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, SecondaryColor3bv,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, SecondaryColor3d, GLdouble red, GLdouble green, GLdouble blue) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, SecondaryColor3d,red,green,blue) -DECLARE_GL_FUNCTION_STUB_HEAD(void, SecondaryColor3dv,const GLdouble* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, SecondaryColor3dv,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, SecondaryColor3f, GLfloat red, GLfloat green, GLfloat blue) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, SecondaryColor3f,red,green,blue) -DECLARE_GL_FUNCTION_STUB_HEAD(void, SecondaryColor3fv,const GLfloat* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, SecondaryColor3fv,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, SecondaryColor3i, GLint red, GLint green, GLint blue) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, SecondaryColor3i,red,green,blue) -DECLARE_GL_FUNCTION_STUB_HEAD(void, SecondaryColor3iv,const GLint* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, SecondaryColor3iv,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, SecondaryColor3s, GLshort red, GLshort green, GLshort blue) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, SecondaryColor3s,red,green,blue) -DECLARE_GL_FUNCTION_STUB_HEAD(void, SecondaryColor3sv,const GLshort* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, SecondaryColor3sv,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, SecondaryColor3ub, GLubyte red, GLubyte green, GLubyte blue) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, SecondaryColor3ub,red,green,blue) -DECLARE_GL_FUNCTION_STUB_HEAD(void, SecondaryColor3ubv,const GLubyte* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, SecondaryColor3ubv,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, SecondaryColor3ui, GLuint red, GLuint green, GLuint blue) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, SecondaryColor3ui,red,green,blue) -DECLARE_GL_FUNCTION_STUB_HEAD(void, SecondaryColor3uiv,const GLuint* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, SecondaryColor3uiv,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, SecondaryColor3us, GLushort red, GLushort green, GLushort blue) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, SecondaryColor3us,red,green,blue) -DECLARE_GL_FUNCTION_STUB_HEAD(void, SecondaryColor3usv,const GLushort* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, SecondaryColor3usv,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, SecondaryColorPointer, GLint size, GLenum type, GLsizei stride, const void* pointer) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, SecondaryColorPointer,size,type,stride,pointer) -DECLARE_GL_FUNCTION_STUB_HEAD(void, WindowPos2d, GLdouble x, GLdouble y) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, WindowPos2d,x,y) -DECLARE_GL_FUNCTION_STUB_HEAD(void, WindowPos2dv,const GLdouble* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, WindowPos2dv,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, WindowPos2f, GLfloat x, GLfloat y) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, WindowPos2f,x,y) -DECLARE_GL_FUNCTION_STUB_HEAD(void, WindowPos2fv,const GLfloat* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, WindowPos2fv,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, WindowPos2i, GLint x, GLint y) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, WindowPos2i,x,y) -DECLARE_GL_FUNCTION_STUB_HEAD(void, WindowPos2iv,const GLint* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, WindowPos2iv,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, WindowPos2s, GLshort x, GLshort y) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, WindowPos2s,x,y) -DECLARE_GL_FUNCTION_STUB_HEAD(void, WindowPos2sv,const GLshort* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, WindowPos2sv,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, WindowPos3d, GLdouble x, GLdouble y, GLdouble z) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, WindowPos3d,x,y,z) -DECLARE_GL_FUNCTION_STUB_HEAD(void, WindowPos3dv,const GLdouble* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, WindowPos3dv,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, WindowPos3f, GLfloat x, GLfloat y, GLfloat z) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, WindowPos3f,x,y,z) -DECLARE_GL_FUNCTION_STUB_HEAD(void, WindowPos3fv,const GLfloat* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, WindowPos3fv,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, WindowPos3i, GLint x, GLint y, GLint z) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, WindowPos3i,x,y,z) -DECLARE_GL_FUNCTION_STUB_HEAD(void, WindowPos3iv,const GLint* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, WindowPos3iv,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, WindowPos3s, GLshort x, GLshort y, GLshort z) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, WindowPos3s,x,y,z) -DECLARE_GL_FUNCTION_STUB_HEAD(void, WindowPos3sv,const GLshort* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, WindowPos3sv,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetQueryObjectiv, GLuint id, GLenum pname, GLint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetQueryObjectiv,id,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetBufferSubData, GLenum target, GLintptr offset, GLsizeiptr size, void* data) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetBufferSubData,target,offset,size,data) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetVertexAttribdv, GLuint index, GLenum pname, GLdouble* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetVertexAttribdv,index,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttrib1d, GLuint index, GLdouble x) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttrib1d,index,x) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttrib1dv, GLuint index, const GLdouble* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttrib1dv,index,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttrib1s, GLuint index, GLshort x) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttrib1s,index,x) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttrib1sv, GLuint index, const GLshort* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttrib1sv,index,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttrib2d, GLuint index, GLdouble x, GLdouble y) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttrib2d,index,x,y) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttrib2dv, GLuint index, const GLdouble* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttrib2dv,index,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttrib2s, GLuint index, GLshort x, GLshort y) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttrib2s,index,x,y) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttrib2sv, GLuint index, const GLshort* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttrib2sv,index,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttrib3d, GLuint index, GLdouble x, GLdouble y, GLdouble z) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttrib3d,index,x,y,z) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttrib3dv, GLuint index, const GLdouble* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttrib3dv,index,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttrib3s, GLuint index, GLshort x, GLshort y, GLshort z) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttrib3s,index,x,y,z) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttrib3sv, GLuint index, const GLshort* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttrib3sv,index,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttrib4Nbv, GLuint index, const GLbyte* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttrib4Nbv,index,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttrib4Niv, GLuint index, const GLint* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttrib4Niv,index,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttrib4Nsv, GLuint index, const GLshort* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttrib4Nsv,index,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttrib4Nub, GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttrib4Nub,index,x,y,z,w) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttrib4Nubv, GLuint index, const GLubyte* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttrib4Nubv,index,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttrib4Nuiv, GLuint index, const GLuint* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttrib4Nuiv,index,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttrib4Nusv, GLuint index, const GLushort* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttrib4Nusv,index,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttrib4bv, GLuint index, const GLbyte* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttrib4bv,index,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttrib4d, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttrib4d,index,x,y,z,w) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttrib4dv, GLuint index, const GLdouble* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttrib4dv,index,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttrib4iv, GLuint index, const GLint* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttrib4iv,index,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttrib4s, GLuint index, GLshort x, GLshort y, GLshort z, GLshort w) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttrib4s,index,x,y,z,w) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttrib4sv, GLuint index, const GLshort* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttrib4sv,index,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttrib4ubv, GLuint index, const GLubyte* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttrib4ubv,index,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttrib4uiv, GLuint index, const GLuint* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttrib4uiv,index,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttrib4usv, GLuint index, const GLushort* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttrib4usv,index,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, PrimitiveRestartIndex, GLuint index) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, PrimitiveRestartIndex,index) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetActiveUniformName, GLuint program, GLuint uniformIndex, GLsizei bufSize, GLsizei* length, GLchar* uniformName) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetActiveUniformName,program,uniformIndex,bufSize,length,uniformName) -DECLARE_GL_FUNCTION_HEAD(void, MultiDrawElementsBaseVertex, GLenum mode, const GLsizei* count, GLenum type, const void* const*indices, GLsizei drawcount, const GLint* basevertex) DECLARE_GL_FUNCTION_END_NO_RETURN(void, MultiDrawElementsBaseVertex,mode,count,type,indices,drawcount,basevertex) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProvokingVertex, GLenum mode) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProvokingVertex,mode) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexImage2DMultisample, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexImage2DMultisample,target,samples,internalformat,width,height,fixedsamplelocations) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexImage3DMultisample, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexImage3DMultisample,target,samples,internalformat,width,height,depth,fixedsamplelocations) -DECLARE_GL_FUNCTION_STUB_HEAD(void, BindFragDataLocationIndexed, GLuint program, GLuint colorNumber, GLuint index, const GLchar* name) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, BindFragDataLocationIndexed,program,colorNumber,index,name) -DECLARE_GL_FUNCTION_STUB_HEAD(GLint, GetFragDataIndex, GLuint program, const GLchar* name) DECLARE_GL_FUNCTION_STUB_END(GLint, GetFragDataIndex,program,name) -DECLARE_GL_FUNCTION_STUB_HEAD(void, QueryCounter, GLuint id, GLenum target) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, QueryCounter,id,target) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetQueryObjecti64v, GLuint id, GLenum pname, GLint64* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetQueryObjecti64v,id,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetQueryObjectui64v, GLuint id, GLenum pname, GLuint64* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetQueryObjectui64v,id,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribP1ui, GLuint index, GLenum type, GLboolean normalized, GLuint value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribP1ui,index,type,normalized,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribP1uiv, GLuint index, GLenum type, GLboolean normalized, const GLuint* value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribP1uiv,index,type,normalized,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribP2ui, GLuint index, GLenum type, GLboolean normalized, GLuint value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribP2ui,index,type,normalized,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribP2uiv, GLuint index, GLenum type, GLboolean normalized, const GLuint* value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribP2uiv,index,type,normalized,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribP3ui, GLuint index, GLenum type, GLboolean normalized, GLuint value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribP3ui,index,type,normalized,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribP3uiv, GLuint index, GLenum type, GLboolean normalized, const GLuint* value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribP3uiv,index,type,normalized,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribP4ui, GLuint index, GLenum type, GLboolean normalized, GLuint value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribP4ui,index,type,normalized,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribP4uiv, GLuint index, GLenum type, GLboolean normalized, const GLuint* value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribP4uiv,index,type,normalized,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexP2ui, GLenum type, GLuint value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexP2ui,type,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexP2uiv, GLenum type, const GLuint* value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexP2uiv,type,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexP3ui, GLenum type, GLuint value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexP3ui,type,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexP3uiv, GLenum type, const GLuint* value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexP3uiv,type,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexP4ui, GLenum type, GLuint value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexP4ui,type,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexP4uiv, GLenum type, const GLuint* value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexP4uiv,type,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexCoordP1ui, GLenum type, GLuint coords) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexCoordP1ui,type,coords) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexCoordP1uiv, GLenum type, const GLuint* coords) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexCoordP1uiv,type,coords) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexCoordP2ui, GLenum type, GLuint coords) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexCoordP2ui,type,coords) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexCoordP2uiv, GLenum type, const GLuint* coords) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexCoordP2uiv,type,coords) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexCoordP3ui, GLenum type, GLuint coords) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexCoordP3ui,type,coords) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexCoordP3uiv, GLenum type, const GLuint* coords) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexCoordP3uiv,type,coords) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexCoordP4ui, GLenum type, GLuint coords) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexCoordP4ui,type,coords) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexCoordP4uiv, GLenum type, const GLuint* coords) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexCoordP4uiv,type,coords) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexCoordP1ui, GLenum texture, GLenum type, GLuint coords) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexCoordP1ui,texture,type,coords) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexCoordP1uiv, GLenum texture, GLenum type, const GLuint* coords) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexCoordP1uiv,texture,type,coords) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexCoordP2ui, GLenum texture, GLenum type, GLuint coords) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexCoordP2ui,texture,type,coords) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexCoordP2uiv, GLenum texture, GLenum type, const GLuint* coords) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexCoordP2uiv,texture,type,coords) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexCoordP3ui, GLenum texture, GLenum type, GLuint coords) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexCoordP3ui,texture,type,coords) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexCoordP3uiv, GLenum texture, GLenum type, const GLuint* coords) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexCoordP3uiv,texture,type,coords) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexCoordP4ui, GLenum texture, GLenum type, GLuint coords) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexCoordP4ui,texture,type,coords) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexCoordP4uiv, GLenum texture, GLenum type, const GLuint* coords) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexCoordP4uiv,texture,type,coords) -DECLARE_GL_FUNCTION_STUB_HEAD(void, NormalP3ui, GLenum type, GLuint coords) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, NormalP3ui,type,coords) -DECLARE_GL_FUNCTION_STUB_HEAD(void, NormalP3uiv, GLenum type, const GLuint* coords) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, NormalP3uiv,type,coords) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ColorP3ui, GLenum type, GLuint color) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ColorP3ui,type,color) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ColorP3uiv, GLenum type, const GLuint* color) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ColorP3uiv,type,color) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ColorP4ui, GLenum type, GLuint color) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ColorP4ui,type,color) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ColorP4uiv, GLenum type, const GLuint* color) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ColorP4uiv,type,color) -DECLARE_GL_FUNCTION_STUB_HEAD(void, SecondaryColorP3ui, GLenum type, GLuint color) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, SecondaryColorP3ui,type,color) -DECLARE_GL_FUNCTION_STUB_HEAD(void, SecondaryColorP3uiv, GLenum type, const GLuint* color) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, SecondaryColorP3uiv,type,color) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Uniform1d, GLint location, GLdouble x) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Uniform1d,location,x) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Uniform2d, GLint location, GLdouble x, GLdouble y) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Uniform2d,location,x,y) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Uniform3d, GLint location, GLdouble x, GLdouble y, GLdouble z) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Uniform3d,location,x,y,z) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Uniform4d, GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Uniform4d,location,x,y,z,w) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Uniform1dv, GLint location, GLsizei count, const GLdouble* value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Uniform1dv,location,count,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Uniform2dv, GLint location, GLsizei count, const GLdouble* value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Uniform2dv,location,count,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Uniform3dv, GLint location, GLsizei count, const GLdouble* value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Uniform3dv,location,count,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Uniform4dv, GLint location, GLsizei count, const GLdouble* value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Uniform4dv,location,count,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, UniformMatrix2dv, GLint location, GLsizei count, GLboolean transpose, const GLdouble* value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, UniformMatrix2dv,location,count,transpose,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, UniformMatrix3dv, GLint location, GLsizei count, GLboolean transpose, const GLdouble* value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, UniformMatrix3dv,location,count,transpose,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, UniformMatrix4dv, GLint location, GLsizei count, GLboolean transpose, const GLdouble* value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, UniformMatrix4dv,location,count,transpose,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, UniformMatrix2x3dv, GLint location, GLsizei count, GLboolean transpose, const GLdouble* value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, UniformMatrix2x3dv,location,count,transpose,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, UniformMatrix2x4dv, GLint location, GLsizei count, GLboolean transpose, const GLdouble* value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, UniformMatrix2x4dv,location,count,transpose,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, UniformMatrix3x2dv, GLint location, GLsizei count, GLboolean transpose, const GLdouble* value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, UniformMatrix3x2dv,location,count,transpose,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, UniformMatrix3x4dv, GLint location, GLsizei count, GLboolean transpose, const GLdouble* value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, UniformMatrix3x4dv,location,count,transpose,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, UniformMatrix4x2dv, GLint location, GLsizei count, GLboolean transpose, const GLdouble* value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, UniformMatrix4x2dv,location,count,transpose,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, UniformMatrix4x3dv, GLint location, GLsizei count, GLboolean transpose, const GLdouble* value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, UniformMatrix4x3dv,location,count,transpose,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetUniformdv, GLuint program, GLint location, GLdouble* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetUniformdv,program,location,params) -DECLARE_GL_FUNCTION_STUB_HEAD(GLint, GetSubroutineUniformLocation, GLuint program, GLenum shadertype, const GLchar* name) DECLARE_GL_FUNCTION_STUB_END(GLint, GetSubroutineUniformLocation,program,shadertype,name) -DECLARE_GL_FUNCTION_STUB_HEAD(GLuint, GetSubroutineIndex, GLuint program, GLenum shadertype, const GLchar* name) DECLARE_GL_FUNCTION_STUB_END(GLuint, GetSubroutineIndex,program,shadertype,name) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetActiveSubroutineUniformiv, GLuint program, GLenum shadertype, GLuint index, GLenum pname, GLint* values) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetActiveSubroutineUniformiv,program,shadertype,index,pname,values) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetActiveSubroutineUniformName, GLuint program, GLenum shadertype, GLuint index, GLsizei bufSize, GLsizei* length, GLchar* name) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetActiveSubroutineUniformName,program,shadertype,index,bufSize,length,name) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetActiveSubroutineName, GLuint program, GLenum shadertype, GLuint index, GLsizei bufSize, GLsizei* length, GLchar* name) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetActiveSubroutineName,program,shadertype,index,bufSize,length,name) -DECLARE_GL_FUNCTION_STUB_HEAD(void, UniformSubroutinesuiv, GLenum shadertype, GLsizei count, const GLuint* indices) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, UniformSubroutinesuiv,shadertype,count,indices) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetUniformSubroutineuiv, GLenum shadertype, GLint location, GLuint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetUniformSubroutineuiv,shadertype,location,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetProgramStageiv, GLuint program, GLenum shadertype, GLenum pname, GLint* values) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetProgramStageiv,program,shadertype,pname,values) -DECLARE_GL_FUNCTION_STUB_HEAD(void, PatchParameterfv, GLenum pname, const GLfloat* values) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, PatchParameterfv,pname,values) -DECLARE_GL_FUNCTION_STUB_HEAD(void, DrawTransformFeedback, GLenum mode, GLuint id) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, DrawTransformFeedback,mode,id) -DECLARE_GL_FUNCTION_STUB_HEAD(void, DrawTransformFeedbackStream, GLenum mode, GLuint id, GLuint stream) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, DrawTransformFeedbackStream,mode,id,stream) -DECLARE_GL_FUNCTION_STUB_HEAD(void, BeginQueryIndexed, GLenum target, GLuint index, GLuint id) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, BeginQueryIndexed,target,index,id) -DECLARE_GL_FUNCTION_STUB_HEAD(void, EndQueryIndexed, GLenum target, GLuint index) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, EndQueryIndexed,target,index) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetQueryIndexediv, GLenum target, GLuint index, GLenum pname, GLint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetQueryIndexediv,target,index,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniform1d, GLuint program, GLint location, GLdouble v0) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniform1d,program,location,v0) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniform1dv, GLuint program, GLint location, GLsizei count, const GLdouble* value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniform1dv,program,location,count,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniform2d, GLuint program, GLint location, GLdouble v0, GLdouble v1) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniform2d,program,location,v0,v1) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniform2dv, GLuint program, GLint location, GLsizei count, const GLdouble* value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniform2dv,program,location,count,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniform3d, GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniform3d,program,location,v0,v1,v2) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniform3dv, GLuint program, GLint location, GLsizei count, const GLdouble* value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniform3dv,program,location,count,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniform4d, GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2, GLdouble v3) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniform4d,program,location,v0,v1,v2,v3) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniform4dv, GLuint program, GLint location, GLsizei count, const GLdouble* value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniform4dv,program,location,count,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniformMatrix2dv, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble* value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniformMatrix2dv,program,location,count,transpose,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniformMatrix3dv, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble* value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniformMatrix3dv,program,location,count,transpose,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniformMatrix4dv, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble* value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniformMatrix4dv,program,location,count,transpose,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniformMatrix2x3dv, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble* value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniformMatrix2x3dv,program,location,count,transpose,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniformMatrix3x2dv, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble* value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniformMatrix3x2dv,program,location,count,transpose,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniformMatrix2x4dv, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble* value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniformMatrix2x4dv,program,location,count,transpose,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniformMatrix4x2dv, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble* value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniformMatrix4x2dv,program,location,count,transpose,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniformMatrix3x4dv, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble* value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniformMatrix3x4dv,program,location,count,transpose,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniformMatrix4x3dv, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble* value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniformMatrix4x3dv,program,location,count,transpose,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribL1d, GLuint index, GLdouble x) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribL1d,index,x) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribL2d, GLuint index, GLdouble x, GLdouble y) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribL2d,index,x,y) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribL3d, GLuint index, GLdouble x, GLdouble y, GLdouble z) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribL3d,index,x,y,z) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribL4d, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribL4d,index,x,y,z,w) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribL1dv, GLuint index, const GLdouble* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribL1dv,index,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribL2dv, GLuint index, const GLdouble* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribL2dv,index,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribL3dv, GLuint index, const GLdouble* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribL3dv,index,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribL4dv, GLuint index, const GLdouble* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribL4dv,index,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribLPointer, GLuint index, GLint size, GLenum type, GLsizei stride, const void* pointer) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribLPointer,index,size,type,stride,pointer) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetVertexAttribLdv, GLuint index, GLenum pname, GLdouble* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetVertexAttribLdv,index,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ViewportArrayv, GLuint first, GLsizei count, const GLfloat* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ViewportArrayv,first,count,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ViewportIndexedf, GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ViewportIndexedf,index,x,y,w,h) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ViewportIndexedfv, GLuint index, const GLfloat* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ViewportIndexedfv,index,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ScissorArrayv, GLuint first, GLsizei count, const GLint* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ScissorArrayv,first,count,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ScissorIndexed, GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ScissorIndexed,index,left,bottom,width,height) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ScissorIndexedv, GLuint index, const GLint* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ScissorIndexedv,index,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, DepthRangeArrayv, GLuint first, GLsizei count, const GLdouble* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, DepthRangeArrayv,first,count,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, DepthRangeIndexed, GLuint index, GLdouble n, GLdouble f) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, DepthRangeIndexed,index,n,f) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetFloati_v, GLenum target, GLuint index, GLfloat* data) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetFloati_v,target,index,data) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetDoublei_v, GLenum target, GLuint index, GLdouble* data) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetDoublei_v,target,index,data) -DECLARE_GL_FUNCTION_STUB_HEAD(void, DrawArraysInstancedBaseInstance, GLenum mode, GLint first, GLsizei count, GLsizei instancecount, GLuint baseinstance) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, DrawArraysInstancedBaseInstance,mode,first,count,instancecount,baseinstance) -DECLARE_GL_FUNCTION_STUB_HEAD(void, DrawElementsInstancedBaseInstance, GLenum mode, GLsizei count, GLenum type, const void* indices, GLsizei instancecount, GLuint baseinstance) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, DrawElementsInstancedBaseInstance,mode,count,type,indices,instancecount,baseinstance) -DECLARE_GL_FUNCTION_STUB_HEAD(void, DrawElementsInstancedBaseVertexBaseInstance, GLenum mode, GLsizei count, GLenum type, const void* indices, GLsizei instancecount, GLint basevertex, GLuint baseinstance) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, DrawElementsInstancedBaseVertexBaseInstance,mode,count,type,indices,instancecount,basevertex,baseinstance) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetActiveAtomicCounterBufferiv, GLuint program, GLuint bufferIndex, GLenum pname, GLint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetActiveAtomicCounterBufferiv,program,bufferIndex,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, DrawTransformFeedbackInstanced, GLenum mode, GLuint id, GLsizei instancecount) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, DrawTransformFeedbackInstanced,mode,id,instancecount) -DECLARE_GL_FUNCTION_STUB_HEAD(void, DrawTransformFeedbackStreamInstanced, GLenum mode, GLuint id, GLuint stream, GLsizei instancecount) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, DrawTransformFeedbackStreamInstanced,mode,id,stream,instancecount) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ClearBufferData, GLenum target, GLenum internalformat, GLenum format, GLenum type, const void* data) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ClearBufferData,target,internalformat,format,type,data) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ClearBufferSubData, GLenum target, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const void* data) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ClearBufferSubData,target,internalformat,offset,size,format,type,data) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetInternalformati64v, GLenum target, GLenum internalformat, GLenum pname, GLsizei count, GLint64* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetInternalformati64v,target,internalformat,pname,count,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, InvalidateTexSubImage, GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, InvalidateTexSubImage,texture,level,xoffset,yoffset,zoffset,width,height,depth) -DECLARE_GL_FUNCTION_STUB_HEAD(void, InvalidateTexImage, GLuint texture, GLint level) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, InvalidateTexImage,texture,level) -DECLARE_GL_FUNCTION_STUB_HEAD(void, InvalidateBufferSubData, GLuint buffer, GLintptr offset, GLsizeiptr length) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, InvalidateBufferSubData,buffer,offset,length) -DECLARE_GL_FUNCTION_STUB_HEAD(void, InvalidateBufferData, GLuint buffer) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, InvalidateBufferData,buffer) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiDrawArraysIndirect, GLenum mode, const void* indirect, GLsizei drawcount, GLsizei stride) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiDrawArraysIndirect,mode,indirect,drawcount,stride) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiDrawElementsIndirect, GLenum mode, GLenum type, const void* indirect, GLsizei drawcount, GLsizei stride) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiDrawElementsIndirect,mode,type,indirect,drawcount,stride) -DECLARE_GL_FUNCTION_STUB_HEAD(GLint, GetProgramResourceLocationIndex, GLuint program, GLenum programInterface, const GLchar* name) DECLARE_GL_FUNCTION_STUB_END(GLint, GetProgramResourceLocationIndex,program,programInterface,name) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ShaderStorageBlockBinding, GLuint program, GLuint storageBlockIndex, GLuint storageBlockBinding) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ShaderStorageBlockBinding,program,storageBlockIndex,storageBlockBinding) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TextureView, GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TextureView,texture,target,origtexture,internalformat,minlevel,numlevels,minlayer,numlayers) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribLFormat, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribLFormat,attribindex,size,type,relativeoffset) -DECLARE_GL_FUNCTION_STUB_HEAD(void, BufferStorage, GLenum target, GLsizeiptr size, const void* data, GLbitfield flags) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, BufferStorage,target,size,data,flags) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ClearTexImage, GLuint texture, GLint level, GLenum format, GLenum type, const void* data) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ClearTexImage,texture,level,format,type,data) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ClearTexSubImage, GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void* data) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ClearTexSubImage,texture,level,xoffset,yoffset,zoffset,width,height,depth,format,type,data) -DECLARE_GL_FUNCTION_STUB_HEAD(void, BindBuffersBase, GLenum target, GLuint first, GLsizei count, const GLuint* buffers) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, BindBuffersBase,target,first,count,buffers) -DECLARE_GL_FUNCTION_STUB_HEAD(void, BindBuffersRange, GLenum target, GLuint first, GLsizei count, const GLuint* buffers, const GLintptr* offsets, const GLsizeiptr* sizes) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, BindBuffersRange,target,first,count,buffers,offsets,sizes) -DECLARE_GL_FUNCTION_STUB_HEAD(void, BindTextures, GLuint first, GLsizei count, const GLuint* textures) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, BindTextures,first,count,textures) -DECLARE_GL_FUNCTION_STUB_HEAD(void, BindSamplers, GLuint first, GLsizei count, const GLuint* samplers) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, BindSamplers,first,count,samplers) -DECLARE_GL_FUNCTION_STUB_HEAD(void, BindImageTextures, GLuint first, GLsizei count, const GLuint* textures) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, BindImageTextures,first,count,textures) -DECLARE_GL_FUNCTION_STUB_HEAD(void, BindVertexBuffers, GLuint first, GLsizei count, const GLuint* buffers, const GLintptr* offsets, const GLsizei* strides) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, BindVertexBuffers,first,count,buffers,offsets,strides) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ClipControl, GLenum origin, GLenum depth) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ClipControl,origin,depth) -DECLARE_GL_FUNCTION_STUB_HEAD(void, CreateTransformFeedbacks, GLsizei n, GLuint* ids) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, CreateTransformFeedbacks,n,ids) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TransformFeedbackBufferBase, GLuint xfb, GLuint index, GLuint buffer) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TransformFeedbackBufferBase,xfb,index,buffer) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TransformFeedbackBufferRange, GLuint xfb, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TransformFeedbackBufferRange,xfb,index,buffer,offset,size) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetTransformFeedbackiv, GLuint xfb, GLenum pname, GLint* param) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetTransformFeedbackiv,xfb,pname,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetTransformFeedbacki_v, GLuint xfb, GLenum pname, GLuint index, GLint* param) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetTransformFeedbacki_v,xfb,pname,index,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetTransformFeedbacki64_v, GLuint xfb, GLenum pname, GLuint index, GLint64* param) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetTransformFeedbacki64_v,xfb,pname,index,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, CreateBuffers, GLsizei n, GLuint* buffers) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, CreateBuffers,n,buffers) -DECLARE_GL_FUNCTION_STUB_HEAD(void, NamedBufferStorage, GLuint buffer, GLsizeiptr size, const void* data, GLbitfield flags) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, NamedBufferStorage,buffer,size,data,flags) -DECLARE_GL_FUNCTION_STUB_HEAD(void, NamedBufferData, GLuint buffer, GLsizeiptr size, const void* data, GLenum usage) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, NamedBufferData,buffer,size,data,usage) -DECLARE_GL_FUNCTION_STUB_HEAD(void, NamedBufferSubData, GLuint buffer, GLintptr offset, GLsizeiptr size, const void* data) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, NamedBufferSubData,buffer,offset,size,data) -DECLARE_GL_FUNCTION_STUB_HEAD(void, CopyNamedBufferSubData, GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, CopyNamedBufferSubData,readBuffer,writeBuffer,readOffset,writeOffset,size) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ClearNamedBufferData, GLuint buffer, GLenum internalformat, GLenum format, GLenum type, const void* data) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ClearNamedBufferData,buffer,internalformat,format,type,data) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ClearNamedBufferSubData, GLuint buffer, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const void* data) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ClearNamedBufferSubData,buffer,internalformat,offset,size,format,type,data) -DECLARE_GL_FUNCTION_STUB_HEAD(GLboolean, UnmapNamedBuffer, GLuint buffer) DECLARE_GL_FUNCTION_STUB_END(GLboolean, UnmapNamedBuffer,buffer) -DECLARE_GL_FUNCTION_STUB_HEAD(void, FlushMappedNamedBufferRange, GLuint buffer, GLintptr offset, GLsizeiptr length) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, FlushMappedNamedBufferRange,buffer,offset,length) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetNamedBufferParameteriv, GLuint buffer, GLenum pname, GLint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetNamedBufferParameteriv,buffer,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetNamedBufferParameteri64v, GLuint buffer, GLenum pname, GLint64* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetNamedBufferParameteri64v,buffer,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetNamedBufferPointerv, GLuint buffer, GLenum pname, void* *params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetNamedBufferPointerv,buffer,pname,*params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetNamedBufferSubData, GLuint buffer, GLintptr offset, GLsizeiptr size, void* data) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetNamedBufferSubData,buffer,offset,size,data) -DECLARE_GL_FUNCTION_STUB_HEAD(void, CreateFramebuffers, GLsizei n, GLuint* framebuffers) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, CreateFramebuffers,n,framebuffers) -DECLARE_GL_FUNCTION_STUB_HEAD(void, NamedFramebufferRenderbuffer, GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, NamedFramebufferRenderbuffer,framebuffer,attachment,renderbuffertarget,renderbuffer) -DECLARE_GL_FUNCTION_STUB_HEAD(void, NamedFramebufferParameteri, GLuint framebuffer, GLenum pname, GLint param) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, NamedFramebufferParameteri,framebuffer,pname,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, NamedFramebufferTexture, GLuint framebuffer, GLenum attachment, GLuint texture, GLint level) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, NamedFramebufferTexture,framebuffer,attachment,texture,level) -DECLARE_GL_FUNCTION_STUB_HEAD(void, NamedFramebufferTextureLayer, GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLint layer) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, NamedFramebufferTextureLayer,framebuffer,attachment,texture,level,layer) -DECLARE_GL_FUNCTION_STUB_HEAD(void, NamedFramebufferDrawBuffer, GLuint framebuffer, GLenum buf) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, NamedFramebufferDrawBuffer,framebuffer,buf) -DECLARE_GL_FUNCTION_STUB_HEAD(void, NamedFramebufferDrawBuffers, GLuint framebuffer, GLsizei n, const GLenum* bufs) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, NamedFramebufferDrawBuffers,framebuffer,n,bufs) -DECLARE_GL_FUNCTION_STUB_HEAD(void, NamedFramebufferReadBuffer, GLuint framebuffer, GLenum src) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, NamedFramebufferReadBuffer,framebuffer,src) -DECLARE_GL_FUNCTION_STUB_HEAD(void, InvalidateNamedFramebufferData, GLuint framebuffer, GLsizei numAttachments, const GLenum* attachments) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, InvalidateNamedFramebufferData,framebuffer,numAttachments,attachments) -DECLARE_GL_FUNCTION_STUB_HEAD(void, InvalidateNamedFramebufferSubData, GLuint framebuffer, GLsizei numAttachments, const GLenum* attachments, GLint x, GLint y, GLsizei width, GLsizei height) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, InvalidateNamedFramebufferSubData,framebuffer,numAttachments,attachments,x,y,width,height) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ClearNamedFramebufferiv, GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLint* value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ClearNamedFramebufferiv,framebuffer,buffer,drawbuffer,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ClearNamedFramebufferuiv, GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLuint* value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ClearNamedFramebufferuiv,framebuffer,buffer,drawbuffer,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ClearNamedFramebufferfv, GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLfloat* value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ClearNamedFramebufferfv,framebuffer,buffer,drawbuffer,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ClearNamedFramebufferfi, GLuint framebuffer, GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ClearNamedFramebufferfi,framebuffer,buffer,drawbuffer,depth,stencil) -DECLARE_GL_FUNCTION_STUB_HEAD(void, BlitNamedFramebuffer, GLuint readFramebuffer, GLuint drawFramebuffer, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, BlitNamedFramebuffer,readFramebuffer,drawFramebuffer,srcX0,srcY0,srcX1,srcY1,dstX0,dstY0,dstX1,dstY1,mask,filter) -DECLARE_GL_FUNCTION_STUB_HEAD(GLenum, CheckNamedFramebufferStatus, GLuint framebuffer, GLenum target) DECLARE_GL_FUNCTION_STUB_END(GLenum, CheckNamedFramebufferStatus,framebuffer,target) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetNamedFramebufferParameteriv, GLuint framebuffer, GLenum pname, GLint* param) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetNamedFramebufferParameteriv,framebuffer,pname,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetNamedFramebufferAttachmentParameteriv, GLuint framebuffer, GLenum attachment, GLenum pname, GLint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetNamedFramebufferAttachmentParameteriv,framebuffer,attachment,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, CreateRenderbuffers, GLsizei n, GLuint* renderbuffers) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, CreateRenderbuffers,n,renderbuffers) -DECLARE_GL_FUNCTION_STUB_HEAD(void, NamedRenderbufferStorage, GLuint renderbuffer, GLenum internalformat, GLsizei width, GLsizei height) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, NamedRenderbufferStorage,renderbuffer,internalformat,width,height) -DECLARE_GL_FUNCTION_STUB_HEAD(void, NamedRenderbufferStorageMultisample, GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, NamedRenderbufferStorageMultisample,renderbuffer,samples,internalformat,width,height) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetNamedRenderbufferParameteriv, GLuint renderbuffer, GLenum pname, GLint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetNamedRenderbufferParameteriv,renderbuffer,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, CreateTextures, GLenum target, GLsizei n, GLuint* textures) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, CreateTextures,target,n,textures) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TextureBuffer, GLuint texture, GLenum internalformat, GLuint buffer) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TextureBuffer,texture,internalformat,buffer) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TextureBufferRange, GLuint texture, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TextureBufferRange,texture,internalformat,buffer,offset,size) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TextureStorage1D, GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TextureStorage1D,texture,levels,internalformat,width) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TextureStorage2D, GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TextureStorage2D,texture,levels,internalformat,width,height) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TextureStorage3D, GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TextureStorage3D,texture,levels,internalformat,width,height,depth) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TextureStorage2DMultisample, GLuint texture, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TextureStorage2DMultisample,texture,samples,internalformat,width,height,fixedsamplelocations) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TextureStorage3DMultisample, GLuint texture, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TextureStorage3DMultisample,texture,samples,internalformat,width,height,depth,fixedsamplelocations) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TextureSubImage1D, GLuint texture, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void* pixels) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TextureSubImage1D,texture,level,xoffset,width,format,type,pixels) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TextureSubImage2D, GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void* pixels) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TextureSubImage2D,texture,level,xoffset,yoffset,width,height,format,type,pixels) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TextureSubImage3D, GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void* pixels) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TextureSubImage3D,texture,level,xoffset,yoffset,zoffset,width,height,depth,format,type,pixels) -DECLARE_GL_FUNCTION_STUB_HEAD(void, CompressedTextureSubImage1D, GLuint texture, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void* data) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, CompressedTextureSubImage1D,texture,level,xoffset,width,format,imageSize,data) -DECLARE_GL_FUNCTION_STUB_HEAD(void, CompressedTextureSubImage2D, GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void* data) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, CompressedTextureSubImage2D,texture,level,xoffset,yoffset,width,height,format,imageSize,data) -DECLARE_GL_FUNCTION_STUB_HEAD(void, CompressedTextureSubImage3D, GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void* data) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, CompressedTextureSubImage3D,texture,level,xoffset,yoffset,zoffset,width,height,depth,format,imageSize,data) -DECLARE_GL_FUNCTION_STUB_HEAD(void, CopyTextureSubImage1D, GLuint texture, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, CopyTextureSubImage1D,texture,level,xoffset,x,y,width) -DECLARE_GL_FUNCTION_STUB_HEAD(void, CopyTextureSubImage2D, GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, CopyTextureSubImage2D,texture,level,xoffset,yoffset,x,y,width,height) -DECLARE_GL_FUNCTION_STUB_HEAD(void, CopyTextureSubImage3D, GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, CopyTextureSubImage3D,texture,level,xoffset,yoffset,zoffset,x,y,width,height) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TextureParameterf, GLuint texture, GLenum pname, GLfloat param) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TextureParameterf,texture,pname,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TextureParameterfv, GLuint texture, GLenum pname, const GLfloat* param) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TextureParameterfv,texture,pname,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TextureParameteri, GLuint texture, GLenum pname, GLint param) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TextureParameteri,texture,pname,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TextureParameterIiv, GLuint texture, GLenum pname, const GLint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TextureParameterIiv,texture,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TextureParameterIuiv, GLuint texture, GLenum pname, const GLuint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TextureParameterIuiv,texture,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TextureParameteriv, GLuint texture, GLenum pname, const GLint* param) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TextureParameteriv,texture,pname,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GenerateTextureMipmap, GLuint texture) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GenerateTextureMipmap,texture) -DECLARE_GL_FUNCTION_STUB_HEAD(void, BindTextureUnit, GLuint unit, GLuint texture) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, BindTextureUnit,unit,texture) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetTextureImage, GLuint texture, GLint level, GLenum format, GLenum type, GLsizei bufSize, void* pixels) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetTextureImage,texture,level,format,type,bufSize,pixels) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetCompressedTextureImage, GLuint texture, GLint level, GLsizei bufSize, void* pixels) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetCompressedTextureImage,texture,level,bufSize,pixels) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetTextureLevelParameterfv, GLuint texture, GLint level, GLenum pname, GLfloat* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetTextureLevelParameterfv,texture,level,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetTextureLevelParameteriv, GLuint texture, GLint level, GLenum pname, GLint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetTextureLevelParameteriv,texture,level,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetTextureParameterfv, GLuint texture, GLenum pname, GLfloat* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetTextureParameterfv,texture,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetTextureParameterIiv, GLuint texture, GLenum pname, GLint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetTextureParameterIiv,texture,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetTextureParameterIuiv, GLuint texture, GLenum pname, GLuint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetTextureParameterIuiv,texture,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetTextureParameteriv, GLuint texture, GLenum pname, GLint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetTextureParameteriv,texture,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, CreateVertexArrays, GLsizei n, GLuint* arrays) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, CreateVertexArrays,n,arrays) -DECLARE_GL_FUNCTION_STUB_HEAD(void, DisableVertexArrayAttrib, GLuint vaobj, GLuint index) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, DisableVertexArrayAttrib,vaobj,index) -DECLARE_GL_FUNCTION_STUB_HEAD(void, EnableVertexArrayAttrib, GLuint vaobj, GLuint index) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, EnableVertexArrayAttrib,vaobj,index) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexArrayElementBuffer, GLuint vaobj, GLuint buffer) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexArrayElementBuffer,vaobj,buffer) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexArrayVertexBuffer, GLuint vaobj, GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexArrayVertexBuffer,vaobj,bindingindex,buffer,offset,stride) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexArrayVertexBuffers, GLuint vaobj, GLuint first, GLsizei count, const GLuint* buffers, const GLintptr* offsets, const GLsizei* strides) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexArrayVertexBuffers,vaobj,first,count,buffers,offsets,strides) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexArrayAttribBinding, GLuint vaobj, GLuint attribindex, GLuint bindingindex) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexArrayAttribBinding,vaobj,attribindex,bindingindex) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexArrayAttribFormat, GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexArrayAttribFormat,vaobj,attribindex,size,type,normalized,relativeoffset) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexArrayAttribIFormat, GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexArrayAttribIFormat,vaobj,attribindex,size,type,relativeoffset) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexArrayAttribLFormat, GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexArrayAttribLFormat,vaobj,attribindex,size,type,relativeoffset) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexArrayBindingDivisor, GLuint vaobj, GLuint bindingindex, GLuint divisor) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexArrayBindingDivisor,vaobj,bindingindex,divisor) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetVertexArrayiv, GLuint vaobj, GLenum pname, GLint* param) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetVertexArrayiv,vaobj,pname,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetVertexArrayIndexediv, GLuint vaobj, GLuint index, GLenum pname, GLint* param) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetVertexArrayIndexediv,vaobj,index,pname,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetVertexArrayIndexed64iv, GLuint vaobj, GLuint index, GLenum pname, GLint64* param) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetVertexArrayIndexed64iv,vaobj,index,pname,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, CreateSamplers, GLsizei n, GLuint* samplers) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, CreateSamplers,n,samplers) -DECLARE_GL_FUNCTION_STUB_HEAD(void, CreateProgramPipelines, GLsizei n, GLuint* pipelines) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, CreateProgramPipelines,n,pipelines) -DECLARE_GL_FUNCTION_STUB_HEAD(void, CreateQueries, GLenum target, GLsizei n, GLuint* ids) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, CreateQueries,target,n,ids) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetQueryBufferObjecti64v, GLuint id, GLuint buffer, GLenum pname, GLintptr offset) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetQueryBufferObjecti64v,id,buffer,pname,offset) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetQueryBufferObjectiv, GLuint id, GLuint buffer, GLenum pname, GLintptr offset) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetQueryBufferObjectiv,id,buffer,pname,offset) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetQueryBufferObjectui64v, GLuint id, GLuint buffer, GLenum pname, GLintptr offset) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetQueryBufferObjectui64v,id,buffer,pname,offset) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetQueryBufferObjectuiv, GLuint id, GLuint buffer, GLenum pname, GLintptr offset) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetQueryBufferObjectuiv,id,buffer,pname,offset) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetTextureSubImage, GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLsizei bufSize, void* pixels) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetTextureSubImage,texture,level,xoffset,yoffset,zoffset,width,height,depth,format,type,bufSize,pixels) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetCompressedTextureSubImage, GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei bufSize, void* pixels) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetCompressedTextureSubImage,texture,level,xoffset,yoffset,zoffset,width,height,depth,bufSize,pixels) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetnCompressedTexImage, GLenum target, GLint lod, GLsizei bufSize, void* pixels) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetnCompressedTexImage,target,lod,bufSize,pixels) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetnTexImage, GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, void* pixels) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetnTexImage,target,level,format,type,bufSize,pixels) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetnUniformdv, GLuint program, GLint location, GLsizei bufSize, GLdouble* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetnUniformdv,program,location,bufSize,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetnMapdv, GLenum target, GLenum query, GLsizei bufSize, GLdouble* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetnMapdv,target,query,bufSize,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetnMapfv, GLenum target, GLenum query, GLsizei bufSize, GLfloat* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetnMapfv,target,query,bufSize,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetnMapiv, GLenum target, GLenum query, GLsizei bufSize, GLint* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetnMapiv,target,query,bufSize,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetnPixelMapfv, GLenum map, GLsizei bufSize, GLfloat* values) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetnPixelMapfv,map,bufSize,values) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetnPixelMapuiv, GLenum map, GLsizei bufSize, GLuint* values) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetnPixelMapuiv,map,bufSize,values) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetnPixelMapusv, GLenum map, GLsizei bufSize, GLushort* values) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetnPixelMapusv,map,bufSize,values) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetnPolygonStipple, GLsizei bufSize, GLubyte* pattern) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetnPolygonStipple,bufSize,pattern) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetnColorTable, GLenum target, GLenum format, GLenum type, GLsizei bufSize, void* table) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetnColorTable,target,format,type,bufSize,table) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetnConvolutionFilter, GLenum target, GLenum format, GLenum type, GLsizei bufSize, void* image) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetnConvolutionFilter,target,format,type,bufSize,image) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetnSeparableFilter, GLenum target, GLenum format, GLenum type, GLsizei rowBufSize, void* row, GLsizei columnBufSize, void* column, void* span) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetnSeparableFilter,target,format,type,rowBufSize,row,columnBufSize,column,span) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetnHistogram, GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, void* values) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetnHistogram,target,reset,format,type,bufSize,values) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetnMinmax, GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, void* values) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetnMinmax,target,reset,format,type,bufSize,values) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TextureBarrier,void) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TextureBarrier,) -DECLARE_GL_FUNCTION_STUB_HEAD(void, SpecializeShader, GLuint shader, const GLchar* pEntryPoint, GLuint numSpecializationConstants, const GLuint* pConstantIndex, const GLuint* pConstantValue) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, SpecializeShader,shader,pEntryPoint,numSpecializationConstants,pConstantIndex,pConstantValue) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiDrawArraysIndirectCount, GLenum mode, const void* indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiDrawArraysIndirectCount,mode,indirect,drawcount,maxdrawcount,stride) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiDrawElementsIndirectCount, GLenum mode, GLenum type, const void* indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiDrawElementsIndirectCount,mode,type,indirect,drawcount,maxdrawcount,stride) -DECLARE_GL_FUNCTION_STUB_HEAD(void, PolygonOffsetClamp, GLfloat factor, GLfloat units, GLfloat clamp) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, PolygonOffsetClamp,factor,units,clamp) -DECLARE_GL_FUNCTION_STUB_HEAD(GLuint64, GetTextureHandleARB, GLuint texture) DECLARE_GL_FUNCTION_STUB_END(GLuint64, GetTextureHandleARB,texture) -DECLARE_GL_FUNCTION_STUB_HEAD(GLuint64, GetTextureSamplerHandleARB, GLuint texture, GLuint sampler) DECLARE_GL_FUNCTION_STUB_END(GLuint64, GetTextureSamplerHandleARB,texture,sampler) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MakeTextureHandleResidentARB, GLuint64 handle) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MakeTextureHandleResidentARB,handle) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MakeTextureHandleNonResidentARB, GLuint64 handle) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MakeTextureHandleNonResidentARB,handle) -DECLARE_GL_FUNCTION_STUB_HEAD(GLuint64, GetImageHandleARB, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum format) DECLARE_GL_FUNCTION_STUB_END(GLuint64, GetImageHandleARB,texture,level,layered,layer,format) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MakeImageHandleResidentARB, GLuint64 handle, GLenum access) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MakeImageHandleResidentARB,handle,access) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MakeImageHandleNonResidentARB, GLuint64 handle) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MakeImageHandleNonResidentARB,handle) -DECLARE_GL_FUNCTION_STUB_HEAD(void, UniformHandleui64ARB, GLint location, GLuint64 value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, UniformHandleui64ARB,location,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, UniformHandleui64vARB, GLint location, GLsizei count, const GLuint64* value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, UniformHandleui64vARB,location,count,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniformHandleui64ARB, GLuint program, GLint location, GLuint64 value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniformHandleui64ARB,program,location,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniformHandleui64vARB, GLuint program, GLint location, GLsizei count, const GLuint64* values) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniformHandleui64vARB,program,location,count,values) -DECLARE_GL_FUNCTION_STUB_HEAD(GLboolean, IsTextureHandleResidentARB, GLuint64 handle) DECLARE_GL_FUNCTION_STUB_END(GLboolean, IsTextureHandleResidentARB,handle) -DECLARE_GL_FUNCTION_STUB_HEAD(GLboolean, IsImageHandleResidentARB, GLuint64 handle) DECLARE_GL_FUNCTION_STUB_END(GLboolean, IsImageHandleResidentARB,handle) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribL1ui64ARB, GLuint index, GLuint64EXT x) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribL1ui64ARB,index,x) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribL1ui64vARB, GLuint index, const GLuint64EXT* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribL1ui64vARB,index,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetVertexAttribLui64vARB, GLuint index, GLenum pname, GLuint64EXT* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetVertexAttribLui64vARB,index,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(GLsync, CreateSyncFromCLeventARB,struct _cl_context *context, struct _cl_event *event, GLbitfield flags) DECLARE_GL_FUNCTION_STUB_END(GLsync, CreateSyncFromCLeventARB,context,event,flags) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ClampColorARB, GLenum target, GLenum clamp) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ClampColorARB,target,clamp) -DECLARE_GL_FUNCTION_STUB_HEAD(void, DispatchComputeGroupSizeARB, GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z, GLuint group_size_x, GLuint group_size_y, GLuint group_size_z) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, DispatchComputeGroupSizeARB,num_groups_x,num_groups_y,num_groups_z,group_size_x,group_size_y,group_size_z) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramStringARB, GLenum target, GLenum format, GLsizei len, const void* string) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramStringARB,target,format,len,string) -DECLARE_GL_FUNCTION_STUB_HEAD(void, BindProgramARB, GLenum target, GLuint program) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, BindProgramARB,target,program) -DECLARE_GL_FUNCTION_STUB_HEAD(void, DeleteProgramsARB, GLsizei n, const GLuint* programs) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, DeleteProgramsARB,n,programs) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GenProgramsARB, GLsizei n, GLuint* programs) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GenProgramsARB,n,programs) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramEnvParameter4dARB, GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramEnvParameter4dARB,target,index,x,y,z,w) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramEnvParameter4dvARB, GLenum target, GLuint index, const GLdouble* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramEnvParameter4dvARB,target,index,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramEnvParameter4fARB, GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramEnvParameter4fARB,target,index,x,y,z,w) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramEnvParameter4fvARB, GLenum target, GLuint index, const GLfloat* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramEnvParameter4fvARB,target,index,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramLocalParameter4dARB, GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramLocalParameter4dARB,target,index,x,y,z,w) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramLocalParameter4dvARB, GLenum target, GLuint index, const GLdouble* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramLocalParameter4dvARB,target,index,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramLocalParameter4fARB, GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramLocalParameter4fARB,target,index,x,y,z,w) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramLocalParameter4fvARB, GLenum target, GLuint index, const GLfloat* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramLocalParameter4fvARB,target,index,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetProgramEnvParameterdvARB, GLenum target, GLuint index, GLdouble* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetProgramEnvParameterdvARB,target,index,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetProgramEnvParameterfvARB, GLenum target, GLuint index, GLfloat* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetProgramEnvParameterfvARB,target,index,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetProgramLocalParameterdvARB, GLenum target, GLuint index, GLdouble* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetProgramLocalParameterdvARB,target,index,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetProgramLocalParameterfvARB, GLenum target, GLuint index, GLfloat* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetProgramLocalParameterfvARB,target,index,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetProgramStringARB, GLenum target, GLenum pname, void* string) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetProgramStringARB,target,pname,string) -DECLARE_GL_FUNCTION_STUB_HEAD(void, FramebufferTextureFaceARB, GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, FramebufferTextureFaceARB,target,attachment,texture,level,face) -DECLARE_GL_FUNCTION_STUB_HEAD(void, SpecializeShaderARB, GLuint shader, const GLchar* pEntryPoint, GLuint numSpecializationConstants, const GLuint* pConstantIndex, const GLuint* pConstantValue) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, SpecializeShaderARB,shader,pEntryPoint,numSpecializationConstants,pConstantIndex,pConstantValue) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Uniform1i64ARB, GLint location, GLint64 x) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Uniform1i64ARB,location,x) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Uniform2i64ARB, GLint location, GLint64 x, GLint64 y) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Uniform2i64ARB,location,x,y) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Uniform3i64ARB, GLint location, GLint64 x, GLint64 y, GLint64 z) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Uniform3i64ARB,location,x,y,z) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Uniform4i64ARB, GLint location, GLint64 x, GLint64 y, GLint64 z, GLint64 w) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Uniform4i64ARB,location,x,y,z,w) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Uniform1i64vARB, GLint location, GLsizei count, const GLint64* value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Uniform1i64vARB,location,count,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Uniform2i64vARB, GLint location, GLsizei count, const GLint64* value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Uniform2i64vARB,location,count,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Uniform3i64vARB, GLint location, GLsizei count, const GLint64* value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Uniform3i64vARB,location,count,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Uniform4i64vARB, GLint location, GLsizei count, const GLint64* value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Uniform4i64vARB,location,count,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Uniform1ui64ARB, GLint location, GLuint64 x) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Uniform1ui64ARB,location,x) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Uniform2ui64ARB, GLint location, GLuint64 x, GLuint64 y) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Uniform2ui64ARB,location,x,y) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Uniform3ui64ARB, GLint location, GLuint64 x, GLuint64 y, GLuint64 z) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Uniform3ui64ARB,location,x,y,z) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Uniform4ui64ARB, GLint location, GLuint64 x, GLuint64 y, GLuint64 z, GLuint64 w) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Uniform4ui64ARB,location,x,y,z,w) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Uniform1ui64vARB, GLint location, GLsizei count, const GLuint64* value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Uniform1ui64vARB,location,count,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Uniform2ui64vARB, GLint location, GLsizei count, const GLuint64* value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Uniform2ui64vARB,location,count,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Uniform3ui64vARB, GLint location, GLsizei count, const GLuint64* value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Uniform3ui64vARB,location,count,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Uniform4ui64vARB, GLint location, GLsizei count, const GLuint64* value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Uniform4ui64vARB,location,count,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetUniformi64vARB, GLuint program, GLint location, GLint64* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetUniformi64vARB,program,location,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetUniformui64vARB, GLuint program, GLint location, GLuint64* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetUniformui64vARB,program,location,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetnUniformi64vARB, GLuint program, GLint location, GLsizei bufSize, GLint64* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetnUniformi64vARB,program,location,bufSize,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetnUniformui64vARB, GLuint program, GLint location, GLsizei bufSize, GLuint64* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetnUniformui64vARB,program,location,bufSize,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniform1i64ARB, GLuint program, GLint location, GLint64 x) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniform1i64ARB,program,location,x) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniform2i64ARB, GLuint program, GLint location, GLint64 x, GLint64 y) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniform2i64ARB,program,location,x,y) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniform3i64ARB, GLuint program, GLint location, GLint64 x, GLint64 y, GLint64 z) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniform3i64ARB,program,location,x,y,z) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniform4i64ARB, GLuint program, GLint location, GLint64 x, GLint64 y, GLint64 z, GLint64 w) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniform4i64ARB,program,location,x,y,z,w) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniform1i64vARB, GLuint program, GLint location, GLsizei count, const GLint64* value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniform1i64vARB,program,location,count,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniform2i64vARB, GLuint program, GLint location, GLsizei count, const GLint64* value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniform2i64vARB,program,location,count,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniform3i64vARB, GLuint program, GLint location, GLsizei count, const GLint64* value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniform3i64vARB,program,location,count,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniform4i64vARB, GLuint program, GLint location, GLsizei count, const GLint64* value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniform4i64vARB,program,location,count,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniform1ui64ARB, GLuint program, GLint location, GLuint64 x) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniform1ui64ARB,program,location,x) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniform2ui64ARB, GLuint program, GLint location, GLuint64 x, GLuint64 y) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniform2ui64ARB,program,location,x,y) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniform3ui64ARB, GLuint program, GLint location, GLuint64 x, GLuint64 y, GLuint64 z) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniform3ui64ARB,program,location,x,y,z) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniform4ui64ARB, GLuint program, GLint location, GLuint64 x, GLuint64 y, GLuint64 z, GLuint64 w) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniform4ui64ARB,program,location,x,y,z,w) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniform1ui64vARB, GLuint program, GLint location, GLsizei count, const GLuint64* value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniform1ui64vARB,program,location,count,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniform2ui64vARB, GLuint program, GLint location, GLsizei count, const GLuint64* value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniform2ui64vARB,program,location,count,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniform3ui64vARB, GLuint program, GLint location, GLsizei count, const GLuint64* value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniform3ui64vARB,program,location,count,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniform4ui64vARB, GLuint program, GLint location, GLsizei count, const GLuint64* value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniform4ui64vARB,program,location,count,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ColorTable, GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void* table) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ColorTable,target,internalformat,width,format,type,table) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ColorTableParameterfv, GLenum target, GLenum pname, const GLfloat* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ColorTableParameterfv,target,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ColorTableParameteriv, GLenum target, GLenum pname, const GLint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ColorTableParameteriv,target,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, CopyColorTable, GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, CopyColorTable,target,internalformat,x,y,width) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetColorTable, GLenum target, GLenum format, GLenum type, void* table) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetColorTable,target,format,type,table) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetColorTableParameterfv, GLenum target, GLenum pname, GLfloat* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetColorTableParameterfv,target,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetColorTableParameteriv, GLenum target, GLenum pname, GLint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetColorTableParameteriv,target,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ColorSubTable, GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const void* data) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ColorSubTable,target,start,count,format,type,data) -DECLARE_GL_FUNCTION_STUB_HEAD(void, CopyColorSubTable, GLenum target, GLsizei start, GLint x, GLint y, GLsizei width) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, CopyColorSubTable,target,start,x,y,width) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ConvolutionFilter1D, GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void* image) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ConvolutionFilter1D,target,internalformat,width,format,type,image) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ConvolutionFilter2D, GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void* image) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ConvolutionFilter2D,target,internalformat,width,height,format,type,image) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ConvolutionParameterf, GLenum target, GLenum pname, GLfloat params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ConvolutionParameterf,target,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ConvolutionParameterfv, GLenum target, GLenum pname, const GLfloat* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ConvolutionParameterfv,target,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ConvolutionParameteri, GLenum target, GLenum pname, GLint params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ConvolutionParameteri,target,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ConvolutionParameteriv, GLenum target, GLenum pname, const GLint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ConvolutionParameteriv,target,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, CopyConvolutionFilter1D, GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, CopyConvolutionFilter1D,target,internalformat,x,y,width) -DECLARE_GL_FUNCTION_STUB_HEAD(void, CopyConvolutionFilter2D, GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, CopyConvolutionFilter2D,target,internalformat,x,y,width,height) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetConvolutionFilter, GLenum target, GLenum format, GLenum type, void* image) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetConvolutionFilter,target,format,type,image) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetConvolutionParameterfv, GLenum target, GLenum pname, GLfloat* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetConvolutionParameterfv,target,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetConvolutionParameteriv, GLenum target, GLenum pname, GLint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetConvolutionParameteriv,target,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetSeparableFilter, GLenum target, GLenum format, GLenum type, void* row, void* column, void* span) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetSeparableFilter,target,format,type,row,column,span) -DECLARE_GL_FUNCTION_STUB_HEAD(void, SeparableFilter2D, GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void* row, const void* column) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, SeparableFilter2D,target,internalformat,width,height,format,type,row,column) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetHistogram, GLenum target, GLboolean reset, GLenum format, GLenum type, void* values) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetHistogram,target,reset,format,type,values) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetHistogramParameterfv, GLenum target, GLenum pname, GLfloat* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetHistogramParameterfv,target,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetHistogramParameteriv, GLenum target, GLenum pname, GLint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetHistogramParameteriv,target,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetMinmax, GLenum target, GLboolean reset, GLenum format, GLenum type, void* values) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetMinmax,target,reset,format,type,values) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetMinmaxParameterfv, GLenum target, GLenum pname, GLfloat* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetMinmaxParameterfv,target,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetMinmaxParameteriv, GLenum target, GLenum pname, GLint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetMinmaxParameteriv,target,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Histogram, GLenum target, GLsizei width, GLenum internalformat, GLboolean sink) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Histogram,target,width,internalformat,sink) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Minmax, GLenum target, GLenum internalformat, GLboolean sink) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Minmax,target,internalformat,sink) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ResetHistogram, GLenum target) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ResetHistogram,target) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ResetMinmax, GLenum target) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ResetMinmax,target) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiDrawArraysIndirectCountARB, GLenum mode, const void* indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiDrawArraysIndirectCountARB,mode,indirect,drawcount,maxdrawcount,stride) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiDrawElementsIndirectCountARB, GLenum mode, GLenum type, const void* indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiDrawElementsIndirectCountARB,mode,type,indirect,drawcount,maxdrawcount,stride) -DECLARE_GL_FUNCTION_STUB_HEAD(void, CurrentPaletteMatrixARB, GLint index) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, CurrentPaletteMatrixARB,index) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MatrixIndexubvARB, GLint size, const GLubyte* indices) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MatrixIndexubvARB,size,indices) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MatrixIndexusvARB, GLint size, const GLushort* indices) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MatrixIndexusvARB,size,indices) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MatrixIndexuivARB, GLint size, const GLuint* indices) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MatrixIndexuivARB,size,indices) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MatrixIndexPointerARB, GLint size, GLenum type, GLsizei stride, const void* pointer) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MatrixIndexPointerARB,size,type,stride,pointer) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ClientActiveTextureARB, GLenum texture) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ClientActiveTextureARB,texture) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexCoord1dARB, GLenum target, GLdouble s) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexCoord1dARB,target,s) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexCoord1dvARB, GLenum target, const GLdouble* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexCoord1dvARB,target,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexCoord1fARB, GLenum target, GLfloat s) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexCoord1fARB,target,s) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexCoord1fvARB, GLenum target, const GLfloat* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexCoord1fvARB,target,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexCoord1iARB, GLenum target, GLint s) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexCoord1iARB,target,s) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexCoord1ivARB, GLenum target, const GLint* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexCoord1ivARB,target,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexCoord1sARB, GLenum target, GLshort s) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexCoord1sARB,target,s) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexCoord1svARB, GLenum target, const GLshort* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexCoord1svARB,target,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexCoord2dARB, GLenum target, GLdouble s, GLdouble t) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexCoord2dARB,target,s,t) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexCoord2dvARB, GLenum target, const GLdouble* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexCoord2dvARB,target,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexCoord2fARB, GLenum target, GLfloat s, GLfloat t) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexCoord2fARB,target,s,t) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexCoord2fvARB, GLenum target, const GLfloat* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexCoord2fvARB,target,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexCoord2iARB, GLenum target, GLint s, GLint t) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexCoord2iARB,target,s,t) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexCoord2ivARB, GLenum target, const GLint* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexCoord2ivARB,target,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexCoord2sARB, GLenum target, GLshort s, GLshort t) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexCoord2sARB,target,s,t) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexCoord2svARB, GLenum target, const GLshort* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexCoord2svARB,target,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexCoord3dARB, GLenum target, GLdouble s, GLdouble t, GLdouble r) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexCoord3dARB,target,s,t,r) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexCoord3dvARB, GLenum target, const GLdouble* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexCoord3dvARB,target,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexCoord3fARB, GLenum target, GLfloat s, GLfloat t, GLfloat r) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexCoord3fARB,target,s,t,r) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexCoord3fvARB, GLenum target, const GLfloat* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexCoord3fvARB,target,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexCoord3iARB, GLenum target, GLint s, GLint t, GLint r) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexCoord3iARB,target,s,t,r) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexCoord3ivARB, GLenum target, const GLint* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexCoord3ivARB,target,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexCoord3sARB, GLenum target, GLshort s, GLshort t, GLshort r) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexCoord3sARB,target,s,t,r) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexCoord3svARB, GLenum target, const GLshort* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexCoord3svARB,target,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexCoord4dARB, GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexCoord4dARB,target,s,t,r,q) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexCoord4dvARB, GLenum target, const GLdouble* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexCoord4dvARB,target,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexCoord4fARB, GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexCoord4fARB,target,s,t,r,q) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexCoord4fvARB, GLenum target, const GLfloat* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexCoord4fvARB,target,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexCoord4iARB, GLenum target, GLint s, GLint t, GLint r, GLint q) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexCoord4iARB,target,s,t,r,q) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexCoord4ivARB, GLenum target, const GLint* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexCoord4ivARB,target,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexCoord4sARB, GLenum target, GLshort s, GLshort t, GLshort r, GLshort q) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexCoord4sARB,target,s,t,r,q) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexCoord4svARB, GLenum target, const GLshort* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexCoord4svARB,target,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetQueryObjectivARB, GLuint id, GLenum pname, GLint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetQueryObjectivARB,id,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MaxShaderCompilerThreadsARB, GLuint count) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MaxShaderCompilerThreadsARB,count) -DECLARE_GL_FUNCTION_STUB_HEAD(void, PointParameterfARB, GLenum pname, GLfloat param) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, PointParameterfARB,pname,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, PointParameterfvARB, GLenum pname, const GLfloat* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, PointParameterfvARB,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetnTexImageARB, GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, void* img) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetnTexImageARB,target,level,format,type,bufSize,img) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetnCompressedTexImageARB, GLenum target, GLint lod, GLsizei bufSize, void* img) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetnCompressedTexImageARB,target,lod,bufSize,img) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetnUniformdvARB, GLuint program, GLint location, GLsizei bufSize, GLdouble* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetnUniformdvARB,program,location,bufSize,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetnMapdvARB, GLenum target, GLenum query, GLsizei bufSize, GLdouble* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetnMapdvARB,target,query,bufSize,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetnMapfvARB, GLenum target, GLenum query, GLsizei bufSize, GLfloat* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetnMapfvARB,target,query,bufSize,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetnMapivARB, GLenum target, GLenum query, GLsizei bufSize, GLint* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetnMapivARB,target,query,bufSize,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetnPixelMapfvARB, GLenum map, GLsizei bufSize, GLfloat* values) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetnPixelMapfvARB,map,bufSize,values) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetnPixelMapuivARB, GLenum map, GLsizei bufSize, GLuint* values) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetnPixelMapuivARB,map,bufSize,values) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetnPixelMapusvARB, GLenum map, GLsizei bufSize, GLushort* values) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetnPixelMapusvARB,map,bufSize,values) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetnPolygonStippleARB, GLsizei bufSize, GLubyte* pattern) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetnPolygonStippleARB,bufSize,pattern) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetnColorTableARB, GLenum target, GLenum format, GLenum type, GLsizei bufSize, void* table) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetnColorTableARB,target,format,type,bufSize,table) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetnConvolutionFilterARB, GLenum target, GLenum format, GLenum type, GLsizei bufSize, void* image) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetnConvolutionFilterARB,target,format,type,bufSize,image) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetnSeparableFilterARB, GLenum target, GLenum format, GLenum type, GLsizei rowBufSize, void* row, GLsizei columnBufSize, void* column, void* span) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetnSeparableFilterARB,target,format,type,rowBufSize,row,columnBufSize,column,span) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetnHistogramARB, GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, void* values) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetnHistogramARB,target,reset,format,type,bufSize,values) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetnMinmaxARB, GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, void* values) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetnMinmaxARB,target,reset,format,type,bufSize,values) -DECLARE_GL_FUNCTION_STUB_HEAD(void, FramebufferSampleLocationsfvARB, GLenum target, GLuint start, GLsizei count, const GLfloat* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, FramebufferSampleLocationsfvARB,target,start,count,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, NamedFramebufferSampleLocationsfvARB, GLuint framebuffer, GLuint start, GLsizei count, const GLfloat* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, NamedFramebufferSampleLocationsfvARB,framebuffer,start,count,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, EvaluateDepthValuesARB,void) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, EvaluateDepthValuesARB,) -DECLARE_GL_FUNCTION_STUB_HEAD(void, DeleteObjectARB, GLhandleARB obj) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, DeleteObjectARB,obj) -DECLARE_GL_FUNCTION_STUB_HEAD(GLhandleARB, GetHandleARB, GLenum pname) DECLARE_GL_FUNCTION_STUB_END(GLhandleARB, GetHandleARB,pname) -DECLARE_GL_FUNCTION_STUB_HEAD(void, DetachObjectARB, GLhandleARB containerObj, GLhandleARB attachedObj) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, DetachObjectARB,containerObj,attachedObj) -DECLARE_GL_FUNCTION_STUB_HEAD(GLhandleARB, CreateShaderObjectARB, GLenum shaderType) DECLARE_GL_FUNCTION_STUB_END(GLhandleARB, CreateShaderObjectARB,shaderType) -DECLARE_GL_FUNCTION_STUB_HEAD(GLhandleARB, CreateProgramObjectARB,void) DECLARE_GL_FUNCTION_STUB_END(GLhandleARB, CreateProgramObjectARB,) -DECLARE_GL_FUNCTION_STUB_HEAD(void, AttachObjectARB, GLhandleARB containerObj, GLhandleARB obj) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, AttachObjectARB,containerObj,obj) -DECLARE_GL_FUNCTION_STUB_HEAD(void, UseProgramObjectARB, GLhandleARB programObj) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, UseProgramObjectARB,programObj) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetObjectParameterfvARB, GLhandleARB obj, GLenum pname, GLfloat* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetObjectParameterfvARB,obj,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetObjectParameterivARB, GLhandleARB obj, GLenum pname, GLint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetObjectParameterivARB,obj,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetInfoLogARB, GLhandleARB obj, GLsizei maxLength, GLsizei* length, GLcharARB* infoLog) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetInfoLogARB,obj,maxLength,length,infoLog) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetAttachedObjectsARB, GLhandleARB containerObj, GLsizei maxCount, GLsizei* count, GLhandleARB* obj) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetAttachedObjectsARB,containerObj,maxCount,count,obj) -DECLARE_GL_FUNCTION_STUB_HEAD(void, NamedStringARB, GLenum type, GLint namelen, const GLchar* name, GLint strinen, const GLchar* string) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, NamedStringARB,type,namelen,name,strinen,string) -DECLARE_GL_FUNCTION_STUB_HEAD(void, DeleteNamedStringARB, GLint namelen, const GLchar* name) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, DeleteNamedStringARB,namelen,name) -DECLARE_GL_FUNCTION_STUB_HEAD(void, CompileShaderIncludeARB, GLuint shader, GLsizei count, const GLchar* const*path, const GLint* length) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, CompileShaderIncludeARB,shader,count,path,length) -DECLARE_GL_FUNCTION_STUB_HEAD(GLboolean, IsNamedStringARB, GLint namelen, const GLchar* name) DECLARE_GL_FUNCTION_STUB_END(GLboolean, IsNamedStringARB,namelen,name) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetNamedStringARB, GLint namelen, const GLchar* name, GLsizei bufSize, GLint* strinen, GLchar* string) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetNamedStringARB,namelen,name,bufSize,strinen,string) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetNamedStringivARB, GLint namelen, const GLchar* name, GLenum pname, GLint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetNamedStringivARB,namelen,name,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, BufferPageCommitmentARB, GLenum target, GLintptr offset, GLsizeiptr size, GLboolean commit) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, BufferPageCommitmentARB,target,offset,size,commit) -DECLARE_GL_FUNCTION_STUB_HEAD(void, NamedBufferPageCommitmentEXT, GLuint buffer, GLintptr offset, GLsizeiptr size, GLboolean commit) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, NamedBufferPageCommitmentEXT,buffer,offset,size,commit) -DECLARE_GL_FUNCTION_STUB_HEAD(void, NamedBufferPageCommitmentARB, GLuint buffer, GLintptr offset, GLsizeiptr size, GLboolean commit) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, NamedBufferPageCommitmentARB,buffer,offset,size,commit) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexPageCommitmentARB, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLboolean commit) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexPageCommitmentARB,target,level,xoffset,yoffset,zoffset,width,height,depth,commit) -DECLARE_GL_FUNCTION_STUB_HEAD(void, CompressedTexImage1DARB, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void* data) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, CompressedTexImage1DARB,target,level,internalformat,width,border,imageSize,data) -DECLARE_GL_FUNCTION_STUB_HEAD(void, CompressedTexSubImage1DARB, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void* data) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, CompressedTexSubImage1DARB,target,level,xoffset,width,format,imageSize,data) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetCompressedTexImageARB, GLenum target, GLint level, void* img) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetCompressedTexImageARB,target,level,img) -DECLARE_GL_FUNCTION_STUB_HEAD(void, LoadTransposeMatrixfARB,const GLfloat* m) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, LoadTransposeMatrixfARB,m) -DECLARE_GL_FUNCTION_STUB_HEAD(void, LoadTransposeMatrixdARB,const GLdouble* m) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, LoadTransposeMatrixdARB,m) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultTransposeMatrixfARB,const GLfloat* m) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultTransposeMatrixfARB,m) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultTransposeMatrixdARB,const GLdouble* m) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultTransposeMatrixdARB,m) -DECLARE_GL_FUNCTION_STUB_HEAD(void, WeightbvARB, GLint size, const GLbyte* weights) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, WeightbvARB,size,weights) -DECLARE_GL_FUNCTION_STUB_HEAD(void, WeightsvARB, GLint size, const GLshort* weights) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, WeightsvARB,size,weights) -DECLARE_GL_FUNCTION_STUB_HEAD(void, WeightivARB, GLint size, const GLint* weights) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, WeightivARB,size,weights) -DECLARE_GL_FUNCTION_STUB_HEAD(void, WeightfvARB, GLint size, const GLfloat* weights) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, WeightfvARB,size,weights) -DECLARE_GL_FUNCTION_STUB_HEAD(void, WeightdvARB, GLint size, const GLdouble* weights) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, WeightdvARB,size,weights) -DECLARE_GL_FUNCTION_STUB_HEAD(void, WeightubvARB, GLint size, const GLubyte* weights) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, WeightubvARB,size,weights) -DECLARE_GL_FUNCTION_STUB_HEAD(void, WeightusvARB, GLint size, const GLushort* weights) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, WeightusvARB,size,weights) -DECLARE_GL_FUNCTION_STUB_HEAD(void, WeightuivARB, GLint size, const GLuint* weights) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, WeightuivARB,size,weights) -DECLARE_GL_FUNCTION_STUB_HEAD(void, WeightPointerARB, GLint size, GLenum type, GLsizei stride, const void* pointer) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, WeightPointerARB,size,type,stride,pointer) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexBlendARB, GLint count) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexBlendARB,count) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetBufferSubDataARB, GLenum target, GLintptrARB offset, GLsizeiptrARB size, void* data) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetBufferSubDataARB,target,offset,size,data) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttrib1dARB, GLuint index, GLdouble x) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttrib1dARB,index,x) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttrib1dvARB, GLuint index, const GLdouble* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttrib1dvARB,index,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttrib1sARB, GLuint index, GLshort x) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttrib1sARB,index,x) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttrib1svARB, GLuint index, const GLshort* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttrib1svARB,index,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttrib2dARB, GLuint index, GLdouble x, GLdouble y) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttrib2dARB,index,x,y) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttrib2dvARB, GLuint index, const GLdouble* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttrib2dvARB,index,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttrib2sARB, GLuint index, GLshort x, GLshort y) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttrib2sARB,index,x,y) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttrib2svARB, GLuint index, const GLshort* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttrib2svARB,index,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttrib3dARB, GLuint index, GLdouble x, GLdouble y, GLdouble z) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttrib3dARB,index,x,y,z) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttrib3dvARB, GLuint index, const GLdouble* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttrib3dvARB,index,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttrib3sARB, GLuint index, GLshort x, GLshort y, GLshort z) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttrib3sARB,index,x,y,z) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttrib3svARB, GLuint index, const GLshort* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttrib3svARB,index,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttrib4NbvARB, GLuint index, const GLbyte* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttrib4NbvARB,index,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttrib4NivARB, GLuint index, const GLint* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttrib4NivARB,index,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttrib4NsvARB, GLuint index, const GLshort* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttrib4NsvARB,index,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttrib4NubARB, GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttrib4NubARB,index,x,y,z,w) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttrib4NubvARB, GLuint index, const GLubyte* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttrib4NubvARB,index,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttrib4NuivARB, GLuint index, const GLuint* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttrib4NuivARB,index,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttrib4NusvARB, GLuint index, const GLushort* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttrib4NusvARB,index,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttrib4bvARB, GLuint index, const GLbyte* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttrib4bvARB,index,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttrib4dARB, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttrib4dARB,index,x,y,z,w) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttrib4dvARB, GLuint index, const GLdouble* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttrib4dvARB,index,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttrib4ivARB, GLuint index, const GLint* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttrib4ivARB,index,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttrib4sARB, GLuint index, GLshort x, GLshort y, GLshort z, GLshort w) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttrib4sARB,index,x,y,z,w) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttrib4svARB, GLuint index, const GLshort* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttrib4svARB,index,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttrib4ubvARB, GLuint index, const GLubyte* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttrib4ubvARB,index,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttrib4uivARB, GLuint index, const GLuint* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttrib4uivARB,index,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttrib4usvARB, GLuint index, const GLushort* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttrib4usvARB,index,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetVertexAttribdvARB, GLuint index, GLenum pname, GLdouble* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetVertexAttribdvARB,index,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, DepthRangeArraydvNV, GLuint first, GLsizei count, const GLdouble* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, DepthRangeArraydvNV,first,count,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, DepthRangeIndexeddNV, GLuint index, GLdouble n, GLdouble f) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, DepthRangeIndexeddNV,index,n,f) -DECLARE_GL_FUNCTION_STUB_HEAD(void, WindowPos2dARB, GLdouble x, GLdouble y) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, WindowPos2dARB,x,y) -DECLARE_GL_FUNCTION_STUB_HEAD(void, WindowPos2dvARB,const GLdouble* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, WindowPos2dvARB,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, WindowPos2fARB, GLfloat x, GLfloat y) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, WindowPos2fARB,x,y) -DECLARE_GL_FUNCTION_STUB_HEAD(void, WindowPos2fvARB,const GLfloat* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, WindowPos2fvARB,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, WindowPos2iARB, GLint x, GLint y) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, WindowPos2iARB,x,y) -DECLARE_GL_FUNCTION_STUB_HEAD(void, WindowPos2ivARB,const GLint* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, WindowPos2ivARB,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, WindowPos2sARB, GLshort x, GLshort y) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, WindowPos2sARB,x,y) -DECLARE_GL_FUNCTION_STUB_HEAD(void, WindowPos2svARB,const GLshort* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, WindowPos2svARB,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, WindowPos3dARB, GLdouble x, GLdouble y, GLdouble z) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, WindowPos3dARB,x,y,z) -DECLARE_GL_FUNCTION_STUB_HEAD(void, WindowPos3dvARB,const GLdouble* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, WindowPos3dvARB,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, WindowPos3fARB, GLfloat x, GLfloat y, GLfloat z) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, WindowPos3fARB,x,y,z) -DECLARE_GL_FUNCTION_STUB_HEAD(void, WindowPos3fvARB,const GLfloat* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, WindowPos3fvARB,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, WindowPos3iARB, GLint x, GLint y, GLint z) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, WindowPos3iARB,x,y,z) -DECLARE_GL_FUNCTION_STUB_HEAD(void, WindowPos3ivARB,const GLint* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, WindowPos3ivARB,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, WindowPos3sARB, GLshort x, GLshort y, GLshort z) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, WindowPos3sARB,x,y,z) -DECLARE_GL_FUNCTION_STUB_HEAD(void, WindowPos3svARB,const GLshort* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, WindowPos3svARB,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, BlendBarrierKHR,void) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, BlendBarrierKHR,) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MaxShaderCompilerThreadsKHR, GLuint count) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MaxShaderCompilerThreadsKHR,count) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexCoord1bOES, GLenum texture, GLbyte s) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexCoord1bOES,texture,s) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexCoord1bvOES, GLenum texture, const GLbyte* coords) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexCoord1bvOES,texture,coords) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexCoord2bOES, GLenum texture, GLbyte s, GLbyte t) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexCoord2bOES,texture,s,t) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexCoord2bvOES, GLenum texture, const GLbyte* coords) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexCoord2bvOES,texture,coords) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexCoord3bOES, GLenum texture, GLbyte s, GLbyte t, GLbyte r) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexCoord3bOES,texture,s,t,r) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexCoord3bvOES, GLenum texture, const GLbyte* coords) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexCoord3bvOES,texture,coords) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexCoord4bOES, GLenum texture, GLbyte s, GLbyte t, GLbyte r, GLbyte q) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexCoord4bOES,texture,s,t,r,q) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexCoord4bvOES, GLenum texture, const GLbyte* coords) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexCoord4bvOES,texture,coords) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexCoord1bOES, GLbyte s) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexCoord1bOES,s) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexCoord1bvOES,const GLbyte* coords) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexCoord1bvOES,coords) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexCoord2bOES, GLbyte s, GLbyte t) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexCoord2bOES,s,t) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexCoord2bvOES,const GLbyte* coords) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexCoord2bvOES,coords) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexCoord3bOES, GLbyte s, GLbyte t, GLbyte r) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexCoord3bOES,s,t,r) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexCoord3bvOES,const GLbyte* coords) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexCoord3bvOES,coords) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexCoord4bOES, GLbyte s, GLbyte t, GLbyte r, GLbyte q) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexCoord4bOES,s,t,r,q) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexCoord4bvOES,const GLbyte* coords) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexCoord4bvOES,coords) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Vertex2bOES, GLbyte x, GLbyte y) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Vertex2bOES,x,y) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Vertex2bvOES,const GLbyte* coords) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Vertex2bvOES,coords) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Vertex3bOES, GLbyte x, GLbyte y, GLbyte z) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Vertex3bOES,x,y,z) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Vertex3bvOES,const GLbyte* coords) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Vertex3bvOES,coords) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Vertex4bOES, GLbyte x, GLbyte y, GLbyte z, GLbyte w) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Vertex4bOES,x,y,z,w) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Vertex4bvOES,const GLbyte* coords) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Vertex4bvOES,coords) -DECLARE_GL_FUNCTION_STUB_HEAD(void, AlphaFuncxOES, GLenum func, GLfixed ref) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, AlphaFuncxOES,func,ref) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ClearColorxOES, GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ClearColorxOES,red,green,blue,alpha) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ClearDepthxOES, GLfixed depth) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ClearDepthxOES,depth) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ClipPlanexOES, GLenum plane, const GLfixed* equation) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ClipPlanexOES,plane,equation) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Color4xOES, GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Color4xOES,red,green,blue,alpha) -DECLARE_GL_FUNCTION_STUB_HEAD(void, DepthRangexOES, GLfixed n, GLfixed f) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, DepthRangexOES,n,f) -DECLARE_GL_FUNCTION_STUB_HEAD(void, FogxOES, GLenum pname, GLfixed param) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, FogxOES,pname,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, FogxvOES, GLenum pname, const GLfixed* param) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, FogxvOES,pname,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, FrustumxOES, GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, FrustumxOES,l,r,b,t,n,f) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetClipPlanexOES, GLenum plane, GLfixed* equation) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetClipPlanexOES,plane,equation) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetFixedvOES, GLenum pname, GLfixed* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetFixedvOES,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetTexEnvxvOES, GLenum target, GLenum pname, GLfixed* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetTexEnvxvOES,target,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetTexParameterxvOES, GLenum target, GLenum pname, GLfixed* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetTexParameterxvOES,target,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, LightModelxOES, GLenum pname, GLfixed param) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, LightModelxOES,pname,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, LightModelxvOES, GLenum pname, const GLfixed* param) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, LightModelxvOES,pname,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, LightxOES, GLenum light, GLenum pname, GLfixed param) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, LightxOES,light,pname,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, LightxvOES, GLenum light, GLenum pname, const GLfixed* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, LightxvOES,light,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, LineWidthxOES, GLfixed width) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, LineWidthxOES,width) -DECLARE_GL_FUNCTION_STUB_HEAD(void, LoadMatrixxOES,const GLfixed* m) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, LoadMatrixxOES,m) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MaterialxOES, GLenum face, GLenum pname, GLfixed param) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MaterialxOES,face,pname,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MaterialxvOES, GLenum face, GLenum pname, const GLfixed* param) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MaterialxvOES,face,pname,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultMatrixxOES,const GLfixed* m) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultMatrixxOES,m) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexCoord4xOES, GLenum texture, GLfixed s, GLfixed t, GLfixed r, GLfixed q) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexCoord4xOES,texture,s,t,r,q) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Normal3xOES, GLfixed nx, GLfixed ny, GLfixed nz) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Normal3xOES,nx,ny,nz) -DECLARE_GL_FUNCTION_STUB_HEAD(void, OrthoxOES, GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, OrthoxOES,l,r,b,t,n,f) -DECLARE_GL_FUNCTION_STUB_HEAD(void, PointParameterxvOES, GLenum pname, const GLfixed* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, PointParameterxvOES,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, PointSizexOES, GLfixed size) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, PointSizexOES,size) -DECLARE_GL_FUNCTION_STUB_HEAD(void, PolygonOffsetxOES, GLfixed factor, GLfixed units) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, PolygonOffsetxOES,factor,units) -DECLARE_GL_FUNCTION_STUB_HEAD(void, RotatexOES, GLfixed ane, GLfixed x, GLfixed y, GLfixed z) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, RotatexOES,ane,x,y,z) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ScalexOES, GLfixed x, GLfixed y, GLfixed z) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ScalexOES,x,y,z) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexEnvxOES, GLenum target, GLenum pname, GLfixed param) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexEnvxOES,target,pname,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexEnvxvOES, GLenum target, GLenum pname, const GLfixed* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexEnvxvOES,target,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexParameterxOES, GLenum target, GLenum pname, GLfixed param) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexParameterxOES,target,pname,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexParameterxvOES, GLenum target, GLenum pname, const GLfixed* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexParameterxvOES,target,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TranslatexOES, GLfixed x, GLfixed y, GLfixed z) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TranslatexOES,x,y,z) -DECLARE_GL_FUNCTION_STUB_HEAD(void, AccumxOES, GLenum op, GLfixed value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, AccumxOES,op,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, BitmapxOES, GLsizei width, GLsizei height, GLfixed xorig, GLfixed yorig, GLfixed xmove, GLfixed ymove, const GLubyte* bitmap) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, BitmapxOES,width,height,xorig,yorig,xmove,ymove,bitmap) -DECLARE_GL_FUNCTION_STUB_HEAD(void, BlendColorxOES, GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, BlendColorxOES,red,green,blue,alpha) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ClearAccumxOES, GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ClearAccumxOES,red,green,blue,alpha) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Color3xOES, GLfixed red, GLfixed green, GLfixed blue) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Color3xOES,red,green,blue) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Color3xvOES,const GLfixed* components) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Color3xvOES,components) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Color4xvOES,const GLfixed* components) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Color4xvOES,components) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ConvolutionParameterxOES, GLenum target, GLenum pname, GLfixed param) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ConvolutionParameterxOES,target,pname,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ConvolutionParameterxvOES, GLenum target, GLenum pname, const GLfixed* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ConvolutionParameterxvOES,target,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, EvalCoord1xOES, GLfixed u) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, EvalCoord1xOES,u) -DECLARE_GL_FUNCTION_STUB_HEAD(void, EvalCoord1xvOES,const GLfixed* coords) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, EvalCoord1xvOES,coords) -DECLARE_GL_FUNCTION_STUB_HEAD(void, EvalCoord2xOES, GLfixed u, GLfixed v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, EvalCoord2xOES,u,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, EvalCoord2xvOES,const GLfixed* coords) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, EvalCoord2xvOES,coords) -DECLARE_GL_FUNCTION_STUB_HEAD(void, FeedbackBufferxOES, GLsizei n, GLenum type, const GLfixed* buffer) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, FeedbackBufferxOES,n,type,buffer) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetConvolutionParameterxvOES, GLenum target, GLenum pname, GLfixed* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetConvolutionParameterxvOES,target,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetHistogramParameterxvOES, GLenum target, GLenum pname, GLfixed* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetHistogramParameterxvOES,target,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetLightxOES, GLenum light, GLenum pname, GLfixed* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetLightxOES,light,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetMapxvOES, GLenum target, GLenum query, GLfixed* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetMapxvOES,target,query,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetMaterialxOES, GLenum face, GLenum pname, GLfixed param) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetMaterialxOES,face,pname,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetPixelMapxv, GLenum map, GLint size, GLfixed* values) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetPixelMapxv,map,size,values) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetTexGenxvOES, GLenum coord, GLenum pname, GLfixed* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetTexGenxvOES,coord,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetTexLevelParameterxvOES, GLenum target, GLint level, GLenum pname, GLfixed* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetTexLevelParameterxvOES,target,level,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, IndexxOES, GLfixed component) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, IndexxOES,component) -DECLARE_GL_FUNCTION_STUB_HEAD(void, IndexxvOES,const GLfixed* component) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, IndexxvOES,component) -DECLARE_GL_FUNCTION_STUB_HEAD(void, LoadTransposeMatrixxOES,const GLfixed* m) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, LoadTransposeMatrixxOES,m) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Map1xOES, GLenum target, GLfixed u1, GLfixed u2, GLint stride, GLint order, GLfixed points) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Map1xOES,target,u1,u2,stride,order,points) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Map2xOES, GLenum target, GLfixed u1, GLfixed u2, GLint ustride, GLint uorder, GLfixed v1, GLfixed v2, GLint vstride, GLint vorder, GLfixed points) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Map2xOES,target,u1,u2,ustride,uorder,v1,v2,vstride,vorder,points) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MapGrid1xOES, GLint n, GLfixed u1, GLfixed u2) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MapGrid1xOES,n,u1,u2) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MapGrid2xOES, GLint n, GLfixed u1, GLfixed u2, GLfixed v1, GLfixed v2) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MapGrid2xOES,n,u1,u2,v1,v2) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultTransposeMatrixxOES,const GLfixed* m) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultTransposeMatrixxOES,m) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexCoord1xOES, GLenum texture, GLfixed s) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexCoord1xOES,texture,s) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexCoord1xvOES, GLenum texture, const GLfixed* coords) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexCoord1xvOES,texture,coords) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexCoord2xOES, GLenum texture, GLfixed s, GLfixed t) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexCoord2xOES,texture,s,t) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexCoord2xvOES, GLenum texture, const GLfixed* coords) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexCoord2xvOES,texture,coords) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexCoord3xOES, GLenum texture, GLfixed s, GLfixed t, GLfixed r) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexCoord3xOES,texture,s,t,r) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexCoord3xvOES, GLenum texture, const GLfixed* coords) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexCoord3xvOES,texture,coords) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexCoord4xvOES, GLenum texture, const GLfixed* coords) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexCoord4xvOES,texture,coords) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Normal3xvOES,const GLfixed* coords) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Normal3xvOES,coords) -DECLARE_GL_FUNCTION_STUB_HEAD(void, PassThroughxOES, GLfixed token) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, PassThroughxOES,token) -DECLARE_GL_FUNCTION_STUB_HEAD(void, PixelMapx, GLenum map, GLint size, const GLfixed* values) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, PixelMapx,map,size,values) -DECLARE_GL_FUNCTION_STUB_HEAD(void, PixelStorex, GLenum pname, GLfixed param) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, PixelStorex,pname,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, PixelTransferxOES, GLenum pname, GLfixed param) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, PixelTransferxOES,pname,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, PixelZoomxOES, GLfixed xfactor, GLfixed yfactor) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, PixelZoomxOES,xfactor,yfactor) -DECLARE_GL_FUNCTION_STUB_HEAD(void, PrioritizeTexturesxOES, GLsizei n, const GLuint* textures, const GLfixed* priorities) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, PrioritizeTexturesxOES,n,textures,priorities) -DECLARE_GL_FUNCTION_STUB_HEAD(void, RasterPos2xOES, GLfixed x, GLfixed y) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, RasterPos2xOES,x,y) -DECLARE_GL_FUNCTION_STUB_HEAD(void, RasterPos2xvOES,const GLfixed* coords) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, RasterPos2xvOES,coords) -DECLARE_GL_FUNCTION_STUB_HEAD(void, RasterPos3xOES, GLfixed x, GLfixed y, GLfixed z) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, RasterPos3xOES,x,y,z) -DECLARE_GL_FUNCTION_STUB_HEAD(void, RasterPos3xvOES,const GLfixed* coords) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, RasterPos3xvOES,coords) -DECLARE_GL_FUNCTION_STUB_HEAD(void, RasterPos4xOES, GLfixed x, GLfixed y, GLfixed z, GLfixed w) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, RasterPos4xOES,x,y,z,w) -DECLARE_GL_FUNCTION_STUB_HEAD(void, RasterPos4xvOES,const GLfixed* coords) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, RasterPos4xvOES,coords) -DECLARE_GL_FUNCTION_STUB_HEAD(void, RectxOES, GLfixed x1, GLfixed y1, GLfixed x2, GLfixed y2) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, RectxOES,x1,y1,x2,y2) -DECLARE_GL_FUNCTION_STUB_HEAD(void, RectxvOES,const GLfixed* v1, const GLfixed* v2) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, RectxvOES,v1,v2) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexCoord1xOES, GLfixed s) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexCoord1xOES,s) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexCoord1xvOES,const GLfixed* coords) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexCoord1xvOES,coords) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexCoord2xOES, GLfixed s, GLfixed t) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexCoord2xOES,s,t) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexCoord2xvOES,const GLfixed* coords) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexCoord2xvOES,coords) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexCoord3xOES, GLfixed s, GLfixed t, GLfixed r) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexCoord3xOES,s,t,r) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexCoord3xvOES,const GLfixed* coords) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexCoord3xvOES,coords) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexCoord4xOES, GLfixed s, GLfixed t, GLfixed r, GLfixed q) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexCoord4xOES,s,t,r,q) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexCoord4xvOES,const GLfixed* coords) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexCoord4xvOES,coords) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexGenxOES, GLenum coord, GLenum pname, GLfixed param) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexGenxOES,coord,pname,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexGenxvOES, GLenum coord, GLenum pname, const GLfixed* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexGenxvOES,coord,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Vertex2xOES, GLfixed x) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Vertex2xOES,x) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Vertex2xvOES,const GLfixed* coords) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Vertex2xvOES,coords) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Vertex3xOES, GLfixed x, GLfixed y) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Vertex3xOES,x,y) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Vertex3xvOES,const GLfixed* coords) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Vertex3xvOES,coords) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Vertex4xOES, GLfixed x, GLfixed y, GLfixed z) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Vertex4xOES,x,y,z) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Vertex4xvOES,const GLfixed* coords) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Vertex4xvOES,coords) -DECLARE_GL_FUNCTION_STUB_HEAD(GLbitfield, QueryMatrixxOES, GLfixed* mantissa, GLint* exponent) DECLARE_GL_FUNCTION_STUB_END(GLbitfield, QueryMatrixxOES,mantissa,exponent) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ClearDepthfOES, GLclampf depth) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ClearDepthfOES,depth) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ClipPlanefOES, GLenum plane, const GLfloat* equation) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ClipPlanefOES,plane,equation) -DECLARE_GL_FUNCTION_STUB_HEAD(void, DepthRangefOES, GLclampf n, GLclampf f) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, DepthRangefOES,n,f) -DECLARE_GL_FUNCTION_STUB_HEAD(void, FrustumfOES, GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, FrustumfOES,l,r,b,t,n,f) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetClipPlanefOES, GLenum plane, GLfloat* equation) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetClipPlanefOES,plane,equation) -DECLARE_GL_FUNCTION_STUB_HEAD(void, OrthofOES, GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, OrthofOES,l,r,b,t,n,f) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TbufferMask3DFX, GLuint mask) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TbufferMask3DFX,mask) -DECLARE_GL_FUNCTION_STUB_HEAD(void, DebugMessageEnableAMD, GLenum category, GLenum severity, GLsizei count, const GLuint* ids, GLboolean enabled) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, DebugMessageEnableAMD,category,severity,count,ids,enabled) -DECLARE_GL_FUNCTION_STUB_HEAD(void, DebugMessageInsertAMD, GLenum category, GLenum severity, GLuint id, GLsizei length, const GLchar* buf) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, DebugMessageInsertAMD,category,severity,id,length,buf) -DECLARE_GL_FUNCTION_STUB_HEAD(void, DebugMessageCallbackAMD, GLDEBUGPROCAMD callback, void* userParam) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, DebugMessageCallbackAMD,callback,userParam) -DECLARE_GL_FUNCTION_STUB_HEAD(GLuint, GetDebugMessageLogAMD, GLuint count, GLsizei bufSize, GLenum* categories, GLuint* severities, GLuint* ids, GLsizei* lengths, GLchar* message) DECLARE_GL_FUNCTION_STUB_END(GLuint, GetDebugMessageLogAMD,count,bufSize,categories,severities,ids,lengths,message) -DECLARE_GL_FUNCTION_STUB_HEAD(void, BlendFuncIndexedAMD, GLuint buf, GLenum src, GLenum dst) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, BlendFuncIndexedAMD,buf,src,dst) -DECLARE_GL_FUNCTION_STUB_HEAD(void, BlendFuncSeparateIndexedAMD, GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, BlendFuncSeparateIndexedAMD,buf,srcRGB,dstRGB,srcAlpha,dstAlpha) -DECLARE_GL_FUNCTION_STUB_HEAD(void, BlendEquationIndexedAMD, GLuint buf, GLenum mode) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, BlendEquationIndexedAMD,buf,mode) -DECLARE_GL_FUNCTION_STUB_HEAD(void, BlendEquationSeparateIndexedAMD, GLuint buf, GLenum modeRGB, GLenum modeAlpha) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, BlendEquationSeparateIndexedAMD,buf,modeRGB,modeAlpha) -DECLARE_GL_FUNCTION_STUB_HEAD(void, RenderbufferStorageMultisampleAdvancedAMD, GLenum target, GLsizei samples, GLsizei storageSamples, GLenum internalformat, GLsizei width, GLsizei height) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, RenderbufferStorageMultisampleAdvancedAMD,target,samples,storageSamples,internalformat,width,height) -DECLARE_GL_FUNCTION_STUB_HEAD(void, NamedRenderbufferStorageMultisampleAdvancedAMD, GLuint renderbuffer, GLsizei samples, GLsizei storageSamples, GLenum internalformat, GLsizei width, GLsizei height) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, NamedRenderbufferStorageMultisampleAdvancedAMD,renderbuffer,samples,storageSamples,internalformat,width,height) -DECLARE_GL_FUNCTION_STUB_HEAD(void, FramebufferSamplePositionsfvAMD, GLenum target, GLuint numsamples, GLuint pixelindex, const GLfloat* values) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, FramebufferSamplePositionsfvAMD,target,numsamples,pixelindex,values) -DECLARE_GL_FUNCTION_STUB_HEAD(void, NamedFramebufferSamplePositionsfvAMD, GLuint framebuffer, GLuint numsamples, GLuint pixelindex, const GLfloat* values) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, NamedFramebufferSamplePositionsfvAMD,framebuffer,numsamples,pixelindex,values) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetFramebufferParameterfvAMD, GLenum target, GLenum pname, GLuint numsamples, GLuint pixelindex, GLsizei size, GLfloat* values) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetFramebufferParameterfvAMD,target,pname,numsamples,pixelindex,size,values) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetNamedFramebufferParameterfvAMD, GLuint framebuffer, GLenum pname, GLuint numsamples, GLuint pixelindex, GLsizei size, GLfloat* values) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetNamedFramebufferParameterfvAMD,framebuffer,pname,numsamples,pixelindex,size,values) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Uniform1i64NV, GLint location, GLint64EXT x) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Uniform1i64NV,location,x) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Uniform2i64NV, GLint location, GLint64EXT x, GLint64EXT y) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Uniform2i64NV,location,x,y) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Uniform3i64NV, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Uniform3i64NV,location,x,y,z) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Uniform4i64NV, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Uniform4i64NV,location,x,y,z,w) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Uniform1i64vNV, GLint location, GLsizei count, const GLint64EXT* value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Uniform1i64vNV,location,count,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Uniform2i64vNV, GLint location, GLsizei count, const GLint64EXT* value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Uniform2i64vNV,location,count,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Uniform3i64vNV, GLint location, GLsizei count, const GLint64EXT* value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Uniform3i64vNV,location,count,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Uniform4i64vNV, GLint location, GLsizei count, const GLint64EXT* value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Uniform4i64vNV,location,count,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Uniform1ui64NV, GLint location, GLuint64EXT x) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Uniform1ui64NV,location,x) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Uniform2ui64NV, GLint location, GLuint64EXT x, GLuint64EXT y) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Uniform2ui64NV,location,x,y) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Uniform3ui64NV, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Uniform3ui64NV,location,x,y,z) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Uniform4ui64NV, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Uniform4ui64NV,location,x,y,z,w) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Uniform1ui64vNV, GLint location, GLsizei count, const GLuint64EXT* value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Uniform1ui64vNV,location,count,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Uniform2ui64vNV, GLint location, GLsizei count, const GLuint64EXT* value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Uniform2ui64vNV,location,count,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Uniform3ui64vNV, GLint location, GLsizei count, const GLuint64EXT* value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Uniform3ui64vNV,location,count,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Uniform4ui64vNV, GLint location, GLsizei count, const GLuint64EXT* value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Uniform4ui64vNV,location,count,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetUniformi64vNV, GLuint program, GLint location, GLint64EXT* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetUniformi64vNV,program,location,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetUniformui64vNV, GLuint program, GLint location, GLuint64EXT* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetUniformui64vNV,program,location,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniform1i64NV, GLuint program, GLint location, GLint64EXT x) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniform1i64NV,program,location,x) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniform2i64NV, GLuint program, GLint location, GLint64EXT x, GLint64EXT y) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniform2i64NV,program,location,x,y) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniform3i64NV, GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniform3i64NV,program,location,x,y,z) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniform4i64NV, GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniform4i64NV,program,location,x,y,z,w) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniform1i64vNV, GLuint program, GLint location, GLsizei count, const GLint64EXT* value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniform1i64vNV,program,location,count,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniform2i64vNV, GLuint program, GLint location, GLsizei count, const GLint64EXT* value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniform2i64vNV,program,location,count,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniform3i64vNV, GLuint program, GLint location, GLsizei count, const GLint64EXT* value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniform3i64vNV,program,location,count,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniform4i64vNV, GLuint program, GLint location, GLsizei count, const GLint64EXT* value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniform4i64vNV,program,location,count,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniform1ui64NV, GLuint program, GLint location, GLuint64EXT x) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniform1ui64NV,program,location,x) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniform2ui64NV, GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniform2ui64NV,program,location,x,y) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniform3ui64NV, GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniform3ui64NV,program,location,x,y,z) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniform4ui64NV, GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniform4ui64NV,program,location,x,y,z,w) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniform1ui64vNV, GLuint program, GLint location, GLsizei count, const GLuint64EXT* value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniform1ui64vNV,program,location,count,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniform2ui64vNV, GLuint program, GLint location, GLsizei count, const GLuint64EXT* value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniform2ui64vNV,program,location,count,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniform3ui64vNV, GLuint program, GLint location, GLsizei count, const GLuint64EXT* value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniform3ui64vNV,program,location,count,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniform4ui64vNV, GLuint program, GLint location, GLsizei count, const GLuint64EXT* value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniform4ui64vNV,program,location,count,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribParameteriAMD, GLuint index, GLenum pname, GLint param) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribParameteriAMD,index,pname,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiDrawArraysIndirectAMD, GLenum mode, const void* indirect, GLsizei primcount, GLsizei stride) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiDrawArraysIndirectAMD,mode,indirect,primcount,stride) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiDrawElementsIndirectAMD, GLenum mode, GLenum type, const void* indirect, GLsizei primcount, GLsizei stride) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiDrawElementsIndirectAMD,mode,type,indirect,primcount,stride) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GenNamesAMD, GLenum identifier, GLuint num, GLuint* names) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GenNamesAMD,identifier,num,names) -DECLARE_GL_FUNCTION_STUB_HEAD(void, DeleteNamesAMD, GLenum identifier, GLuint num, const GLuint* names) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, DeleteNamesAMD,identifier,num,names) -DECLARE_GL_FUNCTION_STUB_HEAD(GLboolean, IsNameAMD, GLenum identifier, GLuint name) DECLARE_GL_FUNCTION_STUB_END(GLboolean, IsNameAMD,identifier,name) -DECLARE_GL_FUNCTION_STUB_HEAD(void, QueryObjectParameteruiAMD, GLenum target, GLuint id, GLenum pname, GLuint param) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, QueryObjectParameteruiAMD,target,id,pname,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetPerfMonitorGroupsAMD, GLint* numGroups, GLsizei groupsSize, GLuint* groups) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetPerfMonitorGroupsAMD,numGroups,groupsSize,groups) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetPerfMonitorCountersAMD, GLuint group, GLint* numCounters, GLint* maxActiveCounters, GLsizei counterSize, GLuint* counters) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetPerfMonitorCountersAMD,group,numCounters,maxActiveCounters,counterSize,counters) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetPerfMonitorGroupStringAMD, GLuint group, GLsizei bufSize, GLsizei* length, GLchar* groupString) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetPerfMonitorGroupStringAMD,group,bufSize,length,groupString) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetPerfMonitorCounterStringAMD, GLuint group, GLuint counter, GLsizei bufSize, GLsizei* length, GLchar* counterString) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetPerfMonitorCounterStringAMD,group,counter,bufSize,length,counterString) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetPerfMonitorCounterInfoAMD, GLuint group, GLuint counter, GLenum pname, void* data) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetPerfMonitorCounterInfoAMD,group,counter,pname,data) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GenPerfMonitorsAMD, GLsizei n, GLuint* monitors) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GenPerfMonitorsAMD,n,monitors) -DECLARE_GL_FUNCTION_STUB_HEAD(void, DeletePerfMonitorsAMD, GLsizei n, GLuint* monitors) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, DeletePerfMonitorsAMD,n,monitors) -DECLARE_GL_FUNCTION_STUB_HEAD(void, SelectPerfMonitorCountersAMD, GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint* counterList) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, SelectPerfMonitorCountersAMD,monitor,enable,group,numCounters,counterList) -DECLARE_GL_FUNCTION_STUB_HEAD(void, BeginPerfMonitorAMD, GLuint monitor) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, BeginPerfMonitorAMD,monitor) -DECLARE_GL_FUNCTION_STUB_HEAD(void, EndPerfMonitorAMD, GLuint monitor) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, EndPerfMonitorAMD,monitor) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetPerfMonitorCounterDataAMD, GLuint monitor, GLenum pname, GLsizei dataSize, GLuint* data, GLint* bytesWritten) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetPerfMonitorCounterDataAMD,monitor,pname,dataSize,data,bytesWritten) -DECLARE_GL_FUNCTION_STUB_HEAD(void, SetMultisamplefvAMD, GLenum pname, GLuint index, const GLfloat* val) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, SetMultisamplefvAMD,pname,index,val) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexStorageSparseAMD, GLenum target, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLsizei layers, GLbitfield flags) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexStorageSparseAMD,target,internalFormat,width,height,depth,layers,flags) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TextureStorageSparseAMD, GLuint texture, GLenum target, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLsizei layers, GLbitfield flags) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TextureStorageSparseAMD,texture,target,internalFormat,width,height,depth,layers,flags) -DECLARE_GL_FUNCTION_STUB_HEAD(void, StencilOpValueAMD, GLenum face, GLuint value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, StencilOpValueAMD,face,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TessellationFactorAMD, GLfloat factor) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TessellationFactorAMD,factor) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TessellationModeAMD, GLenum mode) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TessellationModeAMD,mode) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ElementPointerAPPLE, GLenum type, const void* pointer) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ElementPointerAPPLE,type,pointer) -DECLARE_GL_FUNCTION_STUB_HEAD(void, DrawElementArrayAPPLE, GLenum mode, GLint first, GLsizei count) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, DrawElementArrayAPPLE,mode,first,count) -DECLARE_GL_FUNCTION_STUB_HEAD(void, DrawRangeElementArrayAPPLE, GLenum mode, GLuint start, GLuint end, GLint first, GLsizei count) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, DrawRangeElementArrayAPPLE,mode,start,end,first,count) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiDrawElementArrayAPPLE, GLenum mode, const GLint* first, const GLsizei* count, GLsizei primcount) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiDrawElementArrayAPPLE,mode,first,count,primcount) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiDrawRangeElementArrayAPPLE, GLenum mode, GLuint start, GLuint end, const GLint* first, const GLsizei* count, GLsizei primcount) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiDrawRangeElementArrayAPPLE,mode,start,end,first,count,primcount) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GenFencesAPPLE, GLsizei n, GLuint* fences) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GenFencesAPPLE,n,fences) -DECLARE_GL_FUNCTION_STUB_HEAD(void, DeleteFencesAPPLE, GLsizei n, const GLuint* fences) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, DeleteFencesAPPLE,n,fences) -DECLARE_GL_FUNCTION_STUB_HEAD(void, SetFenceAPPLE, GLuint fence) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, SetFenceAPPLE,fence) -DECLARE_GL_FUNCTION_STUB_HEAD(GLboolean, IsFenceAPPLE, GLuint fence) DECLARE_GL_FUNCTION_STUB_END(GLboolean, IsFenceAPPLE,fence) -DECLARE_GL_FUNCTION_STUB_HEAD(GLboolean, TestFenceAPPLE, GLuint fence) DECLARE_GL_FUNCTION_STUB_END(GLboolean, TestFenceAPPLE,fence) -DECLARE_GL_FUNCTION_STUB_HEAD(void, FinishFenceAPPLE, GLuint fence) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, FinishFenceAPPLE,fence) -DECLARE_GL_FUNCTION_STUB_HEAD(GLboolean, TestObjectAPPLE, GLenum object, GLuint name) DECLARE_GL_FUNCTION_STUB_END(GLboolean, TestObjectAPPLE,object,name) -DECLARE_GL_FUNCTION_STUB_HEAD(void, FinishObjectAPPLE, GLenum object, GLint name) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, FinishObjectAPPLE,object,name) -DECLARE_GL_FUNCTION_STUB_HEAD(void, BufferParameteriAPPLE, GLenum target, GLenum pname, GLint param) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, BufferParameteriAPPLE,target,pname,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, FlushMappedBufferRangeAPPLE, GLenum target, GLintptr offset, GLsizeiptr size) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, FlushMappedBufferRangeAPPLE,target,offset,size) -DECLARE_GL_FUNCTION_STUB_HEAD(GLenum, ObjectPurgeableAPPLE, GLenum objectType, GLuint name, GLenum option) DECLARE_GL_FUNCTION_STUB_END(GLenum, ObjectPurgeableAPPLE,objectType,name,option) -DECLARE_GL_FUNCTION_STUB_HEAD(GLenum, ObjectUnpurgeableAPPLE, GLenum objectType, GLuint name, GLenum option) DECLARE_GL_FUNCTION_STUB_END(GLenum, ObjectUnpurgeableAPPLE,objectType,name,option) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetObjectParameterivAPPLE, GLenum objectType, GLuint name, GLenum pname, GLint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetObjectParameterivAPPLE,objectType,name,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TextureRangeAPPLE, GLenum target, GLsizei length, const void* pointer) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TextureRangeAPPLE,target,length,pointer) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetTexParameterPointervAPPLE, GLenum target, GLenum pname, void* *params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetTexParameterPointervAPPLE,target,pname,*params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, BindVertexArrayAPPLE, GLuint array) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, BindVertexArrayAPPLE,array) -DECLARE_GL_FUNCTION_STUB_HEAD(void, DeleteVertexArraysAPPLE, GLsizei n, const GLuint* arrays) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, DeleteVertexArraysAPPLE,n,arrays) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GenVertexArraysAPPLE, GLsizei n, GLuint* arrays) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GenVertexArraysAPPLE,n,arrays) -DECLARE_GL_FUNCTION_STUB_HEAD(GLboolean, IsVertexArrayAPPLE, GLuint array) DECLARE_GL_FUNCTION_STUB_END(GLboolean, IsVertexArrayAPPLE,array) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexArrayRangeAPPLE, GLsizei length, void* pointer) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexArrayRangeAPPLE,length,pointer) -DECLARE_GL_FUNCTION_STUB_HEAD(void, FlushVertexArrayRangeAPPLE, GLsizei length, void* pointer) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, FlushVertexArrayRangeAPPLE,length,pointer) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexArrayParameteriAPPLE, GLenum pname, GLint param) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexArrayParameteriAPPLE,pname,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, EnableVertexAttribAPPLE, GLuint index, GLenum pname) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, EnableVertexAttribAPPLE,index,pname) -DECLARE_GL_FUNCTION_STUB_HEAD(void, DisableVertexAttribAPPLE, GLuint index, GLenum pname) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, DisableVertexAttribAPPLE,index,pname) -DECLARE_GL_FUNCTION_STUB_HEAD(GLboolean, IsVertexAttribEnabledAPPLE, GLuint index, GLenum pname) DECLARE_GL_FUNCTION_STUB_END(GLboolean, IsVertexAttribEnabledAPPLE,index,pname) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MapVertexAttrib1dAPPLE, GLuint index, GLuint size, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble* points) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MapVertexAttrib1dAPPLE,index,size,u1,u2,stride,order,points) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MapVertexAttrib1fAPPLE, GLuint index, GLuint size, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat* points) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MapVertexAttrib1fAPPLE,index,size,u1,u2,stride,order,points) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MapVertexAttrib2dAPPLE, GLuint index, GLuint size, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble* points) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MapVertexAttrib2dAPPLE,index,size,u1,u2,ustride,uorder,v1,v2,vstride,vorder,points) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MapVertexAttrib2fAPPLE, GLuint index, GLuint size, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat* points) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MapVertexAttrib2fAPPLE,index,size,u1,u2,ustride,uorder,v1,v2,vstride,vorder,points) -DECLARE_GL_FUNCTION_STUB_HEAD(void, DrawBuffersATI, GLsizei n, const GLenum* bufs) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, DrawBuffersATI,n,bufs) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ElementPointerATI, GLenum type, const void* pointer) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ElementPointerATI,type,pointer) -DECLARE_GL_FUNCTION_STUB_HEAD(void, DrawElementArrayATI, GLenum mode, GLsizei count) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, DrawElementArrayATI,mode,count) -DECLARE_GL_FUNCTION_STUB_HEAD(void, DrawRangeElementArrayATI, GLenum mode, GLuint start, GLuint end, GLsizei count) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, DrawRangeElementArrayATI,mode,start,end,count) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexBumpParameterivATI, GLenum pname, const GLint* param) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexBumpParameterivATI,pname,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexBumpParameterfvATI, GLenum pname, const GLfloat* param) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexBumpParameterfvATI,pname,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetTexBumpParameterivATI, GLenum pname, GLint* param) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetTexBumpParameterivATI,pname,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetTexBumpParameterfvATI, GLenum pname, GLfloat* param) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetTexBumpParameterfvATI,pname,param) -DECLARE_GL_FUNCTION_STUB_HEAD(GLuint, GenFragmentShadersATI, GLuint range) DECLARE_GL_FUNCTION_STUB_END(GLuint, GenFragmentShadersATI,range) -DECLARE_GL_FUNCTION_STUB_HEAD(void, BindFragmentShaderATI, GLuint id) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, BindFragmentShaderATI,id) -DECLARE_GL_FUNCTION_STUB_HEAD(void, DeleteFragmentShaderATI, GLuint id) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, DeleteFragmentShaderATI,id) -DECLARE_GL_FUNCTION_STUB_HEAD(void, BeginFragmentShaderATI,void) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, BeginFragmentShaderATI,) -DECLARE_GL_FUNCTION_STUB_HEAD(void, EndFragmentShaderATI,void) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, EndFragmentShaderATI,) -DECLARE_GL_FUNCTION_STUB_HEAD(void, PassTexCoordATI, GLuint dst, GLuint coord, GLenum swizzle) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, PassTexCoordATI,dst,coord,swizzle) -DECLARE_GL_FUNCTION_STUB_HEAD(void, SampleMapATI, GLuint dst, GLuint interp, GLenum swizzle) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, SampleMapATI,dst,interp,swizzle) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ColorFragmentOp1ATI, GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ColorFragmentOp1ATI,op,dst,dstMask,dstMod,arg1,arg1Rep,arg1Mod) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ColorFragmentOp2ATI, GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ColorFragmentOp2ATI,op,dst,dstMask,dstMod,arg1,arg1Rep,arg1Mod,arg2,arg2Rep,arg2Mod) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ColorFragmentOp3ATI, 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) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ColorFragmentOp3ATI,op,dst,dstMask,dstMod,arg1,arg1Rep,arg1Mod,arg2,arg2Rep,arg2Mod,arg3,arg3Rep,arg3Mod) -DECLARE_GL_FUNCTION_STUB_HEAD(void, AlphaFragmentOp1ATI, GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, AlphaFragmentOp1ATI,op,dst,dstMod,arg1,arg1Rep,arg1Mod) -DECLARE_GL_FUNCTION_STUB_HEAD(void, AlphaFragmentOp2ATI, GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, AlphaFragmentOp2ATI,op,dst,dstMod,arg1,arg1Rep,arg1Mod,arg2,arg2Rep,arg2Mod) -DECLARE_GL_FUNCTION_STUB_HEAD(void, AlphaFragmentOp3ATI, GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, AlphaFragmentOp3ATI,op,dst,dstMod,arg1,arg1Rep,arg1Mod,arg2,arg2Rep,arg2Mod,arg3,arg3Rep,arg3Mod) -DECLARE_GL_FUNCTION_STUB_HEAD(void, SetFragmentShaderConstantATI, GLuint dst, const GLfloat* value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, SetFragmentShaderConstantATI,dst,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, UnmapObjectBufferATI, GLuint buffer) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, UnmapObjectBufferATI,buffer) -DECLARE_GL_FUNCTION_STUB_HEAD(void, PNTrianesiATI, GLenum pname, GLint param) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, PNTrianesiATI,pname,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, PNTrianesfATI, GLenum pname, GLfloat param) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, PNTrianesfATI,pname,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, StencilOpSeparateATI, GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, StencilOpSeparateATI,face,sfail,dpfail,dppass) -DECLARE_GL_FUNCTION_STUB_HEAD(void, StencilFuncSeparateATI, GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, StencilFuncSeparateATI,frontfunc,backfunc,ref,mask) -DECLARE_GL_FUNCTION_STUB_HEAD(GLuint, NewObjectBufferATI, GLsizei size, const void* pointer, GLenum usage) DECLARE_GL_FUNCTION_STUB_END(GLuint, NewObjectBufferATI,size,pointer,usage) -DECLARE_GL_FUNCTION_STUB_HEAD(GLboolean, IsObjectBufferATI, GLuint buffer) DECLARE_GL_FUNCTION_STUB_END(GLboolean, IsObjectBufferATI,buffer) -DECLARE_GL_FUNCTION_STUB_HEAD(void, UpdateObjectBufferATI, GLuint buffer, GLuint offset, GLsizei size, const void* pointer, GLenum preserve) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, UpdateObjectBufferATI,buffer,offset,size,pointer,preserve) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetObjectBufferfvATI, GLuint buffer, GLenum pname, GLfloat* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetObjectBufferfvATI,buffer,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetObjectBufferivATI, GLuint buffer, GLenum pname, GLint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetObjectBufferivATI,buffer,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, FreeObjectBufferATI, GLuint buffer) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, FreeObjectBufferATI,buffer) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ArrayObjectATI, GLenum array, GLint size, GLenum type, GLsizei stride, GLuint buffer, GLuint offset) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ArrayObjectATI,array,size,type,stride,buffer,offset) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetArrayObjectfvATI, GLenum array, GLenum pname, GLfloat* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetArrayObjectfvATI,array,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetArrayObjectivATI, GLenum array, GLenum pname, GLint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetArrayObjectivATI,array,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VariantArrayObjectATI, GLuint id, GLenum type, GLsizei stride, GLuint buffer, GLuint offset) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VariantArrayObjectATI,id,type,stride,buffer,offset) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetVariantArrayObjectfvATI, GLuint id, GLenum pname, GLfloat* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetVariantArrayObjectfvATI,id,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetVariantArrayObjectivATI, GLuint id, GLenum pname, GLint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetVariantArrayObjectivATI,id,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribArrayObjectATI, GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLuint buffer, GLuint offset) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribArrayObjectATI,index,size,type,normalized,stride,buffer,offset) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetVertexAttribArrayObjectfvATI, GLuint index, GLenum pname, GLfloat* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetVertexAttribArrayObjectfvATI,index,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetVertexAttribArrayObjectivATI, GLuint index, GLenum pname, GLint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetVertexAttribArrayObjectivATI,index,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexStream1sATI, GLenum stream, GLshort x) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexStream1sATI,stream,x) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexStream1svATI, GLenum stream, const GLshort* coords) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexStream1svATI,stream,coords) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexStream1iATI, GLenum stream, GLint x) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexStream1iATI,stream,x) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexStream1ivATI, GLenum stream, const GLint* coords) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexStream1ivATI,stream,coords) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexStream1fATI, GLenum stream, GLfloat x) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexStream1fATI,stream,x) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexStream1fvATI, GLenum stream, const GLfloat* coords) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexStream1fvATI,stream,coords) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexStream1dATI, GLenum stream, GLdouble x) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexStream1dATI,stream,x) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexStream1dvATI, GLenum stream, const GLdouble* coords) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexStream1dvATI,stream,coords) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexStream2sATI, GLenum stream, GLshort x, GLshort y) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexStream2sATI,stream,x,y) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexStream2svATI, GLenum stream, const GLshort* coords) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexStream2svATI,stream,coords) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexStream2iATI, GLenum stream, GLint x, GLint y) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexStream2iATI,stream,x,y) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexStream2ivATI, GLenum stream, const GLint* coords) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexStream2ivATI,stream,coords) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexStream2fATI, GLenum stream, GLfloat x, GLfloat y) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexStream2fATI,stream,x,y) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexStream2fvATI, GLenum stream, const GLfloat* coords) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexStream2fvATI,stream,coords) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexStream2dATI, GLenum stream, GLdouble x, GLdouble y) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexStream2dATI,stream,x,y) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexStream2dvATI, GLenum stream, const GLdouble* coords) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexStream2dvATI,stream,coords) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexStream3sATI, GLenum stream, GLshort x, GLshort y, GLshort z) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexStream3sATI,stream,x,y,z) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexStream3svATI, GLenum stream, const GLshort* coords) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexStream3svATI,stream,coords) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexStream3iATI, GLenum stream, GLint x, GLint y, GLint z) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexStream3iATI,stream,x,y,z) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexStream3ivATI, GLenum stream, const GLint* coords) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexStream3ivATI,stream,coords) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexStream3fATI, GLenum stream, GLfloat x, GLfloat y, GLfloat z) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexStream3fATI,stream,x,y,z) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexStream3fvATI, GLenum stream, const GLfloat* coords) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexStream3fvATI,stream,coords) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexStream3dATI, GLenum stream, GLdouble x, GLdouble y, GLdouble z) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexStream3dATI,stream,x,y,z) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexStream3dvATI, GLenum stream, const GLdouble* coords) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexStream3dvATI,stream,coords) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexStream4sATI, GLenum stream, GLshort x, GLshort y, GLshort z, GLshort w) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexStream4sATI,stream,x,y,z,w) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexStream4svATI, GLenum stream, const GLshort* coords) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexStream4svATI,stream,coords) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexStream4iATI, GLenum stream, GLint x, GLint y, GLint z, GLint w) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexStream4iATI,stream,x,y,z,w) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexStream4ivATI, GLenum stream, const GLint* coords) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexStream4ivATI,stream,coords) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexStream4fATI, GLenum stream, GLfloat x, GLfloat y, GLfloat z, GLfloat w) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexStream4fATI,stream,x,y,z,w) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexStream4fvATI, GLenum stream, const GLfloat* coords) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexStream4fvATI,stream,coords) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexStream4dATI, GLenum stream, GLdouble x, GLdouble y, GLdouble z, GLdouble w) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexStream4dATI,stream,x,y,z,w) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexStream4dvATI, GLenum stream, const GLdouble* coords) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexStream4dvATI,stream,coords) -DECLARE_GL_FUNCTION_STUB_HEAD(void, NormalStream3bATI, GLenum stream, GLbyte nx, GLbyte ny, GLbyte nz) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, NormalStream3bATI,stream,nx,ny,nz) -DECLARE_GL_FUNCTION_STUB_HEAD(void, NormalStream3bvATI, GLenum stream, const GLbyte* coords) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, NormalStream3bvATI,stream,coords) -DECLARE_GL_FUNCTION_STUB_HEAD(void, NormalStream3sATI, GLenum stream, GLshort nx, GLshort ny, GLshort nz) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, NormalStream3sATI,stream,nx,ny,nz) -DECLARE_GL_FUNCTION_STUB_HEAD(void, NormalStream3svATI, GLenum stream, const GLshort* coords) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, NormalStream3svATI,stream,coords) -DECLARE_GL_FUNCTION_STUB_HEAD(void, NormalStream3iATI, GLenum stream, GLint nx, GLint ny, GLint nz) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, NormalStream3iATI,stream,nx,ny,nz) -DECLARE_GL_FUNCTION_STUB_HEAD(void, NormalStream3ivATI, GLenum stream, const GLint* coords) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, NormalStream3ivATI,stream,coords) -DECLARE_GL_FUNCTION_STUB_HEAD(void, NormalStream3fATI, GLenum stream, GLfloat nx, GLfloat ny, GLfloat nz) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, NormalStream3fATI,stream,nx,ny,nz) -DECLARE_GL_FUNCTION_STUB_HEAD(void, NormalStream3fvATI, GLenum stream, const GLfloat* coords) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, NormalStream3fvATI,stream,coords) -DECLARE_GL_FUNCTION_STUB_HEAD(void, NormalStream3dATI, GLenum stream, GLdouble nx, GLdouble ny, GLdouble nz) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, NormalStream3dATI,stream,nx,ny,nz) -DECLARE_GL_FUNCTION_STUB_HEAD(void, NormalStream3dvATI, GLenum stream, const GLdouble* coords) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, NormalStream3dvATI,stream,coords) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ClientActiveVertexStreamATI, GLenum stream) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ClientActiveVertexStreamATI,stream) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexBlendEnviATI, GLenum pname, GLint param) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexBlendEnviATI,pname,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexBlendEnvfATI, GLenum pname, GLfloat param) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexBlendEnvfATI,pname,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, EGLImageTargetTexStorageEXT, GLenum target, GLeglImageOES image, const GLint* attrib_list) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, EGLImageTargetTexStorageEXT,target,image,attrib_list) -DECLARE_GL_FUNCTION_STUB_HEAD(void, EGLImageTargetTextureStorageEXT, GLuint texture, GLeglImageOES image, const GLint* attrib_list) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, EGLImageTargetTextureStorageEXT,texture,image,attrib_list) -DECLARE_GL_FUNCTION_STUB_HEAD(void, UniformBufferEXT, GLuint program, GLint location, GLuint buffer) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, UniformBufferEXT,program,location,buffer) -DECLARE_GL_FUNCTION_STUB_HEAD(GLint, GetUniformBufferSizeEXT, GLuint program, GLint location) DECLARE_GL_FUNCTION_STUB_END(GLint, GetUniformBufferSizeEXT,program,location) -DECLARE_GL_FUNCTION_STUB_HEAD(GLintptr, GetUniformOffsetEXT, GLuint program, GLint location) DECLARE_GL_FUNCTION_STUB_END(GLintptr, GetUniformOffsetEXT,program,location) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ColorSubTableEXT, GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const void* data) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ColorSubTableEXT,target,start,count,format,type,data) -DECLARE_GL_FUNCTION_STUB_HEAD(void, CopyColorSubTableEXT, GLenum target, GLsizei start, GLint x, GLint y, GLsizei width) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, CopyColorSubTableEXT,target,start,x,y,width) -DECLARE_GL_FUNCTION_STUB_HEAD(void, LockArraysEXT, GLint first, GLsizei count) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, LockArraysEXT,first,count) -DECLARE_GL_FUNCTION_STUB_HEAD(void, UnlockArraysEXT,void) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, UnlockArraysEXT,) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ConvolutionFilter1DEXT, GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void* image) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ConvolutionFilter1DEXT,target,internalformat,width,format,type,image) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ConvolutionFilter2DEXT, GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void* image) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ConvolutionFilter2DEXT,target,internalformat,width,height,format,type,image) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ConvolutionParameterfEXT, GLenum target, GLenum pname, GLfloat params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ConvolutionParameterfEXT,target,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ConvolutionParameterfvEXT, GLenum target, GLenum pname, const GLfloat* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ConvolutionParameterfvEXT,target,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ConvolutionParameteriEXT, GLenum target, GLenum pname, GLint params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ConvolutionParameteriEXT,target,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ConvolutionParameterivEXT, GLenum target, GLenum pname, const GLint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ConvolutionParameterivEXT,target,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, CopyConvolutionFilter1DEXT, GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, CopyConvolutionFilter1DEXT,target,internalformat,x,y,width) -DECLARE_GL_FUNCTION_STUB_HEAD(void, CopyConvolutionFilter2DEXT, GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, CopyConvolutionFilter2DEXT,target,internalformat,x,y,width,height) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetConvolutionFilterEXT, GLenum target, GLenum format, GLenum type, void* image) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetConvolutionFilterEXT,target,format,type,image) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetConvolutionParameterfvEXT, GLenum target, GLenum pname, GLfloat* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetConvolutionParameterfvEXT,target,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetConvolutionParameterivEXT, GLenum target, GLenum pname, GLint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetConvolutionParameterivEXT,target,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetSeparableFilterEXT, GLenum target, GLenum format, GLenum type, void* row, void* column, void* span) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetSeparableFilterEXT,target,format,type,row,column,span) -DECLARE_GL_FUNCTION_STUB_HEAD(void, SeparableFilter2DEXT, GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void* row, const void* column) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, SeparableFilter2DEXT,target,internalformat,width,height,format,type,row,column) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Tangent3bEXT, GLbyte tx, GLbyte ty, GLbyte tz) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Tangent3bEXT,tx,ty,tz) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Tangent3bvEXT,const GLbyte* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Tangent3bvEXT,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Tangent3dEXT, GLdouble tx, GLdouble ty, GLdouble tz) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Tangent3dEXT,tx,ty,tz) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Tangent3dvEXT,const GLdouble* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Tangent3dvEXT,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Tangent3fEXT, GLfloat tx, GLfloat ty, GLfloat tz) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Tangent3fEXT,tx,ty,tz) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Tangent3fvEXT,const GLfloat* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Tangent3fvEXT,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Tangent3iEXT, GLint tx, GLint ty, GLint tz) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Tangent3iEXT,tx,ty,tz) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Tangent3ivEXT,const GLint* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Tangent3ivEXT,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Tangent3sEXT, GLshort tx, GLshort ty, GLshort tz) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Tangent3sEXT,tx,ty,tz) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Tangent3svEXT,const GLshort* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Tangent3svEXT,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Binormal3bEXT, GLbyte bx, GLbyte by, GLbyte bz) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Binormal3bEXT,bx,by,bz) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Binormal3bvEXT,const GLbyte* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Binormal3bvEXT,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Binormal3dEXT, GLdouble bx, GLdouble by, GLdouble bz) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Binormal3dEXT,bx,by,bz) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Binormal3dvEXT,const GLdouble* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Binormal3dvEXT,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Binormal3fEXT, GLfloat bx, GLfloat by, GLfloat bz) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Binormal3fEXT,bx,by,bz) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Binormal3fvEXT,const GLfloat* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Binormal3fvEXT,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Binormal3iEXT, GLint bx, GLint by, GLint bz) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Binormal3iEXT,bx,by,bz) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Binormal3ivEXT,const GLint* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Binormal3ivEXT,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Binormal3sEXT, GLshort bx, GLshort by, GLshort bz) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Binormal3sEXT,bx,by,bz) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Binormal3svEXT,const GLshort* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Binormal3svEXT,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TangentPointerEXT, GLenum type, GLsizei stride, const void* pointer) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TangentPointerEXT,type,stride,pointer) -DECLARE_GL_FUNCTION_STUB_HEAD(void, BinormalPointerEXT, GLenum type, GLsizei stride, const void* pointer) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, BinormalPointerEXT,type,stride,pointer) -DECLARE_GL_FUNCTION_STUB_HEAD(void, CopyTexImage1DEXT, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, CopyTexImage1DEXT,target,level,internalformat,x,y,width,border) -DECLARE_GL_FUNCTION_STUB_HEAD(void, CopyTexSubImage1DEXT, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, CopyTexSubImage1DEXT,target,level,xoffset,x,y,width) -DECLARE_GL_FUNCTION_STUB_HEAD(void, CullParameterdvEXT, GLenum pname, GLdouble* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, CullParameterdvEXT,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, CullParameterfvEXT, GLenum pname, GLfloat* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, CullParameterfvEXT,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, LabelObjectEXT, GLenum type, GLuint object, GLsizei length, const GLchar* label) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, LabelObjectEXT,type,object,length,label) -DECLARE_GL_FUNCTION_STUB_HEAD(void, InsertEventMarkerEXT, GLsizei length, const GLchar* marker) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, InsertEventMarkerEXT,length,marker) -DECLARE_GL_FUNCTION_STUB_HEAD(void, PushGroupMarkerEXT, GLsizei length, const GLchar* marker) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, PushGroupMarkerEXT,length,marker) -DECLARE_GL_FUNCTION_STUB_HEAD(void, PopGroupMarkerEXT,void) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, PopGroupMarkerEXT,) -DECLARE_GL_FUNCTION_STUB_HEAD(void, DepthBoundsEXT, GLclampd zmin, GLclampd zmax) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, DepthBoundsEXT,zmin,zmax) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MatrixLoadfEXT, GLenum mode, const GLfloat* m) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MatrixLoadfEXT,mode,m) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MatrixLoaddEXT, GLenum mode, const GLdouble* m) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MatrixLoaddEXT,mode,m) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MatrixMultfEXT, GLenum mode, const GLfloat* m) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MatrixMultfEXT,mode,m) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MatrixMultdEXT, GLenum mode, const GLdouble* m) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MatrixMultdEXT,mode,m) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MatrixLoadIdentityEXT, GLenum mode) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MatrixLoadIdentityEXT,mode) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MatrixRotatefEXT, GLenum mode, GLfloat ane, GLfloat x, GLfloat y, GLfloat z) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MatrixRotatefEXT,mode,ane,x,y,z) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MatrixRotatedEXT, GLenum mode, GLdouble ane, GLdouble x, GLdouble y, GLdouble z) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MatrixRotatedEXT,mode,ane,x,y,z) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MatrixScalefEXT, GLenum mode, GLfloat x, GLfloat y, GLfloat z) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MatrixScalefEXT,mode,x,y,z) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MatrixScaledEXT, GLenum mode, GLdouble x, GLdouble y, GLdouble z) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MatrixScaledEXT,mode,x,y,z) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MatrixTranslatefEXT, GLenum mode, GLfloat x, GLfloat y, GLfloat z) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MatrixTranslatefEXT,mode,x,y,z) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MatrixTranslatedEXT, GLenum mode, GLdouble x, GLdouble y, GLdouble z) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MatrixTranslatedEXT,mode,x,y,z) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MatrixFrustumEXT, GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MatrixFrustumEXT,mode,left,right,bottom,top,zNear,zFar) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MatrixOrthoEXT, GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MatrixOrthoEXT,mode,left,right,bottom,top,zNear,zFar) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MatrixPopEXT, GLenum mode) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MatrixPopEXT,mode) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MatrixPushEXT, GLenum mode) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MatrixPushEXT,mode) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ClientAttribDefaultEXT, GLbitfield mask) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ClientAttribDefaultEXT,mask) -DECLARE_GL_FUNCTION_STUB_HEAD(void, PushClientAttribDefaultEXT, GLbitfield mask) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, PushClientAttribDefaultEXT,mask) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TextureParameterfEXT, GLuint texture, GLenum target, GLenum pname, GLfloat param) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TextureParameterfEXT,texture,target,pname,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TextureParameterfvEXT, GLuint texture, GLenum target, GLenum pname, const GLfloat* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TextureParameterfvEXT,texture,target,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TextureParameteriEXT, GLuint texture, GLenum target, GLenum pname, GLint param) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TextureParameteriEXT,texture,target,pname,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TextureParameterivEXT, GLuint texture, GLenum target, GLenum pname, const GLint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TextureParameterivEXT,texture,target,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TextureImage1DEXT, GLuint texture, GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void* pixels) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TextureImage1DEXT,texture,target,level,internalformat,width,border,format,type,pixels) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TextureImage2DEXT, GLuint texture, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void* pixels) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TextureImage2DEXT,texture,target,level,internalformat,width,height,border,format,type,pixels) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TextureSubImage1DEXT, GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void* pixels) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TextureSubImage1DEXT,texture,target,level,xoffset,width,format,type,pixels) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TextureSubImage2DEXT, GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void* pixels) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TextureSubImage2DEXT,texture,target,level,xoffset,yoffset,width,height,format,type,pixels) -DECLARE_GL_FUNCTION_STUB_HEAD(void, CopyTextureImage1DEXT, GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, CopyTextureImage1DEXT,texture,target,level,internalformat,x,y,width,border) -DECLARE_GL_FUNCTION_STUB_HEAD(void, CopyTextureImage2DEXT, GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, CopyTextureImage2DEXT,texture,target,level,internalformat,x,y,width,height,border) -DECLARE_GL_FUNCTION_STUB_HEAD(void, CopyTextureSubImage1DEXT, GLuint texture, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, CopyTextureSubImage1DEXT,texture,target,level,xoffset,x,y,width) -DECLARE_GL_FUNCTION_STUB_HEAD(void, CopyTextureSubImage2DEXT, GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, CopyTextureSubImage2DEXT,texture,target,level,xoffset,yoffset,x,y,width,height) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetTextureImageEXT, GLuint texture, GLenum target, GLint level, GLenum format, GLenum type, void* pixels) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetTextureImageEXT,texture,target,level,format,type,pixels) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetTextureParameterfvEXT, GLuint texture, GLenum target, GLenum pname, GLfloat* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetTextureParameterfvEXT,texture,target,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetTextureParameterivEXT, GLuint texture, GLenum target, GLenum pname, GLint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetTextureParameterivEXT,texture,target,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetTextureLevelParameterfvEXT, GLuint texture, GLenum target, GLint level, GLenum pname, GLfloat* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetTextureLevelParameterfvEXT,texture,target,level,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetTextureLevelParameterivEXT, GLuint texture, GLenum target, GLint level, GLenum pname, GLint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetTextureLevelParameterivEXT,texture,target,level,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TextureImage3DEXT, GLuint texture, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void* pixels) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TextureImage3DEXT,texture,target,level,internalformat,width,height,depth,border,format,type,pixels) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TextureSubImage3DEXT, 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) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TextureSubImage3DEXT,texture,target,level,xoffset,yoffset,zoffset,width,height,depth,format,type,pixels) -DECLARE_GL_FUNCTION_STUB_HEAD(void, CopyTextureSubImage3DEXT, GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, CopyTextureSubImage3DEXT,texture,target,level,xoffset,yoffset,zoffset,x,y,width,height) -DECLARE_GL_FUNCTION_STUB_HEAD(void, BindMultiTextureEXT, GLenum texunit, GLenum target, GLuint texture) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, BindMultiTextureEXT,texunit,target,texture) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexCoordPointerEXT, GLenum texunit, GLint size, GLenum type, GLsizei stride, const void* pointer) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexCoordPointerEXT,texunit,size,type,stride,pointer) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexEnvfEXT, GLenum texunit, GLenum target, GLenum pname, GLfloat param) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexEnvfEXT,texunit,target,pname,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexEnvfvEXT, GLenum texunit, GLenum target, GLenum pname, const GLfloat* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexEnvfvEXT,texunit,target,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexEnviEXT, GLenum texunit, GLenum target, GLenum pname, GLint param) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexEnviEXT,texunit,target,pname,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexEnvivEXT, GLenum texunit, GLenum target, GLenum pname, const GLint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexEnvivEXT,texunit,target,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexGendEXT, GLenum texunit, GLenum coord, GLenum pname, GLdouble param) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexGendEXT,texunit,coord,pname,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexGendvEXT, GLenum texunit, GLenum coord, GLenum pname, const GLdouble* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexGendvEXT,texunit,coord,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexGenfEXT, GLenum texunit, GLenum coord, GLenum pname, GLfloat param) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexGenfEXT,texunit,coord,pname,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexGenfvEXT, GLenum texunit, GLenum coord, GLenum pname, const GLfloat* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexGenfvEXT,texunit,coord,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexGeniEXT, GLenum texunit, GLenum coord, GLenum pname, GLint param) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexGeniEXT,texunit,coord,pname,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexGenivEXT, GLenum texunit, GLenum coord, GLenum pname, const GLint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexGenivEXT,texunit,coord,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetMultiTexEnvfvEXT, GLenum texunit, GLenum target, GLenum pname, GLfloat* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetMultiTexEnvfvEXT,texunit,target,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetMultiTexEnvivEXT, GLenum texunit, GLenum target, GLenum pname, GLint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetMultiTexEnvivEXT,texunit,target,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetMultiTexGendvEXT, GLenum texunit, GLenum coord, GLenum pname, GLdouble* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetMultiTexGendvEXT,texunit,coord,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetMultiTexGenfvEXT, GLenum texunit, GLenum coord, GLenum pname, GLfloat* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetMultiTexGenfvEXT,texunit,coord,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetMultiTexGenivEXT, GLenum texunit, GLenum coord, GLenum pname, GLint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetMultiTexGenivEXT,texunit,coord,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexParameteriEXT, GLenum texunit, GLenum target, GLenum pname, GLint param) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexParameteriEXT,texunit,target,pname,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexParameterivEXT, GLenum texunit, GLenum target, GLenum pname, const GLint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexParameterivEXT,texunit,target,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexParameterfEXT, GLenum texunit, GLenum target, GLenum pname, GLfloat param) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexParameterfEXT,texunit,target,pname,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexParameterfvEXT, GLenum texunit, GLenum target, GLenum pname, const GLfloat* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexParameterfvEXT,texunit,target,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexImage1DEXT, GLenum texunit, GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void* pixels) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexImage1DEXT,texunit,target,level,internalformat,width,border,format,type,pixels) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexImage2DEXT, GLenum texunit, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void* pixels) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexImage2DEXT,texunit,target,level,internalformat,width,height,border,format,type,pixels) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexSubImage1DEXT, GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void* pixels) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexSubImage1DEXT,texunit,target,level,xoffset,width,format,type,pixels) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexSubImage2DEXT, GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void* pixels) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexSubImage2DEXT,texunit,target,level,xoffset,yoffset,width,height,format,type,pixels) -DECLARE_GL_FUNCTION_STUB_HEAD(void, CopyMultiTexImage1DEXT, GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, CopyMultiTexImage1DEXT,texunit,target,level,internalformat,x,y,width,border) -DECLARE_GL_FUNCTION_STUB_HEAD(void, CopyMultiTexImage2DEXT, GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, CopyMultiTexImage2DEXT,texunit,target,level,internalformat,x,y,width,height,border) -DECLARE_GL_FUNCTION_STUB_HEAD(void, CopyMultiTexSubImage1DEXT, GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, CopyMultiTexSubImage1DEXT,texunit,target,level,xoffset,x,y,width) -DECLARE_GL_FUNCTION_STUB_HEAD(void, CopyMultiTexSubImage2DEXT, GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, CopyMultiTexSubImage2DEXT,texunit,target,level,xoffset,yoffset,x,y,width,height) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetMultiTexImageEXT, GLenum texunit, GLenum target, GLint level, GLenum format, GLenum type, void* pixels) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetMultiTexImageEXT,texunit,target,level,format,type,pixels) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetMultiTexParameterfvEXT, GLenum texunit, GLenum target, GLenum pname, GLfloat* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetMultiTexParameterfvEXT,texunit,target,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetMultiTexParameterivEXT, GLenum texunit, GLenum target, GLenum pname, GLint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetMultiTexParameterivEXT,texunit,target,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetMultiTexLevelParameterfvEXT, GLenum texunit, GLenum target, GLint level, GLenum pname, GLfloat* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetMultiTexLevelParameterfvEXT,texunit,target,level,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetMultiTexLevelParameterivEXT, GLenum texunit, GLenum target, GLint level, GLenum pname, GLint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetMultiTexLevelParameterivEXT,texunit,target,level,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexImage3DEXT, GLenum texunit, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void* pixels) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexImage3DEXT,texunit,target,level,internalformat,width,height,depth,border,format,type,pixels) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexSubImage3DEXT, 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) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexSubImage3DEXT,texunit,target,level,xoffset,yoffset,zoffset,width,height,depth,format,type,pixels) -DECLARE_GL_FUNCTION_STUB_HEAD(void, CopyMultiTexSubImage3DEXT, GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, CopyMultiTexSubImage3DEXT,texunit,target,level,xoffset,yoffset,zoffset,x,y,width,height) -DECLARE_GL_FUNCTION_STUB_HEAD(void, EnableClientStateIndexedEXT, GLenum array, GLuint index) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, EnableClientStateIndexedEXT,array,index) -DECLARE_GL_FUNCTION_STUB_HEAD(void, DisableClientStateIndexedEXT, GLenum array, GLuint index) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, DisableClientStateIndexedEXT,array,index) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetFloatIndexedvEXT, GLenum target, GLuint index, GLfloat* data) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetFloatIndexedvEXT,target,index,data) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetDoubleIndexedvEXT, GLenum target, GLuint index, GLdouble* data) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetDoubleIndexedvEXT,target,index,data) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetPointerIndexedvEXT, GLenum target, GLuint index, void* *data) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetPointerIndexedvEXT,target,index,*data) -DECLARE_GL_FUNCTION_STUB_HEAD(void, EnableIndexedEXT, GLenum target, GLuint index) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, EnableIndexedEXT,target,index) -DECLARE_GL_FUNCTION_STUB_HEAD(void, DisableIndexedEXT, GLenum target, GLuint index) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, DisableIndexedEXT,target,index) -DECLARE_GL_FUNCTION_STUB_HEAD(GLboolean, IsEnabledIndexedEXT, GLenum target, GLuint index) DECLARE_GL_FUNCTION_STUB_END(GLboolean, IsEnabledIndexedEXT,target,index) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetIntegerIndexedvEXT, GLenum target, GLuint index, GLint* data) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetIntegerIndexedvEXT,target,index,data) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetBooleanIndexedvEXT, GLenum target, GLuint index, GLboolean* data) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetBooleanIndexedvEXT,target,index,data) -DECLARE_GL_FUNCTION_STUB_HEAD(void, CompressedTextureImage3DEXT, GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void* bits) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, CompressedTextureImage3DEXT,texture,target,level,internalformat,width,height,depth,border,imageSize,bits) -DECLARE_GL_FUNCTION_STUB_HEAD(void, CompressedTextureImage2DEXT, GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void* bits) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, CompressedTextureImage2DEXT,texture,target,level,internalformat,width,height,border,imageSize,bits) -DECLARE_GL_FUNCTION_STUB_HEAD(void, CompressedTextureImage1DEXT, GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void* bits) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, CompressedTextureImage1DEXT,texture,target,level,internalformat,width,border,imageSize,bits) -DECLARE_GL_FUNCTION_STUB_HEAD(void, CompressedTextureSubImage3DEXT, 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) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, CompressedTextureSubImage3DEXT,texture,target,level,xoffset,yoffset,zoffset,width,height,depth,format,imageSize,bits) -DECLARE_GL_FUNCTION_STUB_HEAD(void, CompressedTextureSubImage2DEXT, GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void* bits) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, CompressedTextureSubImage2DEXT,texture,target,level,xoffset,yoffset,width,height,format,imageSize,bits) -DECLARE_GL_FUNCTION_STUB_HEAD(void, CompressedTextureSubImage1DEXT, GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void* bits) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, CompressedTextureSubImage1DEXT,texture,target,level,xoffset,width,format,imageSize,bits) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetCompressedTextureImageEXT, GLuint texture, GLenum target, GLint lod, void* img) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetCompressedTextureImageEXT,texture,target,lod,img) -DECLARE_GL_FUNCTION_STUB_HEAD(void, CompressedMultiTexImage3DEXT, GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void* bits) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, CompressedMultiTexImage3DEXT,texunit,target,level,internalformat,width,height,depth,border,imageSize,bits) -DECLARE_GL_FUNCTION_STUB_HEAD(void, CompressedMultiTexImage2DEXT, GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void* bits) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, CompressedMultiTexImage2DEXT,texunit,target,level,internalformat,width,height,border,imageSize,bits) -DECLARE_GL_FUNCTION_STUB_HEAD(void, CompressedMultiTexImage1DEXT, GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void* bits) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, CompressedMultiTexImage1DEXT,texunit,target,level,internalformat,width,border,imageSize,bits) -DECLARE_GL_FUNCTION_STUB_HEAD(void, CompressedMultiTexSubImage3DEXT, 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) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, CompressedMultiTexSubImage3DEXT,texunit,target,level,xoffset,yoffset,zoffset,width,height,depth,format,imageSize,bits) -DECLARE_GL_FUNCTION_STUB_HEAD(void, CompressedMultiTexSubImage2DEXT, GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void* bits) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, CompressedMultiTexSubImage2DEXT,texunit,target,level,xoffset,yoffset,width,height,format,imageSize,bits) -DECLARE_GL_FUNCTION_STUB_HEAD(void, CompressedMultiTexSubImage1DEXT, GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void* bits) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, CompressedMultiTexSubImage1DEXT,texunit,target,level,xoffset,width,format,imageSize,bits) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetCompressedMultiTexImageEXT, GLenum texunit, GLenum target, GLint lod, void* img) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetCompressedMultiTexImageEXT,texunit,target,lod,img) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MatrixLoadTransposefEXT, GLenum mode, const GLfloat* m) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MatrixLoadTransposefEXT,mode,m) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MatrixLoadTransposedEXT, GLenum mode, const GLdouble* m) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MatrixLoadTransposedEXT,mode,m) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MatrixMultTransposefEXT, GLenum mode, const GLfloat* m) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MatrixMultTransposefEXT,mode,m) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MatrixMultTransposedEXT, GLenum mode, const GLdouble* m) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MatrixMultTransposedEXT,mode,m) -DECLARE_GL_FUNCTION_STUB_HEAD(void, NamedBufferDataEXT, GLuint buffer, GLsizeiptr size, const void* data, GLenum usage) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, NamedBufferDataEXT,buffer,size,data,usage) -DECLARE_GL_FUNCTION_STUB_HEAD(void, NamedBufferSubDataEXT, GLuint buffer, GLintptr offset, GLsizeiptr size, const void* data) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, NamedBufferSubDataEXT,buffer,offset,size,data) -DECLARE_GL_FUNCTION_STUB_HEAD(GLboolean, UnmapNamedBufferEXT, GLuint buffer) DECLARE_GL_FUNCTION_STUB_END(GLboolean, UnmapNamedBufferEXT,buffer) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetNamedBufferParameterivEXT, GLuint buffer, GLenum pname, GLint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetNamedBufferParameterivEXT,buffer,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetNamedBufferPointervEXT, GLuint buffer, GLenum pname, void* *params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetNamedBufferPointervEXT,buffer,pname,*params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetNamedBufferSubDataEXT, GLuint buffer, GLintptr offset, GLsizeiptr size, void* data) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetNamedBufferSubDataEXT,buffer,offset,size,data) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TextureBufferEXT, GLuint texture, GLenum target, GLenum internalformat, GLuint buffer) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TextureBufferEXT,texture,target,internalformat,buffer) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexBufferEXT, GLenum texunit, GLenum target, GLenum internalformat, GLuint buffer) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexBufferEXT,texunit,target,internalformat,buffer) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TextureParameterIivEXT, GLuint texture, GLenum target, GLenum pname, const GLint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TextureParameterIivEXT,texture,target,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TextureParameterIuivEXT, GLuint texture, GLenum target, GLenum pname, const GLuint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TextureParameterIuivEXT,texture,target,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetTextureParameterIivEXT, GLuint texture, GLenum target, GLenum pname, GLint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetTextureParameterIivEXT,texture,target,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetTextureParameterIuivEXT, GLuint texture, GLenum target, GLenum pname, GLuint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetTextureParameterIuivEXT,texture,target,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexParameterIivEXT, GLenum texunit, GLenum target, GLenum pname, const GLint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexParameterIivEXT,texunit,target,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexParameterIuivEXT, GLenum texunit, GLenum target, GLenum pname, const GLuint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexParameterIuivEXT,texunit,target,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetMultiTexParameterIivEXT, GLenum texunit, GLenum target, GLenum pname, GLint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetMultiTexParameterIivEXT,texunit,target,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetMultiTexParameterIuivEXT, GLenum texunit, GLenum target, GLenum pname, GLuint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetMultiTexParameterIuivEXT,texunit,target,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, NamedProgramLocalParameters4fvEXT, GLuint program, GLenum target, GLuint index, GLsizei count, const GLfloat* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, NamedProgramLocalParameters4fvEXT,program,target,index,count,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, NamedProgramLocalParameterI4iEXT, GLuint program, GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, NamedProgramLocalParameterI4iEXT,program,target,index,x,y,z,w) -DECLARE_GL_FUNCTION_STUB_HEAD(void, NamedProgramLocalParameterI4ivEXT, GLuint program, GLenum target, GLuint index, const GLint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, NamedProgramLocalParameterI4ivEXT,program,target,index,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, NamedProgramLocalParametersI4ivEXT, GLuint program, GLenum target, GLuint index, GLsizei count, const GLint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, NamedProgramLocalParametersI4ivEXT,program,target,index,count,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, NamedProgramLocalParameterI4uiEXT, GLuint program, GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, NamedProgramLocalParameterI4uiEXT,program,target,index,x,y,z,w) -DECLARE_GL_FUNCTION_STUB_HEAD(void, NamedProgramLocalParameterI4uivEXT, GLuint program, GLenum target, GLuint index, const GLuint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, NamedProgramLocalParameterI4uivEXT,program,target,index,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, NamedProgramLocalParametersI4uivEXT, GLuint program, GLenum target, GLuint index, GLsizei count, const GLuint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, NamedProgramLocalParametersI4uivEXT,program,target,index,count,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetNamedProgramLocalParameterIivEXT, GLuint program, GLenum target, GLuint index, GLint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetNamedProgramLocalParameterIivEXT,program,target,index,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetNamedProgramLocalParameterIuivEXT, GLuint program, GLenum target, GLuint index, GLuint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetNamedProgramLocalParameterIuivEXT,program,target,index,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, EnableClientStateiEXT, GLenum array, GLuint index) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, EnableClientStateiEXT,array,index) -DECLARE_GL_FUNCTION_STUB_HEAD(void, DisableClientStateiEXT, GLenum array, GLuint index) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, DisableClientStateiEXT,array,index) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetFloati_vEXT, GLenum pname, GLuint index, GLfloat* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetFloati_vEXT,pname,index,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetDoublei_vEXT, GLenum pname, GLuint index, GLdouble* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetDoublei_vEXT,pname,index,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetPointeri_vEXT, GLenum pname, GLuint index, void* *params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetPointeri_vEXT,pname,index,*params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, NamedProgramStringEXT, GLuint program, GLenum target, GLenum format, GLsizei len, const void* string) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, NamedProgramStringEXT,program,target,format,len,string) -DECLARE_GL_FUNCTION_STUB_HEAD(void, NamedProgramLocalParameter4dEXT, GLuint program, GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, NamedProgramLocalParameter4dEXT,program,target,index,x,y,z,w) -DECLARE_GL_FUNCTION_STUB_HEAD(void, NamedProgramLocalParameter4dvEXT, GLuint program, GLenum target, GLuint index, const GLdouble* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, NamedProgramLocalParameter4dvEXT,program,target,index,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, NamedProgramLocalParameter4fEXT, GLuint program, GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, NamedProgramLocalParameter4fEXT,program,target,index,x,y,z,w) -DECLARE_GL_FUNCTION_STUB_HEAD(void, NamedProgramLocalParameter4fvEXT, GLuint program, GLenum target, GLuint index, const GLfloat* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, NamedProgramLocalParameter4fvEXT,program,target,index,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetNamedProgramLocalParameterdvEXT, GLuint program, GLenum target, GLuint index, GLdouble* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetNamedProgramLocalParameterdvEXT,program,target,index,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetNamedProgramLocalParameterfvEXT, GLuint program, GLenum target, GLuint index, GLfloat* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetNamedProgramLocalParameterfvEXT,program,target,index,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetNamedProgramivEXT, GLuint program, GLenum target, GLenum pname, GLint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetNamedProgramivEXT,program,target,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetNamedProgramStringEXT, GLuint program, GLenum target, GLenum pname, void* string) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetNamedProgramStringEXT,program,target,pname,string) -DECLARE_GL_FUNCTION_STUB_HEAD(void, NamedRenderbufferStorageEXT, GLuint renderbuffer, GLenum internalformat, GLsizei width, GLsizei height) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, NamedRenderbufferStorageEXT,renderbuffer,internalformat,width,height) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetNamedRenderbufferParameterivEXT, GLuint renderbuffer, GLenum pname, GLint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetNamedRenderbufferParameterivEXT,renderbuffer,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, NamedRenderbufferStorageMultisampleEXT, GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, NamedRenderbufferStorageMultisampleEXT,renderbuffer,samples,internalformat,width,height) -DECLARE_GL_FUNCTION_STUB_HEAD(void, NamedRenderbufferStorageMultisampleCoverageEXT, GLuint renderbuffer, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, NamedRenderbufferStorageMultisampleCoverageEXT,renderbuffer,coverageSamples,colorSamples,internalformat,width,height) -DECLARE_GL_FUNCTION_STUB_HEAD(GLenum, CheckNamedFramebufferStatusEXT, GLuint framebuffer, GLenum target) DECLARE_GL_FUNCTION_STUB_END(GLenum, CheckNamedFramebufferStatusEXT,framebuffer,target) -DECLARE_GL_FUNCTION_STUB_HEAD(void, NamedFramebufferTexture1DEXT, GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, NamedFramebufferTexture1DEXT,framebuffer,attachment,textarget,texture,level) -DECLARE_GL_FUNCTION_STUB_HEAD(void, NamedFramebufferTexture2DEXT, GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, NamedFramebufferTexture2DEXT,framebuffer,attachment,textarget,texture,level) -DECLARE_GL_FUNCTION_STUB_HEAD(void, NamedFramebufferTexture3DEXT, GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, NamedFramebufferTexture3DEXT,framebuffer,attachment,textarget,texture,level,zoffset) -DECLARE_GL_FUNCTION_STUB_HEAD(void, NamedFramebufferRenderbufferEXT, GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, NamedFramebufferRenderbufferEXT,framebuffer,attachment,renderbuffertarget,renderbuffer) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetNamedFramebufferAttachmentParameterivEXT, GLuint framebuffer, GLenum attachment, GLenum pname, GLint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetNamedFramebufferAttachmentParameterivEXT,framebuffer,attachment,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GenerateTextureMipmapEXT, GLuint texture, GLenum target) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GenerateTextureMipmapEXT,texture,target) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GenerateMultiTexMipmapEXT, GLenum texunit, GLenum target) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GenerateMultiTexMipmapEXT,texunit,target) -DECLARE_GL_FUNCTION_STUB_HEAD(void, FramebufferDrawBufferEXT, GLuint framebuffer, GLenum mode) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, FramebufferDrawBufferEXT,framebuffer,mode) -DECLARE_GL_FUNCTION_STUB_HEAD(void, FramebufferDrawBuffersEXT, GLuint framebuffer, GLsizei n, const GLenum* bufs) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, FramebufferDrawBuffersEXT,framebuffer,n,bufs) -DECLARE_GL_FUNCTION_STUB_HEAD(void, FramebufferReadBufferEXT, GLuint framebuffer, GLenum mode) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, FramebufferReadBufferEXT,framebuffer,mode) -DECLARE_GL_FUNCTION_STUB_HEAD(void, NamedCopyBufferSubDataEXT, GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, NamedCopyBufferSubDataEXT,readBuffer,writeBuffer,readOffset,writeOffset,size) -DECLARE_GL_FUNCTION_STUB_HEAD(void, NamedFramebufferTextureEXT, GLuint framebuffer, GLenum attachment, GLuint texture, GLint level) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, NamedFramebufferTextureEXT,framebuffer,attachment,texture,level) -DECLARE_GL_FUNCTION_STUB_HEAD(void, NamedFramebufferTextureLayerEXT, GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLint layer) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, NamedFramebufferTextureLayerEXT,framebuffer,attachment,texture,level,layer) -DECLARE_GL_FUNCTION_STUB_HEAD(void, NamedFramebufferTextureFaceEXT, GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLenum face) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, NamedFramebufferTextureFaceEXT,framebuffer,attachment,texture,level,face) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TextureRenderbufferEXT, GLuint texture, GLenum target, GLuint renderbuffer) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TextureRenderbufferEXT,texture,target,renderbuffer) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexRenderbufferEXT, GLenum texunit, GLenum target, GLuint renderbuffer) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexRenderbufferEXT,texunit,target,renderbuffer) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexArrayVertexOffsetEXT, GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexArrayVertexOffsetEXT,vaobj,buffer,size,type,stride,offset) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexArrayColorOffsetEXT, GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexArrayColorOffsetEXT,vaobj,buffer,size,type,stride,offset) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexArrayEdgeFlagOffsetEXT, GLuint vaobj, GLuint buffer, GLsizei stride, GLintptr offset) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexArrayEdgeFlagOffsetEXT,vaobj,buffer,stride,offset) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexArrayIndexOffsetEXT, GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexArrayIndexOffsetEXT,vaobj,buffer,type,stride,offset) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexArrayNormalOffsetEXT, GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexArrayNormalOffsetEXT,vaobj,buffer,type,stride,offset) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexArrayTexCoordOffsetEXT, GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexArrayTexCoordOffsetEXT,vaobj,buffer,size,type,stride,offset) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexArrayMultiTexCoordOffsetEXT, GLuint vaobj, GLuint buffer, GLenum texunit, GLint size, GLenum type, GLsizei stride, GLintptr offset) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexArrayMultiTexCoordOffsetEXT,vaobj,buffer,texunit,size,type,stride,offset) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexArrayFogCoordOffsetEXT, GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexArrayFogCoordOffsetEXT,vaobj,buffer,type,stride,offset) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexArraySecondaryColorOffsetEXT, GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexArraySecondaryColorOffsetEXT,vaobj,buffer,size,type,stride,offset) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexArrayVertexAttribOffsetEXT, GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLintptr offset) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexArrayVertexAttribOffsetEXT,vaobj,buffer,index,size,type,normalized,stride,offset) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexArrayVertexAttribIOffsetEXT, GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexArrayVertexAttribIOffsetEXT,vaobj,buffer,index,size,type,stride,offset) -DECLARE_GL_FUNCTION_STUB_HEAD(void, EnableVertexArrayEXT, GLuint vaobj, GLenum array) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, EnableVertexArrayEXT,vaobj,array) -DECLARE_GL_FUNCTION_STUB_HEAD(void, DisableVertexArrayEXT, GLuint vaobj, GLenum array) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, DisableVertexArrayEXT,vaobj,array) -DECLARE_GL_FUNCTION_STUB_HEAD(void, EnableVertexArrayAttribEXT, GLuint vaobj, GLuint index) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, EnableVertexArrayAttribEXT,vaobj,index) -DECLARE_GL_FUNCTION_STUB_HEAD(void, DisableVertexArrayAttribEXT, GLuint vaobj, GLuint index) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, DisableVertexArrayAttribEXT,vaobj,index) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetVertexArrayIntegervEXT, GLuint vaobj, GLenum pname, GLint* param) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetVertexArrayIntegervEXT,vaobj,pname,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetVertexArrayPointervEXT, GLuint vaobj, GLenum pname, void* *param) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetVertexArrayPointervEXT,vaobj,pname,*param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetVertexArrayIntegeri_vEXT, GLuint vaobj, GLuint index, GLenum pname, GLint* param) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetVertexArrayIntegeri_vEXT,vaobj,index,pname,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetVertexArrayPointeri_vEXT, GLuint vaobj, GLuint index, GLenum pname, void* *param) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetVertexArrayPointeri_vEXT,vaobj,index,pname,*param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, FlushMappedNamedBufferRangeEXT, GLuint buffer, GLintptr offset, GLsizeiptr length) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, FlushMappedNamedBufferRangeEXT,buffer,offset,length) -DECLARE_GL_FUNCTION_STUB_HEAD(void, NamedBufferStorageEXT, GLuint buffer, GLsizeiptr size, const void* data, GLbitfield flags) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, NamedBufferStorageEXT,buffer,size,data,flags) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ClearNamedBufferDataEXT, GLuint buffer, GLenum internalformat, GLenum format, GLenum type, const void* data) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ClearNamedBufferDataEXT,buffer,internalformat,format,type,data) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ClearNamedBufferSubDataEXT, GLuint buffer, GLenum internalformat, GLsizeiptr offset, GLsizeiptr size, GLenum format, GLenum type, const void* data) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ClearNamedBufferSubDataEXT,buffer,internalformat,offset,size,format,type,data) -DECLARE_GL_FUNCTION_STUB_HEAD(void, NamedFramebufferParameteriEXT, GLuint framebuffer, GLenum pname, GLint param) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, NamedFramebufferParameteriEXT,framebuffer,pname,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetNamedFramebufferParameterivEXT, GLuint framebuffer, GLenum pname, GLint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetNamedFramebufferParameterivEXT,framebuffer,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniform1dEXT, GLuint program, GLint location, GLdouble x) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniform1dEXT,program,location,x) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniform2dEXT, GLuint program, GLint location, GLdouble x, GLdouble y) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniform2dEXT,program,location,x,y) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniform3dEXT, GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniform3dEXT,program,location,x,y,z) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniform4dEXT, GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniform4dEXT,program,location,x,y,z,w) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniform1dvEXT, GLuint program, GLint location, GLsizei count, const GLdouble* value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniform1dvEXT,program,location,count,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniform2dvEXT, GLuint program, GLint location, GLsizei count, const GLdouble* value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniform2dvEXT,program,location,count,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniform3dvEXT, GLuint program, GLint location, GLsizei count, const GLdouble* value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniform3dvEXT,program,location,count,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniform4dvEXT, GLuint program, GLint location, GLsizei count, const GLdouble* value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniform4dvEXT,program,location,count,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniformMatrix2dvEXT, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble* value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniformMatrix2dvEXT,program,location,count,transpose,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniformMatrix3dvEXT, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble* value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniformMatrix3dvEXT,program,location,count,transpose,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniformMatrix4dvEXT, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble* value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniformMatrix4dvEXT,program,location,count,transpose,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniformMatrix2x3dvEXT, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble* value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniformMatrix2x3dvEXT,program,location,count,transpose,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniformMatrix2x4dvEXT, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble* value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniformMatrix2x4dvEXT,program,location,count,transpose,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniformMatrix3x2dvEXT, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble* value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniformMatrix3x2dvEXT,program,location,count,transpose,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniformMatrix3x4dvEXT, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble* value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniformMatrix3x4dvEXT,program,location,count,transpose,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniformMatrix4x2dvEXT, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble* value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniformMatrix4x2dvEXT,program,location,count,transpose,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniformMatrix4x3dvEXT, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble* value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniformMatrix4x3dvEXT,program,location,count,transpose,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TextureBufferRangeEXT, GLuint texture, GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TextureBufferRangeEXT,texture,target,internalformat,buffer,offset,size) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TextureStorage1DEXT, GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TextureStorage1DEXT,texture,target,levels,internalformat,width) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TextureStorage2DEXT, GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TextureStorage2DEXT,texture,target,levels,internalformat,width,height) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TextureStorage3DEXT, GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TextureStorage3DEXT,texture,target,levels,internalformat,width,height,depth) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TextureStorage2DMultisampleEXT, GLuint texture, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TextureStorage2DMultisampleEXT,texture,target,samples,internalformat,width,height,fixedsamplelocations) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TextureStorage3DMultisampleEXT, GLuint texture, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TextureStorage3DMultisampleEXT,texture,target,samples,internalformat,width,height,depth,fixedsamplelocations) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexArrayBindVertexBufferEXT, GLuint vaobj, GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexArrayBindVertexBufferEXT,vaobj,bindingindex,buffer,offset,stride) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexArrayVertexAttribFormatEXT, GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexArrayVertexAttribFormatEXT,vaobj,attribindex,size,type,normalized,relativeoffset) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexArrayVertexAttribIFormatEXT, GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexArrayVertexAttribIFormatEXT,vaobj,attribindex,size,type,relativeoffset) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexArrayVertexAttribLFormatEXT, GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexArrayVertexAttribLFormatEXT,vaobj,attribindex,size,type,relativeoffset) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexArrayVertexAttribBindingEXT, GLuint vaobj, GLuint attribindex, GLuint bindingindex) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexArrayVertexAttribBindingEXT,vaobj,attribindex,bindingindex) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexArrayVertexBindingDivisorEXT, GLuint vaobj, GLuint bindingindex, GLuint divisor) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexArrayVertexBindingDivisorEXT,vaobj,bindingindex,divisor) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexArrayVertexAttribLOffsetEXT, GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexArrayVertexAttribLOffsetEXT,vaobj,buffer,index,size,type,stride,offset) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexturePageCommitmentEXT, GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLboolean commit) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexturePageCommitmentEXT,texture,level,xoffset,yoffset,zoffset,width,height,depth,commit) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexArrayVertexAttribDivisorEXT, GLuint vaobj, GLuint index, GLuint divisor) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexArrayVertexAttribDivisorEXT,vaobj,index,divisor) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ColorMaskIndexedEXT, GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ColorMaskIndexedEXT,index,r,g,b,a) -DECLARE_GL_FUNCTION_STUB_HEAD(void, BufferStorageExternalEXT, GLenum target, GLintptr offset, GLsizeiptr size, GLeglClientBufferEXT clientBuffer, GLbitfield flags) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, BufferStorageExternalEXT,target,offset,size,clientBuffer,flags) -DECLARE_GL_FUNCTION_STUB_HEAD(void, NamedBufferStorageExternalEXT, GLuint buffer, GLintptr offset, GLsizeiptr size, GLeglClientBufferEXT clientBuffer, GLbitfield flags) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, NamedBufferStorageExternalEXT,buffer,offset,size,clientBuffer,flags) -DECLARE_GL_FUNCTION_STUB_HEAD(void, FogCoordfEXT, GLfloat coord) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, FogCoordfEXT,coord) -DECLARE_GL_FUNCTION_STUB_HEAD(void, FogCoordfvEXT,const GLfloat* coord) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, FogCoordfvEXT,coord) -DECLARE_GL_FUNCTION_STUB_HEAD(void, FogCoorddEXT, GLdouble coord) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, FogCoorddEXT,coord) -DECLARE_GL_FUNCTION_STUB_HEAD(void, FogCoorddvEXT,const GLdouble* coord) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, FogCoorddvEXT,coord) -DECLARE_GL_FUNCTION_STUB_HEAD(void, FogCoordPointerEXT, GLenum type, GLsizei stride, const void* pointer) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, FogCoordPointerEXT,type,stride,pointer) -DECLARE_GL_FUNCTION_STUB_HEAD(void, FramebufferTexture1DEXT, GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, FramebufferTexture1DEXT,target,attachment,textarget,texture,level) -DECLARE_GL_FUNCTION_STUB_HEAD(void, FramebufferTexture3DEXT, GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, FramebufferTexture3DEXT,target,attachment,textarget,texture,level,zoffset) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramEnvParameters4fvEXT, GLenum target, GLuint index, GLsizei count, const GLfloat* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramEnvParameters4fvEXT,target,index,count,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramLocalParameters4fvEXT, GLenum target, GLuint index, GLsizei count, const GLfloat* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramLocalParameters4fvEXT,target,index,count,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, BindFragDataLocationEXT, GLuint program, GLuint color, const GLchar* name) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, BindFragDataLocationEXT,program,color,name) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribI1iEXT, GLuint index, GLint x) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribI1iEXT,index,x) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribI2iEXT, GLuint index, GLint x, GLint y) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribI2iEXT,index,x,y) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribI3iEXT, GLuint index, GLint x, GLint y, GLint z) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribI3iEXT,index,x,y,z) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribI1uiEXT, GLuint index, GLuint x) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribI1uiEXT,index,x) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribI2uiEXT, GLuint index, GLuint x, GLuint y) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribI2uiEXT,index,x,y) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribI3uiEXT, GLuint index, GLuint x, GLuint y, GLuint z) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribI3uiEXT,index,x,y,z) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribI1ivEXT, GLuint index, const GLint* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribI1ivEXT,index,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribI2ivEXT, GLuint index, const GLint* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribI2ivEXT,index,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribI3ivEXT, GLuint index, const GLint* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribI3ivEXT,index,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribI1uivEXT, GLuint index, const GLuint* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribI1uivEXT,index,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribI2uivEXT, GLuint index, const GLuint* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribI2uivEXT,index,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribI3uivEXT, GLuint index, const GLuint* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribI3uivEXT,index,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribI4bvEXT, GLuint index, const GLbyte* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribI4bvEXT,index,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribI4svEXT, GLuint index, const GLshort* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribI4svEXT,index,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribI4ubvEXT, GLuint index, const GLubyte* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribI4ubvEXT,index,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribI4usvEXT, GLuint index, const GLushort* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribI4usvEXT,index,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetHistogramEXT, GLenum target, GLboolean reset, GLenum format, GLenum type, void* values) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetHistogramEXT,target,reset,format,type,values) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetHistogramParameterfvEXT, GLenum target, GLenum pname, GLfloat* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetHistogramParameterfvEXT,target,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetHistogramParameterivEXT, GLenum target, GLenum pname, GLint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetHistogramParameterivEXT,target,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetMinmaxEXT, GLenum target, GLboolean reset, GLenum format, GLenum type, void* values) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetMinmaxEXT,target,reset,format,type,values) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetMinmaxParameterfvEXT, GLenum target, GLenum pname, GLfloat* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetMinmaxParameterfvEXT,target,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetMinmaxParameterivEXT, GLenum target, GLenum pname, GLint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetMinmaxParameterivEXT,target,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, HistogramEXT, GLenum target, GLsizei width, GLenum internalformat, GLboolean sink) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, HistogramEXT,target,width,internalformat,sink) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MinmaxEXT, GLenum target, GLenum internalformat, GLboolean sink) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MinmaxEXT,target,internalformat,sink) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ResetHistogramEXT, GLenum target) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ResetHistogramEXT,target) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ResetMinmaxEXT, GLenum target) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ResetMinmaxEXT,target) -DECLARE_GL_FUNCTION_STUB_HEAD(void, IndexFuncEXT, GLenum func, GLclampf ref) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, IndexFuncEXT,func,ref) -DECLARE_GL_FUNCTION_STUB_HEAD(void, IndexMaterialEXT, GLenum face, GLenum mode) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, IndexMaterialEXT,face,mode) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ApplyTextureEXT, GLenum mode) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ApplyTextureEXT,mode) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TextureLightEXT, GLenum pname) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TextureLightEXT,pname) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TextureMaterialEXT, GLenum face, GLenum mode) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TextureMaterialEXT,face,mode) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetUnsignedBytevEXT, GLenum pname, GLubyte* data) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetUnsignedBytevEXT,pname,data) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetUnsignedBytei_vEXT, GLenum target, GLuint index, GLubyte* data) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetUnsignedBytei_vEXT,target,index,data) -DECLARE_GL_FUNCTION_STUB_HEAD(void, DeleteMemoryObjectsEXT, GLsizei n, const GLuint* memoryObjects) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, DeleteMemoryObjectsEXT,n,memoryObjects) -DECLARE_GL_FUNCTION_STUB_HEAD(GLboolean, IsMemoryObjectEXT, GLuint memoryObject) DECLARE_GL_FUNCTION_STUB_END(GLboolean, IsMemoryObjectEXT,memoryObject) -DECLARE_GL_FUNCTION_STUB_HEAD(void, CreateMemoryObjectsEXT, GLsizei n, GLuint* memoryObjects) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, CreateMemoryObjectsEXT,n,memoryObjects) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MemoryObjectParameterivEXT, GLuint memoryObject, GLenum pname, const GLint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MemoryObjectParameterivEXT,memoryObject,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetMemoryObjectParameterivEXT, GLuint memoryObject, GLenum pname, GLint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetMemoryObjectParameterivEXT,memoryObject,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexStorageMem2DEXT, GLenum target, GLsizei levels, GLenum internalFormat, GLsizei width, GLsizei height, GLuint memory, GLuint64 offset) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexStorageMem2DEXT,target,levels,internalFormat,width,height,memory,offset) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexStorageMem2DMultisampleEXT, GLenum target, GLsizei samples, GLenum internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations, GLuint memory, GLuint64 offset) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexStorageMem2DMultisampleEXT,target,samples,internalFormat,width,height,fixedSampleLocations,memory,offset) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexStorageMem3DEXT, GLenum target, GLsizei levels, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLuint memory, GLuint64 offset) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexStorageMem3DEXT,target,levels,internalFormat,width,height,depth,memory,offset) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexStorageMem3DMultisampleEXT, GLenum target, GLsizei samples, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations, GLuint memory, GLuint64 offset) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexStorageMem3DMultisampleEXT,target,samples,internalFormat,width,height,depth,fixedSampleLocations,memory,offset) -DECLARE_GL_FUNCTION_STUB_HEAD(void, BufferStorageMemEXT, GLenum target, GLsizeiptr size, GLuint memory, GLuint64 offset) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, BufferStorageMemEXT,target,size,memory,offset) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TextureStorageMem2DEXT, GLuint texture, GLsizei levels, GLenum internalFormat, GLsizei width, GLsizei height, GLuint memory, GLuint64 offset) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TextureStorageMem2DEXT,texture,levels,internalFormat,width,height,memory,offset) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TextureStorageMem2DMultisampleEXT, GLuint texture, GLsizei samples, GLenum internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations, GLuint memory, GLuint64 offset) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TextureStorageMem2DMultisampleEXT,texture,samples,internalFormat,width,height,fixedSampleLocations,memory,offset) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TextureStorageMem3DEXT, GLuint texture, GLsizei levels, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLuint memory, GLuint64 offset) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TextureStorageMem3DEXT,texture,levels,internalFormat,width,height,depth,memory,offset) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TextureStorageMem3DMultisampleEXT, GLuint texture, GLsizei samples, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations, GLuint memory, GLuint64 offset) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TextureStorageMem3DMultisampleEXT,texture,samples,internalFormat,width,height,depth,fixedSampleLocations,memory,offset) -DECLARE_GL_FUNCTION_STUB_HEAD(void, NamedBufferStorageMemEXT, GLuint buffer, GLsizeiptr size, GLuint memory, GLuint64 offset) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, NamedBufferStorageMemEXT,buffer,size,memory,offset) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexStorageMem1DEXT, GLenum target, GLsizei levels, GLenum internalFormat, GLsizei width, GLuint memory, GLuint64 offset) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexStorageMem1DEXT,target,levels,internalFormat,width,memory,offset) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TextureStorageMem1DEXT, GLuint texture, GLsizei levels, GLenum internalFormat, GLsizei width, GLuint memory, GLuint64 offset) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TextureStorageMem1DEXT,texture,levels,internalFormat,width,memory,offset) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ImportMemoryFdEXT, GLuint memory, GLuint64 size, GLenum handleType, GLint fd) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ImportMemoryFdEXT,memory,size,handleType,fd) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ImportMemoryWin32HandleEXT, GLuint memory, GLuint64 size, GLenum handleType, void* handle) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ImportMemoryWin32HandleEXT,memory,size,handleType,handle) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ImportMemoryWin32NameEXT, GLuint memory, GLuint64 size, GLenum handleType, const void* name) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ImportMemoryWin32NameEXT,memory,size,handleType,name) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiDrawArraysEXT, GLenum mode, const GLint* first, const GLsizei* count, GLsizei primcount) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiDrawArraysEXT,mode,first,count,primcount) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiDrawElementsEXT, GLenum mode, const GLsizei* count, GLenum type, const void* const*indices, GLsizei primcount) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiDrawElementsEXT,mode,count,type,indices,primcount) -DECLARE_GL_FUNCTION_STUB_HEAD(void, SampleMaskEXT, GLclampf value, GLboolean invert) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, SampleMaskEXT,value,invert) -DECLARE_GL_FUNCTION_STUB_HEAD(void, SamplePatternEXT, GLenum pattern) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, SamplePatternEXT,pattern) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ColorTableEXT, GLenum target, GLenum internalFormat, GLsizei width, GLenum format, GLenum type, const void* table) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ColorTableEXT,target,internalFormat,width,format,type,table) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetColorTableEXT, GLenum target, GLenum format, GLenum type, void* data) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetColorTableEXT,target,format,type,data) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetColorTableParameterivEXT, GLenum target, GLenum pname, GLint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetColorTableParameterivEXT,target,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetColorTableParameterfvEXT, GLenum target, GLenum pname, GLfloat* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetColorTableParameterfvEXT,target,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, PixelTransformParameteriEXT, GLenum target, GLenum pname, GLint param) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, PixelTransformParameteriEXT,target,pname,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, PixelTransformParameterfEXT, GLenum target, GLenum pname, GLfloat param) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, PixelTransformParameterfEXT,target,pname,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, PixelTransformParameterivEXT, GLenum target, GLenum pname, const GLint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, PixelTransformParameterivEXT,target,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, PixelTransformParameterfvEXT, GLenum target, GLenum pname, const GLfloat* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, PixelTransformParameterfvEXT,target,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetPixelTransformParameterivEXT, GLenum target, GLenum pname, GLint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetPixelTransformParameterivEXT,target,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetPixelTransformParameterfvEXT, GLenum target, GLenum pname, GLfloat* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetPixelTransformParameterfvEXT,target,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, PointParameterfEXT, GLenum pname, GLfloat param) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, PointParameterfEXT,pname,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, PointParameterfvEXT, GLenum pname, const GLfloat* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, PointParameterfvEXT,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, PolygonOffsetClampEXT, GLfloat factor, GLfloat units, GLfloat clamp) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, PolygonOffsetClampEXT,factor,units,clamp) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProvokingVertexEXT, GLenum mode) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProvokingVertexEXT,mode) -DECLARE_GL_FUNCTION_STUB_HEAD(void, RasterSamplesEXT, GLuint samples, GLboolean fixedsamplelocations) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, RasterSamplesEXT,samples,fixedsamplelocations) -DECLARE_GL_FUNCTION_STUB_HEAD(void, SecondaryColor3bEXT, GLbyte red, GLbyte green, GLbyte blue) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, SecondaryColor3bEXT,red,green,blue) -DECLARE_GL_FUNCTION_STUB_HEAD(void, SecondaryColor3bvEXT,const GLbyte* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, SecondaryColor3bvEXT,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, SecondaryColor3dEXT, GLdouble red, GLdouble green, GLdouble blue) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, SecondaryColor3dEXT,red,green,blue) -DECLARE_GL_FUNCTION_STUB_HEAD(void, SecondaryColor3dvEXT,const GLdouble* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, SecondaryColor3dvEXT,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, SecondaryColor3fEXT, GLfloat red, GLfloat green, GLfloat blue) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, SecondaryColor3fEXT,red,green,blue) -DECLARE_GL_FUNCTION_STUB_HEAD(void, SecondaryColor3fvEXT,const GLfloat* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, SecondaryColor3fvEXT,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, SecondaryColor3iEXT, GLint red, GLint green, GLint blue) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, SecondaryColor3iEXT,red,green,blue) -DECLARE_GL_FUNCTION_STUB_HEAD(void, SecondaryColor3ivEXT,const GLint* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, SecondaryColor3ivEXT,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, SecondaryColor3sEXT, GLshort red, GLshort green, GLshort blue) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, SecondaryColor3sEXT,red,green,blue) -DECLARE_GL_FUNCTION_STUB_HEAD(void, SecondaryColor3svEXT,const GLshort* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, SecondaryColor3svEXT,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, SecondaryColor3ubEXT, GLubyte red, GLubyte green, GLubyte blue) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, SecondaryColor3ubEXT,red,green,blue) -DECLARE_GL_FUNCTION_STUB_HEAD(void, SecondaryColor3ubvEXT,const GLubyte* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, SecondaryColor3ubvEXT,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, SecondaryColor3uiEXT, GLuint red, GLuint green, GLuint blue) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, SecondaryColor3uiEXT,red,green,blue) -DECLARE_GL_FUNCTION_STUB_HEAD(void, SecondaryColor3uivEXT,const GLuint* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, SecondaryColor3uivEXT,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, SecondaryColor3usEXT, GLushort red, GLushort green, GLushort blue) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, SecondaryColor3usEXT,red,green,blue) -DECLARE_GL_FUNCTION_STUB_HEAD(void, SecondaryColor3usvEXT,const GLushort* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, SecondaryColor3usvEXT,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, SecondaryColorPointerEXT, GLint size, GLenum type, GLsizei stride, const void* pointer) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, SecondaryColorPointerEXT,size,type,stride,pointer) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GenSemaphoresEXT, GLsizei n, GLuint* semaphores) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GenSemaphoresEXT,n,semaphores) -DECLARE_GL_FUNCTION_STUB_HEAD(void, DeleteSemaphoresEXT, GLsizei n, const GLuint* semaphores) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, DeleteSemaphoresEXT,n,semaphores) -DECLARE_GL_FUNCTION_STUB_HEAD(GLboolean, IsSemaphoreEXT, GLuint semaphore) DECLARE_GL_FUNCTION_STUB_END(GLboolean, IsSemaphoreEXT,semaphore) -DECLARE_GL_FUNCTION_STUB_HEAD(void, SemaphoreParameterui64vEXT, GLuint semaphore, GLenum pname, const GLuint64* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, SemaphoreParameterui64vEXT,semaphore,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetSemaphoreParameterui64vEXT, GLuint semaphore, GLenum pname, GLuint64* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetSemaphoreParameterui64vEXT,semaphore,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, WaitSemaphoreEXT, GLuint semaphore, GLuint numBufferBarriers, const GLuint* buffers, GLuint numTextureBarriers, const GLuint* textures, const GLenum* srcLayouts) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, WaitSemaphoreEXT,semaphore,numBufferBarriers,buffers,numTextureBarriers,textures,srcLayouts) -DECLARE_GL_FUNCTION_STUB_HEAD(void, SignalSemaphoreEXT, GLuint semaphore, GLuint numBufferBarriers, const GLuint* buffers, GLuint numTextureBarriers, const GLuint* textures, const GLenum* dstLayouts) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, SignalSemaphoreEXT,semaphore,numBufferBarriers,buffers,numTextureBarriers,textures,dstLayouts) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ImportSemaphoreFdEXT, GLuint semaphore, GLenum handleType, GLint fd) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ImportSemaphoreFdEXT,semaphore,handleType,fd) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ImportSemaphoreWin32HandleEXT, GLuint semaphore, GLenum handleType, void* handle) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ImportSemaphoreWin32HandleEXT,semaphore,handleType,handle) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ImportSemaphoreWin32NameEXT, GLuint semaphore, GLenum handleType, const void* name) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ImportSemaphoreWin32NameEXT,semaphore,handleType,name) -DECLARE_GL_FUNCTION_STUB_HEAD(void, UseShaderProgramEXT, GLenum type, GLuint program) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, UseShaderProgramEXT,type,program) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ActiveProgramEXT, GLuint program) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ActiveProgramEXT,program) -DECLARE_GL_FUNCTION_STUB_HEAD(GLuint, CreateShaderProgramEXT, GLenum type, const GLchar* string) DECLARE_GL_FUNCTION_STUB_END(GLuint, CreateShaderProgramEXT,type,string) -DECLARE_GL_FUNCTION_STUB_HEAD(void, FramebufferFetchBarrierEXT,void) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, FramebufferFetchBarrierEXT,) -DECLARE_GL_FUNCTION_STUB_HEAD(void, StencilClearTagEXT, GLsizei stencilTagBits, GLuint stencilClearTag) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, StencilClearTagEXT,stencilTagBits,stencilClearTag) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ActiveStencilFaceEXT, GLenum face) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ActiveStencilFaceEXT,face) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexSubImage1DEXT, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void* pixels) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexSubImage1DEXT,target,level,xoffset,width,format,type,pixels) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ClearColorIiEXT, GLint red, GLint green, GLint blue, GLint alpha) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ClearColorIiEXT,red,green,blue,alpha) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ClearColorIuiEXT, GLuint red, GLuint green, GLuint blue, GLuint alpha) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ClearColorIuiEXT,red,green,blue,alpha) -DECLARE_GL_FUNCTION_STUB_HEAD(GLboolean, AreTexturesResidentEXT, GLsizei n, const GLuint* textures, GLboolean* residences) DECLARE_GL_FUNCTION_STUB_END(GLboolean, AreTexturesResidentEXT,n,textures,residences) -DECLARE_GL_FUNCTION_STUB_HEAD(void, PrioritizeTexturesEXT, GLsizei n, const GLuint* textures, const GLclampf* priorities) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, PrioritizeTexturesEXT,n,textures,priorities) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TextureNormalEXT, GLenum mode) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TextureNormalEXT,mode) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexStorage1DEXT, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexStorage1DEXT,target,levels,internalformat,width) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetQueryObjecti64vEXT, GLuint id, GLenum pname, GLint64* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetQueryObjecti64vEXT,id,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetQueryObjectui64vEXT, GLuint id, GLenum pname, GLuint64* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetQueryObjectui64vEXT,id,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, BindBufferOffsetEXT, GLenum target, GLuint index, GLuint buffer, GLintptr offset) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, BindBufferOffsetEXT,target,index,buffer,offset) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ArrayElementEXT, GLint i) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ArrayElementEXT,i) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ColorPointerEXT, GLint size, GLenum type, GLsizei stride, GLsizei count, const void* pointer) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ColorPointerEXT,size,type,stride,count,pointer) -DECLARE_GL_FUNCTION_STUB_HEAD(void, EdgeFlagPointerEXT, GLsizei stride, GLsizei count, const GLboolean* pointer) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, EdgeFlagPointerEXT,stride,count,pointer) -DECLARE_GL_FUNCTION_STUB_HEAD(void, IndexPointerEXT, GLenum type, GLsizei stride, GLsizei count, const void* pointer) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, IndexPointerEXT,type,stride,count,pointer) -DECLARE_GL_FUNCTION_STUB_HEAD(void, NormalPointerEXT, GLenum type, GLsizei stride, GLsizei count, const void* pointer) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, NormalPointerEXT,type,stride,count,pointer) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexCoordPointerEXT, GLint size, GLenum type, GLsizei stride, GLsizei count, const void* pointer) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexCoordPointerEXT,size,type,stride,count,pointer) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexPointerEXT, GLint size, GLenum type, GLsizei stride, GLsizei count, const void* pointer) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexPointerEXT,size,type,stride,count,pointer) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribL1dEXT, GLuint index, GLdouble x) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribL1dEXT,index,x) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribL2dEXT, GLuint index, GLdouble x, GLdouble y) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribL2dEXT,index,x,y) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribL3dEXT, GLuint index, GLdouble x, GLdouble y, GLdouble z) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribL3dEXT,index,x,y,z) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribL4dEXT, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribL4dEXT,index,x,y,z,w) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribL1dvEXT, GLuint index, const GLdouble* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribL1dvEXT,index,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribL2dvEXT, GLuint index, const GLdouble* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribL2dvEXT,index,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribL3dvEXT, GLuint index, const GLdouble* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribL3dvEXT,index,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribL4dvEXT, GLuint index, const GLdouble* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribL4dvEXT,index,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribLPointerEXT, GLuint index, GLint size, GLenum type, GLsizei stride, const void* pointer) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribLPointerEXT,index,size,type,stride,pointer) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetVertexAttribLdvEXT, GLuint index, GLenum pname, GLdouble* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetVertexAttribLdvEXT,index,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, BeginVertexShaderEXT,void) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, BeginVertexShaderEXT,) -DECLARE_GL_FUNCTION_STUB_HEAD(void, EndVertexShaderEXT,void) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, EndVertexShaderEXT,) -DECLARE_GL_FUNCTION_STUB_HEAD(void, BindVertexShaderEXT, GLuint id) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, BindVertexShaderEXT,id) -DECLARE_GL_FUNCTION_STUB_HEAD(GLuint, GenVertexShadersEXT, GLuint range) DECLARE_GL_FUNCTION_STUB_END(GLuint, GenVertexShadersEXT,range) -DECLARE_GL_FUNCTION_STUB_HEAD(void, DeleteVertexShaderEXT, GLuint id) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, DeleteVertexShaderEXT,id) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ShaderOp1EXT, GLenum op, GLuint res, GLuint arg1) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ShaderOp1EXT,op,res,arg1) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ShaderOp2EXT, GLenum op, GLuint res, GLuint arg1, GLuint arg2) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ShaderOp2EXT,op,res,arg1,arg2) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ShaderOp3EXT, GLenum op, GLuint res, GLuint arg1, GLuint arg2, GLuint arg3) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ShaderOp3EXT,op,res,arg1,arg2,arg3) -DECLARE_GL_FUNCTION_STUB_HEAD(void, SwizzleEXT, GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, SwizzleEXT,res,in,outX,outY,outZ,outW) -DECLARE_GL_FUNCTION_STUB_HEAD(void, WriteMaskEXT, GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, WriteMaskEXT,res,in,outX,outY,outZ,outW) -DECLARE_GL_FUNCTION_STUB_HEAD(void, InsertComponentEXT, GLuint res, GLuint src, GLuint num) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, InsertComponentEXT,res,src,num) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ExtractComponentEXT, GLuint res, GLuint src, GLuint num) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ExtractComponentEXT,res,src,num) -DECLARE_GL_FUNCTION_STUB_HEAD(GLuint, GenSymbolsEXT, GLenum datatype, GLenum storagetype, GLenum range, GLuint components) DECLARE_GL_FUNCTION_STUB_END(GLuint, GenSymbolsEXT,datatype,storagetype,range,components) -DECLARE_GL_FUNCTION_STUB_HEAD(void, SetInvariantEXT, GLuint id, GLenum type, const void* addr) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, SetInvariantEXT,id,type,addr) -DECLARE_GL_FUNCTION_STUB_HEAD(void, SetLocalConstantEXT, GLuint id, GLenum type, const void* addr) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, SetLocalConstantEXT,id,type,addr) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VariantbvEXT, GLuint id, const GLbyte* addr) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VariantbvEXT,id,addr) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VariantsvEXT, GLuint id, const GLshort* addr) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VariantsvEXT,id,addr) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VariantivEXT, GLuint id, const GLint* addr) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VariantivEXT,id,addr) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VariantfvEXT, GLuint id, const GLfloat* addr) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VariantfvEXT,id,addr) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VariantdvEXT, GLuint id, const GLdouble* addr) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VariantdvEXT,id,addr) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VariantubvEXT, GLuint id, const GLubyte* addr) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VariantubvEXT,id,addr) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VariantusvEXT, GLuint id, const GLushort* addr) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VariantusvEXT,id,addr) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VariantuivEXT, GLuint id, const GLuint* addr) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VariantuivEXT,id,addr) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VariantPointerEXT, GLuint id, GLenum type, GLuint stride, const void* addr) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VariantPointerEXT,id,type,stride,addr) -DECLARE_GL_FUNCTION_STUB_HEAD(void, EnableVariantClientStateEXT, GLuint id) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, EnableVariantClientStateEXT,id) -DECLARE_GL_FUNCTION_STUB_HEAD(void, DisableVariantClientStateEXT, GLuint id) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, DisableVariantClientStateEXT,id) -DECLARE_GL_FUNCTION_STUB_HEAD(GLuint, BindLightParameterEXT, GLenum light, GLenum value) DECLARE_GL_FUNCTION_STUB_END(GLuint, BindLightParameterEXT,light,value) -DECLARE_GL_FUNCTION_STUB_HEAD(GLuint, BindMaterialParameterEXT, GLenum face, GLenum value) DECLARE_GL_FUNCTION_STUB_END(GLuint, BindMaterialParameterEXT,face,value) -DECLARE_GL_FUNCTION_STUB_HEAD(GLuint, BindTexGenParameterEXT, GLenum unit, GLenum coord, GLenum value) DECLARE_GL_FUNCTION_STUB_END(GLuint, BindTexGenParameterEXT,unit,coord,value) -DECLARE_GL_FUNCTION_STUB_HEAD(GLuint, BindTextureUnitParameterEXT, GLenum unit, GLenum value) DECLARE_GL_FUNCTION_STUB_END(GLuint, BindTextureUnitParameterEXT,unit,value) -DECLARE_GL_FUNCTION_STUB_HEAD(GLuint, BindParameterEXT, GLenum value) DECLARE_GL_FUNCTION_STUB_END(GLuint, BindParameterEXT,value) -DECLARE_GL_FUNCTION_STUB_HEAD(GLboolean, IsVariantEnabledEXT, GLuint id, GLenum cap) DECLARE_GL_FUNCTION_STUB_END(GLboolean, IsVariantEnabledEXT,id,cap) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetVariantBooleanvEXT, GLuint id, GLenum value, GLboolean* data) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetVariantBooleanvEXT,id,value,data) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetVariantIntegervEXT, GLuint id, GLenum value, GLint* data) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetVariantIntegervEXT,id,value,data) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetVariantFloatvEXT, GLuint id, GLenum value, GLfloat* data) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetVariantFloatvEXT,id,value,data) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetVariantPointervEXT, GLuint id, GLenum value, void* *data) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetVariantPointervEXT,id,value,*data) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetInvariantBooleanvEXT, GLuint id, GLenum value, GLboolean* data) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetInvariantBooleanvEXT,id,value,data) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetInvariantIntegervEXT, GLuint id, GLenum value, GLint* data) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetInvariantIntegervEXT,id,value,data) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetInvariantFloatvEXT, GLuint id, GLenum value, GLfloat* data) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetInvariantFloatvEXT,id,value,data) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetLocalConstantBooleanvEXT, GLuint id, GLenum value, GLboolean* data) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetLocalConstantBooleanvEXT,id,value,data) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetLocalConstantIntegervEXT, GLuint id, GLenum value, GLint* data) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetLocalConstantIntegervEXT,id,value,data) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetLocalConstantFloatvEXT, GLuint id, GLenum value, GLfloat* data) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetLocalConstantFloatvEXT,id,value,data) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexWeightfEXT, GLfloat weight) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexWeightfEXT,weight) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexWeightfvEXT,const GLfloat* weight) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexWeightfvEXT,weight) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexWeightPointerEXT, GLint size, GLenum type, GLsizei stride, const void* pointer) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexWeightPointerEXT,size,type,stride,pointer) -DECLARE_GL_FUNCTION_STUB_HEAD(GLboolean, AcquireKeyedMutexWin32EXT, GLuint memory, GLuint64 key, GLuint timeout) DECLARE_GL_FUNCTION_STUB_END(GLboolean, AcquireKeyedMutexWin32EXT,memory,key,timeout) -DECLARE_GL_FUNCTION_STUB_HEAD(GLboolean, ReleaseKeyedMutexWin32EXT, GLuint memory, GLuint64 key) DECLARE_GL_FUNCTION_STUB_END(GLboolean, ReleaseKeyedMutexWin32EXT,memory,key) -DECLARE_GL_FUNCTION_STUB_HEAD(void, WindowRectanesEXT, GLenum mode, GLsizei count, const GLint* box) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, WindowRectanesEXT,mode,count,box) -DECLARE_GL_FUNCTION_STUB_HEAD(GLsync, ImportSyncEXT, GLenum external_sync_type, GLintptr external_sync, GLbitfield flags) DECLARE_GL_FUNCTION_STUB_END(GLsync, ImportSyncEXT,external_sync_type,external_sync,flags) -DECLARE_GL_FUNCTION_STUB_HEAD(void, FrameTerminatorGREMEDY,void) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, FrameTerminatorGREMEDY,) -DECLARE_GL_FUNCTION_STUB_HEAD(void, StringMarkerGREMEDY, GLsizei len, const void* string) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, StringMarkerGREMEDY,len,string) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ImageTransformParameteriHP, GLenum target, GLenum pname, GLint param) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ImageTransformParameteriHP,target,pname,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ImageTransformParameterfHP, GLenum target, GLenum pname, GLfloat param) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ImageTransformParameterfHP,target,pname,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ImageTransformParameterivHP, GLenum target, GLenum pname, const GLint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ImageTransformParameterivHP,target,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ImageTransformParameterfvHP, GLenum target, GLenum pname, const GLfloat* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ImageTransformParameterfvHP,target,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetImageTransformParameterivHP, GLenum target, GLenum pname, GLint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetImageTransformParameterivHP,target,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetImageTransformParameterfvHP, GLenum target, GLenum pname, GLfloat* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetImageTransformParameterfvHP,target,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiModeDrawArraysIBM,const GLenum* mode, const GLint* first, const GLsizei* count, GLsizei primcount, GLint modestride) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiModeDrawArraysIBM,mode,first,count,primcount,modestride) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiModeDrawElementsIBM,const GLenum* mode, const GLsizei* count, GLenum type, const void* const*indices, GLsizei primcount, GLint modestride) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiModeDrawElementsIBM,mode,count,type,indices,primcount,modestride) -DECLARE_GL_FUNCTION_STUB_HEAD(void, FlushStaticDataIBM, GLenum target) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, FlushStaticDataIBM,target) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ColorPointerListIBM, GLint size, GLenum type, GLint stride, const void* *pointer, GLint ptrstride) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ColorPointerListIBM,size,type,stride,pointer,ptrstride) -DECLARE_GL_FUNCTION_STUB_HEAD(void, SecondaryColorPointerListIBM, GLint size, GLenum type, GLint stride, const void* *pointer, GLint ptrstride) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, SecondaryColorPointerListIBM,size,type,stride,pointer,ptrstride) -DECLARE_GL_FUNCTION_STUB_HEAD(void, EdgeFlagPointerListIBM, GLint stride, const GLboolean* *pointer, GLint ptrstride) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, EdgeFlagPointerListIBM,stride,pointer,ptrstride) -DECLARE_GL_FUNCTION_STUB_HEAD(void, FogCoordPointerListIBM, GLenum type, GLint stride, const void* *pointer, GLint ptrstride) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, FogCoordPointerListIBM,type,stride,pointer,ptrstride) -DECLARE_GL_FUNCTION_STUB_HEAD(void, IndexPointerListIBM, GLenum type, GLint stride, const void* *pointer, GLint ptrstride) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, IndexPointerListIBM,type,stride,pointer,ptrstride) -DECLARE_GL_FUNCTION_STUB_HEAD(void, NormalPointerListIBM, GLenum type, GLint stride, const void* *pointer, GLint ptrstride) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, NormalPointerListIBM,type,stride,pointer,ptrstride) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexCoordPointerListIBM, GLint size, GLenum type, GLint stride, const void* *pointer, GLint ptrstride) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexCoordPointerListIBM,size,type,stride,pointer,ptrstride) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexPointerListIBM, GLint size, GLenum type, GLint stride, const void* *pointer, GLint ptrstride) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexPointerListIBM,size,type,stride,pointer,ptrstride) -DECLARE_GL_FUNCTION_STUB_HEAD(void, BlendFuncSeparateINGR, GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, BlendFuncSeparateINGR,sfactorRGB,dfactorRGB,sfactorAlpha,dfactorAlpha) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ApplyFramebufferAttachmentCMAAINTEL,void) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ApplyFramebufferAttachmentCMAAINTEL,) -DECLARE_GL_FUNCTION_STUB_HEAD(void, SyncTextureINTEL, GLuint texture) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, SyncTextureINTEL,texture) -DECLARE_GL_FUNCTION_STUB_HEAD(void, UnmapTexture2DINTEL, GLuint texture, GLint level) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, UnmapTexture2DINTEL,texture,level) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexPointervINTEL, GLint size, GLenum type, const void* *pointer) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexPointervINTEL,size,type,pointer) -DECLARE_GL_FUNCTION_STUB_HEAD(void, NormalPointervINTEL, GLenum type, const void* *pointer) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, NormalPointervINTEL,type,pointer) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ColorPointervINTEL, GLint size, GLenum type, const void* *pointer) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ColorPointervINTEL,size,type,pointer) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexCoordPointervINTEL, GLint size, GLenum type, const void* *pointer) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexCoordPointervINTEL,size,type,pointer) -DECLARE_GL_FUNCTION_STUB_HEAD(void, BeginPerfQueryINTEL, GLuint queryHandle) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, BeginPerfQueryINTEL,queryHandle) -DECLARE_GL_FUNCTION_STUB_HEAD(void, CreatePerfQueryINTEL, GLuint queryId, GLuint* queryHandle) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, CreatePerfQueryINTEL,queryId,queryHandle) -DECLARE_GL_FUNCTION_STUB_HEAD(void, DeletePerfQueryINTEL, GLuint queryHandle) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, DeletePerfQueryINTEL,queryHandle) -DECLARE_GL_FUNCTION_STUB_HEAD(void, EndPerfQueryINTEL, GLuint queryHandle) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, EndPerfQueryINTEL,queryHandle) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetFirstPerfQueryIdINTEL, GLuint* queryId) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetFirstPerfQueryIdINTEL,queryId) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetNextPerfQueryIdINTEL, GLuint queryId, GLuint* nextQueryId) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetNextPerfQueryIdINTEL,queryId,nextQueryId) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetPerfCounterInfoINTEL, GLuint queryId, GLuint counterId, GLuint counterNameLength, GLchar* counterName, GLuint counterDescLength, GLchar* counterDesc, GLuint* counterOffset, GLuint* counterDataSize, GLuint* counterTypeEnum, GLuint* counterDataTypeEnum, GLuint64* rawCounterMaxValue) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetPerfCounterInfoINTEL,queryId,counterId,counterNameLength,counterName,counterDescLength,counterDesc,counterOffset,counterDataSize,counterTypeEnum,counterDataTypeEnum,rawCounterMaxValue) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetPerfQueryDataINTEL, GLuint queryHandle, GLuint flags, GLsizei dataSize, void* data, GLuint* bytesWritten) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetPerfQueryDataINTEL,queryHandle,flags,dataSize,data,bytesWritten) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetPerfQueryIdByNameINTEL, GLchar* queryName, GLuint* queryId) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetPerfQueryIdByNameINTEL,queryName,queryId) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetPerfQueryInfoINTEL, GLuint queryId, GLuint queryNameLength, GLchar* queryName, GLuint* dataSize, GLuint* noCounters, GLuint* noInstances, GLuint* capsMask) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetPerfQueryInfoINTEL,queryId,queryNameLength,queryName,dataSize,noCounters,noInstances,capsMask) -DECLARE_GL_FUNCTION_STUB_HEAD(void, FramebufferParameteriMESA, GLenum target, GLenum pname, GLint param) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, FramebufferParameteriMESA,target,pname,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetFramebufferParameterivMESA, GLenum target, GLenum pname, GLint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetFramebufferParameterivMESA,target,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ResizeBuffersMESA,void) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ResizeBuffersMESA,) -DECLARE_GL_FUNCTION_STUB_HEAD(void, WindowPos2dMESA, GLdouble x, GLdouble y) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, WindowPos2dMESA,x,y) -DECLARE_GL_FUNCTION_STUB_HEAD(void, WindowPos2dvMESA,const GLdouble* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, WindowPos2dvMESA,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, WindowPos2fMESA, GLfloat x, GLfloat y) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, WindowPos2fMESA,x,y) -DECLARE_GL_FUNCTION_STUB_HEAD(void, WindowPos2fvMESA,const GLfloat* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, WindowPos2fvMESA,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, WindowPos2iMESA, GLint x, GLint y) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, WindowPos2iMESA,x,y) -DECLARE_GL_FUNCTION_STUB_HEAD(void, WindowPos2ivMESA,const GLint* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, WindowPos2ivMESA,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, WindowPos2sMESA, GLshort x, GLshort y) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, WindowPos2sMESA,x,y) -DECLARE_GL_FUNCTION_STUB_HEAD(void, WindowPos2svMESA,const GLshort* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, WindowPos2svMESA,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, WindowPos3dMESA, GLdouble x, GLdouble y, GLdouble z) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, WindowPos3dMESA,x,y,z) -DECLARE_GL_FUNCTION_STUB_HEAD(void, WindowPos3dvMESA,const GLdouble* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, WindowPos3dvMESA,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, WindowPos3fMESA, GLfloat x, GLfloat y, GLfloat z) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, WindowPos3fMESA,x,y,z) -DECLARE_GL_FUNCTION_STUB_HEAD(void, WindowPos3fvMESA,const GLfloat* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, WindowPos3fvMESA,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, WindowPos3iMESA, GLint x, GLint y, GLint z) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, WindowPos3iMESA,x,y,z) -DECLARE_GL_FUNCTION_STUB_HEAD(void, WindowPos3ivMESA,const GLint* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, WindowPos3ivMESA,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, WindowPos3sMESA, GLshort x, GLshort y, GLshort z) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, WindowPos3sMESA,x,y,z) -DECLARE_GL_FUNCTION_STUB_HEAD(void, WindowPos3svMESA,const GLshort* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, WindowPos3svMESA,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, WindowPos4dMESA, GLdouble x, GLdouble y, GLdouble z, GLdouble w) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, WindowPos4dMESA,x,y,z,w) -DECLARE_GL_FUNCTION_STUB_HEAD(void, WindowPos4dvMESA,const GLdouble* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, WindowPos4dvMESA,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, WindowPos4fMESA, GLfloat x, GLfloat y, GLfloat z, GLfloat w) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, WindowPos4fMESA,x,y,z,w) -DECLARE_GL_FUNCTION_STUB_HEAD(void, WindowPos4fvMESA,const GLfloat* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, WindowPos4fvMESA,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, WindowPos4iMESA, GLint x, GLint y, GLint z, GLint w) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, WindowPos4iMESA,x,y,z,w) -DECLARE_GL_FUNCTION_STUB_HEAD(void, WindowPos4ivMESA,const GLint* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, WindowPos4ivMESA,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, WindowPos4sMESA, GLshort x, GLshort y, GLshort z, GLshort w) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, WindowPos4sMESA,x,y,z,w) -DECLARE_GL_FUNCTION_STUB_HEAD(void, WindowPos4svMESA,const GLshort* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, WindowPos4svMESA,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, BeginConditionalRenderNVX, GLuint id) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, BeginConditionalRenderNVX,id) -DECLARE_GL_FUNCTION_STUB_HEAD(void, EndConditionalRenderNVX,void) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, EndConditionalRenderNVX,) -DECLARE_GL_FUNCTION_STUB_HEAD(void, UploadGpuMaskNVX, GLbitfield mask) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, UploadGpuMaskNVX,mask) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MulticastViewportArrayvNVX, GLuint gpu, GLuint first, GLsizei count, const GLfloat* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MulticastViewportArrayvNVX,gpu,first,count,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MulticastViewportPositionWScaleNVX, GLuint gpu, GLuint index, GLfloat xcoeff, GLfloat ycoeff) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MulticastViewportPositionWScaleNVX,gpu,index,xcoeff,ycoeff) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MulticastScissorArrayvNVX, GLuint gpu, GLuint first, GLsizei count, const GLint* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MulticastScissorArrayvNVX,gpu,first,count,v) -DECLARE_GL_FUNCTION_STUB_HEAD(GLuint, AsyncCopyBufferSubDataNVX, 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) DECLARE_GL_FUNCTION_STUB_END(GLuint, AsyncCopyBufferSubDataNVX,waitSemaphoreCount,waitSemaphoreArray,fenceValueArray,readGpu,writeGpuMask,readBuffer,writeBuffer,readOffset,writeOffset,size,signalSemaphoreCount,signalSemaphoreArray,signalValueArray) -DECLARE_GL_FUNCTION_STUB_HEAD(GLuint, AsyncCopyImageSubDataNVX, 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) DECLARE_GL_FUNCTION_STUB_END(GLuint, AsyncCopyImageSubDataNVX,waitSemaphoreCount,waitSemaphoreArray,waitValueArray,srcGpu,dstGpuMask,srcName,srcTarget,srcLevel,srcX,srcY,srcZ,dstName,dstTarget,dstLevel,dstX,dstY,dstZ,srcWidth,srcHeight,srcDepth,signalSemaphoreCount,signalSemaphoreArray,signalValueArray) -DECLARE_GL_FUNCTION_STUB_HEAD(void, LGPUNamedBufferSubDataNVX, GLbitfield gpuMask, GLuint buffer, GLintptr offset, GLsizeiptr size, const void* data) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, LGPUNamedBufferSubDataNVX,gpuMask,buffer,offset,size,data) -DECLARE_GL_FUNCTION_STUB_HEAD(void, LGPUCopyImageSubDataNVX, 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) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, LGPUCopyImageSubDataNVX,sourceGpu,destinationGpuMask,srcName,srcTarget,srcLevel,srcX,srxY,srcZ,dstName,dstTarget,dstLevel,dstX,dstY,dstZ,width,height,depth) -DECLARE_GL_FUNCTION_STUB_HEAD(void, LGPUInterlockNVX,void) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, LGPUInterlockNVX,) -DECLARE_GL_FUNCTION_STUB_HEAD(GLuint, CreateProgressFenceNVX,void) DECLARE_GL_FUNCTION_STUB_END(GLuint, CreateProgressFenceNVX,) -DECLARE_GL_FUNCTION_STUB_HEAD(void, SignalSemaphoreui64NVX, GLuint signalGpu, GLsizei fenceObjectCount, const GLuint* semaphoreArray, const GLuint64* fenceValueArray) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, SignalSemaphoreui64NVX,signalGpu,fenceObjectCount,semaphoreArray,fenceValueArray) -DECLARE_GL_FUNCTION_STUB_HEAD(void, WaitSemaphoreui64NVX, GLuint waitGpu, GLsizei fenceObjectCount, const GLuint* semaphoreArray, const GLuint64* fenceValueArray) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, WaitSemaphoreui64NVX,waitGpu,fenceObjectCount,semaphoreArray,fenceValueArray) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ClientWaitSemaphoreui64NVX, GLsizei fenceObjectCount, const GLuint* semaphoreArray, const GLuint64* fenceValueArray) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ClientWaitSemaphoreui64NVX,fenceObjectCount,semaphoreArray,fenceValueArray) -DECLARE_GL_FUNCTION_STUB_HEAD(void, AlphaToCoverageDitherControlNV, GLenum mode) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, AlphaToCoverageDitherControlNV,mode) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiDrawArraysIndirectBindlessNV, GLenum mode, const void* indirect, GLsizei drawCount, GLsizei stride, GLint vertexBufferCount) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiDrawArraysIndirectBindlessNV,mode,indirect,drawCount,stride,vertexBufferCount) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiDrawElementsIndirectBindlessNV, GLenum mode, GLenum type, const void* indirect, GLsizei drawCount, GLsizei stride, GLint vertexBufferCount) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiDrawElementsIndirectBindlessNV,mode,type,indirect,drawCount,stride,vertexBufferCount) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiDrawArraysIndirectBindlessCountNV, GLenum mode, const void* indirect, GLsizei drawCount, GLsizei maxDrawCount, GLsizei stride, GLint vertexBufferCount) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiDrawArraysIndirectBindlessCountNV,mode,indirect,drawCount,maxDrawCount,stride,vertexBufferCount) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiDrawElementsIndirectBindlessCountNV, GLenum mode, GLenum type, const void* indirect, GLsizei drawCount, GLsizei maxDrawCount, GLsizei stride, GLint vertexBufferCount) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiDrawElementsIndirectBindlessCountNV,mode,type,indirect,drawCount,maxDrawCount,stride,vertexBufferCount) -DECLARE_GL_FUNCTION_STUB_HEAD(GLuint64, GetTextureHandleNV, GLuint texture) DECLARE_GL_FUNCTION_STUB_END(GLuint64, GetTextureHandleNV,texture) -DECLARE_GL_FUNCTION_STUB_HEAD(GLuint64, GetTextureSamplerHandleNV, GLuint texture, GLuint sampler) DECLARE_GL_FUNCTION_STUB_END(GLuint64, GetTextureSamplerHandleNV,texture,sampler) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MakeTextureHandleResidentNV, GLuint64 handle) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MakeTextureHandleResidentNV,handle) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MakeTextureHandleNonResidentNV, GLuint64 handle) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MakeTextureHandleNonResidentNV,handle) -DECLARE_GL_FUNCTION_STUB_HEAD(GLuint64, GetImageHandleNV, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum format) DECLARE_GL_FUNCTION_STUB_END(GLuint64, GetImageHandleNV,texture,level,layered,layer,format) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MakeImageHandleResidentNV, GLuint64 handle, GLenum access) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MakeImageHandleResidentNV,handle,access) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MakeImageHandleNonResidentNV, GLuint64 handle) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MakeImageHandleNonResidentNV,handle) -DECLARE_GL_FUNCTION_STUB_HEAD(void, UniformHandleui64NV, GLint location, GLuint64 value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, UniformHandleui64NV,location,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, UniformHandleui64vNV, GLint location, GLsizei count, const GLuint64* value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, UniformHandleui64vNV,location,count,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniformHandleui64NV, GLuint program, GLint location, GLuint64 value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniformHandleui64NV,program,location,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniformHandleui64vNV, GLuint program, GLint location, GLsizei count, const GLuint64* values) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniformHandleui64vNV,program,location,count,values) -DECLARE_GL_FUNCTION_STUB_HEAD(GLboolean, IsTextureHandleResidentNV, GLuint64 handle) DECLARE_GL_FUNCTION_STUB_END(GLboolean, IsTextureHandleResidentNV,handle) -DECLARE_GL_FUNCTION_STUB_HEAD(GLboolean, IsImageHandleResidentNV, GLuint64 handle) DECLARE_GL_FUNCTION_STUB_END(GLboolean, IsImageHandleResidentNV,handle) -DECLARE_GL_FUNCTION_STUB_HEAD(void, BlendParameteriNV, GLenum pname, GLint value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, BlendParameteriNV,pname,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, BlendBarrierNV,void) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, BlendBarrierNV,) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ViewportPositionWScaleNV, GLuint index, GLfloat xcoeff, GLfloat ycoeff) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ViewportPositionWScaleNV,index,xcoeff,ycoeff) -DECLARE_GL_FUNCTION_STUB_HEAD(void, CreateStatesNV, GLsizei n, GLuint* states) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, CreateStatesNV,n,states) -DECLARE_GL_FUNCTION_STUB_HEAD(void, DeleteStatesNV, GLsizei n, const GLuint* states) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, DeleteStatesNV,n,states) -DECLARE_GL_FUNCTION_STUB_HEAD(GLboolean, IsStateNV, GLuint state) DECLARE_GL_FUNCTION_STUB_END(GLboolean, IsStateNV,state) -DECLARE_GL_FUNCTION_STUB_HEAD(void, StateCaptureNV, GLuint state, GLenum mode) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, StateCaptureNV,state,mode) -DECLARE_GL_FUNCTION_STUB_HEAD(GLuint, GetCommandHeaderNV, GLenum tokenID, GLuint size) DECLARE_GL_FUNCTION_STUB_END(GLuint, GetCommandHeaderNV,tokenID,size) -DECLARE_GL_FUNCTION_STUB_HEAD(GLushort, GetStageIndexNV, GLenum shadertype) DECLARE_GL_FUNCTION_STUB_END(GLushort, GetStageIndexNV,shadertype) -DECLARE_GL_FUNCTION_STUB_HEAD(void, DrawCommandsNV, GLenum primitiveMode, GLuint buffer, const GLintptr* indirects, const GLsizei* sizes, GLuint count) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, DrawCommandsNV,primitiveMode,buffer,indirects,sizes,count) -DECLARE_GL_FUNCTION_STUB_HEAD(void, DrawCommandsAddressNV, GLenum primitiveMode, const GLuint64* indirects, const GLsizei* sizes, GLuint count) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, DrawCommandsAddressNV,primitiveMode,indirects,sizes,count) -DECLARE_GL_FUNCTION_STUB_HEAD(void, DrawCommandsStatesNV, GLuint buffer, const GLintptr* indirects, const GLsizei* sizes, const GLuint* states, const GLuint* fbos, GLuint count) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, DrawCommandsStatesNV,buffer,indirects,sizes,states,fbos,count) -DECLARE_GL_FUNCTION_STUB_HEAD(void, DrawCommandsStatesAddressNV,const GLuint64* indirects, const GLsizei* sizes, const GLuint* states, const GLuint* fbos, GLuint count) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, DrawCommandsStatesAddressNV,indirects,sizes,states,fbos,count) -DECLARE_GL_FUNCTION_STUB_HEAD(void, CreateCommandListsNV, GLsizei n, GLuint* lists) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, CreateCommandListsNV,n,lists) -DECLARE_GL_FUNCTION_STUB_HEAD(void, DeleteCommandListsNV, GLsizei n, const GLuint* lists) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, DeleteCommandListsNV,n,lists) -DECLARE_GL_FUNCTION_STUB_HEAD(GLboolean, IsCommandListNV, GLuint list) DECLARE_GL_FUNCTION_STUB_END(GLboolean, IsCommandListNV,list) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ListDrawCommandsStatesClientNV, GLuint list, GLuint segment, const void* *indirects, const GLsizei* sizes, const GLuint* states, const GLuint* fbos, GLuint count) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ListDrawCommandsStatesClientNV,list,segment,indirects,sizes,states,fbos,count) -DECLARE_GL_FUNCTION_STUB_HEAD(void, CommandListSegmentsNV, GLuint list, GLuint segments) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, CommandListSegmentsNV,list,segments) -DECLARE_GL_FUNCTION_STUB_HEAD(void, CompileCommandListNV, GLuint list) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, CompileCommandListNV,list) -DECLARE_GL_FUNCTION_STUB_HEAD(void, CallCommandListNV, GLuint list) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, CallCommandListNV,list) -DECLARE_GL_FUNCTION_STUB_HEAD(void, BeginConditionalRenderNV, GLuint id, GLenum mode) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, BeginConditionalRenderNV,id,mode) -DECLARE_GL_FUNCTION_STUB_HEAD(void, EndConditionalRenderNV,void) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, EndConditionalRenderNV,) -DECLARE_GL_FUNCTION_STUB_HEAD(void, SubpixelPrecisionBiasNV, GLuint xbits, GLuint ybits) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, SubpixelPrecisionBiasNV,xbits,ybits) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ConservativeRasterParameterfNV, GLenum pname, GLfloat value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ConservativeRasterParameterfNV,pname,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ConservativeRasterParameteriNV, GLenum pname, GLint param) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ConservativeRasterParameteriNV,pname,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, CopyImageSubDataNV, 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) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, CopyImageSubDataNV,srcName,srcTarget,srcLevel,srcX,srcY,srcZ,dstName,dstTarget,dstLevel,dstX,dstY,dstZ,width,height,depth) -DECLARE_GL_FUNCTION_STUB_HEAD(void, DepthRangedNV, GLdouble zNear, GLdouble zFar) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, DepthRangedNV,zNear,zFar) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ClearDepthdNV, GLdouble depth) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ClearDepthdNV,depth) -DECLARE_GL_FUNCTION_STUB_HEAD(void, DepthBoundsdNV, GLdouble zmin, GLdouble zmax) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, DepthBoundsdNV,zmin,zmax) -DECLARE_GL_FUNCTION_STUB_HEAD(void, DrawTextureNV, GLuint texture, GLuint sampler, GLfloat x0, GLfloat y0, GLfloat x1, GLfloat y1, GLfloat z, GLfloat s0, GLfloat t0, GLfloat s1, GLfloat t1) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, DrawTextureNV,texture,sampler,x0,y0,x1,y1,z,s0,t0,s1,t1) -DECLARE_GL_FUNCTION_STUB_HEAD(void, DrawVkImageNV, GLuint64 vkImage, GLuint sampler, GLfloat x0, GLfloat y0, GLfloat x1, GLfloat y1, GLfloat z, GLfloat s0, GLfloat t0, GLfloat s1, GLfloat t1) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, DrawVkImageNV,vkImage,sampler,x0,y0,x1,y1,z,s0,t0,s1,t1) -DECLARE_GL_FUNCTION_STUB_HEAD(GLVULKANPROCNV, GetVkProcAddrNV,const GLchar* name) DECLARE_GL_FUNCTION_STUB_END(GLVULKANPROCNV, GetVkProcAddrNV,name) -DECLARE_GL_FUNCTION_STUB_HEAD(void, WaitVkSemaphoreNV, GLuint64 vkSemaphore) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, WaitVkSemaphoreNV,vkSemaphore) -DECLARE_GL_FUNCTION_STUB_HEAD(void, SignalVkSemaphoreNV, GLuint64 vkSemaphore) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, SignalVkSemaphoreNV,vkSemaphore) -DECLARE_GL_FUNCTION_STUB_HEAD(void, SignalVkFenceNV, GLuint64 vkFence) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, SignalVkFenceNV,vkFence) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MapControlPointsNV, GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLint uorder, GLint vorder, GLboolean packed, const void* points) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MapControlPointsNV,target,index,type,ustride,vstride,uorder,vorder,packed,points) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MapParameterivNV, GLenum target, GLenum pname, const GLint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MapParameterivNV,target,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MapParameterfvNV, GLenum target, GLenum pname, const GLfloat* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MapParameterfvNV,target,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetMapControlPointsNV, GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLboolean packed, void* points) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetMapControlPointsNV,target,index,type,ustride,vstride,packed,points) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetMapParameterivNV, GLenum target, GLenum pname, GLint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetMapParameterivNV,target,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetMapParameterfvNV, GLenum target, GLenum pname, GLfloat* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetMapParameterfvNV,target,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetMapAttribParameterivNV, GLenum target, GLuint index, GLenum pname, GLint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetMapAttribParameterivNV,target,index,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetMapAttribParameterfvNV, GLenum target, GLuint index, GLenum pname, GLfloat* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetMapAttribParameterfvNV,target,index,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, EvalMapsNV, GLenum target, GLenum mode) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, EvalMapsNV,target,mode) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetMultisamplefvNV, GLenum pname, GLuint index, GLfloat* val) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetMultisamplefvNV,pname,index,val) -DECLARE_GL_FUNCTION_STUB_HEAD(void, SampleMaskIndexedNV, GLuint index, GLbitfield mask) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, SampleMaskIndexedNV,index,mask) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexRenderbufferNV, GLenum target, GLuint renderbuffer) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexRenderbufferNV,target,renderbuffer) -DECLARE_GL_FUNCTION_STUB_HEAD(void, DeleteFencesNV, GLsizei n, const GLuint* fences) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, DeleteFencesNV,n,fences) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GenFencesNV, GLsizei n, GLuint* fences) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GenFencesNV,n,fences) -DECLARE_GL_FUNCTION_STUB_HEAD(GLboolean, IsFenceNV, GLuint fence) DECLARE_GL_FUNCTION_STUB_END(GLboolean, IsFenceNV,fence) -DECLARE_GL_FUNCTION_STUB_HEAD(GLboolean, TestFenceNV, GLuint fence) DECLARE_GL_FUNCTION_STUB_END(GLboolean, TestFenceNV,fence) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetFenceivNV, GLuint fence, GLenum pname, GLint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetFenceivNV,fence,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, FinishFenceNV, GLuint fence) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, FinishFenceNV,fence) -DECLARE_GL_FUNCTION_STUB_HEAD(void, SetFenceNV, GLuint fence, GLenum condition) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, SetFenceNV,fence,condition) -DECLARE_GL_FUNCTION_STUB_HEAD(void, FragmentCoverageColorNV, GLuint color) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, FragmentCoverageColorNV,color) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramNamedParameter4fNV, GLuint id, GLsizei len, const GLubyte* name, GLfloat x, GLfloat y, GLfloat z, GLfloat w) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramNamedParameter4fNV,id,len,name,x,y,z,w) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramNamedParameter4fvNV, GLuint id, GLsizei len, const GLubyte* name, const GLfloat* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramNamedParameter4fvNV,id,len,name,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramNamedParameter4dNV, GLuint id, GLsizei len, const GLubyte* name, GLdouble x, GLdouble y, GLdouble z, GLdouble w) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramNamedParameter4dNV,id,len,name,x,y,z,w) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramNamedParameter4dvNV, GLuint id, GLsizei len, const GLubyte* name, const GLdouble* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramNamedParameter4dvNV,id,len,name,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetProgramNamedParameterfvNV, GLuint id, GLsizei len, const GLubyte* name, GLfloat* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetProgramNamedParameterfvNV,id,len,name,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetProgramNamedParameterdvNV, GLuint id, GLsizei len, const GLubyte* name, GLdouble* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetProgramNamedParameterdvNV,id,len,name,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, CoverageModulationTableNV, GLsizei n, const GLfloat* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, CoverageModulationTableNV,n,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetCoverageModulationTableNV, GLsizei bufSize, GLfloat* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetCoverageModulationTableNV,bufSize,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, CoverageModulationNV, GLenum components) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, CoverageModulationNV,components) -DECLARE_GL_FUNCTION_STUB_HEAD(void, RenderbufferStorageMultisampleCoverageNV, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, RenderbufferStorageMultisampleCoverageNV,target,coverageSamples,colorSamples,internalformat,width,height) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramVertexLimitNV, GLenum target, GLint limit) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramVertexLimitNV,target,limit) -DECLARE_GL_FUNCTION_STUB_HEAD(void, FramebufferTextureFaceEXT, GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, FramebufferTextureFaceEXT,target,attachment,texture,level,face) -DECLARE_GL_FUNCTION_STUB_HEAD(void, RenderGpuMaskNV, GLbitfield mask) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, RenderGpuMaskNV,mask) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MulticastBufferSubDataNV, GLbitfield gpuMask, GLuint buffer, GLintptr offset, GLsizeiptr size, const void* data) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MulticastBufferSubDataNV,gpuMask,buffer,offset,size,data) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MulticastCopyBufferSubDataNV, GLuint readGpu, GLbitfield writeGpuMask, GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MulticastCopyBufferSubDataNV,readGpu,writeGpuMask,readBuffer,writeBuffer,readOffset,writeOffset,size) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MulticastCopyImageSubDataNV, 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) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MulticastCopyImageSubDataNV,srcGpu,dstGpuMask,srcName,srcTarget,srcLevel,srcX,srcY,srcZ,dstName,dstTarget,dstLevel,dstX,dstY,dstZ,srcWidth,srcHeight,srcDepth) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MulticastBlitFramebufferNV, GLuint srcGpu, GLuint dstGpu, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MulticastBlitFramebufferNV,srcGpu,dstGpu,srcX0,srcY0,srcX1,srcY1,dstX0,dstY0,dstX1,dstY1,mask,filter) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MulticastFramebufferSampleLocationsfvNV, GLuint gpu, GLuint framebuffer, GLuint start, GLsizei count, const GLfloat* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MulticastFramebufferSampleLocationsfvNV,gpu,framebuffer,start,count,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MulticastBarrierNV,void) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MulticastBarrierNV,) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MulticastWaitSyncNV, GLuint signalGpu, GLbitfield waitGpuMask) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MulticastWaitSyncNV,signalGpu,waitGpuMask) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MulticastGetQueryObjectivNV, GLuint gpu, GLuint id, GLenum pname, GLint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MulticastGetQueryObjectivNV,gpu,id,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MulticastGetQueryObjectuivNV, GLuint gpu, GLuint id, GLenum pname, GLuint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MulticastGetQueryObjectuivNV,gpu,id,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MulticastGetQueryObjecti64vNV, GLuint gpu, GLuint id, GLenum pname, GLint64* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MulticastGetQueryObjecti64vNV,gpu,id,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MulticastGetQueryObjectui64vNV, GLuint gpu, GLuint id, GLenum pname, GLuint64* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MulticastGetQueryObjectui64vNV,gpu,id,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramLocalParameterI4iNV, GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramLocalParameterI4iNV,target,index,x,y,z,w) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramLocalParameterI4ivNV, GLenum target, GLuint index, const GLint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramLocalParameterI4ivNV,target,index,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramLocalParametersI4ivNV, GLenum target, GLuint index, GLsizei count, const GLint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramLocalParametersI4ivNV,target,index,count,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramLocalParameterI4uiNV, GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramLocalParameterI4uiNV,target,index,x,y,z,w) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramLocalParameterI4uivNV, GLenum target, GLuint index, const GLuint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramLocalParameterI4uivNV,target,index,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramLocalParametersI4uivNV, GLenum target, GLuint index, GLsizei count, const GLuint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramLocalParametersI4uivNV,target,index,count,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramEnvParameterI4iNV, GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramEnvParameterI4iNV,target,index,x,y,z,w) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramEnvParameterI4ivNV, GLenum target, GLuint index, const GLint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramEnvParameterI4ivNV,target,index,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramEnvParametersI4ivNV, GLenum target, GLuint index, GLsizei count, const GLint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramEnvParametersI4ivNV,target,index,count,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramEnvParameterI4uiNV, GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramEnvParameterI4uiNV,target,index,x,y,z,w) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramEnvParameterI4uivNV, GLenum target, GLuint index, const GLuint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramEnvParameterI4uivNV,target,index,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramEnvParametersI4uivNV, GLenum target, GLuint index, GLsizei count, const GLuint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramEnvParametersI4uivNV,target,index,count,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetProgramLocalParameterIivNV, GLenum target, GLuint index, GLint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetProgramLocalParameterIivNV,target,index,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetProgramLocalParameterIuivNV, GLenum target, GLuint index, GLuint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetProgramLocalParameterIuivNV,target,index,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetProgramEnvParameterIivNV, GLenum target, GLuint index, GLint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetProgramEnvParameterIivNV,target,index,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetProgramEnvParameterIuivNV, GLenum target, GLuint index, GLuint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetProgramEnvParameterIuivNV,target,index,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramSubroutineParametersuivNV, GLenum target, GLsizei count, const GLuint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramSubroutineParametersuivNV,target,count,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetProgramSubroutineParameteruivNV, GLenum target, GLuint index, GLuint* param) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetProgramSubroutineParameteruivNV,target,index,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Vertex2hNV, GLhalfNV x, GLhalfNV y) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Vertex2hNV,x,y) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Vertex2hvNV,const GLhalfNV* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Vertex2hvNV,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Vertex3hNV, GLhalfNV x, GLhalfNV y, GLhalfNV z) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Vertex3hNV,x,y,z) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Vertex3hvNV,const GLhalfNV* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Vertex3hvNV,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Vertex4hNV, GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Vertex4hNV,x,y,z,w) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Vertex4hvNV,const GLhalfNV* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Vertex4hvNV,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Normal3hNV, GLhalfNV nx, GLhalfNV ny, GLhalfNV nz) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Normal3hNV,nx,ny,nz) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Normal3hvNV,const GLhalfNV* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Normal3hvNV,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Color3hNV, GLhalfNV red, GLhalfNV green, GLhalfNV blue) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Color3hNV,red,green,blue) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Color3hvNV,const GLhalfNV* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Color3hvNV,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Color4hNV, GLhalfNV red, GLhalfNV green, GLhalfNV blue, GLhalfNV alpha) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Color4hNV,red,green,blue,alpha) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Color4hvNV,const GLhalfNV* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Color4hvNV,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexCoord1hNV, GLhalfNV s) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexCoord1hNV,s) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexCoord1hvNV,const GLhalfNV* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexCoord1hvNV,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexCoord2hNV, GLhalfNV s, GLhalfNV t) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexCoord2hNV,s,t) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexCoord2hvNV,const GLhalfNV* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexCoord2hvNV,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexCoord3hNV, GLhalfNV s, GLhalfNV t, GLhalfNV r) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexCoord3hNV,s,t,r) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexCoord3hvNV,const GLhalfNV* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexCoord3hvNV,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexCoord4hNV, GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexCoord4hNV,s,t,r,q) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexCoord4hvNV,const GLhalfNV* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexCoord4hvNV,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexCoord1hNV, GLenum target, GLhalfNV s) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexCoord1hNV,target,s) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexCoord1hvNV, GLenum target, const GLhalfNV* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexCoord1hvNV,target,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexCoord2hNV, GLenum target, GLhalfNV s, GLhalfNV t) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexCoord2hNV,target,s,t) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexCoord2hvNV, GLenum target, const GLhalfNV* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexCoord2hvNV,target,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexCoord3hNV, GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexCoord3hNV,target,s,t,r) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexCoord3hvNV, GLenum target, const GLhalfNV* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexCoord3hvNV,target,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexCoord4hNV, GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexCoord4hNV,target,s,t,r,q) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiTexCoord4hvNV, GLenum target, const GLhalfNV* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiTexCoord4hvNV,target,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, FogCoordhNV, GLhalfNV fog) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, FogCoordhNV,fog) -DECLARE_GL_FUNCTION_STUB_HEAD(void, FogCoordhvNV,const GLhalfNV* fog) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, FogCoordhvNV,fog) -DECLARE_GL_FUNCTION_STUB_HEAD(void, SecondaryColor3hNV, GLhalfNV red, GLhalfNV green, GLhalfNV blue) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, SecondaryColor3hNV,red,green,blue) -DECLARE_GL_FUNCTION_STUB_HEAD(void, SecondaryColor3hvNV,const GLhalfNV* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, SecondaryColor3hvNV,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexWeighthNV, GLhalfNV weight) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexWeighthNV,weight) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexWeighthvNV,const GLhalfNV* weight) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexWeighthvNV,weight) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttrib1hNV, GLuint index, GLhalfNV x) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttrib1hNV,index,x) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttrib1hvNV, GLuint index, const GLhalfNV* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttrib1hvNV,index,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttrib2hNV, GLuint index, GLhalfNV x, GLhalfNV y) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttrib2hNV,index,x,y) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttrib2hvNV, GLuint index, const GLhalfNV* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttrib2hvNV,index,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttrib3hNV, GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttrib3hNV,index,x,y,z) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttrib3hvNV, GLuint index, const GLhalfNV* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttrib3hvNV,index,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttrib4hNV, GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttrib4hNV,index,x,y,z,w) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttrib4hvNV, GLuint index, const GLhalfNV* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttrib4hvNV,index,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribs1hvNV, GLuint index, GLsizei n, const GLhalfNV* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribs1hvNV,index,n,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribs2hvNV, GLuint index, GLsizei n, const GLhalfNV* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribs2hvNV,index,n,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribs3hvNV, GLuint index, GLsizei n, const GLhalfNV* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribs3hvNV,index,n,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribs4hvNV, GLuint index, GLsizei n, const GLhalfNV* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribs4hvNV,index,n,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetInternalformatSampleivNV, GLenum target, GLenum internalformat, GLsizei samples, GLenum pname, GLsizei count, GLint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetInternalformatSampleivNV,target,internalformat,samples,pname,count,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetMemoryObjectDetachedResourcesuivNV, GLuint memory, GLenum pname, GLint first, GLsizei count, GLuint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetMemoryObjectDetachedResourcesuivNV,memory,pname,first,count,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ResetMemoryObjectParameterNV, GLuint memory, GLenum pname) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ResetMemoryObjectParameterNV,memory,pname) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexAttachMemoryNV, GLenum target, GLuint memory, GLuint64 offset) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexAttachMemoryNV,target,memory,offset) -DECLARE_GL_FUNCTION_STUB_HEAD(void, BufferAttachMemoryNV, GLenum target, GLuint memory, GLuint64 offset) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, BufferAttachMemoryNV,target,memory,offset) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TextureAttachMemoryNV, GLuint texture, GLuint memory, GLuint64 offset) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TextureAttachMemoryNV,texture,memory,offset) -DECLARE_GL_FUNCTION_STUB_HEAD(void, NamedBufferAttachMemoryNV, GLuint buffer, GLuint memory, GLuint64 offset) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, NamedBufferAttachMemoryNV,buffer,memory,offset) -DECLARE_GL_FUNCTION_STUB_HEAD(void, BufferPageCommitmentMemNV, GLenum target, GLintptr offset, GLsizeiptr size, GLuint memory, GLuint64 memOffset, GLboolean commit) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, BufferPageCommitmentMemNV,target,offset,size,memory,memOffset,commit) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexPageCommitmentMemNV, GLenum target, GLint layer, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLuint memory, GLuint64 offset, GLboolean commit) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexPageCommitmentMemNV,target,layer,level,xoffset,yoffset,zoffset,width,height,depth,memory,offset,commit) -DECLARE_GL_FUNCTION_STUB_HEAD(void, NamedBufferPageCommitmentMemNV, GLuint buffer, GLintptr offset, GLsizeiptr size, GLuint memory, GLuint64 memOffset, GLboolean commit) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, NamedBufferPageCommitmentMemNV,buffer,offset,size,memory,memOffset,commit) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexturePageCommitmentMemNV, GLuint texture, GLint layer, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLuint memory, GLuint64 offset, GLboolean commit) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexturePageCommitmentMemNV,texture,layer,level,xoffset,yoffset,zoffset,width,height,depth,memory,offset,commit) -DECLARE_GL_FUNCTION_STUB_HEAD(void, DrawMeshTasksNV, GLuint first, GLuint count) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, DrawMeshTasksNV,first,count) -DECLARE_GL_FUNCTION_STUB_HEAD(void, DrawMeshTasksIndirectNV, GLintptr indirect) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, DrawMeshTasksIndirectNV,indirect) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiDrawMeshTasksIndirectNV, GLintptr indirect, GLsizei drawcount, GLsizei stride) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiDrawMeshTasksIndirectNV,indirect,drawcount,stride) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiDrawMeshTasksIndirectCountNV, GLintptr indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiDrawMeshTasksIndirectCountNV,indirect,drawcount,maxdrawcount,stride) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GenOcclusionQueriesNV, GLsizei n, GLuint* ids) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GenOcclusionQueriesNV,n,ids) -DECLARE_GL_FUNCTION_STUB_HEAD(void, DeleteOcclusionQueriesNV, GLsizei n, const GLuint* ids) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, DeleteOcclusionQueriesNV,n,ids) -DECLARE_GL_FUNCTION_STUB_HEAD(GLboolean, IsOcclusionQueryNV, GLuint id) DECLARE_GL_FUNCTION_STUB_END(GLboolean, IsOcclusionQueryNV,id) -DECLARE_GL_FUNCTION_STUB_HEAD(void, BeginOcclusionQueryNV, GLuint id) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, BeginOcclusionQueryNV,id) -DECLARE_GL_FUNCTION_STUB_HEAD(void, EndOcclusionQueryNV,void) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, EndOcclusionQueryNV,) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetOcclusionQueryivNV, GLuint id, GLenum pname, GLint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetOcclusionQueryivNV,id,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetOcclusionQueryuivNV, GLuint id, GLenum pname, GLuint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetOcclusionQueryuivNV,id,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramBufferParametersfvNV, GLenum target, GLuint bindingIndex, GLuint wordIndex, GLsizei count, const GLfloat* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramBufferParametersfvNV,target,bindingIndex,wordIndex,count,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramBufferParametersIivNV, GLenum target, GLuint bindingIndex, GLuint wordIndex, GLsizei count, const GLint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramBufferParametersIivNV,target,bindingIndex,wordIndex,count,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramBufferParametersIuivNV, GLenum target, GLuint bindingIndex, GLuint wordIndex, GLsizei count, const GLuint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramBufferParametersIuivNV,target,bindingIndex,wordIndex,count,params) -DECLARE_GL_FUNCTION_STUB_HEAD(GLuint, GenPathsNV, GLsizei range) DECLARE_GL_FUNCTION_STUB_END(GLuint, GenPathsNV,range) -DECLARE_GL_FUNCTION_STUB_HEAD(void, DeletePathsNV, GLuint path, GLsizei range) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, DeletePathsNV,path,range) -DECLARE_GL_FUNCTION_STUB_HEAD(GLboolean, IsPathNV, GLuint path) DECLARE_GL_FUNCTION_STUB_END(GLboolean, IsPathNV,path) -DECLARE_GL_FUNCTION_STUB_HEAD(void, PathCommandsNV, GLuint path, GLsizei numCommands, const GLubyte* commands, GLsizei numCoords, GLenum coordType, const void* coords) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, PathCommandsNV,path,numCommands,commands,numCoords,coordType,coords) -DECLARE_GL_FUNCTION_STUB_HEAD(void, PathCoordsNV, GLuint path, GLsizei numCoords, GLenum coordType, const void* coords) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, PathCoordsNV,path,numCoords,coordType,coords) -DECLARE_GL_FUNCTION_STUB_HEAD(void, PathSubCommandsNV, GLuint path, GLsizei commandStart, GLsizei commandsToDelete, GLsizei numCommands, const GLubyte* commands, GLsizei numCoords, GLenum coordType, const void* coords) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, PathSubCommandsNV,path,commandStart,commandsToDelete,numCommands,commands,numCoords,coordType,coords) -DECLARE_GL_FUNCTION_STUB_HEAD(void, PathSubCoordsNV, GLuint path, GLsizei coordStart, GLsizei numCoords, GLenum coordType, const void* coords) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, PathSubCoordsNV,path,coordStart,numCoords,coordType,coords) -DECLARE_GL_FUNCTION_STUB_HEAD(void, PathStringNV, GLuint path, GLenum format, GLsizei length, const void* pathString) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, PathStringNV,path,format,length,pathString) -DECLARE_GL_FUNCTION_STUB_HEAD(void, PathGlyphsNV, GLuint firstPathName, GLenum fontTarget, const void* fontName, GLbitfield fontStyle, GLsizei numGlyphs, GLenum type, const void* charcodes, GLenum handleMissingGlyphs, GLuint pathParameterTemplate, GLfloat emScale) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, PathGlyphsNV,firstPathName,fontTarget,fontName,fontStyle,numGlyphs,type,charcodes,handleMissingGlyphs,pathParameterTemplate,emScale) -DECLARE_GL_FUNCTION_STUB_HEAD(void, PathGlyphRangeNV, GLuint firstPathName, GLenum fontTarget, const void* fontName, GLbitfield fontStyle, GLuint firstGlyph, GLsizei numGlyphs, GLenum handleMissingGlyphs, GLuint pathParameterTemplate, GLfloat emScale) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, PathGlyphRangeNV,firstPathName,fontTarget,fontName,fontStyle,firstGlyph,numGlyphs,handleMissingGlyphs,pathParameterTemplate,emScale) -DECLARE_GL_FUNCTION_STUB_HEAD(void, WeightPathsNV, GLuint resultPath, GLsizei numPaths, const GLuint* paths, const GLfloat* weights) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, WeightPathsNV,resultPath,numPaths,paths,weights) -DECLARE_GL_FUNCTION_STUB_HEAD(void, CopyPathNV, GLuint resultPath, GLuint srcPath) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, CopyPathNV,resultPath,srcPath) -DECLARE_GL_FUNCTION_STUB_HEAD(void, InterpolatePathsNV, GLuint resultPath, GLuint pathA, GLuint pathB, GLfloat weight) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, InterpolatePathsNV,resultPath,pathA,pathB,weight) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TransformPathNV, GLuint resultPath, GLuint srcPath, GLenum transformType, const GLfloat* transformValues) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TransformPathNV,resultPath,srcPath,transformType,transformValues) -DECLARE_GL_FUNCTION_STUB_HEAD(void, PathParameterivNV, GLuint path, GLenum pname, const GLint* value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, PathParameterivNV,path,pname,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, PathParameteriNV, GLuint path, GLenum pname, GLint value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, PathParameteriNV,path,pname,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, PathParameterfvNV, GLuint path, GLenum pname, const GLfloat* value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, PathParameterfvNV,path,pname,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, PathParameterfNV, GLuint path, GLenum pname, GLfloat value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, PathParameterfNV,path,pname,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, PathDashArrayNV, GLuint path, GLsizei dashCount, const GLfloat* dashArray) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, PathDashArrayNV,path,dashCount,dashArray) -DECLARE_GL_FUNCTION_STUB_HEAD(void, PathStencilFuncNV, GLenum func, GLint ref, GLuint mask) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, PathStencilFuncNV,func,ref,mask) -DECLARE_GL_FUNCTION_STUB_HEAD(void, PathStencilDepthOffsetNV, GLfloat factor, GLfloat units) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, PathStencilDepthOffsetNV,factor,units) -DECLARE_GL_FUNCTION_STUB_HEAD(void, StencilFillPathNV, GLuint path, GLenum fillMode, GLuint mask) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, StencilFillPathNV,path,fillMode,mask) -DECLARE_GL_FUNCTION_STUB_HEAD(void, StencilStrokePathNV, GLuint path, GLint reference, GLuint mask) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, StencilStrokePathNV,path,reference,mask) -DECLARE_GL_FUNCTION_STUB_HEAD(void, StencilFillPathInstancedNV, GLsizei numPaths, GLenum pathNameType, const void* paths, GLuint pathBase, GLenum fillMode, GLuint mask, GLenum transformType, const GLfloat* transformValues) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, StencilFillPathInstancedNV,numPaths,pathNameType,paths,pathBase,fillMode,mask,transformType,transformValues) -DECLARE_GL_FUNCTION_STUB_HEAD(void, StencilStrokePathInstancedNV, GLsizei numPaths, GLenum pathNameType, const void* paths, GLuint pathBase, GLint reference, GLuint mask, GLenum transformType, const GLfloat* transformValues) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, StencilStrokePathInstancedNV,numPaths,pathNameType,paths,pathBase,reference,mask,transformType,transformValues) -DECLARE_GL_FUNCTION_STUB_HEAD(void, PathCoverDepthFuncNV, GLenum func) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, PathCoverDepthFuncNV,func) -DECLARE_GL_FUNCTION_STUB_HEAD(void, CoverFillPathNV, GLuint path, GLenum coverMode) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, CoverFillPathNV,path,coverMode) -DECLARE_GL_FUNCTION_STUB_HEAD(void, CoverStrokePathNV, GLuint path, GLenum coverMode) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, CoverStrokePathNV,path,coverMode) -DECLARE_GL_FUNCTION_STUB_HEAD(void, CoverFillPathInstancedNV, GLsizei numPaths, GLenum pathNameType, const void* paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat* transformValues) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, CoverFillPathInstancedNV,numPaths,pathNameType,paths,pathBase,coverMode,transformType,transformValues) -DECLARE_GL_FUNCTION_STUB_HEAD(void, CoverStrokePathInstancedNV, GLsizei numPaths, GLenum pathNameType, const void* paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat* transformValues) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, CoverStrokePathInstancedNV,numPaths,pathNameType,paths,pathBase,coverMode,transformType,transformValues) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetPathParameterivNV, GLuint path, GLenum pname, GLint* value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetPathParameterivNV,path,pname,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetPathParameterfvNV, GLuint path, GLenum pname, GLfloat* value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetPathParameterfvNV,path,pname,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetPathCommandsNV, GLuint path, GLubyte* commands) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetPathCommandsNV,path,commands) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetPathCoordsNV, GLuint path, GLfloat* coords) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetPathCoordsNV,path,coords) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetPathDashArrayNV, GLuint path, GLfloat* dashArray) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetPathDashArrayNV,path,dashArray) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetPathMetricsNV, GLbitfield metricQueryMask, GLsizei numPaths, GLenum pathNameType, const void* paths, GLuint pathBase, GLsizei stride, GLfloat* metrics) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetPathMetricsNV,metricQueryMask,numPaths,pathNameType,paths,pathBase,stride,metrics) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetPathMetricRangeNV, GLbitfield metricQueryMask, GLuint firstPathName, GLsizei numPaths, GLsizei stride, GLfloat* metrics) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetPathMetricRangeNV,metricQueryMask,firstPathName,numPaths,stride,metrics) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetPathSpacingNV, GLenum pathListMode, GLsizei numPaths, GLenum pathNameType, const void* paths, GLuint pathBase, GLfloat advanceScale, GLfloat kerningScale, GLenum transformType, GLfloat* returnedSpacing) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetPathSpacingNV,pathListMode,numPaths,pathNameType,paths,pathBase,advanceScale,kerningScale,transformType,returnedSpacing) -DECLARE_GL_FUNCTION_STUB_HEAD(GLboolean, IsPointInFillPathNV, GLuint path, GLuint mask, GLfloat x, GLfloat y) DECLARE_GL_FUNCTION_STUB_END(GLboolean, IsPointInFillPathNV,path,mask,x,y) -DECLARE_GL_FUNCTION_STUB_HEAD(GLboolean, IsPointInStrokePathNV, GLuint path, GLfloat x, GLfloat y) DECLARE_GL_FUNCTION_STUB_END(GLboolean, IsPointInStrokePathNV,path,x,y) -DECLARE_GL_FUNCTION_STUB_HEAD(GLfloat, GetPathLengthNV, GLuint path, GLsizei startSegment, GLsizei numSegments) DECLARE_GL_FUNCTION_STUB_END(GLfloat, GetPathLengthNV,path,startSegment,numSegments) -DECLARE_GL_FUNCTION_STUB_HEAD(GLboolean, PointAlongPathNV, GLuint path, GLsizei startSegment, GLsizei numSegments, GLfloat distance, GLfloat* x, GLfloat* y, GLfloat* tangentX, GLfloat* tangentY) DECLARE_GL_FUNCTION_STUB_END(GLboolean, PointAlongPathNV,path,startSegment,numSegments,distance,x,y,tangentX,tangentY) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MatrixLoad3x2fNV, GLenum matrixMode, const GLfloat* m) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MatrixLoad3x2fNV,matrixMode,m) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MatrixLoad3x3fNV, GLenum matrixMode, const GLfloat* m) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MatrixLoad3x3fNV,matrixMode,m) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MatrixLoadTranspose3x3fNV, GLenum matrixMode, const GLfloat* m) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MatrixLoadTranspose3x3fNV,matrixMode,m) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MatrixMult3x2fNV, GLenum matrixMode, const GLfloat* m) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MatrixMult3x2fNV,matrixMode,m) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MatrixMult3x3fNV, GLenum matrixMode, const GLfloat* m) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MatrixMult3x3fNV,matrixMode,m) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MatrixMultTranspose3x3fNV, GLenum matrixMode, const GLfloat* m) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MatrixMultTranspose3x3fNV,matrixMode,m) -DECLARE_GL_FUNCTION_STUB_HEAD(void, StencilThenCoverFillPathNV, GLuint path, GLenum fillMode, GLuint mask, GLenum coverMode) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, StencilThenCoverFillPathNV,path,fillMode,mask,coverMode) -DECLARE_GL_FUNCTION_STUB_HEAD(void, StencilThenCoverStrokePathNV, GLuint path, GLint reference, GLuint mask, GLenum coverMode) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, StencilThenCoverStrokePathNV,path,reference,mask,coverMode) -DECLARE_GL_FUNCTION_STUB_HEAD(void, StencilThenCoverFillPathInstancedNV, GLsizei numPaths, GLenum pathNameType, const void* paths, GLuint pathBase, GLenum fillMode, GLuint mask, GLenum coverMode, GLenum transformType, const GLfloat* transformValues) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, StencilThenCoverFillPathInstancedNV,numPaths,pathNameType,paths,pathBase,fillMode,mask,coverMode,transformType,transformValues) -DECLARE_GL_FUNCTION_STUB_HEAD(void, StencilThenCoverStrokePathInstancedNV, GLsizei numPaths, GLenum pathNameType, const void* paths, GLuint pathBase, GLint reference, GLuint mask, GLenum coverMode, GLenum transformType, const GLfloat* transformValues) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, StencilThenCoverStrokePathInstancedNV,numPaths,pathNameType,paths,pathBase,reference,mask,coverMode,transformType,transformValues) -DECLARE_GL_FUNCTION_STUB_HEAD(GLenum, PathGlyphIndexRangeNV, GLenum fontTarget, const void* fontName, GLbitfield fontStyle, GLuint pathParameterTemplate, GLfloat emScale, GLuint* baseAndCount) DECLARE_GL_FUNCTION_STUB_END(GLenum, PathGlyphIndexRangeNV,fontTarget,fontName,fontStyle,pathParameterTemplate,emScale,baseAndCount) -DECLARE_GL_FUNCTION_STUB_HEAD(GLenum, PathGlyphIndexArrayNV, GLuint firstPathName, GLenum fontTarget, const void* fontName, GLbitfield fontStyle, GLuint firstGlyphIndex, GLsizei numGlyphs, GLuint pathParameterTemplate, GLfloat emScale) DECLARE_GL_FUNCTION_STUB_END(GLenum, PathGlyphIndexArrayNV,firstPathName,fontTarget,fontName,fontStyle,firstGlyphIndex,numGlyphs,pathParameterTemplate,emScale) -DECLARE_GL_FUNCTION_STUB_HEAD(GLenum, PathMemoryGlyphIndexArrayNV, GLuint firstPathName, GLenum fontTarget, GLsizeiptr fontSize, const void* fontData, GLsizei faceIndex, GLuint firstGlyphIndex, GLsizei numGlyphs, GLuint pathParameterTemplate, GLfloat emScale) DECLARE_GL_FUNCTION_STUB_END(GLenum, PathMemoryGlyphIndexArrayNV,firstPathName,fontTarget,fontSize,fontData,faceIndex,firstGlyphIndex,numGlyphs,pathParameterTemplate,emScale) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramPathFragmentInputGenNV, GLuint program, GLint location, GLenum genMode, GLint components, const GLfloat* coeffs) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramPathFragmentInputGenNV,program,location,genMode,components,coeffs) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetProgramResourcefvNV, GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum* props, GLsizei count, GLsizei* length, GLfloat* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetProgramResourcefvNV,program,programInterface,index,propCount,props,count,length,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, PathColorGenNV, GLenum color, GLenum genMode, GLenum colorFormat, const GLfloat* coeffs) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, PathColorGenNV,color,genMode,colorFormat,coeffs) -DECLARE_GL_FUNCTION_STUB_HEAD(void, PathTexGenNV, GLenum texCoordSet, GLenum genMode, GLint components, const GLfloat* coeffs) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, PathTexGenNV,texCoordSet,genMode,components,coeffs) -DECLARE_GL_FUNCTION_STUB_HEAD(void, PathFogGenNV, GLenum genMode) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, PathFogGenNV,genMode) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetPathColorGenivNV, GLenum color, GLenum pname, GLint* value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetPathColorGenivNV,color,pname,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetPathColorGenfvNV, GLenum color, GLenum pname, GLfloat* value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetPathColorGenfvNV,color,pname,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetPathTexGenivNV, GLenum texCoordSet, GLenum pname, GLint* value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetPathTexGenivNV,texCoordSet,pname,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetPathTexGenfvNV, GLenum texCoordSet, GLenum pname, GLfloat* value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetPathTexGenfvNV,texCoordSet,pname,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, PixelDataRangeNV, GLenum target, GLsizei length, const void* pointer) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, PixelDataRangeNV,target,length,pointer) -DECLARE_GL_FUNCTION_STUB_HEAD(void, FlushPixelDataRangeNV, GLenum target) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, FlushPixelDataRangeNV,target) -DECLARE_GL_FUNCTION_STUB_HEAD(void, PointParameteriNV, GLenum pname, GLint param) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, PointParameteriNV,pname,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, PointParameterivNV, GLenum pname, const GLint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, PointParameterivNV,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, PresentFrameKeyedNV, GLuint video_slot, GLuint64EXT minPresentTime, GLuint beginPresentTimeId, GLuint presentDurationId, GLenum type, GLenum target0, GLuint fill0, GLuint key0, GLenum target1, GLuint fill1, GLuint key1) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, PresentFrameKeyedNV,video_slot,minPresentTime,beginPresentTimeId,presentDurationId,type,target0,fill0,key0,target1,fill1,key1) -DECLARE_GL_FUNCTION_STUB_HEAD(void, PresentFrameDualFillNV, 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) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, PresentFrameDualFillNV,video_slot,minPresentTime,beginPresentTimeId,presentDurationId,type,target0,fill0,target1,fill1,target2,fill2,target3,fill3) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetVideoivNV, GLuint video_slot, GLenum pname, GLint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetVideoivNV,video_slot,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetVideouivNV, GLuint video_slot, GLenum pname, GLuint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetVideouivNV,video_slot,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetVideoi64vNV, GLuint video_slot, GLenum pname, GLint64EXT* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetVideoi64vNV,video_slot,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetVideoui64vNV, GLuint video_slot, GLenum pname, GLuint64EXT* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetVideoui64vNV,video_slot,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, PrimitiveRestartNV,void) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, PrimitiveRestartNV,) -DECLARE_GL_FUNCTION_STUB_HEAD(void, PrimitiveRestartIndexNV, GLuint index) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, PrimitiveRestartIndexNV,index) -DECLARE_GL_FUNCTION_STUB_HEAD(GLint, QueryResourceNV, GLenum queryType, GLint tagId, GLuint count, GLint* buffer) DECLARE_GL_FUNCTION_STUB_END(GLint, QueryResourceNV,queryType,tagId,count,buffer) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GenQueryResourceTagNV, GLsizei n, GLint* tagIds) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GenQueryResourceTagNV,n,tagIds) -DECLARE_GL_FUNCTION_STUB_HEAD(void, DeleteQueryResourceTagNV, GLsizei n, const GLint* tagIds) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, DeleteQueryResourceTagNV,n,tagIds) -DECLARE_GL_FUNCTION_STUB_HEAD(void, QueryResourceTagNV, GLint tagId, const GLchar* tagString) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, QueryResourceTagNV,tagId,tagString) -DECLARE_GL_FUNCTION_STUB_HEAD(void, CombinerParameterfvNV, GLenum pname, const GLfloat* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, CombinerParameterfvNV,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, CombinerParameterfNV, GLenum pname, GLfloat param) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, CombinerParameterfNV,pname,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, CombinerParameterivNV, GLenum pname, const GLint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, CombinerParameterivNV,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, CombinerParameteriNV, GLenum pname, GLint param) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, CombinerParameteriNV,pname,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, CombinerInputNV, GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, CombinerInputNV,stage,portion,variable,input,mapping,componentUsage) -DECLARE_GL_FUNCTION_STUB_HEAD(void, CombinerOutputNV, GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, CombinerOutputNV,stage,portion,abOutput,cdOutput,sumOutput,scale,bias,abDotProduct,cdDotProduct,muxSum) -DECLARE_GL_FUNCTION_STUB_HEAD(void, FinalCombinerInputNV, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, FinalCombinerInputNV,variable,input,mapping,componentUsage) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetCombinerInputParameterfvNV, GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetCombinerInputParameterfvNV,stage,portion,variable,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetCombinerInputParameterivNV, GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetCombinerInputParameterivNV,stage,portion,variable,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetCombinerOutputParameterfvNV, GLenum stage, GLenum portion, GLenum pname, GLfloat* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetCombinerOutputParameterfvNV,stage,portion,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetCombinerOutputParameterivNV, GLenum stage, GLenum portion, GLenum pname, GLint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetCombinerOutputParameterivNV,stage,portion,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetFinalCombinerInputParameterfvNV, GLenum variable, GLenum pname, GLfloat* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetFinalCombinerInputParameterfvNV,variable,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetFinalCombinerInputParameterivNV, GLenum variable, GLenum pname, GLint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetFinalCombinerInputParameterivNV,variable,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, CombinerStageParameterfvNV, GLenum stage, GLenum pname, const GLfloat* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, CombinerStageParameterfvNV,stage,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetCombinerStageParameterfvNV, GLenum stage, GLenum pname, GLfloat* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetCombinerStageParameterfvNV,stage,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, FramebufferSampleLocationsfvNV, GLenum target, GLuint start, GLsizei count, const GLfloat* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, FramebufferSampleLocationsfvNV,target,start,count,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, NamedFramebufferSampleLocationsfvNV, GLuint framebuffer, GLuint start, GLsizei count, const GLfloat* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, NamedFramebufferSampleLocationsfvNV,framebuffer,start,count,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ResolveDepthValuesNV,void) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ResolveDepthValuesNV,) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ScissorExclusiveNV, GLint x, GLint y, GLsizei width, GLsizei height) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ScissorExclusiveNV,x,y,width,height) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ScissorExclusiveArrayvNV, GLuint first, GLsizei count, const GLint* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ScissorExclusiveArrayvNV,first,count,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MakeBufferResidentNV, GLenum target, GLenum access) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MakeBufferResidentNV,target,access) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MakeBufferNonResidentNV, GLenum target) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MakeBufferNonResidentNV,target) -DECLARE_GL_FUNCTION_STUB_HEAD(GLboolean, IsBufferResidentNV, GLenum target) DECLARE_GL_FUNCTION_STUB_END(GLboolean, IsBufferResidentNV,target) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MakeNamedBufferResidentNV, GLuint buffer, GLenum access) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MakeNamedBufferResidentNV,buffer,access) -DECLARE_GL_FUNCTION_STUB_HEAD(void, MakeNamedBufferNonResidentNV, GLuint buffer) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MakeNamedBufferNonResidentNV,buffer) -DECLARE_GL_FUNCTION_STUB_HEAD(GLboolean, IsNamedBufferResidentNV, GLuint buffer) DECLARE_GL_FUNCTION_STUB_END(GLboolean, IsNamedBufferResidentNV,buffer) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetBufferParameterui64vNV, GLenum target, GLenum pname, GLuint64EXT* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetBufferParameterui64vNV,target,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetNamedBufferParameterui64vNV, GLuint buffer, GLenum pname, GLuint64EXT* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetNamedBufferParameterui64vNV,buffer,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetIntegerui64vNV, GLenum value, GLuint64EXT* result) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetIntegerui64vNV,value,result) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Uniformui64NV, GLint location, GLuint64EXT value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Uniformui64NV,location,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Uniformui64vNV, GLint location, GLsizei count, const GLuint64EXT* value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Uniformui64vNV,location,count,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniformui64NV, GLuint program, GLint location, GLuint64EXT value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniformui64NV,program,location,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramUniformui64vNV, GLuint program, GLint location, GLsizei count, const GLuint64EXT* value) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramUniformui64vNV,program,location,count,value) -DECLARE_GL_FUNCTION_STUB_HEAD(void, BindShadingRateImageNV, GLuint texture) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, BindShadingRateImageNV,texture) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetShadingRateImagePaletteNV, GLuint viewport, GLuint entry, GLenum* rate) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetShadingRateImagePaletteNV,viewport,entry,rate) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetShadingRateSampleLocationivNV, GLenum rate, GLuint samples, GLuint index, GLint* location) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetShadingRateSampleLocationivNV,rate,samples,index,location) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ShadingRateImageBarrierNV, GLboolean synchronize) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ShadingRateImageBarrierNV,synchronize) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ShadingRateImagePaletteNV, GLuint viewport, GLuint first, GLsizei count, const GLenum* rates) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ShadingRateImagePaletteNV,viewport,first,count,rates) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ShadingRateSampleOrderNV, GLenum order) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ShadingRateSampleOrderNV,order) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ShadingRateSampleOrderCustomNV, GLenum rate, GLuint samples, const GLint* locations) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ShadingRateSampleOrderCustomNV,rate,samples,locations) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TextureBarrierNV,void) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TextureBarrierNV,) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexImage2DMultisampleCoverageNV, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexImage2DMultisampleCoverageNV,target,coverageSamples,colorSamples,internalFormat,width,height,fixedSampleLocations) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexImage3DMultisampleCoverageNV, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexImage3DMultisampleCoverageNV,target,coverageSamples,colorSamples,internalFormat,width,height,depth,fixedSampleLocations) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TextureImage2DMultisampleNV, GLuint texture, GLenum target, GLsizei samples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TextureImage2DMultisampleNV,texture,target,samples,internalFormat,width,height,fixedSampleLocations) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TextureImage3DMultisampleNV, GLuint texture, GLenum target, GLsizei samples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TextureImage3DMultisampleNV,texture,target,samples,internalFormat,width,height,depth,fixedSampleLocations) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TextureImage2DMultisampleCoverageNV, GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TextureImage2DMultisampleCoverageNV,texture,target,coverageSamples,colorSamples,internalFormat,width,height,fixedSampleLocations) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TextureImage3DMultisampleCoverageNV, GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TextureImage3DMultisampleCoverageNV,texture,target,coverageSamples,colorSamples,internalFormat,width,height,depth,fixedSampleLocations) -DECLARE_GL_FUNCTION_STUB_HEAD(void, CreateSemaphoresNV, GLsizei n, GLuint* semaphores) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, CreateSemaphoresNV,n,semaphores) -DECLARE_GL_FUNCTION_STUB_HEAD(void, SemaphoreParameterivNV, GLuint semaphore, GLenum pname, const GLint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, SemaphoreParameterivNV,semaphore,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetSemaphoreParameterivNV, GLuint semaphore, GLenum pname, GLint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetSemaphoreParameterivNV,semaphore,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, BeginTransformFeedbackNV, GLenum primitiveMode) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, BeginTransformFeedbackNV,primitiveMode) -DECLARE_GL_FUNCTION_STUB_HEAD(void, EndTransformFeedbackNV,void) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, EndTransformFeedbackNV,) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TransformFeedbackAttribsNV, GLsizei count, const GLint* attribs, GLenum bufferMode) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TransformFeedbackAttribsNV,count,attribs,bufferMode) -DECLARE_GL_FUNCTION_STUB_HEAD(void, BindBufferRangeNV, GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, BindBufferRangeNV,target,index,buffer,offset,size) -DECLARE_GL_FUNCTION_STUB_HEAD(void, BindBufferOffsetNV, GLenum target, GLuint index, GLuint buffer, GLintptr offset) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, BindBufferOffsetNV,target,index,buffer,offset) -DECLARE_GL_FUNCTION_STUB_HEAD(void, BindBufferBaseNV, GLenum target, GLuint index, GLuint buffer) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, BindBufferBaseNV,target,index,buffer) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TransformFeedbackVaryingsNV, GLuint program, GLsizei count, const GLint* locations, GLenum bufferMode) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TransformFeedbackVaryingsNV,program,count,locations,bufferMode) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ActiveVaryingNV, GLuint program, const GLchar* name) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ActiveVaryingNV,program,name) -DECLARE_GL_FUNCTION_STUB_HEAD(GLint, GetVaryingLocationNV, GLuint program, const GLchar* name) DECLARE_GL_FUNCTION_STUB_END(GLint, GetVaryingLocationNV,program,name) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetActiveVaryingNV, GLuint program, GLuint index, GLsizei bufSize, GLsizei* length, GLsizei* size, GLenum* type, GLchar* name) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetActiveVaryingNV,program,index,bufSize,length,size,type,name) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetTransformFeedbackVaryingNV, GLuint program, GLuint index, GLint* location) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetTransformFeedbackVaryingNV,program,index,location) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TransformFeedbackStreamAttribsNV, GLsizei count, const GLint* attribs, GLsizei nbuffers, const GLint* bufstreams, GLenum bufferMode) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TransformFeedbackStreamAttribsNV,count,attribs,nbuffers,bufstreams,bufferMode) -DECLARE_GL_FUNCTION_STUB_HEAD(void, BindTransformFeedbackNV, GLenum target, GLuint id) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, BindTransformFeedbackNV,target,id) -DECLARE_GL_FUNCTION_STUB_HEAD(void, DeleteTransformFeedbacksNV, GLsizei n, const GLuint* ids) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, DeleteTransformFeedbacksNV,n,ids) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GenTransformFeedbacksNV, GLsizei n, GLuint* ids) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GenTransformFeedbacksNV,n,ids) -DECLARE_GL_FUNCTION_STUB_HEAD(GLboolean, IsTransformFeedbackNV, GLuint id) DECLARE_GL_FUNCTION_STUB_END(GLboolean, IsTransformFeedbackNV,id) -DECLARE_GL_FUNCTION_STUB_HEAD(void, PauseTransformFeedbackNV,void) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, PauseTransformFeedbackNV,) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ResumeTransformFeedbackNV,void) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ResumeTransformFeedbackNV,) -DECLARE_GL_FUNCTION_STUB_HEAD(void, DrawTransformFeedbackNV, GLenum mode, GLuint id) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, DrawTransformFeedbackNV,mode,id) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VDPAUInitNV,const void* vdpDevice, const void* getProcAddress) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VDPAUInitNV,vdpDevice,getProcAddress) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VDPAUFiniNV,void) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VDPAUFiniNV,) -DECLARE_GL_FUNCTION_STUB_HEAD(GLvdpauSurfaceNV, VDPAURegisterVideoSurfaceNV,const void* vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint* textureNames) DECLARE_GL_FUNCTION_STUB_END(GLvdpauSurfaceNV, VDPAURegisterVideoSurfaceNV,vdpSurface,target,numTextureNames,textureNames) -DECLARE_GL_FUNCTION_STUB_HEAD(GLvdpauSurfaceNV, VDPAURegisterOutputSurfaceNV,const void* vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint* textureNames) DECLARE_GL_FUNCTION_STUB_END(GLvdpauSurfaceNV, VDPAURegisterOutputSurfaceNV,vdpSurface,target,numTextureNames,textureNames) -DECLARE_GL_FUNCTION_STUB_HEAD(GLboolean, VDPAUIsSurfaceNV, GLvdpauSurfaceNV surface) DECLARE_GL_FUNCTION_STUB_END(GLboolean, VDPAUIsSurfaceNV,surface) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VDPAUUnregisterSurfaceNV, GLvdpauSurfaceNV surface) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VDPAUUnregisterSurfaceNV,surface) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VDPAUGetSurfaceivNV, GLvdpauSurfaceNV surface, GLenum pname, GLsizei count, GLsizei* length, GLint* values) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VDPAUGetSurfaceivNV,surface,pname,count,length,values) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VDPAUSurfaceAccessNV, GLvdpauSurfaceNV surface, GLenum access) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VDPAUSurfaceAccessNV,surface,access) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VDPAUMapSurfacesNV, GLsizei numSurfaces, const GLvdpauSurfaceNV* surfaces) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VDPAUMapSurfacesNV,numSurfaces,surfaces) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VDPAUUnmapSurfacesNV, GLsizei numSurface, const GLvdpauSurfaceNV* surfaces) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VDPAUUnmapSurfacesNV,numSurface,surfaces) -DECLARE_GL_FUNCTION_STUB_HEAD(GLvdpauSurfaceNV, VDPAURegisterVideoSurfaceWithPictureStructureNV,const void* vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint* textureNames, GLboolean isFrameStructure) DECLARE_GL_FUNCTION_STUB_END(GLvdpauSurfaceNV, VDPAURegisterVideoSurfaceWithPictureStructureNV,vdpSurface,target,numTextureNames,textureNames,isFrameStructure) -DECLARE_GL_FUNCTION_STUB_HEAD(void, FlushVertexArrayRangeNV,void) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, FlushVertexArrayRangeNV,) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexArrayRangeNV, GLsizei length, const void* pointer) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexArrayRangeNV,length,pointer) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribL1i64NV, GLuint index, GLint64EXT x) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribL1i64NV,index,x) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribL2i64NV, GLuint index, GLint64EXT x, GLint64EXT y) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribL2i64NV,index,x,y) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribL3i64NV, GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribL3i64NV,index,x,y,z) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribL4i64NV, GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribL4i64NV,index,x,y,z,w) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribL1i64vNV, GLuint index, const GLint64EXT* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribL1i64vNV,index,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribL2i64vNV, GLuint index, const GLint64EXT* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribL2i64vNV,index,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribL3i64vNV, GLuint index, const GLint64EXT* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribL3i64vNV,index,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribL4i64vNV, GLuint index, const GLint64EXT* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribL4i64vNV,index,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribL1ui64NV, GLuint index, GLuint64EXT x) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribL1ui64NV,index,x) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribL2ui64NV, GLuint index, GLuint64EXT x, GLuint64EXT y) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribL2ui64NV,index,x,y) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribL3ui64NV, GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribL3ui64NV,index,x,y,z) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribL4ui64NV, GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribL4ui64NV,index,x,y,z,w) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribL1ui64vNV, GLuint index, const GLuint64EXT* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribL1ui64vNV,index,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribL2ui64vNV, GLuint index, const GLuint64EXT* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribL2ui64vNV,index,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribL3ui64vNV, GLuint index, const GLuint64EXT* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribL3ui64vNV,index,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribL4ui64vNV, GLuint index, const GLuint64EXT* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribL4ui64vNV,index,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetVertexAttribLi64vNV, GLuint index, GLenum pname, GLint64EXT* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetVertexAttribLi64vNV,index,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetVertexAttribLui64vNV, GLuint index, GLenum pname, GLuint64EXT* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetVertexAttribLui64vNV,index,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribLFormatNV, GLuint index, GLint size, GLenum type, GLsizei stride) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribLFormatNV,index,size,type,stride) -DECLARE_GL_FUNCTION_STUB_HEAD(void, BufferAddressRangeNV, GLenum pname, GLuint index, GLuint64EXT address, GLsizeiptr length) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, BufferAddressRangeNV,pname,index,address,length) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexFormatNV, GLint size, GLenum type, GLsizei stride) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexFormatNV,size,type,stride) -DECLARE_GL_FUNCTION_STUB_HEAD(void, NormalFormatNV, GLenum type, GLsizei stride) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, NormalFormatNV,type,stride) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ColorFormatNV, GLint size, GLenum type, GLsizei stride) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ColorFormatNV,size,type,stride) -DECLARE_GL_FUNCTION_STUB_HEAD(void, IndexFormatNV, GLenum type, GLsizei stride) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, IndexFormatNV,type,stride) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexCoordFormatNV, GLint size, GLenum type, GLsizei stride) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexCoordFormatNV,size,type,stride) -DECLARE_GL_FUNCTION_STUB_HEAD(void, EdgeFlagFormatNV, GLsizei stride) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, EdgeFlagFormatNV,stride) -DECLARE_GL_FUNCTION_STUB_HEAD(void, SecondaryColorFormatNV, GLint size, GLenum type, GLsizei stride) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, SecondaryColorFormatNV,size,type,stride) -DECLARE_GL_FUNCTION_STUB_HEAD(void, FogCoordFormatNV, GLenum type, GLsizei stride) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, FogCoordFormatNV,type,stride) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribFormatNV, GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribFormatNV,index,size,type,normalized,stride) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribIFormatNV, GLuint index, GLint size, GLenum type, GLsizei stride) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribIFormatNV,index,size,type,stride) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetIntegerui64i_vNV, GLenum value, GLuint index, GLuint64EXT* result) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetIntegerui64i_vNV,value,index,result) -DECLARE_GL_FUNCTION_STUB_HEAD(GLboolean, AreProgramsResidentNV, GLsizei n, const GLuint* programs, GLboolean* residences) DECLARE_GL_FUNCTION_STUB_END(GLboolean, AreProgramsResidentNV,n,programs,residences) -DECLARE_GL_FUNCTION_STUB_HEAD(void, BindProgramNV, GLenum target, GLuint id) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, BindProgramNV,target,id) -DECLARE_GL_FUNCTION_STUB_HEAD(void, DeleteProgramsNV, GLsizei n, const GLuint* programs) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, DeleteProgramsNV,n,programs) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ExecuteProgramNV, GLenum target, GLuint id, const GLfloat* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ExecuteProgramNV,target,id,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GenProgramsNV, GLsizei n, GLuint* programs) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GenProgramsNV,n,programs) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetProgramParameterdvNV, GLenum target, GLuint index, GLenum pname, GLdouble* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetProgramParameterdvNV,target,index,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetProgramParameterfvNV, GLenum target, GLuint index, GLenum pname, GLfloat* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetProgramParameterfvNV,target,index,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetProgramivNV, GLuint id, GLenum pname, GLint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetProgramivNV,id,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetProgramStringNV, GLuint id, GLenum pname, GLubyte* program) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetProgramStringNV,id,pname,program) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetTrackMatrixivNV, GLenum target, GLuint address, GLenum pname, GLint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetTrackMatrixivNV,target,address,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetVertexAttribdvNV, GLuint index, GLenum pname, GLdouble* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetVertexAttribdvNV,index,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetVertexAttribfvNV, GLuint index, GLenum pname, GLfloat* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetVertexAttribfvNV,index,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetVertexAttribivNV, GLuint index, GLenum pname, GLint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetVertexAttribivNV,index,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetVertexAttribPointervNV, GLuint index, GLenum pname, void* *pointer) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetVertexAttribPointervNV,index,pname,*pointer) -DECLARE_GL_FUNCTION_STUB_HEAD(GLboolean, IsProgramNV, GLuint id) DECLARE_GL_FUNCTION_STUB_END(GLboolean, IsProgramNV,id) -DECLARE_GL_FUNCTION_STUB_HEAD(void, LoadProgramNV, GLenum target, GLuint id, GLsizei len, const GLubyte* program) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, LoadProgramNV,target,id,len,program) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramParameter4dNV, GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramParameter4dNV,target,index,x,y,z,w) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramParameter4dvNV, GLenum target, GLuint index, const GLdouble* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramParameter4dvNV,target,index,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramParameter4fNV, GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramParameter4fNV,target,index,x,y,z,w) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramParameter4fvNV, GLenum target, GLuint index, const GLfloat* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramParameter4fvNV,target,index,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramParameters4dvNV, GLenum target, GLuint index, GLsizei count, const GLdouble* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramParameters4dvNV,target,index,count,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ProgramParameters4fvNV, GLenum target, GLuint index, GLsizei count, const GLfloat* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ProgramParameters4fvNV,target,index,count,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, RequestResidentProgramsNV, GLsizei n, const GLuint* programs) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, RequestResidentProgramsNV,n,programs) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TrackMatrixNV, GLenum target, GLuint address, GLenum matrix, GLenum transform) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TrackMatrixNV,target,address,matrix,transform) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribPointerNV, GLuint index, GLint fsize, GLenum type, GLsizei stride, const void* pointer) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribPointerNV,index,fsize,type,stride,pointer) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttrib1dNV, GLuint index, GLdouble x) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttrib1dNV,index,x) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttrib1dvNV, GLuint index, const GLdouble* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttrib1dvNV,index,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttrib1fNV, GLuint index, GLfloat x) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttrib1fNV,index,x) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttrib1fvNV, GLuint index, const GLfloat* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttrib1fvNV,index,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttrib1sNV, GLuint index, GLshort x) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttrib1sNV,index,x) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttrib1svNV, GLuint index, const GLshort* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttrib1svNV,index,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttrib2dNV, GLuint index, GLdouble x, GLdouble y) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttrib2dNV,index,x,y) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttrib2dvNV, GLuint index, const GLdouble* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttrib2dvNV,index,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttrib2fNV, GLuint index, GLfloat x, GLfloat y) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttrib2fNV,index,x,y) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttrib2fvNV, GLuint index, const GLfloat* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttrib2fvNV,index,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttrib2sNV, GLuint index, GLshort x, GLshort y) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttrib2sNV,index,x,y) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttrib2svNV, GLuint index, const GLshort* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttrib2svNV,index,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttrib3dNV, GLuint index, GLdouble x, GLdouble y, GLdouble z) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttrib3dNV,index,x,y,z) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttrib3dvNV, GLuint index, const GLdouble* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttrib3dvNV,index,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttrib3fNV, GLuint index, GLfloat x, GLfloat y, GLfloat z) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttrib3fNV,index,x,y,z) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttrib3fvNV, GLuint index, const GLfloat* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttrib3fvNV,index,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttrib3sNV, GLuint index, GLshort x, GLshort y, GLshort z) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttrib3sNV,index,x,y,z) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttrib3svNV, GLuint index, const GLshort* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttrib3svNV,index,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttrib4dNV, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttrib4dNV,index,x,y,z,w) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttrib4dvNV, GLuint index, const GLdouble* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttrib4dvNV,index,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttrib4fNV, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttrib4fNV,index,x,y,z,w) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttrib4fvNV, GLuint index, const GLfloat* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttrib4fvNV,index,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttrib4sNV, GLuint index, GLshort x, GLshort y, GLshort z, GLshort w) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttrib4sNV,index,x,y,z,w) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttrib4svNV, GLuint index, const GLshort* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttrib4svNV,index,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttrib4ubNV, GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttrib4ubNV,index,x,y,z,w) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttrib4ubvNV, GLuint index, const GLubyte* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttrib4ubvNV,index,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribs1dvNV, GLuint index, GLsizei count, const GLdouble* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribs1dvNV,index,count,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribs1fvNV, GLuint index, GLsizei count, const GLfloat* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribs1fvNV,index,count,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribs1svNV, GLuint index, GLsizei count, const GLshort* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribs1svNV,index,count,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribs2dvNV, GLuint index, GLsizei count, const GLdouble* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribs2dvNV,index,count,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribs2fvNV, GLuint index, GLsizei count, const GLfloat* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribs2fvNV,index,count,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribs2svNV, GLuint index, GLsizei count, const GLshort* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribs2svNV,index,count,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribs3dvNV, GLuint index, GLsizei count, const GLdouble* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribs3dvNV,index,count,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribs3fvNV, GLuint index, GLsizei count, const GLfloat* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribs3fvNV,index,count,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribs3svNV, GLuint index, GLsizei count, const GLshort* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribs3svNV,index,count,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribs4dvNV, GLuint index, GLsizei count, const GLdouble* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribs4dvNV,index,count,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribs4fvNV, GLuint index, GLsizei count, const GLfloat* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribs4fvNV,index,count,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribs4svNV, GLuint index, GLsizei count, const GLshort* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribs4svNV,index,count,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VertexAttribs4ubvNV, GLuint index, GLsizei count, const GLubyte* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VertexAttribs4ubvNV,index,count,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, BeginVideoCaptureNV, GLuint video_capture_slot) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, BeginVideoCaptureNV,video_capture_slot) -DECLARE_GL_FUNCTION_STUB_HEAD(void, BindVideoCaptureStreamBufferNV, GLuint video_capture_slot, GLuint stream, GLenum frame_region, GLintptrARB offset) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, BindVideoCaptureStreamBufferNV,video_capture_slot,stream,frame_region,offset) -DECLARE_GL_FUNCTION_STUB_HEAD(void, BindVideoCaptureStreamTextureNV, GLuint video_capture_slot, GLuint stream, GLenum frame_region, GLenum target, GLuint texture) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, BindVideoCaptureStreamTextureNV,video_capture_slot,stream,frame_region,target,texture) -DECLARE_GL_FUNCTION_STUB_HEAD(void, EndVideoCaptureNV, GLuint video_capture_slot) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, EndVideoCaptureNV,video_capture_slot) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetVideoCaptureivNV, GLuint video_capture_slot, GLenum pname, GLint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetVideoCaptureivNV,video_capture_slot,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetVideoCaptureStreamivNV, GLuint video_capture_slot, GLuint stream, GLenum pname, GLint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetVideoCaptureStreamivNV,video_capture_slot,stream,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetVideoCaptureStreamfvNV, GLuint video_capture_slot, GLuint stream, GLenum pname, GLfloat* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetVideoCaptureStreamfvNV,video_capture_slot,stream,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetVideoCaptureStreamdvNV, GLuint video_capture_slot, GLuint stream, GLenum pname, GLdouble* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetVideoCaptureStreamdvNV,video_capture_slot,stream,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(GLenum, VideoCaptureNV, GLuint video_capture_slot, GLuint* sequence_num, GLuint64EXT* capture_time) DECLARE_GL_FUNCTION_STUB_END(GLenum, VideoCaptureNV,video_capture_slot,sequence_num,capture_time) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VideoCaptureStreamParameterivNV, GLuint video_capture_slot, GLuint stream, GLenum pname, const GLint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VideoCaptureStreamParameterivNV,video_capture_slot,stream,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VideoCaptureStreamParameterfvNV, GLuint video_capture_slot, GLuint stream, GLenum pname, const GLfloat* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VideoCaptureStreamParameterfvNV,video_capture_slot,stream,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, VideoCaptureStreamParameterdvNV, GLuint video_capture_slot, GLuint stream, GLenum pname, const GLdouble* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, VideoCaptureStreamParameterdvNV,video_capture_slot,stream,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ViewportSwizzleNV, GLuint index, GLenum swizzlex, GLenum swizzley, GLenum swizzlez, GLenum swizzlew) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ViewportSwizzleNV,index,swizzlex,swizzley,swizzlez,swizzlew) -DECLARE_GL_FUNCTION_STUB_HEAD(void, FramebufferTextureMultiviewOVR, GLenum target, GLenum attachment, GLuint texture, GLint level, GLint baseViewIndex, GLsizei numViews) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, FramebufferTextureMultiviewOVR,target,attachment,texture,level,baseViewIndex,numViews) -DECLARE_GL_FUNCTION_STUB_HEAD(void, HintPGI, GLenum target, GLint mode) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, HintPGI,target,mode) -DECLARE_GL_FUNCTION_STUB_HEAD(void, DetailTexFuncSGIS, GLenum target, GLsizei n, const GLfloat* points) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, DetailTexFuncSGIS,target,n,points) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetDetailTexFuncSGIS, GLenum target, GLfloat* points) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetDetailTexFuncSGIS,target,points) -DECLARE_GL_FUNCTION_STUB_HEAD(void, FogFuncSGIS, GLsizei n, const GLfloat* points) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, FogFuncSGIS,n,points) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetFogFuncSGIS, GLfloat* points) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetFogFuncSGIS,points) -DECLARE_GL_FUNCTION_STUB_HEAD(void, SampleMaskSGIS, GLclampf value, GLboolean invert) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, SampleMaskSGIS,value,invert) -DECLARE_GL_FUNCTION_STUB_HEAD(void, SamplePatternSGIS, GLenum pattern) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, SamplePatternSGIS,pattern) -DECLARE_GL_FUNCTION_STUB_HEAD(void, PixelTexGenParameteriSGIS, GLenum pname, GLint param) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, PixelTexGenParameteriSGIS,pname,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, PixelTexGenParameterivSGIS, GLenum pname, const GLint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, PixelTexGenParameterivSGIS,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, PixelTexGenParameterfSGIS, GLenum pname, GLfloat param) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, PixelTexGenParameterfSGIS,pname,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, PixelTexGenParameterfvSGIS, GLenum pname, const GLfloat* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, PixelTexGenParameterfvSGIS,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetPixelTexGenParameterivSGIS, GLenum pname, GLint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetPixelTexGenParameterivSGIS,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetPixelTexGenParameterfvSGIS, GLenum pname, GLfloat* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetPixelTexGenParameterfvSGIS,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, PointParameterfSGIS, GLenum pname, GLfloat param) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, PointParameterfSGIS,pname,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, PointParameterfvSGIS, GLenum pname, const GLfloat* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, PointParameterfvSGIS,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, SharpenTexFuncSGIS, GLenum target, GLsizei n, const GLfloat* points) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, SharpenTexFuncSGIS,target,n,points) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetSharpenTexFuncSGIS, GLenum target, GLfloat* points) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetSharpenTexFuncSGIS,target,points) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexImage4DSGIS, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLint border, GLenum format, GLenum type, const void* pixels) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexImage4DSGIS,target,level,internalformat,width,height,depth,size4d,border,format,type,pixels) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexSubImage4DSGIS, 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) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexSubImage4DSGIS,target,level,xoffset,yoffset,zoffset,woffset,width,height,depth,size4d,format,type,pixels) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TextureColorMaskSGIS, GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TextureColorMaskSGIS,red,green,blue,alpha) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetTexFilterFuncSGIS, GLenum target, GLenum filter, GLfloat* weights) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetTexFilterFuncSGIS,target,filter,weights) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexFilterFuncSGIS, GLenum target, GLenum filter, GLsizei n, const GLfloat* weights) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexFilterFuncSGIS,target,filter,n,weights) -DECLARE_GL_FUNCTION_STUB_HEAD(void, AsyncMarkerSGIX, GLuint marker) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, AsyncMarkerSGIX,marker) -DECLARE_GL_FUNCTION_STUB_HEAD(GLint, FinishAsyncSGIX, GLuint* markerp) DECLARE_GL_FUNCTION_STUB_END(GLint, FinishAsyncSGIX,markerp) -DECLARE_GL_FUNCTION_STUB_HEAD(GLint, PollAsyncSGIX, GLuint* markerp) DECLARE_GL_FUNCTION_STUB_END(GLint, PollAsyncSGIX,markerp) -DECLARE_GL_FUNCTION_STUB_HEAD(GLuint, GenAsyncMarkersSGIX, GLsizei range) DECLARE_GL_FUNCTION_STUB_END(GLuint, GenAsyncMarkersSGIX,range) -DECLARE_GL_FUNCTION_STUB_HEAD(void, DeleteAsyncMarkersSGIX, GLuint marker, GLsizei range) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, DeleteAsyncMarkersSGIX,marker,range) -DECLARE_GL_FUNCTION_STUB_HEAD(GLboolean, IsAsyncMarkerSGIX, GLuint marker) DECLARE_GL_FUNCTION_STUB_END(GLboolean, IsAsyncMarkerSGIX,marker) -DECLARE_GL_FUNCTION_STUB_HEAD(void, FlushRasterSGIX,void) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, FlushRasterSGIX,) -DECLARE_GL_FUNCTION_STUB_HEAD(void, FragmentColorMaterialSGIX, GLenum face, GLenum mode) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, FragmentColorMaterialSGIX,face,mode) -DECLARE_GL_FUNCTION_STUB_HEAD(void, FragmentLightfSGIX, GLenum light, GLenum pname, GLfloat param) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, FragmentLightfSGIX,light,pname,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, FragmentLightfvSGIX, GLenum light, GLenum pname, const GLfloat* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, FragmentLightfvSGIX,light,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, FragmentLightiSGIX, GLenum light, GLenum pname, GLint param) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, FragmentLightiSGIX,light,pname,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, FragmentLightivSGIX, GLenum light, GLenum pname, const GLint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, FragmentLightivSGIX,light,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, FragmentLightModelfSGIX, GLenum pname, GLfloat param) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, FragmentLightModelfSGIX,pname,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, FragmentLightModelfvSGIX, GLenum pname, const GLfloat* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, FragmentLightModelfvSGIX,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, FragmentLightModeliSGIX, GLenum pname, GLint param) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, FragmentLightModeliSGIX,pname,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, FragmentLightModelivSGIX, GLenum pname, const GLint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, FragmentLightModelivSGIX,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, FragmentMaterialfSGIX, GLenum face, GLenum pname, GLfloat param) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, FragmentMaterialfSGIX,face,pname,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, FragmentMaterialfvSGIX, GLenum face, GLenum pname, const GLfloat* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, FragmentMaterialfvSGIX,face,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, FragmentMaterialiSGIX, GLenum face, GLenum pname, GLint param) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, FragmentMaterialiSGIX,face,pname,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, FragmentMaterialivSGIX, GLenum face, GLenum pname, const GLint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, FragmentMaterialivSGIX,face,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetFragmentLightfvSGIX, GLenum light, GLenum pname, GLfloat* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetFragmentLightfvSGIX,light,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetFragmentLightivSGIX, GLenum light, GLenum pname, GLint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetFragmentLightivSGIX,light,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetFragmentMaterialfvSGIX, GLenum face, GLenum pname, GLfloat* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetFragmentMaterialfvSGIX,face,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetFragmentMaterialivSGIX, GLenum face, GLenum pname, GLint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetFragmentMaterialivSGIX,face,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, LightEnviSGIX, GLenum pname, GLint param) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, LightEnviSGIX,pname,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, FrameZoomSGIX, GLint factor) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, FrameZoomSGIX,factor) -DECLARE_GL_FUNCTION_STUB_HEAD(void, IooInterfaceSGIX, GLenum pname, const void* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, IooInterfaceSGIX,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(GLint, GetInstrumentsSGIX,void) DECLARE_GL_FUNCTION_STUB_END(GLint, GetInstrumentsSGIX,) -DECLARE_GL_FUNCTION_STUB_HEAD(void, InstrumentsBufferSGIX, GLsizei size, GLint* buffer) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, InstrumentsBufferSGIX,size,buffer) -DECLARE_GL_FUNCTION_STUB_HEAD(GLint, PollInstrumentsSGIX, GLint* marker_p) DECLARE_GL_FUNCTION_STUB_END(GLint, PollInstrumentsSGIX,marker_p) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ReadInstrumentsSGIX, GLint marker) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ReadInstrumentsSGIX,marker) -DECLARE_GL_FUNCTION_STUB_HEAD(void, StartInstrumentsSGIX,void) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, StartInstrumentsSGIX,) -DECLARE_GL_FUNCTION_STUB_HEAD(void, StopInstrumentsSGIX, GLint marker) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, StopInstrumentsSGIX,marker) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetListParameterfvSGIX, GLuint list, GLenum pname, GLfloat* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetListParameterfvSGIX,list,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetListParameterivSGIX, GLuint list, GLenum pname, GLint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetListParameterivSGIX,list,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ListParameterfSGIX, GLuint list, GLenum pname, GLfloat param) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ListParameterfSGIX,list,pname,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ListParameterfvSGIX, GLuint list, GLenum pname, const GLfloat* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ListParameterfvSGIX,list,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ListParameteriSGIX, GLuint list, GLenum pname, GLint param) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ListParameteriSGIX,list,pname,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ListParameterivSGIX, GLuint list, GLenum pname, const GLint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ListParameterivSGIX,list,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, PixelTexGenSGIX, GLenum mode) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, PixelTexGenSGIX,mode) -DECLARE_GL_FUNCTION_STUB_HEAD(void, DeformationMap3dSGIX, 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) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, DeformationMap3dSGIX,target,u1,u2,ustride,uorder,v1,v2,vstride,vorder,w1,w2,wstride,worder,points) -DECLARE_GL_FUNCTION_STUB_HEAD(void, DeformationMap3fSGIX, 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) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, DeformationMap3fSGIX,target,u1,u2,ustride,uorder,v1,v2,vstride,vorder,w1,w2,wstride,worder,points) -DECLARE_GL_FUNCTION_STUB_HEAD(void, DeformSGIX, GLbitfield mask) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, DeformSGIX,mask) -DECLARE_GL_FUNCTION_STUB_HEAD(void, LoadIdentityDeformationMapSGIX, GLbitfield mask) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, LoadIdentityDeformationMapSGIX,mask) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ReferencePlaneSGIX,const GLdouble* equation) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ReferencePlaneSGIX,equation) -DECLARE_GL_FUNCTION_STUB_HEAD(void, SpriteParameterfSGIX, GLenum pname, GLfloat param) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, SpriteParameterfSGIX,pname,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, SpriteParameterfvSGIX, GLenum pname, const GLfloat* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, SpriteParameterfvSGIX,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, SpriteParameteriSGIX, GLenum pname, GLint param) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, SpriteParameteriSGIX,pname,param) -DECLARE_GL_FUNCTION_STUB_HEAD(void, SpriteParameterivSGIX, GLenum pname, const GLint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, SpriteParameterivSGIX,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TagSampleBufferSGIX,void) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TagSampleBufferSGIX,) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ColorTableSGI, GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void* table) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ColorTableSGI,target,internalformat,width,format,type,table) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ColorTableParameterfvSGI, GLenum target, GLenum pname, const GLfloat* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ColorTableParameterfvSGI,target,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ColorTableParameterivSGI, GLenum target, GLenum pname, const GLint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ColorTableParameterivSGI,target,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, CopyColorTableSGI, GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, CopyColorTableSGI,target,internalformat,x,y,width) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetColorTableSGI, GLenum target, GLenum format, GLenum type, void* table) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetColorTableSGI,target,format,type,table) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetColorTableParameterfvSGI, GLenum target, GLenum pname, GLfloat* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetColorTableParameterfvSGI,target,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GetColorTableParameterivSGI, GLenum target, GLenum pname, GLint* params) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GetColorTableParameterivSGI,target,pname,params) -DECLARE_GL_FUNCTION_STUB_HEAD(void, FinishTextureSUNX,void) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, FinishTextureSUNX,) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GlobalAlphaFactorbSUN, GLbyte factor) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GlobalAlphaFactorbSUN,factor) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GlobalAlphaFactorsSUN, GLshort factor) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GlobalAlphaFactorsSUN,factor) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GlobalAlphaFactoriSUN, GLint factor) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GlobalAlphaFactoriSUN,factor) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GlobalAlphaFactorfSUN, GLfloat factor) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GlobalAlphaFactorfSUN,factor) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GlobalAlphaFactordSUN, GLdouble factor) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GlobalAlphaFactordSUN,factor) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GlobalAlphaFactorubSUN, GLubyte factor) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GlobalAlphaFactorubSUN,factor) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GlobalAlphaFactorusSUN, GLushort factor) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GlobalAlphaFactorusSUN,factor) -DECLARE_GL_FUNCTION_STUB_HEAD(void, GlobalAlphaFactoruiSUN, GLuint factor) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, GlobalAlphaFactoruiSUN,factor) -DECLARE_GL_FUNCTION_STUB_HEAD(void, DrawMeshArraysSUN, GLenum mode, GLint first, GLsizei count, GLsizei width) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, DrawMeshArraysSUN,mode,first,count,width) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ReplacementCodeuiSUN, GLuint code) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ReplacementCodeuiSUN,code) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ReplacementCodeusSUN, GLushort code) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ReplacementCodeusSUN,code) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ReplacementCodeubSUN, GLubyte code) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ReplacementCodeubSUN,code) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ReplacementCodeuivSUN,const GLuint* code) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ReplacementCodeuivSUN,code) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ReplacementCodeusvSUN,const GLushort* code) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ReplacementCodeusvSUN,code) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ReplacementCodeubvSUN,const GLubyte* code) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ReplacementCodeubvSUN,code) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ReplacementCodePointerSUN, GLenum type, GLsizei stride, const void* *pointer) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ReplacementCodePointerSUN,type,stride,pointer) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Color4ubVertex2fSUN, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Color4ubVertex2fSUN,r,g,b,a,x,y) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Color4ubVertex2fvSUN,const GLubyte* c, const GLfloat* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Color4ubVertex2fvSUN,c,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Color4ubVertex3fSUN, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Color4ubVertex3fSUN,r,g,b,a,x,y,z) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Color4ubVertex3fvSUN,const GLubyte* c, const GLfloat* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Color4ubVertex3fvSUN,c,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Color3fVertex3fSUN, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Color3fVertex3fSUN,r,g,b,x,y,z) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Color3fVertex3fvSUN,const GLfloat* c, const GLfloat* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Color3fVertex3fvSUN,c,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Normal3fVertex3fSUN, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Normal3fVertex3fSUN,nx,ny,nz,x,y,z) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Normal3fVertex3fvSUN,const GLfloat* n, const GLfloat* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Normal3fVertex3fvSUN,n,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Color4fNormal3fVertex3fSUN, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Color4fNormal3fVertex3fSUN,r,g,b,a,nx,ny,nz,x,y,z) -DECLARE_GL_FUNCTION_STUB_HEAD(void, Color4fNormal3fVertex3fvSUN,const GLfloat* c, const GLfloat* n, const GLfloat* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, Color4fNormal3fVertex3fvSUN,c,n,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexCoord2fVertex3fSUN, GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexCoord2fVertex3fSUN,s,t,x,y,z) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexCoord2fVertex3fvSUN,const GLfloat* tc, const GLfloat* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexCoord2fVertex3fvSUN,tc,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexCoord4fVertex4fSUN, GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat x, GLfloat y, GLfloat z, GLfloat w) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexCoord4fVertex4fSUN,s,t,p,q,x,y,z,w) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexCoord4fVertex4fvSUN,const GLfloat* tc, const GLfloat* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexCoord4fVertex4fvSUN,tc,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexCoord2fColor4ubVertex3fSUN, GLfloat s, GLfloat t, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexCoord2fColor4ubVertex3fSUN,s,t,r,g,b,a,x,y,z) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexCoord2fColor4ubVertex3fvSUN,const GLfloat* tc, const GLubyte* c, const GLfloat* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexCoord2fColor4ubVertex3fvSUN,tc,c,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexCoord2fColor3fVertex3fSUN, GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexCoord2fColor3fVertex3fSUN,s,t,r,g,b,x,y,z) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexCoord2fColor3fVertex3fvSUN,const GLfloat* tc, const GLfloat* c, const GLfloat* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexCoord2fColor3fVertex3fvSUN,tc,c,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexCoord2fNormal3fVertex3fSUN, GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexCoord2fNormal3fVertex3fSUN,s,t,nx,ny,nz,x,y,z) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexCoord2fNormal3fVertex3fvSUN,const GLfloat* tc, const GLfloat* n, const GLfloat* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexCoord2fNormal3fVertex3fvSUN,tc,n,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexCoord2fColor4fNormal3fVertex3fSUN, GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexCoord2fColor4fNormal3fVertex3fSUN,s,t,r,g,b,a,nx,ny,nz,x,y,z) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexCoord2fColor4fNormal3fVertex3fvSUN,const GLfloat* tc, const GLfloat* c, const GLfloat* n, const GLfloat* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexCoord2fColor4fNormal3fVertex3fvSUN,tc,c,n,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexCoord4fColor4fNormal3fVertex4fSUN, 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) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexCoord4fColor4fNormal3fVertex4fSUN,s,t,p,q,r,g,b,a,nx,ny,nz,x,y,z,w) -DECLARE_GL_FUNCTION_STUB_HEAD(void, TexCoord4fColor4fNormal3fVertex4fvSUN,const GLfloat* tc, const GLfloat* c, const GLfloat* n, const GLfloat* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, TexCoord4fColor4fNormal3fVertex4fvSUN,tc,c,n,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ReplacementCodeuiVertex3fSUN, GLuint rc, GLfloat x, GLfloat y, GLfloat z) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ReplacementCodeuiVertex3fSUN,rc,x,y,z) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ReplacementCodeuiVertex3fvSUN,const GLuint* rc, const GLfloat* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ReplacementCodeuiVertex3fvSUN,rc,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ReplacementCodeuiColor4ubVertex3fSUN, GLuint rc, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ReplacementCodeuiColor4ubVertex3fSUN,rc,r,g,b,a,x,y,z) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ReplacementCodeuiColor4ubVertex3fvSUN,const GLuint* rc, const GLubyte* c, const GLfloat* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ReplacementCodeuiColor4ubVertex3fvSUN,rc,c,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ReplacementCodeuiColor3fVertex3fSUN, GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ReplacementCodeuiColor3fVertex3fSUN,rc,r,g,b,x,y,z) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ReplacementCodeuiColor3fVertex3fvSUN,const GLuint* rc, const GLfloat* c, const GLfloat* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ReplacementCodeuiColor3fVertex3fvSUN,rc,c,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ReplacementCodeuiNormal3fVertex3fSUN, GLuint rc, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ReplacementCodeuiNormal3fVertex3fSUN,rc,nx,ny,nz,x,y,z) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ReplacementCodeuiNormal3fVertex3fvSUN,const GLuint* rc, const GLfloat* n, const GLfloat* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ReplacementCodeuiNormal3fVertex3fvSUN,rc,n,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ReplacementCodeuiColor4fNormal3fVertex3fSUN, GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ReplacementCodeuiColor4fNormal3fVertex3fSUN,rc,r,g,b,a,nx,ny,nz,x,y,z) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ReplacementCodeuiColor4fNormal3fVertex3fvSUN,const GLuint* rc, const GLfloat* c, const GLfloat* n, const GLfloat* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ReplacementCodeuiColor4fNormal3fVertex3fvSUN,rc,c,n,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ReplacementCodeuiTexCoord2fVertex3fSUN, GLuint rc, GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ReplacementCodeuiTexCoord2fVertex3fSUN,rc,s,t,x,y,z) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ReplacementCodeuiTexCoord2fVertex3fvSUN,const GLuint* rc, const GLfloat* tc, const GLfloat* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ReplacementCodeuiTexCoord2fVertex3fvSUN,rc,tc,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ReplacementCodeuiTexCoord2fNormal3fVertex3fSUN, GLuint rc, GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ReplacementCodeuiTexCoord2fNormal3fVertex3fSUN,rc,s,t,nx,ny,nz,x,y,z) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN,const GLuint* rc, const GLfloat* tc, const GLfloat* n, const GLfloat* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN,rc,tc,n,v) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN, 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) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN,rc,s,t,r,g,b,a,nx,ny,nz,x,y,z) -DECLARE_GL_FUNCTION_STUB_HEAD(void, ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN,const GLuint* rc, const GLfloat* tc, const GLfloat* c, const GLfloat* n, const GLfloat* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN,rc,tc,c,n,v) diff --git a/MG/MG_GL/Implementations/GL/GLFuncsDefinitions/GLFuncsDefinitions.h b/MG/MG_GL/Implementations/GL/GLFuncsDefinitions/GLFuncsDefinitions.h deleted file mode 100644 index 2fe14a25..00000000 --- a/MG/MG_GL/Implementations/GL/GLFuncsDefinitions/GLFuncsDefinitions.h +++ /dev/null @@ -1,8 +0,0 @@ -// -// Created by BZLZHH on 2025/3/15. -// - -#ifndef MOBILEGL_GL_FUNCS_DEFINITIONS_H -#define MOBILEGL_GL_FUNCS_DEFINITIONS_H - -#endif //MOBILEGL_GL_FUNCS_DEFINITIONS_H diff --git a/MG/MG_GL/Implementations/GL/Getter/BackendInfo.cpp b/MG/MG_GL/Implementations/GL/Getter/BackendInfo.cpp deleted file mode 100644 index 84dd8052..00000000 --- a/MG/MG_GL/Implementations/GL/Getter/BackendInfo.cpp +++ /dev/null @@ -1,173 +0,0 @@ -// -// Created by BZLZHH on 2025/3/15. -// - -#include "../../../../Includes.h" - -namespace MG_GL::Getter { - const std::string GetBackendName() { -#if BACKEND_TYPE == BACKEND_VULKAN - return "Vulkan"; -#elif BACKEND_TYPE == BACKEND_METAL - return "Metal"; -#elif BACKEND_TYPE == BACKEND_GLES - return "OpenGL ES"; -#elif BACKEND_TYPE == BACKEND_DILIGENT - switch (MG_Diligent::DILIGENT_BACKEND_TYPE) { - case MG_Constants::Backend::BACKEND_DILIGENT_VULKAN: - return "DiligentEngine (Vulkan)"; - case MG_Constants::Backend::BACKEND_DILIGENT_METAL: - return "DiligentEngine (Metal)"; - case MG_Constants::Backend::BACKEND_DILIGENT_OPENGL: - return "DiligentEngine (OpenGL)"; - default: - return "DiligentEngine (Unknown Backend)"; - } -#else - return ""; -#endif - } - - const std::string GetMGName() { -#if BACKEND_TYPE == BACKEND_VULKAN - return "MobileGluvk"; -#elif BACKEND_TYPE == BACKEND_METAL - return "MobileGlumtl"; -#elif BACKEND_TYPE == BACKEND_GLES - return "MobileGlues"; -#elif BACKEND_TYPE == BACKEND_DILIGENT - switch (MG_Diligent::DILIGENT_BACKEND_TYPE) { - case MG_Constants::Backend::BACKEND_DILIGENT_VULKAN: - return "MobileGlued-vk"; - case MG_Constants::Backend::BACKEND_DILIGENT_METAL: - return "MobileGlued-mtl"; - case MG_Constants::Backend::BACKEND_DILIGENT_OPENGL: - return "MobileGlued-gl"; - default: - return "MobileGlued-unknown"; - } -#else - return ""; -#endif - } - - const std::string GetBackendGfxAPIName() { -#if BACKEND_TYPE == BACKEND_VULKAN - return "Vulkan"; -#elif BACKEND_TYPE == BACKEND_METAL - return "Metal"; -#elif BACKEND_TYPE == BACKEND_GLES - return "OpenGL ES"; -#elif BACKEND_TYPE == BACKEND_DILIGENT - switch (MG_Diligent::DILIGENT_BACKEND_TYPE) { - case MG_Constants::Backend::BACKEND_DILIGENT_VULKAN: - return "Vulkan"; - case MG_Constants::Backend::BACKEND_DILIGENT_METAL: - return "Metal"; - case MG_Constants::Backend::BACKEND_DILIGENT_OPENGL: - return "OpenGL"; - default: - return ""; - } -#else - return ""; -#endif - } - - const std::string GetGPUName() { -#if BACKEND_TYPE == BACKEND_DILIGENT - if (MG_Diligent::g_pDevice) - return MG_Diligent::g_pDevice->GetAdapterInfo().Description; - - return ""; -#else - return ""; -#endif - } - - const uint32_t GetBackendGfxAPIVersionMajor() { -#if BACKEND_TYPE == BACKEND_DILIGENT - if (MG_Diligent::g_pDevice) - return MG_Diligent::g_pDevice->GetDeviceInfo().APIVersion.Major; - - return 0; -#else - return 0; -#endif - } - - const uint32_t GetBackendGfxAPIVersionMinor() { -#if BACKEND_TYPE == BACKEND_DILIGENT - if (MG_Diligent::g_pDevice) - return MG_Diligent::g_pDevice->GetDeviceInfo().APIVersion.Minor; - - return 0; -#else - return 0; -#endif - } - - void LogMGInfo() { - std::string MGName = MG_GL::Getter::GetMGName() + " (MobileGL Core)"; - - std::string MGVersion = std::to_string(MG_Global::MG::VersionMajor) + "." - + std::to_string(MG_Global::MG::VersionMinor) + "." - + std::to_string(MG_Global::MG::VersionRevision); - if (MG_Global::MG::VersionPatch != 0) - MGVersion += "." + std::to_string(MG_Global::MG::VersionPatch); - MGVersion += MG_Global::MG::VersionSuffix; - - std::string GLVersion = std::to_string(MG_Global::GL::GLVersionMajor) + "." - + std::to_string(MG_Global::GL::GLVersionMinor) + "." - + std::to_string(MG_Global::GL::GLVersionRevision); - - std::string backendName = MG_GL::Getter::GetBackendName(); - - std::string backendVersion; -#if BACKEND_TYPE == BACKEND_VULKAN - VkApplicationInfo appInfo = {}; - appInfo.sType = VK_STRUCTURE_TYPE_APPLICATION_INFO; - appInfo.pApplicationName = "Vulkan Version Query"; - appInfo.applicationVersion = VK_MAKE_VERSION(1, 0, 0); - appInfo.pEngineName = "No Engine"; - appInfo.engineVersion = VK_MAKE_VERSION(1, 0, 0); - appInfo.apiVersion = VK_API_VERSION_1_0; - VkInstanceCreateInfo createInfo = {}; - createInfo.sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO; - createInfo.pApplicationInfo = &appInfo; - VkInstance instance; - if (vkCreateInstance(&createInfo, nullptr, &instance) != VK_SUCCESS) { - throw std::runtime_error("Failed to create Vulkan instance!"); - } - uint32_t deviceCount = 0; - vkEnumeratePhysicalDevices(instance, &deviceCount, nullptr); - if (deviceCount == 0) { - throw std::runtime_error("No Vulkan devices found!"); - } - VkPhysicalDevice physicalDevice; - vkEnumeratePhysicalDevices(instance, &deviceCount, &physicalDevice); - VkPhysicalDeviceProperties deviceProperties; - vkGetPhysicalDeviceProperties(physicalDevice, &deviceProperties); - uint32_t major = VK_VERSION_MAJOR(deviceProperties.apiVersion); - uint32_t minor = VK_VERSION_MINOR(deviceProperties.apiVersion); - uint32_t patch = VK_VERSION_PATCH(deviceProperties.apiVersion); - vkDestroyInstance(instance, nullptr); - - backendVersion = "Vulkan " + std::to_string(major) + "." + - std::to_string(minor)+"." + std::to_string(patch); -#elif BACKEND_TYPE == BACKEND_GLES - backendVersion = std::string((const char*)::GLES::glGetString(GL_VERSION)); -#elif BACKEND_TYPE == BACKEND_DILIGENT - backendVersion = "Diligent"; -#else - backendVersion = ""; -#endif - - MG_Util::Debug::LogI("MobileGL Renderer Info:"); - MG_Util::Debug::LogI("----%s:", MGName.c_str()); - MG_Util::Debug::LogI("--------MobileGL Version: %s", MGVersion.c_str()); - MG_Util::Debug::LogI("--------Target OpenGL Implementation Version: %s", GLVersion.c_str()); - MG_Util::Debug::LogI("--------Backend: %s", backendName.c_str()); - MG_Util::Debug::LogI("--------Backend Version: %s", backendVersion.c_str()); - } -} \ No newline at end of file diff --git a/MG/MG_GL/Implementations/GL/Getter/BackendInfo.h b/MG/MG_GL/Implementations/GL/Getter/BackendInfo.h deleted file mode 100644 index 9004d82b..00000000 --- a/MG/MG_GL/Implementations/GL/Getter/BackendInfo.h +++ /dev/null @@ -1,18 +0,0 @@ -// -// Created by BZLZHH on 2025/3/15. -// - -#ifndef MOBILEGL_BACKENDINFO_H -#define MOBILEGL_BACKENDINFO_H - -namespace MG_GL::Getter { - const std::string GetGPUName(); - const std::string GetBackendName(); - const std::string GetBackendGfxAPIName(); - const uint32_t GetBackendGfxAPIVersionMajor(); - const uint32_t GetBackendGfxAPIVersionMinor(); - const std::string GetMGName(); - void LogMGInfo(); -} - -#endif //MOBILEGL_BACKENDINFO_H diff --git a/MG/MG_GL/Implementations/GL/Getter/GL_Getter.cpp b/MG/MG_GL/Implementations/GL/Getter/GL_Getter.cpp deleted file mode 100644 index 247bb4d5..00000000 --- a/MG/MG_GL/Implementations/GL/Getter/GL_Getter.cpp +++ /dev/null @@ -1,324 +0,0 @@ -// -// Created by BZLZHH on 2025/3/15. -// - -#include "../../../../Includes.h" - -namespace MG_GL::GL { - static std::string rendererString; - static bool loggedMGInfo; - const GLubyte* GetString(GLenum name) { - if (!loggedMGInfo) { - loggedMGInfo = true; - MG_GL::Getter::LogMGInfo(); - } - MG_Util::Debug::LogD("glGetString, name: %s", MG_Util::Debug::GLEnumToString(name)); - switch (name) { - case GL_VENDOR: - return (const GLubyte *)"MobileGL-Dev (BZLZHH, Swung0x48, Tungsten)"; - case GL_VERSION: { - static std::string versionStr; - if (versionStr.empty()) { - versionStr = std::to_string(MG_Global::GL::GLVersionMajor) + "." - + std::to_string(MG_Global::GL::GLVersionMinor) + "." - + std::to_string(MG_Global::GL::GLVersionRevision) - + " "+ MG_GL::Getter::GetMGName() + - ", MobileGL Core, " + MG_GL::Getter::GetBackendName() + " Backend, Version " - + std::to_string(MG_Global::MG::VersionMajor) + "." - + std::to_string(MG_Global::MG::VersionMinor) + "." - + std::to_string(MG_Global::MG::VersionRevision); - if (MG_Global::MG::VersionPatch != 0) - versionStr += "." + std::to_string(MG_Global::MG::VersionPatch); - versionStr += MG_Global::MG::VersionSuffix; - } - return (const GLubyte *)versionStr.c_str(); - } - - case GL_RENDERER: - { - /* - if (rendererString == std::string("")) { - const char* gpuName = getGpuName(); - const char* glesName = getGLESName(); - rendererString = std::string(gpuName) + " | " + std::string(glesName); - } - return (const GLubyte *)rendererString.c_str(); - */ - return (const GLubyte *)std::format("{} | {} {}.{}", - MG_GL::Getter::GetGPUName(), - MG_GL::Getter::GetBackendGfxAPIName(), - MG_GL::Getter::GetBackendGfxAPIVersionMajor(), - MG_GL::Getter::GetBackendGfxAPIVersionMinor()).c_str(); - } - case GL_SHADING_LANGUAGE_VERSION: - return (const GLubyte *) "4.50 MobileGL with glslang"; - case GL_EXTENSIONS: - return (const GLubyte *) "OpenGL11 " - "OpenGL12 " - "OpenGL13 " - "OpenGL14 " - "OpenGL15 " - "OpenGL20 " - "OpenGL21 " - "OpenGL30 "; - default: - return (const GLubyte *) "Unknown enum"; - } - } - - const GLubyte* GetStringi(GLenum name, GLuint index) { - MG_Util::Debug::LogD("glGetStringi, name: %s, index: %d", MG_Util::Debug::GLEnumToString(name), index); - if (name != GL_EXTENSIONS) - return (const GLubyte*)""; - typedef struct { - GLenum name; - const char** parts; - GLuint count; - } StringCache; - static StringCache caches[] = { - {GL_EXTENSIONS, nullptr, 0}, - }; - static int initialized = 0; - if (!initialized) { - for (auto & cache : caches) { - GLenum target = cache.name; - const GLubyte* str = nullptr; - const char* delimiter = " "; - str = GetString(GL_EXTENSIONS); - - char* copy = strdup((const char*)str); - char* token = strtok(copy, delimiter); - while (token) { - cache.parts = (const char**)realloc(cache.parts, (cache.count + 1) * sizeof(char*)); - cache.parts[cache.count++] = strdup(token); - token = strtok(nullptr, delimiter); - } - free(copy); - } - initialized = 1; - } - - for (auto & cache : caches) { - if (cache.name == name) { - if (index >= cache.count) { - return nullptr; - } - return (const GLubyte*)cache.parts[index]; - } - } - - return nullptr; - } - - GLenum GetError() { - GLenum error = MG_State::GetError(); - MG_Util::Debug::LogD("glGetError -> %s", MG_Util::Debug::GLEnumToString(error)); - return error; - } - - void GetIntegerv(GLenum pname, GLint *params) { - MG_Util::Debug::LogD("glGetIntegerv, pname: %s", MG_Util::Debug::GLEnumToString(pname)); - if (!params) { - MG_State::SetError(GL_INVALID_VALUE); - return; - } - - switch (pname) { - // General - case GL_CONTEXT_PROFILE_MASK: - params[0] = GL_CONTEXT_CORE_PROFILE_BIT; - break; - case GL_NUM_EXTENSIONS: - static GLint num_extensions = -1; - if (num_extensions == -1) { - const GLubyte* ext_str = MG_GL::GL::GetString(GL_EXTENSIONS); - char *copy = strdup((const char *) ext_str); - char *token = strtok(copy, " "); - num_extensions = 0; - while (token) { - num_extensions++; - token = strtok(nullptr, " "); - } - free(copy); - } - params[0] = num_extensions; - break; - case GL_MAJOR_VERSION: - params[0] = MG_Global::GL::GLVersionMajor; - break; - case GL_MINOR_VERSION: - params[0] = MG_Global::GL::GLVersionMinor; - break; - - // Viewport and scissor - case GL_VIEWPORT: - memcpy(params, MG_State_T::commonState->viewport, 4 * sizeof(GLint)); - break; - case GL_SCISSOR_BOX: - // TODO: memcpy(params, MG_State_T::commonState->scissorBox, 4 * sizeof(GLint)); - break; - case GL_MAX_VIEWPORT_DIMS: { - static const GLint maxDims[2] = {16384, 16384}; - memcpy(params, maxDims, sizeof(maxDims)); - break; - } - - // Buffer bindings - case GL_ARRAY_BUFFER_BINDING: - params[0] = static_cast(MG_State_T::bufferState->GetCurrentBinding(GL_ARRAY_BUFFER)); - break; - - case GL_ELEMENT_ARRAY_BUFFER_BINDING: - params[0] = static_cast(MG_State_T::vertexArrayState->GetBoundElementBuffer()); - break; - case GL_DRAW_FRAMEBUFFER_BINDING: - params[0] = static_cast(MG_State_T::framebufferState->currentBindings_[GL_DRAW_FRAMEBUFFER]); - break; - case GL_READ_FRAMEBUFFER_BINDING: - params[0] = static_cast(MG_State_T::framebufferState->currentBindings_[GL_READ_FRAMEBUFFER]); - break; - case GL_RENDERBUFFER_BINDING: - // TODO: params[0] = static_cast(MG_State_T::framebufferState->currentRenderbuffer_); - break; - - // Program state - case GL_CURRENT_PROGRAM: - params[0] = static_cast(MG_State_T::programState->currentProgram_); - break; - case GL_MAX_VERTEX_ATTRIBS: - // TODO: Check the real value - params[0] = MG_Constants::VertexArray::MAX_VERTEX_ATTRIBS; - break; - - // Texture state - case GL_TEXTURE_BINDING_2D: { - GLuint unit = MG_State_T::textureState->activeTextureUnit_; - auto& textures = MG_State_T::textureState->textureUnits_[unit].boundTextures; - params[0] = textures.count(GL_TEXTURE_2D) ? static_cast(textures[GL_TEXTURE_2D]) : 0; - break; - } - case GL_ACTIVE_TEXTURE: - params[0] = GL_TEXTURE0 + MG_State_T::textureState->activeTextureUnit_; - break; - case GL_MAX_TEXTURE_SIZE: - params[0] = 8192; - break; - - // Blend state - case GL_BLEND_SRC_RGB: - params[0] = static_cast(MG_State_T::commonState->blendSrcRGB); - break; - case GL_BLEND_DST_RGB: - params[0] = static_cast(MG_State_T::commonState->blendDstRGB); - break; - case GL_BLEND_SRC_ALPHA: - params[0] = static_cast(MG_State_T::commonState->blendSrcAlpha); - break; - case GL_BLEND_DST_ALPHA: - params[0] = static_cast(MG_State_T::commonState->blendDstAlpha); - break; - - // Depth and stencil - case GL_DEPTH_FUNC: - params[0] = static_cast(MG_State_T::commonState->depthFunc); - break; - case GL_DEPTH_WRITEMASK: - params[0] = static_cast(MG_State_T::commonState->depthMask); - break; - case GL_STENCIL_REF: - // TODO: params[0] = MG_State_T::commonState->stencilRef; - break; - - // Capability enables - case GL_BLEND: - params[0] = MG_State_T::commonState->capabilities[GL_BLEND] ? GL_TRUE : GL_FALSE; - break; - case GL_DEPTH_TEST: - params[0] = MG_State_T::commonState->capabilities[GL_DEPTH_TEST] ? GL_TRUE : GL_FALSE; - break; - case GL_SCISSOR_TEST: - params[0] = MG_State_T::commonState->capabilities[GL_SCISSOR_TEST] ? GL_TRUE : GL_FALSE; - break; - - // Pixel operations - case GL_PACK_ALIGNMENT: - params[0] = MG_State_T::commonState->QueryPixelStoreInt(GL_PACK_ALIGNMENT); - break; - case GL_UNPACK_ALIGNMENT: - params[0] = MG_State_T::commonState->QueryPixelStoreInt(GL_UNPACK_ALIGNMENT); - break; - - // Hardware limits, TODO: Check the real values - case GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS: - params[0] = 32; - break; - case GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS: - params[0] = 32; - break; - case GL_MAX_TEXTURE_IMAGE_UNITS: - params[0] = 32; - break; - case GL_MAX_RENDERBUFFER_SIZE: - params[0] = 65537; - break; - case GL_MAX_DRAW_BUFFERS: - params[0] = 32; - break; - case GL_MAX_COLOR_ATTACHMENTS: - params[0] = 32; - break; - - // Color state - case GL_COLOR_CLEAR_VALUE: { - const auto& c = MG_State_T::commonState->clearColor; - params[0] = static_cast(c[0] * 0x7FFF); - params[1] = static_cast(c[1] * 0x7FFF); - params[2] = static_cast(c[2] * 0x7FFF); - params[3] = static_cast(c[3] * 0x7FFF); - break; - } - case GL_COLOR_WRITEMASK: - params[0] = MG_State_T::commonState->colorMask[0]; - params[1] = MG_State_T::commonState->colorMask[1]; - params[2] = MG_State_T::commonState->colorMask[2]; - params[3] = MG_State_T::commonState->colorMask[3]; - break; - - // Stencil operations - case GL_STENCIL_CLEAR_VALUE: - // TODO: params[0] = MG_State_T::commonState->stencilClearValue; - break; - case GL_STENCIL_BITS: - // TODO: Check the real value - params[0] = 8; - break; - - // Implementation limits - case GL_SUBPIXEL_BITS: - // TODO: Check the real value - params[0] = 4; - break; - case GL_NUM_COMPRESSED_TEXTURE_FORMATS: - // TODO: params[0] = static_cast(MG_State_T::textureState->compressedFormats_.size()); - break; - case GL_COMPRESSED_TEXTURE_FORMATS: - // TODO: Implement GL_COMPRESSED_TEXTURE_FORMATS - break; - - // Polygon state - case GL_POLYGON_OFFSET_FACTOR: - // TODO: params[0] = static_cast(MG_State_T::commonState->polygonOffsetFactor); - break; - case GL_POLYGON_OFFSET_UNITS: - // TODO: params[0] = static_cast(MG_State_T::commonState->polygonOffsetUnits); - break; - - // Others... - default: - MG_Util::Debug::LogE("glGetIntegerv: Invalid enum %s (0x%X)", MG_Util::Debug::GLEnumToString(pname), pname); - MG_State::SetError(GL_INVALID_ENUM); - break; - } - } - -} \ No newline at end of file diff --git a/MG/MG_GL/Implementations/GL/Getter/GL_Getter.h b/MG/MG_GL/Implementations/GL/Getter/GL_Getter.h deleted file mode 100644 index b7d22dc4..00000000 --- a/MG/MG_GL/Implementations/GL/Getter/GL_Getter.h +++ /dev/null @@ -1,15 +0,0 @@ -// -// Created by BZLZHH on 2025/3/15. -// - -#ifndef MOBILEGL_GL_GETTER_H -#define MOBILEGL_GL_GETTER_H - -namespace MG_GL::GL { - const GLubyte* GetString(GLenum name); - const GLubyte* GetStringi(GLenum name, GLuint index); - GLenum GetError(); - void GetIntegerv(GLenum pname, GLint *params); -} - -#endif //MOBILEGL_GL_GETTER_H diff --git a/MG/MG_GL/Implementations/GL/Program/GL_Program.cpp b/MG/MG_GL/Implementations/GL/Program/GL_Program.cpp deleted file mode 100644 index c740d10e..00000000 --- a/MG/MG_GL/Implementations/GL/Program/GL_Program.cpp +++ /dev/null @@ -1,676 +0,0 @@ -// -// Created by BZLZHH on 2025/3/15. -// - -#include "../../../../Includes.h" - -namespace MG_GL::GL { - void CreateDefaultUBO(MG_Diligent::GLProgramInfo& programInfo, size_t uboSize) { - MG_Util::Debug::LogD("CreateDefaultUBO for program, size = %zu", uboSize); - if (uboSize > 0) { - Diligent::BufferDesc BuffDesc; - BuffDesc.Name = "MG_DEFAULT_UBO"; - BuffDesc.Size = uboSize; - BuffDesc.Usage = Diligent::USAGE_DYNAMIC; - BuffDesc.BindFlags = Diligent::BIND_UNIFORM_BUFFER; - BuffDesc.CPUAccessFlags = Diligent::CPU_ACCESS_WRITE; - MG_Diligent::g_pDevice->CreateBuffer(BuffDesc, nullptr, &programInfo.pDefaultUBO); - MG_Util::Debug::LogD("Created default UBO: size = %zu", uboSize); - } else { - MG_Util::Debug::LogD("UBO size is 0, default UBO not created."); - } - } - - size_t RecordUniformOffsets(MG_Diligent::GLProgramInfo& programInfo, const MG_Global::unordered_map& shaderSources) { - MG_Util::Debug::LogD("RecordUniformOffsets for program %u using SPIRV-Cross", programInfo.id); - size_t uboTotalSize = 0; - programInfo.uniformOffsets.clear(); - - GLuint reflectionShaderId = 0; - for (auto shaderId : programInfo.AttachedShadersID) { - auto& shaderObj = MG_State_T::programState->shaders_[shaderId]; - MG_Util::Debug::LogD(" Checking attached shader %u, type: %s", shaderId, MG_Util::Debug::GLEnumToString(shaderObj.type)); - if (shaderObj.type == GL_VERTEX_SHADER) { - reflectionShaderId = shaderId; - MG_Util::Debug::LogD(" Found vertex shader %u for reflection.", reflectionShaderId); - break; - } - } - if (!reflectionShaderId && !programInfo.AttachedShadersID.empty()) { - reflectionShaderId = programInfo.AttachedShadersID[0]; - MG_Util::Debug::LogD(" No vertex shader found, using first attached shader %u for reflection.", reflectionShaderId); - } - if (!reflectionShaderId) { - MG_Util::Debug::LogW(" No suitable shader found for UBO reflection."); - return uboTotalSize; - } - - MG_Util::Debug::LogD(" Using shader %u for UBO reflection.", reflectionShaderId); - auto itSource = shaderSources.find(reflectionShaderId); - if (itSource == shaderSources.end()) { - MG_Util::Debug::LogE(" Could not find source for reflection shader %u.", reflectionShaderId); - return uboTotalSize; - } - - MG_Util::Debug::LogD(" Found source for shader %u.", reflectionShaderId); - MG_Util::Debug::LogD(" Shader source for reflection:\n%s", itSource->second.c_str()); - std::string infoLog; - auto spirv = MG_Util::Program::CompileGLSLToSPIRV( - MG_State_T::programState->shaders_[reflectionShaderId].type, - itSource->second, - infoLog, - true - ); - if (spirv.empty()) { - MG_Util::Debug::LogE("GLSL to SPIR-V compilation failed for shader %u: %s", reflectionShaderId, infoLog.c_str()); - return uboTotalSize; - } - - MG_Util::Debug::LogD(" Successfully compiled GLSL to SPIR-V for shader %u.", reflectionShaderId); - - spvc_context context = nullptr; - spvc_parsed_ir ir = nullptr; - spvc_compiler compiler = nullptr; - spvc_resources resources = nullptr; - - if (spvc_context_create(&context) != SPVC_SUCCESS) { - MG_Util::Debug::LogE("SPIRV-Cross: Failed to create context: %s", spvc_context_get_last_error_string(context)); - return uboTotalSize; - } - - if (spvc_context_parse_spirv(context, spirv.data(), spirv.size(), &ir) != SPVC_SUCCESS) { - MG_Util::Debug::LogE("SPIRV-Cross: Failed to parse SPIR-V: %s", spvc_context_get_last_error_string(context)); - spvc_context_destroy(context); - return uboTotalSize; - } - - if (spvc_context_create_compiler(context, SPVC_BACKEND_GLSL, ir, SPVC_CAPTURE_MODE_TAKE_OWNERSHIP, &compiler) != SPVC_SUCCESS) { - MG_Util::Debug::LogE("SPIRV-Cross: Failed to create compiler: %s", spvc_context_get_last_error_string(context)); - spvc_context_destroy(context); - return uboTotalSize; - } - - MG_Util::Debug::LogD(" spvc_context_create_compiler successful."); - - if (spvc_compiler_create_shader_resources(compiler, &resources) != SPVC_SUCCESS) { - MG_Util::Debug::LogE("SPIRV-Cross: Failed to create shader resources: %s", spvc_context_get_last_error_string(context)); - spvc_context_destroy(context); - return uboTotalSize; - } - - MG_Util::Debug::LogD(" spvc_compiler_create_shader_resources successful."); - - const spvc_reflected_resource* ubo_list = nullptr; - size_t ubo_count = 0; - if (spvc_resources_get_resource_list_for_type(resources, SPVC_RESOURCE_TYPE_UNIFORM_BUFFER, &ubo_list, &ubo_count) != SPVC_SUCCESS) { - MG_Util::Debug::LogE("SPIRV-Cross: Failed to get resource list for UBO: %s", spvc_context_get_last_error_string(context)); - spvc_context_destroy(context); - return uboTotalSize; - } - - MG_Util::Debug::LogD(" Found %zu UBO resources.", ubo_count); - - for (size_t i = 0; i < ubo_count; i++) { - const char* name = ubo_list[i].name; - if (!name || strcmp(name, "MG_DEFAULT_UBO") != 0) { - MG_Util::Debug::LogD(" Skipping UBO '%s'.", name ? name : ""); - continue; - } - - MG_Util::Debug::LogD(" Found UBO 'MG_DEFAULT_UBO'."); - spvc_type_id ubo_type_id = ubo_list[i].type_id; - spvc_type ubo_type = spvc_compiler_get_type_handle(compiler, ubo_type_id); - - size_t currentUboSize = 0; - if (spvc_compiler_get_declared_struct_size(compiler, ubo_type, ¤tUboSize) != SPVC_SUCCESS) { - MG_Util::Debug::LogE("SPIRV-Cross: Failed to get declared struct size: %s", spvc_context_get_last_error_string(context)); - spvc_context_destroy(context); - return uboTotalSize; - } - - uboTotalSize = currentUboSize; - MG_Util::Debug::LogD(" UBO 'MG_DEFAULT_UBO' total size: %zu", uboTotalSize); - - size_t member_count = spvc_type_get_num_member_types(ubo_type); - for (size_t member_index = 0; member_index < member_count; member_index++) { - const char* member_name = programInfo.uniformBufferNames[member_index].c_str(); - - unsigned offset; - spvc_compiler_type_struct_member_offset(compiler, ubo_type, member_index, &offset); - - if (member_name) { - programInfo.uniformOffsets[member_name] = offset; - MG_Util::Debug::LogD( - " Uniform '%s' offset = %u (via SPIRV-Cross)", - member_name, - offset - ); - } - } - break; - } - - spvc_context_destroy(context); - MG_Util::Debug::LogD("RecordUniformOffsets completed for program %u, UBO total size: %zu", programInfo.id, uboTotalSize); - return uboTotalSize; - } - - Diligent::VALUE_TYPE ConvertGLTypeToDiligent(GLenum type) { - switch (type) { - case GL_FLOAT: return Diligent::VT_FLOAT32; - case GL_FLOAT_VEC2: return Diligent::VT_FLOAT32; - case GL_FLOAT_VEC3: return Diligent::VT_FLOAT32; - case GL_FLOAT_VEC4: return Diligent::VT_FLOAT32; - case GL_SHORT: return Diligent::VT_INT16; - case GL_UNSIGNED_SHORT: return Diligent::VT_UINT16; - case GL_BYTE: return Diligent::VT_INT8; - case GL_UNSIGNED_BYTE: return Diligent::VT_UINT8; - case GL_INT: return Diligent::VT_INT32; - case GL_INT_VEC2: return Diligent::VT_INT32; - case GL_INT_VEC3: return Diligent::VT_INT32; - case GL_INT_VEC4: return Diligent::VT_INT32; - case GL_UNSIGNED_INT: return Diligent::VT_UINT32; - case GL_UNSIGNED_INT_VEC2: return Diligent::VT_UINT32; - case GL_UNSIGNED_INT_VEC3: return Diligent::VT_UINT32; - case GL_UNSIGNED_INT_VEC4: return Diligent::VT_UINT32; - case GL_FLOAT_MAT2: return Diligent::VT_FLOAT32; - case GL_FLOAT_MAT3: return Diligent::VT_FLOAT32; - case GL_FLOAT_MAT4: return Diligent::VT_FLOAT32; - case GL_FLOAT_MAT2x3: return Diligent::VT_FLOAT32; - case GL_FLOAT_MAT2x4: return Diligent::VT_FLOAT32; - case GL_FLOAT_MAT3x2: return Diligent::VT_FLOAT32; - case GL_FLOAT_MAT3x4: return Diligent::VT_FLOAT32; - case GL_FLOAT_MAT4x2: return Diligent::VT_FLOAT32; - case GL_FLOAT_MAT4x3: return Diligent::VT_FLOAT32; - default: return Diligent::VT_UNDEFINED; - } - } - - GLuint CreateShader(GLenum type) { - MG_Util::Debug::LogD("glCreateShader, type: %s", MG_Util::Debug::GLEnumToString(type)); - GLuint shader; - GLenum result = MG_State::CreateShader(type, &shader); - if (result == GL_NO_ERROR) { - MG_Util::Debug::LogD("Created shader ID: %u", shader); - MG_Diligent::g_ShaderMap[shader] = nullptr; - return shader; - } - MG_State::SetError(result); - MG_Util::Debug::LogE("Error creating shader: %s", MG_Util::Debug::GLEnumToString(result)); - return 0; - } - - GLuint CreateProgram() { - MG_Util::Debug::LogD("glCreateProgram"); - GLuint program; - GLenum result = MG_State::CreateProgram(&program); - if (result == GL_NO_ERROR) { - MG_Util::Debug::LogD("Created program ID: %u", program); - return program; - } - MG_State::SetError(result); - MG_Util::Debug::LogE("Error creating program: %s", MG_Util::Debug::GLEnumToString(result)); - return 0; - } - - void DeleteShader(GLuint shader) { - MG_Util::Debug::LogD("glDeleteShader, shader: %u", shader); - GLenum result = MG_State::DeleteShader(shader); - if (result == GL_NO_ERROR) { - // Do not delete the shader object since it may be used in glDraw*. - /* - auto it = MG_Diligent::g_ShaderMap.find(shader); - if (it != MG_Diligent::g_ShaderMap.end()) { - if (it->second) { - it->second->Release(); - } - MG_Diligent::g_ShaderMap.erase(it); - } - return; - */ - } - MG_State::SetError(result); - MG_Util::Debug::LogW("Error deleting shader: %s", MG_Util::Debug::GLEnumToString(result)); - } - - void DeleteProgram(GLuint program) { - MG_Util::Debug::LogD("glDeleteProgram, program: %u", program); - GLenum result = MG_State::DeleteProgram(program); - if (result == GL_NO_ERROR) { - return; - } - MG_State::SetError(result); - MG_Util::Debug::LogE("Error deleting program: %s", MG_Util::Debug::GLEnumToString(result)); - } - - void AttachShader(GLuint program, GLuint shader) { - MG_Util::Debug::LogD("glAttachShader, program: %u, shader: %u", program, shader); - GLenum result = MG_State::LinkShaderToProgram(program, shader); - if (result == GL_NO_ERROR) { - return; - } - MG_State::SetError(result); - MG_Util::Debug::LogE("Error attaching shader: %s", MG_Util::Debug::GLEnumToString(result)); - } - - void ShaderSource(GLuint shader, GLsizei count, const GLchar *const*string, const GLint* length) { - MG_Util::Debug::LogD("glShaderSource, shader: %u, count: %d", shader, count); - if (count > 0 && string != nullptr && string[0] != nullptr) { - MG_Util::Debug::LogD("Shader source for shader %u:\n%s", shader, string[0]); - } else { - MG_Util::Debug::LogD("Shader source for shader %u is empty or null.", shader); - } - GLenum result = MG_State::UploadShaderSource(shader, count, (const GLchar **)string, length); - if (result == GL_NO_ERROR) return; - MG_State::SetError(result); - MG_Util::Debug::LogE("Error setting shader source: %s", MG_Util::Debug::GLEnumToString(result)); - } - - void CompileShader(GLuint shader) { - MG_Util::Debug::LogD("glCompileShader, shader: %u", shader); - // Defer actual compilation to LinkProgram - GLenum result = MG_State::BuildShaderStage(shader); - if (result == GL_NO_ERROR) return; - MG_State::SetError(result); - MG_Util::Debug::LogE("Error marking shader for compilation: %s", MG_Util::Debug::GLEnumToString(result)); - } - - void LinkProgram(GLuint program) { - MG_Util::Debug::LogD("glLinkProgram, program: %u", program); - GLenum result = MG_State::FinalizeProgramPipeline(program); - if (result != GL_NO_ERROR) { - MG_State::SetError(result); - MG_Util::Debug::LogE("Error linking program: %s", MG_Util::Debug::GLEnumToString(result)); - return; - } - auto& programInfo = MG_Diligent::g_ProgramMap[program]; - auto& programObj = MG_State_T::programState->programs_[program]; - - programInfo.id = program; - - for (const auto& shaderId : programObj.attachedShaders) { - programInfo.AttachedShadersID.push_back(shaderId); - } - - MG_Global::unordered_map shaderSources; - MG_Global::unordered_map finalShaderSources; - for (GLuint shaderId : programObj.attachedShaders) { - auto it = MG_State_T::programState->shaders_.find(shaderId); - if (it != MG_State_T::programState->shaders_.end() && !it->second.markedForDeletion) { - shaderSources[it->first] = it->second.source; -// MG_Util::Program::RenameGLSLBuiltinsForVulkan(shaderSources[it->first]); - } - } - - MG_Util::Program::GenerateDefaultUBOForGLSL_Multi(shaderSources, programInfo.uniformBufferNames); - MG_Util::Debug::LogD("LinkProgram: uniformBufferNames for %u:", program); - for (auto& name: programInfo.uniformBufferNames) { - MG_Util::Debug::LogD(" %s", name.c_str()); - } - - for (GLuint shaderId : programObj.attachedShaders) { - auto it = MG_State_T::programState->shaders_.find(shaderId); - if (it != MG_State_T::programState->shaders_.end() && !it->second.markedForDeletion) { - std::string shaderSource; - if (it->second.type == GL_VERTEX_SHADER) { - std::string infoLog; - - const char* fragmentShaderSource = nullptr; - for (GLuint otherShaderId : programObj.attachedShaders) { - if (otherShaderId != shaderId && MG_State_T::programState->shaders_[otherShaderId].type == GL_FRAGMENT_SHADER) { - fragmentShaderSource = shaderSources[otherShaderId].c_str(); - break; - } - } - auto spirv = MG_Util::Program::CompileGLSLToSPIRV(it->second.type, - shaderSources[shaderId], - infoLog, true, GL_FRAGMENT_SHADER, fragmentShaderSource); - if (spirv.empty()) { - MG_Util::Debug::LogE("Failed to compile vertex shader %u: %s", shaderId, - infoLog.c_str()); - continue; - } - - shaderSource = MG_Util::Program::BindInputLayoutLocationsForGLSL(spirv, - programObj.attribLocations); - } else if (it->second.type == GL_FRAGMENT_SHADER) { - std::string infoLog; - - const char* vertexShaderSource = nullptr; - for (GLuint otherShaderId : programObj.attachedShaders) { - if (otherShaderId != shaderId && MG_State_T::programState->shaders_[otherShaderId].type == GL_VERTEX_SHADER) { - vertexShaderSource = shaderSources[otherShaderId].c_str(); - break; - } - } - - auto spirv = MG_Util::Program::CompileGLSLToSPIRV(it->second.type, - shaderSources[shaderId], - infoLog, true, - GL_VERTEX_SHADER, vertexShaderSource); - if (spirv.empty()) { - MG_Util::Debug::LogE("Failed to compile fragment shader %u to SPIRV: %s", shaderId, - infoLog.c_str()); - continue; - } - - shaderSource = MG_Util::Program::CompileSPIRVToGLSL(spirv, 450, false, true); - } else { - shaderSource = it->second.source; - } - finalShaderSources[it->first] = shaderSource; - } - } - - - MG_Util::Debug::LogD("Shader sources after UBO generation for program %u:", program); - for (const auto& [shaderId, source] : finalShaderSources) { - MG_Util::Debug::LogD(" Program %u Shader %u:\n%s", program, shaderId, source.c_str()); - } - - size_t uboTotalSize = RecordUniformOffsets(programInfo, finalShaderSources); - CreateDefaultUBO(programInfo, uboTotalSize); - - // Compile attached shaders - for (GLuint shaderId : programInfo.AttachedShadersID) { - auto& shaderObj = MG_State_T::programState->shaders_[shaderId]; - // Compile only if not already compiled in Diligent - if (MG_Diligent::g_ShaderMap.find(shaderId) == MG_Diligent::g_ShaderMap.end() || MG_Diligent::g_ShaderMap[shaderId] == nullptr) { - GLenum shaderType = shaderObj.type; - std::string sourceStr = finalShaderSources[shaderId]; - MG_Util::Program::RenameGLSLBuiltinsForVulkan(sourceStr); - MG_Util::Debug::LogD("Shader ID: %u, type: %s\nConverted source:\n%s", - shaderId, MG_Util::Debug::GLEnumToString(shaderType), sourceStr.c_str()); - - Diligent::ShaderCreateInfo ShaderCI; - ShaderCI.Source = sourceStr.c_str(); - ShaderCI.EntryPoint = "main"; - - switch (shaderType) { - case GL_VERTEX_SHADER: ShaderCI.Desc.ShaderType = Diligent::SHADER_TYPE_VERTEX; break; - case GL_FRAGMENT_SHADER: ShaderCI.Desc.ShaderType = Diligent::SHADER_TYPE_PIXEL; break; - case GL_GEOMETRY_SHADER: ShaderCI.Desc.ShaderType = Diligent::SHADER_TYPE_GEOMETRY; break; - case GL_TESS_CONTROL_SHADER: ShaderCI.Desc.ShaderType = Diligent::SHADER_TYPE_HULL; break; - case GL_TESS_EVALUATION_SHADER: ShaderCI.Desc.ShaderType = Diligent::SHADER_TYPE_DOMAIN; break; - case GL_COMPUTE_SHADER: ShaderCI.Desc.ShaderType = Diligent::SHADER_TYPE_COMPUTE; break; - default: MG_Util::Debug::LogW("Unsupported shader type for compilation: %u", shaderType); continue; - } - - ShaderCI.Desc.Name = ("Shader_" + std::to_string(shaderId)).c_str(); - ShaderCI.SourceLanguage = Diligent::SHADER_SOURCE_LANGUAGE_GLSL_VERBATIM; - - Diligent::IShader* pShader = nullptr; - Diligent::RefCntAutoPtr pMsg; - MG_Diligent::g_pDevice->CreateShader(ShaderCI, &pShader, &pMsg); - - if (pShader) { - MG_Diligent::g_ShaderMap[shaderId] = pShader; - programInfo.AttachedShaders.push_back(pShader); - shaderObj.compiled = UncertainBool::True; - shaderObj.compileStatus = GL_TRUE; - MG_Util::Debug::LogD("Successfully compiled shader ID: %u for program %u", shaderId, program); - } else { - shaderObj.compiled = UncertainBool::False; - shaderObj.compileStatus = GL_FALSE; - MG_Util::Debug::LogE("Failed to compile shader ID: %u for program %u. \ncompiler info:\n%s", shaderId, program, pMsg->GetConstDataPtr()); - } - } else { - // Shader already compiled, just add to programInfo - programInfo.AttachedShaders.push_back(MG_Diligent::g_ShaderMap[shaderId]); - } - } - - programInfo.inputLayout.clear(); - - auto* pVAO = MG_State_T::vertexArrayState->GetCurrentVAO(); - if (!pVAO) return; - -// for (const auto& [index, attrib] : pVAO->attribs) { - for (uint32_t index = 0; index < MG_Constants::VertexArray::MAX_VERTEX_ATTRIBS; ++index) { - const auto& attrib = pVAO->attribs[index]; - if (attrib.enabled) { - Diligent::LayoutElement elem; - elem.InputIndex = index; - elem.BufferSlot = 0; - elem.NumComponents = attrib.size; - elem.ValueType = ConvertGLTypeToDiligent(attrib.type); - elem.IsNormalized = attrib.normalized; - elem.RelativeOffset = static_cast(reinterpret_cast(attrib.pointer)); - - programInfo.inputLayout.push_back(elem); - } - } - - programInfo.psoDirty = true; - programInfo.psoStateHash = 0; - programInfo.uniformStages.clear(); - programInfo.programObj = MG_State_T::programState->programs_[program]; - - if (programInfo.pResourceBinding) { - programInfo.pResourceBinding->Release(); - programInfo.pResourceBinding = nullptr; - } - - programObj.linked = true; - programObj.linkStatus = GL_TRUE; - } - - void UseProgram(GLuint program) { - MG_Util::Debug::LogD("glUseProgram, program: %u", program); - GLenum result = MG_State::ActivateRenderProgram(program); - if (result == GL_NO_ERROR) { - return; - } - MG_State::SetError(result); - MG_Util::Debug::LogE("Error using program: %s", MG_Util::Debug::GLEnumToString(result)); - } - - void BindAttribLocation(GLuint program, GLuint index, const GLchar* name) { - MG_Util::Debug::LogD("glBindAttribLocation, program: %u, index: %u, name: %s", program, index, name); - GLenum result = MG_State::DefineProgramAttributeLocation(program, index, name); - if (result == GL_NO_ERROR) return; - MG_State::SetError(result); - MG_Util::Debug::LogE("Error binding attribute: %s", MG_Util::Debug::GLEnumToString(result)); - } - - GLint GetAttribLocation(GLuint program, const GLchar* name) { - MG_Util::Debug::LogD("glGetAttribLocation, program: %u, name: %s", program, name); - GLint location = MG_State::QueryProgramAttributeLocation(program, name); - if (location != -1) return location; - MG_State::SetError(GL_INVALID_OPERATION); - MG_Util::Debug::LogE("Attribute not found: %s", name); - return -1; - } - - GLint GetUniformLocation(GLuint program, const GLchar* name) { - MG_Util::Debug::LogD("glGetUniformLocation, program: %u, name: %s", program, name); - GLint location = MG_State::QueryProgramUniformLocation(program, name); - if (location != -1) return location; - MG_State::SetError(GL_INVALID_OPERATION); - MG_Util::Debug::LogE("Uniform not found: %s", name); - return -1; - } - - void GetProgramiv(GLuint program, GLenum pname, GLint* params) { - MG_Util::Debug::LogD("glGetProgramiv, program: %u, pname: %s", - program, MG_Util::Debug::GLEnumToString(pname)); - GLenum result = MG_State::QueryProgramStateIntVector(program, pname, params); - if (result == GL_NO_ERROR) return; - MG_State::SetError(result); - MG_Util::Debug::LogW("Error getting program param: %s", MG_Util::Debug::GLEnumToString(result)); - } - - void GetShaderiv(GLuint shader, GLenum pname, GLint* params) { - MG_Util::Debug::LogD("glGetShaderiv, shader: %u, pname: %s", - shader, MG_Util::Debug::GLEnumToString(pname)); - GLenum result = MG_State::QueryShaderStateIntVector(shader, pname, params); - if (result == GL_NO_ERROR) return; - MG_State::SetError(result); - MG_Util::Debug::LogE("Error getting shader param: %s", MG_Util::Debug::GLEnumToString(result)); - } - - void Uniform1f(GLint location, GLfloat v0) { - MG_Util::Debug::LogD("glUniform1f, location: %d, v0: %f", location, v0); - MG_State::UpdateProgramUniformFloat1(location, v0); - } - - void Uniform2f(GLint location, GLfloat v0, GLfloat v1) { - MG_Util::Debug::LogD("glUniform2f, location: %d, v0: %f, v1: %f", location, v0, v1); - MG_State::UpdateProgramUniformFloat2(location, v0, v1); - } - - void Uniform3f(GLint location, GLfloat v0, GLfloat v1, GLfloat v2) { - MG_Util::Debug::LogD("glUniform3f, location: %d, v0: %f, v1: %f, v2: %f", location, v0, v1, v2); - MG_State::UpdateProgramUniformFloat3(location, v0, v1, v2); - } - - void Uniform4f(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3) { - MG_Util::Debug::LogD("glUniform4f, location: %d, v0: %f, v1: %f, v2: %f, v3: %f", location, v0, v1, v2, v3); - MG_State::UpdateProgramUniformFloat4(location, v0, v1, v2, v3); - } - - void Uniform1fv(GLint location, GLsizei count, const GLfloat* value) { - MG_Util::Debug::LogD("glUniform1fv, location: %d, count: %d", location, count); - MG_State::UpdateProgramUniformFloatVector1(location, count, value); - } - - void Uniform2fv(GLint location, GLsizei count, const GLfloat* value) { - MG_Util::Debug::LogD("glUniform2fv, location: %d, count: %d", location, count); - MG_State::UpdateProgramUniformFloatVector2(location, count, value); - } - - void Uniform3fv(GLint location, GLsizei count, const GLfloat* value) { - MG_Util::Debug::LogD("glUniform3fv, location: %d, count: %d", location, count); - MG_State::UpdateProgramUniformFloatVector3(location, count, value); - } - - void Uniform4fv(GLint location, GLsizei count, const GLfloat* value) { - MG_Util::Debug::LogD("glUniform4fv, location: %d, count: %d", location, count); - MG_State::UpdateProgramUniformFloatVector4(location, count, value); - } - - void Uniform1i(GLint location, GLint v0) { - MG_Util::Debug::LogD("glUniform1i, location: %d, v0: %d", location, v0); - MG_State::UpdateProgramUniformInt1(location, v0); - } - - void Uniform2i(GLint location, GLint v0, GLint v1) { - MG_Util::Debug::LogD("glUniform2i, location: %d, v0: %d, v1: %d", location, v0, v1); - MG_State::UpdateProgramUniformInt2(location, v0, v1); - } - - void Uniform3i(GLint location, GLint v0, GLint v1, GLint v2) { - MG_Util::Debug::LogD("glUniform3i, location: %d, v0: %d, v1: %d, v2: %d", location, v0, v1, v2); - MG_State::UpdateProgramUniformInt3(location, v0, v1, v2); - } - - void Uniform4i(GLint location, GLint v0, GLint v1, GLint v2, GLint v3) { - MG_Util::Debug::LogD("glUniform4i, location: %d, v0: %d, v1: %d, v2: %d, v3: %d", location, v0, v1, v2, v3); - MG_State::UpdateProgramUniformInt4(location, v0, v1, v2, v3); - } - - void Uniform1iv(GLint location, GLsizei count, const GLint* value) { - MG_Util::Debug::LogD("glUniform1iv, location: %d, count: %d", location, count); - MG_State::UpdateProgramUniformIntVector1(location, count, value); - } - - void Uniform2iv(GLint location, GLsizei count, const GLint* value) { - MG_Util::Debug::LogD("glUniform2iv, location: %d, count: %d", location, count); - MG_State::UpdateProgramUniformIntVector2(location, count, value); - } - - void Uniform3iv(GLint location, GLsizei count, const GLint* value) { - MG_Util::Debug::LogD("glUniform3iv, location: %d, count: %d", location, count); - MG_State::UpdateProgramUniformIntVector3(location, count, value); - } - - void Uniform4iv(GLint location, GLsizei count, const GLint* value) { - MG_Util::Debug::LogD("glUniform4iv, location: %d, count: %d", location, count); - MG_State::UpdateProgramUniformIntVector4(location, count, value); - } - - void Uniform1ui(GLint location, GLuint v0) { - MG_Util::Debug::LogD("glUniform1ui, location: %d, v0: %u", location, v0); - MG_State::UpdateProgramUniformUInt1(location, v0); - } - - void Uniform2ui(GLint location, GLuint v0, GLuint v1) { - MG_Util::Debug::LogD("glUniform2ui, location: %d, v0: %u, v1: %u", location, v0, v1); - MG_State::UpdateProgramUniformUInt2(location, v0, v1); - } - - void Uniform3ui(GLint location, GLuint v0, GLuint v1, GLuint v2) { - MG_Util::Debug::LogD("glUniform3ui, location: %d, v0: %u, v1: %u, v2: %u", location, v0, v1, v2); - MG_State::UpdateProgramUniformUInt3(location, v0, v1, v2); - } - - void Uniform4ui(GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3) { - MG_Util::Debug::LogD("glUniform4ui, location: %d, v0: %u, v1: %u, v2: %u, v3: %u", location, v0, v1, v2, v3); - MG_State::UpdateProgramUniformUInt4(location, v0, v1, v2, v3); - } - - void Uniform1uiv(GLint location, GLsizei count, const GLuint* value) { - MG_Util::Debug::LogD("glUniform1uiv, location: %d, count: %d", location, count); - MG_State::UpdateProgramUniformUIntVector1(location, count, value); - } - - void Uniform2uiv(GLint location, GLsizei count, const GLuint* value) { - MG_Util::Debug::LogD("glUniform2uiv, location: %d, count: %d", location, count); - MG_State::UpdateProgramUniformUIntVector2(location, count, value); - } - - void Uniform3uiv(GLint location, GLsizei count, const GLuint* value) { - MG_Util::Debug::LogD("glUniform3uiv, location: %d, count: %d", location, count); - MG_State::UpdateProgramUniformUIntVector3(location, count, value); - } - - void Uniform4uiv(GLint location, GLsizei count, const GLuint* value) { - MG_Util::Debug::LogD("glUniform4uiv, location: %d, count: %d", location, count); - MG_State::UpdateProgramUniformUIntVector4(location, count, value); - } - - void UniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) { - MG_Util::Debug::LogD("glUniformMatrix2fv, location: %d, count: %d, transpose: %d", location, count, transpose); - MG_State::UpdateProgramUniformMatrix2x2Vector(location, count, transpose, value); - } - - void UniformMatrix3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) { - MG_Util::Debug::LogD("glUniformMatrix3fv, location: %d, count: %d, transpose: %d", location, count, transpose); - MG_State::UpdateProgramUniformMatrix3x3Vector(location, count, transpose, value); - } - - void UniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) { - MG_Util::Debug::LogD("glUniformMatrix4fv, location: %d, count: %d, transpose: %d", location, count, transpose); - MG_State::UpdateProgramUniformMatrix4x4Vector(location, count, transpose, value); - } - - void UniformMatrix2x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) { - MG_Util::Debug::LogD("glUniformMatrix2x3fv, location: %d, count: %d, transpose: %d", location, count, transpose); - MG_State::UpdateProgramUniformMatrix2x3Vector(location, count, transpose, value); - } - - void UniformMatrix2x4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) { - MG_Util::Debug::LogD("glUniformMatrix2x4fv, location: %d, count: %d, transpose: %d", location, count, transpose); - MG_State::UpdateProgramUniformMatrix2x4Vector(location, count, transpose, value); - } - - void UniformMatrix3x2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) { - MG_Util::Debug::LogD("glUniformMatrix3x2fv, location: %d, count: %d, transpose: %d", location, count, transpose); - MG_State::UpdateProgramUniformMatrix3x2Vector(location, count, transpose, value); - } - - void UniformMatrix3x4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) { - MG_Util::Debug::LogD("glUniformMatrix3x4fv, location: %d, count: %d, transpose: %d", location, count, transpose); - MG_State::UpdateProgramUniformMatrix3x4Vector(location, count, transpose, value); - } - - void UniformMatrix4x2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) { - MG_Util::Debug::LogD("glUniformMatrix4x2fv, location: %d, count: %d, transpose: %d", location, count, transpose); - MG_State::UpdateProgramUniformMatrix4x2Vector(location, count, transpose, value); - } - - void UniformMatrix4x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) { - MG_Util::Debug::LogD("glUniformMatrix4x3fv, location: %d, count: %d, transpose: %d", location, count, transpose); - MG_State::UpdateProgramUniformMatrix4x3Vector(location, count, transpose, value); - } -} \ No newline at end of file diff --git a/MG/MG_GL/Implementations/GL/Program/GL_Program.h b/MG/MG_GL/Implementations/GL/Program/GL_Program.h deleted file mode 100644 index ba942f87..00000000 --- a/MG/MG_GL/Implementations/GL/Program/GL_Program.h +++ /dev/null @@ -1,60 +0,0 @@ -// -// Created by BZLZHH on 2025/3/15. -// - -#ifndef MOBILEGL_GL_PROGRAM_H -#define MOBILEGL_GL_PROGRAM_H - -namespace MG_GL::GL { - Diligent::VALUE_TYPE ConvertGLTypeToDiligent(GLenum type); - - GLuint CreateShader(GLenum type); - GLuint CreateProgram(); - void DeleteShader(GLuint shader); - void DeleteProgram(GLuint program); - void AttachShader(GLuint program, GLuint shader); - void ShaderSource(GLuint shader, GLsizei count, const GLchar *const*string, const GLint* length); - void CompileShader(GLuint shader); - void LinkProgram(GLuint program); - void UseProgram(GLuint program); - void BindAttribLocation(GLuint program, GLuint index, const GLchar* name); - GLint GetAttribLocation(GLuint program, const GLchar* name); - GLint GetUniformLocation(GLuint program, const GLchar* name); - void GetProgramiv(GLuint program, GLenum pname, GLint* params); - void GetShaderiv(GLuint shader, GLenum pname, GLint* params); - void Uniform1f(GLint location, GLfloat v0); - void Uniform2f(GLint location, GLfloat v0, GLfloat v1); - void Uniform3f(GLint location, GLfloat v0, GLfloat v1, GLfloat v2); - void Uniform4f(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); - void Uniform1fv(GLint location, GLsizei count, const GLfloat* value); - void Uniform2fv(GLint location, GLsizei count, const GLfloat* value); - void Uniform3fv(GLint location, GLsizei count, const GLfloat* value); - void Uniform4fv(GLint location, GLsizei count, const GLfloat* value); - void Uniform1i(GLint location, GLint v0); - void Uniform2i(GLint location, GLint v0, GLint v1); - void Uniform3i(GLint location, GLint v0, GLint v1, GLint v2); - void Uniform4i(GLint location, GLint v0, GLint v1, GLint v2, GLint v3); - void Uniform1iv(GLint location, GLsizei count, const GLint* value); - void Uniform2iv(GLint location, GLsizei count, const GLint* value); - void Uniform3iv(GLint location, GLsizei count, const GLint* value); - void Uniform4iv(GLint location, GLsizei count, const GLint* value); - void Uniform1ui(GLint location, GLuint v0); - void Uniform2ui(GLint location, GLuint v0, GLuint v1); - void Uniform3ui(GLint location, GLuint v0, GLuint v1, GLuint v2); - void Uniform4ui(GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); - void Uniform1uiv(GLint location, GLsizei count, const GLuint* value); - void Uniform2uiv(GLint location, GLsizei count, const GLuint* value); - void Uniform3uiv(GLint location, GLsizei count, const GLuint* value); - void Uniform4uiv(GLint location, GLsizei count, const GLuint* value); - void UniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value); - void UniformMatrix3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value); - void UniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value); - void UniformMatrix2x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value); - void UniformMatrix2x4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value); - void UniformMatrix3x2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value); - void UniformMatrix3x4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value); - void UniformMatrix4x2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value); - void UniformMatrix4x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value); -} - -#endif //MOBILEGL_GL_PROGRAM_H diff --git a/MG/MG_GL/Implementations/GL/Texture/GL_Texture.cpp b/MG/MG_GL/Implementations/GL/Texture/GL_Texture.cpp deleted file mode 100644 index d2348aac..00000000 --- a/MG/MG_GL/Implementations/GL/Texture/GL_Texture.cpp +++ /dev/null @@ -1,698 +0,0 @@ -// -// Created by BZLZHH on 2025/3/15. -// - -#include "../../../../Includes.h" - -namespace MG_GL::GL { - - Diligent::TEXTURE_FORMAT ConvertInternalFormat(GLint internalFormat) { - switch (internalFormat) { - case GL_RGBA: return Diligent::TEX_FORMAT_RGBA8_UNORM; - case GL_RGBA8: return Diligent::TEX_FORMAT_RGBA8_UNORM; - case GL_RGBA8_SNORM: return Diligent::TEX_FORMAT_RGBA8_SNORM; - case GL_RGBA16F: return Diligent::TEX_FORMAT_RGBA16_FLOAT; - case GL_RGBA32F: return Diligent::TEX_FORMAT_RGBA32_FLOAT; - - case GL_RGB: return Diligent::TEX_FORMAT_RGBA8_UNORM; - case GL_RGB8: return Diligent::TEX_FORMAT_RGBA8_UNORM; // Diligent doesn't have RGB8, promote to RGBA8 - case GL_RGB16F: return Diligent::TEX_FORMAT_RGBA16_FLOAT; // Promote - case GL_RGB32F: return Diligent::TEX_FORMAT_RGBA32_FLOAT; // Promote - - case GL_DEPTH_COMPONENT: return Diligent::TEX_FORMAT_D32_FLOAT; - case GL_DEPTH_COMPONENT16: return Diligent::TEX_FORMAT_D16_UNORM; - case GL_DEPTH_COMPONENT24: return Diligent::TEX_FORMAT_D24_UNORM_S8_UINT; // No D24_UNORM, use with stencil - case GL_DEPTH_COMPONENT32: return Diligent::TEX_FORMAT_D32_FLOAT; - case GL_DEPTH_COMPONENT32F: return Diligent::TEX_FORMAT_D32_FLOAT; - - case GL_DEPTH_STENCIL: return Diligent::TEX_FORMAT_D24_UNORM_S8_UINT; - case GL_DEPTH24_STENCIL8: return Diligent::TEX_FORMAT_D24_UNORM_S8_UINT; - case GL_DEPTH32F_STENCIL8: return Diligent::TEX_FORMAT_D32_FLOAT_S8X24_UINT; - - case GL_RED: return Diligent::TEX_FORMAT_R8_UNORM; - case GL_R8: return Diligent::TEX_FORMAT_R8_UNORM; - case GL_R16F: return Diligent::TEX_FORMAT_R16_FLOAT; - case GL_R32F: return Diligent::TEX_FORMAT_R32_FLOAT; - - case GL_RG: return Diligent::TEX_FORMAT_RG8_UNORM; - case GL_RG8: return Diligent::TEX_FORMAT_RG8_UNORM; - case GL_RG16F: return Diligent::TEX_FORMAT_RG16_FLOAT; - case GL_RG32F: return Diligent::TEX_FORMAT_RG32_FLOAT; - - default: return Diligent::TEX_FORMAT_RGBA8_UNORM; - } - } - - size_t GetBytesPerPixel(GLenum format, GLenum type) { - int components = 0; - switch (format) { - case GL_RED: components = 1; break; - case GL_RG: components = 2; break; - case GL_RGB: components = 3; break; - case GL_RGBA: components = 4; break; - case GL_DEPTH_COMPONENT: components = 1; break; - case GL_DEPTH_STENCIL: components = 2; break; - default: components = 4; break; - } - - size_t typeSize = 0; - switch (type) { - case GL_UNSIGNED_BYTE: - case GL_BYTE: typeSize = 1; break; - case GL_UNSIGNED_SHORT: - case GL_SHORT: typeSize = 2; break; - case GL_UNSIGNED_INT: - case GL_INT: - case GL_FLOAT: typeSize = 4; break; - default: typeSize = 1; break; - } - - return components * typeSize; - } - - Diligent::FILTER_TYPE ConvertCompareFilter(Diligent::FILTER_TYPE& filter, bool compare) { - if (compare) { - switch (filter) { - case Diligent::FILTER_TYPE_POINT: return Diligent::FILTER_TYPE_COMPARISON_POINT; - case Diligent::FILTER_TYPE_LINEAR: return Diligent::FILTER_TYPE_COMPARISON_LINEAR; - case Diligent::FILTER_TYPE_ANISOTROPIC: return Diligent::FILTER_TYPE_COMPARISON_ANISOTROPIC; - default: return filter; - } - } else { - switch (filter) { - case Diligent::FILTER_TYPE_COMPARISON_POINT: return Diligent::FILTER_TYPE_POINT; - case Diligent::FILTER_TYPE_COMPARISON_LINEAR: return Diligent::FILTER_TYPE_LINEAR; - case Diligent::FILTER_TYPE_COMPARISON_ANISOTROPIC: return Diligent::FILTER_TYPE_ANISOTROPIC; - default: return filter; - } - } - } - - bool IsCompareFilter(Diligent::FILTER_TYPE filter) { - switch (filter) { - case Diligent::FILTER_TYPE_COMPARISON_POINT: return true; - case Diligent::FILTER_TYPE_COMPARISON_LINEAR: return true; - case Diligent::FILTER_TYPE_COMPARISON_ANISOTROPIC: return true; - default: return false; - } - } - - void FillFilterTypeFromGLEnum(GLenum pname, GLenum param, Diligent::FILTER_TYPE& minFilter, Diligent::FILTER_TYPE& magFilter, Diligent::FILTER_TYPE& mipFilter) { - if (pname == GL_TEXTURE_COMPARE_MODE) { - bool compare = (param == GL_COMPARE_REF_TO_TEXTURE); - minFilter = ConvertCompareFilter(minFilter, compare); - magFilter = ConvertCompareFilter(magFilter, compare); - mipFilter = ConvertCompareFilter(mipFilter, compare); - return; - } - - Diligent::FILTER_TYPE* pFilter = nullptr; - if (pname == GL_TEXTURE_MIN_FILTER) { - pFilter = &minFilter; - } else if (pname == GL_TEXTURE_MAG_FILTER) { - pFilter = &magFilter; - } else { - MG_Util::Debug::LogD("FillFilterTypeFromGLEnum: not allowed pname!"); - return; - } - - Diligent::FILTER_TYPE& filter = *pFilter; - - bool filterIsCompare = IsCompareFilter(filter); - bool mipFilterIsCompare = IsCompareFilter(mipFilter); - - switch (param) { - case GL_NEAREST: - filter = Diligent::FILTER_TYPE_POINT; - if (pname == GL_TEXTURE_MIN_FILTER) - mipFilter = Diligent::FILTER_TYPE_POINT; - break; - case GL_LINEAR: - filter = Diligent::FILTER_TYPE_LINEAR; - if (pname == GL_TEXTURE_MIN_FILTER) - mipFilter = Diligent::FILTER_TYPE_POINT; - break; - case GL_NEAREST_MIPMAP_NEAREST: - filter = Diligent::FILTER_TYPE_POINT; - mipFilter = Diligent::FILTER_TYPE_POINT; - break; - case GL_LINEAR_MIPMAP_NEAREST: - filter = Diligent::FILTER_TYPE_LINEAR; - mipFilter = Diligent::FILTER_TYPE_POINT; - break; - case GL_NEAREST_MIPMAP_LINEAR: - filter = Diligent::FILTER_TYPE_POINT; - mipFilter = Diligent::FILTER_TYPE_LINEAR; - break; - case GL_LINEAR_MIPMAP_LINEAR: - filter = Diligent::FILTER_TYPE_LINEAR; - mipFilter = Diligent::FILTER_TYPE_LINEAR; - break; - default: - break; - } - - filter = ConvertCompareFilter(filter, filterIsCompare); - mipFilter = ConvertCompareFilter(mipFilter, mipFilterIsCompare); - } - - Diligent::COMPARISON_FUNCTION ConvertComparsionFunc(GLint param) { - switch (param) { - case GL_LEQUAL: return Diligent::COMPARISON_FUNC_LESS_EQUAL; - case GL_GEQUAL: return Diligent::COMPARISON_FUNC_GREATER_EQUAL; - case GL_LESS: return Diligent::COMPARISON_FUNC_LESS; - case GL_GREATER: return Diligent::COMPARISON_FUNC_GREATER; - case GL_EQUAL: return Diligent::COMPARISON_FUNC_EQUAL; - case GL_NOTEQUAL: return Diligent::COMPARISON_FUNC_NOT_EQUAL; - case GL_ALWAYS: return Diligent::COMPARISON_FUNC_ALWAYS; - case GL_NEVER: return Diligent::COMPARISON_FUNC_NEVER; - default: - MG_Util::Debug::LogE("%s: not handled param: %s", __func__, MG_Util::Debug::GLEnumToString(param)); - return Diligent::COMPARISON_FUNC_NEVER; - } - } - - Diligent::TEXTURE_ADDRESS_MODE ConvertAddressMode(GLint param) { - switch (param) { - case GL_REPEAT: return Diligent::TEXTURE_ADDRESS_WRAP; - case GL_CLAMP_TO_EDGE: return Diligent::TEXTURE_ADDRESS_CLAMP; - case GL_MIRRORED_REPEAT: return Diligent::TEXTURE_ADDRESS_MIRROR; - default: - MG_Util::Debug::LogE("%s: not handled param: %s", __func__, MG_Util::Debug::GLEnumToString(param)); - return Diligent::TEXTURE_ADDRESS_WRAP; - } - } - - void ActiveTexture(GLenum texture) { - MG_Util::Debug::LogD("glActiveTexture, texture: %d", texture); - GLenum result = MG_State::BindTextureUnit(texture); - if (result == GL_NO_ERROR) - return; - MG_State::SetError(result); - MG_Util::Debug::LogE("Error from MG State: %s", MG_Util::Debug::GLEnumToString(result)); - } - - void BindTexture(GLenum target, GLuint texture) { - MG_Util::Debug::LogD("glBindTexture, target: %d, texture: %d", target, texture); - GLenum result = MG_State::BindTexture(target, texture); - if (result == GL_NO_ERROR) { - return; - } - MG_State::SetError(result); - MG_Util::Debug::LogE("Error from MG State: %s", MG_Util::Debug::GLEnumToString(result)); - } - - void DeleteTextures(GLsizei n, const GLuint* textures) { - MG_Util::Debug::LogD("glDeleteTextures, n: %d, textures: %p", n, textures); - GLenum result = MG_State::DeleteTextures(n, textures); - if (result == GL_NO_ERROR) { - for (GLsizei i = 0; i < n; ++i) { - GLuint tex = textures[i]; - auto texIt = MG_Diligent::g_TextureMap.find(tex); - if (texIt != MG_Diligent::g_TextureMap.end()) { - if (texIt->second) { - texIt->second->Release(); - } - MG_Diligent::g_TextureMap.erase(texIt); - } - - auto srvIt = MG_Diligent::g_TextureViewMap.find(tex); - if (srvIt != MG_Diligent::g_TextureViewMap.end()) { - if (srvIt->second) { - srvIt->second->Release(); - } - MG_Diligent::g_TextureViewMap.erase(srvIt); - } - } - return; - } - MG_State::SetError(result); - MG_Util::Debug::LogE("Error from MG State: %s", MG_Util::Debug::GLEnumToString(result)); - } - - void GenTextures(GLsizei n, GLuint* textures) { - MG_Util::Debug::LogD("glGenTextures, n: %d, textures: %p", n, textures); - GLenum result = MG_State::CreateTextures(n, textures); - if (result == GL_NO_ERROR) { - for (GLsizei i = 0; i < n; ++i) { - MG_Diligent::g_TextureMap[textures[i]] = nullptr; - MG_Diligent::g_TextureViewMap[textures[i]] = nullptr; - } - return; - } - MG_State::SetError(result); - MG_Util::Debug::LogE("Error from MG State: %s", MG_Util::Debug::GLEnumToString(result)); - } - - Diligent::Uint32 CalculateMipLevels(GLsizei width, GLsizei height) { - Diligent::Uint32 levels = 1; - GLsizei size = std::max(width, height); - - while (size > 1) { - size >>= 1; - levels++; - } - - return levels; - } - - void TexImage2D(GLenum target, GLint level, GLint internalFormat, GLsizei width, GLsizei height, GLint border, - GLenum format, GLenum type, const void* data) { - MG_Util::Debug::LogD("glTexImage2D, target: %d, level: %d, internalFormat: %d, width: %d, height: %d, format: %d, type: %d, data: %p", - target, level, internalFormat, width, height, format, type, data); - - GLenum result = MG_State::UploadTexture2D(target, level, internalFormat, width, height, - border, format, type, data); - if (result != GL_NO_ERROR) { - MG_State::SetError(result); - MG_Util::Debug::LogE("Error from MG State: %s", MG_Util::Debug::GLEnumToString(result)); - return; - } - - MG_Util::Debug::LogD("TexImage2D: MG_State::UploadTexture2D successful."); - - auto& texState = *MG_State_T::textureState; - auto activeUnit = texState.activeTextureUnit_; - auto unitState = &texState.textureUnits_[activeUnit]; - GLuint boundTextureID = unitState->GetBoundTexture(target); - - if (boundTextureID == 0) { - MG_Util::Debug::LogD("TexImage2D: No texture bound to active unit. Returning."); - return; - } - - Diligent::ITexture* pTexture = nullptr; - Diligent::ITextureView* pSRV = nullptr; - - auto texIt = MG_Diligent::g_TextureMap.find(boundTextureID); - if (texIt != MG_Diligent::g_TextureMap.end()) { - pTexture = texIt->second; - } - auto srvIt = MG_Diligent::g_TextureViewMap.find(boundTextureID); - if (srvIt != MG_Diligent::g_TextureViewMap.end()) { - pSRV = srvIt->second; - } - - Diligent::TEXTURE_FORMAT newFormat = ConvertInternalFormat(internalFormat); - MG_Util::Debug::LogD("TexImage2D: New internalFormat: %d maps to Diligent format: %d", - internalFormat, newFormat); - - bool needCreateTexture = false; - bool isBaseLevel = (level == 0); - - if (!pTexture) { - MG_Util::Debug::LogD("TexImage2D: No existing Diligent texture found for GL name %u. Creating new.", boundTextureID); - needCreateTexture = true; - } else { - Diligent::TextureDesc existingDesc = pTexture->GetDesc(); - - if (isBaseLevel && - (existingDesc.Width != static_cast(width) || - existingDesc.Height != static_cast(height) || - existingDesc.Format != newFormat)) { - - MG_Util::Debug::LogD("TexImage2D: Base level properties changed. Recreating texture."); - MG_Util::Debug::LogD("TexImage2D: Old (W:%u, H:%u, F:%d), New (W:%d, H:%d, F:%d)", - existingDesc.Width, existingDesc.Height, existingDesc.Format, - width, height, newFormat); - - needCreateTexture = true; - } else if (level >= static_cast(existingDesc.MipLevels)) { - MG_Util::Debug::LogD("TexImage2D: Level %d exceeds current mip levels (%d). Recreating texture.", - level, existingDesc.MipLevels); - needCreateTexture = true; - } - } - - if (needCreateTexture) { - if (pSRV) { - MG_Util::Debug::LogD("TexImage2D: Releasing existing SRV %p", (void*)pSRV); - pSRV->Release(); - MG_Diligent::g_TextureViewMap[boundTextureID] = nullptr; - pSRV = nullptr; - } - - if (pTexture) { - MG_Util::Debug::LogD("TexImage2D: Releasing existing texture %p", (void*)pTexture); - pTexture->Release(); - MG_Diligent::g_TextureMap[boundTextureID] = nullptr; - pTexture = nullptr; - } - - Diligent::Uint32 mipLevels = 1; - if (isBaseLevel) { - mipLevels = CalculateMipLevels(width, height); - } else if (pTexture) { - mipLevels = pTexture->GetDesc().MipLevels; - } - - Diligent::TextureDesc TexDesc; - if constexpr (MG_Global::Common::LogLevel <= MG_Constants::Common::LOG_LEVEL_DEBUG) { - TexDesc.Name = std::format("GL Texture {}", boundTextureID).c_str(); - } - TexDesc.Type = Diligent::RESOURCE_DIM_TEX_2D; - TexDesc.Width = width; - TexDesc.Height = height; - TexDesc.Format = newFormat; - TexDesc.MipLevels = mipLevels; - - bool isDepthStencil = false; - switch (internalFormat) { - case GL_DEPTH_COMPONENT: - case GL_DEPTH_COMPONENT16: - case GL_DEPTH_COMPONENT24: - case GL_DEPTH_COMPONENT32: - case GL_DEPTH_COMPONENT32F: - case GL_DEPTH_STENCIL: - case GL_DEPTH24_STENCIL8: - case GL_DEPTH32F_STENCIL8: - isDepthStencil = true; - break; - default: - isDepthStencil = false; - } - - if (isDepthStencil) { - TexDesc.BindFlags = Diligent::BIND_SHADER_RESOURCE | Diligent::BIND_DEPTH_STENCIL; - } else { - TexDesc.BindFlags = Diligent::BIND_SHADER_RESOURCE | Diligent::BIND_RENDER_TARGET; - } - - MG_Util::Debug::LogD("TexImage2D: Creating new Diligent texture with Width: %d, Height: %d, Format: %d, MipLevels: %u", - width, height, newFormat, mipLevels); - - Diligent::ITexture* newTexture = nullptr; - MG_Diligent::g_pDevice->CreateTexture(TexDesc, nullptr, &newTexture); - - if (newTexture) { - MG_Util::Debug::LogD("TexImage2D: Created new Diligent texture %p for GL name %u.", - (void*)newTexture, boundTextureID); - - Diligent::TextureViewDesc SRVDesc; - SRVDesc.ViewType = Diligent::TEXTURE_VIEW_SHADER_RESOURCE; - SRVDesc.TextureDim = Diligent::RESOURCE_DIM_TEX_2D; - SRVDesc.MostDetailedMip = 0; - SRVDesc.NumMipLevels = TexDesc.MipLevels; - - Diligent::ITextureView* newSRV = nullptr; - newTexture->CreateView(SRVDesc, &newSRV); - MG_Util::Debug::LogD("TexImage2D: Created new SRV %p for texture.", (void*)newSRV); - - MG_Diligent::g_TextureMap[boundTextureID] = newTexture; - MG_Diligent::g_TextureViewMap[boundTextureID] = newSRV; - - pTexture = newTexture; - pSRV = newSRV; - } else { - MG_Util::Debug::LogE("TexImage2D: Failed to create new texture!"); - return; - } - } - - if (pTexture && data) { - Diligent::TextureSubResData SubResData; - SubResData.pData = data; - SubResData.Stride = width * GetBytesPerPixel(format, type); - - Diligent::Box UpdateBox; - UpdateBox.MinX = 0; - UpdateBox.MaxX = width; - UpdateBox.MinY = 0; - UpdateBox.MaxY = height; - UpdateBox.MinZ = 0; - UpdateBox.MaxZ = 1; - - MG_Util::Debug::LogD("TexImage2D: Updating texture. Level: %d, Box: [%u,%u]x[%u,%u], Stride: %llu", - level, UpdateBox.MinX, UpdateBox.MaxX, UpdateBox.MinY, UpdateBox.MaxY, SubResData.Stride); - - MG_Diligent::g_pContext->UpdateTexture( - pTexture, - level, - 0, - UpdateBox, - SubResData, - Diligent::RESOURCE_STATE_TRANSITION_MODE_TRANSITION, - Diligent::RESOURCE_STATE_TRANSITION_MODE_TRANSITION - ); - MG_Util::Debug::LogD("TexImage2D: UpdateTexture completed for level %d.", level); - } - } - - void TexParameterf(GLenum target, GLenum pname, GLfloat param) { - MG_Util::Debug::LogD("glTexParameterf, target: %d, pname: %d, param: %f", target, pname, param); - GLenum result = MG_State::SetTexturePropertyFloat(target, pname, param); - if (result == GL_NO_ERROR) { - MG_State::SetError(result); - MG_Util::Debug::LogE("Error from MG State: %s", MG_Util::Debug::GLEnumToString(result)); - return; - } - - // TODO: Fix sampler - auto& texState = *MG_State_T::textureState; - auto activeUnit = texState.activeTextureUnit_; - auto unitState = &texState.textureUnits_[activeUnit]; - GLuint boundTextureID = unitState->GetBoundTexture(target); - - if (boundTextureID == 0) { - MG_Util::Debug::LogD("TexParameterf: No texture bound. Skipping sampler update."); - return; - } - - Diligent::SamplerDesc SamDesc; - auto it = MG_Diligent::g_SamplerMap.find(boundTextureID); - if (it != MG_Diligent::g_SamplerMap.end() && it->second) { - SamDesc = it->second->GetDesc(); - } else { - SamDesc.MinFilter = Diligent::FILTER_TYPE_LINEAR; - SamDesc.MagFilter = Diligent::FILTER_TYPE_LINEAR; - SamDesc.AddressU = Diligent::TEXTURE_ADDRESS_WRAP; - SamDesc.AddressV = Diligent::TEXTURE_ADDRESS_WRAP; - SamDesc.AddressW = Diligent::TEXTURE_ADDRESS_WRAP; - } - - switch (pname) { - case GL_TEXTURE_MIN_FILTER: - FillFilterTypeFromGLEnum(pname, param, SamDesc.MinFilter, SamDesc.MagFilter, SamDesc.MipFilter); - break; - case GL_TEXTURE_MAG_FILTER: - FillFilterTypeFromGLEnum(pname, param, SamDesc.MinFilter, SamDesc.MagFilter, SamDesc.MipFilter); - break; - case GL_TEXTURE_WRAP_S: - SamDesc.AddressU = ConvertAddressMode(param); - break; - case GL_TEXTURE_WRAP_T: - SamDesc.AddressV = ConvertAddressMode(param); - break; - case GL_TEXTURE_WRAP_R: - SamDesc.AddressW = ConvertAddressMode(param); - break; - case GL_TEXTURE_MIN_LOD: - SamDesc.MinLOD = (float)param; - break; - case GL_TEXTURE_MAX_LOD: - SamDesc.MaxLOD = param; - break; - case GL_TEXTURE_COMPARE_FUNC: - SamDesc.ComparisonFunc = ConvertComparsionFunc(param); - break; - case GL_TEXTURE_COMPARE_MODE: - FillFilterTypeFromGLEnum(pname, param, SamDesc.MinFilter, SamDesc.MagFilter, SamDesc.MipFilter); - break; - default: - MG_Util::Debug::LogE("%s: not handled pname: %s", __func__, MG_Util::Debug::GLEnumToString(pname)); - } - - Diligent::ISampler* pNewSampler = nullptr; - MG_Diligent::g_pDevice->CreateSampler(SamDesc, &pNewSampler); - - if (it != MG_Diligent::g_SamplerMap.end()) { - if (it->second) { - it->second->Release(); - } - it->second = pNewSampler; - } else { - MG_Diligent::g_SamplerMap[boundTextureID] = pNewSampler; - } - - MG_Util::Debug::LogD("TexParameterf: Updated sampler for texture %u", boundTextureID); - } - - void TexParameteri(GLenum target, GLenum pname, GLint param) { - MG_Util::Debug::LogD("glTexParameteri, target: %d, pname: %d, param: %d", target, pname, param); - GLenum result = MG_State::SetTexturePropertyInt(target, pname, param); - if (result != GL_NO_ERROR) { - MG_State::SetError(result); - MG_Util::Debug::LogE("Error from MG State: %s", MG_Util::Debug::GLEnumToString(result)); - return; - } - - // TODO: Fix sampler - auto& texState = *MG_State_T::textureState; - auto activeUnit = texState.activeTextureUnit_; - auto unitState = &texState.textureUnits_[activeUnit]; - GLuint boundTextureID = unitState->GetBoundTexture(target); - - if (boundTextureID == 0) { - MG_Util::Debug::LogD("TexParameteri: No texture bound. Skipping sampler update."); - return; - } - - Diligent::SamplerDesc SamDesc; - auto it = MG_Diligent::g_SamplerMap.find(boundTextureID); - if (it != MG_Diligent::g_SamplerMap.end() && it->second) { - SamDesc = it->second->GetDesc(); - } else { - SamDesc.MinFilter = Diligent::FILTER_TYPE_LINEAR; - SamDesc.MagFilter = Diligent::FILTER_TYPE_LINEAR; - SamDesc.AddressU = Diligent::TEXTURE_ADDRESS_WRAP; - SamDesc.AddressV = Diligent::TEXTURE_ADDRESS_WRAP; - SamDesc.AddressW = Diligent::TEXTURE_ADDRESS_WRAP; - } - - switch (pname) { - case GL_TEXTURE_MIN_FILTER: - FillFilterTypeFromGLEnum(pname, param, SamDesc.MinFilter, SamDesc.MagFilter, SamDesc.MipFilter); - break; - case GL_TEXTURE_MAG_FILTER: - FillFilterTypeFromGLEnum(pname, param, SamDesc.MagFilter, SamDesc.MagFilter, SamDesc.MipFilter); - break; - case GL_TEXTURE_WRAP_S: - SamDesc.AddressU = ConvertAddressMode(param); - break; - case GL_TEXTURE_WRAP_T: - SamDesc.AddressV = ConvertAddressMode(param); - break; - case GL_TEXTURE_WRAP_R: - SamDesc.AddressW = ConvertAddressMode(param); - break; - case GL_TEXTURE_MIN_LOD: - SamDesc.MinLOD = (float)param; - break; - case GL_TEXTURE_MAX_LOD: - SamDesc.MaxLOD = (float)param; - break; - case GL_TEXTURE_COMPARE_FUNC: - SamDesc.ComparisonFunc = ConvertComparsionFunc(param); - break; - case GL_TEXTURE_COMPARE_MODE: - FillFilterTypeFromGLEnum(pname, param, SamDesc.MinFilter, SamDesc.MagFilter, SamDesc.MipFilter); - break; - default: - MG_Util::Debug::LogE("%s: not handled pname: %s", __func__, MG_Util::Debug::GLEnumToString(pname)); - } - - Diligent::ISampler* pNewSampler = nullptr; - MG_Diligent::g_pDevice->CreateSampler(SamDesc, &pNewSampler); - - if (it != MG_Diligent::g_SamplerMap.end()) { - if (it->second) { - it->second->Release(); - } - it->second = pNewSampler; - } else { - MG_Diligent::g_SamplerMap[boundTextureID] = pNewSampler; - } - - MG_Util::Debug::LogD("TexParameteri: Updated sampler for texture %u", boundTextureID); - } - - void TexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, - GLsizei height, GLenum format, GLenum type, const void* pixels) { - MG_Util::Debug::LogD("glTexSubImage2D, target: %d, level: %d, xoffset: %d, yoffset: %d, width: %d, height: %d, format: %d, type: %d, pixels: %p", - target, level, xoffset, yoffset, width, height, format, type, pixels); - - GLenum result = MG_State::UpdateTextureRegion2D(target, level, xoffset, yoffset, width, height, format, type, pixels); - if (result != GL_NO_ERROR) { - MG_State::SetError(result); - MG_Util::Debug::LogE("Error from MG State: %s", MG_Util::Debug::GLEnumToString(result)); - return; - } - - auto& texState = *MG_State_T::textureState; - auto activeUnit = texState.activeTextureUnit_; - auto unitState = &texState.textureUnits_[activeUnit]; - GLuint boundTextureID = unitState->GetBoundTexture(target); - - MG_Util::Debug::LogD("TexSubImage2D: bound texture: GL name %u", boundTextureID); - - if (boundTextureID == 0) { - MG_Util::Debug::LogD("TexSubImage2D: No texture bound to active unit. Skipping update."); - return; - } - - Diligent::ITexture* pTexture = nullptr; - auto texIt = MG_Diligent::g_TextureMap.find(boundTextureID); - if (texIt != MG_Diligent::g_TextureMap.end()) { - pTexture = texIt->second; - } - - if (!pTexture) { - MG_Util::Debug::LogW("TexSubImage2D: Diligent texture not found for GL name %u", boundTextureID); - return; - } - - const auto& texDesc = pTexture->GetDesc(); - if (!(texDesc.BindFlags & Diligent::BIND_SHADER_RESOURCE)) { - MG_Util::Debug::LogE("TexSubImage2D: Texture %u does not have BIND_SHADER_RESOURCE flag", boundTextureID); - return; - } - - auto rowLength = MG_State::QueryPixelStoreInt(GL_UNPACK_ROW_LENGTH); - rowLength = ((rowLength > 0) ? rowLength : width); - auto skipRows = MG_State::QueryPixelStoreInt(GL_UNPACK_SKIP_ROWS); - auto skipPixels = MG_State::QueryPixelStoreInt(GL_UNPACK_SKIP_PIXELS); - auto bpp = GetBytesPerPixel(format, type); - char* pixelStart = (char*)pixels + bpp * (rowLength * skipRows + skipPixels); - - Diligent::TextureSubResData SubResData; - SubResData.Stride = rowLength * bpp; - SubResData.pData = pixelStart; - - Diligent::Box UpdateBox; - UpdateBox.MinX = xoffset; - UpdateBox.MaxX = xoffset + width; - UpdateBox.MinY = yoffset; - UpdateBox.MaxY = yoffset + height; - UpdateBox.MinZ = 0; - UpdateBox.MaxZ = 1; - - MG_Util::Debug::LogD("TexSubImage2D: Got GL_UNPACK_ROW_LENGTH = %d", rowLength); - - MG_Util::Debug::LogD("TexSubImage2D: Updating region [%d,%d]-[%d,%d] at level %d, %d bytes", - xoffset, yoffset, xoffset+width, yoffset+height, level, width * height * GetBytesPerPixel(format, type)); - -// if (MG_Diligent::IsInRenderPass) { -// MG_Diligent::g_pContext->EndRenderPass(); -// MG_Diligent::IsInRenderPass = false; -// } - - MG_Diligent::g_pContext->UpdateTexture( - pTexture, - level, - 0, - UpdateBox, - SubResData, - Diligent::RESOURCE_STATE_TRANSITION_MODE_TRANSITION, - Diligent::RESOURCE_STATE_TRANSITION_MODE_TRANSITION - ); - - MG_Util::Debug::LogD("TexSubImage2D: Update completed successfully"); - } - - - void GetTexLevelParameteriv(GLenum target, GLint level, GLenum pname, GLint* params) { - MG_Util::Debug::LogD("glGetTexLevelParameteriv, target: %d, level: %d, pname: %d, params: %p", - target, level, pname, params); - GLenum result = MG_State::QueryTextureLevelPropertyIntVector(target, level, pname, params); - if (result == GL_NO_ERROR) - return; - MG_State::SetError(result); - MG_Util::Debug::LogE("Error from MG State: %s", MG_Util::Debug::GLEnumToString(result)); - } - - void CopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height) { - MG_Util::Debug::LogD("glCopyTexSubImage2D, target: %d, level: %d, xoffset: %d, yoffset: %d, x: %d, y: %d, width: %d, height: %d", - target, level, xoffset, yoffset, x, y, width, height); - - } -} diff --git a/MG/MG_GL/Implementations/GL/Texture/GL_Texture.h b/MG/MG_GL/Implementations/GL/Texture/GL_Texture.h deleted file mode 100644 index 27077812..00000000 --- a/MG/MG_GL/Implementations/GL/Texture/GL_Texture.h +++ /dev/null @@ -1,21 +0,0 @@ -// -// Created by BZLZHH on 2025/3/15. -// - -#ifndef MOBILEGL_GL_TEXTURE_H -#define MOBILEGL_GL_TEXTURE_H - -namespace MG_GL::GL { - void ActiveTexture(GLenum texture); - void BindTexture(GLenum target, GLuint texture); - void DeleteTextures(GLsizei n, const GLuint* textures); - void GenTextures(GLsizei n, GLuint* textures); - void TexImage2D(GLenum target, GLint level, GLint internalFormat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void* data); - void TexParameterf(GLenum target, GLenum pname, GLfloat param); - void TexParameteri(GLenum target, GLenum pname, GLint param); - void TexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void* pixels); - void GetTexLevelParameteriv(GLenum target, GLint level, GLenum pname, GLint* params); - void CopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); -} - -#endif //MOBILEGL_GL_TEXTURE_H diff --git a/MG/MG_GL/Implementations/GL/VertexArray/GL_VertexArray.cpp b/MG/MG_GL/Implementations/GL/VertexArray/GL_VertexArray.cpp deleted file mode 100644 index 7a2ace90..00000000 --- a/MG/MG_GL/Implementations/GL/VertexArray/GL_VertexArray.cpp +++ /dev/null @@ -1,55 +0,0 @@ -// -// Created by BZLZHH on 2025/3/15. -// - -#include "../../../../Includes.h" - -namespace MG_GL::GL { - void GenVertexArrays(GLsizei n, GLuint* arrays) { - MG_Util::Debug::LogD("glGenVertexArrays, n: %d, arrays: %p", n, arrays); - GLenum result = MG_State::GenVertexArraysNames(n, arrays); - if (result == GL_NO_ERROR) { - return; - } - MG_State::SetError(result); - MG_Util::Debug::LogE("Error from MG State: %s", MG_Util::Debug::GLEnumToString(result)); - } - - void BindVertexArray(GLuint array) { - MG_Util::Debug::LogD("glBindVertexArray, array: %u", array); - GLenum result = MG_State::BindVertexArray(array); - if (result == GL_NO_ERROR) return; - MG_State::SetError(result); - MG_Util::Debug::LogE("Error from MG State: %s", MG_Util::Debug::GLEnumToString(result)); - } - - void EnableVertexAttribArray(GLuint index) { - MG_Util::Debug::LogD("glEnableVertexAttribArray, index: %u", index); - GLenum result = MG_State::EnableVertexAttribArray(index); - if (result == GL_NO_ERROR) return; - MG_State::SetError(result); - MG_Util::Debug::LogE("Error from MG State: %s", MG_Util::Debug::GLEnumToString(result)); - } - - void VertexAttribPointer(GLuint index, GLint size, GLenum type, - GLboolean normalized, GLsizei stride, const void* pointer) { - MG_Util::Debug::LogD("glVertexAttribPointer, index: %u, size: %d, type: %s, norm: %d, stride: %d, ptr: %p", - index, size, MG_Util::Debug::GLEnumToString(type), normalized, stride, pointer); - - GLenum result = MG_State::SetVertexAttributeLayout(index, size, type, normalized, stride, pointer); - if (result == GL_NO_ERROR) return; - MG_State::SetError(result); - MG_Util::Debug::LogE("Error from MG State: %s", MG_Util::Debug::GLEnumToString(result)); - } - - void VertexAttribIPointer(GLuint index, GLint size, GLenum type, - GLsizei stride, const void* pointer) { - MG_Util::Debug::LogD("glVertexAttribIPointer, index: %u, size: %d, type: %s, stride: %d, ptr: %p", - index, size, MG_Util::Debug::GLEnumToString(type), stride, pointer); - - GLenum result = MG_State::SetVertexAttributeLayoutInt(index, size, type, stride, pointer); - if (result == GL_NO_ERROR) return; - MG_State::SetError(result); - MG_Util::Debug::LogE("Error from MG State: %s", MG_Util::Debug::GLEnumToString(result)); - } -} \ No newline at end of file diff --git a/MG/MG_GL/Implementations/GL/VertexArray/GL_VertexArray.h b/MG/MG_GL/Implementations/GL/VertexArray/GL_VertexArray.h deleted file mode 100644 index 23f193bd..00000000 --- a/MG/MG_GL/Implementations/GL/VertexArray/GL_VertexArray.h +++ /dev/null @@ -1,16 +0,0 @@ -// -// Created by BZLZHH on 2025/3/15. -// - -#ifndef MOBILEGL_GL_VERTEXARRAY_H -#define MOBILEGL_GL_VERTEXARRAY_H - -namespace MG_GL::GL { - void GenVertexArrays(GLsizei n, GLuint* arrays); - void BindVertexArray(GLuint array); - void EnableVertexAttribArray(GLuint index); - void VertexAttribPointer(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void* pointer); - void VertexAttribIPointer(GLuint index, GLint size, GLenum type, GLsizei stride, const void* pointer); -} - -#endif //MOBILEGL_GL_VERTEXARRAY_H diff --git a/MG/MG_GL/Implementations/GLX/GLXFuncsDefinitions/GLXFuncsDefinitions.cpp b/MG/MG_GL/Implementations/GLX/GLXFuncsDefinitions/GLXFuncsDefinitions.cpp deleted file mode 100644 index 21aa8021..00000000 --- a/MG/MG_GL/Implementations/GLX/GLXFuncsDefinitions/GLXFuncsDefinitions.cpp +++ /dev/null @@ -1,13 +0,0 @@ -// -// Created by Swung 0x48 on 2025/6/20. -// - -#include "../../../../Includes.h" - -MG_EXPORT void* glXGetProcAddress(const char *name) { - return MG_GL::GLX::GetProcAddress(name); -} - -MG_EXPORT void* glXGetProcAddressARB(const char *name) { - return MG_GL::GLX::GetProcAddressARB(name); -} diff --git a/MG/MG_GL/Implementations/GLX/GLXFuncsDefinitions/GLXFuncsDefinitions.h b/MG/MG_GL/Implementations/GLX/GLXFuncsDefinitions/GLXFuncsDefinitions.h deleted file mode 100644 index dc140231..00000000 --- a/MG/MG_GL/Implementations/GLX/GLXFuncsDefinitions/GLXFuncsDefinitions.h +++ /dev/null @@ -1,8 +0,0 @@ -// -// Created by Swung 0x48 on 2025/6/20. -// - -#ifndef MOBILEGL_GLX_FUNCS_DEFINITIONS_H -#define MOBILEGL_GLX_FUNCS_DEFINITIONS_H - -#endif //MOBILEGL_GLX_FUNCS_DEFINITIONS_H diff --git a/MG/MG_GL/Implementations/GLX/LookUp/LookUp.cpp b/MG/MG_GL/Implementations/GLX/LookUp/LookUp.cpp deleted file mode 100644 index 603a462d..00000000 --- a/MG/MG_GL/Implementations/GLX/LookUp/LookUp.cpp +++ /dev/null @@ -1,25 +0,0 @@ -// -// Created by BZLZHH on 2025/3/15. -// - -#include "LookUp.h" - -#include "../../../../Includes.h" - -namespace MG_GL::GLX { - void* GetProcAddress(const char *name) { - MG_Util::Debug::LogD("glXGetProcAddress(\"%s\")", name); - void* proc = dlsym(RTLD_DEFAULT, (const char*)name); - - if (!proc) { - MG_Util::Debug::LogW("Failed to get function: %s", (const char*)name); - return nullptr; - } - - return proc; - } - - void* GetProcAddressARB(const char *name) { - return GetProcAddress(name); - } -} \ No newline at end of file diff --git a/MG/MG_GL/Implementations/GLX/LookUp/LookUp.h b/MG/MG_GL/Implementations/GLX/LookUp/LookUp.h deleted file mode 100644 index 0f4ce39a..00000000 --- a/MG/MG_GL/Implementations/GLX/LookUp/LookUp.h +++ /dev/null @@ -1,12 +0,0 @@ -// -// Created by BZLZHH on 2025/3/15. -// - -#ifndef MOBILEGL_LOOKUP_H -#define MOBILEGL_LOOKUP_H - -namespace MG_GL::GLX { - void* GetProcAddress(const char *name); - void* GetProcAddressARB(const char *name); -} -#endif //MOBILEGL_LOOKUP_H diff --git a/MG/MG_GL/State/Buffer/BufferState.cpp b/MG/MG_GL/State/Buffer/BufferState.cpp deleted file mode 100644 index 04d50869..00000000 --- a/MG/MG_GL/State/Buffer/BufferState.cpp +++ /dev/null @@ -1,345 +0,0 @@ -// -// Created by BZLZHH on 2025/5/1. -// - -// TODO: Add more gl error check for buffer state manager. - -#include "../../../Includes.h" - -//GLenum BufferState::GenName(GLuint *buffer) { -// MG_Util::Debug::LogD("MG_State: Buffer: GenName"); -// if (!buffer) -// return GL_INVALID_VALUE; -// -// GLuint id = 0; -// if (freeId_.empty()) { -// id = lastId_++; -// } else { -// id = freeId_.back(); -// freeId_.pop_back(); -// } -// -// *buffer = id; -// MG_Util::Debug::LogD("MG_State: Buffer: Gen new name %d", id); -// -// return GL_NO_ERROR; -//} - -GLenum BufferState::GenNameN(GLsizei n, GLuint* buffers) { - MG_Util::Debug::LogD("MG_State: Buffer: GenNameN called with n=%d", n); - if (n < 0 || buffers == nullptr) return GL_INVALID_VALUE; - - indexGenerator_.Generate(n, buffers); - - MG_Util::Debug::LogD("MG_State: Buffer: GenNameN created buffers successfully"); - return GL_NO_ERROR; -} - -GLenum BufferState::Create(GLuint buffer) { - MG_Util::Debug::LogD("MG_State: Buffer: Create called"); - if (!buffer) - return GL_INVALID_VALUE; - - if (ValidateAllocatedHandle(buffer)) - return GL_INVALID_VALUE; - - if (bufferObjects_.size() <= buffer) { - bufferObjects_.resize(buffer + 1); - } - if (bufferObjects_[buffer] == nullptr) { - bufferObjects_[buffer] = std::make_unique(); - } - - BufferObject& obj = *GetBufferObject(buffer); - MG_Util::Debug::LogD("MG_State: Buffer: Create created buffer %d", buffer); - obj.generated = true; - obj.dirty = true; - - return GL_NO_ERROR; -} - -GLenum BufferState::Bind(GLenum target, GLuint buffer) { - // We don't handle unallocated buffer names here, just plain bind - if (!IsValidTarget_(target)) return GL_INVALID_ENUM; - MG_Util::Debug::LogD("MG_State: Buffer: Bind called with target=%s, buffer=%u", MG_Util::Debug::GLEnumToString(target), buffer); - currentBindings_[target] = buffer; - MG_Util::Debug::LogD("MG_State: Buffer: Bind succeed bind buffer %u to target 0x%x", buffer, target); - return GL_NO_ERROR; -} - -GLenum BufferState::CommitStorage(GLenum target, GLsizeiptr size, const void* data, GLenum usage) { - MG_Util::Debug::LogD("MG_State: Buffer: CommitStorage called on target 0x%x",target); - auto it = currentBindings_.find(target); - if (it == currentBindings_.end() || it->second == 0) - return GL_INVALID_OPERATION; - - BufferObject& obj = *GetBufferObject(it->second); - MG_Util::Debug::LogD("MG_State: Buffer: CommitStorage get buffer object %u at target 0x%x",it->second,target); - obj.usage = usage; - obj.isDynamic = (usage == GL_DYNAMIC_DRAW || usage == GL_DYNAMIC_READ || - usage == GL_DYNAMIC_COPY || usage == GL_STREAM_DRAW); - obj.data.reserve(std::bit_ceil((size_t)size)); - obj.data.resize(size); - if (data) { - memcpy(obj.data.data(), data, size); - obj.dataValid = true; - } - obj.dirty = true; - MG_Util::Debug::LogD("MG_State: Buffer: CommitStorage buffer at target 0x%x committed storage, size = %zu, usage=0x%x", target, size, usage); - - return GL_NO_ERROR; -} - -GLenum BufferState::CommitStorageRegion(GLenum target, GLintptr offset, GLsizeiptr size, const void* data) { - MG_Util::Debug::LogD("MG_State: Buffer: BufferSubData called on target 0x%x, offset=%ld, size=%ld", target, offset, size); - if (!IsValidTarget_(target)) return GL_INVALID_ENUM; - if (offset < 0 || size < 0) return GL_INVALID_VALUE; - - auto it = currentBindings_.find(target); - if (it == currentBindings_.end() || it->second == 0) - return GL_INVALID_OPERATION; - - BufferObject& obj = *GetBufferObject(it->second); - MG_Util::Debug::LogD("MG_State: Buffer: BufferSubData get buffer object %u at target 0x%x", it->second, target); - - if (static_cast(offset + size) > obj.data.size()) return GL_INVALID_VALUE; - - if (data) { - memcpy(obj.data.data() + offset, data, size); - obj.dirty = true; - } - return GL_NO_ERROR; -} - -GLenum BufferState::AcquireBufferMemoryRange(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access, void** mappedPointer) { - MG_Util::Debug::LogD("MG_State: Buffer: AcquireBufferMemoryRange called with target=0x%x, offset=%ld, length=%ld, access=0x%x", target, offset, length, access); - if (!IsValidTarget_(target)) { - MG_Util::Debug::LogE("MG_State: Buffer: AcquireBufferMemoryRange failed: invalid target 0x%x", target); - return GL_INVALID_ENUM; - } - if (offset < 0 || length <= 0) { - MG_Util::Debug::LogE("MG_State: Buffer: AcquireBufferMemoryRange failed: invalid offset %ld or length %ld", offset, length); - return GL_INVALID_VALUE; - } - - auto it = currentBindings_.find(target); - if (it == currentBindings_.end() || it->second == 0) { - MG_Util::Debug::LogE("MG_State: Buffer: AcquireBufferMemoryRange failed: no buffer bound to target 0x%x", target); - return GL_INVALID_OPERATION; - } - - BufferObject& obj = *GetBufferObject(it->second); - MG_Util::Debug::LogD("MG_State: Buffer: AcquireBufferMemoryRange operating on buffer %u", it->second); - if (obj.isMapped) { - MG_Util::Debug::LogE("MG_State: Buffer: AcquireBufferMemoryRange failed: buffer %u is already mapped", it->second); - return GL_INVALID_OPERATION; - } - - const GLbitfield validFlags = GL_MAP_READ_BIT | GL_MAP_WRITE_BIT | GL_MAP_INVALIDATE_RANGE_BIT | GL_MAP_FLUSH_EXPLICIT_BIT | GL_MAP_UNSYNCHRONIZED_BIT | GL_MAP_INVALIDATE_BUFFER_BIT ; - if ((access & ~validFlags) != 0) { - MG_Util::Debug::LogE("MG_State: Buffer: AcquireBufferMemoryRange failed: invalid access flags 0x%x", access); - return GL_INVALID_VALUE; - } - - if (static_cast(offset + length) > obj.data.size()) { - MG_Util::Debug::LogE("MG_State: Buffer: AcquireBufferMemoryRange failed: requested range [%ld, %ld) exceeds buffer size %zu", offset, offset + length, obj.data.size()); - return GL_INVALID_VALUE; - } - - obj.isMapped = true; - obj.mapOffset = offset; - obj.mapLength = length; - obj.mapAccessFlags = access; - obj.dirty = true; - *mappedPointer = obj.data.data() + offset; - MG_Util::Debug::LogD("MG_State: Buffer: AcquireBufferMemoryRange succeeded for buffer %u. Mapped pointer: %p", it->second, *mappedPointer); - return GL_NO_ERROR; -} - -GLenum BufferState::SyncBufferMemory(GLenum target, GLintptr offset, GLsizeiptr length) { - if (!IsValidTarget_(target)) return GL_INVALID_ENUM; - if (offset < 0 || length <= 0) return GL_INVALID_VALUE; - - auto it = currentBindings_.find(target); - if (it == currentBindings_.end() || it->second == 0) - return GL_INVALID_OPERATION; - - BufferObject& obj = *GetBufferObject(it->second); - if (!obj.isMapped || !(obj.mapAccessFlags & GL_MAP_FLUSH_EXPLICIT_BIT)) - return GL_INVALID_OPERATION; - - if (offset < obj.mapOffset || offset + length > obj.mapOffset + obj.mapLength) - return GL_INVALID_VALUE; - - // TODO: Add support for flush range. - // Now only mark it as dirty. - obj.dirty = true; - return GL_NO_ERROR; -} - -GLenum BufferState::CopyBufferRange(GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size) { - if (!IsValidTarget_(readTarget) || !IsValidTarget_(writeTarget)) - return GL_INVALID_ENUM; - if (readOffset < 0 || writeOffset < 0 || size < 0) - return GL_INVALID_VALUE; - - GLuint readBuffer = currentBindings_[readTarget]; - GLuint writeBuffer = currentBindings_[writeTarget]; - if (readBuffer == 0 || writeBuffer == 0 || readBuffer == writeBuffer) - return GL_INVALID_OPERATION; - - BufferObject& src = *GetBufferObject(readBuffer); - BufferObject& dst = *GetBufferObject(writeBuffer); - - if (static_cast(readOffset + size) > src.data.size() || - static_cast(writeOffset + size) > dst.data.size()) - return GL_INVALID_VALUE; - - memcpy(dst.data.data() + writeOffset, src.data.data() + readOffset, size); - dst.dirty = true; - return GL_NO_ERROR; -} - -GLenum BufferState::AcquireBufferMemory(GLenum target, GLenum access, void** mappedPointer) { - GLbitfield flags = 0; - switch (access) { - case GL_READ_ONLY: flags = GL_MAP_READ_BIT; break; - case GL_WRITE_ONLY: flags = GL_MAP_WRITE_BIT; break; - case GL_READ_WRITE: flags = GL_MAP_READ_BIT | GL_MAP_WRITE_BIT; break; - default: - flags = access; - } - return AcquireBufferMemoryRange(target, 0, GetBufferObject(currentBindings_[target])->data.size(), flags, mappedPointer); -} - -GLenum BufferState::ReleaseBufferMemory(GLenum target) { - if (!IsValidTarget_(target)) - return GL_INVALID_ENUM; - - auto it = currentBindings_.find(target); - if (it == currentBindings_.end() || it->second == 0) - return GL_INVALID_OPERATION; - - BufferObject& obj = *GetBufferObject(it->second); - if (!obj.isMapped) - return GL_INVALID_OPERATION; - - if ((obj.mapAccessFlags & GL_MAP_FLUSH_EXPLICIT_BIT) == 0) { - obj.dirty = true; - } - - obj.isMapped = false; - obj.mapOffset = 0; - obj.mapLength = 0; - obj.mapAccessFlags = 0; - obj.accessMode = GL_READ_WRITE; - - return GL_NO_ERROR; -} - -bool BufferState::ValidateAllocatedHandle(GLuint buffer) const { - bool isValid = buffer != 0 && bufferObjects_.size() > buffer && bufferObjects_[buffer] != nullptr; - MG_Util::Debug::LogD("MG_State: Buffer: ValidateAllocatedHandle called on buffer %u returns %d", buffer, isValid); - return isValid; -} - -bool BufferState::ValidateGeneratedName(GLuint buffer) const { - bool isValid = indexGenerator_.IsValid(buffer); - MG_Util::Debug::LogD("MG_State: Buffer: ValidateGeneratedName called on buffer %u returns %s", buffer, isValid ? "true" : "false"); - return isValid; -} - -void BufferState::Delete(GLuint buffer) { - MG_Util::Debug::LogD("MG_State: Buffer: Delete buffer %u", buffer); - if (bufferObjects_.size() > buffer) - bufferObjects_[buffer].reset(); - indexGenerator_.Delete(buffer); - - for (auto& [target, id] : currentBindings_) { - if (id == buffer) id = 0; - } - MG_Util::Debug::LogD("MG_State: Buffer: Delete buffer %u successfully", buffer); -} - -GLenum BufferState::DeleteN(GLsizei n, const GLuint* buffers) { - MG_Util::Debug::LogD("MG_State: Buffer: DeleteN called with n=%d", n); - if (n < 0) return GL_INVALID_VALUE; - - for (GLsizei i = 0; i < n; ++i) { - Delete(buffers[i]); - } - MG_Util::Debug::LogD("MG_State: Buffer: DeleteN deleted buffers successfully"); - return GL_NO_ERROR; -} - -bool BufferState::IsValidTarget_(GLenum target) { - bool ret = MG_Constants::Common::Contains(target, MG_Constants::Buffer::VALID_TARGETS); - MG_Util::Debug::LogD("MG_State: Buffer: IsValidTarget_ called with target=0x%x,result=%d", target, ret); - return ret; -} - -GLenum BufferState::QueryPropertyIntVector(GLenum target, GLenum pname, GLint* params) const { - MG_Util::Debug::LogD("MG_State: Buffer: QueryPropertyIntVector called at target 0x%x,param name = 0x%x",target,pname); - static const std::set validTargets = { - GL_ARRAY_BUFFER, GL_ELEMENT_ARRAY_BUFFER, - GL_PIXEL_PACK_BUFFER, GL_PIXEL_UNPACK_BUFFER - }; - if (validTargets.find(target) == validTargets.end()) { - return GL_INVALID_ENUM; - } - - if (!MG_Constants::Common::Contains(pname, MG_Constants::Buffer::VALID_PARAM_NAMES)) { - return GL_INVALID_ENUM; - } - - auto bindingIt = currentBindings_.find(target); - if (bindingIt == currentBindings_.end() || bindingIt->second == 0) { - return GL_INVALID_OPERATION; - } - GLuint bufferId = bindingIt->second; - - if (!ValidateAllocatedHandle(bufferId)) { - return GL_INVALID_OPERATION; - } - - const BufferObject& buffer = *bufferObjects_[bufferId]; - - switch (pname) { - case GL_BUFFER_ACCESS: - *params = static_cast(buffer.accessMode); - break; - case GL_BUFFER_MAPPED: - *params = buffer.isMapped ? GL_TRUE : GL_FALSE; - break; - case GL_BUFFER_SIZE: - *params = static_cast(buffer.data.size()); - break; - case GL_BUFFER_USAGE: - *params = static_cast(buffer.usage); - break; - MG_Util::Debug::LogD("MG_State: Buffer: QueryPropertyIntVector Query info about buffer %u succeed", target); - default: - return GL_INVALID_ENUM; - } - return GL_NO_ERROR; -} - - -GLuint BufferState::GetCurrentBinding(GLenum target) const { - auto it = currentBindings_.find(target); - if (it != currentBindings_.end()) { - return it->second; - } - return 0; -} - -BufferState::BufferObject* BufferState::GetBufferObject(GLuint buffer) { - if (bufferObjects_.size() <= buffer) { - return nullptr; - } -// if (bufferObjects_[buffer] == nullptr) { -// raise(SIGTRAP); -//// bufferObjects_[buffer] = std::make_unique(); -// } - return bufferObjects_[buffer].get(); -} diff --git a/MG/MG_GL/State/Buffer/BufferState.h b/MG/MG_GL/State/Buffer/BufferState.h deleted file mode 100644 index 98f14aa6..00000000 --- a/MG/MG_GL/State/Buffer/BufferState.h +++ /dev/null @@ -1,57 +0,0 @@ -// -// Created by BZLZHH on 2025/5/1. -// - -#ifndef MOBILEGL_BUFFERSTATE_H -#define MOBILEGL_BUFFERSTATE_H - -class BufferState { -public: - struct BufferObject { - GLenum usage = GL_STATIC_DRAW; - std::vector data; - bool dataValid = false; - bool dirty = false; // TODO: encapsulate this with an public API to RHI - bool isMapped = false; - bool generated = false; - bool isDynamic = false; - GLenum accessMode = GL_READ_WRITE; - GLintptr mapOffset = 0; - GLsizeiptr mapLength = 0; - GLbitfield mapAccessFlags = 0; - }; - - // Return: the validity of the operation, according to OpenGL 3 standard -// GLenum GenName(GLuint* buffer); - GLenum GenNameN(GLsizei n, GLuint* buffers); - GLenum Create(GLuint buffer); - GLenum Bind(GLenum target, GLuint buffer); - GLenum CommitStorage(GLenum target, GLsizeiptr size, const void* data, GLenum usage); - GLenum CommitStorageRegion(GLenum target, GLintptr offset, GLsizeiptr size, const void* data); - GLenum AcquireBufferMemoryRange(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access, void** mappedPointer); - GLenum SyncBufferMemory(GLenum target, GLintptr offset, GLsizeiptr length); - GLenum CopyBufferRange(GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); - GLenum AcquireBufferMemory(GLenum target, GLenum access, void** mappedPointer); - GLenum ReleaseBufferMemory(GLenum target); - GLenum QueryPropertyIntVector(GLenum target, GLenum pname, GLint* params) const; - GLenum DeleteN(GLsizei n, const GLuint* buffers); - - bool ValidateAllocatedHandle(GLuint buffer) const; - bool ValidateGeneratedName(GLuint buffer) const; - void Delete(GLuint buffer); - GLuint GetCurrentBinding(GLenum target) const; - - BufferObject* GetBufferObject(GLuint buffer); - - MG_Global::unordered_map currentBindings_; -// MG_Global::unordered_map buffers_; -private: -// std::vector freeId_; -// GLuint lastId_ = 1; - IndexGenerator indexGenerator_; - std::vector> bufferObjects_; - - static bool IsValidTarget_(GLenum target); -}; - -#endif //MOBILEGL_BUFFERSTATE_H diff --git a/MG/MG_GL/State/Common/CommonState.cpp b/MG/MG_GL/State/Common/CommonState.cpp deleted file mode 100644 index 64051849..00000000 --- a/MG/MG_GL/State/Common/CommonState.cpp +++ /dev/null @@ -1,159 +0,0 @@ -// -// Created by BZLZHH on 2025/4/30. -// - -#include "../../../Includes.h" - -CommonState::CommonState() { - pixelStoreParams[GL_PACK_ALIGNMENT] = 4; - pixelStoreParams[GL_UNPACK_ALIGNMENT] = 4; -} - -GLenum CommonState::SetPixelStoreInt(GLenum pname, GLint param) { - if (!MG_Constants::Common::Contains(pname, MG_Constants::PixelStore::VALID_PARAM_NAMES)) { - return GL_INVALID_ENUM; - } - - switch (pname) { - case GL_PACK_SWAP_BYTES: - case GL_PACK_LSB_FIRST: - case GL_UNPACK_SWAP_BYTES: - case GL_UNPACK_LSB_FIRST: - break; - case GL_PACK_ROW_LENGTH: - case GL_PACK_IMAGE_HEIGHT: - case GL_PACK_SKIP_ROWS: - case GL_PACK_SKIP_PIXELS: - case GL_PACK_SKIP_IMAGES: - case GL_UNPACK_ROW_LENGTH: - case GL_UNPACK_IMAGE_HEIGHT: - case GL_UNPACK_SKIP_ROWS: - case GL_UNPACK_SKIP_PIXELS: - case GL_UNPACK_SKIP_IMAGES: - if (param < 0) { - return GL_INVALID_VALUE; - } - break; - - case GL_PACK_ALIGNMENT: - case GL_UNPACK_ALIGNMENT: - if (param != 1 && param != 2 && param != 4 && param != 8) { - return GL_INVALID_VALUE; - } - break; - - default: - return GL_INVALID_ENUM; - } - - pixelStoreParams[pname] = param; - return GL_NO_ERROR; -} - -GLint CommonState::QueryPixelStoreInt(GLenum pname) { - auto it = pixelStoreParams.find(pname); - if (it != pixelStoreParams.end()) { - return it->second; - } - - auto defaultIt = MG_Constants::PixelStore::DEFAULT_VALUES_MAP.find(pname); - return (defaultIt != MG_Constants::PixelStore::DEFAULT_VALUES_MAP.end()) ? defaultIt->second : 0; -} - -GLenum CommonState::Enable(GLenum cap) { - if (!MG_Constants::Common::Contains(cap, MG_Constants::CommonState::VALID_CAPS)) { - return GL_INVALID_ENUM; - } - capabilities[cap] = true; - return GL_NO_ERROR; -} - -GLenum CommonState::Disable(GLenum cap) { - if (!MG_Constants::Common::Contains(cap, MG_Constants::CommonState::VALID_CAPS)) { - return GL_INVALID_ENUM; - } - capabilities[cap] = false; - return GL_NO_ERROR; -} - -GLenum CommonState::BlendFunc(GLenum sfactor, GLenum dfactor) { - if (!MG_Constants::Common::Contains(sfactor, MG_Constants::Blend::VALID_FACTORS) || - !MG_Constants::Common::Contains(dfactor, MG_Constants::Blend::VALID_FACTORS)) { - return GL_INVALID_ENUM; - } - - blendSrcRGB = blendSrcAlpha = sfactor; - blendDstRGB = blendDstAlpha = dfactor; - return GL_NO_ERROR; -} - -GLenum CommonState::BlendFuncSeparate(GLenum srcRGB, GLenum dstRGB, - GLenum srcAlpha, GLenum dstAlpha) { - if (!MG_Constants::Common::Contains(srcRGB, MG_Constants::Blend::VALID_FACTORS) || - !MG_Constants::Common::Contains(dstRGB, MG_Constants::Blend::VALID_FACTORS) || - !MG_Constants::Common::Contains(srcAlpha, MG_Constants::Blend::VALID_FACTORS) || - !MG_Constants::Common::Contains(dstAlpha, MG_Constants::Blend::VALID_FACTORS)) { - return GL_INVALID_ENUM; - } - blendSrcRGB = srcRGB; - blendDstRGB = dstRGB; - blendSrcAlpha = srcAlpha; - blendDstAlpha = dstAlpha; - return GL_NO_ERROR; -} - -GLenum CommonState::Clear(GLbitfield mask) { - const GLbitfield validBits = GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT; - if ((mask & ~validBits) != 0) { - return GL_INVALID_VALUE; - } - clearMask = mask; - return GL_NO_ERROR; -} - -GLenum CommonState::ClearColor(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) { - clearColor[0] = red; - clearColor[1] = green; - clearColor[2] = blue; - clearColor[3] = alpha; - return GL_NO_ERROR; -} - -GLenum CommonState::ClearDepth(GLfloat depth) { - clearDepth = depth; - return GL_NO_ERROR; -} - -GLenum CommonState::ColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) { - colorMask[0] = red; - colorMask[1] = green; - colorMask[2] = blue; - colorMask[3] = alpha; - return GL_NO_ERROR; -} - -GLenum CommonState::DepthFunc(GLenum func) { - if (!MG_Constants::Common::Contains(func, MG_Constants::Depth::VALID_FUNCS)) { - return GL_INVALID_ENUM; - } - depthFunc = func; - MG_Util::Debug::LogD("%s(%s)", __func__, MG_Util::Debug::GLEnumToString(func)); - return GL_NO_ERROR; -} - -GLenum CommonState::DepthMask(GLboolean flag) { - depthMask = flag; - return GL_NO_ERROR; -} - -GLenum CommonState::Viewport(GLint x, GLint y, GLsizei width, GLsizei height) { - if (width < 0 || height < 0) { - return GL_INVALID_VALUE; - } - - viewport[0] = x; - viewport[1] = y; - viewport[2] = width; - viewport[3] = height; - return GL_NO_ERROR; -} \ No newline at end of file diff --git a/MG/MG_GL/State/Common/CommonState.h b/MG/MG_GL/State/Common/CommonState.h deleted file mode 100644 index 004b5653..00000000 --- a/MG/MG_GL/State/Common/CommonState.h +++ /dev/null @@ -1,60 +0,0 @@ -// -// Created by BZLZHH on 2025/4/30. -// - -#ifndef MOBILEGL_COMMONSTATE_H -#define MOBILEGL_COMMONSTATE_H - -class CommonState { -public: - // Viewport - GLint viewport[4] = {0, 0, 0, 0}; - - // Color mask - GLboolean colorMask[4] = {GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE}; - - // Pixel storage parameters - MG_Global::unordered_map pixelStoreParams; - - // Blend state - GLenum blendSrcRGB = GL_ONE; - GLenum blendDstRGB = GL_ZERO; - GLenum blendSrcAlpha = GL_ONE; - GLenum blendDstAlpha = GL_ZERO; - - // Clear state - GLfloat clearColor[4] = {0.0f, 0.0f, 0.0f, 0.0f}; - GLfloat clearDepth = 1.0f; - GLenum clearMask; - - // Depth state - GLenum depthFunc = GL_LESS; - GLboolean depthMask = GL_TRUE; - - // Capability enables - MG_Global::unordered_map capabilities; - - CommonState(); - - // Return: the validity of the operation, according to OpenGL 3 standard - GLenum SetPixelStoreInt(GLenum pname, GLint param); - - GLenum Enable(GLenum cap); - GLenum Disable(GLenum cap); - GLenum BlendFunc(GLenum sfactor, GLenum dfactor); - GLenum BlendFuncSeparate(GLenum srcRGB, GLenum dstRGB, - GLenum srcAlpha, GLenum dstAlpha); - GLenum Clear(GLbitfield mask); - GLenum ClearColor(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); - GLenum ClearDepth(GLfloat depth); - GLenum ColorMask(GLboolean red, GLboolean green, - GLboolean blue, GLboolean alpha); - GLenum DepthFunc(GLenum func); - GLenum DepthMask(GLboolean flag); - GLenum Viewport(GLint x, GLint y, GLsizei width, GLsizei height); - - GLint QueryPixelStoreInt(GLenum pname); - -}; - -#endif //MOBILEGL_COMMONSTATE_H diff --git a/MG/MG_GL/State/Core/GLState.cpp b/MG/MG_GL/State/Core/GLState.cpp deleted file mode 100644 index ece59583..00000000 --- a/MG/MG_GL/State/Core/GLState.cpp +++ /dev/null @@ -1,407 +0,0 @@ -// -// Created by BZLZHH on 2025/4/4. -// - -#include "../../../Includes.h" - -std::queue MG_State_T::glErrorQueue; -TextureState* MG_State_T::textureState = nullptr; -CommonState* MG_State_T::commonState = nullptr; -BufferState* MG_State_T::bufferState = nullptr; -VertexArrayState* MG_State_T::vertexArrayState = nullptr; -ProgramState* MG_State_T::programState = nullptr; -FramebufferState* MG_State_T::framebufferState = nullptr; - -namespace MG_State { - void Init() { - MG_State_T::textureState = new TextureState(); - MG_State_T::commonState = new CommonState(); - MG_State_T::bufferState = new BufferState(); - MG_State_T::vertexArrayState = new VertexArrayState(); - MG_State_T::programState = new ProgramState(); - MG_State_T::framebufferState = new FramebufferState(); - } - - void Destroy() { - delete MG_State_T::textureState; - delete MG_State_T::commonState; - delete MG_State_T::bufferState; - delete MG_State_T::vertexArrayState; - delete MG_State_T::programState; - delete MG_State_T::framebufferState; - } - - void SetError(GLenum error) { - if (error == GL_NO_ERROR) { - return; - } - MG_State_T::glErrorQueue.push(error); - } - - GLenum GetError() { - if (MG_State_T::glErrorQueue.empty()) { - return GL_NO_ERROR; - } - GLenum error = MG_State_T::glErrorQueue.front(); - MG_State_T::glErrorQueue.pop(); - return error; - } - -// TODO: Take these functions apart into multiple files. - - // Texture - GLenum BindTextureUnit(GLenum textureUnit) { - return MG_State_T::textureState->BindUnit(textureUnit); - } - - GLenum CreateTexture(GLuint* texture) { - return MG_State_T::textureState->Create(texture); - } - - GLenum CreateTextures(GLsizei n, GLuint* textures) { - return MG_State_T::textureState->CreateN(n, textures); - } - - GLenum BindTexture(GLenum target, GLuint texture) { - return MG_State_T::textureState->Bind(target, texture); - } - - GLenum UploadTexture2D(GLenum target, GLint level, GLint internalFormat, - GLsizei width, GLsizei height, GLint border, GLenum format, - GLenum type, const void* data) { - return MG_State_T::textureState->Upload2D(target, level, internalFormat, width, height, border, format, type, data); - } - - GLenum UpdateTextureRegion2D(GLenum target, GLint level, GLint xoffset, - GLint yoffset, GLsizei width, GLsizei height, GLenum format, - GLenum type, const GLvoid* data) { - return MG_State_T::textureState->UpdateRegion2D(target, level, xoffset, yoffset, width, height, format, type, data); - } - - GLenum SetTexturePropertyInt(GLenum target, GLenum pname, GLint param) { - return MG_State_T::textureState->SetTexturePropertyInt(target, pname, param); - } - - GLenum SetTexturePropertyFloat(GLenum target, GLenum pname, GLfloat param) { - return MG_State_T::textureState->SetTexturePropertyFloat(target, pname, param); - } - - GLenum DeleteTexture(GLuint texture) { - return MG_State_T::textureState->Delete(texture); - } - - GLenum DeleteTextures(GLsizei n, const GLuint* textures) { - return MG_State_T::textureState->DeleteN(n, textures); - } - - GLenum QueryTextureLevelPropertyIntVector(GLenum target, GLint level, GLenum pname, GLint* params) { - return MG_State_T::textureState->QueryLevelPropertyIntVector(target, level, pname, params); - } - - // Common - GLenum SetPixelStoreInt(GLenum pname, GLint param) { - return MG_State_T::commonState->SetPixelStoreInt(pname, param); - } - - GLint QueryPixelStoreInt(GLenum pname) { - return MG_State_T::commonState->QueryPixelStoreInt(pname); - } - - GLenum glEnable(GLenum cap) { - return MG_State_T::commonState->Enable(cap); - } - - GLenum glDisable(GLenum cap) { - return MG_State_T::commonState->Disable(cap); - } - - GLenum glBlendFunc(GLenum sfactor, GLenum dfactor) { - return MG_State_T::commonState->BlendFunc(sfactor, dfactor); - } - - GLenum glBlendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) { - return MG_State_T::commonState->BlendFuncSeparate(srcRGB, dstRGB, srcAlpha, dstAlpha); - } - - GLenum glClear(GLbitfield mask) { - return MG_State_T::commonState->Clear(mask); - } - - GLenum glClearColor(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) { - return MG_State_T::commonState->ClearColor(red, green, blue, alpha); - } - - GLenum glClearDepth(GLdouble depth) { - return MG_State_T::commonState->ClearDepth(static_cast(depth)); - } - - GLenum glColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) { - return MG_State_T::commonState->ColorMask(red, green, blue, alpha); - } - - GLenum glDepthFunc(GLenum func) { - return MG_State_T::commonState->DepthFunc(func); - } - - GLenum glDepthMask(GLboolean flag) { - return MG_State_T::commonState->DepthMask(flag); - } - - GLenum glViewport(GLint x, GLint y, GLsizei width, GLsizei height) { - return MG_State_T::commonState->Viewport(x, y, width, height); - } - - // Buffer - GLenum AcquireBufferMemory(GLenum target, GLenum access, void** mappedPtr) { - return MG_State_T::bufferState->AcquireBufferMemory(target, access, mappedPtr); - } - - GLenum AcquireBufferMemoryRange(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access, void** mappedPointer) { - return MG_State_T::bufferState->AcquireBufferMemoryRange(target, offset, length, access, mappedPointer); - } - - GLenum SyncBufferMemory(GLenum target, GLintptr offset, GLsizeiptr length) { - return MG_State_T::bufferState->SyncBufferMemory(target, offset, length); - } - - GLenum CopyBufferRange(GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size) { - return MG_State_T::bufferState->CopyBufferRange(readTarget, writeTarget, readOffset, - writeOffset, size); - } - - GLenum ReleaseBufferMemory(GLenum target) { - return MG_State_T::bufferState->ReleaseBufferMemory(target); - } - - GLenum CreateBuffer(GLuint buffer) { - return MG_State_T::bufferState->Create(buffer); - } - - GLenum GenBufferNames(GLsizei n, GLuint* buffers) { - return MG_State_T::bufferState->GenNameN(n, buffers); - } - - GLenum BindBuffer(GLenum target, GLuint buffer) { - if (target == GL_ELEMENT_ARRAY_BUFFER) { - auto* vao = MG_State_T::vertexArrayState->GetCurrentVAO(); - if (!vao) return GL_INVALID_OPERATION; - vao->elementBuffer = (GLuint)buffer; - vao->eboDirty = true; - } - return MG_State_T::bufferState->Bind(target, buffer); - } - - GLenum CommitBufferStorage(GLenum target, GLsizeiptr size, const void* data, GLenum usage) { - return MG_State_T::bufferState->CommitStorage(target, size, data, usage); - } - - GLenum CommitBufferStorageRegion(GLenum target, GLintptr offset, GLsizeiptr size, const void* data) { - return MG_State_T::bufferState->CommitStorageRegion(target, offset, size, data); - } - - bool ValidateAllocatedBufferHandle(GLuint buffer) { - return MG_State_T::bufferState->ValidateAllocatedHandle(buffer); - } - - bool ValidateGeneratedName(GLuint buffer) { - return MG_State_T::bufferState->ValidateGeneratedName(buffer); - } - - void DeleteBuffer(GLuint buffer) { - return MG_State_T::bufferState->Delete(buffer); - } - - GLenum DeleteBuffers(GLsizei n, const GLuint* buffers) { - return MG_State_T::bufferState->DeleteN(n, buffers); - } - - GLenum QueryBufferPropertyIntVector(GLenum target, GLenum pname, GLint* params) { - return MG_State_T::bufferState->QueryPropertyIntVector(target, pname, params); - } - - // VertexArray - GLenum BindVertexArray(GLuint array) { - return MG_State_T::vertexArrayState->Bind(array); - } - - GLenum CreateVertexArray(GLuint* array) { - return MG_State_T::vertexArrayState->Create(array); - } - - GLenum CreateVertexArrays(GLsizei n, GLuint* arrays) { - return MG_State_T::vertexArrayState->CreateN(n, arrays); - } - - GLenum GenVertexArraysNames(GLsizei n, GLuint* arrays) { - return MG_State_T::vertexArrayState->GenNameN(n, arrays); - } - - GLenum EnableVertexAttribArray(GLuint index) { - return MG_State_T::vertexArrayState->EnableAttrib(index); - } - - GLenum DisableVertexAttribArray(GLuint index) { - return MG_State_T::vertexArrayState->DisableAttrib(index); - } - - GLenum SetVertexAttributeLayout(GLuint index, GLint size, GLenum type, - GLboolean normalized, GLsizei stride, - const void* pointer) { - GLuint currentBuffer = MG_State_T::bufferState->GetCurrentBinding(GL_ARRAY_BUFFER); - return MG_State_T::vertexArrayState->SetAttribPointer( - index, size, type, normalized, stride, pointer, false, currentBuffer - ); - } - - GLenum SetVertexAttributeLayoutInt(GLuint index, GLint size, GLenum type, - GLsizei stride, const void* pointer) { - GLuint currentBuffer = MG_State_T::bufferState->GetCurrentBinding(GL_ARRAY_BUFFER); - return MG_State_T::vertexArrayState->SetAttribPointer( - index, size, type, GL_FALSE, stride, pointer, true, currentBuffer - ); - } - - // Program - GLenum CreateShader(GLenum type, GLuint* shader) { - return MG_State_T::programState->CreateShader(type, shader); - } - - GLenum CreateProgram(GLuint* program) { - return MG_State_T::programState->CreateProgram(program); - } - - GLenum DeleteShader(GLuint shader) { - return MG_State_T::programState->DeleteShader(shader); - } - - GLenum DeleteProgram(GLuint program) { - return MG_State_T::programState->DeleteProgram(program); - } - - GLenum LinkShaderToProgram(GLuint program, GLuint shader) { - return MG_State_T::programState->LinkShaderToProgram(program, shader); - } - - GLenum UploadShaderSource(GLuint shader, GLsizei count, const GLchar** string, const GLint* length) { - return MG_State_T::programState->UploadShaderSource(shader, count, string, length); - } - - GLenum BuildShaderStage(GLuint shader) { - return MG_State_T::programState->BuildShaderStage(shader); - } - - GLenum FinalizeProgramPipeline(GLuint program) { - return MG_State_T::programState->FinalizeProgramPipeline(program); - } - - GLenum ActivateRenderProgram(GLuint program) { - return MG_State_T::programState->ActivateRenderProgram(program); - } - - GLenum DefineProgramAttributeLocation(GLuint program, GLuint index, const GLchar* name) { - return MG_State_T::programState->DefineProgramAttributeLocation(program, index, name); - } - - GLint QueryProgramAttributeLocation(GLuint program, const GLchar* name) { - return MG_State_T::programState->QueryProgramAttributeLocation(program, name); - } - - GLint QueryProgramUniformLocation(GLuint program, const GLchar* name) { - return MG_State_T::programState->QueryProgramUniformLocation(program, name); - } - - GLenum QueryProgramStateIntVector(GLuint program, GLenum pname, GLint* params) { - return MG_State_T::programState->QueryProgramStateIntVector(program, pname, params); - } - - GLenum QueryShaderStateIntVector(GLuint shader, GLenum pname, GLint* params) { - return MG_State_T::programState->QueryShaderStateIntVector(shader, pname, params); - } - -#define IMPLEMENT_UNIFORM_FUNCTIONS(type, suffix, vecType) \ -void UpdateProgramUniform##suffix##1(GLint location, type v0) { \ - MG_State_T::programState->UpdateUniform##suffix##1(location, v0); \ -} \ -void UpdateProgramUniform##suffix##2(GLint location, type v0, type v1) { \ - MG_State_T::programState->UpdateUniform##suffix##2(location, v0, v1); \ -} \ -void UpdateProgramUniform##suffix##3(GLint location, type v0, type v1, type v2) { \ - MG_State_T::programState->UpdateUniform##suffix##3(location, v0, v1, v2); \ -} \ -void UpdateProgramUniform##suffix##4(GLint location, type v0, type v1, type v2, type v3) { \ - MG_State_T::programState->UpdateUniform##suffix##4(location, v0, v1, v2, v3); \ - } \ -void UpdateProgramUniform##suffix##Vector1(GLint location, GLsizei count, const type* value) { \ - MG_State_T::programState->UpdateUniform##suffix##Vector1(location, count,value); \ - } \ -void UpdateProgramUniform##suffix##Vector2(GLint location, GLsizei count, const type* value) { \ - MG_State_T::programState->UpdateUniform##suffix##Vector2(location, count, value); \ - } \ -void UpdateProgramUniform##suffix##Vector3(GLint location, GLsizei count, const type* value) { \ - MG_State_T::programState->UpdateUniform##suffix##Vector3(location, count, value); \ - } \ -void UpdateProgramUniform##suffix##Vector4(GLint location, GLsizei count, const type* value) { \ - MG_State_T::programState->UpdateUniform##suffix##Vector4(location, count, value); \ - } - - IMPLEMENT_UNIFORM_FUNCTIONS(GLfloat, Float, GL_FLOAT_VEC4) - IMPLEMENT_UNIFORM_FUNCTIONS(GLint, Int, GL_INT_VEC4) - IMPLEMENT_UNIFORM_FUNCTIONS(GLuint, UInt, GL_UNSIGNED_INT_VEC4) - IMPLEMENT_UNIFORM_FUNCTIONS(GLboolean, Bool, GL_BOOL_VEC4) -#undef IMPLEMENT_UNIFORM_FUNCTIONS - -#define IMPLEMENT_MATRIX_FUNCTIONS(suffix, matrixType) \ -void UpdateProgramUniformMatrix##suffix##Vector(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) { \ - MG_State_T::programState->UpdateUniformMatrix##suffix##Vector(location, count, transpose, value); \ -} - - IMPLEMENT_MATRIX_FUNCTIONS(2x2, GL_FLOAT_MAT2) - IMPLEMENT_MATRIX_FUNCTIONS(3x3, GL_FLOAT_MAT3) - IMPLEMENT_MATRIX_FUNCTIONS(4x4, GL_FLOAT_MAT4) - IMPLEMENT_MATRIX_FUNCTIONS(2x3, GL_FLOAT_MAT2x3) - IMPLEMENT_MATRIX_FUNCTIONS(2x4, GL_FLOAT_MAT2x4) - IMPLEMENT_MATRIX_FUNCTIONS(3x2, GL_FLOAT_MAT3x2) - IMPLEMENT_MATRIX_FUNCTIONS(3x4, GL_FLOAT_MAT3x4) - IMPLEMENT_MATRIX_FUNCTIONS(4x2, GL_FLOAT_MAT4x2) - IMPLEMENT_MATRIX_FUNCTIONS(4x3, GL_FLOAT_MAT4x3) -#undef IMPLEMENT_MATRIX_FUNCTIONS - - GLuint GetCurrentProgram() { - return MG_State_T::programState->GetCurrentProgram(); - } - - bool SetProgramStatus(GLuint program, GLboolean status) { - return MG_State_T::programState->SetProgramStatus(program, status); - } - - bool SetShaderStatus(GLuint shader, GLboolean status) { - return MG_State_T::programState->SetShaderStatus(shader, status); - } - - // Framebuffer - GLenum MG_State::CreateFramebuffer(GLuint* framebuffer) { - return MG_State_T::framebufferState->Create(framebuffer); - } - - GLenum MG_State::CreateFramebuffers(GLsizei n, GLuint* framebuffers) { - return MG_State_T::framebufferState->CreateN(n, framebuffers); - } - - GLenum MG_State::DeleteFramebuffer(GLuint framebuffer) { - return MG_State_T::framebufferState->Delete(framebuffer); - } - - GLenum MG_State::BindFramebuffer(GLenum target, GLuint framebuffer) { - return MG_State_T::framebufferState->Bind(target, framebuffer); - } - - GLenum MG_State::AttachTexture2DToFramebuffer(GLenum target, GLenum attachment, GLenum textarget, - GLuint texture, GLint level) { - return MG_State_T::framebufferState->AttachTexture2D(target, attachment, textarget, - texture, level); - } - - GLenum MG_State::ValidateFramebufferCompleteness(GLenum target) { - return MG_State_T::framebufferState->ValidateCompleteness(target); - } -} \ No newline at end of file diff --git a/MG/MG_GL/State/Core/GLState.h b/MG/MG_GL/State/Core/GLState.h deleted file mode 100644 index 31017df7..00000000 --- a/MG/MG_GL/State/Core/GLState.h +++ /dev/null @@ -1,149 +0,0 @@ -// -// Created by BZLZHH on 2025/4/4. -// - -#ifndef MOBILEGL_GLSTATE_H -#define MOBILEGL_GLSTATE_H - -struct MG_State_T { - static std::queue glErrorQueue; - static TextureState* textureState; - static CommonState* commonState; - static BufferState* bufferState; - static VertexArrayState* vertexArrayState; - static ProgramState* programState; - static FramebufferState* framebufferState; -}; - -namespace MG_State { - void Init(); - void Destroy(); - void SetError(GLenum error); - GLenum GetError(); - - //Texture - GLenum BindTextureUnit(GLenum textureUnit); - GLenum CreateTexture(GLuint* texture); - GLenum CreateTextures(GLsizei n, GLuint* textures); - GLenum BindTexture(GLenum target, GLuint texture); - GLenum UploadTexture2D(GLenum target, GLint level, GLint internalFormat, - GLsizei width, GLsizei height, GLint border, GLenum format, - GLenum type, const void* data); - GLenum UpdateTextureRegion2D(GLenum target, GLint level, GLint xoffset, - GLint yoffset, GLsizei width, GLsizei height, GLenum format, - GLenum type, const GLvoid* data); - GLenum SetTexturePropertyInt(GLenum target, GLenum pname, GLint param); - GLenum SetTexturePropertyFloat(GLenum target, GLenum pname, GLfloat param); - GLenum DeleteTexture(GLuint texture); - GLenum DeleteTextures(GLsizei n, const GLuint* textures); - GLenum QueryTextureLevelPropertyIntVector(GLenum target, GLint level, GLenum pname, GLint* params); - - // Common - GLenum SetPixelStoreInt(GLenum pname, GLint param); - GLint QueryPixelStoreInt(GLenum pname); - GLenum glEnable(GLenum cap); - GLenum glDisable(GLenum cap); - GLenum glBlendFunc(GLenum sfactor, GLenum dfactor); - GLenum glBlendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); - GLenum glClear(GLbitfield mask); - GLenum glClearColor(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); - GLenum glClearDepth(GLdouble depth); - GLenum glColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); - GLenum glDepthFunc(GLenum func); - GLenum glDepthMask(GLboolean flag); - GLenum glViewport(GLint x, GLint y, GLsizei width, GLsizei height); - - // Buffer - GLenum AcquireBufferMemory(GLenum target, GLenum access, void** mappedPtr); - GLenum AcquireBufferMemoryRange(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access, void** mappedPointer); - GLenum SyncBufferMemory(GLenum target, GLintptr offset, GLsizeiptr length); - GLenum CopyBufferRange(GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); - GLenum ReleaseBufferMemory(GLenum target); - GLenum CreateBuffer(GLuint buffer); - GLenum GenBufferNames(GLsizei n, GLuint* buffers); - GLenum BindBuffer(GLenum target, GLuint buffer); - GLenum CommitBufferStorage(GLenum target, GLsizeiptr size, const void* data, GLenum usage); - GLenum CommitBufferStorageRegion(GLenum target, GLintptr offset, GLsizeiptr size, const void* data); - bool ValidateAllocatedBufferHandle(GLuint buffer); - bool ValidateGeneratedName(GLuint buffer); - void DeleteBuffer(GLuint buffer); - GLenum DeleteBuffers(GLsizei n, const GLuint* buffers); - GLenum QueryBufferPropertyIntVector(GLenum target, GLenum pname, GLint* params); - - // VertexArray - GLenum CreateVertexArray(GLuint* array); - GLenum CreateVertexArrays(GLsizei n, GLuint* arrays); - GLenum GenVertexArraysNames(GLsizei n, GLuint* arrays); - GLenum BindVertexArray(GLuint array); - GLenum EnableVertexAttribArray(GLuint index); - GLenum DisableVertexAttribArray(GLuint index); - GLenum SetVertexAttributeLayout(GLuint index, GLint size, GLenum type, - GLboolean normalized, GLsizei stride, - const void* pointer); - GLenum SetVertexAttributeLayoutInt(GLuint index, GLint size, GLenum type, - GLsizei stride, const void* pointer); - - // Program - GLenum CreateShader(GLenum type, GLuint* shader); - GLenum CreateProgram(GLuint* program); - GLenum DeleteShader(GLuint shader); - GLenum DeleteProgram(GLuint program); - GLenum LinkShaderToProgram(GLuint program, GLuint shader); - GLenum UploadShaderSource(GLuint shader, GLsizei count, const GLchar** string, const GLint* length); - GLenum BuildShaderStage(GLuint shader); - GLenum FinalizeProgramPipeline(GLuint program); - GLenum ActivateRenderProgram(GLuint program); - GLenum DefineProgramAttributeLocation(GLuint program, GLuint index, const GLchar* name); - GLint QueryProgramAttributeLocation(GLuint program, const GLchar* name); - GLint QueryProgramUniformLocation(GLuint program, const GLchar* name); - GLenum QueryProgramStateIntVector(GLuint program, GLenum pname, GLint* params); - GLenum QueryShaderStateIntVector(GLuint shader, GLenum pname, GLint* params); - template - GLenum SetUniform(GLuint program, GLint location, GLsizei count, const T* value, GLenum type); - - template - GLenum SetUniformMatrix(GLuint program, GLint location, GLsizei count, GLboolean transpose, const T* value, GLenum matrixType); - -#define DECLARE_UNIFORM_FUNCTIONS(type, suffix, vecType) \ - void UpdateProgramUniform##suffix##1(GLint location, type v0); \ - void UpdateProgramUniform##suffix##2(GLint location, type v0, type v1); \ - void UpdateProgramUniform##suffix##3(GLint location, type v0, type v1, type v2); \ - void UpdateProgramUniform##suffix##4(GLint location, type v0, type v1, type v2, type v3); \ - void UpdateProgramUniform##suffix##Vector1(GLint location, GLsizei count, const type* value); \ - void UpdateProgramUniform##suffix##Vector2(GLint location, GLsizei count, const type* value); \ - void UpdateProgramUniform##suffix##Vector3(GLint location, GLsizei count, const type* value); \ - void UpdateProgramUniform##suffix##Vector4(GLint location, GLsizei count, const type* value); - DECLARE_UNIFORM_FUNCTIONS(GLfloat, Float, GL_FLOAT) - DECLARE_UNIFORM_FUNCTIONS(GLint, Int, GL_INT) - DECLARE_UNIFORM_FUNCTIONS(GLuint, UInt, GL_UNSIGNED_INT) - DECLARE_UNIFORM_FUNCTIONS(GLboolean, Bool, GL_BOOL) -#undef DECLARE_UNIFORM_FUNCTIONS -#define DECLARE_MATRIX_FUNCTIONS(suffix, matrixType) \ - void UpdateProgramUniformMatrix##suffix##Vector(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value); - DECLARE_MATRIX_FUNCTIONS(2x2, GL_FLOAT_MAT2) - DECLARE_MATRIX_FUNCTIONS(3x3, GL_FLOAT_MAT3) - DECLARE_MATRIX_FUNCTIONS(4x4, GL_FLOAT_MAT4) - DECLARE_MATRIX_FUNCTIONS(2x3, GL_FLOAT_MAT2x3) - DECLARE_MATRIX_FUNCTIONS(2x4, GL_FLOAT_MAT2x4) - DECLARE_MATRIX_FUNCTIONS(3x2, GL_FLOAT_MAT3x2) - DECLARE_MATRIX_FUNCTIONS(3x4, GL_FLOAT_MAT3x4) - DECLARE_MATRIX_FUNCTIONS(4x2, GL_FLOAT_MAT4x2) - DECLARE_MATRIX_FUNCTIONS(4x3, GL_FLOAT_MAT4x3) -#undef DECLARE_MATRIX_FUNCTIONS - - GLuint GetCurrentProgram(); - bool SetProgramStatus(GLuint program, GLboolean status); - bool SetShaderStatus(GLuint shader, GLboolean status); - - // Framebuffer - GLenum CreateFramebuffer(GLuint* framebuffer); - GLenum CreateFramebuffers(GLsizei n, GLuint* framebuffers); - GLenum DeleteFramebuffer(GLuint framebuffer); - GLenum BindFramebuffer(GLenum target, GLuint framebuffer); - GLenum AttachTexture2DToFramebuffer(GLenum target, GLenum attachment, GLenum textarget, - GLuint texture, GLint level); - GLenum ValidateFramebufferCompleteness(GLenum target); -} - - -#endif //MOBILEGL_GLSTATE_H diff --git a/MG/MG_GL/State/Framebuffer/FramebufferState.cpp b/MG/MG_GL/State/Framebuffer/FramebufferState.cpp deleted file mode 100644 index 3bbce11c..00000000 --- a/MG/MG_GL/State/Framebuffer/FramebufferState.cpp +++ /dev/null @@ -1,179 +0,0 @@ -// -// Created by BZLZHH on 2025/5/3. -// - -// TODO: Add more gl error check for framebuffer state manager. -// TODO: Check if the state machine really meets up to OpenGL 3 standard. - -#include "../../../Includes.h" - -GLenum FramebufferState::Create(GLuint* framebuffer) { - if (!framebuffer) return GL_INVALID_VALUE; - GLuint id = freeIds_.empty() ? ++lastId_ : *freeIds_.begin(); - if (!freeIds_.empty()) freeIds_.erase(freeIds_.begin()); - *framebuffer = id; - framebuffers_[id].generated = true; - return GL_NO_ERROR; -} - -GLenum FramebufferState::CreateN(GLsizei n, GLuint* framebuffers) { - if (n < 0) return GL_INVALID_VALUE; - for (GLsizei i = 0; i < n; ++i) { - if (GLenum err = Create(&framebuffers[i])) return err; - } - return GL_NO_ERROR; -} - -GLenum FramebufferState::Delete(GLuint framebuffer) { - if (framebuffer == 0) return GL_INVALID_VALUE; - - if (framebuffers_.erase(framebuffer)) { - // TODO: Prevent the object that uses a freeId from conflicting with legacy object in the backend. - //freeIds_.insert(framebuffer); - for (auto& [target, id] : currentBindings_) { - if (id == framebuffer) id = 0; - } - } - return GL_NO_ERROR; -} - -GLenum FramebufferState::Bind(GLenum target, GLuint framebuffer) { - if (!MG_Constants::Common::Contains(target, MG_Constants::Framebuffer::VALID_TARGETS)) - return GL_INVALID_ENUM; - if (framebuffer != 0 && !ValidateHandle(framebuffer)) - return GL_INVALID_OPERATION; - if (target == GL_FRAMEBUFFER) { - currentBindings_[GL_READ_FRAMEBUFFER] = framebuffer; - currentBindings_[GL_DRAW_FRAMEBUFFER] = framebuffer; - } else { - currentBindings_[target] = framebuffer; - } - return GL_NO_ERROR; -} - -GLenum FramebufferState::AttachTexture2D(GLenum target, GLenum attachment, - GLenum textarget, GLuint texture, GLint level) { - if (!MG_Constants::Common::Contains(attachment, MG_Constants::Framebuffer::VALID_ATTACHMENTS) || - !MG_Constants::Common::Contains(textarget, MG_Constants::Texture::VALID_TARGETS)) - return GL_INVALID_ENUM; - if (target == GL_FRAMEBUFFER) { - target = GL_DRAW_FRAMEBUFFER; - -// if (currentBindings_[GL_READ_FRAMEBUFFER] == currentBindings_[GL_DRAW_FRAMEBUFFER]) { -// target = GL_DRAW_FRAMEBUFFER; -// } else { -// if (currentBindings_[GL_READ_FRAMEBUFFER] != 0) { -// GLenum err = AttachTexture2D(GL_READ_FRAMEBUFFER, attachment, textarget, texture, level); -// if (err != GL_NO_ERROR) -// return err; -// } -// if (currentBindings_[GL_DRAW_FRAMEBUFFER] != 0) { -// GLenum err = AttachTexture2D(GL_DRAW_FRAMEBUFFER, attachment, textarget, texture, level); -// if (err != GL_NO_ERROR) -// return err; -// } -// return GL_NO_ERROR; -// } - } - FramebufferObject* fbo = GetCurrentFBO(target); - if (!fbo) return GL_INVALID_OPERATION; - if (texture != 0 && !MG_State_T::textureState->IsTexture(texture)) - return GL_INVALID_VALUE; - FramebufferAttachment att; - att.type = GL_TEXTURE_2D; - att.handle = texture; - att.mipLevel = level; - fbo->attachments[attachment] = att; - - if (texture != 0) { - GLint params = 0; - MG_State_T::textureState->QueryLevelPropertyIntVector( - textarget, level, GL_TEXTURE_WIDTH, ¶ms); - fbo->width = params; - MG_State_T::textureState->QueryLevelPropertyIntVector( - textarget, level, GL_TEXTURE_HEIGHT, ¶ms); - fbo->height = params; - } - UpdateCompleteness(*fbo); - return GL_NO_ERROR; -} - -GLenum FramebufferState::ValidateCompleteness(GLenum target) { - if (target == GL_FRAMEBUFFER) target = GL_DRAW_FRAMEBUFFER; - FramebufferObject* fbo = GetCurrentFBO(target); - if (!fbo) return GL_INVALID_OPERATION; - return fbo->status; -} - -void FramebufferState::UpdateCompleteness(FramebufferObject& fbo) { - if (fbo.attachments.empty()) { - fbo.status = GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT; - return; - } - bool hasColor = false; - bool hasDepth = false; - bool hasStencil = false; - GLsizei width = 0, height = 0; - for (const auto& [attach, att] : fbo.attachments) { - GLsizei attWidth = 0, attHeight = 0; - if (att.handle != 0) { - GLint params = 0; - MG_State_T::textureState->QueryLevelPropertyIntVector( - GL_TEXTURE_2D, att.mipLevel, GL_TEXTURE_WIDTH, ¶ms); - attWidth = params; - MG_State_T::textureState->QueryLevelPropertyIntVector( - GL_TEXTURE_2D, att.mipLevel, GL_TEXTURE_HEIGHT, ¶ms); - attHeight = params; - } - if (width == 0) { - width = attWidth; - height = attHeight; - } else if (attWidth != width || attHeight != height) { - fbo.status = GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS; - return; - } - - if (attach == GL_DEPTH_ATTACHMENT) hasDepth = true; - if (attach == GL_STENCIL_ATTACHMENT) hasStencil = true; - if (attach >= GL_COLOR_ATTACHMENT0 && - attach <= GL_COLOR_ATTACHMENT31) hasColor = true; - } - - if (!ValidateAttachmentCombination(fbo)) { - fbo.status = GL_FRAMEBUFFER_UNSUPPORTED; - return; - } - fbo.status = GL_FRAMEBUFFER_COMPLETE; -} - -bool FramebufferState::ValidateAttachmentCombination(const FramebufferObject& fbo) { - bool depthStencilConflict = false; - for (const auto& [attach, att] : fbo.attachments) { - if (attach == GL_DEPTH_STENCIL_ATTACHMENT) { - GLint internalFormat = 0; - MG_State_T::textureState->QueryLevelPropertyIntVector( - GL_TEXTURE_2D, att.mipLevel, GL_TEXTURE_INTERNAL_FORMAT, &internalFormat); - if (internalFormat != GL_DEPTH24_STENCIL8 && - internalFormat != GL_DEPTH32F_STENCIL8) { - return false; - } - } - } - return true; -} - -FramebufferObject* FramebufferState::GetCurrentFBO(GLenum target) { - auto it = currentBindings_.find(target); - if (it == currentBindings_.end()) return nullptr; - - GLuint id = it->second; - if (id == 0) return nullptr; - - auto fboIt = framebuffers_.find(id); - return (fboIt != framebuffers_.end()) ? &fboIt->second : nullptr; -} - -bool FramebufferState::ValidateHandle(GLuint framebuffer) { - return framebuffers_.count(framebuffer) && - framebuffers_[framebuffer].generated; -} \ No newline at end of file diff --git a/MG/MG_GL/State/Framebuffer/FramebufferState.h b/MG/MG_GL/State/Framebuffer/FramebufferState.h deleted file mode 100644 index 0ca281ad..00000000 --- a/MG/MG_GL/State/Framebuffer/FramebufferState.h +++ /dev/null @@ -1,46 +0,0 @@ -// -// Created by BZLZHH on 2025/5/3. -// - -#ifndef MOBILEGL_FRAMEBUFFERSTATE_H -#define MOBILEGL_FRAMEBUFFERSTATE_H - -struct FramebufferAttachment { - GLenum type = GL_NONE; - GLuint handle = 0; - GLint mipLevel = 0; - GLint zoffset = 0; -}; - -struct FramebufferObject { - bool generated = false; - MG_Global::unordered_map attachments; - GLenum status = GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT; - GLsizei width = 0; - GLsizei height = 0; -}; - -class FramebufferState { -public: - // Return: the validity of the operation - GLenum Create(GLuint* framebuffer); - GLenum CreateN(GLsizei n, GLuint* framebuffers); - GLenum Delete(GLuint framebuffer); - GLenum Bind(GLenum target, GLuint framebuffer); - GLenum AttachTexture2D(GLenum target, GLenum attachment, - GLenum textarget, GLuint texture, GLint level); - GLenum ValidateCompleteness(GLenum target); - FramebufferObject* GetCurrentFBO(GLenum target); - - MG_Global::unordered_map currentBindings_; // READ/DRAW - -private: - MG_Global::unordered_map framebuffers_; - std::set freeIds_; - GLuint lastId_ = 0; - bool ValidateHandle(GLuint framebuffer); - static void UpdateCompleteness(FramebufferObject& fbo); - static bool ValidateAttachmentCombination(const FramebufferObject& fbo); -}; - -#endif //MOBILEGL_FRAMEBUFFERSTATE_H diff --git a/MG/MG_GL/State/Program/ProgramState.cpp b/MG/MG_GL/State/Program/ProgramState.cpp deleted file mode 100644 index ee27e8cc..00000000 --- a/MG/MG_GL/State/Program/ProgramState.cpp +++ /dev/null @@ -1,600 +0,0 @@ -// -// Created by BZLZHH on 2025/5/1. - -// TODO: Add more gl error check for buffer state manager. -// TODO: Check if the state machine really meets up to OpenGL 3 standard. - -#include "../../../Includes.h" - -ProgramState::ProgramState() { - glslang::InitializeProcess(); -} - -ProgramState::~ProgramState() { - glslang::FinalizeProcess(); -} - -GLenum ProgramState::CreateProgram(GLuint* program) { - MG_Util::Debug::LogD("MG_State: Program: CreateProgram called, program ptr=%p", program); - if (!program) { - MG_Util::Debug::LogE("MG_State: Program: CreateProgram error: program pointer is null"); - return GL_INVALID_VALUE; - } - - GLuint id = freeProgramIds_.empty() ? ++lastProgramId_ : *freeProgramIds_.begin(); - if (!freeProgramIds_.empty()) - freeProgramIds_.erase(freeProgramIds_.begin()); - - ProgramObject obj; - obj.linked = {UncertainBool::Unknown, UncertainBool::False}; - obj.linkStatus = GL_FALSE; - obj.markedForDeletion = false; - programs_[id] = obj; - *program = id; - MG_Util::Debug::LogD("MG_State: Program: CreateProgram success, new id=%u", id); - return GL_NO_ERROR; -} - -GLenum ProgramState::DeleteProgram(GLuint program) { - MG_Util::Debug::LogD("MG_State: Program: DeleteProgram called, id=%u", program); - if (!ValidateProgram_(program)) { - MG_Util::Debug::LogE("MG_State: Program: DeleteProgram error: invalid program id %u", program); - return GL_INVALID_VALUE; - } - - programs_.erase(program); - //freeProgramIds_.insert(program); - if (currentProgram_ == program) - currentProgram_ = 0; - MG_Util::Debug::LogD("MG_State: Program: DeleteProgram success, id=%u", program); - return GL_NO_ERROR; -} - -GLenum ProgramState::LinkShaderToProgram(GLuint program, GLuint shader) { - MG_Util::Debug::LogD("MG_State: Program: LinkShaderToProgram called, program=%u, shader=%u", - program, shader); - if (!ValidateProgram_(program) || !ValidateShader_(shader)) { - MG_Util::Debug::LogE("MG_State: Program: LinkShaderToProgram error: invalid ids program=%u shader=%u", - program, shader); - return GL_INVALID_VALUE; - } - - auto& prog = programs_[program]; - if (std::find(prog.attachedShaders.begin(), - prog.attachedShaders.end(), shader) != prog.attachedShaders.end()) { - MG_Util::Debug::LogW("MG_State: Program: LinkShaderToProgram warning: shader %u already attached to program %u", - shader, program); - return GL_INVALID_OPERATION; - } - - prog.attachedShaders.push_back(shader); - MG_Util::Debug::LogD("MG_State: Program: LinkShaderToProgram success: shader %u attached to program %u", - shader, program); - return GL_NO_ERROR; -} - -GLenum ProgramState::FinalizeProgramPipeline(GLuint program) { - MG_Util::Debug::LogD("MG_State: Program: FinalizeProgramPipeline called, id=%u", program); - if (!ValidateProgram_(program)) { - MG_Util::Debug::LogE("MG_State: Program: FinalizeProgramPipeline error: invalid program id %u", program); - return GL_INVALID_VALUE; - } - auto& prog = programs_[program]; - - for (GLuint shader : prog.attachedShaders) { - if (!shaders_[shader].compiled.toBool()) { - MG_Util::Debug::LogE("MG_State: Program: FinalizeProgramPipeline error: shader %u not compiled", shader); - return GL_INVALID_OPERATION; - } - } - - prog.infoLog.clear(); - - for (GLuint shaderId : prog.attachedShaders) { - auto& shader = shaders_[shaderId]; - if (!shader.compiled.toBool() || shader.compiledSpirv.empty()) { - prog.infoLog = "Program linking failed: \n" + - MG_Util::Program::GetShaderTypeName(shader.type) + " is not compiled."; - prog.linked = UncertainBool::False; - prog.linkStatus = GL_FALSE; - MG_Util::Debug::LogE("MG_State: Program: FinalizeProgramPipeline error: %s", prog.infoLog.c_str()); - return GL_INVALID_OPERATION; - } - } - - std::vector> allSpirv = - MG_Util::Program::CompileMultipleShadersToSPIRV(*this, prog, prog.infoLog); - - if (!prog.infoLog.empty() || allSpirv.empty()) { - prog.linked = UncertainBool::False; - prog.linkStatus = GL_FALSE; - prog.infoLog = "Program linking failed during SPIR-V compilation: " + prog.infoLog; - MG_Util::Debug::LogE("MG_State: Program: FinalizeProgramPipeline error: %s", prog.infoLog.c_str()); - return GL_INVALID_OPERATION; - } - - MG_Util::Program::ReflectSPIRVUniforms(allSpirv, prog, prog.infoLog); - - for (size_t i = 0; i < prog.attachedShaders.size(); ++i) { - GLuint shaderId = prog.attachedShaders[i]; - shaders_[shaderId].source = MG_Util::Program::CompileSPIRVToGLSL(allSpirv[i], 450, false, false); - } - - if (!prog.infoLog.empty()) { - prog.linked = UncertainBool::False; - prog.linkStatus = GL_FALSE; - prog.infoLog = "Program linking failed: " + prog.infoLog; - MG_Util::Debug::LogE("MG_State: Program: FinalizeProgramPipeline error: %s", prog.infoLog.c_str()); - return GL_INVALID_OPERATION; - } - - // TODO: Support explicitly assign attrib locations in the shaders. - - prog.linked = {UncertainBool::Unknown, UncertainBool::True}; - prog.linkStatus = GL_TRUE; - - CleanupShaders_(); - - MG_Util::Program::DumpUniforms(*this, program); - MG_Util::Debug::LogD("MG_State: Program: FinalizeProgramPipeline success, id=%u", program); - return GL_NO_ERROR; -} - -GLenum ProgramState::ActivateRenderProgram(GLuint program) { - MG_Util::Debug::LogD("MG_State: Program: ActivateRenderProgram called, id=%u", program); - if (program != 0 && !ValidateProgram_(program)) { - MG_Util::Debug::LogE("MG_State: Program: ActivateRenderProgram error: invalid program id %u", program); - return GL_INVALID_VALUE; - } - - MG_Util::Program::DumpCurrentUniforms(*this); - currentProgram_ = program; - MG_Util::Program::DumpCurrentUniforms(*this); - MG_Util::Debug::LogD("MG_State: Program: ActivateRenderProgram success, current program=%u", currentProgram_); - return GL_NO_ERROR; -} - -GLenum ProgramState::DefineProgramAttributeLocation(GLuint program, GLuint index, const GLchar* name) { - MG_Util::Debug::LogD("MG_State: Program: DefineProgramAttributeLocation called, program=%u, index=%u, name=%s", - program, index, name); - if (!ValidateProgram_(program)) { - MG_Util::Debug::LogE("MG_State: Program: DefineProgramAttributeLocation error: invalid program id %u", program); - return GL_INVALID_VALUE; - } - if (index >= GL_MAX_VERTEX_ATTRIBS) { - MG_Util::Debug::LogE("MG_State: Program: DefineProgramAttributeLocation error: index %u out of range", index); - return GL_INVALID_VALUE; - } - - programs_[program].attribLocations[name] = index; - MG_Util::Debug::LogD("MG_State: Program: DefineProgramAttributeLocation success: %s -> %u", name, index); - return GL_NO_ERROR; -} - -GLint ProgramState::QueryProgramAttributeLocation(GLuint program, const GLchar* name) { - MG_Util::Debug::LogD("MG_State: Program: QueryProgramAttributeLocation called, program=%u, name=%s", - program, name); - if (!ValidateProgram_(program)) { - MG_Util::Debug::LogE("MG_State: Program: QueryProgramAttributeLocation error: invalid program id %u", program); - return -1; - } - - auto& prog = programs_[program]; - auto it = prog.attribLocations.find(name); - if (it != prog.attribLocations.end()) { - GLint loc = it->second; - MG_Util::Debug::LogD("MG_State: Program: QueryProgramAttributeLocation success: %s -> %d", name, loc); - return loc; - } else { - MG_Util::Debug::LogW("MG_State: Program: QueryProgramAttributeLocation warning: name '%s' not found, generating new one...", name); - // Find the next available location - GLint loc = (GLint)prog.attribLocations.size(); - bool locInUse; - do { - locInUse = false; - for (const auto& pair : prog.attribLocations) { - if (pair.second == loc) { - locInUse = true; - loc++; - break; - } - } - } while (locInUse); - prog.attribLocations[name] = loc; - MG_Util::Debug::LogD("MG_State: Program: QueryProgramAttributeLocation success: %s -> %d", name, loc); - return prog.attribLocations[name]; - } -} - -GLenum ProgramState::QueryProgramStateIntVector(GLuint program, GLenum pname, GLint* params) { - MG_Util::Debug::LogD("MG_State: Program: QueryProgramStateIntVector called, program=%u, pname=0x%X", - program, pname); - if (!ValidateProgram_(program)) { - MG_Util::Debug::LogE("MG_State: Program: QueryProgramStateIntVector error: invalid program id %u", program); - return GL_INVALID_VALUE; - } - auto& prog = programs_[program]; - - switch (pname) { - case GL_LINK_STATUS: *params = prog.linkStatus; break; - case GL_DELETE_STATUS: *params = prog.markedForDeletion; break; - case GL_ATTACHED_SHADERS:*params = (GLint)prog.attachedShaders.size(); break; - default: - MG_Util::Debug::LogE("MG_State: Program: QueryProgramStateIntVector error: invalid pname 0x%X", pname); - return GL_INVALID_ENUM; - } - MG_Util::Debug::LogD("MG_State: Program: QueryProgramStateIntVector success: value=%d", *params); - return GL_NO_ERROR; -} - -GLenum ProgramState::QueryShaderStateIntVector(GLuint shader, GLenum pname, GLint* params) { - MG_Util::Debug::LogD("MG_State: Program: QueryShaderStateIntVector called, shader=%u, pname=0x%X", - shader, pname); - if (!ValidateShader_(shader)) { - MG_Util::Debug::LogE("MG_State: Program: QueryShaderStateIntVector error: invalid shader id %u", shader); - return GL_INVALID_VALUE; - } - auto& obj = shaders_[shader]; - - switch (pname) { - case GL_COMPILE_STATUS: *params = obj.compileStatus; break; - case GL_DELETE_STATUS: *params = obj.markedForDeletion; break; - case GL_SHADER_TYPE: *params = obj.type; break; - default: - MG_Util::Debug::LogE("MG_State: Program: QueryShaderStateIntVector error: invalid pname 0x%X", pname); - return GL_INVALID_ENUM; - } - MG_Util::Debug::LogD("MG_State: Program: QueryShaderStateIntVector success: value=%d", *params); - return GL_NO_ERROR; -} - -template -GLenum ProgramState::SetUniform(GLuint program, GLint location, GLsizei count, const T* value, GLenum type) { - MG_Util::Debug::LogD("MG_State: Program: SetUniform called, program=%u, location=%d, count=%d, type=0x%X", - program, location, count, type); - if (!ValidateProgram_(program)) { - MG_Util::Debug::LogE("MG_State: Program: SetUniform error: invalid program id %u", program); - return GL_INVALID_VALUE; - } - if (location < -1) { - MG_Util::Debug::LogE("MG_State: Program: SetUniform error: invalid location %d", location); - return GL_INVALID_VALUE; - } - if (count < 0) { - MG_Util::Debug::LogE("MG_State: Program: SetUniform error: invalid count %d", count); - return GL_INVALID_VALUE; - } - if (location == -1) { - MG_Util::Debug::LogW("MG_State: Program: SetUniform warning: location -1, no-op"); - return GL_NO_ERROR; - } - - ProgramObject& prog = programs_[program]; - std::string uniformName; - for (const auto& pair : prog.uniformLocations) { - if (pair.second == location) { - uniformName = pair.first; - break; - } - } - if (uniformName.empty()) { - MG_Util::Debug::LogE("MG_State: Program: SetUniform error: no uniform at location %d in program %u", - location, program); - return GL_INVALID_OPERATION; - } - - UniformValue& uniform = prog.uniformValues[uniformName]; - - uniform.setData(type, count, value); - MG_Util::Debug::LogD("MG_State: Program: SetUniform success: %s set", uniformName.c_str()); - return GL_NO_ERROR; -} - -template -GLenum ProgramState::SetUniformMatrix(GLuint program, GLint location, GLsizei count, GLboolean transpose, const T* value, GLenum matrixType) { - MG_Util::Debug::LogD("MG_State: Program: SetUniformMatrix called, program=%u, location=%d, count=%d, matrixType=0x%X", - program, location, count, matrixType); - (void)transpose; - if (!ValidateProgram_(program)) { - MG_Util::Debug::LogE("MG_State: Program: SetUniformMatrix error: invalid program id %u", program); - return GL_INVALID_VALUE; - } - if (location < -1) { - MG_Util::Debug::LogE("MG_State: Program: SetUniformMatrix error: invalid location %d", location); - return GL_INVALID_VALUE; - } - if (count < 0) { - MG_Util::Debug::LogE("MG_State: Program: SetUniformMatrix error: invalid count %d", count); - return GL_INVALID_VALUE; - } - if (location == -1) { - MG_Util::Debug::LogW("MG_State: Program: SetUniformMatrix warning: location -1, no-op"); - return GL_NO_ERROR; - } - - ProgramObject& prog = programs_[program]; - std::string uniformName; - for (const auto& pair : prog.uniformLocations) { - if (pair.second == location) { - uniformName = pair.first; - break; - } - } - if (uniformName.empty()) { - MG_Util::Debug::LogE("MG_State: Program: SetUniformMatrix error: no uniform at location %d in program %u", - location, program); - return GL_INVALID_OPERATION; - } - - UniformValue& uniform = prog.uniformValues[uniformName]; - uniform.setData(matrixType, count, value); - MG_Util::Debug::LogD("MG_State: Program: SetUniformMatrix success: %s set", uniformName.c_str()); - return GL_NO_ERROR; -} - -#define IMPLEMENT_UNIFORM_FUNCTIONS(type, suffix, vecType) \ -void ProgramState::UpdateUniform##suffix##1(GLint location, type v0) { \ - MG_Util::Debug::LogD("MG_State: Program: UpdateUniform" #suffix "1 called, location=%d", location); \ - SetUniform(currentProgram_, location, 1, &v0, vecType); \ -} \ -void ProgramState::UpdateUniform##suffix##2(GLint location, type v0, type v1) { \ - type values[2] = {v0, v1}; \ - MG_Util::Debug::LogD("MG_State: Program: UpdateUniform" #suffix "2 called, location=%d", location); \ - SetUniform(currentProgram_, location, 1, values, vecType); \ -} \ -void ProgramState::UpdateUniform##suffix##3(GLint location, type v0, type v1, type v2) { \ - type values[3] = {v0, v1, v2}; \ - MG_Util::Debug::LogD("MG_State: Program: UpdateUniform" #suffix "3 called, location=%d", location); \ - SetUniform(currentProgram_, location, 1, values, vecType); \ -} \ -void ProgramState::UpdateUniform##suffix##4(GLint location, type v0, type v1, type v2, type v3) { \ - type values[4] = {v0, v1, v2, v3}; \ - MG_Util::Debug::LogD("MG_State: Program: UpdateUniform" #suffix "4 called, location=%d", location); \ - SetUniform(currentProgram_, location, 1, values, vecType); \ - } \ -void ProgramState::UpdateUniform##suffix##Vector1(GLint location, GLsizei count, const type* value) { \ - MG_Util::Debug::LogD("MG_State: Program: UpdateUniform" #suffix "Vector1 called, location=%d, count=%d", location, count); \ - SetUniform(currentProgram_, location, count, value, vecType); \ - } \ -void ProgramState::UpdateUniform##suffix##Vector2(GLint location, GLsizei count, const type* value) { \ - MG_Util::Debug::LogD("MG_State: Program: UpdateUniform" #suffix "Vector2 called, location=%d, count=%d", location, count); \ - SetUniform(currentProgram_, location, count, value, vecType); \ - } \ -void ProgramState::UpdateUniform##suffix##Vector3(GLint location, GLsizei count, const type* value) { \ - MG_Util::Debug::LogD("MG_State: Program: UpdateUniform" #suffix "Vector3 called, location=%d, count=%d", location, count); \ - SetUniform(currentProgram_, location, count, value, vecType); \ - } \ -void ProgramState::UpdateUniform##suffix##Vector4(GLint location, GLsizei count, const type* value) { \ - MG_Util::Debug::LogD("MG_State: Program: UpdateUniform" #suffix "Vector4 called, location=%d, count=%d", location, count); \ - SetUniform(currentProgram_, location, count, value, vecType); \ - } - -IMPLEMENT_UNIFORM_FUNCTIONS(GLfloat, Float, GL_FLOAT_VEC4) -IMPLEMENT_UNIFORM_FUNCTIONS(GLint, Int, GL_INT_VEC4) -IMPLEMENT_UNIFORM_FUNCTIONS(GLuint, UInt, GL_UNSIGNED_INT_VEC4) -IMPLEMENT_UNIFORM_FUNCTIONS(GLboolean, Bool, GL_BOOL_VEC4) -#undef IMPLEMENT_UNIFORM_FUNCTIONS - -#define IMPLEMENT_MATRIX_FUNCTIONS(suffix, matrixType) \ -void ProgramState::UpdateUniformMatrix##suffix##Vector(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) { \ - MG_Util::Debug::LogD("MG_State: Program: UpdateUniformMatrix" #suffix "Vector called, location=%d, count=%d", location, count); \ - SetUniformMatrix(currentProgram_, location, count, transpose, value, matrixType); \ -} - -IMPLEMENT_MATRIX_FUNCTIONS(2x2, GL_FLOAT_MAT2) -IMPLEMENT_MATRIX_FUNCTIONS(3x3, GL_FLOAT_MAT3) -IMPLEMENT_MATRIX_FUNCTIONS(4x4, GL_FLOAT_MAT4) -IMPLEMENT_MATRIX_FUNCTIONS(2x3, GL_FLOAT_MAT2x3) -IMPLEMENT_MATRIX_FUNCTIONS(2x4, GL_FLOAT_MAT2x4) -IMPLEMENT_MATRIX_FUNCTIONS(3x2, GL_FLOAT_MAT3x2) -IMPLEMENT_MATRIX_FUNCTIONS(3x4, GL_FLOAT_MAT3x4) -IMPLEMENT_MATRIX_FUNCTIONS(4x2, GL_FLOAT_MAT4x2) -IMPLEMENT_MATRIX_FUNCTIONS(4x3, GL_FLOAT_MAT4x3) -#undef IMPLEMENT_MATRIX_FUNCTIONS - -GLint ProgramState::QueryProgramUniformLocation(GLuint program, const GLchar* name) { - MG_Util::Debug::LogD("MG_State: Program: QueryProgramUniformLocation called, program=%u, name=%s", program, name); - if (!ValidateProgram_(program)) { - MG_Util::Debug::LogE("MG_State: Program: QueryProgramUniformLocation error: invalid program id %u", program); - return -1; - } - auto& prog = programs_[program]; - auto it = prog.uniformLocations.find(name); - if (it != prog.uniformLocations.end()) { - GLint loc = it->second; - MG_Util::Debug::LogD("MG_State: Program: QueryProgramUniformLocation success: %s -> %d", name, loc); - return loc; - } - MG_Util::Debug::LogW("MG_State: Program: QueryProgramUniformLocation warning: name '%s' not found", name); - return -1; -} - -bool ProgramState::SetProgramStatus(GLuint program, GLboolean status) { - MG_Util::Debug::LogD("MG_State: Program: SetProgramStatus called, program=%u, status=%d", program, status); - if (!ValidateProgram_(program)) { - MG_Util::Debug::LogE("MG_State: Program: SetProgramStatus error: invalid program id %u", program); - return false; - } - auto& prog = programs_[program]; - if (prog.linked.getValue() != UncertainBool::Unknown) { - MG_Util::Debug::LogW("MG_State: Program: SetProgramStatus warning: link state already known"); - return false; - } - prog.linked = (status == GL_TRUE) ? UncertainBool::True : UncertainBool::False; - prog.linkStatus = status; - MG_Util::Debug::LogD("MG_State: Program: SetProgramStatus success, status=%d", status); - return true; -} - -GLuint ProgramState::GetCurrentProgram() const { - MG_Util::Debug::LogD("MG_State: Program: GetCurrentProgram called, returning %u", currentProgram_); - return currentProgram_; -} - -const ShaderObject* ProgramState::GetShaderObject(GLuint shader) const { - MG_Util::Debug::LogD("MG_State: Program: GetShaderObject called, shader=%u", shader); - auto it = shaders_.find(shader); - if (it == shaders_.end()) { - MG_Util::Debug::LogW("MG_State: Program: GetShaderObject warning: invalid shader id %u", shader); - return nullptr; - } - MG_Util::Debug::LogD("MG_State: Program: GetShaderObject success, returning object"); - return &(it->second); -} - -const ProgramObject* ProgramState::GetProgramObject(GLuint program) const { - MG_Util::Debug::LogD("MG_State: Program: GetProgramObject called, program=%u", program); - auto it = programs_.find(program); - if (it == programs_.end()) { - MG_Util::Debug::LogW("MG_State: Program: GetProgramObject warning: invalid program id %u", program); - return nullptr; - } - MG_Util::Debug::LogD("MG_State: Program: GetProgramObject success, returning object"); - return &(it->second); -} - -bool ProgramState::ValidateProgram_(GLuint program) { - bool ok = programs_.count(program) && !programs_[program].markedForDeletion; - MG_Util::Debug::LogD("MG_State: Program: ValidateProgram_ called, program=%u, result=%d", program, ok); - return ok; -} - -void ProgramState::CleanupShaders_() { - MG_Util::Debug::LogD("MG_State: Program: CleanupShaders_ start"); - auto it = shaders_.begin(); - while (it != shaders_.end()) { - if (it->second.markedForDeletion) { - bool inUse = false; - for (auto& [progId, program] : programs_) { - if (std::find(program.attachedShaders.begin(), - program.attachedShaders.end(), it->first) != program.attachedShaders.end()) { - inUse = true; - break; - } - } - if (!inUse) { - MG_Util::Debug::LogD("MG_State: Program: CleanupShaders_ deleting shader %u", it->first); - // freeShaderIds_.insert(it->first); - it = shaders_.erase(it); - continue; - } - } - ++it; - } - MG_Util::Debug::LogD("MG_State: Program: CleanupShaders_ end"); -} - -// UniformValue -template -void UniformValue::setData(GLenum uniformType, GLsizei count_, const T* values) { - MG_Util::Debug::LogD("MG_State: Program: UniformValue::setData called, type=0x%X, count=%d", uniformType, count_); - //type = uniformType; - count = count_; - - floatData.clear(); - intData.clear(); - uintData.clear(); - boolData.clear(); - - switch (type) { - case GL_FLOAT: numElements = count_ * 1; break; - case GL_FLOAT_VEC2: numElements = count_ * 2; break; - case GL_FLOAT_VEC3: numElements = count_ * 3; break; - case GL_FLOAT_VEC4: numElements = count_ * 4; break; - case GL_INT: numElements = count_ * 1; break; - case GL_INT_VEC2: numElements = count_ * 2; break; - case GL_INT_VEC3: numElements = count_ * 3; break; - case GL_INT_VEC4: numElements = count_ * 4; break; - case GL_UNSIGNED_INT: numElements = count_ * 1; break; - case GL_UNSIGNED_INT_VEC2: numElements = count_ * 2; break; - case GL_UNSIGNED_INT_VEC3: numElements = count_ * 3; break; - case GL_UNSIGNED_INT_VEC4: numElements = count_ * 4; break; - case GL_BOOL: numElements = count_ * 1; break; - case GL_BOOL_VEC2: numElements = count_ * 2; break; - case GL_BOOL_VEC3: numElements = count_ * 3; break; - case GL_BOOL_VEC4: numElements = count_ * 4; break; - case GL_FLOAT_MAT2: numElements = count_ * 4; break; // 2x2 - case GL_FLOAT_MAT3: numElements = count_ * 9; break; // 3x3 - case GL_FLOAT_MAT4: numElements = count_ * 16; break; // 4x4 - case GL_FLOAT_MAT2x3: numElements = count_ * 6; break; // 2x3 - case GL_FLOAT_MAT2x4: numElements = count_ * 8; break; // 2x4 - case GL_FLOAT_MAT3x2: numElements = count_ * 6; break; // 3x2 - case GL_FLOAT_MAT3x4: numElements = count_ * 12; break; // 3x4 - case GL_FLOAT_MAT4x2: numElements = count_ * 8; break; // 4x2 - case GL_FLOAT_MAT4x3: numElements = count_ * 12; break; // 4x3 - case GL_SAMPLER_1D: - case GL_SAMPLER_2D: - case GL_SAMPLER_3D: - case GL_SAMPLER_CUBE: - case GL_SAMPLER_1D_SHADOW: - case GL_SAMPLER_2D_SHADOW: - case GL_SAMPLER_CUBE_SHADOW: - case GL_SAMPLER_1D_ARRAY: - case GL_SAMPLER_2D_ARRAY: - case GL_SAMPLER_1D_ARRAY_SHADOW: - case GL_SAMPLER_2D_ARRAY_SHADOW: - case GL_SAMPLER_BUFFER: - case GL_SAMPLER_2D_MULTISAMPLE: - case GL_SAMPLER_2D_MULTISAMPLE_ARRAY: numElements = count_ * 1; break; - default: - MG_Util::Debug::LogW("MG_State: Program: UniformValue::setData warning: unsupported type 0x%X for numElements", uniformType); - numElements = 1; - return; - } - - for (GLsizei i = 0; i < numElements; ++i) { - switch (uniformType) { - case GL_FLOAT: - case GL_FLOAT_VEC2: - case GL_FLOAT_VEC3: - case GL_FLOAT_VEC4: - case GL_FLOAT_MAT2: - case GL_FLOAT_MAT3: - case GL_FLOAT_MAT4: - case GL_FLOAT_MAT2x3: - case GL_FLOAT_MAT2x4: - case GL_FLOAT_MAT3x2: - case GL_FLOAT_MAT3x4: - case GL_FLOAT_MAT4x2: - case GL_FLOAT_MAT4x3: - floatData.push_back(static_cast(values[i])); - break; - case GL_INT: - case GL_INT_VEC2: - case GL_INT_VEC3: - case GL_INT_VEC4: - case GL_SAMPLER_1D: - case GL_SAMPLER_2D: - case GL_SAMPLER_3D: - case GL_SAMPLER_CUBE: - case GL_SAMPLER_1D_SHADOW: - case GL_SAMPLER_2D_SHADOW: - case GL_SAMPLER_CUBE_SHADOW: - case GL_SAMPLER_1D_ARRAY: - case GL_SAMPLER_2D_ARRAY: - case GL_SAMPLER_1D_ARRAY_SHADOW: - case GL_SAMPLER_2D_ARRAY_SHADOW: - case GL_SAMPLER_BUFFER: - case GL_SAMPLER_2D_MULTISAMPLE: - case GL_SAMPLER_2D_MULTISAMPLE_ARRAY: - intData.push_back(static_cast(values[i])); - break; - case GL_UNSIGNED_INT: - case GL_UNSIGNED_INT_VEC2: - case GL_UNSIGNED_INT_VEC3: - case GL_UNSIGNED_INT_VEC4: - uintData.push_back(static_cast(values[i])); - break; - case GL_BOOL: - case GL_BOOL_VEC2: - case GL_BOOL_VEC3: - case GL_BOOL_VEC4: - boolData.push_back(values[i] ? GL_TRUE : GL_FALSE); - break; - default: - MG_Util::Debug::LogW("MG_State: Program: UniformValue::setData warning: unsupported type 0x%X", uniformType); - break; - } - } - MG_Util::Debug::LogD("MG_State: Program: UniformValue::setData end"); -} diff --git a/MG/MG_GL/State/Program/ProgramState.h b/MG/MG_GL/State/Program/ProgramState.h deleted file mode 100644 index d08588c1..00000000 --- a/MG/MG_GL/State/Program/ProgramState.h +++ /dev/null @@ -1,120 +0,0 @@ -// -// Created by BZLZHH on 2025/5/1. -// - -#ifndef MOBILEGL_PROGRAMSTATE_H -#define MOBILEGL_PROGRAMSTATE_H - -struct ShaderObject { - GLenum type; - std::string source; - std::vector compiledSpirv; - UncertainBool compiled; - GLint compileStatus; - std::string infoLog; - bool markedForDeletion; -}; - -struct UniformValue { - GLenum type; - std::vector floatData; - std::vector intData; - std::vector uintData; - std::vector boolData; - GLsizei count; - GLsizei numElements; - - UniformValue() : type(0), count(0) {} - - template - void setData(GLenum uniformType, GLsizei count_, const T* values); -}; - -struct ProgramObject { - std::vector attachedShaders; - UncertainBool linked; - bool dirty; - GLint linkStatus; - std::string infoLog; - MG_Global::unordered_map attribLocations; - MG_Global::unordered_map uniformLocations; - MG_Global::unordered_map uniformValues; - bool markedForDeletion; -}; - -class ProgramState { -public: - MG_Global::unordered_map shaders_; - MG_Global::unordered_map programs_; - std::set freeShaderIds_; - std::set freeProgramIds_; - GLuint lastShaderId_ = 0; - GLuint lastProgramId_ = 0; - GLuint currentProgram_ = 0; - - ProgramState(); - ~ProgramState(); - - // Return: the validity of the operation, according to OpenGL 3 standard - GLenum CreateShader(GLenum type, GLuint* shader); - GLenum CreateProgram(GLuint* program); - GLenum DeleteShader(GLuint shader); - GLenum DeleteProgram(GLuint program); - GLenum LinkShaderToProgram(GLuint program, GLuint shader); - GLenum UploadShaderSource(GLuint shader, GLsizei count, const GLchar** string, const GLint* length); - GLenum BuildShaderStage(GLuint shader); - GLenum FinalizeProgramPipeline(GLuint program); - GLenum ActivateRenderProgram(GLuint program); - GLenum DefineProgramAttributeLocation(GLuint program, GLuint index, const GLchar* name); - GLint QueryProgramAttributeLocation(GLuint program, const GLchar* name); - GLint QueryProgramUniformLocation(GLuint program, const GLchar* name); - GLenum QueryProgramStateIntVector(GLuint program, GLenum pname, GLint* params); - GLenum QueryShaderStateIntVector(GLuint shader, GLenum pname, GLint* params); - - template - GLenum SetUniform(GLuint program, GLint location, GLsizei count, const T* value, GLenum type); - - template - GLenum SetUniformMatrix(GLuint program, GLint location, GLsizei count, GLboolean transpose, const T* value, GLenum matrixType); - -#define DECLARE_UNIFORM_FUNCTIONS(type, suffix, vecType) \ - void UpdateUniform##suffix##1(GLint location, type v0); \ - void UpdateUniform##suffix##2(GLint location, type v0, type v1); \ - void UpdateUniform##suffix##3(GLint location, type v0, type v1, type v2); \ - void UpdateUniform##suffix##4(GLint location, type v0, type v1, type v2, type v3); \ - void UpdateUniform##suffix##Vector1(GLint location, GLsizei count, const type* value); \ - void UpdateUniform##suffix##Vector2(GLint location, GLsizei count, const type* value); \ - void UpdateUniform##suffix##Vector3(GLint location, GLsizei count, const type* value); \ - void UpdateUniform##suffix##Vector4(GLint location, GLsizei count, const type* value); - DECLARE_UNIFORM_FUNCTIONS(GLfloat, Float, GL_FLOAT) - DECLARE_UNIFORM_FUNCTIONS(GLint, Int, GL_INT) - DECLARE_UNIFORM_FUNCTIONS(GLuint, UInt, GL_UNSIGNED_INT) - DECLARE_UNIFORM_FUNCTIONS(GLboolean, Bool, GL_BOOL) -#undef DECLARE_UNIFORM_FUNCTIONS -#define DECLARE_MATRIX_FUNCTIONS(suffix, matrixType) \ - void UpdateUniformMatrix##suffix##Vector(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value); - DECLARE_MATRIX_FUNCTIONS(2x2, GL_FLOAT_MAT2) - DECLARE_MATRIX_FUNCTIONS(3x3, GL_FLOAT_MAT3) - DECLARE_MATRIX_FUNCTIONS(4x4, GL_FLOAT_MAT4) - DECLARE_MATRIX_FUNCTIONS(2x3, GL_FLOAT_MAT2x3) - DECLARE_MATRIX_FUNCTIONS(2x4, GL_FLOAT_MAT2x4) - DECLARE_MATRIX_FUNCTIONS(3x2, GL_FLOAT_MAT3x2) - DECLARE_MATRIX_FUNCTIONS(3x4, GL_FLOAT_MAT3x4) - DECLARE_MATRIX_FUNCTIONS(4x2, GL_FLOAT_MAT4x2) - DECLARE_MATRIX_FUNCTIONS(4x3, GL_FLOAT_MAT4x3) -#undef DECLARE_MATRIX_FUNCTIONS - - const ProgramObject* GetProgramObject(GLuint program) const; - const ShaderObject* GetShaderObject(GLuint program) const; - GLuint GetCurrentProgram() const; - bool SetProgramStatus(GLuint program, GLboolean status); - bool SetShaderStatus(GLuint shader, GLboolean status); - -private: - bool ValidateShader_(GLuint shader); - bool ValidateProgram_(GLuint program); - void CleanupShaders_(); - GLint GetUniformLocation_(GLuint program, GLint location, const GLchar* name); -}; - -#endif // MOBILEGL_PROGRAMSTATE_H diff --git a/MG/MG_GL/State/Program/ShaderObject.cpp b/MG/MG_GL/State/Program/ShaderObject.cpp deleted file mode 100644 index d0681ed2..00000000 --- a/MG/MG_GL/State/Program/ShaderObject.cpp +++ /dev/null @@ -1,130 +0,0 @@ -// -// Created by BZLZHH on 2025/5/3. -// - -#include "../../../Includes.h" - -GLenum ProgramState::CreateShader(GLenum type, GLuint* shader) { - MG_Util::Debug::LogD("MG_State: Program: CreateShader called, type=0x%X, shader ptr=%p", type, shader); - if (!shader) { - MG_Util::Debug::LogE("MG_State: Program: CreateShader error: shader pointer is null"); - return GL_INVALID_VALUE; - } - if (type != GL_VERTEX_SHADER && type != GL_FRAGMENT_SHADER) { - MG_Util::Debug::LogE("MG_State: Program: CreateShader error: invalid shader type 0x%X", type); - return GL_INVALID_ENUM; - } - - GLuint id = freeShaderIds_.empty() ? ++lastShaderId_ : *freeShaderIds_.begin(); - if (!freeShaderIds_.empty()) - freeShaderIds_.erase(freeShaderIds_.begin()); - - ShaderObject obj; - obj.type = type; - obj.compiled = {UncertainBool::Unknown, UncertainBool::False}; - obj.compiledSpirv = {}; - obj.markedForDeletion = false; - obj.compileStatus = GL_FALSE; - shaders_[id] = obj; - *shader = id; - MG_Util::Debug::LogD("MG_State: Program: CreateShader success, new shader id=%u", id); - return GL_NO_ERROR; -} - -GLenum ProgramState::DeleteShader(GLuint shader) { - MG_Util::Debug::LogD("MG_State: Program: DeleteShader called, shader id=%u", shader); - if (!ValidateShader_(shader)) { - MG_Util::Debug::LogE("MG_State: Program: DeleteShader error: invalid shader id %u", shader); - return GL_INVALID_VALUE; - } - - bool inUse = false; - for (auto& [progId, program] : programs_) { - if (std::find(program.attachedShaders.begin(), - program.attachedShaders.end(), shader) != program.attachedShaders.end()) { - inUse = true; - break; - } - } - if (inUse) { - shaders_[shader].markedForDeletion = true; - MG_Util::Debug::LogD("MG_State: Program: DeleteShader info: shader %u marked for deferred deletion (in use)", shader); - } else { - shaders_.erase(shader); - // TODO: Prevent the object that uses a freeId from conflicting with legacy object in the backend. - //freeShaderIds_.insert(shader); - MG_Util::Debug::LogD("MG_State: Program: DeleteShader success: shader %u deleted immediately", shader); - } - return GL_NO_ERROR; -} - -GLenum ProgramState::UploadShaderSource(GLuint shader, GLsizei count, - const GLchar** string, const GLint* length) { - MG_Util::Debug::LogD("MG_State: Program: UploadShaderSource called, shader id=%u, count=%d", shader, count); - if (!ValidateShader_(shader)) { - MG_Util::Debug::LogE("MG_State: Program: UploadShaderSource error: invalid shader id %u", shader); - return GL_INVALID_VALUE; - } - if (count < 0) { - MG_Util::Debug::LogE("MG_State: Program: UploadShaderSource error: negative count %d", count); - return GL_INVALID_VALUE; - } - - std::string source; - for (GLsizei i = 0; i < count; ++i) { - const GLchar* str = string[i]; - GLint len = (length && length[i] >= 0) ? length[i] : strlen(str); - source.append(str, len); - } - shaders_[shader].source = std::move(source); - MG_Util::Debug::LogD("MG_State: Program: UploadShaderSource success: source uploaded (length=%zu)", shaders_[shader].source.size()); - return GL_NO_ERROR; -} - -GLenum ProgramState::BuildShaderStage(GLuint shader) { - MG_Util::Debug::LogD("MG_State: Program: BuildShaderStage called, shader id=%u", shader); - if (!ValidateShader_(shader)) { - MG_Util::Debug::LogE("MG_State: Program: BuildShaderStage error: invalid shader id %u", shader); - return GL_INVALID_VALUE; - } - auto& obj = shaders_[shader]; - - std::string compilationLog; - auto spirv = MG_Util::Program::CompileGLSLToSPIRV(obj.type, obj.source, compilationLog); - if (spirv.empty()) { - obj.infoLog = "Shader compilation failed: " + compilationLog; - obj.compiled = UncertainBool::False; - obj.compileStatus = GL_FALSE; - MG_Util::Debug::LogE("MG_State: Program: BuildShaderStage error: %s", compilationLog.c_str()); - return GL_INVALID_OPERATION; - } - obj.compiledSpirv = spirv; - obj.compiled = {UncertainBool::Unknown, UncertainBool::True}; - obj.compileStatus = GL_TRUE; - obj.infoLog.clear(); - MG_Util::Debug::LogD("MG_State: Program: BuildShaderStage success: shader %u compiled to SPIR-V (size=%zu bytes)", shader, spirv.size() * sizeof(unsigned)); - return GL_NO_ERROR; -} - -bool ProgramState::SetShaderStatus(GLuint shader, GLboolean status) { - MG_Util::Debug::LogD("MG_State: Program: SetShaderStatus called, shader id=%u, status=%d", shader, status); - if (!ValidateShader_(shader)) { - MG_Util::Debug::LogE("MG_State: Program: SetShaderStatus error: invalid shader id %u", shader); - return false; - } - auto& obj = shaders_[shader]; - if (obj.compiled.getValue() != UncertainBool::Unknown) { - MG_Util::Debug::LogW("MG_State: Program: SetShaderStatus warning: shader %u status already set", shader); - return false; - } - obj.compiled = (status == GL_TRUE) ? UncertainBool::True : UncertainBool::False; - obj.compileStatus = status; - MG_Util::Debug::LogD("MG_State: Program: SetShaderStatus success: shader %u status=%d", shader, status); - return true; -} - -bool ProgramState::ValidateShader_(GLuint shader) { - bool valid = shaders_.count(shader) && !shaders_[shader].markedForDeletion; - MG_Util::Debug::LogD("MG_State: Program: ValidateShader_ called, shader id=%u, result=%d", shader, valid); - return valid; -} diff --git a/MG/MG_GL/State/Program/ShaderObject.h b/MG/MG_GL/State/Program/ShaderObject.h deleted file mode 100644 index 835c573c..00000000 --- a/MG/MG_GL/State/Program/ShaderObject.h +++ /dev/null @@ -1,8 +0,0 @@ -// -// Created by BZLZHH on 2025/5/3. -// - -#ifndef MOBILEGL_SHADEROBJECT_H -#define MOBILEGL_SHADEROBJECT_H - -#endif //MOBILEGL_SHADEROBJECT_H diff --git a/MG/MG_GL/State/Texture/TextureState.cpp b/MG/MG_GL/State/Texture/TextureState.cpp deleted file mode 100644 index afa00478..00000000 --- a/MG/MG_GL/State/Texture/TextureState.cpp +++ /dev/null @@ -1,1258 +0,0 @@ -// -// Created by BZLZHH on 2025/4/4. -// - -#include "../../../Includes.h" - -// TextureObject - -bool TextureObject::IsImmutable() const { - bool immutable = params.texPropertiesInt.find(GL_TEXTURE_IMMUTABLE_FORMAT) != params.texPropertiesInt.end(); - MG_Util::Debug::LogD("MG_State: Texture: TextureObject::IsImmutable returns %d", immutable); - return immutable; -} - -// TextureUnitState - -void TextureUnitState::Bind(GLenum target, GLuint texture) { - MG_Util::Debug::LogD("MG_State: Texture: TextureUnitState::Bind target=0x%x texture=%u", target, texture); - boundTextures[target] = texture; -} - -GLuint TextureUnitState::GetBoundTexture(GLenum target) { - auto it = boundTextures.find(target); - GLuint tex = (it != boundTextures.end()) ? it->second : 0; - MG_Util::Debug::LogD("MG_State: Texture: TextureUnitState::GetBoundTexture target=0x%x returns %u", target, tex); - return tex; -} - -// TextureState - -TextureState::TextureState() { - textureUnits_.resize(MG_Constants::Texture::MAX_TEXTURE_UNITS); - MG_Util::Debug::LogD("MG_State: Texture: TextureState constructor, textureUnits_=%zu", textureUnits_.size()); -} - -GLint TextureState::GetUnpackParam_(GLenum pname) { - GLint result = MG_State::QueryPixelStoreInt(pname); - MG_Util::Debug::LogD("MG_State: Texture: GetUnpackParam_ pname=0x%x, returns %d", pname, result); - return result; -} - -bool TextureState::IsTextureGenerated(GLuint texture) { - bool isValidTextureNumber = texture != 0; - bool isValidTexture; - bool generated = false; - if (!isValidTextureNumber) { - MG_Util::Debug::LogD("MG_State: Texture: IsTextureGenerated texture == 0"); - } else { - isValidTexture = textures.find(texture) != textures.end(); - if (!isValidTexture) { - MG_Util::Debug::LogD("MG_State: Texture: IsTextureGenerated invalid texture %d", texture); - } else { - generated = textures[texture].generated; - if (!generated) { - MG_Util::Debug::LogD("MG_State: Texture: IsTextureGenerated texture %d not generated", texture, generated); - } - } - } - MG_Util::Debug::LogD("MG_State: Texture: IsTextureGenerated texture=%u returns %d", texture, generated); - return generated; -} - -bool TextureState::IsTexture(GLuint texture) { - bool isTex = texture != 0 && textures.find(texture) != textures.end(); - MG_Util::Debug::LogD("MG_State: Texture: IsTexture texture=%u returns %d", texture, isTex); - return isTex; -} - -GLenum TextureState::BindUnit(GLenum textureUnit) { - MG_Util::Debug::LogD("MG_State: Texture: BindUnit textureUnit=0x%x", textureUnit); - GLuint unitIndex = textureUnit - GL_TEXTURE0; - if (unitIndex < textureUnits_.size()) { - activeTextureUnit_ = unitIndex; - MG_Util::Debug::LogD("MG_State: Texture: BindUnit set activeTextureUnit_=%u", activeTextureUnit_); - } else { - MG_Util::Debug::LogE("MG_State: Texture: BindUnit invalid texture unit 0x%x", textureUnit); - return GL_INVALID_ENUM; - } - return GL_NO_ERROR; -} - -GLenum TextureState::Create(GLuint* texture) { - MG_Util::Debug::LogD("MG_State: Texture: Create called"); - if (!texture) { - MG_Util::Debug::LogE("MG_State: Texture: Create received null pointer"); - return GL_INVALID_VALUE; - } - return CreateN(1, texture); -} - -GLenum TextureState::CreateN(GLsizei n, GLuint* textures) { - MG_Util::Debug::LogD("MG_State: Texture: CreateN called with n=%d", n); - if (n < 1) { - MG_Util::Debug::LogE("MG_State: Texture: CreateN invalid n=%d", n); - return GL_INVALID_VALUE; - } - - for (GLsizei i = 0; i < n; ++i) { - GLuint id = 0; - if (!freeID_.empty()) { - id = freeID_.back(); - freeID_.pop_back(); - MG_Util::Debug::LogD("MG_State: Texture: CreateN reusing free id=%u", id); - } else { - id = lastUsedID_++; - MG_Util::Debug::LogD("MG_State: Texture: CreateN new id=%u", id); - } - TextureObject obj; - obj.generated = true; - this->textures[id] = obj; - textures[i] = id; - static uint64_t counter = 0; - obj.createTimestamp = ++counter; - } - return GL_NO_ERROR; -} - -GLenum TextureState::Bind(GLenum target, GLuint texture) { - MG_Util::Debug::LogD("MG_State: Texture: Bind called with target=0x%x, texture=%u", target, texture); - if (!MG_Constants::Common::Contains(target, MG_Constants::Texture::VALID_TARGETS)) { - MG_Util::Debug::LogE("MG_State: Texture: Bind invalid target=0x%x", target); - return GL_INVALID_ENUM; - } - - if (texture == 0) { - TextureUnitState& unit = textureUnits_[activeTextureUnit_]; - unit.Bind(target, 0); - MG_Util::Debug::LogD("MG_State: Texture: Bind unbind succeeded for target=0x%x", target); - return GL_NO_ERROR; - } - - if (!IsTextureGenerated(texture)) { - MG_Util::Debug::LogE("MG_State: Texture: Bind texture %u not generated", texture); - return GL_INVALID_VALUE; - } - - auto texObjIt = textures.find(texture); - if (texObjIt != textures.end()){ - if (texObjIt->second.target != target && texObjIt->second.target != GL_NONE) { - MG_Util::Debug::LogE("MG_State: Texture: Bind texture %u bound to different target 0x%x", texture, texObjIt->second.target); - return GL_INVALID_OPERATION; - } - } - - TextureUnitState& unit = textureUnits_[activeTextureUnit_]; - TextureObject* texObj = nullptr; - auto it = this->textures.find(texture); - if (it == this->textures.end()) { - MG_Util::Debug::LogW("MG_State: Texture: Bind texture %u not found, creating new (non-generated)", texture); - TextureObject newObj; - newObj.generated = false; - this->textures[texture] = newObj; - texObj = &this->textures[texture]; - } else { - texObj = &it->second; - } - - if (texObj->target == GL_NONE) { - texObj->target = target; - MG_Util::Debug::LogD("MG_State: Texture: Bind setting target=0x%x for texture %u", target, texture); - } else if (texObj->target != target) { - MG_Util::Debug::LogE("MG_State: Texture: Bind mismatch target for texture %u, expected 0x%x, got 0x%x", texture, texObj->target, target); - return GL_INVALID_OPERATION; - } - - unit.Bind(target, texture); - MG_Util::Debug::LogD("MG_State: Texture: Bind succeeded for texture %u on target=0x%x", texture, target); - - return GL_NO_ERROR; -} - -size_t TextureState::CalculatePixelDataSize_(GLenum format, GLenum type, GLsizei width, GLsizei height) { - MG_Util::Debug::LogD("MG_State: Texture: CalculatePixelDataSize_ called format=0x%x, type=0x%x, width=%d, height=%d", format, type, width, height); - - // Unpack Param - GLint rowLength = TextureState::GetUnpackParam_(GL_UNPACK_ROW_LENGTH); - GLint alignment = TextureState::GetUnpackParam_(GL_UNPACK_ALIGNMENT); - GLsizei actualRowLength = (rowLength > 0) ? rowLength : width; - - size_t bytesPerPixel = 0; - switch (type) { - case GL_UNSIGNED_BYTE_3_3_2: - case GL_UNSIGNED_BYTE_2_3_3_REV: - bytesPerPixel = 1; - break; - case GL_UNSIGNED_SHORT_5_6_5: - case GL_UNSIGNED_SHORT_5_6_5_REV: - case GL_UNSIGNED_SHORT_4_4_4_4: - case GL_UNSIGNED_SHORT_4_4_4_4_REV: - case GL_UNSIGNED_SHORT_5_5_5_1: - case GL_UNSIGNED_SHORT_1_5_5_5_REV: - bytesPerPixel = 2; - break; - case GL_UNSIGNED_INT_8_8_8_8: - case GL_UNSIGNED_INT_8_8_8_8_REV: - case GL_UNSIGNED_INT_10_10_10_2: - case GL_UNSIGNED_INT_2_10_10_10_REV: - bytesPerPixel = 4; - default: { - int components = 0; - switch (format) { - case GL_RED: components = 1; break; - case GL_RG: components = 2; break; - case GL_RGB: - case GL_BGR: components = 3; break; - case GL_RGBA: - case GL_BGRA: components = 4; break; - case GL_DEPTH_COMPONENT: components = 1; break; - case GL_DEPTH_STENCIL: components = 2; break; - default: components = 0; break; - } - size_t typeSize = 0; - switch (type) { - case GL_BYTE: - case GL_UNSIGNED_BYTE: typeSize = 1; break; - case GL_SHORT: - case GL_UNSIGNED_SHORT: typeSize = 2; break; - case GL_INT: - case GL_UNSIGNED_INT: - case GL_FLOAT: typeSize = 4; break; - default: typeSize = 0; break; - } - bytesPerPixel = components * typeSize; - break; - } - } - - size_t rowSize = actualRowLength * bytesPerPixel; - size_t alignedRowSize = (rowSize + (alignment - 1)) & ~(alignment - 1); - - size_t totalSize = alignedRowSize * height; - MG_Util::Debug::LogD("MG_State: Texture: CalculatePixelDataSize_ returns %zu", totalSize); - return totalSize; -} - -GLenum TextureState::Upload2D(GLenum target, GLint level, GLint internalFormat, - GLsizei width, GLsizei height, GLint border, GLenum format, - GLenum type, const void* data) { - MG_Util::Debug::LogD("MG_State: Texture: Upload2D called target=0x%x, level=%d, width=%d, height=%d", - target, level, width, height); - GLenum validity = CheckUploadingTexture2DValidity_(target, level, internalFormat, - width, height, border, format, type, data); - if (validity != GL_NO_ERROR) { - MG_Util::Debug::LogE("MG_State: Texture: Upload2D validation failed with error 0x%x", validity); - return validity; - } - - bool isProxyTexture = (target == GL_PROXY_TEXTURE_1D || target == GL_PROXY_TEXTURE_2D || - target == GL_PROXY_TEXTURE_3D || target == GL_PROXY_TEXTURE_CUBE_MAP || - target == GL_PROXY_TEXTURE_1D_ARRAY || target == GL_PROXY_TEXTURE_2D_ARRAY || - target == GL_PROXY_TEXTURE_RECTANGLE || target == GL_PROXY_TEXTURE_2D_MULTISAMPLE || - target == GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY); - if (isProxyTexture) { - MG_Util::Debug::LogD("MG_State: Texture: Upload2D proxy texture detected"); - TextureObject& proxyTex = proxyTextures_[target]; - auto& mip = proxyTex.params.mipmapData[level]; - mip.width = width; - mip.height = height; - mip.internalFormat = internalFormat; - mip.format = format; - mip.type = type; - proxyTex.generated = true; - proxyTex.target = target; - return GL_NO_ERROR; - } - - GLuint boundTex = textureUnits_[activeTextureUnit_].GetBoundTexture(target); - TextureObject& tex = textures[boundTex]; -// TextureParams::MipmapLevel mip{}; - - auto& mip = tex.params.mipmapData[level]; - mip.width = width; - mip.height = height; - mip.internalFormat = internalFormat; - mip.format = format; - mip.type = type; - mip.dirty = true; - - if (data == nullptr) { - mip.hasData = false; - MG_Util::Debug::LogD("MG_State: Texture: Upload2D data pointer is null"); - } else { - GLint unpackSwapBytes = GetUnpackParam_(GL_UNPACK_SWAP_BYTES); - GLint unpackLSBFirst = GetUnpackParam_(GL_UNPACK_LSB_FIRST); - GLint unpackSkipPixels = GetUnpackParam_(GL_UNPACK_SKIP_PIXELS); - GLint unpackSkipRows = GetUnpackParam_(GL_UNPACK_SKIP_ROWS); - GLint unpackRowLength = GetUnpackParam_(GL_UNPACK_ROW_LENGTH); - GLint unpackAlignment = GetUnpackParam_(GL_UNPACK_ALIGNMENT); - GLint unpackImageHeight = GetUnpackParam_(GL_UNPACK_IMAGE_HEIGHT); - GLint unpackSkipImages = GetUnpackParam_(GL_UNPACK_SKIP_IMAGES); - - bool isDefaultUnpack = (unpackSwapBytes == 0) && (unpackLSBFirst == 0) && - (unpackSkipPixels == 0) && (unpackSkipRows == 0) && - (unpackRowLength == 0) && (unpackAlignment == 4) && - (unpackImageHeight == 0) && (unpackSkipImages == 0); - - size_t bytesPerPixel = CalculateBytesPerPixel_(format, type); - size_t componentSize = GetComponentSize_(type); - - size_t dstRowStride = width * bytesPerPixel; - size_t dstSize = dstRowStride * height; - mip.pixelData.resize(dstSize); - GLubyte *dstData = mip.pixelData.data(); - - if (isDefaultUnpack) { - const GLubyte *srcData = static_cast(data); - size_t srcRowSize = width * bytesPerPixel; - size_t srcRowStride = (srcRowSize + unpackAlignment - 1) & ~(unpackAlignment - 1); - - if (srcRowStride == dstRowStride) { - memcpy(dstData, srcData, dstSize); - MG_Util::Debug::LogD( - "MG_State: Texture: Upload2D uploaded %zu bytes with fast path - block memcpy", dstSize); - } else { - for (GLsizei y = 0; y < height; ++y) { - const GLubyte *srcRow = srcData + y * srcRowStride; - GLubyte *dstRow = dstData + y * dstRowStride; - memcpy(dstRow, srcRow, srcRowSize); - } - MG_Util::Debug::LogD( - "MG_State: Texture: Upload2D uploaded %zu bytes with fast path - row memcpy", dstSize); - } - } else { - GLsizei rowLength = (unpackRowLength > 0) ? unpackRowLength : width; - - size_t srcRowSize = rowLength * bytesPerPixel; - size_t srcRowStride = (srcRowSize + unpackAlignment - 1) & ~(unpackAlignment - 1); - size_t srcImageStride = (unpackImageHeight > 0) ? - srcRowStride * unpackImageHeight : - srcRowStride * height; - - const GLubyte *srcData = static_cast(data); - srcData += unpackSkipImages * srcImageStride; - srcData += unpackSkipRows * srcRowStride; - srcData += unpackSkipPixels * bytesPerPixel; - - for (GLsizei y = 0; y < height; ++y) { - const GLubyte *srcRow = srcData + y * srcRowStride; - GLubyte *dstRow = dstData + y * dstRowStride; - - if (unpackSwapBytes) { - SwapBytesForTexture_(format, type, srcRow, dstRow, width); - } else if (unpackLSBFirst && componentSize == 1) { - ReverseBitOrder_(srcRow, dstRow, width * bytesPerPixel); - } else { - memcpy(dstRow, srcRow, width * bytesPerPixel); - } - } - mip.hasData = true; - MG_Util::Debug::LogD( - "MG_State: Texture: Upload2D uploaded %zu bytes with unpack params", dstSize); - } - } -// tex.params.mipmapData[level] = mip; - return GL_NO_ERROR; -} - -GLenum TextureState::UpdateRegion2D(GLenum target, GLint level, GLint xoffset, - GLint yoffset, GLsizei width, GLsizei height, GLenum format, - GLenum type, const GLvoid* data) { - MG_Util::Debug::LogD("MG_State: Texture: UpdateRegion2D called target=0x%x, level=%d, x=%d, y=%d, w=%d, h=%d", - target, level, xoffset, yoffset, width, height); - - GLenum validity = CheckUpdatingTextureRegion2DValidity_(target, level, xoffset, yoffset, width, height, format, type, data); - if (validity != GL_NO_ERROR) { - MG_Util::Debug::LogE("MG_State: Texture: UpdateRegion2D validation failed with error 0x%x", validity); - return validity; - } - - GLuint boundTex = textureUnits_[activeTextureUnit_].GetBoundTexture(target); - auto& tex = textures[boundTex]; - auto mipIt = tex.params.mipmapData.find(level); - if (mipIt == tex.params.mipmapData.end()) { - MG_Util::Debug::LogE("MG_State: Texture: UpdateRegion2D mipmap level %d not found", level); - return GL_INVALID_OPERATION; - } - TextureParams::MipmapLevel& mip = mipIt->second; - - GLint unpackSwapBytes = GetUnpackParam_(GL_UNPACK_SWAP_BYTES); - GLint unpackLSBFirst = GetUnpackParam_(GL_UNPACK_LSB_FIRST); - GLint unpackRowLength = GetUnpackParam_(GL_UNPACK_ROW_LENGTH); - GLint unpackAlignment = GetUnpackParam_(GL_UNPACK_ALIGNMENT); - GLint unpackSkipPixels = GetUnpackParam_(GL_UNPACK_SKIP_PIXELS); - GLint unpackSkipRows = GetUnpackParam_(GL_UNPACK_SKIP_ROWS); - GLint unpackImageHeight = GetUnpackParam_(GL_UNPACK_IMAGE_HEIGHT); - GLint unpackSkipImages = GetUnpackParam_(GL_UNPACK_SKIP_IMAGES); - - const size_t bytesPerPixel = CalculateBytesPerPixel_(format, type); - const size_t srcSize = CalculatePixelDataSize_(format, type, width, height); - - if (bytesPerPixel == 0) { - MG_Util::Debug::LogE("MG_State: Texture: Invalid format/type combination"); - return GL_INVALID_ENUM; - } - - if (xoffset + width > mip.width || yoffset + height > mip.height) { - MG_Util::Debug::LogE("MG_State: Texture: Update region out of bounds"); - return GL_INVALID_VALUE; - } - - const GLsizei srcRowLength = (unpackRowLength > 0) ? unpackRowLength : width; - const size_t srcRowSize = srcRowLength * bytesPerPixel; - const size_t srcRowStride = (srcRowSize + unpackAlignment - 1) & ~(unpackAlignment - 1); - const size_t srcImageStride = (unpackImageHeight > 0) - ? srcRowStride * unpackImageHeight - : srcRowStride * height; - - const GLubyte* srcData = static_cast(data); - srcData += unpackSkipImages * srcImageStride; - srcData += unpackSkipRows * srcRowStride; - srcData += unpackSkipPixels * bytesPerPixel; - - const size_t requiredSrcSize = (height - 1) * srcRowStride + width * bytesPerPixel; - // TODO: Check the buffer data size. - - const size_t dstRowStride = mip.width * bytesPerPixel; - size_t dstTotalSize = mip.width * mip.height * bytesPerPixel; - if (mip.pixelData.size() < dstTotalSize) { - mip.pixelData.resize(dstTotalSize); - MG_Util::Debug::LogD("MG_State: Texture: Resized pixelData to %zu bytes for mip level %d", dstTotalSize, level); - } - GLubyte* dstData = mip.pixelData.data() + yoffset * dstRowStride + xoffset * bytesPerPixel; - - MG_Util::Debug::LogD("MG_State: Texture: UpdateRegion2D srcRowStride=%zu, dstRowStride=%zu", srcRowStride, dstRowStride); - MG_Util::Debug::LogD("MG_State: Texture: UpdateRegion2D srcData=%p, dstData=%p", srcData, dstData); - MG_Util::Debug::LogD("MG_State: Texture: UpdateRegion2D bytesPerPixel=%zu", bytesPerPixel); - - // Check if fast path is applicable - const bool isDefaultUnpack = (unpackSwapBytes == 0) && (unpackLSBFirst == 0) && - (unpackRowLength == 0) && (unpackAlignment == 4) && - (unpackSkipPixels == 0) && (unpackSkipRows == 0) && - (unpackImageHeight == 0) && (unpackSkipImages == 0); - - if (isDefaultUnpack) { - const size_t copySize = width * bytesPerPixel; - - if (srcRowStride == dstRowStride) { - MG_Util::Debug::LogD("MG_State: Texture: UpdateRegion2D block memcpy(dst=%p, src=%p, size=%zu) called.", dstData, srcData, width * bytesPerPixel); - memcpy(dstData, srcData, copySize * height); - } else { - for (GLsizei y = 0; y < height; ++y) { - const GLubyte* srcRow = srcData + y * srcRowStride; - GLubyte* dstRow = dstData + y * dstRowStride; - memcpy(dstRow, srcRow, copySize); - MG_Util::Debug::LogD("MG_State: Texture: UpdateRegion2D row memcpy(dst=%p, src=%p, size=%zu) called.", dstRow, srcRow, width * bytesPerPixel); - } - } - } else { - const size_t componentSize = GetComponentSize_(type); - for (GLsizei y = 0; y < height; ++y) { - const GLubyte* srcRow = srcData + y * srcRowStride; - GLubyte* dstRow = dstData + y * dstRowStride; - - if (unpackSwapBytes) { - for (GLsizei x = 0; x < width; ++x) { - SwapPixelBytes_(format, type, srcRow + x*bytesPerPixel, dstRow + x*bytesPerPixel); - } - } else if (unpackLSBFirst && componentSize == 1) { - for (size_t i = 0; i < width * bytesPerPixel; ++i) { - dstRow[i] = ReverseBits_(srcRow[i]); - } - } else { - memcpy(dstRow, srcRow, width * bytesPerPixel); - } - } - } - -// for (GLsizei y = 0; y < height; ++y) { -// const GLubyte* srcRow = srcData + y * srcRowStride; -// GLubyte* dstRow = dstData + y * dstRowStride; -// -// if (unpackSwapBytes) { -// for (GLsizei x = 0; x < width; ++x) { -// const GLubyte* srcPixel = srcRow + x * bytesPerPixel; -// GLubyte* dstPixel = dstRow + x * bytesPerPixel; -// SwapPixelBytes_(format, type, srcPixel, dstPixel); -// } -// } else if (unpackLSBFirst && GetComponentSize_(type) == 1) { -// for (size_t i = 0; i < width * bytesPerPixel; ++i) { -// dstRow[i] = ReverseBits_(srcRow[i]); -// } -// } else { -// MG_Util::Debug::LogD("MG_State: Texture: UpdateRegion2D memcpy(dst=%p, src=%p, size=%zu) called.", dstRow, srcRow, width * bytesPerPixel); -// memcpy(dstRow, srcRow, width * bytesPerPixel); -// } -// } - - mip.hasData = true; - mip.dirty = true; - MG_Util::Debug::LogD("MG_State: Texture: UpdateRegion2D succeeded"); - return GL_NO_ERROR; -} - -GLenum TextureState::SetTexturePropertyFloat(GLenum target, GLenum pname, GLfloat param) { - MG_Util::Debug::LogD("MG_State: Texture: SetTexturePropertyFloat called target=0x%x, pname=0x%x, param=%f", target, pname, param); - if (!MG_Constants::Common::Contains(target, MG_Constants::Texture::VALID_TARGETS)) { - MG_Util::Debug::LogE("MG_State: Texture: SetTexturePropertyFloat invalid target=0x%x", target); - return GL_INVALID_ENUM; - } - - if (!MG_Constants::Common::Contains(pname, MG_Constants::Texture::VALID_TEXTURE_PARAM_NAMES)) { - MG_Util::Debug::LogE("MG_State: Texture: SetTexturePropertyFloat invalid pname=0x%x", pname); - return GL_INVALID_ENUM; - } - - switch (pname) { - case GL_TEXTURE_BORDER_COLOR: - break; - case GL_TEXTURE_MIN_LOD: - if (param < -1000.0f){ - MG_Util::Debug::LogE("MG_State: Texture: SetTexturePropertyFloat param for GL_TEXTURE_MIN_LOD too low: %f", param); - return GL_INVALID_VALUE; - } - break; - case GL_TEXTURE_MAX_LOD: - if (param > 1000.0f){ - MG_Util::Debug::LogE("MG_State: Texture: SetTexturePropertyFloat param for GL_TEXTURE_MAX_LOD too high: %f", param); - return GL_INVALID_VALUE; - } - break; - case GL_TEXTURE_LOD_BIAS: - if (param < -1000.0f || param > 1000.0f) { - MG_Util::Debug::LogE("MG_State: Texture: SetTexturePropertyFloat param for GL_TEXTURE_LOD_BIAS out of range: %f", param); - return GL_INVALID_VALUE; - } - break; - case GL_TEXTURE_SWIZZLE_R: - case GL_TEXTURE_SWIZZLE_G: - case GL_TEXTURE_SWIZZLE_B: - case GL_TEXTURE_SWIZZLE_A: - if (param != GL_ZERO && param != GL_ONE && param != GL_RED && param != GL_GREEN && param != GL_BLUE && param != GL_ALPHA) { - MG_Util::Debug::LogE("MG_State: Texture: SetTexturePropertyFloat invalid swizzle param=%f", param); - return GL_INVALID_ENUM; - } - break; - default: - break; - } - GLuint boundTex = textureUnits_[activeTextureUnit_].GetBoundTexture(target); - TextureObject& tex = textures[boundTex]; - tex.params.texPropertiesFloat[pname] = param; - MG_Util::Debug::LogD("MG_State: Texture: SetTexturePropertyFloat succeeded for texture %u", boundTex); - return GL_NO_ERROR; -} - -GLenum TextureState::SetTexturePropertyInt(GLenum target, GLenum pname, GLint param) { - MG_Util::Debug::LogD("MG_State: Texture: SetTexturePropertyInt called target=0x%x, pname=0x%x, param=%d", target, pname, param); - if (!MG_Constants::Common::Contains(target, MG_Constants::Texture::VALID_TARGETS)) { - MG_Util::Debug::LogE("MG_State: Texture: SetTexturePropertyInt invalid target=0x%x", target); - return GL_INVALID_ENUM; - } - - if (!MG_Constants::Common::Contains(pname, MG_Constants::Texture::VALID_TEXTURE_PARAM_NAMES)) { - MG_Util::Debug::LogE("MG_State: Texture: SetTexturePropertyInt invalid pname=0x%x", pname); - return GL_INVALID_ENUM; - } - - switch (pname) { - case GL_TEXTURE_MIN_FILTER: - case GL_TEXTURE_MAG_FILTER: - if (param != GL_NEAREST && param != GL_LINEAR && param != GL_NEAREST_MIPMAP_NEAREST && - param != GL_LINEAR_MIPMAP_NEAREST && param != GL_NEAREST_MIPMAP_LINEAR && - param != GL_LINEAR_MIPMAP_LINEAR) { - MG_Util::Debug::LogE("MG_State: Texture: SetTexturePropertyInt invalid filter param=%d", param); - return GL_INVALID_ENUM; - } - break; - case GL_TEXTURE_WRAP_S: - case GL_TEXTURE_WRAP_T: - case GL_TEXTURE_WRAP_R: - if (param != GL_CLAMP_TO_EDGE && param != GL_CLAMP_TO_BORDER && - param != GL_MIRRORED_REPEAT && param != GL_REPEAT) { - MG_Util::Debug::LogE("MG_State: Texture: SetTexturePropertyInt invalid wrap param=%d", param); - return GL_INVALID_ENUM; - } - break; - case GL_TEXTURE_SWIZZLE_R: - case GL_TEXTURE_SWIZZLE_G: - case GL_TEXTURE_SWIZZLE_B: - case GL_TEXTURE_SWIZZLE_A: - if (param != GL_ZERO && param != GL_ONE && param != GL_RED && param != GL_GREEN && param != GL_BLUE && param != GL_ALPHA){ - MG_Util::Debug::LogE("MG_State: Texture: SetTexturePropertyInt invalid swizzle param=%d", param); - return GL_INVALID_ENUM; - } - break; - default: - break; - } - - GLuint boundTex = textureUnits_[activeTextureUnit_].GetBoundTexture(target); - TextureObject& tex = textures[boundTex]; - tex.params.texPropertiesInt[pname] = param; - MG_Util::Debug::LogD("MG_State: Texture: SetTexturePropertyInt succeeded for texture %u", boundTex); - return GL_NO_ERROR; -} - -GLenum TextureState::Delete(GLuint texture) { - MG_Util::Debug::LogD("MG_State: Texture: Delete called for texture=%u", texture); - if (!texture) { - MG_Util::Debug::LogE("MG_State: Texture: Delete received texture 0"); - return GL_INVALID_VALUE; - } - - auto it = this->textures.find(texture); - if (it != this->textures.end()) { - InvalidateTextureInAllUnits_(texture); - this->textures.erase(it); - //freeID_.emplace_back(texture); - MG_Util::Debug::LogD("MG_State: Texture: Delete succeeded for texture=%u", texture); - } else { - MG_Util::Debug::LogW("MG_State: Texture: Delete texture %u not found", texture); - } - return GL_NO_ERROR; -} - -GLenum TextureState::DeleteN(GLsizei n, const GLuint* textures) { - MG_Util::Debug::LogD("MG_State: Texture: DeleteN called with n=%d", n); - if (n < 1) { - MG_Util::Debug::LogE("MG_State: Texture: DeleteN invalid n=%d", n); - return GL_INVALID_VALUE; - } - - for (GLsizei i = 0; i < n; ++i) { - GLuint id = textures[i]; - if (id == 0) continue; - auto it = this->textures.find(id); - if (it != this->textures.end()) { - InvalidateTextureInAllUnits_(id); - this->textures.erase(it); - // TODO: Prevent the object that uses a freeId from conflicting with legacy object in the backend. - //freeID_.emplace_back(id); - MG_Util::Debug::LogD("MG_State: Texture: DeleteN deleted texture=%u", id); - } else { - MG_Util::Debug::LogW("MG_State: Texture: DeleteN texture %u not found", id); - } - } - - return GL_NO_ERROR; -} - - -GLenum TextureState::QueryLevelPropertyIntVector(GLenum target, GLint level, GLenum pname, GLint* params) { - MG_Util::Debug::LogD("MG_State: Texture: QueryLevelPropertyIntVector called target=0x%x, level=%d, pname=0x%x", target, level, pname); - if (!MG_Constants::Common::Contains(target, MG_Constants::Texture::VALID_TARGETS)) { - MG_Util::Debug::LogE("MG_State: Texture: QueryLevelPropertyIntVector invalid target=0x%x", target); - return GL_INVALID_ENUM; - } - - if (level < 0) { - MG_Util::Debug::LogE("MG_State: Texture: QueryLevelPropertyIntVector invalid level=%d", level); - return GL_INVALID_VALUE; - } - - if (!MG_Constants::Common::Contains(pname, MG_Constants::Texture::VALID_TEXTURE_PARAM_NAMES)) { - MG_Util::Debug::LogE("MG_State: Texture: QueryLevelPropertyIntVector invalid pname=0x%x", pname); - return GL_INVALID_ENUM; - } - - if ((target == GL_TEXTURE_RECTANGLE || target == GL_PROXY_TEXTURE_RECTANGLE) && level != 0) { - MG_Util::Debug::LogE("MG_State: Texture: QueryLevelPropertyIntVector invalid level for rectangle texture"); - return GL_INVALID_VALUE; - } - - GLuint activeUnit = activeTextureUnit_; - if (activeUnit >= textureUnits_.size()) { - MG_Util::Debug::LogE("MG_State: Texture: QueryLevelPropertyIntVector active texture unit out of range"); - return GL_INVALID_OPERATION; - } - - bool isProxyTexture = (target == GL_PROXY_TEXTURE_1D || target == GL_PROXY_TEXTURE_2D || - target == GL_PROXY_TEXTURE_3D || target == GL_PROXY_TEXTURE_CUBE_MAP || - target == GL_PROXY_TEXTURE_1D_ARRAY || target == GL_PROXY_TEXTURE_2D_ARRAY || - target == GL_PROXY_TEXTURE_RECTANGLE || target == GL_PROXY_TEXTURE_2D_MULTISAMPLE || - target == GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY); - - TextureUnitState& unit = textureUnits_[activeUnit]; - GLuint boundTexture = unit.GetBoundTexture(target); - - if (!isProxyTexture && boundTexture == 0) { - switch (pname) { - case GL_TEXTURE_COMPRESSED_IMAGE_SIZE: - MG_Util::Debug::LogE("MG_State: Texture: QueryLevelPropertyIntVector no texture bound for compressed image size"); - return GL_INVALID_OPERATION; - case GL_TEXTURE_INTERNAL_FORMAT: - *params = GL_NONE; - break; - case GL_TEXTURE_COMPRESSED: - *params = GL_FALSE; - break; - default: - *params = 0; - break; - } - MG_Util::Debug::LogD("MG_State: Texture: QueryLevelPropertyIntVector returns default value for unbound texture"); - return GL_NO_ERROR; - } - - MG_Global::unordered_map::iterator texIt; - - if (!isProxyTexture) { - texIt = textures.find(boundTexture); - if (texIt == textures.end()) { - *params = 0; - MG_Util::Debug::LogW( - "MG_State: Texture: QueryLevelPropertyIntVector texture %u not found", - boundTexture); - return GL_NO_ERROR; - } - } - - TextureObject& tex = isProxyTexture ? proxyTextures_[target] : texIt->second; - - if (!isProxyTexture && tex.target != target && tex.target != GL_NONE) { - MG_Util::Debug::LogE("MG_State: Texture: QueryLevelPropertyIntVector texture target mismatch: texture target=0x%x, expected=0x%x", tex.target, target); - return GL_INVALID_OPERATION; - } - - auto mipIt = tex.params.mipmapData.find(level); - if (mipIt == tex.params.mipmapData.end()) { - switch (pname) { - case GL_TEXTURE_COMPRESSED_IMAGE_SIZE: - MG_Util::Debug::LogE("MG_State: Texture: QueryLevelPropertyIntVector no mipmap level %d for compressed image size", level); - return GL_INVALID_OPERATION; - case GL_TEXTURE_INTERNAL_FORMAT: - *params = GL_NONE; - break; - case GL_TEXTURE_COMPRESSED: - *params = GL_FALSE; - break; - default: - *params = 0; - break; - } - MG_Util::Debug::LogD("MG_State: Texture: QueryLevelPropertyIntVector returns default value for missing mipmap level"); - return GL_NO_ERROR; - } - - const TextureParams::MipmapLevel& mip = mipIt->second; - ComponentSizes sizes = GetComponentSize_s_(mip.internalFormat); - - switch (pname) { - case GL_TEXTURE_WIDTH: - *params = mip.width; - break; - case GL_TEXTURE_HEIGHT: - *params = mip.height; - break; - case GL_TEXTURE_DEPTH: - *params = 1; // Assuming 2D Texture - break; - case GL_TEXTURE_INTERNAL_FORMAT: - *params = mip.internalFormat; - break; - case GL_TEXTURE_RED_SIZE: - case GL_TEXTURE_GREEN_SIZE: - case GL_TEXTURE_BLUE_SIZE: - case GL_TEXTURE_ALPHA_SIZE: - case GL_TEXTURE_DEPTH_SIZE: - case GL_TEXTURE_STENCIL_SIZE: - switch (pname) { - case GL_TEXTURE_RED_SIZE: *params = sizes.red; break; - case GL_TEXTURE_GREEN_SIZE: *params = sizes.green; break; - case GL_TEXTURE_BLUE_SIZE: *params = sizes.blue; break; - case GL_TEXTURE_ALPHA_SIZE: *params = sizes.alpha; break; - case GL_TEXTURE_DEPTH_SIZE: *params = sizes.depth; break; - case GL_TEXTURE_STENCIL_SIZE: *params = sizes.stencil; break; - default: break; - } - break; - case GL_TEXTURE_COMPRESSED: - *params = sizes.isCompressed ? GL_TRUE : GL_FALSE; - break; - case GL_TEXTURE_COMPRESSED_IMAGE_SIZE: - if (!sizes.isCompressed) { - MG_Util::Debug::LogE("MG_State: Texture: QueryLevelPropertyIntVector texture is not compressed"); - return GL_INVALID_OPERATION; - } - *params = static_cast(mip.pixelData.size()); - break; - default: - MG_Util::Debug::LogE("MG_State: Texture: QueryLevelPropertyIntVector invalid pname=0x%x", pname); - return GL_INVALID_ENUM; - } - MG_Util::Debug::LogD("MG_State: Texture: QueryLevelPropertyIntVector returns %d for pname=0x%x", *params, pname); - return GL_NO_ERROR; -} - -void TextureState::InvalidateTextureInAllUnits_(GLuint texture) { - MG_Util::Debug::LogD("MG_State: Texture: InvalidateTextureInAllUnits_ called for texture=%u", texture); - for (auto& unit : textureUnits_) { - for (auto& [target, tex] : unit.boundTextures) { - if (tex == texture) { - tex = 0; - MG_Util::Debug::LogD("MG_State: Texture: InvalidateTextureInAllUnits_ unset texture for target=0x%x", target); - } - } - } -} - -GLenum TextureState::CheckUploadingTexture2DValidity_(GLenum target, GLint level, GLint internalFormat, - GLsizei width, GLsizei height, GLint border, GLenum format, - GLenum type, const void* data) { - MG_Util::Debug::LogD("MG_State: Texture: CheckUploadingTexture2DValidity_ called target=0x%x, level=%d", target, level); - if (!MG_Constants::Common::Contains(target, MG_Constants::Texture::VALID_TARGETS)) { - MG_Util::Debug::LogE("MG_State: Texture: CheckUploadingTexture2DValidity_ invalid target=0x%x", target); - return GL_INVALID_ENUM; - } - - if (level < 0) { - MG_Util::Debug::LogE("MG_State: Texture: CheckUploadingTexture2DValidity_ invalid level=%d", level); - return GL_INVALID_VALUE; - } - - if ((target == GL_TEXTURE_RECTANGLE || target == GL_PROXY_TEXTURE_RECTANGLE) && level != 0) { - MG_Util::Debug::LogE("MG_State: Texture: CheckUploadingTexture2DValidity_ invalid level for rectangle texture"); - return GL_INVALID_VALUE; - } - - if (width < 0 || height < 0) { - MG_Util::Debug::LogE("MG_State: Texture: CheckUploadingTexture2DValidity_ invalid dimensions width=%d, height=%d", width, height); - return GL_INVALID_VALUE; - } - - if ((target >= GL_TEXTURE_CUBE_MAP_POSITIVE_X && target <= GL_TEXTURE_CUBE_MAP_NEGATIVE_Z) && width != height) { - MG_Util::Debug::LogE("MG_State: Texture: CheckUploadingTexture2DValidity_ cube map requires equal width and height"); - return GL_INVALID_ENUM; - } - - if (width > MG_Constants::Texture::MAX_TEXTURE_SIZE) { - MG_Util::Debug::LogE("MG_State: Texture: CheckUploadingTexture2DValidity_ width exceeds maximum: %d", width); - return GL_INVALID_VALUE; - } - - if (target == GL_TEXTURE_1D_ARRAY || target == GL_PROXY_TEXTURE_1D_ARRAY) { - if (height > MG_Constants::Texture::MAX_ARRAY_LAYERS) { - MG_Util::Debug::LogE("MG_State: Texture: CheckUploadingTexture2DValidity_ height exceeds MAX_ARRAY_LAYERS: %d", height); - return GL_INVALID_VALUE; - } - } else if (height > MG_Constants::Texture::MAX_TEXTURE_SIZE) { - MG_Util::Debug::LogE("MG_State: Texture: CheckUploadingTexture2DValidity_ height exceeds maximum: %d", height); - return GL_INVALID_VALUE; - } - - if (!MG_Constants::Common::Contains((GLenum)internalFormat, MG_Constants::Texture::VALID_INTERNAL_FORMATS)) { - MG_Util::Debug::LogE("MG_State: Texture: CheckUploadingTexture2DValidity_ invalid internalFormat=0x%x", internalFormat); - return GL_INVALID_VALUE; - } - - if (!MG_Constants::Common::Contains((GLenum)format, MG_Constants::Texture::VALID_FORMATS)) { - MG_Util::Debug::LogE("MG_State: Texture: CheckUploadingTexture2DValidity_ invalid format=0x%x", format); - return GL_INVALID_ENUM; - } - - if (!MG_Constants::Common::Contains((GLenum)type, MG_Constants::Texture::VALID_TYPES)) { - MG_Util::Debug::LogE("MG_State: Texture: CheckUploadingTexture2DValidity_ invalid type=0x%x", type); - return GL_INVALID_ENUM; - } - - bool typeNeedsRGB = (type == GL_UNSIGNED_BYTE_3_3_2 || type == GL_UNSIGNED_SHORT_5_6_5); - if (typeNeedsRGB && format != GL_RGB) { - MG_Util::Debug::LogE("MG_State: Texture: CheckUploadingTexture2DValidity_ type requires RGB but format=0x%x", format); - return GL_INVALID_OPERATION; - } - - bool typeNeedsRGBA = (type == GL_UNSIGNED_SHORT_4_4_4_4 || type == GL_UNSIGNED_INT_8_8_8_8); - if (typeNeedsRGBA && format != GL_RGBA && format != GL_BGRA) { - MG_Util::Debug::LogE("MG_State: Texture: CheckUploadingTexture2DValidity_ type requires RGBA but format=0x%x", format); - return GL_INVALID_OPERATION; - } - - bool isDepthInternal = (internalFormat == GL_DEPTH_COMPONENT32 || internalFormat == GL_DEPTH_COMPONENT32F || - internalFormat == GL_DEPTH_COMPONENT24 || internalFormat == GL_DEPTH_COMPONENT16 || - internalFormat == GL_DEPTH32F_STENCIL8 || internalFormat == GL_DEPTH24_STENCIL8 || - internalFormat == GL_DEPTH_COMPONENT || internalFormat == GL_DEPTH_STENCIL); - bool isDepthFormat = (format == GL_DEPTH_COMPONENT || format == GL_DEPTH_STENCIL); - if (isDepthInternal != isDepthFormat) { - MG_Util::Debug::LogE("MG_State: Texture: CheckUploadingTexture2DValidity_ depth internal/format mismatch"); - return GL_INVALID_OPERATION; - } - - if (isDepthInternal && (target != GL_TEXTURE_2D && target != GL_PROXY_TEXTURE_2D && - target != GL_TEXTURE_RECTANGLE && target != GL_PROXY_TEXTURE_RECTANGLE)) { - MG_Util::Debug::LogE("MG_State: Texture: CheckUploadingTexture2DValidity_ invalid target for depth texture"); - return GL_INVALID_OPERATION; - } - - bool isProxyTexture = (target == GL_PROXY_TEXTURE_1D || target == GL_PROXY_TEXTURE_2D || - target == GL_PROXY_TEXTURE_3D || target == GL_PROXY_TEXTURE_CUBE_MAP || - target == GL_PROXY_TEXTURE_1D_ARRAY || target == GL_PROXY_TEXTURE_2D_ARRAY || - target == GL_PROXY_TEXTURE_RECTANGLE || target == GL_PROXY_TEXTURE_2D_MULTISAMPLE || - target == GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY); - if (!isProxyTexture) { - GLuint boundTex = textureUnits_[activeTextureUnit_].GetBoundTexture(target); - if (boundTex == 0) { - MG_Util::Debug::LogE( - "MG_State: Texture: CheckUploadingTexture2DValidity_ no texture bound for target=0x%x", - target); - return GL_INVALID_OPERATION; - } - - TextureObject &tex = textures[boundTex]; - if (tex.target != target) { - MG_Util::Debug::LogE( - "MG_State: Texture: CheckUploadingTexture2DValidity_ texture target mismatch: texture target=0x%x, expected=0x%x", - tex.target, target); - return GL_INVALID_OPERATION; - } - - if (tex.IsImmutable()) { - MG_Util::Debug::LogE( - "MG_State: Texture: CheckUploadingTexture2DValidity_ texture is immutable"); - return GL_INVALID_OPERATION; - } - } - - MG_Util::Debug::LogD("MG_State: Texture: CheckUploadingTexture2DValidity_ succeeded"); - return GL_NO_ERROR; -} - -GLenum TextureState::CheckUpdatingTextureRegion2DValidity_(GLenum target, GLint level, GLint xoffset, - GLint yoffset, GLsizei width, GLsizei height, GLenum format, - GLenum type, const GLvoid* data) { - MG_Util::Debug::LogD("MG_State: Texture: CheckUpdatingTextureRegion2DValidity_ called target=0x%x, level=%d, x=%d, y=%d, w=%d, h=%d", - target, level, xoffset, yoffset, width, height); - - if (!MG_Constants::Common::Contains(target, MG_Constants::Texture::VALID_TARGETS)) { - MG_Util::Debug::LogE("MG_State: Texture: CheckUpdatingTextureRegion2DValidity_ invalid target=0x%x", target); - return GL_INVALID_ENUM; - } - - if (level < 0) { - MG_Util::Debug::LogE("MG_State: Texture: CheckUpdatingTextureRegion2DValidity_ invalid level=%d", level); - return GL_INVALID_VALUE; - } - - if (xoffset < 0 || yoffset < 0) { - MG_Util::Debug::LogE("MG_State: Texture: CheckUpdatingTextureRegion2DValidity_ negative offset x=%d, y=%d", xoffset, yoffset); - return GL_INVALID_VALUE; - } - - if (width < 0 || height < 0) { - MG_Util::Debug::LogE("MG_State: Texture: CheckUpdatingTextureRegion2DValidity_ negative dimensions w=%d, h=%d", width, height); - return GL_INVALID_VALUE; - } - - if (!data) { - // TODO: need to impl PBO and then impl here - MG_Util::Debug::LogE("MG_State: Texture: CheckUpdatingTextureRegion2DValidity_ data pointer is null"); - return GL_INVALID_OPERATION ; - } - - GLuint boundTex = textureUnits_[activeTextureUnit_].GetBoundTexture(target); - if (boundTex == 0) { - MG_Util::Debug::LogE("MG_State: Texture: CheckUpdatingTextureRegion2DValidity_ no texture bound for target=0x%x", target); - return GL_INVALID_OPERATION; - } - - if (!IsTextureGenerated(boundTex)) { - MG_Util::Debug::LogE("MG_State: Texture: CheckUpdatingTextureRegion2DValidity_ texture %u not generated", boundTex); - return GL_INVALID_OPERATION; - } - - const auto& tex = textures[boundTex]; - - if (tex.IsImmutable()) { - MG_Util::Debug::LogE("MG_State: Texture: CheckUpdatingTextureRegion2DValidity_ texture is immutable"); - return GL_INVALID_OPERATION; - } - - auto mipIt = tex.params.mipmapData.find(level); - if (mipIt == tex.params.mipmapData.end()) { - MG_Util::Debug::LogE("MG_State: Texture: CheckUpdatingTextureRegion2DValidity_ no mipmap level %d", level); - return GL_INVALID_OPERATION; - } - - if (!MG_Constants::Common::Contains(format, MG_Constants::Texture::VALID_FORMATS)) { - MG_Util::Debug::LogE("MG_State: Texture: CheckUpdatingTextureRegion2DValidity_ invalid format=0x%x", format); - return GL_INVALID_ENUM; - } - - if (!MG_Constants::Common::Contains(type, MG_Constants::Texture::VALID_TYPES)) { - MG_Util::Debug::LogE("MG_State: Texture: CheckUpdatingTextureRegion2DValidity_ invalid type=0x%x", type); - return GL_INVALID_ENUM; - } - - bool typeNeedsRGB = (type == GL_UNSIGNED_BYTE_3_3_2 || type == GL_UNSIGNED_BYTE_2_3_3_REV || - type == GL_UNSIGNED_SHORT_5_6_5 || type == GL_UNSIGNED_SHORT_5_6_5_REV); - if (typeNeedsRGB && format != GL_RGB) { - MG_Util::Debug::LogE("MG_State: Texture: CheckUpdatingTextureRegion2DValidity_ type requires RGB format"); - return GL_INVALID_OPERATION; - } - - bool typeNeedsRGBA = (type == GL_UNSIGNED_SHORT_4_4_4_4 || type == GL_UNSIGNED_SHORT_4_4_4_4_REV || - type == GL_UNSIGNED_SHORT_5_5_5_1 || type == GL_UNSIGNED_SHORT_1_5_5_5_REV || - type == GL_UNSIGNED_INT_8_8_8_8 || type == GL_UNSIGNED_INT_8_8_8_8_REV || - type == GL_UNSIGNED_INT_10_10_10_2 || type == GL_UNSIGNED_INT_2_10_10_10_REV); - if (typeNeedsRGBA && format != GL_RGBA && format != GL_BGRA) { - MG_Util::Debug::LogE("MG_State: Texture: CheckUpdatingTextureRegion2DValidity_ type requires RGBA/BGRA format"); - return GL_INVALID_OPERATION; - } - - const auto& mip = mipIt->second; - if (xoffset + width > mip.width || yoffset + height > mip.height) { - MG_Util::Debug::LogE("MG_State: Texture: CheckUpdatingTextureRegion2DValidity_ region out of bounds: " - "x=%d+%d > %d or y=%d+%d > %d", - xoffset, width, mip.width, yoffset, height, mip.height); - return GL_INVALID_VALUE; - } - - bool isDepthInternal = (mip.internalFormat == GL_DEPTH_COMPONENT || - mip.internalFormat == GL_DEPTH_COMPONENT16 || - mip.internalFormat == GL_DEPTH_COMPONENT24 || - mip.internalFormat == GL_DEPTH_COMPONENT32F || - mip.internalFormat == GL_DEPTH_STENCIL || - mip.internalFormat == GL_DEPTH24_STENCIL8 || - mip.internalFormat == GL_DEPTH32F_STENCIL8); - - bool isDepthFormat = (format == GL_DEPTH_COMPONENT || format == GL_DEPTH_STENCIL); - if (isDepthInternal != isDepthFormat) { - MG_Util::Debug::LogE("MG_State: Texture: CheckUpdatingTextureRegion2DValidity_ format mismatch with internal format"); - return GL_INVALID_OPERATION; - } - MG_Util::Debug::LogD("MG_State: Texture: CheckUpdatingTextureRegion2DValidity_ validated subimage update"); - return GL_NO_ERROR; -} - -ComponentSizes TextureState::GetComponentSize_s_(GLenum internalFormat) { - MG_Util::Debug::LogD("MG_State: Texture: GetComponentSize_s_ called for internalFormat=0x%x", internalFormat); - ComponentSizes sizes = {0}; - switch (internalFormat) { - // Base formats - case GL_R8: - case GL_R8_SNORM: sizes.red = 8; break; - case GL_R16: - case GL_R16_SNORM: - case GL_R16F: sizes.red = 16; break; - case GL_R32F: sizes.red = 32; break; - case GL_R8I: - case GL_R8UI: sizes.red = 8; break; - case GL_R16I: - case GL_R16UI: sizes.red = 16; break; - case GL_R32I: - case GL_R32UI: sizes.red = 32; break; - - case GL_RG8: - case GL_RG8_SNORM: sizes.red = 8; sizes.green = 8; break; - case GL_RG16: - case GL_RG16_SNORM: - case GL_RG16F: sizes.red = 16; sizes.green = 16; break; - case GL_RG32F: sizes.red = 32; sizes.green = 32; break; - case GL_RG8I: - case GL_RG8UI: sizes.red = 8; sizes.green = 8; break; - case GL_RG16I: - case GL_RG16UI: sizes.red = 16; sizes.green = 16; break; - case GL_RG32I: - case GL_RG32UI: sizes.red = 32; sizes.green = 32; break; - - case GL_RGB8: - case GL_RGB8_SNORM: sizes.red = 8; sizes.green = 8; sizes.blue = 8; break; - case GL_RGB16: - case GL_RGB16_SNORM: - case GL_RGB16F: sizes.red = 16; sizes.green = 16; sizes.blue = 16; break; - case GL_RGB32F: sizes.red = 32; sizes.green = 32; sizes.blue = 32; break; - case GL_RGB8I: - case GL_RGB8UI: sizes.red = 8; sizes.green = 8; sizes.blue = 8; break; - case GL_RGB16I: - case GL_RGB16UI: sizes.red = 16; sizes.green = 16; sizes.blue = 16; break; - case GL_RGB32I: - case GL_RGB32UI: sizes.red = 32; sizes.green = 32; sizes.blue = 32; break; - - case GL_RGBA8: - case GL_RGBA8_SNORM: sizes.red = 8; sizes.green = 8; sizes.blue = 8; sizes.alpha = 8; break; - case GL_RGBA16: - case GL_RGBA16_SNORM: - case GL_RGBA16F: sizes.red = 16; sizes.green = 16; sizes.blue = 16; sizes.alpha = 16; break; - case GL_RGBA32F: sizes.red = 32; sizes.green = 32; sizes.blue = 32; sizes.alpha = 32; break; - case GL_RGBA8I: - case GL_RGBA8UI: sizes.red = 8; sizes.green = 8; sizes.blue = 8; sizes.alpha = 8; break; - case GL_RGBA16I: - case GL_RGBA16UI: sizes.red = 16; sizes.green = 16; sizes.blue = 16; sizes.alpha = 16; break; - case GL_RGBA32I: - case GL_RGBA32UI: sizes.red = 32; sizes.green = 32; sizes.blue = 32; sizes.alpha = 32; break; - - // Packed formats - case GL_RGB565: sizes.red = 5; sizes.green = 6; sizes.blue = 5; break; - case GL_RGBA4: sizes.red = 4; sizes.green = 4; sizes.blue = 4; sizes.alpha = 4; break; - case GL_RGB5_A1: sizes.red = 5; sizes.green = 5; sizes.blue = 5; sizes.alpha = 1; break; - case GL_RGB10_A2: - case GL_RGB10_A2UI: sizes.red = 10; sizes.green = 10; sizes.blue = 10; sizes.alpha = 2; break; - case GL_R11F_G11F_B10F: sizes.red = 11; sizes.green = 11; sizes.blue = 10; break; - case GL_RGB9_E5: sizes.red = 9; sizes.green = 9; sizes.blue = 9; break; // shared exponent - - // sRGB formats - case GL_SRGB8: sizes.red = 8; sizes.green = 8; sizes.blue = 8; break; - case GL_SRGB8_ALPHA8: sizes.red = 8; sizes.green = 8; sizes.blue = 8; sizes.alpha = 8; break; - - // Depth/stencil formats - case GL_DEPTH_COMPONENT16: sizes.depth = 16; break; - case GL_DEPTH_COMPONENT24: sizes.depth = 24; break; - case GL_DEPTH_COMPONENT32: - case GL_DEPTH_COMPONENT32F: sizes.depth = 32; break; - case GL_DEPTH24_STENCIL8: sizes.depth = 24; sizes.stencil = 8; break; - case GL_DEPTH32F_STENCIL8: sizes.depth = 32; sizes.stencil = 8; break; - - // Compressed formats - case GL_COMPRESSED_RGB_S3TC_DXT1_EXT: - case GL_COMPRESSED_RGBA_S3TC_DXT1_EXT: - sizes.isCompressed = true; - sizes.red = 5; sizes.green = 6; sizes.blue = 5; - if (internalFormat == GL_COMPRESSED_RGBA_S3TC_DXT1_EXT) sizes.alpha = 1; - break; - case GL_COMPRESSED_RGBA_S3TC_DXT3_EXT: - case GL_COMPRESSED_RGBA_S3TC_DXT5_EXT: - case GL_COMPRESSED_RG_RGTC2: - case GL_COMPRESSED_SIGNED_RG_RGTC2: - case GL_COMPRESSED_RED_RGTC1: - case GL_COMPRESSED_SIGNED_RED_RGTC1: - sizes.isCompressed = true; - break; - - default: - if (internalFormat == GL_RGBA || internalFormat == GL_BGRA || - internalFormat == GL_RGBA_INTEGER || internalFormat == GL_BGRA_INTEGER) { - // Typically matches RGBA8 when no size is specified - sizes.red = 8; sizes.green = 8; sizes.blue = 8; sizes.alpha = 8; - } else if (internalFormat == GL_RGB || internalFormat == GL_BGR || - internalFormat == GL_RGB_INTEGER || internalFormat == GL_BGR_INTEGER) { - sizes.red = 8; sizes.green = 8; sizes.blue = 8; - } else if (internalFormat == GL_RG || internalFormat == GL_RG_INTEGER) { - sizes.red = 8; sizes.green = 8; - } else if (internalFormat == GL_RED || internalFormat == GL_RED_INTEGER) { - sizes.red = 8; - } else if (internalFormat == GL_DEPTH_COMPONENT) { - sizes.depth = 32; // Common default - } else if (internalFormat == GL_DEPTH_STENCIL) { - sizes.depth = 32; sizes.stencil = 8; - } - break; - } - MG_Util::Debug::LogD("MG_State: Texture: GetComponentSize_s_ returns (red=%d, green=%d, blue=%d, alpha=%d, depth=%d, stencil=%d, isCompressed=%d)", - sizes.red, sizes.green, sizes.blue, sizes.alpha, sizes.depth, sizes.stencil, sizes.isCompressed); - return sizes; -} - -size_t TextureState::CalculateBytesPerPixel_(GLenum format, GLenum type) { - switch (type) { - case GL_UNSIGNED_BYTE_3_3_2: - case GL_UNSIGNED_BYTE_2_3_3_REV: - return 1; - case GL_UNSIGNED_SHORT_5_6_5: - case GL_UNSIGNED_SHORT_5_6_5_REV: - case GL_UNSIGNED_SHORT_4_4_4_4: - case GL_UNSIGNED_SHORT_4_4_4_4_REV: - case GL_UNSIGNED_SHORT_5_5_5_1: - case GL_UNSIGNED_SHORT_1_5_5_5_REV: - return 2; - case GL_UNSIGNED_INT_8_8_8_8: - case GL_UNSIGNED_INT_8_8_8_8_REV: - case GL_UNSIGNED_INT_10_10_10_2: - case GL_UNSIGNED_INT_2_10_10_10_REV: - return 4; - default: - break; - } - - int components = 0; - switch (format) { - case GL_RED: - case GL_DEPTH_COMPONENT: - components = 1; - break; - case GL_RG: - case GL_DEPTH_STENCIL: - components = 2; - break; - case GL_RGB: - case GL_BGR: - components = 3; - break; - case GL_RGBA: - case GL_BGRA: - components = 4; - break; - default: - components = 0; - break; - } - - size_t componentSize = GetComponentSize_(type); - return components * componentSize; -} - -size_t TextureState::GetComponentSize_(GLenum type) { - switch (type) { - case GL_BYTE: - case GL_UNSIGNED_BYTE: - return 1; - case GL_SHORT: - case GL_UNSIGNED_SHORT: - case GL_HALF_FLOAT: - return 2; - case GL_INT: - case GL_UNSIGNED_INT: - case GL_FLOAT: - return 4; - case GL_UNSIGNED_BYTE_3_3_2: - case GL_UNSIGNED_BYTE_2_3_3_REV: - return 1; - case GL_UNSIGNED_SHORT_5_6_5: - case GL_UNSIGNED_SHORT_5_6_5_REV: - case GL_UNSIGNED_SHORT_4_4_4_4: - case GL_UNSIGNED_SHORT_4_4_4_4_REV: - case GL_UNSIGNED_SHORT_5_5_5_1: - case GL_UNSIGNED_SHORT_1_5_5_5_REV: - return 2; - case GL_UNSIGNED_INT_8_8_8_8: - case GL_UNSIGNED_INT_8_8_8_8_REV: - case GL_UNSIGNED_INT_10_10_10_2: - case GL_UNSIGNED_INT_2_10_10_10_REV: - return 4; - default: - return 0; - } -} - -void TextureState::SwapBytesForTexture_(GLenum format, GLenum type, const GLubyte* src, GLubyte* dst, GLsizei width) { - size_t componentSize = GetComponentSize_(type); - if (componentSize <= 1) { - memcpy(dst, src, width * componentSize); - return; - } - - for (GLsizei i = 0; i < width; ++i) { - for (size_t j = 0; j < componentSize; ++j) { - dst[i * componentSize + j] = src[i * componentSize + (componentSize - 1 - j)]; - } - } -} - -GLubyte TextureState::ReverseBits_(GLubyte b) { - b = (b & 0xF0) >> 4 | (b & 0x0F) << 4; - b = (b & 0xCC) >> 2 | (b & 0x33) << 2; - b = (b & 0xAA) >> 1 | (b & 0x55) << 1; - return b; -} - -void TextureState::ReverseBitOrder_(const GLubyte* src, GLubyte* dst, size_t byteCount) { - for (size_t i = 0; i < byteCount; ++i) { - dst[i] = ReverseBits_(src[i]); - } -} - -void TextureState::SwapPixelBytes_(GLenum format, GLenum type, const GLubyte* src, GLubyte* dst) { - const size_t size = GetComponentSize_(type); - for (size_t i = 0; i < size; ++i) { - dst[i] = src[size - 1 - i]; - } -} diff --git a/MG/MG_GL/State/Texture/TextureState.h b/MG/MG_GL/State/Texture/TextureState.h deleted file mode 100644 index d186f85a..00000000 --- a/MG/MG_GL/State/Texture/TextureState.h +++ /dev/null @@ -1,108 +0,0 @@ -// -// Created by BZLZHH on 2025/4/4. -// - -#ifndef MOBILEGL_TEXTURESTATE_H -#define MOBILEGL_TEXTURESTATE_H - -struct ComponentSizes { - GLint red = 0; - GLint green = 0; - GLint blue = 0; - GLint alpha = 0; - GLint depth = 0; - GLint stencil = 0; - bool isCompressed = false; -}; - -struct TextureParams { - MG_Global::unordered_map texPropertiesFloat; - MG_Global::unordered_map texPropertiesInt; - struct MipmapLevel { - GLsizei width = 0; - GLsizei height = 0; - GLenum format = GL_RGBA; - GLenum internalFormat = GL_RGBA; - GLenum type = GL_UNSIGNED_BYTE; - std::vector pixelData; - bool hasData = false; - bool dirty = false; // TODO: encapsulate this with an public API to RHI - }; - MG_Global::unordered_map mipmapData; -}; - -class TextureObject { -public: - bool generated = false; - GLenum target = GL_NONE; - TextureParams params; - const void* data = nullptr; - bool IsImmutable() const; - uint64_t createTimestamp{}; -}; - -class TextureUnitState { -public: - void Bind(GLenum target, GLuint texture); - GLuint GetBoundTexture(GLenum target); - - GLenum activeTarget = GL_TEXTURE_2D; - MG_Global::unordered_map boundTextures; -}; - -class TextureState { -private: - - GLuint lastUsedID_ = 1; -// MG_Global::unordered_set freeIDs_; - std::vector freeID_; - - MG_Global::unordered_map proxyTextures_; - static GLint GetUnpackParam_(GLenum pname); - -public: - TextureState(); - - bool IsTextureGenerated(GLuint texture); - bool IsTexture(GLuint texture); - MG_Global::unordered_map textures; - - - // Return: the validity of the operation, according to OpenGL 3 standard - GLenum BindUnit(GLenum textureUnit); - GLenum Create(GLuint* texture); - GLenum CreateN(GLsizei n, GLuint* textures); - GLenum Bind(GLenum target, GLuint texture); - GLenum Upload2D(GLenum target, GLint level, GLint internalFormat, - GLsizei width, GLsizei height, GLint border, GLenum format, - GLenum type, const void* data); - GLenum UpdateRegion2D(GLenum target, GLint level, GLint xoffset, - GLint yoffset, GLsizei width, GLsizei height, GLenum format, - GLenum type, const GLvoid* data); - GLenum SetTexturePropertyInt(GLenum target, GLenum pname, GLint param); - GLenum SetTexturePropertyFloat(GLenum target, GLenum pname, GLfloat param); - GLenum Delete(GLuint texture); - GLenum DeleteN(GLsizei n, const GLuint* textures); - GLenum QueryLevelPropertyIntVector(GLenum target, GLint level, GLenum pname, GLint* params); - - std::vector textureUnits_; - GLuint activeTextureUnit_ = 0; -private: - size_t CalculatePixelDataSize_(GLenum format, GLenum type, GLsizei width, GLsizei height); - void InvalidateTextureInAllUnits_(GLuint texture); - static ComponentSizes GetComponentSize_s_(GLenum internalFormat); - size_t CalculateBytesPerPixel_(GLenum format, GLenum type); - static size_t GetComponentSize_(GLenum type); - void SwapBytesForTexture_(GLenum format, GLenum type, const GLubyte* src, GLubyte* dst, GLsizei width); - static void ReverseBitOrder_(const GLubyte* src, GLubyte* dst, size_t size); - static GLubyte ReverseBits_(GLubyte b); - void SwapPixelBytes_(GLenum format, GLenum type, const GLubyte* src, GLubyte* dst); - GLenum CheckUploadingTexture2DValidity_(GLenum target, GLint level, GLint internalFormat, - GLsizei width, GLsizei height, GLint border, GLenum format, - GLenum type, const void* data); - GLenum CheckUpdatingTextureRegion2DValidity_(GLenum target, GLint level, GLint xoffset, - GLint yoffset, GLsizei width, GLsizei height, GLenum format, - GLenum type, const GLvoid* data); -}; - -#endif //MOBILEGL_TEXTURESTATE_H diff --git a/MG/MG_GL/State/VertexArray/VertexArrayState.cpp b/MG/MG_GL/State/VertexArray/VertexArrayState.cpp deleted file mode 100644 index 4c24372b..00000000 --- a/MG/MG_GL/State/VertexArray/VertexArrayState.cpp +++ /dev/null @@ -1,161 +0,0 @@ -// -// Created by BZLZHH on 2025/5/1. -// - -// TODO: Add more gl error check for vertex array state manager. - -#include "../../../Includes.h" - -VertexArrayState::VertexArrayState() { - vaos_[0]; -} - -GLenum VertexArrayState::GenName(GLuint *array) { - MG_Util::Debug::LogD("MG_State: VAO: GenName"); - if (!array) - return GL_INVALID_VALUE; - GLuint id; - if (freeIds_.empty()) { - id = ++lastId_; - } else { - id = *freeIds_.begin(); - freeIds_.erase(freeIds_.begin()); - } - *array = id; - MG_Util::Debug::LogD("MG_State: VAO: Generated new name %d", id); - return GL_NO_ERROR; -} - -GLenum VertexArrayState::GenNameN(GLsizei n, GLuint* arrays) { - MG_Util::Debug::LogD("MG_State: VAO: GenNameN called with n=%d", n); - if (n < 0) - return GL_INVALID_VALUE; - for (GLsizei i = 0; i < n; ++i) { - GLenum result = GenName(&arrays[i]); - if (result != GL_NO_ERROR) { - MG_Util::Debug::LogE("MG_State: VAO: GenNameN failed at index %d with error 0x%x", i, result); - return result; - } - } - MG_Util::Debug::LogD("MG_State: VAO: GenNameN created %d names", n); - return GL_NO_ERROR; -} - -GLenum VertexArrayState::Create(GLuint* array) { - if (array == nullptr) return GL_INVALID_VALUE; - - GLuint id = freeIds_.empty() ? ++lastId_ : *freeIds_.begin(); - if (!freeIds_.empty()) { - freeIds_.erase(freeIds_.begin()); - } - - *array = id; - vaos_[id].generated = true; - return GL_NO_ERROR; -} - -GLenum VertexArrayState::CreateN(GLsizei n, GLuint* arrays) { - if (n < 0) { - return GL_INVALID_VALUE; - } - - if (n > 0 && arrays == nullptr) { - return GL_INVALID_VALUE; - } - - for (GLsizei i = 0; i < n; ++i) { - if (GLenum error = Create(&arrays[i]); error != GL_NO_ERROR) { - return error; - } - } - return GL_NO_ERROR; -} - -GLenum VertexArrayState::Bind(GLuint array) { - MG_Util::Debug::LogD("MG_State: VAO: Bind called for %u", array); - if (array != 0) { - if (!ValidateGeneratedName(array)) { - MG_Util::Debug::LogE("MG_State: VAO: Bind invalid name %u", array); - return GL_INVALID_OPERATION; - } - auto& vao = vaos_[array]; - if (!vao.generated) { - MG_Util::Debug::LogD("MG_State: VAO: Creating VAO %u during bind", array); - vao.generated = true; - } - } - currentVao_ = array; - MG_Util::Debug::LogD("MG_State: VAO: Bound to %u", array); - return GL_NO_ERROR; -} - -bool VertexArrayState::ValidateGeneratedName(GLuint array) { - if (array == 0) - return true; - bool inFreeList = freeIds_.count(array) > 0; - bool valid = (array <= lastId_) && !inFreeList; - MG_Util::Debug::LogD("MG_State: VAO: ValidateGeneratedName %u: %d", array, valid); - return valid; -} - -bool VertexArrayState::ValidateAllocatedHandle(GLuint array) { - bool exists = vaos_.count(array) && vaos_[array].generated; - MG_Util::Debug::LogD("MG_State: VAO: ValidateAllocatedHandle %u: %d", array, exists); - return exists; -} - -GLenum VertexArrayState::EnableAttrib(GLuint index) { - if (!ValidateAllocatedHandle(currentVao_)) - return GL_INVALID_OPERATION; - if (index >= MG_Constants::VertexArray::MAX_VERTEX_ATTRIBS) return GL_INVALID_VALUE; - GetCurrentVAO()->attribs[index].enabled = true; - MG_Util::Debug::LogD("Attrib vaos_[%u].attribs[%u].enabled = %d", currentVao_, index, vaos_[currentVao_].attribs[index].enabled); - - GetCurrentVAO()->attribDirty = true; - return GL_NO_ERROR; -} - -GLenum VertexArrayState::DisableAttrib(GLuint index) { - if (!ValidateAllocatedHandle(currentVao_)) - return GL_INVALID_OPERATION; - if (index >= MG_Constants::VertexArray::MAX_VERTEX_ATTRIBS) return GL_INVALID_VALUE; - GetCurrentVAO()->attribs[index].enabled = false; - MG_Util::Debug::LogD("Attrib vaos_[%u].attribs[%u].enabled = %d", currentVao_, index, vaos_[currentVao_].attribs[index].enabled); - - GetCurrentVAO()->attribDirty = true; - return GL_NO_ERROR; -} - -GLenum VertexArrayState::SetAttribPointer(GLuint index, GLint size, GLenum type, - GLboolean normalized, GLsizei stride, - const void* pointer, bool isInteger, - GLuint currentArrayBuffer) { - if (!ValidateAllocatedHandle(currentVao_)) - return GL_INVALID_OPERATION; - if (index >= MG_Constants::VertexArray::MAX_VERTEX_ATTRIBS) return GL_INVALID_VALUE; - - VertexAttribState state; - state.size = size; - state.type = type; - state.normalized = normalized; - state.stride = stride; - state.pointer = pointer; - state.buffer = currentArrayBuffer; - state.isInteger = isInteger; - state.enabled = vaos_[currentVao_].attribs[index].enabled; - - vaos_[currentVao_].attribs[index] = state; - - GetCurrentVAO()->attribDirty = true; - return GL_NO_ERROR; -} - -GLuint VertexArrayState::GetBoundElementBuffer() { - auto it = vaos_.find(currentVao_); - return (it != vaos_.end()) ? it->second.elementBuffer : 0; -} - -VertexArrayObject* VertexArrayState::GetCurrentVAO() { - auto it = vaos_.find(currentVao_); - return (it != vaos_.end()) ? &it->second : &vaos_.at(0); -} \ No newline at end of file diff --git a/MG/MG_GL/State/VertexArray/VertexArrayState.h b/MG/MG_GL/State/VertexArray/VertexArrayState.h deleted file mode 100644 index d925bb5c..00000000 --- a/MG/MG_GL/State/VertexArray/VertexArrayState.h +++ /dev/null @@ -1,56 +0,0 @@ -// -// Created by BZLZHH on 2025/5/1. -// - -#ifndef MOBILEGL_VERTEXARRAYSTATE_H -#define MOBILEGL_VERTEXARRAYSTATE_H - -struct VertexAttribState { - bool enabled = false; - GLint size = 4; - GLenum type = GL_FLOAT; - GLboolean normalized = GL_FALSE; - GLsizei stride = 0; - const GLvoid* pointer = nullptr; - GLuint buffer = 0; - bool isInteger = false; -}; - -struct VertexArrayObject { - bool generated = false; - bool attribDirty = false; - bool eboDirty = false; - GLuint elementBuffer = 0; - std::array attribs; -}; - -class VertexArrayState { -public: - VertexArrayState(); - - // Return: the validity of the operation, according to OpenGL 3 standard - GLenum GenName(GLuint* array); - GLenum GenNameN(GLsizei n, GLuint* arrays); - GLenum Create(GLuint* array); - GLenum CreateN(GLsizei n, GLuint* arrays); - GLenum Bind(GLuint array); - GLenum EnableAttrib(GLuint index); - GLenum DisableAttrib(GLuint index); - GLenum SetAttribPointer(GLuint index, GLint size, GLenum type, - GLboolean normalized, GLsizei stride, - const void* pointer, bool isInteger, - GLuint currentArrayBuffer); - - GLuint GetBoundElementBuffer(); - VertexArrayObject* GetCurrentVAO(); - bool ValidateGeneratedName(GLuint array); - bool ValidateAllocatedHandle(GLuint array); - - GLuint currentVao_ = 0; - MG_Global::unordered_map vaos_; -private: - std::set freeIds_; - GLuint lastId_ = 0; -}; - -#endif //MOBILEGL_VERTEXARRAYSTATE_H diff --git a/MG/MG_Include/IndexGenerator.hpp b/MG/MG_Include/IndexGenerator.hpp deleted file mode 100644 index 3f62b116..00000000 --- a/MG/MG_Include/IndexGenerator.hpp +++ /dev/null @@ -1,73 +0,0 @@ -// -// Created by yello on 2025-06-27. -// - -#ifndef INDEXGENERATOR_H -#define INDEXGENERATOR_H - -#include -#include // For size_t -#include // For std::min -#include - -template -class IndexGenerator { -public: - // 构造函数 - IndexGenerator() : next_index_(1) {} - explicit IndexGenerator(IndexType n) : next_index_(1) { - is_valid_.reserve(n); - } - - // 生成n个新正整数 - void Generate(size_t n, IndexType *indices) { - if (n <= 0) { - return; - } - - // 优先给出被删除的索引 - size_t count_from_freed = std::min(n, freed_indices_.size()); - for (size_t i = 0; i < count_from_freed; ++i) { - indices[i] = freed_indices_.back(); - freed_indices_.pop_back(); - // 标记为有效,确保is_valid_的大小足够 - if (indices[i] >= is_valid_.size()) { - is_valid_.resize(static_cast(indices[i]) + 1, false); // 0代表无效,1代表有效 - } - is_valid_[indices[i]] = true; // 标记为有效 - } - - // 如果还需要更多的索引,则生成新的索引 - for (size_t i = count_from_freed; i < n; ++i) { - indices[i] = next_index_++; - // 确保is_valid_的大小足够 - if (indices[i] >= is_valid_.size()) { - is_valid_.resize(static_cast(indices[i]) + 1, false); - } - is_valid_[indices[i]] = true; // 标记为有效 - } - } - - // 删除一个已经给出的正整数 - void Delete(IndexType index) { - // 检查索引是否有效且未被删除 - // 这里的检查是为了避免重复删除或删除未生成的索引 - if (index < is_valid_.size() && is_valid_[index] == true) { - is_valid_[index] = false; // 标记为无效 - freed_indices_.push_back(index); // 添加到已删除列表中 - } - } - - // 检查一个正整数是否之前已经被给出,并且没有被删除 - bool IsValid(IndexType index) const { - // 如果索引超出is_valid_的范围,或者对应的位置是0,则认为无效 - return index < is_valid_.size() && is_valid_[index] == true; - } - -private: - IndexType next_index_; // 下一个将要生成的正整数 - std::vector freed_indices_; // 存储被删除的索引 - std::vector is_valid_; // 标记索引是否有效。0代表无效,1代表有效。 -}; - -#endif //INDEXGENERATOR_H diff --git a/MG/MG_Include/UncertainBool.hpp b/MG/MG_Include/UncertainBool.hpp deleted file mode 100644 index b7a52d93..00000000 --- a/MG/MG_Include/UncertainBool.hpp +++ /dev/null @@ -1,127 +0,0 @@ -// -// Created by BZLZHH on 2025/5/3. -// - -#pragma once -#include -#include -#include - -class UncertainBool { -public: - enum Value { False = 0, True = 1, Unknown = 2 }; - - UncertainBool() : value_(False), default_(false) {} - - explicit UncertainBool(bool b) : value_(b ? True : False), default_(false) {} - - UncertainBool(Value val, bool def) : value_(val), default_(def) { - validateValue(); - } - - UncertainBool(bool val, bool def) : value_(val ? True : False), default_(def) { - validateValue(); - } - - UncertainBool& operator=(Value val) { - value_ = val; - validateValue(); - return *this; - } - - UncertainBool& operator=(bool b) { - value_ = b ? True : False; - return *this; - } - - UncertainBool& operator=(std::initializer_list> init) { - if (init.size() != 1) throw std::invalid_argument("Invalid initializer"); - value_ = init.begin()->first ? True : False; - default_ = init.begin()->second; - return *this; - } - - explicit operator bool() const { - return toBool(); - } - - bool toBool() const { - if (value_ == True) return true; - else if (value_ == False) return false; - else return default_; - } - - UncertainBool operator!() const { - return {static_cast(*this) ? False : True, false}; - } - - bool operator==(const UncertainBool& rhs) const { - return static_cast(*this) == static_cast(rhs); - } - bool operator!=(const UncertainBool& rhs) const { return !(*this == rhs); } - - friend UncertainBool operator&&(const UncertainBool& lhs, const UncertainBool& rhs) { - bool actualDefault = lhs.default_ && rhs.default_; - if(lhs.value_ == False || rhs.value_ == False) return {False,actualDefault}; - else if(lhs.value_ == True && rhs.value_ == True) return {True,actualDefault}; - else return {Unknown, actualDefault}; - } - - friend UncertainBool operator||(const UncertainBool& lhs, const UncertainBool& rhs) { - bool actualDefault = lhs.default_ || rhs.default_; - if(lhs.value_ == True || rhs.value_ == True) return {True,actualDefault}; - else if(lhs.value_ == False && rhs.value_ == False) return {False,actualDefault}; - else return {Unknown, actualDefault}; - } - - friend UncertainBool operator&&(bool lhs,const UncertainBool& rhs){ - return UncertainBool(lhs, lhs) && rhs; - } - - friend UncertainBool operator||(bool lhs,const UncertainBool& rhs){ - return UncertainBool(lhs, lhs) || rhs; - } - - UncertainBool& operator&=(const UncertainBool& rhs) { - *this = *this && rhs; - return *this; - } - - UncertainBool& operator|=(const UncertainBool& rhs) { - *this = *this || rhs; - return *this; - } - - UncertainBool& operator=(std::initializer_list> init) { - if (init.size() != 1) throw std::invalid_argument("Invalid initializer"); - value_ = init.begin()->first; - default_ = init.begin()->second; - validateValue(); - return *this; - } - - Value getValue() const { return value_; } - bool getDefault() const { return default_; } - -private: - Value value_; - bool default_; - - void validateValue() { - if (value_ != False && value_ != True && value_ != Unknown) { - throw std::invalid_argument("Invalid value"); - } - } -}; - -inline UncertainBool operator!(const UncertainBool& lhs) { - return lhs.operator!(); -} - -inline bool operator==(bool lhs, const UncertainBool& rhs) { - return static_cast(rhs) == lhs; -} - -inline bool operator!=(bool lhs, const UncertainBool& rhs) { - return !(lhs == rhs); -} \ No newline at end of file diff --git a/MG/MG_RHI/GLES/Test/TestDrawing.cpp b/MG/MG_RHI/GLES/Test/TestDrawing.cpp deleted file mode 100644 index ead4cc37..00000000 --- a/MG/MG_RHI/GLES/Test/TestDrawing.cpp +++ /dev/null @@ -1,240 +0,0 @@ -// -// Created by BZLZHH on 2025/4/26. -// - -#include "../../../Includes.h" - -namespace MG_RHI::GLES::Test { - constexpr int DISPLAY_COLUMNS = 8; - constexpr int DISPLAY_ROWS = 10; - constexpr int MAX_DISPLAY_TEXTURES = DISPLAY_COLUMNS * DISPLAY_ROWS; - - bool IsTextureComplete(const TextureObject& tex) { - return !tex.params.mipmapData.empty(); - } - - bool CheckShaderCompileStatus(GLuint shader, const char* type) { -#if BACKEND_TYPE == BACKEND_GLES - GLint success; - ::GLES::glGetShaderiv(shader, GL_COMPILE_STATUS, &success); - if (!success) { - GLchar infoLog[512]; - ::GLES::glGetShaderInfoLog(shader, 512, NULL, infoLog); - MG_Util::Debug::LogE("Shader compilation error (%s): %s", type, infoLog); - return false; - } -#endif - return true; - } - - bool CheckProgramLinkStatus(GLuint program) { -#if BACKEND_TYPE == BACKEND_GLES - GLint success; - ::GLES::glGetProgramiv(program, GL_LINK_STATUS, &success); - if (!success) { - GLchar infoLog[512]; - ::GLES::glGetProgramInfoLog(program, 512, NULL, infoLog); - MG_Util::Debug::LogE("Program link error: %s", infoLog); - return false; - } -#endif - return true; - } - - // TODO: Use the textures state from MG_RHI(another state?) rather than directly from MG_State - void DrawAllTextures() { -#if BACKEND_TYPE == BACKEND_GLES - ::GLES::glClearColor(1,1,1,1); - ::GLES::glClear(GL_COLOR_BUFFER_BIT); - - struct ScreenResources { - GLuint program = 0; - GLuint quadVAO = 0; - GLuint quadVBO = 0; - GLint uTexLoc = -1; - GLint uMVPLoc = -1; - MG_Global::unordered_map textureCache; - MG_Global::unordered_map textureDirty; - }; - - static ScreenResources sRes; - static glm::ivec2 lastScreenSize{0, 0}; - - GLint viewport[4]; - ::GLES::glGetIntegerv(GL_VIEWPORT, viewport); - - const glm::ivec2 screenSize(viewport[2], viewport[3]); - - if (screenSize != lastScreenSize) { - if (sRes.quadVAO) { - ::GLES::glDeleteVertexArrays(1, &sRes.quadVAO); - ::GLES::glDeleteBuffers(1, &sRes.quadVBO); - sRes.quadVAO = sRes.quadVBO = 0; - } - lastScreenSize = screenSize; - } - - if (!sRes.program) { - const char* vsSrc = R"(#version 320 es - layout(location=0) in vec2 aPos; - layout(location=1) in vec2 aTexUV; - out vec2 vUV; - uniform mat4 uMVP; - void main() { - gl_Position = uMVP * vec4(aPos, 0.0, 1.0); - vUV = aTexUV; - })"; - - const char* fsSrc = R"(#version 320 es - precision mediump float; - in vec2 vUV; - uniform sampler2D uTex; - out vec4 FragColor; - void main() { - FragColor = texture(uTex, vUV); - })"; - - GLuint vs = ::GLES::glCreateShader(GL_VERTEX_SHADER); - ::GLES::glShaderSource(vs, 1, &vsSrc, NULL); - ::GLES::glCompileShader(vs); - if (!CheckShaderCompileStatus(vs, "vertex")) return; - - GLuint fs = ::GLES::glCreateShader(GL_FRAGMENT_SHADER); - ::GLES::glShaderSource(fs, 1, &fsSrc, NULL); - ::GLES::glCompileShader(fs); - if (!CheckShaderCompileStatus(fs, "fragment")) return; - - sRes.program = ::GLES::glCreateProgram(); - ::GLES::glAttachShader(sRes.program, vs); - ::GLES::glAttachShader(sRes.program, fs); - ::GLES::glLinkProgram(sRes.program); - if (!CheckProgramLinkStatus(sRes.program)) return; - - sRes.uTexLoc = ::GLES::glGetUniformLocation(sRes.program, "uTex"); - sRes.uMVPLoc = ::GLES::glGetUniformLocation(sRes.program, "uMVP"); - - ::GLES::glDeleteShader(vs); - ::GLES::glDeleteShader(fs); - } - - if (!sRes.quadVAO) { - const float margin = 0.01f; - const float gridWidth = (2.0f - 2*margin) / DISPLAY_COLUMNS; - const float gridHeight = (2.0f - 2*margin) / DISPLAY_ROWS; - - std::vector vertices; - vertices.reserve(MAX_DISPLAY_TEXTURES * 16); - - for (int col = 0; col < DISPLAY_COLUMNS; ++col) { - for (int row = 0; row < DISPLAY_ROWS; ++row) { - const float xStart = -1.0f + margin + col * gridWidth; - const float yStart = -1.0f + margin + row * gridHeight; - const float xEnd = xStart + gridWidth - margin; - const float yEnd = yStart + gridHeight - margin; - - vertices.insert(vertices.end(), { - xStart, yStart, 0.0f, 0.0f, - xEnd, yStart, 1.0f, 0.0f, - xEnd, yEnd, 1.0f, 1.0f, - xStart, yEnd, 0.0f, 1.0f - }); - } - } - - ::GLES::glGenVertexArrays(1, &sRes.quadVAO); - ::GLES::glGenBuffers(1, &sRes.quadVBO); - ::GLES::glBindVertexArray(sRes.quadVAO); - ::GLES::glBindBuffer(GL_ARRAY_BUFFER, sRes.quadVBO); - ::GLES::glBufferData(GL_ARRAY_BUFFER, - vertices.size() * sizeof(float), - vertices.data(), - GL_STATIC_DRAW - ); - - ::GLES::glEnableVertexAttribArray(0); - ::GLES::glVertexAttribPointer(0, 2, GL_FLOAT, GL_FALSE, - 4 * sizeof(float), (void*)0 - ); - ::GLES::glEnableVertexAttribArray(1); - ::GLES::glVertexAttribPointer(1, 2, GL_FLOAT, GL_FALSE, - 4 * sizeof(float), (void*)(2 * sizeof(float)) - ); - ::GLES::glBindVertexArray(0); - } - - std::vector> sortedTextures; - for (auto&& [stateID, texObj] : MG_State_T::textureState->textures) { - if (!texObj.generated || texObj.target != GL_TEXTURE_2D) continue; - if (texObj.params.mipmapData.empty()) continue; - sortedTextures.emplace_back(stateID, &texObj); - } - std::sort(sortedTextures.begin(), sortedTextures.end(), - [](auto& a, auto& b) { - return a.second->createTimestamp > b.second->createTimestamp; - } - ); - sortedTextures.resize(std::min(sortedTextures.size(), MAX_DISPLAY_TEXTURES)); - - for (auto&& [stateID, texObj] : sortedTextures) { - auto& dirtyFlag = sRes.textureDirty[stateID]; - bool needCreate = !sRes.textureCache.count(stateID); - - if (needCreate) { - GLuint glTexID; - ::GLES::glGenTextures(1, &glTexID); - sRes.textureCache[stateID] = glTexID; - dirtyFlag = true; - } - - if (dirtyFlag || needCreate) { - const auto& mip0 = texObj->params.mipmapData.begin()->second; - if (mip0.hasData) { - GLuint glTexID = sRes.textureCache[stateID]; - ::GLES::glBindTexture(GL_TEXTURE_2D, glTexID); - ::GLES::glTexImage2D(GL_TEXTURE_2D, 0, mip0.internalFormat, - mip0.width, mip0.height, 0, - mip0.format, mip0.type, mip0.pixelData.data() - ); - ::GLES::glTexParameteri(GL_TEXTURE_2D, - GL_TEXTURE_MIN_FILTER, GL_LINEAR); - ::GLES::glTexParameteri(GL_TEXTURE_2D, - GL_TEXTURE_MAG_FILTER, GL_LINEAR); - ::GLES::glTexParameteri(GL_TEXTURE_2D, - GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); - ::GLES::glTexParameteri(GL_TEXTURE_2D, - GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); - if (texObj->params.mipmapData.size() > 1) { - ::GLES::glGenerateMipmap(GL_TEXTURE_2D); - } - dirtyFlag = false; - } - } - } - - GLboolean origDepthTest = ::GLES::glIsEnabled(GL_DEPTH_TEST); - GLint origProgram, origViewport[4]; - ::GLES::glGetIntegerv(GL_VIEWPORT, origViewport); - ::GLES::glGetIntegerv(GL_CURRENT_PROGRAM, &origProgram); - - ::GLES::glDisable(GL_DEPTH_TEST); - ::GLES::glUseProgram(sRes.program); - ::GLES::glUniformMatrix4fv(sRes.uMVPLoc, 1, GL_FALSE, - &glm::mat4(1.0f)[0][0] - ); - ::GLES::glUniform1i(sRes.uTexLoc, 0); - ::GLES::glBindVertexArray(sRes.quadVAO); - - for (size_t i = 0; i < sortedTextures.size(); ++i) { - const GLuint glTexID = sRes.textureCache[sortedTextures[i].first]; - ::GLES::glActiveTexture(GL_TEXTURE0); - ::GLES::glBindTexture(GL_TEXTURE_2D, glTexID); - ::GLES::glDrawArrays(GL_TRIANGLE_FAN, static_cast(i*4), 4); - } - - if (origDepthTest) ::GLES::glEnable(GL_DEPTH_TEST); - ::GLES::glUseProgram(origProgram); - ::GLES::glViewport(origViewport[0], origViewport[1], - origViewport[2], origViewport[3]); -#endif - } -} \ No newline at end of file diff --git a/MG/MG_RHI/GLES/Test/TestDrawing.h b/MG/MG_RHI/GLES/Test/TestDrawing.h deleted file mode 100644 index 37f1ad1b..00000000 --- a/MG/MG_RHI/GLES/Test/TestDrawing.h +++ /dev/null @@ -1,12 +0,0 @@ -// -// Created by BZLZHH on 2025/4/26. -// - -#ifndef MOBILEGL_TESTDRAWING_H -#define MOBILEGL_TESTDRAWING_H - -namespace MG_RHI::GLES::Test { - void DrawAllTextures(); -} - -#endif //MOBILEGL_TESTDRAWING_H diff --git a/MG/MG_UTIL/Debug/Debug.cpp b/MG/MG_UTIL/Debug/Debug.cpp deleted file mode 100644 index 98238c3c..00000000 --- a/MG/MG_UTIL/Debug/Debug.cpp +++ /dev/null @@ -1,1996 +0,0 @@ -// -// Created by BZLZHH on 2025/3/15. -// - -#include "../../Includes.h" -#include "BlendState.h" - -namespace MG_Util::Debug { - static FILE* logFile; - - const char* GetOSName() { -#ifdef _WIN32 - return "Windows"; -#elif __ANDROID__ - return "Android"; -#elif __APPLE__ - return "macOS"; -#elif __linux__ - return "Linux"; -#else - return "Unknown"; -#endif - } - - std::string GetCurrentThreadName() { - char buffer[256] = {0}; - -#ifdef _WIN32 - PWSTR description = nullptr; - if (SUCCEEDED(GetThreadDescription(GetCurrentThread(), &description)) { - WideCharToMultiByte(CP_UTF8, 0, description, -1, buffer, sizeof(buffer), nullptr, nullptr); - LocalFree(description); - } -#elif defined(__ANDROID__) || defined(__linux__) - pthread_getname_np(pthread_self(), buffer, sizeof(buffer)); -#elif defined(__APPLE__) - pthread_getname_np(buffer, sizeof(buffer)); -#endif - - return buffer[0] ? buffer : "Unknown Thread"; - } - - std::string GetCurrentTime() { - auto now = std::chrono::system_clock::now(); - time_t tt = std::chrono::system_clock::to_time_t(now); - struct tm tm{}; - -#ifdef _WIN32 - localtime_s(&tm, &tt); -#else - localtime_r(&tt, &tm); -#endif - - char buffer[9]; // HH:MM:SS - strftime(buffer, sizeof(buffer), "%T", &tm); - return buffer; - } - - template - void LogImpl(LevelType logLevel, - const char* levelTag, - const char* format, - int androidLevel, - va_list args) { - if (MG_Global::Common::LogLevel > logLevel) return; - - std::string header = "[" + GetCurrentTime() + "] [" + - GetOSName() + " " + - GetCurrentThreadName() + "/" + levelTag + "]: "; - - std::string full_format = header + format + "\n"; - -#ifdef __ANDROID__ - if (MG_Global::Common::LogTarget & MG_Constants::Common::LOG_TARGET_ANDROID) { - __android_log_vprint(androidLevel, MG_Constants::RenderName, full_format.c_str(), args); - } -#endif - - if (MG_Global::Common::LogTarget & MG_Constants::Common::LOG_TARGET_CONSOLE) { - vprintf(full_format.c_str(), args); - } - - if ((MG_Global::Common::LogTarget & MG_Constants::Common::LOG_TARGET_FILE) && - MG_Global::Common::LOG_FILE_PATH != nullptr) { - va_list args_copy; - va_copy(args_copy, args); - LogWrite(full_format.c_str(), args_copy); - va_end(args_copy); - } - } - -#define DECLARE_LOG_FUNCTION(name, level) \ -void Log##name(const char* format, ...) { \ - if constexpr (MG_Global::Common::LogLevel <= MG_Constants::Common::LOG_LEVEL_##level) { \ - va_list args; \ - va_start(args, format); \ - LogImpl(MG_Constants::Common::LOG_LEVEL_##level, \ - #level, \ - format, \ - ANDROID_LOG_##level, \ - args); \ - va_end(args); \ - } \ -} - - DECLARE_LOG_FUNCTION(D, DEBUG) - DECLARE_LOG_FUNCTION(W, WARN) - DECLARE_LOG_FUNCTION(E, ERROR) - DECLARE_LOG_FUNCTION(I, INFO) - DECLARE_LOG_FUNCTION(F, FATAL) - -#undef DECLARE_LOG_FUNCTION - - void LogClear() { - if (!MG_Global::Common::LOG_FILE_PATH) - return; - - logFile = fopen(MG_Global::Common::LOG_FILE_PATH, "w"); - if (logFile == nullptr) { - return; - } - fclose(logFile); - } - - void LogInit() { - if (!MG_Global::Common::LOG_FILE_PATH) - return; - - LogClear(); - logFile = fopen(MG_Global::Common::LOG_FILE_PATH, "a"); - } - - void LogWrite(const char* format, va_list args) { - if (!MG_Global::Common::LOG_FILE_PATH || logFile == nullptr) - return; - - vfprintf(logFile, format, args); - va_end(args); - fflush(logFile); -#if FORCE_SYNC_WITH_LOG_FILE == 1 - int fd = fileno(logFile); - fsync(fd); -#endif - } - - const char* GLEnumToString(::GLenum value) { - static char str[128]; - switch (value) { -#define CASE(value) \ - case value: return #value; - //CASE(GL_VERSION_1_0) - //CASE(GL_VERSION_1_1) - CASE(GL_DEPTH_BUFFER_BIT) - CASE(GL_STENCIL_BUFFER_BIT) - CASE(GL_COLOR_BUFFER_BIT) - CASE(GL_FALSE) - CASE(GL_TRUE) - //CASE(GL_POINTS) - //CASE(GL_LINES) - CASE(GL_LINE_LOOP) - CASE(GL_LINE_STRIP) - CASE(GL_TRIANGLES) - CASE(GL_TRIANGLE_STRIP) - CASE(GL_TRIANGLE_FAN) - CASE(GL_QUADS) - CASE(GL_NEVER) - CASE(GL_LESS) - CASE(GL_EQUAL) - CASE(GL_LEQUAL) - CASE(GL_GREATER) - CASE(GL_NOTEQUAL) - CASE(GL_GEQUAL) - CASE(GL_ALWAYS) - //CASE(GL_ZERO) - //CASE(GL_ONE) - CASE(GL_SRC_COLOR) - CASE(GL_ONE_MINUS_SRC_COLOR) - CASE(GL_SRC_ALPHA) - CASE(GL_ONE_MINUS_SRC_ALPHA) - CASE(GL_DST_ALPHA) - CASE(GL_ONE_MINUS_DST_ALPHA) - CASE(GL_DST_COLOR) - CASE(GL_ONE_MINUS_DST_COLOR) - CASE(GL_SRC_ALPHA_SATURATE) - //CASE(GL_NONE) - //CASE(GL_FRONT_LEFT) - CASE(GL_FRONT_RIGHT) - CASE(GL_BACK_LEFT) - CASE(GL_BACK_RIGHT) - CASE(GL_FRONT) - CASE(GL_BACK) - CASE(GL_LEFT) - CASE(GL_RIGHT) - CASE(GL_FRONT_AND_BACK) - //CASE(GL_NO_ERROR) - CASE(GL_INVALID_ENUM) - CASE(GL_INVALID_VALUE) - CASE(GL_INVALID_OPERATION) - CASE(GL_OUT_OF_MEMORY) - CASE(GL_CW) - CASE(GL_CCW) - CASE(GL_POINT_SIZE) - CASE(GL_POINT_SIZE_RANGE) - CASE(GL_POINT_SIZE_GRANULARITY) - CASE(GL_LINE_SMOOTH) - CASE(GL_LINE_WIDTH) - CASE(GL_LINE_WIDTH_RANGE) - CASE(GL_LINE_WIDTH_GRANULARITY) - CASE(GL_POLYGON_MODE) - CASE(GL_POLYGON_SMOOTH) - CASE(GL_CULL_FACE) - CASE(GL_CULL_FACE_MODE) - CASE(GL_FRONT_FACE) - CASE(GL_DEPTH_RANGE) - CASE(GL_DEPTH_TEST) - CASE(GL_DEPTH_WRITEMASK) - CASE(GL_DEPTH_CLEAR_VALUE) - CASE(GL_DEPTH_FUNC) - CASE(GL_STENCIL_TEST) - CASE(GL_STENCIL_CLEAR_VALUE) - CASE(GL_STENCIL_FUNC) - CASE(GL_STENCIL_VALUE_MASK) - CASE(GL_STENCIL_FAIL) - CASE(GL_STENCIL_PASS_DEPTH_FAIL) - CASE(GL_STENCIL_PASS_DEPTH_PASS) - CASE(GL_STENCIL_REF) - CASE(GL_STENCIL_WRITEMASK) - CASE(GL_VIEWPORT) - CASE(GL_DITHER) - CASE(GL_BLEND_DST) - CASE(GL_BLEND_SRC) - CASE(GL_BLEND) - CASE(GL_LOGIC_OP_MODE) - CASE(GL_COLOR_LOGIC_OP) - CASE(GL_DRAW_BUFFER) - CASE(GL_READ_BUFFER) - CASE(GL_SCISSOR_BOX) - CASE(GL_SCISSOR_TEST) - CASE(GL_COLOR_CLEAR_VALUE) - CASE(GL_COLOR_WRITEMASK) - CASE(GL_DOUBLEBUFFER) - CASE(GL_STEREO) - CASE(GL_LINE_SMOOTH_HINT) - CASE(GL_POLYGON_SMOOTH_HINT) - CASE(GL_UNPACK_SWAP_BYTES) - CASE(GL_UNPACK_LSB_FIRST) - CASE(GL_UNPACK_ROW_LENGTH) - CASE(GL_UNPACK_SKIP_ROWS) - CASE(GL_UNPACK_SKIP_PIXELS) - CASE(GL_UNPACK_ALIGNMENT) - CASE(GL_PACK_SWAP_BYTES) - CASE(GL_PACK_LSB_FIRST) - CASE(GL_PACK_ROW_LENGTH) - CASE(GL_PACK_SKIP_ROWS) - CASE(GL_PACK_SKIP_PIXELS) - CASE(GL_PACK_ALIGNMENT) - CASE(GL_MAX_TEXTURE_SIZE) - CASE(GL_MAX_VIEWPORT_DIMS) - CASE(GL_SUBPIXEL_BITS) - CASE(GL_TEXTURE_1D) - CASE(GL_TEXTURE_2D) - CASE(GL_POLYGON_OFFSET_UNITS) - CASE(GL_POLYGON_OFFSET_POINT) - CASE(GL_POLYGON_OFFSET_LINE) - CASE(GL_POLYGON_OFFSET_FILL) - CASE(GL_POLYGON_OFFSET_FACTOR) - CASE(GL_TEXTURE_BINDING_1D) - CASE(GL_TEXTURE_BINDING_2D) - CASE(GL_TEXTURE_WIDTH) - CASE(GL_TEXTURE_HEIGHT) - CASE(GL_TEXTURE_INTERNAL_FORMAT) - CASE(GL_TEXTURE_BORDER_COLOR) - CASE(GL_TEXTURE_RED_SIZE) - CASE(GL_TEXTURE_GREEN_SIZE) - CASE(GL_TEXTURE_BLUE_SIZE) - CASE(GL_TEXTURE_ALPHA_SIZE) - CASE(GL_DONT_CARE) - CASE(GL_FASTEST) - CASE(GL_NICEST) - CASE(GL_BYTE) - CASE(GL_UNSIGNED_BYTE) - CASE(GL_SHORT) - CASE(GL_UNSIGNED_SHORT) - CASE(GL_INT) - CASE(GL_UNSIGNED_INT) - CASE(GL_FLOAT) - CASE(GL_DOUBLE) - CASE(GL_STACK_OVERFLOW) - CASE(GL_STACK_UNDERFLOW) - CASE(GL_CLEAR) - CASE(GL_AND) - CASE(GL_AND_REVERSE) - CASE(GL_COPY) - CASE(GL_AND_INVERTED) - CASE(GL_NOOP) - CASE(GL_XOR) - CASE(GL_OR) - CASE(GL_NOR) - CASE(GL_EQUIV) - CASE(GL_INVERT) - CASE(GL_OR_REVERSE) - CASE(GL_COPY_INVERTED) - CASE(GL_OR_INVERTED) - CASE(GL_NAND) - CASE(GL_SET) - CASE(GL_TEXTURE) - CASE(GL_COLOR) - CASE(GL_DEPTH) - CASE(GL_STENCIL) - CASE(GL_STENCIL_INDEX) - CASE(GL_DEPTH_COMPONENT) - CASE(GL_RED) - CASE(GL_GREEN) - CASE(GL_BLUE) - CASE(GL_ALPHA) - CASE(GL_RGB) - CASE(GL_RGBA) - CASE(GL_POINT) - CASE(GL_LINE) - CASE(GL_FILL) - CASE(GL_KEEP) - CASE(GL_REPLACE) - CASE(GL_INCR) - CASE(GL_DECR) - CASE(GL_VENDOR) - CASE(GL_RENDERER) - //CASE(GL_VERSION) - CASE(GL_EXTENSIONS) - CASE(GL_NEAREST) - CASE(GL_LINEAR) - CASE(GL_NEAREST_MIPMAP_NEAREST) - CASE(GL_LINEAR_MIPMAP_NEAREST) - CASE(GL_NEAREST_MIPMAP_LINEAR) - CASE(GL_LINEAR_MIPMAP_LINEAR) - CASE(GL_TEXTURE_MAG_FILTER) - CASE(GL_TEXTURE_MIN_FILTER) - CASE(GL_TEXTURE_WRAP_S) - CASE(GL_TEXTURE_WRAP_T) - CASE(GL_PROXY_TEXTURE_1D) - CASE(GL_PROXY_TEXTURE_2D) - CASE(GL_REPEAT) - CASE(GL_R3_G3_B2) - CASE(GL_RGB4) - CASE(GL_RGB5) - CASE(GL_RGB8) - CASE(GL_RGB10) - CASE(GL_RGB12) - CASE(GL_RGB16) - CASE(GL_RGBA2) - CASE(GL_RGBA4) - CASE(GL_RGB5_A1) - CASE(GL_RGBA8) - CASE(GL_RGB10_A2) - CASE(GL_RGBA12) - CASE(GL_RGBA16) - CASE(GL_VERTEX_ARRAY) - //CASE(GL_VERSION_1_2) - CASE(GL_UNSIGNED_BYTE_3_3_2) - CASE(GL_UNSIGNED_SHORT_4_4_4_4) - CASE(GL_UNSIGNED_SHORT_5_5_5_1) - CASE(GL_UNSIGNED_INT_8_8_8_8) - CASE(GL_UNSIGNED_INT_10_10_10_2) - CASE(GL_TEXTURE_BINDING_3D) - CASE(GL_PACK_SKIP_IMAGES) - CASE(GL_PACK_IMAGE_HEIGHT) - CASE(GL_UNPACK_SKIP_IMAGES) - CASE(GL_UNPACK_IMAGE_HEIGHT) - CASE(GL_TEXTURE_3D) - CASE(GL_PROXY_TEXTURE_3D) - CASE(GL_TEXTURE_DEPTH) - CASE(GL_TEXTURE_WRAP_R) - CASE(GL_MAX_3D_TEXTURE_SIZE) - CASE(GL_UNSIGNED_BYTE_2_3_3_REV) - CASE(GL_UNSIGNED_SHORT_5_6_5) - CASE(GL_UNSIGNED_SHORT_5_6_5_REV) - CASE(GL_UNSIGNED_SHORT_4_4_4_4_REV) - CASE(GL_UNSIGNED_SHORT_1_5_5_5_REV) - CASE(GL_UNSIGNED_INT_8_8_8_8_REV) - CASE(GL_UNSIGNED_INT_2_10_10_10_REV) - CASE(GL_BGR) - CASE(GL_BGRA) - CASE(GL_MAX_ELEMENTS_VERTICES) - CASE(GL_MAX_ELEMENTS_INDICES) - CASE(GL_CLAMP_TO_EDGE) - CASE(GL_TEXTURE_MIN_LOD) - CASE(GL_TEXTURE_MAX_LOD) - CASE(GL_TEXTURE_BASE_LEVEL) - CASE(GL_TEXTURE_MAX_LEVEL) - //CASE(GL_SMOOTH_POINT_SIZE_RANGE) - //CASE(GL_SMOOTH_POINT_SIZE_GRANULARITY) - //CASE(GL_SMOOTH_LINE_WIDTH_RANGE) - //CASE(GL_SMOOTH_LINE_WIDTH_GRANULARITY) - CASE(GL_ALIASED_LINE_WIDTH_RANGE) - //CASE(GL_VERSION_1_3) - CASE(GL_TEXTURE0) - CASE(GL_TEXTURE1) - CASE(GL_TEXTURE2) - CASE(GL_TEXTURE3) - CASE(GL_TEXTURE4) - CASE(GL_TEXTURE5) - CASE(GL_TEXTURE6) - CASE(GL_TEXTURE7) - CASE(GL_TEXTURE8) - CASE(GL_TEXTURE9) - CASE(GL_TEXTURE10) - CASE(GL_TEXTURE11) - CASE(GL_TEXTURE12) - CASE(GL_TEXTURE13) - CASE(GL_TEXTURE14) - CASE(GL_TEXTURE15) - CASE(GL_TEXTURE16) - CASE(GL_TEXTURE17) - CASE(GL_TEXTURE18) - CASE(GL_TEXTURE19) - CASE(GL_TEXTURE20) - CASE(GL_TEXTURE21) - CASE(GL_TEXTURE22) - CASE(GL_TEXTURE23) - CASE(GL_TEXTURE24) - CASE(GL_TEXTURE25) - CASE(GL_TEXTURE26) - CASE(GL_TEXTURE27) - CASE(GL_TEXTURE28) - CASE(GL_TEXTURE29) - CASE(GL_TEXTURE30) - CASE(GL_TEXTURE31) - CASE(GL_ACTIVE_TEXTURE) - CASE(GL_MULTISAMPLE) - CASE(GL_SAMPLE_ALPHA_TO_COVERAGE) - CASE(GL_SAMPLE_ALPHA_TO_ONE) - CASE(GL_SAMPLE_COVERAGE) - CASE(GL_SAMPLE_BUFFERS) - CASE(GL_SAMPLES) - CASE(GL_SAMPLE_COVERAGE_VALUE) - CASE(GL_SAMPLE_COVERAGE_INVERT) - CASE(GL_TEXTURE_CUBE_MAP) - CASE(GL_TEXTURE_BINDING_CUBE_MAP) - CASE(GL_TEXTURE_CUBE_MAP_POSITIVE_X) - CASE(GL_TEXTURE_CUBE_MAP_NEGATIVE_X) - CASE(GL_TEXTURE_CUBE_MAP_POSITIVE_Y) - CASE(GL_TEXTURE_CUBE_MAP_NEGATIVE_Y) - CASE(GL_TEXTURE_CUBE_MAP_POSITIVE_Z) - CASE(GL_TEXTURE_CUBE_MAP_NEGATIVE_Z) - CASE(GL_PROXY_TEXTURE_CUBE_MAP) - CASE(GL_MAX_CUBE_MAP_TEXTURE_SIZE) - CASE(GL_COMPRESSED_RGB) - CASE(GL_COMPRESSED_RGBA) - CASE(GL_TEXTURE_COMPRESSION_HINT) - CASE(GL_TEXTURE_COMPRESSED_IMAGE_SIZE) - CASE(GL_TEXTURE_COMPRESSED) - CASE(GL_NUM_COMPRESSED_TEXTURE_FORMATS) - CASE(GL_COMPRESSED_TEXTURE_FORMATS) - CASE(GL_CLAMP_TO_BORDER) - //CASE(GL_VERSION_1_4) - CASE(GL_BLEND_DST_RGB) - CASE(GL_BLEND_SRC_RGB) - CASE(GL_BLEND_DST_ALPHA) - CASE(GL_BLEND_SRC_ALPHA) - CASE(GL_POINT_FADE_THRESHOLD_SIZE) - CASE(GL_DEPTH_COMPONENT16) - CASE(GL_DEPTH_COMPONENT24) - CASE(GL_DEPTH_COMPONENT32) - CASE(GL_MIRRORED_REPEAT) - CASE(GL_MAX_TEXTURE_LOD_BIAS) - CASE(GL_TEXTURE_LOD_BIAS) - CASE(GL_INCR_WRAP) - CASE(GL_DECR_WRAP) - CASE(GL_TEXTURE_DEPTH_SIZE) - CASE(GL_TEXTURE_COMPARE_MODE) - CASE(GL_TEXTURE_COMPARE_FUNC) - CASE(GL_FUNC_ADD) - CASE(GL_FUNC_SUBTRACT) - CASE(GL_FUNC_REVERSE_SUBTRACT) - CASE(GL_MIN) - CASE(GL_MAX) - CASE(GL_CONSTANT_COLOR) - CASE(GL_ONE_MINUS_CONSTANT_COLOR) - CASE(GL_CONSTANT_ALPHA) - CASE(GL_ONE_MINUS_CONSTANT_ALPHA) - //CASE(GL_VERSION_1_5) - CASE(GL_BUFFER_SIZE) - CASE(GL_BUFFER_USAGE) - CASE(GL_QUERY_COUNTER_BITS) - CASE(GL_CURRENT_QUERY) - CASE(GL_QUERY_RESULT) - CASE(GL_QUERY_RESULT_AVAILABLE) - CASE(GL_ARRAY_BUFFER) - CASE(GL_ELEMENT_ARRAY_BUFFER) - CASE(GL_ARRAY_BUFFER_BINDING) - CASE(GL_ELEMENT_ARRAY_BUFFER_BINDING) - CASE(GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING) - CASE(GL_READ_ONLY) - CASE(GL_WRITE_ONLY) - CASE(GL_READ_WRITE) - CASE(GL_BUFFER_ACCESS) - CASE(GL_BUFFER_MAPPED) - CASE(GL_BUFFER_MAP_POINTER) - CASE(GL_STREAM_DRAW) - CASE(GL_STREAM_READ) - CASE(GL_STREAM_COPY) - CASE(GL_STATIC_DRAW) - CASE(GL_STATIC_READ) - CASE(GL_STATIC_COPY) - CASE(GL_DYNAMIC_DRAW) - CASE(GL_DYNAMIC_READ) - CASE(GL_DYNAMIC_COPY) - CASE(GL_SAMPLES_PASSED) - CASE(GL_SRC1_ALPHA) - //CASE(GL_VERSION_2_0) - CASE(GL_BLEND_EQUATION_RGB) - CASE(GL_VERTEX_ATTRIB_ARRAY_ENABLED) - CASE(GL_VERTEX_ATTRIB_ARRAY_SIZE) - CASE(GL_VERTEX_ATTRIB_ARRAY_STRIDE) - CASE(GL_VERTEX_ATTRIB_ARRAY_TYPE) - CASE(GL_CURRENT_VERTEX_ATTRIB) - CASE(GL_VERTEX_PROGRAM_POINT_SIZE) - CASE(GL_VERTEX_ATTRIB_ARRAY_POINTER) - CASE(GL_STENCIL_BACK_FUNC) - CASE(GL_STENCIL_BACK_FAIL) - CASE(GL_STENCIL_BACK_PASS_DEPTH_FAIL) - CASE(GL_STENCIL_BACK_PASS_DEPTH_PASS) - CASE(GL_MAX_DRAW_BUFFERS) - CASE(GL_DRAW_BUFFER0) - CASE(GL_DRAW_BUFFER1) - CASE(GL_DRAW_BUFFER2) - CASE(GL_DRAW_BUFFER3) - CASE(GL_DRAW_BUFFER4) - CASE(GL_DRAW_BUFFER5) - CASE(GL_DRAW_BUFFER6) - CASE(GL_DRAW_BUFFER7) - CASE(GL_DRAW_BUFFER8) - CASE(GL_DRAW_BUFFER9) - CASE(GL_DRAW_BUFFER10) - CASE(GL_DRAW_BUFFER11) - CASE(GL_DRAW_BUFFER12) - CASE(GL_DRAW_BUFFER13) - CASE(GL_DRAW_BUFFER14) - CASE(GL_DRAW_BUFFER15) - CASE(GL_BLEND_EQUATION_ALPHA) - CASE(GL_MAX_VERTEX_ATTRIBS) - CASE(GL_VERTEX_ATTRIB_ARRAY_NORMALIZED) - CASE(GL_MAX_TEXTURE_IMAGE_UNITS) - CASE(GL_FRAGMENT_SHADER) - CASE(GL_VERTEX_SHADER) - CASE(GL_MAX_FRAGMENT_UNIFORM_COMPONENTS) - CASE(GL_MAX_VERTEX_UNIFORM_COMPONENTS) - CASE(GL_MAX_VARYING_FLOATS) - CASE(GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS) - CASE(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS) - CASE(GL_SHADER_TYPE) - CASE(GL_FLOAT_VEC2) - CASE(GL_FLOAT_VEC3) - CASE(GL_FLOAT_VEC4) - CASE(GL_INT_VEC2) - CASE(GL_INT_VEC3) - CASE(GL_INT_VEC4) - CASE(GL_BOOL) - CASE(GL_BOOL_VEC2) - CASE(GL_BOOL_VEC3) - CASE(GL_BOOL_VEC4) - CASE(GL_FLOAT_MAT2) - CASE(GL_FLOAT_MAT3) - CASE(GL_FLOAT_MAT4) - CASE(GL_SAMPLER_1D) - CASE(GL_SAMPLER_2D) - CASE(GL_SAMPLER_3D) - CASE(GL_SAMPLER_CUBE) - CASE(GL_SAMPLER_1D_SHADOW) - CASE(GL_SAMPLER_2D_SHADOW) - CASE(GL_DELETE_STATUS) - CASE(GL_COMPILE_STATUS) - CASE(GL_LINK_STATUS) - CASE(GL_VALIDATE_STATUS) - CASE(GL_INFO_LOG_LENGTH) - CASE(GL_ATTACHED_SHADERS) - CASE(GL_ACTIVE_UNIFORMS) - CASE(GL_ACTIVE_UNIFORM_MAX_LENGTH) - CASE(GL_SHADER_SOURCE_LENGTH) - CASE(GL_ACTIVE_ATTRIBUTES) - CASE(GL_ACTIVE_ATTRIBUTE_MAX_LENGTH) - CASE(GL_FRAGMENT_SHADER_DERIVATIVE_HINT) - CASE(GL_SHADING_LANGUAGE_VERSION) - CASE(GL_CURRENT_PROGRAM) - CASE(GL_POINT_SPRITE_COORD_ORIGIN) - CASE(GL_LOWER_LEFT) - CASE(GL_UPPER_LEFT) - CASE(GL_STENCIL_BACK_REF) - CASE(GL_STENCIL_BACK_VALUE_MASK) - CASE(GL_STENCIL_BACK_WRITEMASK) - //CASE(GL_VERSION_2_1) - CASE(GL_PIXEL_PACK_BUFFER) - CASE(GL_PIXEL_UNPACK_BUFFER) - CASE(GL_PIXEL_PACK_BUFFER_BINDING) - CASE(GL_PIXEL_UNPACK_BUFFER_BINDING) - CASE(GL_SRGB) - CASE(GL_SRGB8) - CASE(GL_SRGB_ALPHA) - CASE(GL_SRGB8_ALPHA8) - CASE(GL_COMPRESSED_SRGB) - CASE(GL_COMPRESSED_SRGB_ALPHA) - //CASE(GL_VERSION_3_0) - CASE(GL_COMPARE_REF_TO_TEXTURE) - CASE(GL_CLIP_DISTANCE0) - CASE(GL_CLIP_DISTANCE1) - CASE(GL_CLIP_DISTANCE2) - CASE(GL_CLIP_DISTANCE3) - CASE(GL_CLIP_DISTANCE4) - CASE(GL_CLIP_DISTANCE5) - CASE(GL_CLIP_DISTANCE6) - CASE(GL_CLIP_DISTANCE7) - CASE(GL_MAX_CLIP_DISTANCES) - CASE(GL_MAJOR_VERSION) - CASE(GL_MINOR_VERSION) - CASE(GL_NUM_EXTENSIONS) - CASE(GL_CONTEXT_FLAGS) - CASE(GL_COMPRESSED_RED) - CASE(GL_COMPRESSED_RG) - //CASE(GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT) - CASE(GL_RGBA32F) - CASE(GL_RGB32F) - CASE(GL_RGBA16F) - CASE(GL_RGB16F) - CASE(GL_VERTEX_ATTRIB_ARRAY_INTEGER) - CASE(GL_MAX_ARRAY_TEXTURE_LAYERS) - CASE(GL_MIN_PROGRAM_TEXEL_OFFSET) - CASE(GL_MAX_PROGRAM_TEXEL_OFFSET) - CASE(GL_CLAMP_READ_COLOR) - CASE(GL_FIXED_ONLY) - //CASE(GL_MAX_VARYING_COMPONENTS) - CASE(GL_TEXTURE_1D_ARRAY) - CASE(GL_PROXY_TEXTURE_1D_ARRAY) - CASE(GL_TEXTURE_2D_ARRAY) - CASE(GL_PROXY_TEXTURE_2D_ARRAY) - CASE(GL_TEXTURE_BINDING_1D_ARRAY) - CASE(GL_TEXTURE_BINDING_2D_ARRAY) - CASE(GL_R11F_G11F_B10F) - CASE(GL_UNSIGNED_INT_10F_11F_11F_REV) - CASE(GL_RGB9_E5) - CASE(GL_UNSIGNED_INT_5_9_9_9_REV) - CASE(GL_TEXTURE_SHARED_SIZE) - CASE(GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH) - CASE(GL_TRANSFORM_FEEDBACK_BUFFER_MODE) - CASE(GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS) - CASE(GL_TRANSFORM_FEEDBACK_VARYINGS) - CASE(GL_TRANSFORM_FEEDBACK_BUFFER_START) - CASE(GL_TRANSFORM_FEEDBACK_BUFFER_SIZE) - CASE(GL_PRIMITIVES_GENERATED) - CASE(GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN) - CASE(GL_RASTERIZER_DISCARD) - CASE(GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS) - CASE(GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS) - CASE(GL_INTERLEAVED_ATTRIBS) - CASE(GL_SEPARATE_ATTRIBS) - CASE(GL_TRANSFORM_FEEDBACK_BUFFER) - CASE(GL_TRANSFORM_FEEDBACK_BUFFER_BINDING) - CASE(GL_RGBA32UI) - CASE(GL_RGB32UI) - CASE(GL_RGBA16UI) - CASE(GL_RGB16UI) - CASE(GL_RGBA8UI) - CASE(GL_RGB8UI) - CASE(GL_RGBA32I) - CASE(GL_RGB32I) - CASE(GL_RGBA16I) - CASE(GL_RGB16I) - CASE(GL_RGBA8I) - CASE(GL_RGB8I) - CASE(GL_RED_INTEGER) - CASE(GL_GREEN_INTEGER) - CASE(GL_BLUE_INTEGER) - CASE(GL_RGB_INTEGER) - CASE(GL_RGBA_INTEGER) - CASE(GL_BGR_INTEGER) - CASE(GL_BGRA_INTEGER) - CASE(GL_SAMPLER_1D_ARRAY) - CASE(GL_SAMPLER_2D_ARRAY) - CASE(GL_SAMPLER_1D_ARRAY_SHADOW) - CASE(GL_SAMPLER_2D_ARRAY_SHADOW) - CASE(GL_SAMPLER_CUBE_SHADOW) - CASE(GL_UNSIGNED_INT_VEC2) - CASE(GL_UNSIGNED_INT_VEC3) - CASE(GL_UNSIGNED_INT_VEC4) - CASE(GL_INT_SAMPLER_1D) - CASE(GL_INT_SAMPLER_2D) - CASE(GL_INT_SAMPLER_3D) - CASE(GL_INT_SAMPLER_CUBE) - CASE(GL_INT_SAMPLER_1D_ARRAY) - CASE(GL_INT_SAMPLER_2D_ARRAY) - CASE(GL_UNSIGNED_INT_SAMPLER_1D) - CASE(GL_UNSIGNED_INT_SAMPLER_2D) - CASE(GL_UNSIGNED_INT_SAMPLER_3D) - CASE(GL_UNSIGNED_INT_SAMPLER_CUBE) - CASE(GL_UNSIGNED_INT_SAMPLER_1D_ARRAY) - CASE(GL_UNSIGNED_INT_SAMPLER_2D_ARRAY) - CASE(GL_QUERY_WAIT) - CASE(GL_QUERY_NO_WAIT) - CASE(GL_QUERY_BY_REGION_WAIT) - CASE(GL_QUERY_BY_REGION_NO_WAIT) - CASE(GL_BUFFER_ACCESS_FLAGS) - CASE(GL_BUFFER_MAP_LENGTH) - CASE(GL_BUFFER_MAP_OFFSET) - CASE(GL_DEPTH_COMPONENT32F) - CASE(GL_DEPTH32F_STENCIL8) - CASE(GL_FLOAT_32_UNSIGNED_INT_24_8_REV) - CASE(GL_INVALID_FRAMEBUFFER_OPERATION) - CASE(GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING) - CASE(GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE) - CASE(GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE) - CASE(GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE) - CASE(GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE) - CASE(GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE) - CASE(GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE) - CASE(GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE) - CASE(GL_FRAMEBUFFER_DEFAULT) - CASE(GL_FRAMEBUFFER_UNDEFINED) - CASE(GL_DEPTH_STENCIL_ATTACHMENT) - CASE(GL_MAX_RENDERBUFFER_SIZE) - CASE(GL_DEPTH_STENCIL) - CASE(GL_UNSIGNED_INT_24_8) - CASE(GL_DEPTH24_STENCIL8) - CASE(GL_TEXTURE_STENCIL_SIZE) - CASE(GL_TEXTURE_RED_TYPE) - CASE(GL_TEXTURE_GREEN_TYPE) - CASE(GL_TEXTURE_BLUE_TYPE) - CASE(GL_TEXTURE_ALPHA_TYPE) - CASE(GL_TEXTURE_DEPTH_TYPE) - CASE(GL_UNSIGNED_NORMALIZED) - CASE(GL_FRAMEBUFFER_BINDING) - //CASE(GL_DRAW_FRAMEBUFFER_BINDING) - CASE(GL_RENDERBUFFER_BINDING) - CASE(GL_READ_FRAMEBUFFER) - CASE(GL_DRAW_FRAMEBUFFER) - CASE(GL_READ_FRAMEBUFFER_BINDING) - CASE(GL_RENDERBUFFER_SAMPLES) - CASE(GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE) - CASE(GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME) - CASE(GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL) - CASE(GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE) - CASE(GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER) - CASE(GL_FRAMEBUFFER_COMPLETE) - CASE(GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT) - CASE(GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT) - CASE(GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER) - CASE(GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER) - CASE(GL_FRAMEBUFFER_UNSUPPORTED) - CASE(GL_MAX_COLOR_ATTACHMENTS) - CASE(GL_COLOR_ATTACHMENT0) - CASE(GL_COLOR_ATTACHMENT1) - CASE(GL_COLOR_ATTACHMENT2) - CASE(GL_COLOR_ATTACHMENT3) - CASE(GL_COLOR_ATTACHMENT4) - CASE(GL_COLOR_ATTACHMENT5) - CASE(GL_COLOR_ATTACHMENT6) - CASE(GL_COLOR_ATTACHMENT7) - CASE(GL_COLOR_ATTACHMENT8) - CASE(GL_COLOR_ATTACHMENT9) - CASE(GL_COLOR_ATTACHMENT10) - CASE(GL_COLOR_ATTACHMENT11) - CASE(GL_COLOR_ATTACHMENT12) - CASE(GL_COLOR_ATTACHMENT13) - CASE(GL_COLOR_ATTACHMENT14) - CASE(GL_COLOR_ATTACHMENT15) - CASE(GL_COLOR_ATTACHMENT16) - CASE(GL_COLOR_ATTACHMENT17) - CASE(GL_COLOR_ATTACHMENT18) - CASE(GL_COLOR_ATTACHMENT19) - CASE(GL_COLOR_ATTACHMENT20) - CASE(GL_COLOR_ATTACHMENT21) - CASE(GL_COLOR_ATTACHMENT22) - CASE(GL_COLOR_ATTACHMENT23) - CASE(GL_COLOR_ATTACHMENT24) - CASE(GL_COLOR_ATTACHMENT25) - CASE(GL_COLOR_ATTACHMENT26) - CASE(GL_COLOR_ATTACHMENT27) - CASE(GL_COLOR_ATTACHMENT28) - CASE(GL_COLOR_ATTACHMENT29) - CASE(GL_COLOR_ATTACHMENT30) - CASE(GL_COLOR_ATTACHMENT31) - CASE(GL_DEPTH_ATTACHMENT) - CASE(GL_STENCIL_ATTACHMENT) - CASE(GL_FRAMEBUFFER) - CASE(GL_RENDERBUFFER) - CASE(GL_RENDERBUFFER_WIDTH) - CASE(GL_RENDERBUFFER_HEIGHT) - CASE(GL_RENDERBUFFER_INTERNAL_FORMAT) - CASE(GL_STENCIL_INDEX1) - CASE(GL_STENCIL_INDEX4) - CASE(GL_STENCIL_INDEX8) - CASE(GL_STENCIL_INDEX16) - CASE(GL_RENDERBUFFER_RED_SIZE) - CASE(GL_RENDERBUFFER_GREEN_SIZE) - CASE(GL_RENDERBUFFER_BLUE_SIZE) - CASE(GL_RENDERBUFFER_ALPHA_SIZE) - CASE(GL_RENDERBUFFER_DEPTH_SIZE) - CASE(GL_RENDERBUFFER_STENCIL_SIZE) - CASE(GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE) - CASE(GL_MAX_SAMPLES) - CASE(GL_FRAMEBUFFER_SRGB) - CASE(GL_HALF_FLOAT) - //CASE(GL_MAP_READ_BIT) - //CASE(GL_MAP_WRITE_BIT) - //CASE(GL_MAP_INVALIDATE_RANGE_BIT) - CASE(GL_MAP_INVALIDATE_BUFFER_BIT) - CASE(GL_MAP_FLUSH_EXPLICIT_BIT) - CASE(GL_MAP_UNSYNCHRONIZED_BIT) - CASE(GL_COMPRESSED_RED_RGTC1) - CASE(GL_COMPRESSED_SIGNED_RED_RGTC1) - CASE(GL_COMPRESSED_RG_RGTC2) - CASE(GL_COMPRESSED_SIGNED_RG_RGTC2) - CASE(GL_RG) - CASE(GL_RG_INTEGER) - CASE(GL_R8) - CASE(GL_R16) - CASE(GL_RG8) - CASE(GL_RG16) - CASE(GL_R16F) - CASE(GL_R32F) - CASE(GL_RG16F) - CASE(GL_RG32F) - CASE(GL_R8I) - CASE(GL_R8UI) - CASE(GL_R16I) - CASE(GL_R16UI) - CASE(GL_R32I) - CASE(GL_R32UI) - CASE(GL_RG8I) - CASE(GL_RG8UI) - CASE(GL_RG16I) - CASE(GL_RG16UI) - CASE(GL_RG32I) - CASE(GL_RG32UI) - CASE(GL_VERTEX_ARRAY_BINDING) - //CASE(GL_VERSION_3_1) - CASE(GL_SAMPLER_2D_RECT) - CASE(GL_SAMPLER_2D_RECT_SHADOW) - CASE(GL_SAMPLER_BUFFER) - CASE(GL_INT_SAMPLER_2D_RECT) - CASE(GL_INT_SAMPLER_BUFFER) - CASE(GL_UNSIGNED_INT_SAMPLER_2D_RECT) - CASE(GL_UNSIGNED_INT_SAMPLER_BUFFER) - CASE(GL_TEXTURE_BUFFER) - CASE(GL_MAX_TEXTURE_BUFFER_SIZE) - CASE(GL_TEXTURE_BINDING_BUFFER) - CASE(GL_TEXTURE_BUFFER_DATA_STORE_BINDING) - CASE(GL_TEXTURE_RECTANGLE) - CASE(GL_TEXTURE_BINDING_RECTANGLE) - CASE(GL_PROXY_TEXTURE_RECTANGLE) - CASE(GL_MAX_RECTANGLE_TEXTURE_SIZE) - CASE(GL_R8_SNORM) - CASE(GL_RG8_SNORM) - CASE(GL_RGB8_SNORM) - CASE(GL_RGBA8_SNORM) - CASE(GL_R16_SNORM) - CASE(GL_RG16_SNORM) - CASE(GL_RGB16_SNORM) - CASE(GL_RGBA16_SNORM) - CASE(GL_SIGNED_NORMALIZED) - CASE(GL_PRIMITIVE_RESTART) - CASE(GL_PRIMITIVE_RESTART_INDEX) - CASE(GL_COPY_READ_BUFFER) - CASE(GL_COPY_WRITE_BUFFER) - CASE(GL_UNIFORM_BUFFER) - CASE(GL_UNIFORM_BUFFER_BINDING) - CASE(GL_UNIFORM_BUFFER_START) - CASE(GL_UNIFORM_BUFFER_SIZE) - CASE(GL_MAX_VERTEX_UNIFORM_BLOCKS) - CASE(GL_MAX_GEOMETRY_UNIFORM_BLOCKS) - CASE(GL_MAX_FRAGMENT_UNIFORM_BLOCKS) - CASE(GL_MAX_COMBINED_UNIFORM_BLOCKS) - CASE(GL_MAX_UNIFORM_BUFFER_BINDINGS) - CASE(GL_MAX_UNIFORM_BLOCK_SIZE) - CASE(GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS) - CASE(GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS) - CASE(GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS) - CASE(GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT) - CASE(GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH) - CASE(GL_ACTIVE_UNIFORM_BLOCKS) - CASE(GL_UNIFORM_TYPE) - CASE(GL_UNIFORM_SIZE) - CASE(GL_UNIFORM_NAME_LENGTH) - CASE(GL_UNIFORM_BLOCK_INDEX) - CASE(GL_UNIFORM_OFFSET) - CASE(GL_UNIFORM_ARRAY_STRIDE) - CASE(GL_UNIFORM_MATRIX_STRIDE) - CASE(GL_UNIFORM_IS_ROW_MAJOR) - CASE(GL_UNIFORM_BLOCK_BINDING) - CASE(GL_UNIFORM_BLOCK_DATA_SIZE) - CASE(GL_UNIFORM_BLOCK_NAME_LENGTH) - CASE(GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS) - CASE(GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES) - CASE(GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER) - CASE(GL_UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER) - CASE(GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER) - //CASE(GL_VERSION_3_2) - //CASE(GL_CONTEXT_CORE_PROFILE_BIT) - //CASE(GL_CONTEXT_COMPATIBILITY_PROFILE_BIT) - CASE(GL_LINES_ADJACENCY) - CASE(GL_LINE_STRIP_ADJACENCY) - CASE(GL_TRIANGLES_ADJACENCY) - CASE(GL_TRIANGLE_STRIP_ADJACENCY) - //CASE(GL_PROGRAM_POINT_SIZE) - CASE(GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS) - CASE(GL_FRAMEBUFFER_ATTACHMENT_LAYERED) - CASE(GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS) - CASE(GL_GEOMETRY_SHADER) - CASE(GL_GEOMETRY_VERTICES_OUT) - CASE(GL_GEOMETRY_INPUT_TYPE) - CASE(GL_GEOMETRY_OUTPUT_TYPE) - CASE(GL_MAX_GEOMETRY_UNIFORM_COMPONENTS) - CASE(GL_MAX_GEOMETRY_OUTPUT_VERTICES) - CASE(GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS) - CASE(GL_MAX_VERTEX_OUTPUT_COMPONENTS) - CASE(GL_MAX_GEOMETRY_INPUT_COMPONENTS) - CASE(GL_MAX_GEOMETRY_OUTPUT_COMPONENTS) - CASE(GL_MAX_FRAGMENT_INPUT_COMPONENTS) - CASE(GL_CONTEXT_PROFILE_MASK) - CASE(GL_DEPTH_CLAMP) - CASE(GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION) - CASE(GL_FIRST_VERTEX_CONVENTION) - CASE(GL_LAST_VERTEX_CONVENTION) - CASE(GL_PROVOKING_VERTEX) - CASE(GL_TEXTURE_CUBE_MAP_SEAMLESS) - CASE(GL_MAX_SERVER_WAIT_TIMEOUT) - CASE(GL_OBJECT_TYPE) - CASE(GL_SYNC_CONDITION) - CASE(GL_SYNC_STATUS) - CASE(GL_SYNC_FLAGS) - CASE(GL_SYNC_FENCE) - CASE(GL_SYNC_GPU_COMMANDS_COMPLETE) - CASE(GL_UNSIGNALED) - CASE(GL_SIGNALED) - CASE(GL_ALREADY_SIGNALED) - CASE(GL_TIMEOUT_EXPIRED) - CASE(GL_CONDITION_SATISFIED) - CASE(GL_WAIT_FAILED) - //CASE(GL_SYNC_FLUSH_COMMANDS_BIT) - CASE(GL_SAMPLE_POSITION) - CASE(GL_SAMPLE_MASK) - CASE(GL_SAMPLE_MASK_VALUE) - CASE(GL_MAX_SAMPLE_MASK_WORDS) - CASE(GL_TEXTURE_2D_MULTISAMPLE) - CASE(GL_PROXY_TEXTURE_2D_MULTISAMPLE) - CASE(GL_TEXTURE_2D_MULTISAMPLE_ARRAY) - CASE(GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY) - CASE(GL_TEXTURE_BINDING_2D_MULTISAMPLE) - CASE(GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY) - CASE(GL_TEXTURE_SAMPLES) - CASE(GL_TEXTURE_FIXED_SAMPLE_LOCATIONS) - CASE(GL_SAMPLER_2D_MULTISAMPLE) - CASE(GL_INT_SAMPLER_2D_MULTISAMPLE) - CASE(GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE) - CASE(GL_SAMPLER_2D_MULTISAMPLE_ARRAY) - CASE(GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY) - CASE(GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY) - CASE(GL_MAX_COLOR_TEXTURE_SAMPLES) - CASE(GL_MAX_DEPTH_TEXTURE_SAMPLES) - CASE(GL_MAX_INTEGER_SAMPLES) - //CASE(GL_VERSION_3_3) - CASE(GL_VERTEX_ATTRIB_ARRAY_DIVISOR) - CASE(GL_SRC1_COLOR) - CASE(GL_ONE_MINUS_SRC1_COLOR) - CASE(GL_ONE_MINUS_SRC1_ALPHA) - CASE(GL_MAX_DUAL_SOURCE_DRAW_BUFFERS) - CASE(GL_ANY_SAMPLES_PASSED) - CASE(GL_SAMPLER_BINDING) - CASE(GL_RGB10_A2UI) - CASE(GL_TEXTURE_SWIZZLE_R) - CASE(GL_TEXTURE_SWIZZLE_G) - CASE(GL_TEXTURE_SWIZZLE_B) - CASE(GL_TEXTURE_SWIZZLE_A) - CASE(GL_TEXTURE_SWIZZLE_RGBA) - CASE(GL_TIME_ELAPSED) - CASE(GL_TIMESTAMP) - CASE(GL_INT_2_10_10_10_REV) - //CASE(GL_VERSION_4_0) - CASE(GL_SAMPLE_SHADING) - CASE(GL_MIN_SAMPLE_SHADING_VALUE) - CASE(GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET) - CASE(GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET) - CASE(GL_TEXTURE_CUBE_MAP_ARRAY) - CASE(GL_TEXTURE_BINDING_CUBE_MAP_ARRAY) - CASE(GL_PROXY_TEXTURE_CUBE_MAP_ARRAY) - CASE(GL_SAMPLER_CUBE_MAP_ARRAY) - CASE(GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW) - CASE(GL_INT_SAMPLER_CUBE_MAP_ARRAY) - CASE(GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY) - CASE(GL_DRAW_INDIRECT_BUFFER) - CASE(GL_DRAW_INDIRECT_BUFFER_BINDING) - CASE(GL_GEOMETRY_SHADER_INVOCATIONS) - CASE(GL_MAX_GEOMETRY_SHADER_INVOCATIONS) - CASE(GL_MIN_FRAGMENT_INTERPOLATION_OFFSET) - CASE(GL_MAX_FRAGMENT_INTERPOLATION_OFFSET) - CASE(GL_FRAGMENT_INTERPOLATION_OFFSET_BITS) - CASE(GL_MAX_VERTEX_STREAMS) - CASE(GL_DOUBLE_VEC2) - CASE(GL_DOUBLE_VEC3) - CASE(GL_DOUBLE_VEC4) - CASE(GL_DOUBLE_MAT2) - CASE(GL_DOUBLE_MAT3) - CASE(GL_DOUBLE_MAT4) - CASE(GL_ACTIVE_SUBROUTINES) - CASE(GL_ACTIVE_SUBROUTINE_UNIFORMS) - CASE(GL_ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS) - CASE(GL_ACTIVE_SUBROUTINE_MAX_LENGTH) - CASE(GL_ACTIVE_SUBROUTINE_UNIFORM_MAX_LENGTH) - CASE(GL_MAX_SUBROUTINES) - CASE(GL_MAX_SUBROUTINE_UNIFORM_LOCATIONS) - CASE(GL_NUM_COMPATIBLE_SUBROUTINES) - CASE(GL_COMPATIBLE_SUBROUTINES) - CASE(GL_PATCHES) - CASE(GL_PATCH_VERTICES) - CASE(GL_PATCH_DEFAULT_INNER_LEVEL) - CASE(GL_PATCH_DEFAULT_OUTER_LEVEL) - CASE(GL_TESS_CONTROL_OUTPUT_VERTICES) - CASE(GL_TESS_GEN_MODE) - CASE(GL_TESS_GEN_SPACING) - CASE(GL_TESS_GEN_VERTEX_ORDER) - CASE(GL_TESS_GEN_POINT_MODE) - CASE(GL_ISOLINES) - CASE(GL_FRACTIONAL_ODD) - CASE(GL_FRACTIONAL_EVEN) - CASE(GL_MAX_PATCH_VERTICES) - CASE(GL_MAX_TESS_GEN_LEVEL) - CASE(GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS) - CASE(GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS) - CASE(GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS) - CASE(GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS) - CASE(GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS) - CASE(GL_MAX_TESS_PATCH_COMPONENTS) - CASE(GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS) - CASE(GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS) - CASE(GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS) - CASE(GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS) - CASE(GL_MAX_TESS_CONTROL_INPUT_COMPONENTS) - CASE(GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS) - CASE(GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS) - CASE(GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS) - CASE(GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_CONTROL_SHADER) - CASE(GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_EVALUATION_SHADER) - CASE(GL_TESS_EVALUATION_SHADER) - CASE(GL_TESS_CONTROL_SHADER) - CASE(GL_TRANSFORM_FEEDBACK) - CASE(GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED) - CASE(GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE) - CASE(GL_TRANSFORM_FEEDBACK_BINDING) - CASE(GL_MAX_TRANSFORM_FEEDBACK_BUFFERS) - //CASE(GL_VERSION_4_1) - CASE(GL_FIXED) - CASE(GL_IMPLEMENTATION_COLOR_READ_TYPE) - CASE(GL_IMPLEMENTATION_COLOR_READ_FORMAT) - CASE(GL_LOW_FLOAT) - CASE(GL_MEDIUM_FLOAT) - CASE(GL_HIGH_FLOAT) - CASE(GL_LOW_INT) - CASE(GL_MEDIUM_INT) - CASE(GL_HIGH_INT) - CASE(GL_SHADER_COMPILER) - CASE(GL_SHADER_BINARY_FORMATS) - CASE(GL_NUM_SHADER_BINARY_FORMATS) - CASE(GL_MAX_VERTEX_UNIFORM_VECTORS) - CASE(GL_MAX_VARYING_VECTORS) - CASE(GL_MAX_FRAGMENT_UNIFORM_VECTORS) - CASE(GL_RGB565) - CASE(GL_PROGRAM_BINARY_RETRIEVABLE_HINT) - CASE(GL_PROGRAM_BINARY_LENGTH) - CASE(GL_NUM_PROGRAM_BINARY_FORMATS) - CASE(GL_PROGRAM_BINARY_FORMATS) - //CASE(GL_VERTEX_SHADER_BIT) - //CASE(GL_FRAGMENT_SHADER_BIT) - //CASE(GL_GEOMETRY_SHADER_BIT) - //CASE(GL_TESS_CONTROL_SHADER_BIT) - //CASE(GL_TESS_EVALUATION_SHADER_BIT) - CASE(GL_PROGRAM_SEPARABLE) - CASE(GL_ACTIVE_PROGRAM) - CASE(GL_PROGRAM_PIPELINE_BINDING) - CASE(GL_MAX_VIEWPORTS) - CASE(GL_VIEWPORT_SUBPIXEL_BITS) - CASE(GL_VIEWPORT_BOUNDS_RANGE) - CASE(GL_LAYER_PROVOKING_VERTEX) - CASE(GL_VIEWPORT_INDEX_PROVOKING_VERTEX) - CASE(GL_UNDEFINED_VERTEX) - //CASE(GL_VERSION_4_2) - //CASE(GL_COPY_READ_BUFFER_BINDING) - //CASE(GL_COPY_WRITE_BUFFER_BINDING) - //CASE(GL_TRANSFORM_FEEDBACK_ACTIVE) - //CASE(GL_TRANSFORM_FEEDBACK_PAUSED) - CASE(GL_UNPACK_COMPRESSED_BLOCK_WIDTH) - CASE(GL_UNPACK_COMPRESSED_BLOCK_HEIGHT) - CASE(GL_UNPACK_COMPRESSED_BLOCK_DEPTH) - CASE(GL_UNPACK_COMPRESSED_BLOCK_SIZE) - CASE(GL_PACK_COMPRESSED_BLOCK_WIDTH) - CASE(GL_PACK_COMPRESSED_BLOCK_HEIGHT) - CASE(GL_PACK_COMPRESSED_BLOCK_DEPTH) - CASE(GL_PACK_COMPRESSED_BLOCK_SIZE) - CASE(GL_NUM_SAMPLE_COUNTS) - CASE(GL_MIN_MAP_BUFFER_ALIGNMENT) - CASE(GL_ATOMIC_COUNTER_BUFFER) - CASE(GL_ATOMIC_COUNTER_BUFFER_BINDING) - CASE(GL_ATOMIC_COUNTER_BUFFER_START) - CASE(GL_ATOMIC_COUNTER_BUFFER_SIZE) - CASE(GL_ATOMIC_COUNTER_BUFFER_DATA_SIZE) - CASE(GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTERS) - CASE(GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTER_INDICES) - CASE(GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_VERTEX_SHADER) - CASE(GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_CONTROL_SHADER) - CASE(GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_EVALUATION_SHADER) - CASE(GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_GEOMETRY_SHADER) - CASE(GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_FRAGMENT_SHADER) - CASE(GL_MAX_VERTEX_ATOMIC_COUNTER_BUFFERS) - CASE(GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS) - CASE(GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS) - CASE(GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS) - CASE(GL_MAX_FRAGMENT_ATOMIC_COUNTER_BUFFERS) - CASE(GL_MAX_COMBINED_ATOMIC_COUNTER_BUFFERS) - CASE(GL_MAX_VERTEX_ATOMIC_COUNTERS) - CASE(GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS) - CASE(GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS) - CASE(GL_MAX_GEOMETRY_ATOMIC_COUNTERS) - CASE(GL_MAX_FRAGMENT_ATOMIC_COUNTERS) - CASE(GL_MAX_COMBINED_ATOMIC_COUNTERS) - CASE(GL_MAX_ATOMIC_COUNTER_BUFFER_SIZE) - CASE(GL_MAX_ATOMIC_COUNTER_BUFFER_BINDINGS) - CASE(GL_ACTIVE_ATOMIC_COUNTER_BUFFERS) - CASE(GL_UNIFORM_ATOMIC_COUNTER_BUFFER_INDEX) - CASE(GL_UNSIGNED_INT_ATOMIC_COUNTER) - //CASE(GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT) - //CASE(GL_ELEMENT_ARRAY_BARRIER_BIT) - //CASE(GL_UNIFORM_BARRIER_BIT) - //CASE(GL_TEXTURE_FETCH_BARRIER_BIT) - //CASE(GL_SHADER_IMAGE_ACCESS_BARRIER_BIT) - CASE(GL_COMMAND_BARRIER_BIT) - CASE(GL_PIXEL_BUFFER_BARRIER_BIT) - //CASE(GL_TEXTURE_UPDATE_BARRIER_BIT) - //CASE(GL_BUFFER_UPDATE_BARRIER_BIT) - //CASE(GL_FRAMEBUFFER_BARRIER_BIT) - CASE(GL_TRANSFORM_FEEDBACK_BARRIER_BIT) - //CASE(GL_ATOMIC_COUNTER_BARRIER_BIT) - CASE(GL_MAX_IMAGE_UNITS) - CASE(GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS) - CASE(GL_IMAGE_BINDING_NAME) - CASE(GL_IMAGE_BINDING_LEVEL) - CASE(GL_IMAGE_BINDING_LAYERED) - CASE(GL_IMAGE_BINDING_LAYER) - CASE(GL_IMAGE_BINDING_ACCESS) - CASE(GL_IMAGE_1D) - CASE(GL_IMAGE_2D) - CASE(GL_IMAGE_3D) - CASE(GL_IMAGE_2D_RECT) - CASE(GL_IMAGE_CUBE) - CASE(GL_IMAGE_BUFFER) - CASE(GL_IMAGE_1D_ARRAY) - CASE(GL_IMAGE_2D_ARRAY) - CASE(GL_IMAGE_CUBE_MAP_ARRAY) - CASE(GL_IMAGE_2D_MULTISAMPLE) - CASE(GL_IMAGE_2D_MULTISAMPLE_ARRAY) - CASE(GL_INT_IMAGE_1D) - CASE(GL_INT_IMAGE_2D) - CASE(GL_INT_IMAGE_3D) - CASE(GL_INT_IMAGE_2D_RECT) - CASE(GL_INT_IMAGE_CUBE) - CASE(GL_INT_IMAGE_BUFFER) - CASE(GL_INT_IMAGE_1D_ARRAY) - CASE(GL_INT_IMAGE_2D_ARRAY) - CASE(GL_INT_IMAGE_CUBE_MAP_ARRAY) - CASE(GL_INT_IMAGE_2D_MULTISAMPLE) - CASE(GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY) - CASE(GL_UNSIGNED_INT_IMAGE_1D) - CASE(GL_UNSIGNED_INT_IMAGE_2D) - CASE(GL_UNSIGNED_INT_IMAGE_3D) - CASE(GL_UNSIGNED_INT_IMAGE_2D_RECT) - CASE(GL_UNSIGNED_INT_IMAGE_CUBE) - CASE(GL_UNSIGNED_INT_IMAGE_BUFFER) - CASE(GL_UNSIGNED_INT_IMAGE_1D_ARRAY) - CASE(GL_UNSIGNED_INT_IMAGE_2D_ARRAY) - CASE(GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY) - CASE(GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE) - CASE(GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY) - CASE(GL_MAX_IMAGE_SAMPLES) - CASE(GL_IMAGE_BINDING_FORMAT) - CASE(GL_IMAGE_FORMAT_COMPATIBILITY_TYPE) - CASE(GL_IMAGE_FORMAT_COMPATIBILITY_BY_SIZE) - CASE(GL_IMAGE_FORMAT_COMPATIBILITY_BY_CLASS) - CASE(GL_MAX_VERTEX_IMAGE_UNIFORMS) - CASE(GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS) - CASE(GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS) - CASE(GL_MAX_GEOMETRY_IMAGE_UNIFORMS) - CASE(GL_MAX_FRAGMENT_IMAGE_UNIFORMS) - CASE(GL_MAX_COMBINED_IMAGE_UNIFORMS) - CASE(GL_COMPRESSED_RGBA_BPTC_UNORM) - CASE(GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM) - CASE(GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT) - CASE(GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT) - CASE(GL_TEXTURE_IMMUTABLE_FORMAT) - //CASE(GL_VERSION_4_3) - CASE(GL_NUM_SHADING_LANGUAGE_VERSIONS) - CASE(GL_VERTEX_ATTRIB_ARRAY_LONG) - CASE(GL_COMPRESSED_RGB8_ETC2) - CASE(GL_COMPRESSED_SRGB8_ETC2) - CASE(GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2) - CASE(GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2) - CASE(GL_COMPRESSED_RGBA8_ETC2_EAC) - CASE(GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC) - CASE(GL_COMPRESSED_R11_EAC) - CASE(GL_COMPRESSED_SIGNED_R11_EAC) - CASE(GL_COMPRESSED_RG11_EAC) - CASE(GL_COMPRESSED_SIGNED_RG11_EAC) - CASE(GL_PRIMITIVE_RESTART_FIXED_INDEX) - CASE(GL_ANY_SAMPLES_PASSED_CONSERVATIVE) - CASE(GL_MAX_ELEMENT_INDEX) - CASE(GL_COMPUTE_SHADER) - CASE(GL_MAX_COMPUTE_UNIFORM_BLOCKS) - CASE(GL_MAX_COMPUTE_TEXTURE_IMAGE_UNITS) - CASE(GL_MAX_COMPUTE_IMAGE_UNIFORMS) - CASE(GL_MAX_COMPUTE_SHARED_MEMORY_SIZE) - CASE(GL_MAX_COMPUTE_UNIFORM_COMPONENTS) - CASE(GL_MAX_COMPUTE_ATOMIC_COUNTER_BUFFERS) - CASE(GL_MAX_COMPUTE_ATOMIC_COUNTERS) - CASE(GL_MAX_COMBINED_COMPUTE_UNIFORM_COMPONENTS) - CASE(GL_MAX_COMPUTE_WORK_GROUP_INVOCATIONS) - CASE(GL_MAX_COMPUTE_WORK_GROUP_COUNT) - CASE(GL_MAX_COMPUTE_WORK_GROUP_SIZE) - CASE(GL_COMPUTE_WORK_GROUP_SIZE) - CASE(GL_UNIFORM_BLOCK_REFERENCED_BY_COMPUTE_SHADER) - CASE(GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_COMPUTE_SHADER) - CASE(GL_DISPATCH_INDIRECT_BUFFER) - CASE(GL_DISPATCH_INDIRECT_BUFFER_BINDING) - //CASE(GL_COMPUTE_SHADER_BIT) - CASE(GL_DEBUG_OUTPUT_SYNCHRONOUS) - CASE(GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH) - CASE(GL_DEBUG_CALLBACK_FUNCTION) - CASE(GL_DEBUG_CALLBACK_USER_PARAM) - CASE(GL_DEBUG_SOURCE_API) - CASE(GL_DEBUG_SOURCE_WINDOW_SYSTEM) - CASE(GL_DEBUG_SOURCE_SHADER_COMPILER) - CASE(GL_DEBUG_SOURCE_THIRD_PARTY) - CASE(GL_DEBUG_SOURCE_APPLICATION) - CASE(GL_DEBUG_SOURCE_OTHER) - CASE(GL_DEBUG_TYPE_ERROR) - CASE(GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR) - CASE(GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR) - CASE(GL_DEBUG_TYPE_PORTABILITY) - CASE(GL_DEBUG_TYPE_PERFORMANCE) - CASE(GL_DEBUG_TYPE_OTHER) - CASE(GL_MAX_DEBUG_MESSAGE_LENGTH) - CASE(GL_MAX_DEBUG_LOGGED_MESSAGES) - CASE(GL_DEBUG_LOGGED_MESSAGES) - CASE(GL_DEBUG_SEVERITY_HIGH) - CASE(GL_DEBUG_SEVERITY_MEDIUM) - CASE(GL_DEBUG_SEVERITY_LOW) - CASE(GL_DEBUG_TYPE_MARKER) - CASE(GL_DEBUG_TYPE_PUSH_GROUP) - CASE(GL_DEBUG_TYPE_POP_GROUP) - CASE(GL_DEBUG_SEVERITY_NOTIFICATION) - CASE(GL_MAX_DEBUG_GROUP_STACK_DEPTH) - CASE(GL_DEBUG_GROUP_STACK_DEPTH) - CASE(GL_BUFFER) - CASE(GL_SHADER) - CASE(GL_PROGRAM) - CASE(GL_QUERY) - CASE(GL_PROGRAM_PIPELINE) - CASE(GL_SAMPLER) - CASE(GL_MAX_LABEL_LENGTH) - CASE(GL_DEBUG_OUTPUT) - //CASE(GL_CONTEXT_FLAG_DEBUG_BIT) - CASE(GL_MAX_UNIFORM_LOCATIONS) - CASE(GL_FRAMEBUFFER_DEFAULT_WIDTH) - CASE(GL_FRAMEBUFFER_DEFAULT_HEIGHT) - CASE(GL_FRAMEBUFFER_DEFAULT_LAYERS) - CASE(GL_FRAMEBUFFER_DEFAULT_SAMPLES) - CASE(GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS) - CASE(GL_MAX_FRAMEBUFFER_WIDTH) - CASE(GL_MAX_FRAMEBUFFER_HEIGHT) - CASE(GL_MAX_FRAMEBUFFER_LAYERS) - CASE(GL_MAX_FRAMEBUFFER_SAMPLES) - CASE(GL_INTERNALFORMAT_SUPPORTED) - CASE(GL_INTERNALFORMAT_PREFERRED) - CASE(GL_INTERNALFORMAT_RED_SIZE) - CASE(GL_INTERNALFORMAT_GREEN_SIZE) - CASE(GL_INTERNALFORMAT_BLUE_SIZE) - CASE(GL_INTERNALFORMAT_ALPHA_SIZE) - CASE(GL_INTERNALFORMAT_DEPTH_SIZE) - CASE(GL_INTERNALFORMAT_STENCIL_SIZE) - CASE(GL_INTERNALFORMAT_SHARED_SIZE) - CASE(GL_INTERNALFORMAT_RED_TYPE) - CASE(GL_INTERNALFORMAT_GREEN_TYPE) - CASE(GL_INTERNALFORMAT_BLUE_TYPE) - CASE(GL_INTERNALFORMAT_ALPHA_TYPE) - CASE(GL_INTERNALFORMAT_DEPTH_TYPE) - CASE(GL_INTERNALFORMAT_STENCIL_TYPE) - CASE(GL_MAX_WIDTH) - CASE(GL_MAX_HEIGHT) - CASE(GL_MAX_DEPTH) - CASE(GL_MAX_LAYERS) - CASE(GL_MAX_COMBINED_DIMENSIONS) - CASE(GL_COLOR_COMPONENTS) - CASE(GL_DEPTH_COMPONENTS) - CASE(GL_STENCIL_COMPONENTS) - CASE(GL_COLOR_RENDERABLE) - CASE(GL_DEPTH_RENDERABLE) - CASE(GL_STENCIL_RENDERABLE) - CASE(GL_FRAMEBUFFER_RENDERABLE) - CASE(GL_FRAMEBUFFER_RENDERABLE_LAYERED) - CASE(GL_FRAMEBUFFER_BLEND) - CASE(GL_READ_PIXELS) - CASE(GL_READ_PIXELS_FORMAT) - CASE(GL_READ_PIXELS_TYPE) - CASE(GL_TEXTURE_IMAGE_FORMAT) - CASE(GL_TEXTURE_IMAGE_TYPE) - CASE(GL_GET_TEXTURE_IMAGE_FORMAT) - CASE(GL_GET_TEXTURE_IMAGE_TYPE) - CASE(GL_MIPMAP) - CASE(GL_MANUAL_GENERATE_MIPMAP) - CASE(GL_AUTO_GENERATE_MIPMAP) - CASE(GL_COLOR_ENCODING) - CASE(GL_SRGB_READ) - CASE(GL_SRGB_WRITE) - CASE(GL_FILTER) - CASE(GL_VERTEX_TEXTURE) - CASE(GL_TESS_CONTROL_TEXTURE) - CASE(GL_TESS_EVALUATION_TEXTURE) - CASE(GL_GEOMETRY_TEXTURE) - CASE(GL_FRAGMENT_TEXTURE) - CASE(GL_COMPUTE_TEXTURE) - CASE(GL_TEXTURE_SHADOW) - CASE(GL_TEXTURE_GATHER) - CASE(GL_TEXTURE_GATHER_SHADOW) - CASE(GL_SHADER_IMAGE_LOAD) - CASE(GL_SHADER_IMAGE_STORE) - CASE(GL_SHADER_IMAGE_ATOMIC) - CASE(GL_IMAGE_TEXEL_SIZE) - CASE(GL_IMAGE_COMPATIBILITY_CLASS) - CASE(GL_IMAGE_PIXEL_FORMAT) - CASE(GL_IMAGE_PIXEL_TYPE) - CASE(GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_TEST) - CASE(GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_TEST) - CASE(GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_WRITE) - CASE(GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_WRITE) - CASE(GL_TEXTURE_COMPRESSED_BLOCK_WIDTH) - CASE(GL_TEXTURE_COMPRESSED_BLOCK_HEIGHT) - CASE(GL_TEXTURE_COMPRESSED_BLOCK_SIZE) - CASE(GL_CLEAR_BUFFER) - CASE(GL_TEXTURE_VIEW) - CASE(GL_VIEW_COMPATIBILITY_CLASS) - CASE(GL_FULL_SUPPORT) - CASE(GL_CAVEAT_SUPPORT) - CASE(GL_IMAGE_CLASS_4_X_32) - CASE(GL_IMAGE_CLASS_2_X_32) - CASE(GL_IMAGE_CLASS_1_X_32) - CASE(GL_IMAGE_CLASS_4_X_16) - CASE(GL_IMAGE_CLASS_2_X_16) - CASE(GL_IMAGE_CLASS_1_X_16) - CASE(GL_IMAGE_CLASS_4_X_8) - CASE(GL_IMAGE_CLASS_2_X_8) - CASE(GL_IMAGE_CLASS_1_X_8) - CASE(GL_IMAGE_CLASS_11_11_10) - CASE(GL_IMAGE_CLASS_10_10_10_2) - CASE(GL_VIEW_CLASS_128_BITS) - CASE(GL_VIEW_CLASS_96_BITS) - CASE(GL_VIEW_CLASS_64_BITS) - CASE(GL_VIEW_CLASS_48_BITS) - CASE(GL_VIEW_CLASS_32_BITS) - CASE(GL_VIEW_CLASS_24_BITS) - CASE(GL_VIEW_CLASS_16_BITS) - CASE(GL_VIEW_CLASS_8_BITS) - CASE(GL_VIEW_CLASS_S3TC_DXT1_RGB) - CASE(GL_VIEW_CLASS_S3TC_DXT1_RGBA) - CASE(GL_VIEW_CLASS_S3TC_DXT3_RGBA) - CASE(GL_VIEW_CLASS_S3TC_DXT5_RGBA) - CASE(GL_VIEW_CLASS_RGTC1_RED) - CASE(GL_VIEW_CLASS_RGTC2_RG) - CASE(GL_VIEW_CLASS_BPTC_UNORM) - CASE(GL_VIEW_CLASS_BPTC_FLOAT) - CASE(GL_UNIFORM) - CASE(GL_UNIFORM_BLOCK) - CASE(GL_PROGRAM_INPUT) - CASE(GL_PROGRAM_OUTPUT) - CASE(GL_BUFFER_VARIABLE) - CASE(GL_SHADER_STORAGE_BLOCK) - CASE(GL_VERTEX_SUBROUTINE) - CASE(GL_TESS_CONTROL_SUBROUTINE) - CASE(GL_TESS_EVALUATION_SUBROUTINE) - CASE(GL_GEOMETRY_SUBROUTINE) - CASE(GL_FRAGMENT_SUBROUTINE) - CASE(GL_COMPUTE_SUBROUTINE) - CASE(GL_VERTEX_SUBROUTINE_UNIFORM) - CASE(GL_TESS_CONTROL_SUBROUTINE_UNIFORM) - CASE(GL_TESS_EVALUATION_SUBROUTINE_UNIFORM) - CASE(GL_GEOMETRY_SUBROUTINE_UNIFORM) - CASE(GL_FRAGMENT_SUBROUTINE_UNIFORM) - CASE(GL_COMPUTE_SUBROUTINE_UNIFORM) - CASE(GL_TRANSFORM_FEEDBACK_VARYING) - CASE(GL_ACTIVE_RESOURCES) - CASE(GL_MAX_NAME_LENGTH) - CASE(GL_MAX_NUM_ACTIVE_VARIABLES) - CASE(GL_MAX_NUM_COMPATIBLE_SUBROUTINES) - CASE(GL_NAME_LENGTH) - CASE(GL_TYPE) - CASE(GL_ARRAY_SIZE) - CASE(GL_OFFSET) - CASE(GL_BLOCK_INDEX) - CASE(GL_ARRAY_STRIDE) - CASE(GL_MATRIX_STRIDE) - CASE(GL_IS_ROW_MAJOR) - CASE(GL_ATOMIC_COUNTER_BUFFER_INDEX) - CASE(GL_BUFFER_BINDING) - CASE(GL_BUFFER_DATA_SIZE) - CASE(GL_NUM_ACTIVE_VARIABLES) - CASE(GL_ACTIVE_VARIABLES) - CASE(GL_REFERENCED_BY_VERTEX_SHADER) - CASE(GL_REFERENCED_BY_TESS_CONTROL_SHADER) - CASE(GL_REFERENCED_BY_TESS_EVALUATION_SHADER) - CASE(GL_REFERENCED_BY_GEOMETRY_SHADER) - CASE(GL_REFERENCED_BY_FRAGMENT_SHADER) - CASE(GL_REFERENCED_BY_COMPUTE_SHADER) - CASE(GL_TOP_LEVEL_ARRAY_SIZE) - CASE(GL_TOP_LEVEL_ARRAY_STRIDE) - CASE(GL_LOCATION) - CASE(GL_LOCATION_INDEX) - CASE(GL_IS_PER_PATCH) - CASE(GL_SHADER_STORAGE_BUFFER) - CASE(GL_SHADER_STORAGE_BUFFER_BINDING) - CASE(GL_SHADER_STORAGE_BUFFER_START) - CASE(GL_SHADER_STORAGE_BUFFER_SIZE) - CASE(GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS) - CASE(GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS) - CASE(GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS) - CASE(GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS) - CASE(GL_MAX_FRAGMENT_SHADER_STORAGE_BLOCKS) - CASE(GL_MAX_COMPUTE_SHADER_STORAGE_BLOCKS) - CASE(GL_MAX_COMBINED_SHADER_STORAGE_BLOCKS) - CASE(GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS) - CASE(GL_MAX_SHADER_STORAGE_BLOCK_SIZE) - CASE(GL_SHADER_STORAGE_BUFFER_OFFSET_ALIGNMENT) - CASE(GL_SHADER_STORAGE_BARRIER_BIT) - //CASE(GL_MAX_COMBINED_SHADER_OUTPUT_RESOURCES) - CASE(GL_DEPTH_STENCIL_TEXTURE_MODE) - CASE(GL_TEXTURE_BUFFER_OFFSET) - CASE(GL_TEXTURE_BUFFER_SIZE) - CASE(GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT) - CASE(GL_TEXTURE_VIEW_MIN_LEVEL) - CASE(GL_TEXTURE_VIEW_NUM_LEVELS) - CASE(GL_TEXTURE_VIEW_MIN_LAYER) - CASE(GL_TEXTURE_VIEW_NUM_LAYERS) - CASE(GL_TEXTURE_IMMUTABLE_LEVELS) - CASE(GL_VERTEX_ATTRIB_BINDING) - CASE(GL_VERTEX_ATTRIB_RELATIVE_OFFSET) - CASE(GL_VERTEX_BINDING_DIVISOR) - CASE(GL_VERTEX_BINDING_OFFSET) - CASE(GL_VERTEX_BINDING_STRIDE) - CASE(GL_MAX_VERTEX_ATTRIB_RELATIVE_OFFSET) - CASE(GL_MAX_VERTEX_ATTRIB_BINDINGS) - CASE(GL_VERTEX_BINDING_BUFFER) - //CASE(GL_VERSION_4_4) - CASE(GL_MAX_VERTEX_ATTRIB_STRIDE) - CASE(GL_PRIMITIVE_RESTART_FOR_PATCHES_SUPPORTED) - //CASE(GL_TEXTURE_BUFFER_BINDING) - //CASE(GL_MAP_PERSISTENT_BIT) - //CASE(GL_MAP_COHERENT_BIT) - //CASE(GL_DYNAMIC_STORAGE_BIT) - //CASE(GL_CLIENT_STORAGE_BIT) - //CASE(GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT) - CASE(GL_BUFFER_IMMUTABLE_STORAGE) - CASE(GL_BUFFER_STORAGE_FLAGS) - CASE(GL_CLEAR_TEXTURE) - CASE(GL_LOCATION_COMPONENT) - CASE(GL_TRANSFORM_FEEDBACK_BUFFER_INDEX) - CASE(GL_TRANSFORM_FEEDBACK_BUFFER_STRIDE) - CASE(GL_QUERY_BUFFER) - CASE(GL_QUERY_BUFFER_BARRIER_BIT) - CASE(GL_QUERY_BUFFER_BINDING) - CASE(GL_QUERY_RESULT_NO_WAIT) - CASE(GL_MIRROR_CLAMP_TO_EDGE) - //CASE(GL_VERSION_4_5) - CASE(GL_CONTEXT_LOST) - CASE(GL_NEGATIVE_ONE_TO_ONE) - CASE(GL_ZERO_TO_ONE) - CASE(GL_CLIP_ORIGIN) - CASE(GL_CLIP_DEPTH_MODE) - CASE(GL_QUERY_WAIT_INVERTED) - CASE(GL_QUERY_NO_WAIT_INVERTED) - CASE(GL_QUERY_BY_REGION_WAIT_INVERTED) - CASE(GL_QUERY_BY_REGION_NO_WAIT_INVERTED) - CASE(GL_MAX_CULL_DISTANCES) - CASE(GL_MAX_COMBINED_CLIP_AND_CULL_DISTANCES) - CASE(GL_TEXTURE_TARGET) - CASE(GL_QUERY_TARGET) - CASE(GL_GUILTY_CONTEXT_RESET) - CASE(GL_INNOCENT_CONTEXT_RESET) - CASE(GL_UNKNOWN_CONTEXT_RESET) - CASE(GL_RESET_NOTIFICATION_STRATEGY) - CASE(GL_LOSE_CONTEXT_ON_RESET) - CASE(GL_NO_RESET_NOTIFICATION) - //CASE(GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT) - CASE(GL_CONTEXT_RELEASE_BEHAVIOR) - CASE(GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH) - CASE(GL_UNSIGNED_INT64_ARB) - CASE(GL_SYNC_CL_EVENT_ARB) - CASE(GL_SYNC_CL_EVENT_COMPLETE_ARB) - CASE(GL_MAX_COMPUTE_VARIABLE_GROUP_INVOCATIONS_ARB) - //CASE(GL_MAX_COMPUTE_FIXED_GROUP_INVOCATIONS_ARB) - CASE(GL_MAX_COMPUTE_VARIABLE_GROUP_SIZE_ARB) - //CASE(GL_MAX_COMPUTE_FIXED_GROUP_SIZE_ARB) - //CASE(GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB) - //CASE(GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_ARB) - //CASE(GL_DEBUG_CALLBACK_FUNCTION_ARB) - //CASE(GL_DEBUG_CALLBACK_USER_PARAM_ARB) - //CASE(GL_DEBUG_SOURCE_API_ARB) - //CASE(GL_DEBUG_SOURCE_WINDOW_SYSTEM_ARB) - //CASE(GL_DEBUG_SOURCE_SHADER_COMPILER_ARB) - //CASE(GL_DEBUG_SOURCE_THIRD_PARTY_ARB) - //CASE(GL_DEBUG_SOURCE_APPLICATION_ARB) - //CASE(GL_DEBUG_SOURCE_OTHER_ARB) - //CASE(GL_DEBUG_TYPE_ERROR_ARB) - //CASE(GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_ARB) - //CASE(GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_ARB) - //CASE(GL_DEBUG_TYPE_PORTABILITY_ARB) - //CASE(GL_DEBUG_TYPE_PERFORMANCE_ARB) - //CASE(GL_DEBUG_TYPE_OTHER_ARB) - //CASE(GL_MAX_DEBUG_MESSAGE_LENGTH_ARB) - //CASE(GL_MAX_DEBUG_LOGGED_MESSAGES_ARB) - //CASE(GL_DEBUG_LOGGED_MESSAGES_ARB) - //CASE(GL_DEBUG_SEVERITY_HIGH_ARB) - //CASE(GL_DEBUG_SEVERITY_MEDIUM_ARB) - //CASE(GL_DEBUG_SEVERITY_LOW_ARB) - CASE(GL_BLEND_COLOR) - //CASE(GL_BLEND_EQUATION) - CASE(GL_PARAMETER_BUFFER_ARB) - CASE(GL_PARAMETER_BUFFER_BINDING_ARB) - CASE(GL_SRGB_DECODE_ARB) - CASE(GL_VERTICES_SUBMITTED_ARB) - CASE(GL_PRIMITIVES_SUBMITTED_ARB) - CASE(GL_VERTEX_SHADER_INVOCATIONS_ARB) - CASE(GL_TESS_CONTROL_SHADER_PATCHES_ARB) - CASE(GL_TESS_EVALUATION_SHADER_INVOCATIONS_ARB) - CASE(GL_GEOMETRY_SHADER_PRIMITIVES_EMITTED_ARB) - CASE(GL_FRAGMENT_SHADER_INVOCATIONS_ARB) - CASE(GL_COMPUTE_SHADER_INVOCATIONS_ARB) - CASE(GL_CLIPPING_INPUT_PRIMITIVES_ARB) - CASE(GL_CLIPPING_OUTPUT_PRIMITIVES_ARB) - //CASE(GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT_ARB) - //CASE(GL_LOSE_CONTEXT_ON_RESET_ARB) - //CASE(GL_GUILTY_CONTEXT_RESET_ARB) - //CASE(GL_INNOCENT_CONTEXT_RESET_ARB) - //CASE(GL_UNKNOWN_CONTEXT_RESET_ARB) - //CASE(GL_RESET_NOTIFICATION_STRATEGY_ARB) - //CASE(GL_NO_RESET_NOTIFICATION_ARB) - //CASE(GL_SAMPLE_SHADING_ARB) - //CASE(GL_MIN_SAMPLE_SHADING_VALUE_ARB) - CASE(GL_SHADER_INCLUDE_ARB) - CASE(GL_NAMED_STRING_LENGTH_ARB) - CASE(GL_NAMED_STRING_TYPE_ARB) - //CASE(GL_SPARSE_STORAGE_BIT_ARB) - CASE(GL_SPARSE_BUFFER_PAGE_SIZE_ARB) - CASE(GL_TEXTURE_SPARSE_ARB) - CASE(GL_VIRTUAL_PAGE_SIZE_INDEX_ARB) - CASE(GL_NUM_SPARSE_LEVELS_ARB) - CASE(GL_NUM_VIRTUAL_PAGE_SIZES_ARB) - CASE(GL_VIRTUAL_PAGE_SIZE_X_ARB) - CASE(GL_VIRTUAL_PAGE_SIZE_Y_ARB) - CASE(GL_VIRTUAL_PAGE_SIZE_Z_ARB) - CASE(GL_MAX_SPARSE_TEXTURE_SIZE_ARB) - CASE(GL_MAX_SPARSE_3D_TEXTURE_SIZE_ARB) - CASE(GL_MAX_SPARSE_ARRAY_TEXTURE_LAYERS_ARB) - CASE(GL_SPARSE_TEXTURE_FULL_ARRAY_CUBE_MIPMAPS_ARB) - //CASE(GL_COMPRESSED_RGBA_BPTC_UNORM_ARB) - //CASE(GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM_ARB) - //CASE(GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT_ARB) - //CASE(GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_ARB) - //CASE(GL_TEXTURE_CUBE_MAP_ARRAY_ARB) - //CASE(GL_TEXTURE_BINDING_CUBE_MAP_ARRAY_ARB) - //CASE(GL_PROXY_TEXTURE_CUBE_MAP_ARRAY_ARB) - //CASE(GL_SAMPLER_CUBE_MAP_ARRAY_ARB) - //CASE(GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW_ARB) - //CASE(GL_INT_SAMPLER_CUBE_MAP_ARRAY_ARB) - //CASE(GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY_ARB) - //CASE(GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET_ARB) - //CASE(GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET_ARB) - CASE(GL_MAX_PROGRAM_TEXTURE_GATHER_COMPONENTS_ARB) - CASE(GL_TRANSFORM_FEEDBACK_OVERFLOW_ARB) - CASE(GL_TRANSFORM_FEEDBACK_STREAM_OVERFLOW_ARB) - //CASE(GL_CONTEXT_FLAG_NO_ERROR_BIT_KHR) - CASE(GL_CONTEXT_ROBUST_ACCESS) - //CASE(GL_ACCUM) - CASE(GL_LOAD) - CASE(GL_RETURN) - CASE(GL_MULT) - CASE(GL_ADD) - //CASE(GL_CURRENT_BIT) - //CASE(GL_POINT_BIT) - //CASE(GL_LINE_BIT) - //CASE(GL_POLYGON_BIT) - //CASE(GL_POLYGON_STIPPLE_BIT) - //CASE(GL_PIXEL_MODE_BIT) - //CASE(GL_LIGHTING_BIT) - //CASE(GL_FOG_BIT) - //CASE(GL_ACCUM_BUFFER_BIT) - //CASE(GL_VIEWPORT_BIT) - //CASE(GL_TRANSFORM_BIT) - //CASE(GL_ENABLE_BIT) - //CASE(GL_HINT_BIT) - CASE(GL_EVAL_BIT) - CASE(GL_LIST_BIT) - CASE(GL_TEXTURE_BIT) - CASE(GL_SCISSOR_BIT) - CASE(GL_ALL_ATTRIB_BITS) - //CASE(GL_QUAD_STRIP) - CASE(GL_POLYGON) - //CASE(GL_CLIP_PLANE0) - //CASE(GL_CLIP_PLANE1) - //CASE(GL_CLIP_PLANE2) - //CASE(GL_CLIP_PLANE3) - //CASE(GL_CLIP_PLANE4) - //CASE(GL_CLIP_PLANE5) - CASE(GL_2_BYTES) - CASE(GL_3_BYTES) - CASE(GL_4_BYTES) - CASE(GL_AUX0) - CASE(GL_AUX1) - CASE(GL_AUX2) - CASE(GL_AUX3) - CASE(GL_2D) - CASE(GL_3D) - CASE(GL_3D_COLOR) - CASE(GL_3D_COLOR_TEXTURE) - CASE(GL_4D_COLOR_TEXTURE) - CASE(GL_PASS_THROUGH_TOKEN) - CASE(GL_POINT_TOKEN) - CASE(GL_LINE_TOKEN) - CASE(GL_POLYGON_TOKEN) - CASE(GL_BITMAP_TOKEN) - CASE(GL_DRAW_PIXEL_TOKEN) - CASE(GL_COPY_PIXEL_TOKEN) - CASE(GL_LINE_RESET_TOKEN) - //CASE(GL_EXP) - CASE(GL_EXP2) - CASE(GL_COEFF) - CASE(GL_ORDER) - CASE(GL_DOMAIN) - CASE(GL_CURRENT_COLOR) - CASE(GL_CURRENT_INDEX) - CASE(GL_CURRENT_NORMAL) - CASE(GL_CURRENT_TEXTURE_COORDS) - CASE(GL_CURRENT_RASTER_COLOR) - CASE(GL_CURRENT_RASTER_INDEX) - CASE(GL_CURRENT_RASTER_TEXTURE_COORDS) - CASE(GL_CURRENT_RASTER_POSITION) - CASE(GL_CURRENT_RASTER_POSITION_VALID) - CASE(GL_CURRENT_RASTER_DISTANCE) - CASE(GL_POINT_SMOOTH) - CASE(GL_LINE_STIPPLE) - CASE(GL_LINE_STIPPLE_PATTERN) - CASE(GL_LINE_STIPPLE_REPEAT) - CASE(GL_LIST_MODE) - CASE(GL_MAX_LIST_NESTING) - CASE(GL_LIST_BASE) - CASE(GL_LIST_INDEX) - CASE(GL_POLYGON_STIPPLE) - CASE(GL_EDGE_FLAG) - CASE(GL_LIGHTING) - CASE(GL_LIGHT_MODEL_LOCAL_VIEWER) - CASE(GL_LIGHT_MODEL_TWO_SIDE) - CASE(GL_LIGHT_MODEL_AMBIENT) - CASE(GL_SHADE_MODEL) - CASE(GL_COLOR_MATERIAL_FACE) - CASE(GL_COLOR_MATERIAL_PARAMETER) - CASE(GL_COLOR_MATERIAL) - CASE(GL_FOG) - CASE(GL_FOG_INDEX) - CASE(GL_FOG_DENSITY) - CASE(GL_FOG_START) - CASE(GL_FOG_END) - CASE(GL_FOG_MODE) - CASE(GL_FOG_COLOR) - CASE(GL_ACCUM_CLEAR_VALUE) - CASE(GL_MATRIX_MODE) - CASE(GL_NORMALIZE) - CASE(GL_MODELVIEW_STACK_DEPTH) - CASE(GL_PROJECTION_STACK_DEPTH) - CASE(GL_TEXTURE_STACK_DEPTH) - CASE(GL_MODELVIEW_MATRIX) - CASE(GL_PROJECTION_MATRIX) - CASE(GL_TEXTURE_MATRIX) - CASE(GL_ATTRIB_STACK_DEPTH) - CASE(GL_CLIENT_ATTRIB_STACK_DEPTH) - CASE(GL_ALPHA_TEST) - CASE(GL_ALPHA_TEST_FUNC) - CASE(GL_ALPHA_TEST_REF) - CASE(GL_INDEX_LOGIC_OP) - CASE(GL_AUX_BUFFERS) - CASE(GL_INDEX_CLEAR_VALUE) - CASE(GL_INDEX_WRITEMASK) - CASE(GL_INDEX_MODE) - CASE(GL_RGBA_MODE) - CASE(GL_RENDER_MODE) - CASE(GL_PERSPECTIVE_CORRECTION_HINT) - CASE(GL_POINT_SMOOTH_HINT) - CASE(GL_FOG_HINT) - CASE(GL_TEXTURE_GEN_S) - CASE(GL_TEXTURE_GEN_T) - CASE(GL_TEXTURE_GEN_R) - CASE(GL_TEXTURE_GEN_Q) - CASE(GL_PIXEL_MAP_I_TO_I) - CASE(GL_PIXEL_MAP_S_TO_S) - CASE(GL_PIXEL_MAP_I_TO_R) - CASE(GL_PIXEL_MAP_I_TO_G) - CASE(GL_PIXEL_MAP_I_TO_B) - CASE(GL_PIXEL_MAP_I_TO_A) - CASE(GL_PIXEL_MAP_R_TO_R) - CASE(GL_PIXEL_MAP_G_TO_G) - CASE(GL_PIXEL_MAP_B_TO_B) - CASE(GL_PIXEL_MAP_A_TO_A) - CASE(GL_PIXEL_MAP_I_TO_I_SIZE) - CASE(GL_PIXEL_MAP_S_TO_S_SIZE) - CASE(GL_PIXEL_MAP_I_TO_R_SIZE) - CASE(GL_PIXEL_MAP_I_TO_G_SIZE) - CASE(GL_PIXEL_MAP_I_TO_B_SIZE) - CASE(GL_PIXEL_MAP_I_TO_A_SIZE) - CASE(GL_PIXEL_MAP_R_TO_R_SIZE) - CASE(GL_PIXEL_MAP_G_TO_G_SIZE) - CASE(GL_PIXEL_MAP_B_TO_B_SIZE) - CASE(GL_PIXEL_MAP_A_TO_A_SIZE) - CASE(GL_MAP_COLOR) - CASE(GL_MAP_STENCIL) - CASE(GL_INDEX_SHIFT) - CASE(GL_INDEX_OFFSET) - CASE(GL_RED_SCALE) - CASE(GL_RED_BIAS) - CASE(GL_ZOOM_X) - CASE(GL_ZOOM_Y) - CASE(GL_GREEN_SCALE) - CASE(GL_GREEN_BIAS) - CASE(GL_BLUE_SCALE) - CASE(GL_BLUE_BIAS) - CASE(GL_ALPHA_SCALE) - CASE(GL_ALPHA_BIAS) - CASE(GL_DEPTH_SCALE) - CASE(GL_DEPTH_BIAS) - CASE(GL_MAX_EVAL_ORDER) - CASE(GL_MAX_LIGHTS) - //CASE(GL_MAX_CLIP_PLANES) - CASE(GL_MAX_PIXEL_MAP_TABLE) - CASE(GL_MAX_ATTRIB_STACK_DEPTH) - CASE(GL_MAX_MODELVIEW_STACK_DEPTH) - CASE(GL_MAX_NAME_STACK_DEPTH) - CASE(GL_MAX_PROJECTION_STACK_DEPTH) - CASE(GL_MAX_TEXTURE_STACK_DEPTH) - CASE(GL_MAX_CLIENT_ATTRIB_STACK_DEPTH) - CASE(GL_INDEX_BITS) - CASE(GL_RED_BITS) - CASE(GL_GREEN_BITS) - CASE(GL_BLUE_BITS) - CASE(GL_ALPHA_BITS) - CASE(GL_DEPTH_BITS) - CASE(GL_STENCIL_BITS) - CASE(GL_ACCUM_RED_BITS) - CASE(GL_ACCUM_GREEN_BITS) - CASE(GL_ACCUM_BLUE_BITS) - CASE(GL_ACCUM_ALPHA_BITS) - CASE(GL_NAME_STACK_DEPTH) - CASE(GL_AUTO_NORMAL) - CASE(GL_MAP1_COLOR_4) - CASE(GL_MAP1_INDEX) - CASE(GL_MAP1_NORMAL) - CASE(GL_MAP1_TEXTURE_COORD_1) - CASE(GL_MAP1_TEXTURE_COORD_2) - CASE(GL_MAP1_TEXTURE_COORD_3) - CASE(GL_MAP1_TEXTURE_COORD_4) - CASE(GL_MAP1_VERTEX_3) - CASE(GL_MAP1_VERTEX_4) - CASE(GL_MAP2_COLOR_4) - CASE(GL_MAP2_INDEX) - CASE(GL_MAP2_NORMAL) - CASE(GL_MAP2_TEXTURE_COORD_1) - CASE(GL_MAP2_TEXTURE_COORD_2) - CASE(GL_MAP2_TEXTURE_COORD_3) - CASE(GL_MAP2_TEXTURE_COORD_4) - CASE(GL_MAP2_VERTEX_3) - CASE(GL_MAP2_VERTEX_4) - CASE(GL_MAP1_GRID_DOMAIN) - CASE(GL_MAP1_GRID_SEGMENTS) - CASE(GL_MAP2_GRID_DOMAIN) - CASE(GL_MAP2_GRID_SEGMENTS) - CASE(GL_FEEDBACK_BUFFER_POINTER) - CASE(GL_FEEDBACK_BUFFER_SIZE) - CASE(GL_FEEDBACK_BUFFER_TYPE) - CASE(GL_SELECTION_BUFFER_POINTER) - CASE(GL_SELECTION_BUFFER_SIZE) - CASE(GL_TEXTURE_BORDER) - //CASE(GL_LIGHT0) - CASE(GL_LIGHT1) - CASE(GL_LIGHT2) - CASE(GL_LIGHT3) - CASE(GL_LIGHT4) - CASE(GL_LIGHT5) - CASE(GL_LIGHT6) - CASE(GL_LIGHT7) - CASE(GL_AMBIENT) - CASE(GL_DIFFUSE) - CASE(GL_SPECULAR) - CASE(GL_POSITION) - CASE(GL_SPOT_DIRECTION) - CASE(GL_SPOT_EXPONENT) - CASE(GL_SPOT_CUTOFF) - CASE(GL_CONSTANT_ATTENUATION) - CASE(GL_LINEAR_ATTENUATION) - CASE(GL_QUADRATIC_ATTENUATION) - CASE(GL_COMPILE) - CASE(GL_COMPILE_AND_EXECUTE) - CASE(GL_EMISSION) - CASE(GL_SHININESS) - CASE(GL_AMBIENT_AND_DIFFUSE) - CASE(GL_COLOR_INDEXES) - CASE(GL_MODELVIEW) - CASE(GL_PROJECTION) - CASE(GL_COLOR_INDEX) - CASE(GL_LUMINANCE) - CASE(GL_LUMINANCE_ALPHA) - CASE(GL_BITMAP) - CASE(GL_RENDER) - CASE(GL_FEEDBACK) - CASE(GL_SELECT) - CASE(GL_FLAT) - CASE(GL_SMOOTH) - //CASE(GL_S) - CASE(GL_T) - CASE(GL_R) - CASE(GL_Q) - CASE(GL_MODULATE) - CASE(GL_DECAL) - CASE(GL_TEXTURE_ENV_MODE) - CASE(GL_TEXTURE_ENV_COLOR) - CASE(GL_TEXTURE_ENV) - CASE(GL_EYE_LINEAR) - CASE(GL_OBJECT_LINEAR) - CASE(GL_SPHERE_MAP) - CASE(GL_TEXTURE_GEN_MODE) - CASE(GL_OBJECT_PLANE) - CASE(GL_EYE_PLANE) - CASE(GL_CLAMP) - //CASE(GL_CLIENT_PIXEL_STORE_BIT) - //CASE(GL_CLIENT_VERTEX_ARRAY_BIT) - CASE(GL_ALPHA4) - CASE(GL_ALPHA8) - CASE(GL_ALPHA12) - CASE(GL_ALPHA16) - CASE(GL_LUMINANCE4) - CASE(GL_LUMINANCE8) - CASE(GL_LUMINANCE12) - CASE(GL_LUMINANCE16) - CASE(GL_LUMINANCE4_ALPHA4) - CASE(GL_LUMINANCE6_ALPHA2) - CASE(GL_LUMINANCE8_ALPHA8) - CASE(GL_LUMINANCE12_ALPHA4) - CASE(GL_LUMINANCE12_ALPHA12) - CASE(GL_LUMINANCE16_ALPHA16) - CASE(GL_INTENSITY) - CASE(GL_INTENSITY4) - CASE(GL_INTENSITY8) - CASE(GL_INTENSITY12) - CASE(GL_INTENSITY16) - CASE(GL_TEXTURE_LUMINANCE_SIZE) - CASE(GL_TEXTURE_INTENSITY_SIZE) - CASE(GL_TEXTURE_PRIORITY) - CASE(GL_TEXTURE_RESIDENT) - CASE(GL_NORMAL_ARRAY) - CASE(GL_COLOR_ARRAY) - CASE(GL_INDEX_ARRAY) - CASE(GL_TEXTURE_COORD_ARRAY) - CASE(GL_EDGE_FLAG_ARRAY) - CASE(GL_VERTEX_ARRAY_SIZE) - CASE(GL_VERTEX_ARRAY_TYPE) - CASE(GL_VERTEX_ARRAY_STRIDE) - CASE(GL_NORMAL_ARRAY_TYPE) - CASE(GL_NORMAL_ARRAY_STRIDE) - CASE(GL_COLOR_ARRAY_SIZE) - CASE(GL_COLOR_ARRAY_TYPE) - CASE(GL_COLOR_ARRAY_STRIDE) - CASE(GL_INDEX_ARRAY_TYPE) - CASE(GL_INDEX_ARRAY_STRIDE) - CASE(GL_TEXTURE_COORD_ARRAY_SIZE) - CASE(GL_TEXTURE_COORD_ARRAY_TYPE) - CASE(GL_TEXTURE_COORD_ARRAY_STRIDE) - CASE(GL_EDGE_FLAG_ARRAY_STRIDE) - CASE(GL_VERTEX_ARRAY_POINTER) - CASE(GL_NORMAL_ARRAY_POINTER) - CASE(GL_COLOR_ARRAY_POINTER) - CASE(GL_INDEX_ARRAY_POINTER) - CASE(GL_TEXTURE_COORD_ARRAY_POINTER) - CASE(GL_EDGE_FLAG_ARRAY_POINTER) - CASE(GL_V2F) - CASE(GL_V3F) - CASE(GL_C4UB_V2F) - CASE(GL_C4UB_V3F) - CASE(GL_C3F_V3F) - CASE(GL_N3F_V3F) - CASE(GL_C4F_N3F_V3F) - CASE(GL_T2F_V3F) - CASE(GL_T4F_V4F) - CASE(GL_T2F_C4UB_V3F) - CASE(GL_T2F_C3F_V3F) - CASE(GL_T2F_N3F_V3F) - CASE(GL_T2F_C4F_N3F_V3F) - CASE(GL_T4F_C4F_N3F_V4F) - //CASE(GL_VERTEX_ARRAY_EXT) - //CASE(GL_NORMAL_ARRAY_EXT) - //CASE(GL_COLOR_ARRAY_EXT) - //CASE(GL_INDEX_ARRAY_EXT) - //CASE(GL_TEXTURE_COORD_ARRAY_EXT) - //CASE(GL_EDGE_FLAG_ARRAY_EXT) - //CASE(GL_VERTEX_ARRAY_SIZE_EXT) - //CASE(GL_VERTEX_ARRAY_TYPE_EXT) - //CASE(GL_VERTEX_ARRAY_STRIDE_EXT) - CASE(GL_VERTEX_ARRAY_COUNT_EXT) - //CASE(GL_NORMAL_ARRAY_TYPE_EXT) - //CASE(GL_NORMAL_ARRAY_STRIDE_EXT) - CASE(GL_NORMAL_ARRAY_COUNT_EXT) - //CASE(GL_COLOR_ARRAY_SIZE_EXT) - //CASE(GL_COLOR_ARRAY_TYPE_EXT) - //CASE(GL_COLOR_ARRAY_STRIDE_EXT) - CASE(GL_COLOR_ARRAY_COUNT_EXT) - //CASE(GL_INDEX_ARRAY_TYPE_EXT) - //CASE(GL_INDEX_ARRAY_STRIDE_EXT) - CASE(GL_INDEX_ARRAY_COUNT_EXT) - //CASE(GL_TEXTURE_COORD_ARRAY_SIZE_EXT) - //CASE(GL_TEXTURE_COORD_ARRAY_TYPE_EXT) - //CASE(GL_TEXTURE_COORD_ARRAY_STRIDE_EXT) - CASE(GL_TEXTURE_COORD_ARRAY_COUNT_EXT) - //CASE(GL_EDGE_FLAG_ARRAY_STRIDE_EXT) - CASE(GL_EDGE_FLAG_ARRAY_COUNT_EXT) - //CASE(GL_VERTEX_ARRAY_POINTER_EXT) - //CASE(GL_NORMAL_ARRAY_POINTER_EXT) - //CASE(GL_COLOR_ARRAY_POINTER_EXT) - //CASE(GL_INDEX_ARRAY_POINTER_EXT) - //CASE(GL_TEXTURE_COORD_ARRAY_POINTER_EXT) - //CASE(GL_EDGE_FLAG_ARRAY_POINTER_EXT) - //CASE(GL_BGR_EXT) - //CASE(GL_BGRA_EXT) - //CASE(GL_COLOR_TABLE_FORMAT_EXT) - //CASE(GL_COLOR_TABLE_WIDTH_EXT) - //CASE(GL_COLOR_TABLE_RED_SIZE_EXT) - //CASE(GL_COLOR_TABLE_GREEN_SIZE_EXT) - //CASE(GL_COLOR_TABLE_BLUE_SIZE_EXT) - //CASE(GL_COLOR_TABLE_ALPHA_SIZE_EXT) - //CASE(GL_COLOR_TABLE_LUMINANCE_SIZE_EXT) - //CASE(GL_COLOR_TABLE_INTENSITY_SIZE_EXT) - CASE(GL_COLOR_INDEX1_EXT) - CASE(GL_COLOR_INDEX2_EXT) - CASE(GL_COLOR_INDEX4_EXT) - CASE(GL_COLOR_INDEX8_EXT) - CASE(GL_COLOR_INDEX12_EXT) - CASE(GL_COLOR_INDEX16_EXT) - //CASE(GL_MAX_ELEMENTS_VERTICES_WIN) - //CASE(GL_MAX_ELEMENTS_INDICES_WIN) - CASE(GL_PHONG_WIN) - CASE(GL_PHONG_HINT_WIN) - CASE(GL_FOG_SPECULAR_TEXTURE_WIN) - - default: - sprintf(str, "0x%x", value); - return str; - } -#undef CASE - } - - const char* DiligentBlendFactorToString(Diligent::BLEND_FACTOR value) { - static char str[128]; - switch (value) { -#define CASE(value) \ - case value: return #value; - CASE(Diligent::BLEND_FACTOR_UNDEFINED) - CASE(Diligent::BLEND_FACTOR_ZERO) - CASE(Diligent::BLEND_FACTOR_ONE) - CASE(Diligent::BLEND_FACTOR_SRC_COLOR) - CASE(Diligent::BLEND_FACTOR_INV_SRC_COLOR) - CASE(Diligent::BLEND_FACTOR_SRC_ALPHA) - CASE(Diligent::BLEND_FACTOR_INV_SRC_ALPHA) - CASE(Diligent::BLEND_FACTOR_DEST_ALPHA) - CASE(Diligent::BLEND_FACTOR_DEST_COLOR) - CASE(Diligent::BLEND_FACTOR_INV_DEST_COLOR) - CASE(Diligent::BLEND_FACTOR_SRC_ALPHA_SAT) - CASE(Diligent::BLEND_FACTOR_BLEND_FACTOR) - CASE(Diligent::BLEND_FACTOR_INV_BLEND_FACTOR) - CASE(Diligent::BLEND_FACTOR_SRC1_COLOR) - CASE(Diligent::BLEND_FACTOR_INV_SRC1_COLOR) - CASE(Diligent::BLEND_FACTOR_SRC1_ALPHA) - CASE(Diligent::BLEND_FACTOR_INV_SRC1_ALPHA) - - default: - sprintf(str, "0x%x", value); - return str; - } -#undef CASE - } -} - - diff --git a/MG/MG_UTIL/Debug/Debug.h b/MG/MG_UTIL/Debug/Debug.h deleted file mode 100644 index eeb185de..00000000 --- a/MG/MG_UTIL/Debug/Debug.h +++ /dev/null @@ -1,30 +0,0 @@ -// -// Created by BZLZHH on 2025/1/26. -// - -#ifndef MOBILEGL_DEBUG_H -#define MOBILEGL_DEBUG_H - -#define FORCE_SYNC_WITH_LOG_FILE 0 - -namespace MG_Util { - namespace Debug { - const char* GetOSName(); - - void LogD (const char* format, ...); - void LogW (const char* format, ...); - void LogE (const char* format, ...); - void LogI (const char* format, ...); - void LogF (const char* format, ...); - void LogClear(); - void LogInit(); - void LogWrite(const char* format, va_list args); - - const char* GLEnumToString(::GLenum value); - const char* DiligentBlendFactorToString(Diligent::BLEND_FACTOR value); - } -} - -#define MOBILEGL_DEBUG_H - -#endif //MOBILEGL_DEBUG_H diff --git a/MG/MG_UTIL/Program/DebugTool.cpp b/MG/MG_UTIL/Program/DebugTool.cpp deleted file mode 100644 index 77a53c3f..00000000 --- a/MG/MG_UTIL/Program/DebugTool.cpp +++ /dev/null @@ -1,149 +0,0 @@ -// -// Created by BZLZHH on 2025/5/3. -// - -#include "../../Includes.h" - -namespace MG_Util::Program { - std::string GLTypeToString(GLenum type) { - switch(type) { - case GL_FLOAT: return "float"; - case GL_FLOAT_VEC2: return "vec2"; - case GL_FLOAT_VEC3: return "vec3"; - case GL_FLOAT_VEC4: return "vec4"; - case GL_INT: return "int"; - case GL_INT_VEC2: return "ivec2"; - case GL_INT_VEC3: return "ivec3"; - case GL_INT_VEC4: return "ivec4"; - case GL_UNSIGNED_INT: return "uint"; - case GL_UNSIGNED_INT_VEC2: return "uvec2"; - case GL_UNSIGNED_INT_VEC3: return "uvec3"; - case GL_UNSIGNED_INT_VEC4: return "uvec4"; - case GL_BOOL: return "bool"; - case GL_BOOL_VEC2: return "bvec2"; - case GL_BOOL_VEC3: return "bvec3"; - case GL_BOOL_VEC4: return "bvec4"; - case GL_FLOAT_MAT2: return "mat2"; - case GL_FLOAT_MAT3: return "mat3"; - case GL_FLOAT_MAT4: return "mat4"; - case GL_FLOAT_MAT2x3: return "mat2x3"; - case GL_FLOAT_MAT2x4: return "mat2x4"; - case GL_FLOAT_MAT3x2: return "mat3x2"; - case GL_FLOAT_MAT3x4: return "mat3x4"; - case GL_FLOAT_MAT4x2: return "mat4x2"; - case GL_FLOAT_MAT4x3: return "mat4x3"; - case GL_SAMPLER_1D: return "sampler1D"; - case GL_SAMPLER_2D: return "sampler2D"; - case GL_SAMPLER_3D: return "sampler3D"; - case GL_SAMPLER_CUBE: return "samplerCube"; - case GL_SAMPLER_1D_SHADOW: return "sampler1DShadow"; - case GL_SAMPLER_2D_SHADOW: return "sampler2DShadow"; - case GL_SAMPLER_CUBE_SHADOW: return "samplerCubeShadow"; - case GL_SAMPLER_1D_ARRAY: return "sampler1DArray"; - case GL_SAMPLER_2D_ARRAY: return "sampler2DArray"; - case GL_SAMPLER_1D_ARRAY_SHADOW: return "sampler1DArrayShadow"; - case GL_SAMPLER_2D_ARRAY_SHADOW: return "sampler2DArrayShadow"; - case GL_SAMPLER_BUFFER: return "samplerBuffer"; - case GL_SAMPLER_2D_MULTISAMPLE: return "sampler2DMS"; - case GL_SAMPLER_2D_MULTISAMPLE_ARRAY: return "sampler2DMSArray"; - default: return "UnknownType(0x" + std::to_string(type) + ")"; - } - } - - std::string FormatUniformValue(const UniformValue& value) { - std::ostringstream ss; - ss << "["; - - const size_t elemCount = std::min(value.numElements, 16); - - switch(value.type) { - case GL_FLOAT: - case GL_FLOAT_VEC2: - case GL_FLOAT_VEC3: - case GL_FLOAT_VEC4: - case GL_FLOAT_MAT2: - case GL_FLOAT_MAT3: - case GL_FLOAT_MAT4: - case GL_FLOAT_MAT2x3: - case GL_FLOAT_MAT2x4: - case GL_FLOAT_MAT3x2: - case GL_FLOAT_MAT3x4: - case GL_FLOAT_MAT4x2: - case GL_FLOAT_MAT4x3: - for(size_t i=0; i 0) ss << ", "; - ss << (i < value.floatData.size() ? value.floatData[i] : 0.0f); - } - break; - - case GL_INT: - case GL_INT_VEC2: - case GL_INT_VEC3: - case GL_INT_VEC4: - for(size_t i=0; i 0) ss << ", "; - ss << (i < value.intData.size() ? value.intData[i] : 0); - } - break; - - case GL_UNSIGNED_INT: - case GL_UNSIGNED_INT_VEC2: - case GL_UNSIGNED_INT_VEC3: - case GL_UNSIGNED_INT_VEC4: - for(size_t i=0; i 0) ss << ", "; - ss << (i < value.uintData.size() ? value.uintData[i] : 0); - } - break; - - case GL_BOOL: - case GL_BOOL_VEC2: - case GL_BOOL_VEC3: - case GL_BOOL_VEC4: - for(size_t i=0; i 0) ss << ", "; - ss << (i < value.boolData.size() ? (value.boolData[i] ? "true" : "false") : "false"); - } - break; - - default: - ss << "N/A"; - } - - if (value.count > elemCount) ss << ", ..."; - ss << "]"; - return ss.str(); - } - - void DumpUniforms(const ProgramState& state, GLuint program) { - if constexpr (MG_Global::Common::LogLevel > MG_Constants::Common::LOG_LEVEL_DEBUG) - return; - - auto* prog = state.GetProgramObject(program); - if (!prog->linked.toBool()) { - MG_Util::Debug::LogE("Program %u not linked", program); - return; - } - MG_Util::Debug::LogD("=== Dumping uniforms for program %u ===", program); - for(const auto& [name, loc] : prog->uniformLocations) { - const auto& value = prog->uniformValues.at(name); - MG_Util::Debug::LogD("Uniform: %-24s Location: %-4d Type: %-16s Count: %-3d Value: %s", - name.c_str(), - loc, - GLTypeToString(value.type).c_str(), - value.count, - FormatUniformValue(value).c_str()); - } - } - - void DumpCurrentUniforms(const ProgramState& state) { - if (MG_Global::Common::LogLevel > MG_Constants::Common::LOG_LEVEL_DEBUG) - return; - - GLuint current = state.GetCurrentProgram(); - if (current == 0) { - return; - } - DumpUniforms(state, current); - } -} \ No newline at end of file diff --git a/MG/MG_UTIL/Program/DebugTool.h b/MG/MG_UTIL/Program/DebugTool.h deleted file mode 100644 index 74bcc9ff..00000000 --- a/MG/MG_UTIL/Program/DebugTool.h +++ /dev/null @@ -1,15 +0,0 @@ -// -// Created by BZLZHH on 2025/5/3. -// - -#ifndef MOBILEGL_PROGRAM_DEBUGTOOL_H -#define MOBILEGL_PROGRAM_DEBUGTOOL_H - -namespace MG_Util::Program { - std::string GLTypeToString(GLenum type); - std::string FormatUniformValue(const UniformValue& value); - void DumpUniforms(const ProgramState& state, GLuint program); - void DumpCurrentUniforms(const ProgramState& state); -} - -#endif //MOBILEGL_PROGRAM_DEBUGTOOL_H diff --git a/MG/MG_UTIL/Program/GLSLTool.cpp b/MG/MG_UTIL/Program/GLSLTool.cpp deleted file mode 100644 index 80841cf7..00000000 --- a/MG/MG_UTIL/Program/GLSLTool.cpp +++ /dev/null @@ -1,1162 +0,0 @@ -// -// Created by BZLZHH on 2025/5/3. -// - -#include "../../Includes.h" - -namespace MG_Util::Program { - void RenameGLSLBuiltinsForVulkan(std::string &src) { -// static const std::vector> rules = { -// { std::regex(R"(gl_VertexID)"), "gl_VertexIndex" }, -// { std::regex(R"(gl_InstanceID)"), "gl_InstanceIndex" } -// }; -// -// for (auto &rule : rules) { -// src = std::regex_replace(src, rule.first, rule.second); -// } - size_t pos = src.find("gl_VertexID"); - if (pos != std::string::npos) { - src.replace(pos, strlen("gl_VertexID"), "gl_VertexIndex"); - } - - pos = src.find("gl_InstanceID"); - if (pos != std::string::npos) { - src.replace(pos, strlen("gl_InstanceID"), "gl_InstanceIndex"); - } - } - - std::string BindInputLayoutLocationsForGLSL( - std::vector& spirv, - MG_Global::unordered_map& name_location_map) - { - spvc_context context = nullptr; - spvc_parsed_ir ir = nullptr; - spvc_compiler compiler = nullptr; - spvc_resources resources = nullptr; - spvc_result result = SPVC_SUCCESS; - const char* glsl_source = nullptr; - std::string output_glsl; - - if ((result = spvc_context_create(&context)) != SPVC_SUCCESS) - { - MG_Util::Debug::LogE("[SPIRV-Cross] Failed to create context."); - return {}; - } - - if ((result = spvc_context_parse_spirv(context, - spirv.data(), - spirv.size(), - &ir)) != SPVC_SUCCESS) - { - spvc_context_destroy(context); - MG_Util::Debug::LogE("[SPIRV-Cross] Failed to parse SPIR-V."); - return {}; - } - - if ((result = spvc_context_create_compiler( - context, - SPVC_BACKEND_GLSL, - ir, - SPVC_CAPTURE_MODE_TAKE_OWNERSHIP, - &compiler)) != SPVC_SUCCESS) - { - spvc_context_destroy(context); - MG_Util::Debug::LogE("[SPIRV-Cross] Failed to create compiler."); - return {}; - } - - if ((result = spvc_compiler_create_shader_resources(compiler, &resources)) != SPVC_SUCCESS) - { - spvc_context_destroy(context); - MG_Util::Debug::LogE("[SPIRV-Cross] Failed to create shader resources."); - return {}; - } - - const spvc_reflected_resource* inputs = nullptr; - size_t num_inputs = 0; - if ((result = spvc_resources_get_resource_list_for_type( - resources, - SPVC_RESOURCE_TYPE_STAGE_INPUT, - &inputs, - &num_inputs)) != SPVC_SUCCESS) - { - spvc_context_destroy(context); - MG_Util::Debug::LogE("[SPIRV-Cross] Failed to get stage inputs."); - return {}; - } - - std::unordered_map name_to_id; - for (size_t i = 0; i < num_inputs; ++i) - { - name_to_id[inputs[i].name] = inputs[i].id; - } - - std::unordered_set used_locations; - - for (auto& kv : name_location_map) - { - const auto& name = kv.first; - GLint loc = kv.second; - auto it = name_to_id.find(name); - if (it == name_to_id.end()) - { - MG_Util::Debug::LogW("[SPIRV-Cross] Input name not found: %s", name.c_str()); - continue; - } - - spvc_compiler_set_decoration( - compiler, - it->second, - SpvDecorationLocation, - loc); - - used_locations.insert(loc); - } - - GLint next_free_loc = 0; - for (size_t i = 0; i < num_inputs; ++i) - { - auto& res = inputs[i]; - const auto& name = res.name; - auto var_id = res.id; - - if (name_location_map.find(name) != name_location_map.end()) - continue; - - uint32_t curr_loc = 0; - bool has_loc = false; - curr_loc = spvc_compiler_get_decoration(compiler, var_id, SpvDecorationLocation); - if (spvc_compiler_has_decoration(compiler, var_id, SpvDecorationLocation)) - has_loc = true; - - if (has_loc && !used_locations.contains(curr_loc)) - { - used_locations.insert((GLint)curr_loc); - continue; - } - - while (used_locations.count(next_free_loc)) - ++next_free_loc; - - spvc_compiler_set_decoration( - compiler, - var_id, - SpvDecorationLocation, - next_free_loc); - - MG_Util::Debug::LogI("[SPIRV-Cross] Auto assigned '%s' to location %d", name, next_free_loc); - used_locations.insert(next_free_loc); - } - - spvc_compiler_options options = nullptr; - spvc_compiler_create_compiler_options(compiler, &options); - spvc_compiler_options_set_uint(options, SPVC_COMPILER_OPTION_GLSL_VERSION, 450); - spvc_compiler_options_set_bool(options, SPVC_COMPILER_OPTION_GLSL_ES, SPVC_FALSE); - spvc_compiler_options_set_bool(options, SPVC_COMPILER_OPTION_FLIP_VERTEX_Y, SPVC_TRUE); - spvc_compiler_install_compiler_options(compiler, options); - - if ((result = spvc_compiler_compile(compiler, &glsl_source)) != SPVC_SUCCESS) - { - MG_Util::Debug::LogE("[SPIRV-Cross] Failed to compile: %s", - spvc_context_get_last_error_string(context)); - spvc_context_destroy(context); - return {}; - } - - output_glsl = glsl_source; - spvc_context_destroy(context); - MG_Util::Debug::LogI("[SPIRV-Cross] GLSL output:\n%s", output_glsl.c_str()); - - size_t pos = output_glsl.find("\n gl_Position.y = -gl_Position.y;\n}"); - if (pos != std::string::npos) - { - output_glsl.replace( - pos, - strlen("\n gl_Position.y = -gl_Position.y;\n}"), - "\n gl_Position.y = -gl_Position.y;\n gl_Position.z = (gl_Position.z + gl_Position.w) * 0.5;\n}"); - } - - return output_glsl; - } - - - static std::vector buildCommentMask(const std::string &src) { - enum State { - NORMAL, - LINE_COMMENT, - BLOCK_COMMENT, - STRING_LITERAL, - CHAR_LITERAL - }; - - std::vector isComment(src.size(), false); - State state = NORMAL; - - for (size_t i = 0; i < src.size(); ++i) { - switch (state) { - case NORMAL: - if (i + 1 < src.size() && src[i] == '/' && src[i + 1] == '/') { - state = LINE_COMMENT; - isComment[i] = true; - isComment[i + 1] = true; - ++i; - } - else if (i + 1 < src.size() && src[i] == '/' && src[i + 1] == '*') { - state = BLOCK_COMMENT; - isComment[i] = true; - isComment[i + 1] = true; - ++i; - } - else if (src[i] == '"') { - state = STRING_LITERAL; - } - else if (src[i] == '\'') { - state = CHAR_LITERAL; - } - break; - - case LINE_COMMENT: - isComment[i] = true; - if (src[i] == '\n') { - state = NORMAL; - } - break; - - case BLOCK_COMMENT: - isComment[i] = true; - if (i + 1 < src.size() && src[i] == '*' && src[i + 1] == '/') { - isComment[i + 1] = true; - state = NORMAL; - ++i; - } - break; - - case STRING_LITERAL: - if (src[i] == '\\' && (i + 1 < src.size())) { - i++; - } - else if (src[i] == '"') { - state = NORMAL; - } - break; - - case CHAR_LITERAL: - if (src[i] == '\\' && (i + 1 < src.size())) { - i++; - } - else if (src[i] == '\'') { - state = NORMAL; - } - break; - } - } - - return isComment; - } - - static bool isPreprocessorLine(const std::string &src, size_t pos) { - size_t lineStart = src.rfind('\n', pos); - if (lineStart == std::string::npos) { - lineStart = 0; - } else { - lineStart += 1; - } - size_t firstNonSpace = src.find_first_not_of(" \t\r\n", lineStart); - if (firstNonSpace != std::string::npos && src[firstNonSpace] == '#') { - return true; - } - return false; - } - - static inline bool isInComment(const std::vector &mask, size_t pos) { - if (pos >= mask.size()) return false; - return mask[pos]; - } - - static inline void leftTrim(std::string &s) { - s.erase(s.begin(), std::find_if(s.begin(), s.end(), [](unsigned char ch) { - return !std::isspace(ch); - })); - } - static inline void rightTrim(std::string &s) { - s.erase(std::find_if(s.rbegin(), s.rend(), [](unsigned char ch) { - return !std::isspace(ch); - }).base(), s.end()); - } - static inline void trim(std::string &s) { - leftTrim(s); - rightTrim(s); - } - static size_t findNextNonSpace(const std::string& str, size_t pos) { - return str.find_first_not_of(" \t\r\n", pos); - } - - static std::string extractVarNameFromUniformDecl(const std::string& decl) { - const std::regex layoutRegex(R"(\s*layout\s*\([^)]*\))"); - std::string declNoLayout = std::regex_replace(decl, layoutRegex, ""); - - size_t uniformPos = declNoLayout.find("uniform"); - if (uniformPos != std::string::npos) { - declNoLayout = declNoLayout.substr(uniformPos + 7); - } - trim(declNoLayout); - - size_t semiPos = declNoLayout.rfind(';'); - if (semiPos != std::string::npos) { - declNoLayout = declNoLayout.substr(0, semiPos); - } - trim(declNoLayout); - - size_t lastSpace = declNoLayout.find_last_of(" \t\r\n"); - if (lastSpace == std::string::npos) { - return declNoLayout; - } - - std::string candidate = declNoLayout.substr(lastSpace + 1); - size_t bracketPos = candidate.find('['); - if (bracketPos != std::string::npos) { - candidate = candidate.substr(0, bracketPos); - } - - return candidate; - } - - std::pair GenerateDefaultUBOForGLSL(const std::pair& glslSources) { - std::string source1 = glslSources.first; - std::string source2 = glslSources.second; - - std::vector commentMask1 = buildCommentMask(source1); - std::vector commentMask2 = buildCommentMask(source2); - - const std::regex layoutRegex(R"(\s*layout\s*\([^)]*\))"); - std::set allUniformNames; - std::vector mergedUniforms; - std::vector> removalSpans1; - std::vector> removalSpans2; - - auto processSource = [&](std::string& source, const std::vector& commentMask, - std::vector>& removalSpans, - bool isFirstSource) - { - size_t searchPos = 0; - while ((searchPos = source.find("uniform", searchPos)) != std::string::npos) { - if (isInComment(commentMask, searchPos)) { - searchPos++; - continue; - } - - if (isPreprocessorLine(source, searchPos)) { - searchPos++; - continue; - } - - if (searchPos > 0 && (std::isalnum(source[searchPos - 1]) || source[searchPos - 1] == '_')) { - searchPos++; - continue; - } - - size_t nextCharPos = findNextNonSpace(source, searchPos + 7); - if (nextCharPos == std::string::npos) break; - - if (source[nextCharPos] == '{') { - searchPos = nextCharPos + 1; - continue; - } - - size_t bracePos = source.find('{', nextCharPos); - size_t semicolonPos = source.find(';', nextCharPos); - if (bracePos != std::string::npos && (semicolonPos == std::string::npos || bracePos < semicolonPos)) { - searchPos = bracePos + 1; - continue; - } - - if (semicolonPos == std::string::npos) { - searchPos++; - continue; - } - - size_t declStart = searchPos; - size_t declLength = semicolonPos - searchPos + 1; - std::string declaration = source.substr(declStart, declLength); - - std::string declNoLayout = std::regex_replace(declaration, layoutRegex, ""); - std::string afterUniform = declNoLayout.substr(declNoLayout.find("uniform") + 7); - trim(afterUniform); - size_t sep = afterUniform.find_first_of(" \t\r\n["); - std::string typeToken = (sep == std::string::npos ? afterUniform : afterUniform.substr(0, sep)); - bool isSamplerOrImage = false; - if (typeToken.rfind("sampler", 0) == 0 || - typeToken.rfind("isampler", 0) == 0 || - typeToken.rfind("usampler", 0) == 0 || - typeToken.rfind("image", 0) == 0) - { - isSamplerOrImage = true; - } - if (isSamplerOrImage) { - searchPos = declStart + declLength; - continue; - } - - std::string varName = extractVarNameFromUniformDecl(declaration); - - if (isFirstSource) { - mergedUniforms.push_back(declaration); - allUniformNames.insert(varName); - } else { - if (allUniformNames.find(varName) == allUniformNames.end()) { - mergedUniforms.push_back(declaration); - allUniformNames.insert(varName); - } - } - - size_t removeStart = declStart; - { - size_t scanBack = declStart; - while (scanBack > 0 && std::isspace((unsigned char)source[scanBack - 1])) { - scanBack--; - } - if (scanBack >= 6) { - size_t maybeLayout = source.rfind("layout", scanBack - 6); - if (maybeLayout != std::string::npos) { - size_t parenOpen = source.find('(', maybeLayout + 6); - if (parenOpen != std::string::npos && parenOpen < scanBack) { - size_t parenClose = source.find(')', parenOpen); - if (parenClose != std::string::npos && parenClose < declStart) { - std::string between = source.substr(maybeLayout, declStart - maybeLayout); - const std::regex onlyLayout(R"(layout\s*\([^)]*\)\s*)"); - if (std::regex_match(between, onlyLayout)) { - removeStart = maybeLayout; - } - } - } - } - } - } - removalSpans.emplace_back(removeStart, (declStart + declLength) - removeStart); - - searchPos = declStart + declLength; - } - }; - - processSource(source1, commentMask1, removalSpans1, true); - processSource(source2, commentMask2, removalSpans2, false); - - if (mergedUniforms.empty()) { - return glslSources; - } - - std::sort(removalSpans1.rbegin(), removalSpans1.rend()); - for (auto &span : removalSpans1) { - source1.erase(span.first, span.second); - } - source1 = std::regex_replace(source1, std::regex(R"((\r\n|\n|\r){2,})"), "$1"); - - std::sort(removalSpans2.rbegin(), removalSpans2.rend()); - for (auto &span : removalSpans2) { - source2.erase(span.first, span.second); - } - source2 = std::regex_replace(source2, std::regex(R"((\r\n|\n|\r){2,})"), "$1"); - - std::string uboBlock = "\nlayout(std140) uniform MG_DEFAULT_UBO\n{\n"; - for (auto &decl : mergedUniforms) { - std::string cleaned = std::regex_replace(decl, layoutRegex, ""); - std::string memberDecl = cleaned.substr(cleaned.find("uniform") + 7); - size_t semiPos = memberDecl.rfind(';'); - if (semiPos != std::string::npos) { - memberDecl.erase(semiPos); - } - trim(memberDecl); - uboBlock += " " + memberDecl + ";\n"; - } - uboBlock += "};\n"; - - auto insertUBO = [&](std::string& source) { - size_t insertPos = 0, lastDirectivePos = 0; - size_t searchPos = 0; - while ((searchPos = source.find('#', searchPos)) != std::string::npos) { - if (isInComment(commentMask1, searchPos)) { - searchPos++; - continue; - } - - size_t eol = source.find('\n', searchPos); - if (eol == std::string::npos) break; - std::string line = source.substr(searchPos, eol - searchPos); - if (line.find("#version") != std::string::npos || line.find("#extension") != std::string::npos) { - lastDirectivePos = eol + 1; - } - searchPos = eol + 1; - } - insertPos = lastDirectivePos; - source.insert(insertPos, uboBlock); - }; - - insertUBO(source1); - insertUBO(source2); - - return {source1, source2}; - } - - void GenerateDefaultUBOForGLSL_Multi( - MG_Global::unordered_map &shaderSources, std::vector& outUniformBufferNames) { - if (shaderSources.empty()) return; - - outUniformBufferNames.clear(); - - std::unordered_map> commentMasks; - for (auto const& [id, source] : shaderSources) { - commentMasks[id] = buildCommentMask(source); - } - - const std::regex layoutRegex(R"(\s*layout\s*\([^)]*\))"); - std::set allUniformNames; - std::vector mergedUniforms; - std::unordered_map>> removalSpansPerShader; - - for (auto& [id, source] : shaderSources) { - std::vector& commentMask = commentMasks[id]; - // Ensure an entry exists for this shader ID, even if no uniforms are found - auto& removalSpans = removalSpansPerShader[id]; - - size_t searchPos = 0; - while ((searchPos = source.find("uniform", searchPos)) != std::string::npos) { - if (isInComment(commentMask, searchPos)) { - searchPos++; - continue; - } - - if (isPreprocessorLine(source, searchPos)) { - searchPos++; - continue; - } - - if (searchPos > 0 && (std::isalnum(source[searchPos - 1]) || - source[searchPos - 1] == '_')) { - searchPos++; - continue; - } - - size_t nextCharPos = findNextNonSpace(source, searchPos + 7); - if (nextCharPos == std::string::npos) break; - - if (source[nextCharPos] == '{') { - searchPos = nextCharPos + 1; - continue; - } - - size_t bracePos = source.find('{', nextCharPos); - size_t semicolonPos = source.find(';', nextCharPos); - if (bracePos != std::string::npos && - (semicolonPos == std::string::npos || bracePos < semicolonPos)) { - searchPos = bracePos + 1; - continue; - } - - if (semicolonPos == std::string::npos) { - searchPos++; - continue; - } - - size_t declStart = searchPos; - size_t declLength = semicolonPos - searchPos + 1; - std::string declaration = source.substr(declStart, declLength); - - std::string declNoLayout = std::regex_replace(declaration, layoutRegex, ""); - std::string afterUniform = declNoLayout.substr(declNoLayout.find("uniform") + 7); - trim(afterUniform); - size_t sep = afterUniform.find_first_of(" \t\r\n["); - std::string typeToken = (sep == std::string::npos ? afterUniform : afterUniform.substr(0, sep)); - bool isSamplerOrImage = - typeToken.rfind("sampler", 0) == 0 || - typeToken.rfind("isampler", 0) == 0 || - typeToken.rfind("usampler", 0) == 0 || - typeToken.rfind("image", 0) == 0; - - if (isSamplerOrImage) { - searchPos = declStart + declLength; - continue; - } - - std::string varName = extractVarNameFromUniformDecl(declaration); - if (allUniformNames.find(varName) == allUniformNames.end()) { - mergedUniforms.push_back(declaration); - allUniformNames.insert(varName); - // save the uniform names in order - outUniformBufferNames.emplace_back(varName); - } - - size_t removeStart = declStart; - size_t scanBack = declStart; - while (scanBack > 0 && std::isspace(static_cast(source[scanBack - 1]))) { - scanBack--; - } - if (scanBack >= 6) { - size_t maybeLayout = source.rfind("layout", scanBack - 6); - if (maybeLayout != std::string::npos) { - size_t parenOpen = source.find('(', maybeLayout + 6); - if (parenOpen != std::string::npos && parenOpen < scanBack) { - size_t parenClose = source.find(')', parenOpen); - if (parenClose != std::string::npos && parenClose < declStart) { - std::string between = source.substr(maybeLayout, declStart - maybeLayout); - const std::regex onlyLayout(R"(layout\s*\([^)]*\)\s*)"); - if (std::regex_match(between, onlyLayout)) { - removeStart = maybeLayout; - } - } - } - } - } - removalSpans.emplace_back(removeStart, (declStart + declLength) - removeStart); - searchPos = declStart + declLength; - } - } - - if (mergedUniforms.empty()) return; - - for (auto& [id, source] : shaderSources) { - auto& removalSpans = removalSpansPerShader[id]; - std::sort(removalSpans.rbegin(), removalSpans.rend()); - for (auto& span : removalSpans) { - source.erase(span.first, span.second); - } - } - - std::string uboBlock = "\nlayout(std140) uniform MG_DEFAULT_UBO\n{\n"; - for (auto& decl : mergedUniforms) { - std::string cleaned = std::regex_replace(decl, layoutRegex, ""); - std::string memberDecl = cleaned.substr(cleaned.find("uniform") + 7); - size_t semiPos = memberDecl.rfind(';'); - if (semiPos != std::string::npos) { - memberDecl.erase(semiPos); - } - trim(memberDecl); - uboBlock += " " + memberDecl + ";\n"; - } - uboBlock += "};\n"; - - MG_Util::Debug::LogD("UBO Generated:\n%s", uboBlock.c_str()); - - for (auto& [id, source] : shaderSources) { - size_t insertPos = 0, lastDirectivePos = 0; - size_t searchPos = 0; - while ((searchPos = source.find('#', searchPos)) != std::string::npos) { - if (isInComment(commentMasks[id], searchPos)) { - searchPos++; - continue; - } - - size_t eol = source.find('\n', searchPos); - if (eol == std::string::npos) break; - std::string line = source.substr(searchPos, eol - searchPos); - if (line.find("#version") != std::string::npos || - line.find("#extension") != std::string::npos) { - lastDirectivePos = eol + 1; - } - searchPos = eol + 1; - } - insertPos = lastDirectivePos; - source.insert(insertPos, uboBlock); - } - } - - std::string CompileGLSLToTShader(GLenum shaderType, const std::string& source, - glslang::TShader *&shader, bool isVkGLSL) { - std::string infoLog; - using namespace glslang; - - int glslVersion = QueryGLSLVersion(source); - EShLanguage language = GetEShLanguageByShaderType(shaderType); - if (language == EShLanguage::EShLangCount) { - infoLog += "Error: [Preprocess] Unsupported shader type: " + - std::to_string(shaderType); - TShader tmpShader(EShLanguage::EShLangVertex); - return infoLog; - } - - shader = new TShader(language); - const char *src = source.c_str(); - shader->setStrings(&src, 1); - if (isVkGLSL) { - shader->setPreamble("#define gl_VertexID gl_VertexIndex\n" - "#define gl_InstanceID gl_InstanceIndex\n"); - } - shader->setEnvInput(EShSourceGlsl, language, EShClientVulkan, glslVersion); - shader->setEnvClient(EShClientOpenGL, isVkGLSL ? EShTargetVulkan_1_3 : EShTargetOpenGL_450); - shader->setEnvTarget(EShTargetSpv, EShTargetSpv_1_6); - shader->setAutoMapLocations(true); - shader->setAutoMapBindings(true); - - // Is InitResources() really correct? - TBuiltInResource resources = InitResources(); - - if (!shader->parse(&resources, glslVersion, true, isVkGLSL ? EShMsgVulkanRules : EShMsgDefault)) { - infoLog += "Error: [glslang] Cannot compile the " + GetShaderTypeName(shaderType) + ":\n" - + std::to_string(shader->getInfoLog()); - return infoLog; - } - - return {}; - } - - std::vector> CompileMultipleShadersToSPIRV(const ProgramState& state, ProgramObject& prog, std::string& infoLog) { - using namespace glslang; - - std::vector usedShaderTypes; - TProgram program; - for (GLuint shaderId : prog.attachedShaders) { - auto* shaderObject = state.GetShaderObject(shaderId); - EShLanguage shLanguage = GetEShLanguageByShaderType(shaderObject->type); - TShader* shader = nullptr; - std::string infoLogOfShader = CompileGLSLToTShader(shaderObject->type, shaderObject->source, shader); - if (!infoLogOfShader.empty()) { - infoLog = "Error: [glslang] Cannot compile " + GetShaderTypeName(shaderObject->type) + - " :\n" + infoLogOfShader; - return {}; - } - program.addShader(shader); - usedShaderTypes.push_back(shLanguage); - } - if (!program.link(EShMsgDefault)) { - infoLog = "Error: [glslang] Cannot link the program:\n" + std::to_string(program.getInfoLog()); - return {}; - } - - std::unique_ptr resolver; - for (unsigned stage = 0; stage < EShLangCount; stage++) { - auto* pResolver = program.getGlslIoResolver((EShLanguage)stage); - if (pResolver) { - resolver = std::unique_ptr(pResolver); - break; - } - } - auto ioMapper = std::unique_ptr(glslang::GetGlslIoMapper()); - - if (!program.mapIO(resolver.get(), ioMapper.get())) { - infoLog = "Error: [glslang] Cannot mapIO:\n" + std::to_string(program.getInfoLog()); - return {}; - } - - SpvOptions spvOptions; - spvOptions.disableOptimizer = false; - - std::vector> allSpirv; - for(auto type : usedShaderTypes) { - std::vector spirv; - GlslangToSpv(*program.getIntermediate(type), spirv, &spvOptions); - allSpirv.push_back(spirv); - } - - return allSpirv; - } - - std::vector CompileGLSLToSPIRV(GLenum shaderType, const std::string &source, - std::string &infoLog, bool isVkGLSL, GLenum additionalShaderType, - const std::string& additionalShaderSource - ) { - using namespace glslang; - - TShader* shader = nullptr; - std::string infoLogOfShader = CompileGLSLToTShader(shaderType, source, shader, isVkGLSL); - if (!infoLogOfShader.empty()) { - infoLog = "Error: [glslang] Cannot compile " + GetShaderTypeName(shaderType) + ":\n" + infoLogOfShader; - return {}; - } - TProgram program; - - if (additionalShaderType == GL_VERTEX_SHADER) - program.addShader(shader); - if (additionalShaderType && !additionalShaderSource.empty()) { - TShader* additionalShader = nullptr; - std::string additionalInfoLog = CompileGLSLToTShader(additionalShaderType, additionalShaderSource, additionalShader, isVkGLSL); - if (!additionalInfoLog.empty()) { - infoLog = "Error: [glslang] Cannot compile additional " + GetShaderTypeName(additionalShaderType) + ":\n" + additionalInfoLog; - return {}; - } - program.addShader(additionalShader); - } - if (additionalShaderType != GL_VERTEX_SHADER) - program.addShader(shader); - - if (!program.link(isVkGLSL ? EShMsgVulkanRules : EShMsgDefault)) { - infoLog = "Error: [glslang] Cannot link the program of the single shader:\n" + std::to_string(program.getInfoLog()); - return {}; - } - program.mapIO(); - - std::vector spirv; - - SpvOptions spvOptions; - spvOptions.disableOptimizer = false; - EShLanguage language = GetEShLanguageByShaderType(shaderType); - GlslangToSpv(*program.getIntermediate(language), spirv, &spvOptions); - - return spirv; - } - - void ReflectSPIRVUniforms(const std::vector>& allSpirv, ProgramObject& prog, std::string& infoLog) { - spvc_context context = nullptr; - - if (spvc_context_create(&context) != SPVC_SUCCESS) { - infoLog = "Failed to create SPIRV-Cross context"; - return; - } - - MG_Global::unordered_set used_locations; - GLint auto_location = 0; - for (auto spirv: allSpirv) { - spvc_parsed_ir ir = nullptr; - spvc_compiler compiler = nullptr; - spvc_resources resources = nullptr; - - spvc_result result = spvc_context_parse_spirv(context, spirv.data(), spirv.size(), &ir); - if (result != SPVC_SUCCESS) { - infoLog = "SPIR-V parsing failed"; - spvc_context_destroy(context); - return; - } - - result = spvc_context_create_compiler(context, SPVC_BACKEND_GLSL, ir, - SPVC_CAPTURE_MODE_TAKE_OWNERSHIP, &compiler); - if (result != SPVC_SUCCESS) { - infoLog = "Failed to create SPIRV-Cross compiler"; - spvc_context_destroy(context); - return; - } - - result = spvc_compiler_create_shader_resources(compiler, &resources); - if (result != SPVC_SUCCESS) { - infoLog = "Failed to get shader resources"; - spvc_context_destroy(context); - return; - } - - const spvc_reflected_resource *uniform_buffers = nullptr; - const spvc_reflected_resource *uniform_vars = nullptr; - const spvc_reflected_resource *sampled_images = nullptr; - size_t uniform_buffer_count = 0; - size_t uniform_var_count = 0; - size_t sampled_image_count = 0; - - spvc_resources_get_resource_list_for_type(resources, SPVC_RESOURCE_TYPE_UNIFORM_BUFFER, - &uniform_buffers, &uniform_buffer_count); - spvc_resources_get_resource_list_for_type(resources, - SPVC_RESOURCE_TYPE_GL_PLAIN_UNIFORM, - &uniform_vars, &uniform_var_count); - spvc_resources_get_resource_list_for_type(resources, SPVC_RESOURCE_TYPE_SAMPLED_IMAGE, - &sampled_images, &sampled_image_count); - - std::vector all_resources; - for (size_t i = 0; i < uniform_buffer_count; ++i) - all_resources.push_back(&uniform_buffers[i]); - for (size_t i = 0; i < uniform_var_count; ++i) - all_resources.push_back(&uniform_vars[i]); - for (size_t i = 0; i < sampled_image_count; ++i) - all_resources.push_back(&sampled_images[i]); - - for (const auto res_ptr: all_resources) { - const spvc_reflected_resource &res = *res_ptr; - const char *name = res.name; - if (name[0] == '_') continue; - - unsigned spirv_location = spvc_compiler_get_decoration(compiler, res.id, - SpvDecorationLocation); - GLint final_location; - - spvc_type_id type_id = res.type_id; - spvc_type type = spvc_compiler_get_type_handle(compiler, type_id); - spvc_basetype base_type = spvc_type_get_basetype(type); - GLenum gl_type = GL_NONE; - - if (spirv_location >= 0 && base_type != SPVC_BASETYPE_SAMPLED_IMAGE) { - auto conflict_it = used_locations.find(spirv_location); - if (conflict_it != used_locations.end()) { - // Check if the conflicting uniform is a sampler - std::string conflicting_name; - for (const auto& entry : prog.uniformLocations) { - if (entry.second == spirv_location) { - conflicting_name = entry.first; - break; - } - } - if(conflicting_name == std::string(name)) { - continue; - } else if (!conflicting_name.empty() && prog.uniformValues.count(conflicting_name) && - MG_GL::GL::IsSamplerType(prog.uniformValues[conflicting_name].type)) { - // Reassign location for the sampler - GLint new_sampler_loc = auto_location++; - while (used_locations.find(new_sampler_loc) != used_locations.end()) new_sampler_loc++; - prog.uniformLocations[conflicting_name] = new_sampler_loc; - used_locations.erase(conflict_it); // Remove old sampler location - used_locations.insert(new_sampler_loc); // Add new sampler location - } else { - infoLog += "\nLocation conflict for uniform: " + std::string(name) + " at location " + std::to_string(spirv_location); - infoLog += "\nExisting uniforms and locations:"; - for (const auto& entry : prog.uniformLocations) { - infoLog += "\n " + entry.first + ": " + std::to_string(entry.second); - } - infoLog += "\nUsed locations set:"; - for (GLint loc : used_locations) infoLog += " " + std::to_string(loc); - continue; - } - } - final_location = spirv_location; - } else { - while (used_locations.find(auto_location) != used_locations.end()) { - auto_location++; - } - final_location = auto_location; - } - - used_locations.insert(final_location); - - if (base_type == SPVC_BASETYPE_SAMPLED_IMAGE) { - SpvDim dim = spvc_type_get_image_dimension(type); - bool is_array = spvc_type_get_image_arrayed(type); - bool is_shadow = spvc_type_get_image_is_depth(type); - bool is_ms = spvc_type_get_image_multisampled(type); - - switch (dim) { - case SpvDim1D: - gl_type = is_array ? GL_SAMPLER_1D_ARRAY : GL_SAMPLER_1D; - if (is_shadow) - gl_type = is_array ? GL_SAMPLER_1D_ARRAY_SHADOW - : GL_SAMPLER_1D_SHADOW; - break; - case SpvDim2D: - if (is_ms) { - gl_type = is_array ? GL_SAMPLER_2D_MULTISAMPLE_ARRAY - : GL_SAMPLER_2D_MULTISAMPLE; - } else { - gl_type = is_array ? GL_SAMPLER_2D_ARRAY : GL_SAMPLER_2D; - if (is_shadow) - gl_type = is_array ? GL_SAMPLER_2D_ARRAY_SHADOW - : GL_SAMPLER_2D_SHADOW; - } - break; - case SpvDim3D: - gl_type = GL_SAMPLER_3D; - break; - case SpvDimCube: - gl_type = is_array ? GL_SAMPLER_CUBE_MAP_ARRAY : GL_SAMPLER_CUBE; - if (is_shadow) - gl_type = is_array ? GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW - : GL_SAMPLER_CUBE_SHADOW; - break; - case SpvDimRect: - gl_type = is_shadow ? GL_SAMPLER_2D_RECT_SHADOW : GL_SAMPLER_2D_RECT; - break; - case SpvDimBuffer: - gl_type = GL_SAMPLER_BUFFER; - break; - default: - gl_type = GL_SAMPLER_2D; - } - - spvc_basetype sampled_base = spvc_type_get_basetype(type); - if (sampled_base == SPVC_BASETYPE_INT32) { - switch (gl_type) { - case GL_SAMPLER_1D: - gl_type = GL_INT_SAMPLER_1D; - break; - case GL_SAMPLER_2D: - gl_type = GL_INT_SAMPLER_2D; - break; - case GL_SAMPLER_3D: - gl_type = GL_INT_SAMPLER_3D; - break; - case GL_SAMPLER_CUBE: - gl_type = GL_INT_SAMPLER_CUBE; - break; - case GL_SAMPLER_1D_ARRAY: - gl_type = GL_INT_SAMPLER_1D_ARRAY; - break; - case GL_SAMPLER_2D_ARRAY: - gl_type = GL_INT_SAMPLER_2D_ARRAY; - break; - case GL_SAMPLER_CUBE_MAP_ARRAY: - gl_type = GL_INT_SAMPLER_CUBE_MAP_ARRAY; - break; - case GL_SAMPLER_2D_RECT: - gl_type = GL_INT_SAMPLER_2D_RECT; - break; - case GL_SAMPLER_BUFFER: - gl_type = GL_INT_SAMPLER_BUFFER; - break; - case GL_SAMPLER_2D_MULTISAMPLE: - gl_type = GL_INT_SAMPLER_2D_MULTISAMPLE; - break; - case GL_SAMPLER_2D_MULTISAMPLE_ARRAY: - gl_type = GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY; - break; - } - } else if (sampled_base == SPVC_BASETYPE_UINT32) { - switch (gl_type) { - case GL_SAMPLER_1D: - gl_type = GL_UNSIGNED_INT_SAMPLER_1D; - break; - case GL_SAMPLER_2D: - gl_type = GL_UNSIGNED_INT_SAMPLER_2D; - break; - case GL_SAMPLER_3D: - gl_type = GL_UNSIGNED_INT_SAMPLER_3D; - break; - case GL_SAMPLER_CUBE: - gl_type = GL_UNSIGNED_INT_SAMPLER_CUBE; - break; - case GL_SAMPLER_1D_ARRAY: - gl_type = GL_UNSIGNED_INT_SAMPLER_1D_ARRAY; - break; - case GL_SAMPLER_2D_ARRAY: - gl_type = GL_UNSIGNED_INT_SAMPLER_2D_ARRAY; - break; - case GL_SAMPLER_CUBE_MAP_ARRAY: - gl_type = GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY; - break; - case GL_SAMPLER_2D_RECT: - gl_type = GL_UNSIGNED_INT_SAMPLER_2D_RECT; - break; - case GL_SAMPLER_BUFFER: - gl_type = GL_UNSIGNED_INT_SAMPLER_BUFFER; - break; - case GL_SAMPLER_2D_MULTISAMPLE: - gl_type = GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE; - break; - case GL_SAMPLER_2D_MULTISAMPLE_ARRAY: - gl_type = GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY; - break; - } - } - } else { - unsigned vec_size = spvc_type_get_vector_size(type); - unsigned columns = spvc_type_get_columns(type); - - switch (base_type) { - case SPVC_BASETYPE_FP32: - if (columns > 1) { - if (vec_size == 2 && columns == 2) gl_type = GL_FLOAT_MAT2; - else if (vec_size == 3 && columns == 3) gl_type = GL_FLOAT_MAT3; - else if (vec_size == 4 && columns == 4) gl_type = GL_FLOAT_MAT4; - else if (vec_size == 3 && columns == 2) gl_type = GL_FLOAT_MAT2x3; - else if (vec_size == 4 && columns == 2) gl_type = GL_FLOAT_MAT2x4; - else if (vec_size == 2 && columns == 3) gl_type = GL_FLOAT_MAT3x2; - else if (vec_size == 4 && columns == 3) gl_type = GL_FLOAT_MAT3x4; - else if (vec_size == 2 && columns == 4) gl_type = GL_FLOAT_MAT4x2; - else if (vec_size == 3 && columns == 4) gl_type = GL_FLOAT_MAT4x3; - } else { - switch (vec_size) { - case 1: - gl_type = GL_FLOAT; - break; - case 2: - gl_type = GL_FLOAT_VEC2; - break; - case 3: - gl_type = GL_FLOAT_VEC3; - break; - case 4: - gl_type = GL_FLOAT_VEC4; - break; - } - } - break; - case SPVC_BASETYPE_INT32: - switch (vec_size) { - case 1: - gl_type = GL_INT; - break; - case 2: - gl_type = GL_INT_VEC2; - break; - case 3: - gl_type = GL_INT_VEC3; - break; - case 4: - gl_type = GL_INT_VEC4; - break; - } - break; - case SPVC_BASETYPE_UINT32: - switch (vec_size) { - case 1: - gl_type = GL_UNSIGNED_INT; - break; - case 2: - gl_type = GL_UNSIGNED_INT_VEC2; - break; - case 3: - gl_type = GL_UNSIGNED_INT_VEC3; - break; - case 4: - gl_type = GL_UNSIGNED_INT_VEC4; - break; - } - break; - case SPVC_BASETYPE_BOOLEAN: - switch (vec_size) { - case 1: - gl_type = GL_BOOL; - break; - case 2: - gl_type = GL_BOOL_VEC2; - break; - case 3: - gl_type = GL_BOOL_VEC3; - break; - case 4: - gl_type = GL_BOOL_VEC4; - break; - } - break; - default: - continue; - } - } - - prog.uniformLocations[name] = final_location; - UniformValue uniformValue; - uniformValue.type = gl_type; - prog.uniformValues[name] = uniformValue; - } - } - spvc_context_destroy(context); - } - - std::string CompileSPIRVToGLSL(std::vector spirv, uint glslVersion, bool isES, bool isVkGLSL) { - spvc_context context = nullptr; - spvc_parsed_ir ir = nullptr; - spvc_compiler compiler_glsl = nullptr; - spvc_compiler_options options = nullptr; - spvc_resources resources = nullptr; - const spvc_reflected_resource *list = nullptr; - const char *result = nullptr; - size_t count; - - const SpvId *p_spirv = spirv.data(); - size_t word_count = spirv.size(); - - spvc_context_create(&context); - spvc_context_parse_spirv(context, p_spirv, word_count, &ir); - spvc_context_create_compiler(context, SPVC_BACKEND_GLSL, ir, SPVC_CAPTURE_MODE_TAKE_OWNERSHIP, &compiler_glsl); - spvc_compiler_create_shader_resources(compiler_glsl, &resources); - spvc_resources_get_resource_list_for_type(resources, SPVC_RESOURCE_TYPE_UNIFORM_BUFFER, &list, &count); - spvc_compiler_create_compiler_options(compiler_glsl, &options); - - spvc_compiler_options_set_uint(options, SPVC_COMPILER_OPTION_GLSL_VERSION, glslVersion); - spvc_compiler_options_set_bool(options, SPVC_COMPILER_OPTION_GLSL_ES, isES ? SPVC_TRUE : SPVC_FALSE); - spvc_compiler_options_set_bool(options, SPVC_COMPILER_OPTION_GLSL_VULKAN_SEMANTICS, isVkGLSL ? SPVC_TRUE : SPVC_FALSE); - spvc_compiler_install_compiler_options(compiler_glsl, options); - spvc_compiler_compile(compiler_glsl, &result); - - if (!result) { - MG_Util::Debug::LogE("Failed to compile the shader to GLSL: %s", spvc_context_get_last_error_string(context)); - return{}; - } - - std::string essl = result; - - spvc_context_destroy(context); - - return essl; - } -} diff --git a/MG/MG_UTIL/Program/GLSLTool.h b/MG/MG_UTIL/Program/GLSLTool.h deleted file mode 100644 index 60404060..00000000 --- a/MG/MG_UTIL/Program/GLSLTool.h +++ /dev/null @@ -1,192 +0,0 @@ -// -// Created by BZLZHH on 2025/5/3. -// - -#ifndef MOBILEGL_GLSLTOOL_H -#define MOBILEGL_GLSLTOOL_H - -namespace MG_Util::Program { - inline static TBuiltInResource InitResources() - { - TBuiltInResource Resources{}; - Resources.maxLights = 32; - Resources.maxClipPlanes = 6; - Resources.maxTextureUnits = 32; - Resources.maxTextureCoords = 32; - Resources.maxVertexAttribs = 64; - Resources.maxVertexUniformComponents = 4096; - Resources.maxVaryingFloats = 64; - Resources.maxVertexTextureImageUnits = 32; - Resources.maxCombinedTextureImageUnits = 80; - Resources.maxTextureImageUnits = 32; - Resources.maxFragmentUniformComponents = 4096; - Resources.maxDrawBuffers = 32; - Resources.maxVertexUniformVectors = 128; - Resources.maxVaryingVectors = 8; - Resources.maxFragmentUniformVectors = 16; - Resources.maxVertexOutputVectors = 16; - Resources.maxFragmentInputVectors = 15; - Resources.minProgramTexelOffset = -8; - Resources.maxProgramTexelOffset = 7; - Resources.maxClipDistances = 8; - Resources.maxComputeWorkGroupCountX = 65535; - Resources.maxComputeWorkGroupCountY = 65535; - Resources.maxComputeWorkGroupCountZ = 65535; - Resources.maxComputeWorkGroupSizeX = 1024; - Resources.maxComputeWorkGroupSizeY = 1024; - Resources.maxComputeWorkGroupSizeZ = 64; - Resources.maxComputeUniformComponents = 1024; - Resources.maxComputeTextureImageUnits = 16; - Resources.maxComputeImageUniforms = 8; - Resources.maxComputeAtomicCounters = 8; - Resources.maxComputeAtomicCounterBuffers = 1; - Resources.maxVaryingComponents = 60; - Resources.maxVertexOutputComponents = 64; - Resources.maxGeometryInputComponents = 64; - Resources.maxGeometryOutputComponents = 128; - Resources.maxFragmentInputComponents = 128; - Resources.maxImageUnits = 8; - Resources.maxCombinedImageUnitsAndFragmentOutputs = 8; - Resources.maxCombinedShaderOutputResources = 8; - Resources.maxImageSamples = 0; - Resources.maxVertexImageUniforms = 0; - Resources.maxTessControlImageUniforms = 0; - Resources.maxTessEvaluationImageUniforms = 0; - Resources.maxGeometryImageUniforms = 0; - Resources.maxFragmentImageUniforms = 8; - Resources.maxCombinedImageUniforms = 8; - Resources.maxGeometryTextureImageUnits = 16; - Resources.maxGeometryOutputVertices = 256; - Resources.maxGeometryTotalOutputComponents = 1024; - Resources.maxGeometryUniformComponents = 1024; - Resources.maxGeometryVaryingComponents = 64; - Resources.maxTessControlInputComponents = 128; - Resources.maxTessControlOutputComponents = 128; - Resources.maxTessControlTextureImageUnits = 16; - Resources.maxTessControlUniformComponents = 1024; - Resources.maxTessControlTotalOutputComponents = 4096; - Resources.maxTessEvaluationInputComponents = 128; - Resources.maxTessEvaluationOutputComponents = 128; - Resources.maxTessEvaluationTextureImageUnits = 16; - Resources.maxTessEvaluationUniformComponents = 1024; - Resources.maxTessPatchComponents = 120; - Resources.maxPatchVertices = 32; - Resources.maxTessGenLevel = 64; - Resources.maxViewports = 16; - Resources.maxVertexAtomicCounters = 0; - Resources.maxTessControlAtomicCounters = 0; - Resources.maxTessEvaluationAtomicCounters = 0; - Resources.maxGeometryAtomicCounters = 0; - Resources.maxFragmentAtomicCounters = 8; - Resources.maxCombinedAtomicCounters = 8; - Resources.maxAtomicCounterBindings = 1; - Resources.maxVertexAtomicCounterBuffers = 0; - Resources.maxTessControlAtomicCounterBuffers = 0; - Resources.maxTessEvaluationAtomicCounterBuffers = 0; - Resources.maxGeometryAtomicCounterBuffers = 0; - Resources.maxFragmentAtomicCounterBuffers = 1; - Resources.maxCombinedAtomicCounterBuffers = 1; - Resources.maxAtomicCounterBufferSize = 16384; - Resources.maxTransformFeedbackBuffers = 4; - Resources.maxTransformFeedbackInterleavedComponents = 64; - Resources.maxCullDistances = 8; - Resources.maxCombinedClipAndCullDistances = 8; - Resources.maxSamples = 4; - Resources.maxMeshOutputVerticesNV = 256; - Resources.maxMeshOutputPrimitivesNV = 512; - Resources.maxMeshWorkGroupSizeX_NV = 32; - Resources.maxMeshWorkGroupSizeY_NV = 1; - Resources.maxMeshWorkGroupSizeZ_NV = 1; - Resources.maxTaskWorkGroupSizeX_NV = 32; - Resources.maxTaskWorkGroupSizeY_NV = 1; - Resources.maxTaskWorkGroupSizeZ_NV = 1; - Resources.maxMeshViewCountNV = 4; - - Resources.limits.nonInductiveForLoops = true; - Resources.limits.whileLoops = true; - Resources.limits.doWhileLoops = true; - Resources.limits.generalUniformIndexing = true; - Resources.limits.generalAttributeMatrixVectorIndexing = true; - Resources.limits.generalVaryingIndexing = true; - Resources.limits.generalSamplerIndexing = true; - Resources.limits.generalVariableIndexing = true; - Resources.limits.generalConstantMatrixVectorIndexing = true; - - return Resources; - } - - inline int QueryGLSLVersion(const std::string& code) { - static std::regex version_pattern(R"(#version\s+(\d{3}))"); - std::smatch match; - if (std::regex_search(code, match, version_pattern)) { - return std::stoi(match[1].str()); - } - - return -1; - } - - inline GLsizei GetMatrixElementCount(GLenum matrixType) { - switch(matrixType) { - case GL_FLOAT_MAT2: return 4; - case GL_FLOAT_MAT3: return 9; - case GL_FLOAT_MAT4: return 16; - case GL_FLOAT_MAT2x3: return 6; - case GL_FLOAT_MAT2x4: return 8; - case GL_FLOAT_MAT3x2: return 6; - case GL_FLOAT_MAT3x4: return 12; - case GL_FLOAT_MAT4x2: return 8; - case GL_FLOAT_MAT4x3: return 12; - default: return 0; - } - } - - inline std::string GetShaderTypeName(GLenum shaderType) { - switch(shaderType) { - case GL_VERTEX_SHADER: return "Vertex Shader"; - case GL_FRAGMENT_SHADER: return "Fragment Shader"; - case GL_GEOMETRY_SHADER: return "Geometry Shader"; - case GL_TESS_CONTROL_SHADER: return "Tessellation Control Shader"; - case GL_TESS_EVALUATION_SHADER: return "Tessellation Evaluation Shader"; - case GL_COMPUTE_SHADER: return "Compute Shader"; - default: return "Unknown Shader Type (" + std::to_string(shaderType) + ")"; - } - } - - inline EShLanguage GetEShLanguageByShaderType(GLenum shaderType) { - switch (shaderType) { - case GL_VERTEX_SHADER: - return EShLanguage::EShLangVertex; - case GL_FRAGMENT_SHADER: - return EShLanguage::EShLangFragment; - case GL_COMPUTE_SHADER: - return EShLanguage::EShLangCompute; - case GL_TESS_CONTROL_SHADER: - return EShLanguage::EShLangTessControl; - case GL_TESS_EVALUATION_SHADER: - return EShLanguage::EShLangTessEvaluation; - case GL_GEOMETRY_SHADER: - return EShLanguage::EShLangGeometry; - default: - return EShLanguage::EShLangCount; - } - } - - std::vector CompileGLSLToSPIRV(GLenum shaderType, const std::string& source, - std::string& infoLog, bool isVkGLSL = false, GLenum additionalShaderType = 0, - const std::string& additionalShaderSource = {}); - std::string CompileGLSLToTShader(GLenum shaderType, const std::string& source, - glslang::TShader *&shader, bool isVkGLSL = false); - std::vector> CompileMultipleShadersToSPIRV(const ProgramState& state, ProgramObject& prog, std::string& infoLog); - void ReflectSPIRVUniforms(const std::vector>& allSpirv, ProgramObject& prog, std::string& infoLog); - std::string CompileSPIRVToGLSL(std::vector spirv, uint glslVersion, bool isES, bool isVkGLSL = false); - std::pair GenerateDefaultUBOForGLSL(const std::pair& glslSources); - void GenerateDefaultUBOForGLSL_Multi( - MG_Global::unordered_map &shaderSources, std::vector& outUniformBufferNames); - std::string BindInputLayoutLocationsForGLSL(std::vector& spirv, - MG_Global::unordered_map& - name_location_map); - void RenameGLSLBuiltinsForVulkan(std::string &src); -} - -#endif //MOBILEGL_GLSLTOOL_H diff --git a/PlannedFunctions.md b/PlannedFunctions.md deleted file mode 100644 index 9a359fa3..00000000 --- a/PlannedFunctions.md +++ /dev/null @@ -1,204 +0,0 @@ -## OpenGL State Manager - -### **1. Initialization & Query Functions** -- [x] glGetAttribLocation -- [x] glGetBufferParameteriv -- [x] glGetError -- [x] glGetIntegerv -- [x] glGetProgramiv -- [x] glGetShaderiv -- [x] glGetString -- [x] glGetStringi -- [x] glGetTexLevelParameteriv -- [x] glGetUniformLocation - ---- - -### **2. Texture Operations** -- [x] glActiveTexture -- [x] glBindTexture -- [x] glDeleteTextures -- [x] glGenTextures -- [x] glTexImage2D -- [x] glTexParameterf -- [x] glTexParameteri -- [x] glTexSubImage2D - ---- - -### **3. Framebuffer Operations** -- [x] glBindFramebuffer -- [x] glCheckFramebufferStatus -- [x] glDeleteFramebuffers -- [x] glFramebufferTexture2D -- [x] glGenFramebuffers - -  ~~glBlitFramebuffer~~ - ---- - -### **4. Shader & Program Management** -- [x] glAttachShader -- [x] glBindAttribLocation -- [x] glCompileShader -- [x] glCreateProgram -- [x] glCreateShader -- [x] glDeleteProgram -- [x] glDeleteShader -- [x] glLinkProgram -- [x] glShaderSource -- [x] glUseProgram - ---- - -### **5. Buffer & Vertex Array Operations** -- [x] glBindBuffer -- [x] glBindVertexArray -- [x] glBufferData -- [x] glEnableVertexAttribArray -- [x] glGenBuffers -- [x] glGenVertexArrays -- [x] glMapBuffer -- [x] glUnmapBuffer -- [x] glVertexAttribIPointer -- [x] glVertexAttribPointer -- [x] glBufferSubData -- [x] glMapBufferRange -- [x] glFlushMappedBufferRange -- [x] glCopyBufferSubData - ---- - -### **6. State Management** -- [x] glBlendFunc -- [x] glBlendFuncSeparate -- [x] glClear -- [x] glClearColor -- [x] glClearDepth -- [x] glColorMask -- [x] glDepthFunc -- [x] glDepthMask -- [x] glDisable -- [x] glEnable -- [x] glPixelStorei -- [x] glViewport - ---- - -### **7. Uniforms & Attributes** -- [x] glUniform1fv -- [x] glUniform1i -- [x] glUniform1iv -- [x] glUniform4fv -- [x] glUniformMatrix4fv -- [x] All glUniform\* in OpenGL 3.3 - ---- - -### **8. Drawing Commands** -  ~~glDrawElements~~ - -## Abstraction Layer (MG_RHI) - -### **1. Initialization & Query Functions** - -  ~~glGetAttribLocation~~ - -  ~~glGetBufferParameteriv~~ - -  ~~glGetError~~ - -  ~~glGetIntegerv~~ -- [ ] glGetProgramiv -- [ ] glGetShaderiv -- [ ] glGetString -- [ ] glGetStringi - -  ~~glGetTexLevelParameteriv~~ - -  ~~glGetUniformLocation~~ - ---- - -### **2. Texture Operations** -- [ ] glActiveTexture -- [ ] glBindTexture -- [ ] glDeleteTextures -- [ ] glGenTextures -- [ ] glTexImage2D -- [ ] glTexParameterf -- [ ] glTexParameteri -- [ ] glTexSubImage2D - ---- - -### **3. Framebuffer Operations** -- [ ] glBindFramebuffer -- [ ] glCheckFramebufferStatus -- [ ] glDeleteFramebuffers -- [ ] glFramebufferTexture2D -- [ ] glGenFramebuffers -- [ ] glBlitFramebuffer - ---- - -### **4. Shader & Program Management** -- [ ] glAttachShader -- [ ] glBindAttribLocation -- [ ] glCompileShader -- [ ] glCreateProgram -- [ ] glCreateShader -- [ ] glDeleteProgram -- [ ] glDeleteShader -- [ ] glLinkProgram -- [ ] glShaderSource -- [ ] glUseProgram - ---- - -### **5. Buffer & Vertex Array Operations** -- [ ] glBindBuffer -- [ ] glBindVertexArray -- [ ] glBufferData -- [ ] glEnableVertexAttribArray -- [ ] glGenBuffers -- [ ] glGenVertexArrays -- [ ] glMapBuffer -- [ ] glUnmapBuffer -- [ ] glVertexAttribIPointer -- [ ] glVertexAttribPointer -- [ ] glBufferSubData -- [ ] glMapBufferRange -- [ ] glFlushMappedBufferRange -- [ ] glCopyBufferSubData - ---- - -### **6. State Management** -- [ ] glBlendFunc -- [ ] glBlendFuncSeparate -- [ ] glClear -- [ ] glClearColor -- [ ] glClearDepth -- [ ] glColorMask -- [ ] glDepthFunc -- [ ] glDepthMask -- [ ] glDisable -- [ ] glEnable -- [ ] glPixelStorei -- [ ] glViewport - ---- - -### **7. Uniforms & Attributes** -- [ ] glUniform1fv -- [ ] glUniform1i -- [ ] glUniform1iv -- [ ] glUniform4fv -- [ ] glUniformMatrix4fv -- [ ] All glUniform\* in OpenGL 3.3 - ---- - -### **8. Drawing Commands** -- [ ] glDrawElements \ No newline at end of file diff --git a/README.md b/README.md index bb667131..c99c8aac 100644 --- a/README.md +++ b/README.md @@ -6,8 +6,6 @@ **glslang** by **KhronosGroup**: [github](https://github.com/KhronosGroup/glslang) -*(Unused Currently)* **GlslOptimizerV2** by **aiekick**: [github](https://github.com/aiekick/GlslOptimizerV2) - **unordered_dense** by **Martin Leitner-Ankerl**: [github](https://github.com/martinus/unordered_dense) **OpenGL Mathematics (*GLM*)** by **G-Truc Creation**: [github](https://github.com/g-truc/glm) @@ -18,10 +16,7 @@ | Component | Development Progress | |--------------------------------|----------------------| -| **OpenGL State Manager** | **60 ~ 70%** | -| **Abstraction Layer (MG_RHI)** | **0%** | -| **OpenGL ES Backend** | **N/A** (of MG_RHI) | -| **Vulkan Backend** | **planned** | +| **OpenGL State Manager** | **0%** | --- @@ -29,9 +24,6 @@ | Component | Development Progress\* | |--------------------------------|------------------------| -| **OpenGL State Manager** | **65 / 65** | -| **Abstraction Layer (MG_RHI)** | **0 / 61** | -| **OpenGL ES Backend** | **N/A** (of MG_RHI) | -| **Vulkan Backend** | **planned** | +| **OpenGL State Manager** | **0 / 65** | \* *The number of functions that have been implemented* \ No newline at end of file diff --git a/library/arm64-v8a/libshaderconv.so b/library/arm64-v8a/libshaderconv.so deleted file mode 100644 index 89af4506..00000000 Binary files a/library/arm64-v8a/libshaderconv.so and /dev/null differ