diff --git a/.editorconfig b/.editorconfig
index e8e9c5123..351f9312c 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -11,6 +11,12 @@ end_of_line = lf
indent_style = space
indent_size = 2
+[CMakeLists.txt]
+insert_final_newline = true
+end_of_line = lf
+indent_style = space
+indent_size = 2
+
[*.{c,C,h,H}]
indent_style = tab
indent_size = 4
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 1730aa397..a11d7e925 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -17,7 +17,8 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
+ submodules: true
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- name: Build
- run: nix build -L --no-link --keep-going .#all
+ run: nix build -L --no-link --keep-going '.?submodules=1#all'
diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 000000000..405556dd7
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,9 @@
+[submodule "rebuild_PC/thirdparty/PsyCross"]
+ path = rebuild_PC/thirdparty/PsyCross
+ url = https://github.com/OpenDriver2/PsyCross.git
+[submodule "rebuild_PC/thirdparty/SDL"]
+ path = rebuild_PC/thirdparty/SDL
+ url = https://github.com/libsdl-org/SDL.git
+[submodule "rebuild_PC/thirdparty/openal-soft"]
+ path = rebuild_PC/thirdparty/openal-soft
+ url = https://github.com/kcat/openal-soft.git
diff --git a/flake.nix b/flake.nix
index 504360509..95105cd80 100644
--- a/flake.nix
+++ b/flake.nix
@@ -8,7 +8,7 @@
};
mingw32 = with pkgsCross.mingw32; {
gcc = callPackage ./rebuild_PC { ctrModSDK = self; };
- clang = callPackage ./rebuild_PC { ctrModSDK = self; stdenv = clangStdenv; };
+ clang = callPackage ./rebuild_PC { ctrModSDK = self; stdenv = clangStdenv; trustCompiler = true; };
};
all = stdenvNoCC.mkDerivation {
name = "ctr-join";
diff --git a/rebuild_PC/CMakeLists.txt b/rebuild_PC/CMakeLists.txt
new file mode 100644
index 000000000..e393593c9
--- /dev/null
+++ b/rebuild_PC/CMakeLists.txt
@@ -0,0 +1,111 @@
+cmake_minimum_required(VERSION 3.20)
+project(CTR-PC)
+
+# === OPTIONS ===
+
+set(CTR_16BY9 ON)
+set(CTR_60FPS ON)
+set(CTR_NEW2P ON)
+set(CTR_PRIM 0)
+
+# === BASICS ===
+
+set_source_files_properties("CrashTeamRacingPC.c" PROPERTIES LANGUAGE C)
+add_executable(ctr_bin "CrashTeamRacingPC.c")
+set_target_properties(ctr_bin PROPERTIES OUTPUT_NAME "CrashTeamRacingPC")
+target_include_directories(ctr_bin PUBLIC "../include")
+
+# === COMPILER OPTIONS ===
+
+set_property(TARGET ctr_bin PROPERTY C_STANDARD 99)
+target_compile_options(ctr_bin PUBLIC -DUSE_EXTENDED_PRIM_POINTERS=${CTR_PRIM})
+
+if(CTR_16BY9)
+ target_compile_options(ctr_bin PUBLIC -DUSE_16BY9 -DUSE_NEW2P)
+endif()
+if(CTR_60FPS)
+ target_compile_options(ctr_bin PUBLIC -DUSE_60FPS)
+endif()
+
+# Clang is rigorous
+if(CMAKE_C_COMPILER_ID MATCHES "Clang")
+ target_compile_options(ctr_bin PUBLIC -Wno-int-conversion -Wno-incompatible-function-pointer-types -Wno-implicit-function-declaration -Wno-return-type)
+ if(MINGW OR CYGWIN)
+ if(NOT CMAKE_VERSION VERSION_LESS "3.13")
+ target_link_options(ctr_bin PUBLIC -static-libgcc)
+ endif()
+ endif()
+endif()
+
+if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
+ target_compile_options(ctr_bin PUBLIC -g -gdwarf-2 -O0)
+else()
+ target_compile_options(ctr_bin PUBLIC -O2)
+endif()
+
+# === LINKER OPTIONS ===
+
+# Clang always needs "no-pie", but some distros might add PIE to GCC too.
+target_link_options(ctr_bin PUBLIC -fno-pie -no-pie -Wl,-Ttext,0x00D00000)
+
+# === DEPENDENCIES ===
+
+find_package(SDL2 QUIET)
+if(NOT SDL2_FOUND)
+ add_subdirectory("thirdparty/SDL")
+ set(SDL2_LIBRARIES SDL2 SDL2main)
+ set(SDL2_INCLUDE_DIR "thirdparty/SDL/include")
+endif()
+
+target_link_libraries(ctr_bin ${SDL2_LIBRARIES})
+target_include_directories(ctr_bin PRIVATE ${SDL2_INCLUDE_DIRS})
+
+find_package(OpenAL QUIET)
+if(NOT OpenAL_FOUND)
+ add_subdirectory("thirdparty/openal-soft")
+ set(OPENAL_LIBRARY OpenAL)
+ set(OPENAL_INCLUDE_DIR "thirdparty/openal-soft/include")
+endif()
+
+# === PsyCross ===
+
+file(GLOB_RECURSE PSYCROSS_SRCS_C
+ "thirdparty/PsyCross/*.c" "thirdparty/PsyCross/*.C"
+)
+
+file(GLOB_RECURSE PSYCROSS_SRCS_CPP
+ "thirdparty/PsyCross/*.cpp"
+)
+
+set_source_files_properties(${PSYCROSS_SRCS_C} PROPERTIES LANGUAGE C)
+set_source_files_properties(${PSYCROSS_SRCS_CPP} PROPERTIES LANGUAGE CXX)
+
+add_library(psycross_static STATIC ${PSYCROSS_SRCS_C} ${PSYCROSS_SRCS_CPP})
+set_target_properties(psycross_static PROPERTIES OUTPUT_NAME "psycross")
+target_include_directories(psycross_static PUBLIC "thirdparty/PsyCross/include")
+
+target_compile_options(psycross_static PRIVATE -Wno-narrowing)
+
+target_link_libraries(psycross_static ${SDL2_LIBRARIES})
+target_include_directories(psycross_static PRIVATE ${SDL2_INCLUDE_DIRS})
+
+target_link_libraries(psycross_static ${OPENAL_LIBRARY})
+target_include_directories(psycross_static PRIVATE ${OPENAL_INCLUDE_DIR})
+
+# === OUR PsyCross USAGE ===
+
+target_compile_options(psycross_static PUBLIC -DUSE_EXTENDED_PRIM_POINTERS=${CTR_PRIM} -O2)
+
+if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
+ target_compile_options(psycross_static PUBLIC -g -gdwarf-2)
+endif()
+
+# Clang is rigorous
+if(CMAKE_C_COMPILER_ID MATCHES "Clang")
+ target_compile_options(psycross_static PRIVATE -Wno-int-conversion -Wno-implicit-function-declaration)
+endif()
+
+target_link_libraries(ctr_bin psycross_static)
+target_include_directories(ctr_bin PRIVATE ${PsyCross_SOURCE_DIR}/include)
+
+#target_link_libraries(ctr_bin stdc++ m)
diff --git a/rebuild_PC/CrashTeamRacingPC.vcxproj b/rebuild_PC/CrashTeamRacingPC.vcxproj
index a666fced0..d3252c509 100644
--- a/rebuild_PC/CrashTeamRacingPC.vcxproj
+++ b/rebuild_PC/CrashTeamRacingPC.vcxproj
@@ -76,7 +76,7 @@
true
WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
true
- $(ProjectDir)\PsyCross\include;$(ProjectDir)\..\include
+ $(ProjectDir)\thirdparty\PsyCross\include;$(ProjectDir)\..\include
Console
@@ -96,7 +96,7 @@
true
WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
true
- $(ProjectDir)\PsyCross\include;$(ProjectDir)\..\include
+ $(ProjectDir)\thirdparty\PsyCross\include;$(ProjectDir)\..\include
Console
diff --git a/rebuild_PC/Makefile b/rebuild_PC/Makefile
deleted file mode 100644
index efdbf3d38..000000000
--- a/rebuild_PC/Makefile
+++ /dev/null
@@ -1,20 +0,0 @@
-.PHONY: all
-
-CFLAGS+=-std=c99 -DUSE_16BY9=1 -O2 \
- -I./PsyCross/include -I../include \
- `${PKG_CONFIG} --cflags sdl2`
-
-# Clang is rigorous
-CFLAGS+=-Wno-int-conversion -Wno-incompatible-function-pointer-types -Wno-implicit-function-declaration -Wno-return-type
-
-LDLIBS+=-lpsycross \
- `${PKG_CONFIG} --libs sdl2` \
- `${PKG_CONFIG} --libs openal` \
- -lstdc++ -lm
-
-# Clang always needs "no-pie", some distros might add PIE to GCC too.
-LDFLAGS+=-fno-pie -no-pie -Wl,-Ttext,0x00D00000
-
-CrashTeamRacingPC: CrashTeamRacingPC.o
-
-all: CrashTeamRacingPC
diff --git a/rebuild_PC/PsyCross.nix b/rebuild_PC/PsyCross.nix
deleted file mode 100644
index f40738b32..000000000
--- a/rebuild_PC/PsyCross.nix
+++ /dev/null
@@ -1,77 +0,0 @@
-{ lib
-, stdenv
-, pkg-config
-, cmake
-, SDL2
-, openal
-, fetchFromGitHub
-, psyCrossDebug ? false
-}:
-
-let
- isWindows = stdenv.hostPlatform.uname.system == "Windows";
-
- openalWithWindows =
- if isWindows then
- (openal.override {
- alsaSupport = false;
- dbusSupport = false;
- pipewireSupport = false;
- pulseSupport = false;
- inherit stdenv;
- }).overrideAttrs (prevAttrs: {
- meta = prevAttrs.meta // { inherit (SDL2.meta) platforms; };
- })
- else openal.override { inherit stdenv; };
-in
-stdenv.mkDerivation (finalAttrs: {
- pname = "PsyCross";
- version = "unstable-2024-02-14-0ce306d6c";
-
- src = fetchFromGitHub {
- owner = "OpenDriver2";
- repo = "PsyCross";
- rev = "0ce306d6c32412986037e7e5e1dbdc1bf72e066a";
- hash = "sha256-c57xyzM7GkL9SazUUxAM4DVXxb7cTcjJxgJpZ7UMBVQ=";
- };
-
- # Shows the proper compile date in the logs (taken from commit date)
- env.SOURCE_DATE_EPOCH = "1712578640";
-
- nativeBuildInputs = [ pkg-config cmake ];
- propagatedBuildInputs = [ (SDL2.override { inherit stdenv; }) openalWithWindows ];
-
- hardeningDisable = [ "format" ];
-
- CFLAGS = "-Wno-implicit-function-declaration" + lib.strings.optionalString psyCrossDebug "-D_DEBUG=1 -g -gdwarf-2 -O0";
- CXXFLAGS = lib.strings.optionalString psyCrossDebug "-D_DEBUG=1 -g -gdwarf-2 -O0";
- dontStrip = psyCrossDebug;
-
- postPatch = ''
- substituteInPlace 'include/PsyX/PsyX_config.h' \
- --replace-fail 'USE_EXTENDED_PRIM_POINTERS 1' 'USE_EXTENDED_PRIM_POINTERS 0'
- '';
-
- installPhase = ''
- runHook preInstall
-
- mkdir "$out"
- cp -r ../include "$out/include"
- cp libpsycross.a "$out/libpsycross.a"
-
- runHook postInstall
- '';
-
- passthru = {
- inherit SDL2;
- openal = openalWithWindows;
- };
-
- meta = {
- description = "Compatibility framework for building and running Psy-Q SDK";
- homepage = "https://github.com/OpenDriver2/PsyCross";
- license = lib.licenses.mit;
- maintainers = with lib.maintainers; [ pedrohlc ];
- inherit (SDL2.meta) platforms;
- };
-})
diff --git a/rebuild_PC/PsyCross/LICENSE b/rebuild_PC/PsyCross/LICENSE
deleted file mode 100644
index 6e1ca2632..000000000
--- a/rebuild_PC/PsyCross/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-MIT License
-
-Copyright (c) 2020 REDRIVER2 Project
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
diff --git a/rebuild_PC/PsyCross/README.md b/rebuild_PC/PsyCross/README.md
deleted file mode 100644
index 5e053a917..000000000
--- a/rebuild_PC/PsyCross/README.md
+++ /dev/null
@@ -1,39 +0,0 @@
-# Psy-Cross (Psy-X)
-![](https://i.ibb.co/PFNnw4G/PsyCross.jpg)
-
-Compatibility framework for building and running Psy-Q SDK - based Playstation games across other platforms
-
-### Implementation details
-- High-level *Playstation API* reimplementation which translates it's calls into modern/compatible APIs
-- Psy-Q - compatible headers
-- Implements Geometry Transformation Engine (GTE) in software and adapts it's macros and calls
-- Optimized Precise GTE Vertex Cache with *modern 3D hardware perspective transform* and *Z-buffer* support (PGXP-Z)
-- *LibSPU* with ADPCM decoding on OpenAL (SPU-AL)
-- *LibGPU* with Playstation-style polygon and image handling
-- *LibCD* with ISO 9660 BIN/CUE image support by Playstation CD API
-- Already proven to be *95% compatible* with the Psy-Q Playstation SDK - Psy-X game look almost identical to the Playstation game
-- You can bring your game to *Web with Emscripten* support
-
-### Folder structure
-- `src/gpu`: PSX GPU linked lists and polygon handling routines
-- `src/gte`: PSX GTE and PGXP-Z implementation
-- `src/render`: OpenGL renderer and PSX VRAM emulation
-- `src/pad`: Controller handling
-- `src/psx`: Implementations of PsyQ - compatible libraries (**libgte, libgpu, libspu, libcd ...**)
-- `include/psx`: Headers of PsyQ - compatible libraries (**libgte, libgpu, libspu, libcd ...**)
-- `include/PsyX`: PsyCross interfaces (**window management, configuration, renderer, PGXP-Z**)
-
-### Dependencies
-- OpenAL-soft (1.21.x or newer)
-- SDL2 (2.0.16 or newer)
-
-## TODO
-- CMake dependency/build scripts
-- Add some missing **LibGTE** functions
-- MDEC implementation in **LibPress**
-- CD Audio/XA decoding and playback
-- SPU Attack-Decay-Sustain-Release (ADSR) support, *maybe through own mixer?*
-
-### Credits
-- SoapyMan - more GTE functions, SPU-AL, PGXP-Z
-- Gh0stBlade - original source/base [(link)](https://github.com/TOMB5/TOMB5/tree/master/EMULATOR)
diff --git a/rebuild_PC/PsyCross/include/PsyX/PsyX_config.h b/rebuild_PC/PsyCross/include/PsyX/PsyX_config.h
deleted file mode 100644
index a42ce1569..000000000
--- a/rebuild_PC/PsyCross/include/PsyX/PsyX_config.h
+++ /dev/null
@@ -1,16 +0,0 @@
-#ifndef PSYX_CONFIG_H
-#define PSYX_CONFIG_H
-
-// Uses 32 bit pointers on P_TAG and other primitives
-// When turned off also disables PGXP
-
-#ifndef USE_EXTENDED_PRIM_POINTERS
-#define USE_EXTENDED_PRIM_POINTERS 0
-#endif
-
-// PGXP-Z: Precise GTE transform pipeline with Z-depth and widescreen fixes. Recommended for game mode
-#ifndef USE_PGXP
-#define USE_PGXP USE_EXTENDED_PRIM_POINTERS
-#endif
-
-#endif // PSYX_CONFIG_H
\ No newline at end of file
diff --git a/rebuild_PC/PsyCross/include/PsyX/PsyX_globals.h b/rebuild_PC/PsyCross/include/PsyX/PsyX_globals.h
deleted file mode 100644
index 1e7ab2eb9..000000000
--- a/rebuild_PC/PsyCross/include/PsyX/PsyX_globals.h
+++ /dev/null
@@ -1,35 +0,0 @@
-#ifndef EMULATOR_GLOBALS_H
-#define EMULATOR_GLOBALS_H
-
-#if defined(_LANGUAGE_C_PLUS_PLUS)||defined(__cplusplus)||defined(c_plusplus)
-extern "C" {
-#endif
-
-#define VBLANK_FREQUENCY_NTSC 60
-#define VBLANK_FREQUENCY_PAL 50
-
-#define FIXED_TIME_STEP_NTSC (1.0/float(VBLANK_FREQUENCY_NTSC)) // 60 FPS clock
-#define FIXED_TIME_STEP_PAL (1.0/float(VBLANK_FREQUENCY_PAL)) // 50 FPS clock
-
-/* runtime states */
-extern int g_windowWidth;
-extern int g_windowHeight;
-extern int g_swapInterval;
-
-/* debug runtime stuff */
-extern int g_dbg_emulatorPaused;
-extern int g_dbg_wireframeMode;
-extern int g_dbg_texturelessMode;
-
-/* Logging functions */
-extern void PsyX_Log(const char* fmt, ...);
-extern void PsyX_Log_Info(const char* fmt, ...);
-extern void PsyX_Log_Warning(const char* fmt, ...);
-extern void PsyX_Log_Error(const char* fmt, ...);
-extern void PsyX_Log_Success(const char* fmt, ...);
-
-#if defined(_LANGUAGE_C_PLUS_PLUS)||defined(__cplusplus)||defined(c_plusplus)
-}
-#endif
-
-#endif
\ No newline at end of file
diff --git a/rebuild_PC/PsyCross/include/PsyX/PsyX_public.h b/rebuild_PC/PsyCross/include/PsyX/PsyX_public.h
deleted file mode 100644
index 301e8e5de..000000000
--- a/rebuild_PC/PsyCross/include/PsyX/PsyX_public.h
+++ /dev/null
@@ -1,110 +0,0 @@
-#ifndef EMULATOR_PUBLIC_H
-#define EMULATOR_PUBLIC_H
-
-#define CONTROLLER_MAP_FLAG_AXIS 0x4000
-#define CONTROLLER_MAP_FLAG_INVERSE 0x8000
-
-typedef struct
-{
- int id;
-
- int kc_square, kc_circle, kc_triangle, kc_cross;
-
- int kc_l1, kc_l2, kc_l3;
- int kc_r1, kc_r2, kc_r3;
-
- int kc_start, kc_select;
-
- int kc_dpad_left, kc_dpad_right, kc_dpad_up, kc_dpad_down;
-} PsyXKeyboardMapping;
-
-typedef struct
-{
- int id;
-
- // you can bind axis by adding CONTROLLER_MAP_AXIS_FLAG
- int gc_square, gc_circle, gc_triangle, gc_cross;
-
- int gc_l1, gc_l2, gc_l3;
- int gc_r1, gc_r2, gc_r3;
-
- int gc_start, gc_select;
-
- int gc_dpad_left, gc_dpad_right, gc_dpad_up, gc_dpad_down;
-
- int gc_axis_left_x, gc_axis_left_y;
- int gc_axis_right_x, gc_axis_right_y;
-} PsyXControllerMapping;
-
-typedef void(*GameDebugKeysHandlerFunc)(int nKey, char down);
-typedef void(*GameDebugMouseHandlerFunc)(int x, int y);
-typedef void(*GameOnTextInputHandler)(const char* buf);
-
-//------------------------------------------------------------------------
-
-#if defined(_LANGUAGE_C_PLUS_PLUS)||defined(__cplusplus)||defined(c_plusplus)
-extern "C" {
-#endif
-
-/* Mapped inputs */
-extern PsyXControllerMapping g_cfg_controllerMapping;
-extern PsyXKeyboardMapping g_cfg_keyboardMapping;
-extern int g_cfg_controllerToSlotMapping[2];
-
-/* Game inputs */
-extern GameOnTextInputHandler g_cfg_gameOnTextInput;
-
-/* Graphics configuration */
-extern int g_cfg_swapInterval;
-extern int g_cfg_pgxpZBuffer;
-extern int g_cfg_bilinearFiltering;
-extern int g_cfg_pgxpTextureCorrection;
-
-/* Debug inputs */
-extern GameDebugKeysHandlerFunc g_dbg_gameDebugKeys;
-extern GameDebugMouseHandlerFunc g_dbg_gameDebugMouse;
-
-/* Usually called at the beginning of main function */
-extern void PsyX_Initialise(char* windowName, int screenWidth, int screenHeight, int fullscreen);
-
-/* Cleans all resources and closes open instances */
-extern void PsyX_Shutdown(void);
-
-/* Returns the screen size dimensions */
-extern void PsyX_GetScreenSize(int* screenWidth, int* screenHeight);
-
-/* Sets mouse cursor position */
-extern void PsyX_SetCursorPosition(int x, int y);
-
-/* Usually called after ClearOTag/ClearOTagR */
-extern char PsyX_BeginScene(void);
-
-/* Usually called after DrawOTag/DrawOTagEnv */
-extern void PsyX_EndScene(void);
-
-/* Explicitly updates emulator input loop */
-extern void PsyX_UpdateInput(void);
-
-/* Returns keyboard mapping index */
-extern int PsyX_LookupKeyboardMapping(const char* str, int default_value);
-
-/* Returns controller mapping index */
-extern int PsyX_LookupGameControllerMapping(const char* str, int default_value);
-
-/* Screen size of emulated PSX viewport with widescreen offsets */
-extern void PsyX_GetPSXWidescreenMappedViewport(struct _RECT16* rect);
-
-/* Waits for timer */
-extern void PsyX_WaitForTimestep(int count);
-
-/* Changes swap interval state */
-extern void PsyX_EnableSwapInterval(int enable);
-
-/* Changes swap interval interval interval */
-extern void PsyX_SetSwapInterval(int interval);
-
-#if defined(_LANGUAGE_C_PLUS_PLUS)||defined(__cplusplus)||defined(c_plusplus)
-}
-#endif
-
-#endif
\ No newline at end of file
diff --git a/rebuild_PC/PsyCross/include/PsyX/PsyX_render.h b/rebuild_PC/PsyCross/include/PsyX/PsyX_render.h
deleted file mode 100644
index 87ad488f7..000000000
--- a/rebuild_PC/PsyCross/include/PsyX/PsyX_render.h
+++ /dev/null
@@ -1,212 +0,0 @@
-#ifndef EMULATOR_H
-#define EMULATOR_H
-
-#include "PsyX/PsyX_config.h"
-
-/*
- * Platform specific emulator setup
- */
-#if (defined(_WIN32) || defined(__APPLE__) || defined(__linux__)) && !defined(__ANDROID__) && !defined(__EMSCRIPTEN__) && !defined(__RPI__)
-# define RENDERER_OGL
-# define USE_GLAD
-#elif defined(__RPI__)
-# define RENDERER_OGLES
-# define OGLES_VERSION (3)
-#elif defined(__EMSCRIPTEN__)
-# define RENDERER_OGLES
-# define OGLES_VERSION (2)
-#elif defined(__ANDROID__)
-# define RENDERER_OGLES
-# define OGLES_VERSION (3)
-#endif
-
-#if defined(RENDERER_OGL) || defined(RENDERER_OGLES)
-# define USE_OPENGL 1
-#else
-# define USE_OPENGL 0
-#endif
-
-#if OGLES_VERSION == 2
-# define ES2_SHADERS
-#elif OGLES_VERSION == 3
-# define ES3_SHADERS
-#endif
-
- /*
- * OpenGL
- */
-#if defined (RENDERER_OGL)
-
-# define GL_GLEXT_PROTOTYPES
-# include "common/glad.h"
-
-#elif defined (RENDERER_OGLES)
-
-# define GL_GLEXT_PROTOTYPES
-
-# ifdef __EMSCRIPTEN__
-# include
-# else
-# if OGLES_VERSION == 2
-# include
-# include
-# elif OGLES_VERSION == 3
-# include
-# endif
-# endif
-
-# include
-
-#endif
-
- // setup renderer texture formats
-#if defined(RENDERER_OGL)
-# define TEXTURE_FORMAT GL_UNSIGNED_SHORT_1_5_5_5_REV
-#elif defined(RENDERER_OGLES)
-# define TEXTURE_FORMAT GL_UNSIGNED_SHORT_5_5_5_1
-#endif
-
-#include "psx/types.h"
-
-#include "common/pgxp_defs.h"
-
-#include "psx/libgte.h"
-#include "psx/libgpu.h"
-
-#include
-#include
-
-#ifndef NULL
-#define NULL 0
-#endif
-
-/*
-// FIXME: enable when needed
-#if defined(RENDERER_OGLES)
-
-# define glGenVertexArrays glGenVertexArraysOES
-# define glBindVertexArray glBindVertexArrayOES
-# define glDeleteVertexArrays glDeleteVertexArraysOES
-
-#endif
-*/
-
-#if defined(RENDERER_OGL)
-# define VRAM_FORMAT GL_RG
-# define VRAM_INTERNAL_FORMAT GL_RG32F
-#elif defined(RENDERER_OGLES)
-# define VRAM_FORMAT GL_LUMINANCE_ALPHA
-# define VRAM_INTERNAL_FORMAT GL_LUMINANCE_ALPHA
-#endif
-
-#define VRAM_WIDTH (1024)
-#define VRAM_HEIGHT (512)
-
-#define TPAGE_WIDTH (256)
-#define TPAGE_HEIGHT (256)
-
-#define MAX_VERTEX_BUFFER_SIZE (1 << (sizeof(ushort) * 8))
-
-#pragma pack(push,1)
-typedef struct
-{
-#if USE_PGXP
- float x, y, page, clut;
- float z, scr_h, ofsX, ofsY;
-#else
- short x, y, page, clut;
-#endif
-
- u_char u, v, bright, dither;
- u_char r, g, b, a;
-
- char tcx, tcy, _p0, _p1;
-} GrVertex;
-#pragma pack(pop)
-
-typedef enum
-{
- a_position,
- a_zw,
- a_texcoord,
- a_color,
- a_extra,
-} ShaderAttrib;
-
-typedef enum
-{
- BM_NONE,
- BM_AVERAGE,
- BM_ADD,
- BM_SUBTRACT,
- BM_ADD_QUATER_SOURCE
-} BlendMode;
-
-typedef enum
-{
- TF_4_BIT,
- TF_8_BIT,
- TF_16_BIT,
-
- TF_32_BIT_RGBA // custom texture
-} TexFormat;
-
-
-#if defined(RENDERER_OGLES) || defined(RENDERER_OGL)
-typedef uint TextureID;
-typedef uint ShaderID;
-#else
-#error
-#endif
-
-#if defined(_LANGUAGE_C_PLUS_PLUS)||defined(__cplusplus)||defined(c_plusplus)
-extern "C" {
-#endif
-
-extern TextureID g_whiteTexture;
-extern TextureID g_vramTexture;
-
-extern void GR_SwapWindow();
-
-// PSX VRAM operations
-extern void GR_SaveVRAM(const char* outputFileName, int x, int y, int width, int height, int bReadFromFrameBuffer);
-extern void GR_CopyVRAM(unsigned short* src, int x, int y, int w, int h, int dst_x, int dst_y);
-extern void GR_ReadVRAM(unsigned short* dst, int x, int y, int dst_w, int dst_h);
-
-extern void GR_StoreFrameBuffer(int x, int y, int w, int h);
-extern void GR_UpdateVRAM();
-extern void GR_ReadFramebufferDataToVRAM();
-
-extern TextureID GR_CreateRGBATexture(int width, int height, u_char* data /*= nullptr*/);
-extern ShaderID GR_Shader_Compile(const char* source);
-
-extern void GR_SetShader(const ShaderID shader);
-extern void GR_Perspective3D(const float fov, const float width, const float height, const float zNear, const float zFar);
-extern void GR_Ortho2D(float left, float right, float bottom, float top, float znear, float zfar);
-
-extern void GR_SetBlendMode(BlendMode blendMode);
-extern void GR_SetPolygonOffset(float ofs);
-extern void GR_SetStencilMode(int drawPrim);
-extern void GR_EnableDepth(int enable);
-extern void GR_SetScissorState(int enable);
-extern void GR_SetOffscreenState(const RECT16* offscreenRect, int enable);
-extern void GR_SetupClipMode(const RECT16* clipRect, int enable);
-extern void GR_SetViewPort(int x, int y, int width, int height);
-extern void GR_SetTexture(TextureID texture, TexFormat texFormat);
-extern void GR_SetOverrideTextureSize(int width, int height);
-extern void GR_SetWireframe(int enable);
-
-extern void GR_DestroyTexture(TextureID texture);
-extern void GR_Clear(int x, int y, int w, int h, unsigned char r, unsigned char g, unsigned char b);
-extern void GR_ClearVRAM(int x, int y, int w, int h, unsigned char r, unsigned char g, unsigned char b);
-extern void GR_UpdateVertexBuffer(const GrVertex* vertices, int count);
-extern void GR_DrawTriangles(int start_vertex, int triangles);
-
-extern void GR_PushDebugLabel(const char* label);
-extern void GR_PopDebugLabel();
-
-#if defined(_LANGUAGE_C_PLUS_PLUS)||defined(__cplusplus)||defined(c_plusplus)
-}
-#endif
-
-#endif
\ No newline at end of file
diff --git a/rebuild_PC/PsyCross/include/PsyX/PsyX_version.h b/rebuild_PC/PsyCross/include/PsyX/PsyX_version.h
deleted file mode 100644
index 1a2d5d8e8..000000000
--- a/rebuild_PC/PsyCross/include/PsyX/PsyX_version.h
+++ /dev/null
@@ -1,16 +0,0 @@
-#ifndef PSYX_VERSION_H
-#define PSYX_VERSION_H
-
-/* Emulator version */
-#define PSYX_MAJOR_VERSION (2)
-#define PSYX_MINOR_VERSION (8)
-
-/* Compile date and time */
-#define PSYX_COMPILE_DATE (__DATE__)
-#define PSYX_COMPILE_TIME (__TIME__)
-
-/* Psy-Q version */
-#define PSYQ_MAJOR_VERSION (4)
-#define PSYQ_MINOR_VERSION (7)
-
-#endif
\ No newline at end of file
diff --git a/rebuild_PC/PsyCross/include/PsyX/common/glad.h b/rebuild_PC/PsyCross/include/PsyX/common/glad.h
deleted file mode 100644
index 269162ec7..000000000
--- a/rebuild_PC/PsyCross/include/PsyX/common/glad.h
+++ /dev/null
@@ -1,3538 +0,0 @@
-/*
-
- OpenGL, OpenGL ES loader generated by glad 0.1.36 on Wed Nov 22 19:14:12 2023.
-
- Language/Generator: C/C++
- Specification: gl
- APIs: gl=3.1, gles2=2.0
- Profile: compatibility
- Extensions:
- GL_KHR_debug
- Loader: True
- Local files: True
- Omit khrplatform: True
- Reproducible: False
-
- Commandline:
- --profile="compatibility" --api="gl=3.1,gles2=2.0" --generator="c" --spec="gl" --local-files --omit-khrplatform --extensions="GL_KHR_debug"
- Online:
- https://glad.dav1d.de/#profile=compatibility&language=c&specification=gl&loader=on&api=gl%3D3.1&api=gles2%3D2.0&extensions=GL_KHR_debug
-*/
-
-
-#ifndef __glad_h_
-#define __glad_h_
-
-#ifdef __gl_h_
-#error OpenGL header already included, remove this include, glad already provides it
-#endif
-#define __gl_h_
-
-#ifdef __gl2_h_
-#error OpenGL ES 2 header already included, remove this include, glad already provides it
-#endif
-#define __gl2_h_
-
-#ifdef __gl3_h_
-#error OpenGL ES 3 header already included, remove this include, glad already provides it
-#endif
-#define __gl3_h_
-
-#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
-#define APIENTRY __stdcall
-#endif
-
-#ifndef APIENTRY
-#define APIENTRY
-#endif
-#ifndef APIENTRYP
-#define APIENTRYP APIENTRY *
-#endif
-
-#ifndef GLAPIENTRY
-#define GLAPIENTRY APIENTRY
-#endif
-#include
-#include
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct gladGLversionStruct {
- int major;
- int minor;
-};
-
-typedef void* (* GLADloadproc)(const char *name);
-
-#ifndef GLAPI
-# if defined(GLAD_GLAPI_EXPORT)
-# if defined(_WIN32) || defined(__CYGWIN__)
-# if defined(GLAD_GLAPI_EXPORT_BUILD)
-# if defined(__GNUC__)
-# define GLAPI __attribute__ ((dllexport)) extern
-# else
-# define GLAPI __declspec(dllexport) extern
-# endif
-# else
-# if defined(__GNUC__)
-# define GLAPI __attribute__ ((dllimport)) extern
-# else
-# define GLAPI __declspec(dllimport) extern
-# endif
-# endif
-# elif defined(__GNUC__) && defined(GLAD_GLAPI_EXPORT_BUILD)
-# define GLAPI __attribute__ ((visibility ("default"))) extern
-# else
-# define GLAPI extern
-# endif
-# else
-# define GLAPI extern
-# endif
-#endif
-
-GLAPI struct gladGLversionStruct GLVersion;
-
-GLAPI int gladLoadGL(void);
-
-GLAPI int gladLoadGLLoader(GLADloadproc);
-
-GLAPI int gladLoadGLES2Loader(GLADloadproc);
-
-typedef unsigned int GLenum;
-typedef unsigned char GLboolean;
-typedef unsigned int GLbitfield;
-typedef void GLvoid;
-typedef int8_t GLbyte;
-typedef uint8_t GLubyte;
-typedef int16_t GLshort;
-typedef uint16_t GLushort;
-typedef int GLint;
-typedef unsigned int GLuint;
-typedef int32_t GLclampx;
-typedef int GLsizei;
-typedef float GLfloat;
-typedef float GLclampf;
-typedef double GLdouble;
-typedef double GLclampd;
-typedef void *GLeglClientBufferEXT;
-typedef void *GLeglImageOES;
-typedef char GLchar;
-typedef char GLcharARB;
-#ifdef __APPLE__
-typedef void *GLhandleARB;
-#else
-typedef unsigned int GLhandleARB;
-#endif
-typedef uint16_t GLhalf;
-typedef uint16_t GLhalfARB;
-typedef int32_t GLfixed;
-#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ > 1060)
-#if defined(__khrplatform_h_)
-typedef khronos_intptr_t GLintptr;
-#else
-typedef long GLintptr;
-#endif
-#else
-#if defined(__khrplatform_h_)
-typedef khronos_intptr_t GLintptr;
-#else
-typedef ptrdiff_t GLintptr;
-#endif
-#endif
-#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ > 1060)
-#if defined(__khrplatform_h_)
-typedef khronos_intptr_t GLintptrARB;
-#else
-typedef long GLintptrARB;
-#endif
-#else
-#if defined(__khrplatform_h_)
-typedef khronos_intptr_t GLintptrARB;
-#else
-typedef ptrdiff_t GLintptrARB;
-#endif
-#endif
-#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ > 1060)
-#if defined(__khrplatform_h_)
-typedef khronos_ssize_t GLsizeiptr;
-#else
-typedef long GLsizeiptr;
-#endif
-#else
-#if defined(__khrplatform_h_)
-typedef khronos_ssize_t GLsizeiptr;
-#else
-typedef ptrdiff_t GLsizeiptr;
-#endif
-#endif
-#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ > 1060)
-#if defined(__khrplatform_h_)
-typedef khronos_ssize_t GLsizeiptrARB;
-#else
-typedef long GLsizeiptrARB;
-#endif
-#else
-#if defined(__khrplatform_h_)
-typedef khronos_ssize_t GLsizeiptrARB;
-#else
-typedef ptrdiff_t GLsizeiptrARB;
-#endif
-#endif
-typedef int64_t GLint64;
-typedef int64_t GLint64EXT;
-typedef uint64_t GLuint64;
-typedef uint64_t GLuint64EXT;
-typedef struct __GLsync *GLsync;
-struct _cl_context;
-struct _cl_event;
-typedef void (APIENTRY *GLDEBUGPROC)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam);
-typedef void (APIENTRY *GLDEBUGPROCARB)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam);
-typedef void (APIENTRY *GLDEBUGPROCKHR)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam);
-typedef void (APIENTRY *GLDEBUGPROCAMD)(GLuint id,GLenum category,GLenum severity,GLsizei length,const GLchar *message,void *userParam);
-typedef unsigned short GLhalfNV;
-typedef GLintptr GLvdpauSurfaceNV;
-typedef void (APIENTRY *GLVULKANPROCNV)(void);
-#define GL_DEPTH_BUFFER_BIT 0x00000100
-#define GL_STENCIL_BUFFER_BIT 0x00000400
-#define GL_COLOR_BUFFER_BIT 0x00004000
-#define GL_FALSE 0
-#define GL_TRUE 1
-#define GL_POINTS 0x0000
-#define GL_LINES 0x0001
-#define GL_LINE_LOOP 0x0002
-#define GL_LINE_STRIP 0x0003
-#define GL_TRIANGLES 0x0004
-#define GL_TRIANGLE_STRIP 0x0005
-#define GL_TRIANGLE_FAN 0x0006
-#define GL_QUADS 0x0007
-#define GL_NEVER 0x0200
-#define GL_LESS 0x0201
-#define GL_EQUAL 0x0202
-#define GL_LEQUAL 0x0203
-#define GL_GREATER 0x0204
-#define GL_NOTEQUAL 0x0205
-#define GL_GEQUAL 0x0206
-#define GL_ALWAYS 0x0207
-#define GL_ZERO 0
-#define GL_ONE 1
-#define GL_SRC_COLOR 0x0300
-#define GL_ONE_MINUS_SRC_COLOR 0x0301
-#define GL_SRC_ALPHA 0x0302
-#define GL_ONE_MINUS_SRC_ALPHA 0x0303
-#define GL_DST_ALPHA 0x0304
-#define GL_ONE_MINUS_DST_ALPHA 0x0305
-#define GL_DST_COLOR 0x0306
-#define GL_ONE_MINUS_DST_COLOR 0x0307
-#define GL_SRC_ALPHA_SATURATE 0x0308
-#define GL_NONE 0
-#define GL_FRONT_LEFT 0x0400
-#define GL_FRONT_RIGHT 0x0401
-#define GL_BACK_LEFT 0x0402
-#define GL_BACK_RIGHT 0x0403
-#define GL_FRONT 0x0404
-#define GL_BACK 0x0405
-#define GL_LEFT 0x0406
-#define GL_RIGHT 0x0407
-#define GL_FRONT_AND_BACK 0x0408
-#define GL_NO_ERROR 0
-#define GL_INVALID_ENUM 0x0500
-#define GL_INVALID_VALUE 0x0501
-#define GL_INVALID_OPERATION 0x0502
-#define GL_OUT_OF_MEMORY 0x0505
-#define GL_CW 0x0900
-#define GL_CCW 0x0901
-#define GL_POINT_SIZE 0x0B11
-#define GL_POINT_SIZE_RANGE 0x0B12
-#define GL_POINT_SIZE_GRANULARITY 0x0B13
-#define GL_LINE_SMOOTH 0x0B20
-#define GL_LINE_WIDTH 0x0B21
-#define GL_LINE_WIDTH_RANGE 0x0B22
-#define GL_LINE_WIDTH_GRANULARITY 0x0B23
-#define GL_POLYGON_MODE 0x0B40
-#define GL_POLYGON_SMOOTH 0x0B41
-#define GL_CULL_FACE 0x0B44
-#define GL_CULL_FACE_MODE 0x0B45
-#define GL_FRONT_FACE 0x0B46
-#define GL_DEPTH_RANGE 0x0B70
-#define GL_DEPTH_TEST 0x0B71
-#define GL_DEPTH_WRITEMASK 0x0B72
-#define GL_DEPTH_CLEAR_VALUE 0x0B73
-#define GL_DEPTH_FUNC 0x0B74
-#define GL_STENCIL_TEST 0x0B90
-#define GL_STENCIL_CLEAR_VALUE 0x0B91
-#define GL_STENCIL_FUNC 0x0B92
-#define GL_STENCIL_VALUE_MASK 0x0B93
-#define GL_STENCIL_FAIL 0x0B94
-#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95
-#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96
-#define GL_STENCIL_REF 0x0B97
-#define GL_STENCIL_WRITEMASK 0x0B98
-#define GL_VIEWPORT 0x0BA2
-#define GL_DITHER 0x0BD0
-#define GL_BLEND_DST 0x0BE0
-#define GL_BLEND_SRC 0x0BE1
-#define GL_BLEND 0x0BE2
-#define GL_LOGIC_OP_MODE 0x0BF0
-#define GL_DRAW_BUFFER 0x0C01
-#define GL_READ_BUFFER 0x0C02
-#define GL_SCISSOR_BOX 0x0C10
-#define GL_SCISSOR_TEST 0x0C11
-#define GL_COLOR_CLEAR_VALUE 0x0C22
-#define GL_COLOR_WRITEMASK 0x0C23
-#define GL_DOUBLEBUFFER 0x0C32
-#define GL_STEREO 0x0C33
-#define GL_LINE_SMOOTH_HINT 0x0C52
-#define GL_POLYGON_SMOOTH_HINT 0x0C53
-#define GL_UNPACK_SWAP_BYTES 0x0CF0
-#define GL_UNPACK_LSB_FIRST 0x0CF1
-#define GL_UNPACK_ROW_LENGTH 0x0CF2
-#define GL_UNPACK_SKIP_ROWS 0x0CF3
-#define GL_UNPACK_SKIP_PIXELS 0x0CF4
-#define GL_UNPACK_ALIGNMENT 0x0CF5
-#define GL_PACK_SWAP_BYTES 0x0D00
-#define GL_PACK_LSB_FIRST 0x0D01
-#define GL_PACK_ROW_LENGTH 0x0D02
-#define GL_PACK_SKIP_ROWS 0x0D03
-#define GL_PACK_SKIP_PIXELS 0x0D04
-#define GL_PACK_ALIGNMENT 0x0D05
-#define GL_MAX_TEXTURE_SIZE 0x0D33
-#define GL_MAX_VIEWPORT_DIMS 0x0D3A
-#define GL_SUBPIXEL_BITS 0x0D50
-#define GL_TEXTURE_1D 0x0DE0
-#define GL_TEXTURE_2D 0x0DE1
-#define GL_TEXTURE_WIDTH 0x1000
-#define GL_TEXTURE_HEIGHT 0x1001
-#define GL_TEXTURE_BORDER_COLOR 0x1004
-#define GL_DONT_CARE 0x1100
-#define GL_FASTEST 0x1101
-#define GL_NICEST 0x1102
-#define GL_BYTE 0x1400
-#define GL_UNSIGNED_BYTE 0x1401
-#define GL_SHORT 0x1402
-#define GL_UNSIGNED_SHORT 0x1403
-#define GL_INT 0x1404
-#define GL_UNSIGNED_INT 0x1405
-#define GL_FLOAT 0x1406
-#define GL_STACK_OVERFLOW 0x0503
-#define GL_STACK_UNDERFLOW 0x0504
-#define GL_CLEAR 0x1500
-#define GL_AND 0x1501
-#define GL_AND_REVERSE 0x1502
-#define GL_COPY 0x1503
-#define GL_AND_INVERTED 0x1504
-#define GL_NOOP 0x1505
-#define GL_XOR 0x1506
-#define GL_OR 0x1507
-#define GL_NOR 0x1508
-#define GL_EQUIV 0x1509
-#define GL_INVERT 0x150A
-#define GL_OR_REVERSE 0x150B
-#define GL_COPY_INVERTED 0x150C
-#define GL_OR_INVERTED 0x150D
-#define GL_NAND 0x150E
-#define GL_SET 0x150F
-#define GL_TEXTURE 0x1702
-#define GL_COLOR 0x1800
-#define GL_DEPTH 0x1801
-#define GL_STENCIL 0x1802
-#define GL_STENCIL_INDEX 0x1901
-#define GL_DEPTH_COMPONENT 0x1902
-#define GL_RED 0x1903
-#define GL_GREEN 0x1904
-#define GL_BLUE 0x1905
-#define GL_ALPHA 0x1906
-#define GL_RGB 0x1907
-#define GL_RGBA 0x1908
-#define GL_POINT 0x1B00
-#define GL_LINE 0x1B01
-#define GL_FILL 0x1B02
-#define GL_KEEP 0x1E00
-#define GL_REPLACE 0x1E01
-#define GL_INCR 0x1E02
-#define GL_DECR 0x1E03
-#define GL_VENDOR 0x1F00
-#define GL_RENDERER 0x1F01
-#define GL_VERSION 0x1F02
-#define GL_EXTENSIONS 0x1F03
-#define GL_NEAREST 0x2600
-#define GL_LINEAR 0x2601
-#define GL_NEAREST_MIPMAP_NEAREST 0x2700
-#define GL_LINEAR_MIPMAP_NEAREST 0x2701
-#define GL_NEAREST_MIPMAP_LINEAR 0x2702
-#define GL_LINEAR_MIPMAP_LINEAR 0x2703
-#define GL_TEXTURE_MAG_FILTER 0x2800
-#define GL_TEXTURE_MIN_FILTER 0x2801
-#define GL_TEXTURE_WRAP_S 0x2802
-#define GL_TEXTURE_WRAP_T 0x2803
-#define GL_REPEAT 0x2901
-#define GL_CURRENT_BIT 0x00000001
-#define GL_POINT_BIT 0x00000002
-#define GL_LINE_BIT 0x00000004
-#define GL_POLYGON_BIT 0x00000008
-#define GL_POLYGON_STIPPLE_BIT 0x00000010
-#define GL_PIXEL_MODE_BIT 0x00000020
-#define GL_LIGHTING_BIT 0x00000040
-#define GL_FOG_BIT 0x00000080
-#define GL_ACCUM_BUFFER_BIT 0x00000200
-#define GL_VIEWPORT_BIT 0x00000800
-#define GL_TRANSFORM_BIT 0x00001000
-#define GL_ENABLE_BIT 0x00002000
-#define GL_HINT_BIT 0x00008000
-#define GL_EVAL_BIT 0x00010000
-#define GL_LIST_BIT 0x00020000
-#define GL_TEXTURE_BIT 0x00040000
-#define GL_SCISSOR_BIT 0x00080000
-#define GL_ALL_ATTRIB_BITS 0xFFFFFFFF
-#define GL_QUAD_STRIP 0x0008
-#define GL_POLYGON 0x0009
-#define GL_ACCUM 0x0100
-#define GL_LOAD 0x0101
-#define GL_RETURN 0x0102
-#define GL_MULT 0x0103
-#define GL_ADD 0x0104
-#define GL_AUX0 0x0409
-#define GL_AUX1 0x040A
-#define GL_AUX2 0x040B
-#define GL_AUX3 0x040C
-#define GL_2D 0x0600
-#define GL_3D 0x0601
-#define GL_3D_COLOR 0x0602
-#define GL_3D_COLOR_TEXTURE 0x0603
-#define GL_4D_COLOR_TEXTURE 0x0604
-#define GL_PASS_THROUGH_TOKEN 0x0700
-#define GL_POINT_TOKEN 0x0701
-#define GL_LINE_TOKEN 0x0702
-#define GL_POLYGON_TOKEN 0x0703
-#define GL_BITMAP_TOKEN 0x0704
-#define GL_DRAW_PIXEL_TOKEN 0x0705
-#define GL_COPY_PIXEL_TOKEN 0x0706
-#define GL_LINE_RESET_TOKEN 0x0707
-#define GL_EXP 0x0800
-#define GL_EXP2 0x0801
-#define GL_COEFF 0x0A00
-#define GL_ORDER 0x0A01
-#define GL_DOMAIN 0x0A02
-#define GL_PIXEL_MAP_I_TO_I 0x0C70
-#define GL_PIXEL_MAP_S_TO_S 0x0C71
-#define GL_PIXEL_MAP_I_TO_R 0x0C72
-#define GL_PIXEL_MAP_I_TO_G 0x0C73
-#define GL_PIXEL_MAP_I_TO_B 0x0C74
-#define GL_PIXEL_MAP_I_TO_A 0x0C75
-#define GL_PIXEL_MAP_R_TO_R 0x0C76
-#define GL_PIXEL_MAP_G_TO_G 0x0C77
-#define GL_PIXEL_MAP_B_TO_B 0x0C78
-#define GL_PIXEL_MAP_A_TO_A 0x0C79
-#define GL_CURRENT_COLOR 0x0B00
-#define GL_CURRENT_INDEX 0x0B01
-#define GL_CURRENT_NORMAL 0x0B02
-#define GL_CURRENT_TEXTURE_COORDS 0x0B03
-#define GL_CURRENT_RASTER_COLOR 0x0B04
-#define GL_CURRENT_RASTER_INDEX 0x0B05
-#define GL_CURRENT_RASTER_TEXTURE_COORDS 0x0B06
-#define GL_CURRENT_RASTER_POSITION 0x0B07
-#define GL_CURRENT_RASTER_POSITION_VALID 0x0B08
-#define GL_CURRENT_RASTER_DISTANCE 0x0B09
-#define GL_POINT_SMOOTH 0x0B10
-#define GL_LINE_STIPPLE 0x0B24
-#define GL_LINE_STIPPLE_PATTERN 0x0B25
-#define GL_LINE_STIPPLE_REPEAT 0x0B26
-#define GL_LIST_MODE 0x0B30
-#define GL_MAX_LIST_NESTING 0x0B31
-#define GL_LIST_BASE 0x0B32
-#define GL_LIST_INDEX 0x0B33
-#define GL_POLYGON_STIPPLE 0x0B42
-#define GL_EDGE_FLAG 0x0B43
-#define GL_LIGHTING 0x0B50
-#define GL_LIGHT_MODEL_LOCAL_VIEWER 0x0B51
-#define GL_LIGHT_MODEL_TWO_SIDE 0x0B52
-#define GL_LIGHT_MODEL_AMBIENT 0x0B53
-#define GL_SHADE_MODEL 0x0B54
-#define GL_COLOR_MATERIAL_FACE 0x0B55
-#define GL_COLOR_MATERIAL_PARAMETER 0x0B56
-#define GL_COLOR_MATERIAL 0x0B57
-#define GL_FOG 0x0B60
-#define GL_FOG_INDEX 0x0B61
-#define GL_FOG_DENSITY 0x0B62
-#define GL_FOG_START 0x0B63
-#define GL_FOG_END 0x0B64
-#define GL_FOG_MODE 0x0B65
-#define GL_FOG_COLOR 0x0B66
-#define GL_ACCUM_CLEAR_VALUE 0x0B80
-#define GL_MATRIX_MODE 0x0BA0
-#define GL_NORMALIZE 0x0BA1
-#define GL_MODELVIEW_STACK_DEPTH 0x0BA3
-#define GL_PROJECTION_STACK_DEPTH 0x0BA4
-#define GL_TEXTURE_STACK_DEPTH 0x0BA5
-#define GL_MODELVIEW_MATRIX 0x0BA6
-#define GL_PROJECTION_MATRIX 0x0BA7
-#define GL_TEXTURE_MATRIX 0x0BA8
-#define GL_ATTRIB_STACK_DEPTH 0x0BB0
-#define GL_ALPHA_TEST 0x0BC0
-#define GL_ALPHA_TEST_FUNC 0x0BC1
-#define GL_ALPHA_TEST_REF 0x0BC2
-#define GL_LOGIC_OP 0x0BF1
-#define GL_AUX_BUFFERS 0x0C00
-#define GL_INDEX_CLEAR_VALUE 0x0C20
-#define GL_INDEX_WRITEMASK 0x0C21
-#define GL_INDEX_MODE 0x0C30
-#define GL_RGBA_MODE 0x0C31
-#define GL_RENDER_MODE 0x0C40
-#define GL_PERSPECTIVE_CORRECTION_HINT 0x0C50
-#define GL_POINT_SMOOTH_HINT 0x0C51
-#define GL_FOG_HINT 0x0C54
-#define GL_TEXTURE_GEN_S 0x0C60
-#define GL_TEXTURE_GEN_T 0x0C61
-#define GL_TEXTURE_GEN_R 0x0C62
-#define GL_TEXTURE_GEN_Q 0x0C63
-#define GL_PIXEL_MAP_I_TO_I_SIZE 0x0CB0
-#define GL_PIXEL_MAP_S_TO_S_SIZE 0x0CB1
-#define GL_PIXEL_MAP_I_TO_R_SIZE 0x0CB2
-#define GL_PIXEL_MAP_I_TO_G_SIZE 0x0CB3
-#define GL_PIXEL_MAP_I_TO_B_SIZE 0x0CB4
-#define GL_PIXEL_MAP_I_TO_A_SIZE 0x0CB5
-#define GL_PIXEL_MAP_R_TO_R_SIZE 0x0CB6
-#define GL_PIXEL_MAP_G_TO_G_SIZE 0x0CB7
-#define GL_PIXEL_MAP_B_TO_B_SIZE 0x0CB8
-#define GL_PIXEL_MAP_A_TO_A_SIZE 0x0CB9
-#define GL_MAP_COLOR 0x0D10
-#define GL_MAP_STENCIL 0x0D11
-#define GL_INDEX_SHIFT 0x0D12
-#define GL_INDEX_OFFSET 0x0D13
-#define GL_RED_SCALE 0x0D14
-#define GL_RED_BIAS 0x0D15
-#define GL_ZOOM_X 0x0D16
-#define GL_ZOOM_Y 0x0D17
-#define GL_GREEN_SCALE 0x0D18
-#define GL_GREEN_BIAS 0x0D19
-#define GL_BLUE_SCALE 0x0D1A
-#define GL_BLUE_BIAS 0x0D1B
-#define GL_ALPHA_SCALE 0x0D1C
-#define GL_ALPHA_BIAS 0x0D1D
-#define GL_DEPTH_SCALE 0x0D1E
-#define GL_DEPTH_BIAS 0x0D1F
-#define GL_MAX_EVAL_ORDER 0x0D30
-#define GL_MAX_LIGHTS 0x0D31
-#define GL_MAX_CLIP_PLANES 0x0D32
-#define GL_MAX_PIXEL_MAP_TABLE 0x0D34
-#define GL_MAX_ATTRIB_STACK_DEPTH 0x0D35
-#define GL_MAX_MODELVIEW_STACK_DEPTH 0x0D36
-#define GL_MAX_NAME_STACK_DEPTH 0x0D37
-#define GL_MAX_PROJECTION_STACK_DEPTH 0x0D38
-#define GL_MAX_TEXTURE_STACK_DEPTH 0x0D39
-#define GL_INDEX_BITS 0x0D51
-#define GL_RED_BITS 0x0D52
-#define GL_GREEN_BITS 0x0D53
-#define GL_BLUE_BITS 0x0D54
-#define GL_ALPHA_BITS 0x0D55
-#define GL_DEPTH_BITS 0x0D56
-#define GL_STENCIL_BITS 0x0D57
-#define GL_ACCUM_RED_BITS 0x0D58
-#define GL_ACCUM_GREEN_BITS 0x0D59
-#define GL_ACCUM_BLUE_BITS 0x0D5A
-#define GL_ACCUM_ALPHA_BITS 0x0D5B
-#define GL_NAME_STACK_DEPTH 0x0D70
-#define GL_AUTO_NORMAL 0x0D80
-#define GL_MAP1_COLOR_4 0x0D90
-#define GL_MAP1_INDEX 0x0D91
-#define GL_MAP1_NORMAL 0x0D92
-#define GL_MAP1_TEXTURE_COORD_1 0x0D93
-#define GL_MAP1_TEXTURE_COORD_2 0x0D94
-#define GL_MAP1_TEXTURE_COORD_3 0x0D95
-#define GL_MAP1_TEXTURE_COORD_4 0x0D96
-#define GL_MAP1_VERTEX_3 0x0D97
-#define GL_MAP1_VERTEX_4 0x0D98
-#define GL_MAP2_COLOR_4 0x0DB0
-#define GL_MAP2_INDEX 0x0DB1
-#define GL_MAP2_NORMAL 0x0DB2
-#define GL_MAP2_TEXTURE_COORD_1 0x0DB3
-#define GL_MAP2_TEXTURE_COORD_2 0x0DB4
-#define GL_MAP2_TEXTURE_COORD_3 0x0DB5
-#define GL_MAP2_TEXTURE_COORD_4 0x0DB6
-#define GL_MAP2_VERTEX_3 0x0DB7
-#define GL_MAP2_VERTEX_4 0x0DB8
-#define GL_MAP1_GRID_DOMAIN 0x0DD0
-#define GL_MAP1_GRID_SEGMENTS 0x0DD1
-#define GL_MAP2_GRID_DOMAIN 0x0DD2
-#define GL_MAP2_GRID_SEGMENTS 0x0DD3
-#define GL_TEXTURE_COMPONENTS 0x1003
-#define GL_TEXTURE_BORDER 0x1005
-#define GL_AMBIENT 0x1200
-#define GL_DIFFUSE 0x1201
-#define GL_SPECULAR 0x1202
-#define GL_POSITION 0x1203
-#define GL_SPOT_DIRECTION 0x1204
-#define GL_SPOT_EXPONENT 0x1205
-#define GL_SPOT_CUTOFF 0x1206
-#define GL_CONSTANT_ATTENUATION 0x1207
-#define GL_LINEAR_ATTENUATION 0x1208
-#define GL_QUADRATIC_ATTENUATION 0x1209
-#define GL_COMPILE 0x1300
-#define GL_COMPILE_AND_EXECUTE 0x1301
-#define GL_2_BYTES 0x1407
-#define GL_3_BYTES 0x1408
-#define GL_4_BYTES 0x1409
-#define GL_EMISSION 0x1600
-#define GL_SHININESS 0x1601
-#define GL_AMBIENT_AND_DIFFUSE 0x1602
-#define GL_COLOR_INDEXES 0x1603
-#define GL_MODELVIEW 0x1700
-#define GL_PROJECTION 0x1701
-#define GL_COLOR_INDEX 0x1900
-#define GL_LUMINANCE 0x1909
-#define GL_LUMINANCE_ALPHA 0x190A
-#define GL_BITMAP 0x1A00
-#define GL_RENDER 0x1C00
-#define GL_FEEDBACK 0x1C01
-#define GL_SELECT 0x1C02
-#define GL_FLAT 0x1D00
-#define GL_SMOOTH 0x1D01
-#define GL_S 0x2000
-#define GL_T 0x2001
-#define GL_R 0x2002
-#define GL_Q 0x2003
-#define GL_MODULATE 0x2100
-#define GL_DECAL 0x2101
-#define GL_TEXTURE_ENV_MODE 0x2200
-#define GL_TEXTURE_ENV_COLOR 0x2201
-#define GL_TEXTURE_ENV 0x2300
-#define GL_EYE_LINEAR 0x2400
-#define GL_OBJECT_LINEAR 0x2401
-#define GL_SPHERE_MAP 0x2402
-#define GL_TEXTURE_GEN_MODE 0x2500
-#define GL_OBJECT_PLANE 0x2501
-#define GL_EYE_PLANE 0x2502
-#define GL_CLAMP 0x2900
-#define GL_CLIP_PLANE0 0x3000
-#define GL_CLIP_PLANE1 0x3001
-#define GL_CLIP_PLANE2 0x3002
-#define GL_CLIP_PLANE3 0x3003
-#define GL_CLIP_PLANE4 0x3004
-#define GL_CLIP_PLANE5 0x3005
-#define GL_LIGHT0 0x4000
-#define GL_LIGHT1 0x4001
-#define GL_LIGHT2 0x4002
-#define GL_LIGHT3 0x4003
-#define GL_LIGHT4 0x4004
-#define GL_LIGHT5 0x4005
-#define GL_LIGHT6 0x4006
-#define GL_LIGHT7 0x4007
-#define GL_COLOR_LOGIC_OP 0x0BF2
-#define GL_POLYGON_OFFSET_UNITS 0x2A00
-#define GL_POLYGON_OFFSET_POINT 0x2A01
-#define GL_POLYGON_OFFSET_LINE 0x2A02
-#define GL_POLYGON_OFFSET_FILL 0x8037
-#define GL_POLYGON_OFFSET_FACTOR 0x8038
-#define GL_TEXTURE_BINDING_1D 0x8068
-#define GL_TEXTURE_BINDING_2D 0x8069
-#define GL_TEXTURE_INTERNAL_FORMAT 0x1003
-#define GL_TEXTURE_RED_SIZE 0x805C
-#define GL_TEXTURE_GREEN_SIZE 0x805D
-#define GL_TEXTURE_BLUE_SIZE 0x805E
-#define GL_TEXTURE_ALPHA_SIZE 0x805F
-#define GL_DOUBLE 0x140A
-#define GL_PROXY_TEXTURE_1D 0x8063
-#define GL_PROXY_TEXTURE_2D 0x8064
-#define GL_R3_G3_B2 0x2A10
-#define GL_RGB4 0x804F
-#define GL_RGB5 0x8050
-#define GL_RGB8 0x8051
-#define GL_RGB10 0x8052
-#define GL_RGB12 0x8053
-#define GL_RGB16 0x8054
-#define GL_RGBA2 0x8055
-#define GL_RGBA4 0x8056
-#define GL_RGB5_A1 0x8057
-#define GL_RGBA8 0x8058
-#define GL_RGB10_A2 0x8059
-#define GL_RGBA12 0x805A
-#define GL_RGBA16 0x805B
-#define GL_CLIENT_PIXEL_STORE_BIT 0x00000001
-#define GL_CLIENT_VERTEX_ARRAY_BIT 0x00000002
-#define GL_CLIENT_ALL_ATTRIB_BITS 0xFFFFFFFF
-#define GL_VERTEX_ARRAY_POINTER 0x808E
-#define GL_NORMAL_ARRAY_POINTER 0x808F
-#define GL_COLOR_ARRAY_POINTER 0x8090
-#define GL_INDEX_ARRAY_POINTER 0x8091
-#define GL_TEXTURE_COORD_ARRAY_POINTER 0x8092
-#define GL_EDGE_FLAG_ARRAY_POINTER 0x8093
-#define GL_FEEDBACK_BUFFER_POINTER 0x0DF0
-#define GL_SELECTION_BUFFER_POINTER 0x0DF3
-#define GL_CLIENT_ATTRIB_STACK_DEPTH 0x0BB1
-#define GL_INDEX_LOGIC_OP 0x0BF1
-#define GL_MAX_CLIENT_ATTRIB_STACK_DEPTH 0x0D3B
-#define GL_FEEDBACK_BUFFER_SIZE 0x0DF1
-#define GL_FEEDBACK_BUFFER_TYPE 0x0DF2
-#define GL_SELECTION_BUFFER_SIZE 0x0DF4
-#define GL_VERTEX_ARRAY 0x8074
-#define GL_NORMAL_ARRAY 0x8075
-#define GL_COLOR_ARRAY 0x8076
-#define GL_INDEX_ARRAY 0x8077
-#define GL_TEXTURE_COORD_ARRAY 0x8078
-#define GL_EDGE_FLAG_ARRAY 0x8079
-#define GL_VERTEX_ARRAY_SIZE 0x807A
-#define GL_VERTEX_ARRAY_TYPE 0x807B
-#define GL_VERTEX_ARRAY_STRIDE 0x807C
-#define GL_NORMAL_ARRAY_TYPE 0x807E
-#define GL_NORMAL_ARRAY_STRIDE 0x807F
-#define GL_COLOR_ARRAY_SIZE 0x8081
-#define GL_COLOR_ARRAY_TYPE 0x8082
-#define GL_COLOR_ARRAY_STRIDE 0x8083
-#define GL_INDEX_ARRAY_TYPE 0x8085
-#define GL_INDEX_ARRAY_STRIDE 0x8086
-#define GL_TEXTURE_COORD_ARRAY_SIZE 0x8088
-#define GL_TEXTURE_COORD_ARRAY_TYPE 0x8089
-#define GL_TEXTURE_COORD_ARRAY_STRIDE 0x808A
-#define GL_EDGE_FLAG_ARRAY_STRIDE 0x808C
-#define GL_TEXTURE_LUMINANCE_SIZE 0x8060
-#define GL_TEXTURE_INTENSITY_SIZE 0x8061
-#define GL_TEXTURE_PRIORITY 0x8066
-#define GL_TEXTURE_RESIDENT 0x8067
-#define GL_ALPHA4 0x803B
-#define GL_ALPHA8 0x803C
-#define GL_ALPHA12 0x803D
-#define GL_ALPHA16 0x803E
-#define GL_LUMINANCE4 0x803F
-#define GL_LUMINANCE8 0x8040
-#define GL_LUMINANCE12 0x8041
-#define GL_LUMINANCE16 0x8042
-#define GL_LUMINANCE4_ALPHA4 0x8043
-#define GL_LUMINANCE6_ALPHA2 0x8044
-#define GL_LUMINANCE8_ALPHA8 0x8045
-#define GL_LUMINANCE12_ALPHA4 0x8046
-#define GL_LUMINANCE12_ALPHA12 0x8047
-#define GL_LUMINANCE16_ALPHA16 0x8048
-#define GL_INTENSITY 0x8049
-#define GL_INTENSITY4 0x804A
-#define GL_INTENSITY8 0x804B
-#define GL_INTENSITY12 0x804C
-#define GL_INTENSITY16 0x804D
-#define GL_V2F 0x2A20
-#define GL_V3F 0x2A21
-#define GL_C4UB_V2F 0x2A22
-#define GL_C4UB_V3F 0x2A23
-#define GL_C3F_V3F 0x2A24
-#define GL_N3F_V3F 0x2A25
-#define GL_C4F_N3F_V3F 0x2A26
-#define GL_T2F_V3F 0x2A27
-#define GL_T4F_V4F 0x2A28
-#define GL_T2F_C4UB_V3F 0x2A29
-#define GL_T2F_C3F_V3F 0x2A2A
-#define GL_T2F_N3F_V3F 0x2A2B
-#define GL_T2F_C4F_N3F_V3F 0x2A2C
-#define GL_T4F_C4F_N3F_V4F 0x2A2D
-#define GL_UNSIGNED_BYTE_3_3_2 0x8032
-#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033
-#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034
-#define GL_UNSIGNED_INT_8_8_8_8 0x8035
-#define GL_UNSIGNED_INT_10_10_10_2 0x8036
-#define GL_TEXTURE_BINDING_3D 0x806A
-#define GL_PACK_SKIP_IMAGES 0x806B
-#define GL_PACK_IMAGE_HEIGHT 0x806C
-#define GL_UNPACK_SKIP_IMAGES 0x806D
-#define GL_UNPACK_IMAGE_HEIGHT 0x806E
-#define GL_TEXTURE_3D 0x806F
-#define GL_PROXY_TEXTURE_3D 0x8070
-#define GL_TEXTURE_DEPTH 0x8071
-#define GL_TEXTURE_WRAP_R 0x8072
-#define GL_MAX_3D_TEXTURE_SIZE 0x8073
-#define GL_UNSIGNED_BYTE_2_3_3_REV 0x8362
-#define GL_UNSIGNED_SHORT_5_6_5 0x8363
-#define GL_UNSIGNED_SHORT_5_6_5_REV 0x8364
-#define GL_UNSIGNED_SHORT_4_4_4_4_REV 0x8365
-#define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366
-#define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367
-#define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368
-#define GL_BGR 0x80E0
-#define GL_BGRA 0x80E1
-#define GL_MAX_ELEMENTS_VERTICES 0x80E8
-#define GL_MAX_ELEMENTS_INDICES 0x80E9
-#define GL_CLAMP_TO_EDGE 0x812F
-#define GL_TEXTURE_MIN_LOD 0x813A
-#define GL_TEXTURE_MAX_LOD 0x813B
-#define GL_TEXTURE_BASE_LEVEL 0x813C
-#define GL_TEXTURE_MAX_LEVEL 0x813D
-#define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12
-#define GL_SMOOTH_POINT_SIZE_GRANULARITY 0x0B13
-#define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22
-#define GL_SMOOTH_LINE_WIDTH_GRANULARITY 0x0B23
-#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E
-#define GL_RESCALE_NORMAL 0x803A
-#define GL_LIGHT_MODEL_COLOR_CONTROL 0x81F8
-#define GL_SINGLE_COLOR 0x81F9
-#define GL_SEPARATE_SPECULAR_COLOR 0x81FA
-#define GL_ALIASED_POINT_SIZE_RANGE 0x846D
-#define GL_TEXTURE0 0x84C0
-#define GL_TEXTURE1 0x84C1
-#define GL_TEXTURE2 0x84C2
-#define GL_TEXTURE3 0x84C3
-#define GL_TEXTURE4 0x84C4
-#define GL_TEXTURE5 0x84C5
-#define GL_TEXTURE6 0x84C6
-#define GL_TEXTURE7 0x84C7
-#define GL_TEXTURE8 0x84C8
-#define GL_TEXTURE9 0x84C9
-#define GL_TEXTURE10 0x84CA
-#define GL_TEXTURE11 0x84CB
-#define GL_TEXTURE12 0x84CC
-#define GL_TEXTURE13 0x84CD
-#define GL_TEXTURE14 0x84CE
-#define GL_TEXTURE15 0x84CF
-#define GL_TEXTURE16 0x84D0
-#define GL_TEXTURE17 0x84D1
-#define GL_TEXTURE18 0x84D2
-#define GL_TEXTURE19 0x84D3
-#define GL_TEXTURE20 0x84D4
-#define GL_TEXTURE21 0x84D5
-#define GL_TEXTURE22 0x84D6
-#define GL_TEXTURE23 0x84D7
-#define GL_TEXTURE24 0x84D8
-#define GL_TEXTURE25 0x84D9
-#define GL_TEXTURE26 0x84DA
-#define GL_TEXTURE27 0x84DB
-#define GL_TEXTURE28 0x84DC
-#define GL_TEXTURE29 0x84DD
-#define GL_TEXTURE30 0x84DE
-#define GL_TEXTURE31 0x84DF
-#define GL_ACTIVE_TEXTURE 0x84E0
-#define GL_MULTISAMPLE 0x809D
-#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E
-#define GL_SAMPLE_ALPHA_TO_ONE 0x809F
-#define GL_SAMPLE_COVERAGE 0x80A0
-#define GL_SAMPLE_BUFFERS 0x80A8
-#define GL_SAMPLES 0x80A9
-#define GL_SAMPLE_COVERAGE_VALUE 0x80AA
-#define GL_SAMPLE_COVERAGE_INVERT 0x80AB
-#define GL_TEXTURE_CUBE_MAP 0x8513
-#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514
-#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515
-#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516
-#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517
-#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518
-#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519
-#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A
-#define GL_PROXY_TEXTURE_CUBE_MAP 0x851B
-#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C
-#define GL_COMPRESSED_RGB 0x84ED
-#define GL_COMPRESSED_RGBA 0x84EE
-#define GL_TEXTURE_COMPRESSION_HINT 0x84EF
-#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE 0x86A0
-#define GL_TEXTURE_COMPRESSED 0x86A1
-#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
-#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3
-#define GL_CLAMP_TO_BORDER 0x812D
-#define GL_CLIENT_ACTIVE_TEXTURE 0x84E1
-#define GL_MAX_TEXTURE_UNITS 0x84E2
-#define GL_TRANSPOSE_MODELVIEW_MATRIX 0x84E3
-#define GL_TRANSPOSE_PROJECTION_MATRIX 0x84E4
-#define GL_TRANSPOSE_TEXTURE_MATRIX 0x84E5
-#define GL_TRANSPOSE_COLOR_MATRIX 0x84E6
-#define GL_MULTISAMPLE_BIT 0x20000000
-#define GL_NORMAL_MAP 0x8511
-#define GL_REFLECTION_MAP 0x8512
-#define GL_COMPRESSED_ALPHA 0x84E9
-#define GL_COMPRESSED_LUMINANCE 0x84EA
-#define GL_COMPRESSED_LUMINANCE_ALPHA 0x84EB
-#define GL_COMPRESSED_INTENSITY 0x84EC
-#define GL_COMBINE 0x8570
-#define GL_COMBINE_RGB 0x8571
-#define GL_COMBINE_ALPHA 0x8572
-#define GL_SOURCE0_RGB 0x8580
-#define GL_SOURCE1_RGB 0x8581
-#define GL_SOURCE2_RGB 0x8582
-#define GL_SOURCE0_ALPHA 0x8588
-#define GL_SOURCE1_ALPHA 0x8589
-#define GL_SOURCE2_ALPHA 0x858A
-#define GL_OPERAND0_RGB 0x8590
-#define GL_OPERAND1_RGB 0x8591
-#define GL_OPERAND2_RGB 0x8592
-#define GL_OPERAND0_ALPHA 0x8598
-#define GL_OPERAND1_ALPHA 0x8599
-#define GL_OPERAND2_ALPHA 0x859A
-#define GL_RGB_SCALE 0x8573
-#define GL_ADD_SIGNED 0x8574
-#define GL_INTERPOLATE 0x8575
-#define GL_SUBTRACT 0x84E7
-#define GL_CONSTANT 0x8576
-#define GL_PRIMARY_COLOR 0x8577
-#define GL_PREVIOUS 0x8578
-#define GL_DOT3_RGB 0x86AE
-#define GL_DOT3_RGBA 0x86AF
-#define GL_BLEND_DST_RGB 0x80C8
-#define GL_BLEND_SRC_RGB 0x80C9
-#define GL_BLEND_DST_ALPHA 0x80CA
-#define GL_BLEND_SRC_ALPHA 0x80CB
-#define GL_POINT_FADE_THRESHOLD_SIZE 0x8128
-#define GL_DEPTH_COMPONENT16 0x81A5
-#define GL_DEPTH_COMPONENT24 0x81A6
-#define GL_DEPTH_COMPONENT32 0x81A7
-#define GL_MIRRORED_REPEAT 0x8370
-#define GL_MAX_TEXTURE_LOD_BIAS 0x84FD
-#define GL_TEXTURE_LOD_BIAS 0x8501
-#define GL_INCR_WRAP 0x8507
-#define GL_DECR_WRAP 0x8508
-#define GL_TEXTURE_DEPTH_SIZE 0x884A
-#define GL_TEXTURE_COMPARE_MODE 0x884C
-#define GL_TEXTURE_COMPARE_FUNC 0x884D
-#define GL_POINT_SIZE_MIN 0x8126
-#define GL_POINT_SIZE_MAX 0x8127
-#define GL_POINT_DISTANCE_ATTENUATION 0x8129
-#define GL_GENERATE_MIPMAP 0x8191
-#define GL_GENERATE_MIPMAP_HINT 0x8192
-#define GL_FOG_COORDINATE_SOURCE 0x8450
-#define GL_FOG_COORDINATE 0x8451
-#define GL_FRAGMENT_DEPTH 0x8452
-#define GL_CURRENT_FOG_COORDINATE 0x8453
-#define GL_FOG_COORDINATE_ARRAY_TYPE 0x8454
-#define GL_FOG_COORDINATE_ARRAY_STRIDE 0x8455
-#define GL_FOG_COORDINATE_ARRAY_POINTER 0x8456
-#define GL_FOG_COORDINATE_ARRAY 0x8457
-#define GL_COLOR_SUM 0x8458
-#define GL_CURRENT_SECONDARY_COLOR 0x8459
-#define GL_SECONDARY_COLOR_ARRAY_SIZE 0x845A
-#define GL_SECONDARY_COLOR_ARRAY_TYPE 0x845B
-#define GL_SECONDARY_COLOR_ARRAY_STRIDE 0x845C
-#define GL_SECONDARY_COLOR_ARRAY_POINTER 0x845D
-#define GL_SECONDARY_COLOR_ARRAY 0x845E
-#define GL_TEXTURE_FILTER_CONTROL 0x8500
-#define GL_DEPTH_TEXTURE_MODE 0x884B
-#define GL_COMPARE_R_TO_TEXTURE 0x884E
-#define GL_BLEND_COLOR 0x8005
-#define GL_BLEND_EQUATION 0x8009
-#define GL_CONSTANT_COLOR 0x8001
-#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002
-#define GL_CONSTANT_ALPHA 0x8003
-#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004
-#define GL_FUNC_ADD 0x8006
-#define GL_FUNC_REVERSE_SUBTRACT 0x800B
-#define GL_FUNC_SUBTRACT 0x800A
-#define GL_MIN 0x8007
-#define GL_MAX 0x8008
-#define GL_BUFFER_SIZE 0x8764
-#define GL_BUFFER_USAGE 0x8765
-#define GL_QUERY_COUNTER_BITS 0x8864
-#define GL_CURRENT_QUERY 0x8865
-#define GL_QUERY_RESULT 0x8866
-#define GL_QUERY_RESULT_AVAILABLE 0x8867
-#define GL_ARRAY_BUFFER 0x8892
-#define GL_ELEMENT_ARRAY_BUFFER 0x8893
-#define GL_ARRAY_BUFFER_BINDING 0x8894
-#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895
-#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F
-#define GL_READ_ONLY 0x88B8
-#define GL_WRITE_ONLY 0x88B9
-#define GL_READ_WRITE 0x88BA
-#define GL_BUFFER_ACCESS 0x88BB
-#define GL_BUFFER_MAPPED 0x88BC
-#define GL_BUFFER_MAP_POINTER 0x88BD
-#define GL_STREAM_DRAW 0x88E0
-#define GL_STREAM_READ 0x88E1
-#define GL_STREAM_COPY 0x88E2
-#define GL_STATIC_DRAW 0x88E4
-#define GL_STATIC_READ 0x88E5
-#define GL_STATIC_COPY 0x88E6
-#define GL_DYNAMIC_DRAW 0x88E8
-#define GL_DYNAMIC_READ 0x88E9
-#define GL_DYNAMIC_COPY 0x88EA
-#define GL_SAMPLES_PASSED 0x8914
-#define GL_SRC1_ALPHA 0x8589
-#define GL_VERTEX_ARRAY_BUFFER_BINDING 0x8896
-#define GL_NORMAL_ARRAY_BUFFER_BINDING 0x8897
-#define GL_COLOR_ARRAY_BUFFER_BINDING 0x8898
-#define GL_INDEX_ARRAY_BUFFER_BINDING 0x8899
-#define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING 0x889A
-#define GL_EDGE_FLAG_ARRAY_BUFFER_BINDING 0x889B
-#define GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING 0x889C
-#define GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING 0x889D
-#define GL_WEIGHT_ARRAY_BUFFER_BINDING 0x889E
-#define GL_FOG_COORD_SRC 0x8450
-#define GL_FOG_COORD 0x8451
-#define GL_CURRENT_FOG_COORD 0x8453
-#define GL_FOG_COORD_ARRAY_TYPE 0x8454
-#define GL_FOG_COORD_ARRAY_STRIDE 0x8455
-#define GL_FOG_COORD_ARRAY_POINTER 0x8456
-#define GL_FOG_COORD_ARRAY 0x8457
-#define GL_FOG_COORD_ARRAY_BUFFER_BINDING 0x889D
-#define GL_SRC0_RGB 0x8580
-#define GL_SRC1_RGB 0x8581
-#define GL_SRC2_RGB 0x8582
-#define GL_SRC0_ALPHA 0x8588
-#define GL_SRC2_ALPHA 0x858A
-#define GL_BLEND_EQUATION_RGB 0x8009
-#define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622
-#define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623
-#define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624
-#define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625
-#define GL_CURRENT_VERTEX_ATTRIB 0x8626
-#define GL_VERTEX_PROGRAM_POINT_SIZE 0x8642
-#define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645
-#define GL_STENCIL_BACK_FUNC 0x8800
-#define GL_STENCIL_BACK_FAIL 0x8801
-#define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802
-#define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803
-#define GL_MAX_DRAW_BUFFERS 0x8824
-#define GL_DRAW_BUFFER0 0x8825
-#define GL_DRAW_BUFFER1 0x8826
-#define GL_DRAW_BUFFER2 0x8827
-#define GL_DRAW_BUFFER3 0x8828
-#define GL_DRAW_BUFFER4 0x8829
-#define GL_DRAW_BUFFER5 0x882A
-#define GL_DRAW_BUFFER6 0x882B
-#define GL_DRAW_BUFFER7 0x882C
-#define GL_DRAW_BUFFER8 0x882D
-#define GL_DRAW_BUFFER9 0x882E
-#define GL_DRAW_BUFFER10 0x882F
-#define GL_DRAW_BUFFER11 0x8830
-#define GL_DRAW_BUFFER12 0x8831
-#define GL_DRAW_BUFFER13 0x8832
-#define GL_DRAW_BUFFER14 0x8833
-#define GL_DRAW_BUFFER15 0x8834
-#define GL_BLEND_EQUATION_ALPHA 0x883D
-#define GL_MAX_VERTEX_ATTRIBS 0x8869
-#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A
-#define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872
-#define GL_FRAGMENT_SHADER 0x8B30
-#define GL_VERTEX_SHADER 0x8B31
-#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS 0x8B49
-#define GL_MAX_VERTEX_UNIFORM_COMPONENTS 0x8B4A
-#define GL_MAX_VARYING_FLOATS 0x8B4B
-#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C
-#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D
-#define GL_SHADER_TYPE 0x8B4F
-#define GL_FLOAT_VEC2 0x8B50
-#define GL_FLOAT_VEC3 0x8B51
-#define GL_FLOAT_VEC4 0x8B52
-#define GL_INT_VEC2 0x8B53
-#define GL_INT_VEC3 0x8B54
-#define GL_INT_VEC4 0x8B55
-#define GL_BOOL 0x8B56
-#define GL_BOOL_VEC2 0x8B57
-#define GL_BOOL_VEC3 0x8B58
-#define GL_BOOL_VEC4 0x8B59
-#define GL_FLOAT_MAT2 0x8B5A
-#define GL_FLOAT_MAT3 0x8B5B
-#define GL_FLOAT_MAT4 0x8B5C
-#define GL_SAMPLER_1D 0x8B5D
-#define GL_SAMPLER_2D 0x8B5E
-#define GL_SAMPLER_3D 0x8B5F
-#define GL_SAMPLER_CUBE 0x8B60
-#define GL_SAMPLER_1D_SHADOW 0x8B61
-#define GL_SAMPLER_2D_SHADOW 0x8B62
-#define GL_DELETE_STATUS 0x8B80
-#define GL_COMPILE_STATUS 0x8B81
-#define GL_LINK_STATUS 0x8B82
-#define GL_VALIDATE_STATUS 0x8B83
-#define GL_INFO_LOG_LENGTH 0x8B84
-#define GL_ATTACHED_SHADERS 0x8B85
-#define GL_ACTIVE_UNIFORMS 0x8B86
-#define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87
-#define GL_SHADER_SOURCE_LENGTH 0x8B88
-#define GL_ACTIVE_ATTRIBUTES 0x8B89
-#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A
-#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT 0x8B8B
-#define GL_SHADING_LANGUAGE_VERSION 0x8B8C
-#define GL_CURRENT_PROGRAM 0x8B8D
-#define GL_POINT_SPRITE_COORD_ORIGIN 0x8CA0
-#define GL_LOWER_LEFT 0x8CA1
-#define GL_UPPER_LEFT 0x8CA2
-#define GL_STENCIL_BACK_REF 0x8CA3
-#define GL_STENCIL_BACK_VALUE_MASK 0x8CA4
-#define GL_STENCIL_BACK_WRITEMASK 0x8CA5
-#define GL_VERTEX_PROGRAM_TWO_SIDE 0x8643
-#define GL_POINT_SPRITE 0x8861
-#define GL_COORD_REPLACE 0x8862
-#define GL_MAX_TEXTURE_COORDS 0x8871
-#define GL_PIXEL_PACK_BUFFER 0x88EB
-#define GL_PIXEL_UNPACK_BUFFER 0x88EC
-#define GL_PIXEL_PACK_BUFFER_BINDING 0x88ED
-#define GL_PIXEL_UNPACK_BUFFER_BINDING 0x88EF
-#define GL_FLOAT_MAT2x3 0x8B65
-#define GL_FLOAT_MAT2x4 0x8B66
-#define GL_FLOAT_MAT3x2 0x8B67
-#define GL_FLOAT_MAT3x4 0x8B68
-#define GL_FLOAT_MAT4x2 0x8B69
-#define GL_FLOAT_MAT4x3 0x8B6A
-#define GL_SRGB 0x8C40
-#define GL_SRGB8 0x8C41
-#define GL_SRGB_ALPHA 0x8C42
-#define GL_SRGB8_ALPHA8 0x8C43
-#define GL_COMPRESSED_SRGB 0x8C48
-#define GL_COMPRESSED_SRGB_ALPHA 0x8C49
-#define GL_CURRENT_RASTER_SECONDARY_COLOR 0x845F
-#define GL_SLUMINANCE_ALPHA 0x8C44
-#define GL_SLUMINANCE8_ALPHA8 0x8C45
-#define GL_SLUMINANCE 0x8C46
-#define GL_SLUMINANCE8 0x8C47
-#define GL_COMPRESSED_SLUMINANCE 0x8C4A
-#define GL_COMPRESSED_SLUMINANCE_ALPHA 0x8C4B
-#define GL_COMPARE_REF_TO_TEXTURE 0x884E
-#define GL_CLIP_DISTANCE0 0x3000
-#define GL_CLIP_DISTANCE1 0x3001
-#define GL_CLIP_DISTANCE2 0x3002
-#define GL_CLIP_DISTANCE3 0x3003
-#define GL_CLIP_DISTANCE4 0x3004
-#define GL_CLIP_DISTANCE5 0x3005
-#define GL_CLIP_DISTANCE6 0x3006
-#define GL_CLIP_DISTANCE7 0x3007
-#define GL_MAX_CLIP_DISTANCES 0x0D32
-#define GL_MAJOR_VERSION 0x821B
-#define GL_MINOR_VERSION 0x821C
-#define GL_NUM_EXTENSIONS 0x821D
-#define GL_CONTEXT_FLAGS 0x821E
-#define GL_COMPRESSED_RED 0x8225
-#define GL_COMPRESSED_RG 0x8226
-#define GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT 0x00000001
-#define GL_RGBA32F 0x8814
-#define GL_RGB32F 0x8815
-#define GL_RGBA16F 0x881A
-#define GL_RGB16F 0x881B
-#define GL_VERTEX_ATTRIB_ARRAY_INTEGER 0x88FD
-#define GL_MAX_ARRAY_TEXTURE_LAYERS 0x88FF
-#define GL_MIN_PROGRAM_TEXEL_OFFSET 0x8904
-#define GL_MAX_PROGRAM_TEXEL_OFFSET 0x8905
-#define GL_CLAMP_READ_COLOR 0x891C
-#define GL_FIXED_ONLY 0x891D
-#define GL_MAX_VARYING_COMPONENTS 0x8B4B
-#define GL_TEXTURE_1D_ARRAY 0x8C18
-#define GL_PROXY_TEXTURE_1D_ARRAY 0x8C19
-#define GL_TEXTURE_2D_ARRAY 0x8C1A
-#define GL_PROXY_TEXTURE_2D_ARRAY 0x8C1B
-#define GL_TEXTURE_BINDING_1D_ARRAY 0x8C1C
-#define GL_TEXTURE_BINDING_2D_ARRAY 0x8C1D
-#define GL_R11F_G11F_B10F 0x8C3A
-#define GL_UNSIGNED_INT_10F_11F_11F_REV 0x8C3B
-#define GL_RGB9_E5 0x8C3D
-#define GL_UNSIGNED_INT_5_9_9_9_REV 0x8C3E
-#define GL_TEXTURE_SHARED_SIZE 0x8C3F
-#define GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH 0x8C76
-#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE 0x8C7F
-#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS 0x8C80
-#define GL_TRANSFORM_FEEDBACK_VARYINGS 0x8C83
-#define GL_TRANSFORM_FEEDBACK_BUFFER_START 0x8C84
-#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE 0x8C85
-#define GL_PRIMITIVES_GENERATED 0x8C87
-#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN 0x8C88
-#define GL_RASTERIZER_DISCARD 0x8C89
-#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS 0x8C8A
-#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS 0x8C8B
-#define GL_INTERLEAVED_ATTRIBS 0x8C8C
-#define GL_SEPARATE_ATTRIBS 0x8C8D
-#define GL_TRANSFORM_FEEDBACK_BUFFER 0x8C8E
-#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING 0x8C8F
-#define GL_RGBA32UI 0x8D70
-#define GL_RGB32UI 0x8D71
-#define GL_RGBA16UI 0x8D76
-#define GL_RGB16UI 0x8D77
-#define GL_RGBA8UI 0x8D7C
-#define GL_RGB8UI 0x8D7D
-#define GL_RGBA32I 0x8D82
-#define GL_RGB32I 0x8D83
-#define GL_RGBA16I 0x8D88
-#define GL_RGB16I 0x8D89
-#define GL_RGBA8I 0x8D8E
-#define GL_RGB8I 0x8D8F
-#define GL_RED_INTEGER 0x8D94
-#define GL_GREEN_INTEGER 0x8D95
-#define GL_BLUE_INTEGER 0x8D96
-#define GL_RGB_INTEGER 0x8D98
-#define GL_RGBA_INTEGER 0x8D99
-#define GL_BGR_INTEGER 0x8D9A
-#define GL_BGRA_INTEGER 0x8D9B
-#define GL_SAMPLER_1D_ARRAY 0x8DC0
-#define GL_SAMPLER_2D_ARRAY 0x8DC1
-#define GL_SAMPLER_1D_ARRAY_SHADOW 0x8DC3
-#define GL_SAMPLER_2D_ARRAY_SHADOW 0x8DC4
-#define GL_SAMPLER_CUBE_SHADOW 0x8DC5
-#define GL_UNSIGNED_INT_VEC2 0x8DC6
-#define GL_UNSIGNED_INT_VEC3 0x8DC7
-#define GL_UNSIGNED_INT_VEC4 0x8DC8
-#define GL_INT_SAMPLER_1D 0x8DC9
-#define GL_INT_SAMPLER_2D 0x8DCA
-#define GL_INT_SAMPLER_3D 0x8DCB
-#define GL_INT_SAMPLER_CUBE 0x8DCC
-#define GL_INT_SAMPLER_1D_ARRAY 0x8DCE
-#define GL_INT_SAMPLER_2D_ARRAY 0x8DCF
-#define GL_UNSIGNED_INT_SAMPLER_1D 0x8DD1
-#define GL_UNSIGNED_INT_SAMPLER_2D 0x8DD2
-#define GL_UNSIGNED_INT_SAMPLER_3D 0x8DD3
-#define GL_UNSIGNED_INT_SAMPLER_CUBE 0x8DD4
-#define GL_UNSIGNED_INT_SAMPLER_1D_ARRAY 0x8DD6
-#define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY 0x8DD7
-#define GL_QUERY_WAIT 0x8E13
-#define GL_QUERY_NO_WAIT 0x8E14
-#define GL_QUERY_BY_REGION_WAIT 0x8E15
-#define GL_QUERY_BY_REGION_NO_WAIT 0x8E16
-#define GL_BUFFER_ACCESS_FLAGS 0x911F
-#define GL_BUFFER_MAP_LENGTH 0x9120
-#define GL_BUFFER_MAP_OFFSET 0x9121
-#define GL_DEPTH_COMPONENT32F 0x8CAC
-#define GL_DEPTH32F_STENCIL8 0x8CAD
-#define GL_FLOAT_32_UNSIGNED_INT_24_8_REV 0x8DAD
-#define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506
-#define GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING 0x8210
-#define GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE 0x8211
-#define GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE 0x8212
-#define GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE 0x8213
-#define GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE 0x8214
-#define GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE 0x8215
-#define GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE 0x8216
-#define GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE 0x8217
-#define GL_FRAMEBUFFER_DEFAULT 0x8218
-#define GL_FRAMEBUFFER_UNDEFINED 0x8219
-#define GL_DEPTH_STENCIL_ATTACHMENT 0x821A
-#define GL_MAX_RENDERBUFFER_SIZE 0x84E8
-#define GL_DEPTH_STENCIL 0x84F9
-#define GL_UNSIGNED_INT_24_8 0x84FA
-#define GL_DEPTH24_STENCIL8 0x88F0
-#define GL_TEXTURE_STENCIL_SIZE 0x88F1
-#define GL_TEXTURE_RED_TYPE 0x8C10
-#define GL_TEXTURE_GREEN_TYPE 0x8C11
-#define GL_TEXTURE_BLUE_TYPE 0x8C12
-#define GL_TEXTURE_ALPHA_TYPE 0x8C13
-#define GL_TEXTURE_DEPTH_TYPE 0x8C16
-#define GL_UNSIGNED_NORMALIZED 0x8C17
-#define GL_FRAMEBUFFER_BINDING 0x8CA6
-#define GL_DRAW_FRAMEBUFFER_BINDING 0x8CA6
-#define GL_RENDERBUFFER_BINDING 0x8CA7
-#define GL_READ_FRAMEBUFFER 0x8CA8
-#define GL_DRAW_FRAMEBUFFER 0x8CA9
-#define GL_READ_FRAMEBUFFER_BINDING 0x8CAA
-#define GL_RENDERBUFFER_SAMPLES 0x8CAB
-#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0
-#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1
-#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2
-#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3
-#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER 0x8CD4
-#define GL_FRAMEBUFFER_COMPLETE 0x8CD5
-#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6
-#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7
-#define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER 0x8CDB
-#define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER 0x8CDC
-#define GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD
-#define GL_MAX_COLOR_ATTACHMENTS 0x8CDF
-#define GL_COLOR_ATTACHMENT0 0x8CE0
-#define GL_COLOR_ATTACHMENT1 0x8CE1
-#define GL_COLOR_ATTACHMENT2 0x8CE2
-#define GL_COLOR_ATTACHMENT3 0x8CE3
-#define GL_COLOR_ATTACHMENT4 0x8CE4
-#define GL_COLOR_ATTACHMENT5 0x8CE5
-#define GL_COLOR_ATTACHMENT6 0x8CE6
-#define GL_COLOR_ATTACHMENT7 0x8CE7
-#define GL_COLOR_ATTACHMENT8 0x8CE8
-#define GL_COLOR_ATTACHMENT9 0x8CE9
-#define GL_COLOR_ATTACHMENT10 0x8CEA
-#define GL_COLOR_ATTACHMENT11 0x8CEB
-#define GL_COLOR_ATTACHMENT12 0x8CEC
-#define GL_COLOR_ATTACHMENT13 0x8CED
-#define GL_COLOR_ATTACHMENT14 0x8CEE
-#define GL_COLOR_ATTACHMENT15 0x8CEF
-#define GL_COLOR_ATTACHMENT16 0x8CF0
-#define GL_COLOR_ATTACHMENT17 0x8CF1
-#define GL_COLOR_ATTACHMENT18 0x8CF2
-#define GL_COLOR_ATTACHMENT19 0x8CF3
-#define GL_COLOR_ATTACHMENT20 0x8CF4
-#define GL_COLOR_ATTACHMENT21 0x8CF5
-#define GL_COLOR_ATTACHMENT22 0x8CF6
-#define GL_COLOR_ATTACHMENT23 0x8CF7
-#define GL_COLOR_ATTACHMENT24 0x8CF8
-#define GL_COLOR_ATTACHMENT25 0x8CF9
-#define GL_COLOR_ATTACHMENT26 0x8CFA
-#define GL_COLOR_ATTACHMENT27 0x8CFB
-#define GL_COLOR_ATTACHMENT28 0x8CFC
-#define GL_COLOR_ATTACHMENT29 0x8CFD
-#define GL_COLOR_ATTACHMENT30 0x8CFE
-#define GL_COLOR_ATTACHMENT31 0x8CFF
-#define GL_DEPTH_ATTACHMENT 0x8D00
-#define GL_STENCIL_ATTACHMENT 0x8D20
-#define GL_FRAMEBUFFER 0x8D40
-#define GL_RENDERBUFFER 0x8D41
-#define GL_RENDERBUFFER_WIDTH 0x8D42
-#define GL_RENDERBUFFER_HEIGHT 0x8D43
-#define GL_RENDERBUFFER_INTERNAL_FORMAT 0x8D44
-#define GL_STENCIL_INDEX1 0x8D46
-#define GL_STENCIL_INDEX4 0x8D47
-#define GL_STENCIL_INDEX8 0x8D48
-#define GL_STENCIL_INDEX16 0x8D49
-#define GL_RENDERBUFFER_RED_SIZE 0x8D50
-#define GL_RENDERBUFFER_GREEN_SIZE 0x8D51
-#define GL_RENDERBUFFER_BLUE_SIZE 0x8D52
-#define GL_RENDERBUFFER_ALPHA_SIZE 0x8D53
-#define GL_RENDERBUFFER_DEPTH_SIZE 0x8D54
-#define GL_RENDERBUFFER_STENCIL_SIZE 0x8D55
-#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE 0x8D56
-#define GL_MAX_SAMPLES 0x8D57
-#define GL_INDEX 0x8222
-#define GL_TEXTURE_LUMINANCE_TYPE 0x8C14
-#define GL_TEXTURE_INTENSITY_TYPE 0x8C15
-#define GL_FRAMEBUFFER_SRGB 0x8DB9
-#define GL_HALF_FLOAT 0x140B
-#define GL_MAP_READ_BIT 0x0001
-#define GL_MAP_WRITE_BIT 0x0002
-#define GL_MAP_INVALIDATE_RANGE_BIT 0x0004
-#define GL_MAP_INVALIDATE_BUFFER_BIT 0x0008
-#define GL_MAP_FLUSH_EXPLICIT_BIT 0x0010
-#define GL_MAP_UNSYNCHRONIZED_BIT 0x0020
-#define GL_COMPRESSED_RED_RGTC1 0x8DBB
-#define GL_COMPRESSED_SIGNED_RED_RGTC1 0x8DBC
-#define GL_COMPRESSED_RG_RGTC2 0x8DBD
-#define GL_COMPRESSED_SIGNED_RG_RGTC2 0x8DBE
-#define GL_RG 0x8227
-#define GL_RG_INTEGER 0x8228
-#define GL_R8 0x8229
-#define GL_R16 0x822A
-#define GL_RG8 0x822B
-#define GL_RG16 0x822C
-#define GL_R16F 0x822D
-#define GL_R32F 0x822E
-#define GL_RG16F 0x822F
-#define GL_RG32F 0x8230
-#define GL_R8I 0x8231
-#define GL_R8UI 0x8232
-#define GL_R16I 0x8233
-#define GL_R16UI 0x8234
-#define GL_R32I 0x8235
-#define GL_R32UI 0x8236
-#define GL_RG8I 0x8237
-#define GL_RG8UI 0x8238
-#define GL_RG16I 0x8239
-#define GL_RG16UI 0x823A
-#define GL_RG32I 0x823B
-#define GL_RG32UI 0x823C
-#define GL_VERTEX_ARRAY_BINDING 0x85B5
-#define GL_CLAMP_VERTEX_COLOR 0x891A
-#define GL_CLAMP_FRAGMENT_COLOR 0x891B
-#define GL_ALPHA_INTEGER 0x8D97
-#define GL_SAMPLER_2D_RECT 0x8B63
-#define GL_SAMPLER_2D_RECT_SHADOW 0x8B64
-#define GL_SAMPLER_BUFFER 0x8DC2
-#define GL_INT_SAMPLER_2D_RECT 0x8DCD
-#define GL_INT_SAMPLER_BUFFER 0x8DD0
-#define GL_UNSIGNED_INT_SAMPLER_2D_RECT 0x8DD5
-#define GL_UNSIGNED_INT_SAMPLER_BUFFER 0x8DD8
-#define GL_TEXTURE_BUFFER 0x8C2A
-#define GL_MAX_TEXTURE_BUFFER_SIZE 0x8C2B
-#define GL_TEXTURE_BINDING_BUFFER 0x8C2C
-#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING 0x8C2D
-#define GL_TEXTURE_RECTANGLE 0x84F5
-#define GL_TEXTURE_BINDING_RECTANGLE 0x84F6
-#define GL_PROXY_TEXTURE_RECTANGLE 0x84F7
-#define GL_MAX_RECTANGLE_TEXTURE_SIZE 0x84F8
-#define GL_R8_SNORM 0x8F94
-#define GL_RG8_SNORM 0x8F95
-#define GL_RGB8_SNORM 0x8F96
-#define GL_RGBA8_SNORM 0x8F97
-#define GL_R16_SNORM 0x8F98
-#define GL_RG16_SNORM 0x8F99
-#define GL_RGB16_SNORM 0x8F9A
-#define GL_RGBA16_SNORM 0x8F9B
-#define GL_SIGNED_NORMALIZED 0x8F9C
-#define GL_PRIMITIVE_RESTART 0x8F9D
-#define GL_PRIMITIVE_RESTART_INDEX 0x8F9E
-#define GL_COPY_READ_BUFFER 0x8F36
-#define GL_COPY_WRITE_BUFFER 0x8F37
-#define GL_UNIFORM_BUFFER 0x8A11
-#define GL_UNIFORM_BUFFER_BINDING 0x8A28
-#define GL_UNIFORM_BUFFER_START 0x8A29
-#define GL_UNIFORM_BUFFER_SIZE 0x8A2A
-#define GL_MAX_VERTEX_UNIFORM_BLOCKS 0x8A2B
-#define GL_MAX_GEOMETRY_UNIFORM_BLOCKS 0x8A2C
-#define GL_MAX_FRAGMENT_UNIFORM_BLOCKS 0x8A2D
-#define GL_MAX_COMBINED_UNIFORM_BLOCKS 0x8A2E
-#define GL_MAX_UNIFORM_BUFFER_BINDINGS 0x8A2F
-#define GL_MAX_UNIFORM_BLOCK_SIZE 0x8A30
-#define GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS 0x8A31
-#define GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS 0x8A32
-#define GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS 0x8A33
-#define GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT 0x8A34
-#define GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH 0x8A35
-#define GL_ACTIVE_UNIFORM_BLOCKS 0x8A36
-#define GL_UNIFORM_TYPE 0x8A37
-#define GL_UNIFORM_SIZE 0x8A38
-#define GL_UNIFORM_NAME_LENGTH 0x8A39
-#define GL_UNIFORM_BLOCK_INDEX 0x8A3A
-#define GL_UNIFORM_OFFSET 0x8A3B
-#define GL_UNIFORM_ARRAY_STRIDE 0x8A3C
-#define GL_UNIFORM_MATRIX_STRIDE 0x8A3D
-#define GL_UNIFORM_IS_ROW_MAJOR 0x8A3E
-#define GL_UNIFORM_BLOCK_BINDING 0x8A3F
-#define GL_UNIFORM_BLOCK_DATA_SIZE 0x8A40
-#define GL_UNIFORM_BLOCK_NAME_LENGTH 0x8A41
-#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS 0x8A42
-#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES 0x8A43
-#define GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER 0x8A44
-#define GL_UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER 0x8A45
-#define GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER 0x8A46
-#define GL_INVALID_INDEX 0xFFFFFFFF
-#define GL_FIXED 0x140C
-#define GL_MAX_VERTEX_UNIFORM_VECTORS 0x8DFB
-#define GL_MAX_VARYING_VECTORS 0x8DFC
-#define GL_MAX_FRAGMENT_UNIFORM_VECTORS 0x8DFD
-#define GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A
-#define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B
-#define GL_SHADER_COMPILER 0x8DFA
-#define GL_SHADER_BINARY_FORMATS 0x8DF8
-#define GL_NUM_SHADER_BINARY_FORMATS 0x8DF9
-#define GL_LOW_FLOAT 0x8DF0
-#define GL_MEDIUM_FLOAT 0x8DF1
-#define GL_HIGH_FLOAT 0x8DF2
-#define GL_LOW_INT 0x8DF3
-#define GL_MEDIUM_INT 0x8DF4
-#define GL_HIGH_INT 0x8DF5
-#define GL_RGB565 0x8D62
-#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS 0x8CD9
-#ifndef GL_VERSION_1_0
-#define GL_VERSION_1_0 1
-GLAPI int GLAD_GL_VERSION_1_0;
-typedef void (APIENTRYP PFNGLCULLFACEPROC)(GLenum mode);
-GLAPI PFNGLCULLFACEPROC glad_glCullFace;
-#define glCullFace glad_glCullFace
-typedef void (APIENTRYP PFNGLFRONTFACEPROC)(GLenum mode);
-GLAPI PFNGLFRONTFACEPROC glad_glFrontFace;
-#define glFrontFace glad_glFrontFace
-typedef void (APIENTRYP PFNGLHINTPROC)(GLenum target, GLenum mode);
-GLAPI PFNGLHINTPROC glad_glHint;
-#define glHint glad_glHint
-typedef void (APIENTRYP PFNGLLINEWIDTHPROC)(GLfloat width);
-GLAPI PFNGLLINEWIDTHPROC glad_glLineWidth;
-#define glLineWidth glad_glLineWidth
-typedef void (APIENTRYP PFNGLPOINTSIZEPROC)(GLfloat size);
-GLAPI PFNGLPOINTSIZEPROC glad_glPointSize;
-#define glPointSize glad_glPointSize
-typedef void (APIENTRYP PFNGLPOLYGONMODEPROC)(GLenum face, GLenum mode);
-GLAPI PFNGLPOLYGONMODEPROC glad_glPolygonMode;
-#define glPolygonMode glad_glPolygonMode
-typedef void (APIENTRYP PFNGLSCISSORPROC)(GLint x, GLint y, GLsizei width, GLsizei height);
-GLAPI PFNGLSCISSORPROC glad_glScissor;
-#define glScissor glad_glScissor
-typedef void (APIENTRYP PFNGLTEXPARAMETERFPROC)(GLenum target, GLenum pname, GLfloat param);
-GLAPI PFNGLTEXPARAMETERFPROC glad_glTexParameterf;
-#define glTexParameterf glad_glTexParameterf
-typedef void (APIENTRYP PFNGLTEXPARAMETERFVPROC)(GLenum target, GLenum pname, const GLfloat *params);
-GLAPI PFNGLTEXPARAMETERFVPROC glad_glTexParameterfv;
-#define glTexParameterfv glad_glTexParameterfv
-typedef void (APIENTRYP PFNGLTEXPARAMETERIPROC)(GLenum target, GLenum pname, GLint param);
-GLAPI PFNGLTEXPARAMETERIPROC glad_glTexParameteri;
-#define glTexParameteri glad_glTexParameteri
-typedef void (APIENTRYP PFNGLTEXPARAMETERIVPROC)(GLenum target, GLenum pname, const GLint *params);
-GLAPI PFNGLTEXPARAMETERIVPROC glad_glTexParameteriv;
-#define glTexParameteriv glad_glTexParameteriv
-typedef void (APIENTRYP PFNGLTEXIMAGE1DPROC)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void *pixels);
-GLAPI PFNGLTEXIMAGE1DPROC glad_glTexImage1D;
-#define glTexImage1D glad_glTexImage1D
-typedef void (APIENTRYP PFNGLTEXIMAGE2DPROC)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels);
-GLAPI PFNGLTEXIMAGE2DPROC glad_glTexImage2D;
-#define glTexImage2D glad_glTexImage2D
-typedef void (APIENTRYP PFNGLDRAWBUFFERPROC)(GLenum buf);
-GLAPI PFNGLDRAWBUFFERPROC glad_glDrawBuffer;
-#define glDrawBuffer glad_glDrawBuffer
-typedef void (APIENTRYP PFNGLCLEARPROC)(GLbitfield mask);
-GLAPI PFNGLCLEARPROC glad_glClear;
-#define glClear glad_glClear
-typedef void (APIENTRYP PFNGLCLEARCOLORPROC)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
-GLAPI PFNGLCLEARCOLORPROC glad_glClearColor;
-#define glClearColor glad_glClearColor
-typedef void (APIENTRYP PFNGLCLEARSTENCILPROC)(GLint s);
-GLAPI PFNGLCLEARSTENCILPROC glad_glClearStencil;
-#define glClearStencil glad_glClearStencil
-typedef void (APIENTRYP PFNGLCLEARDEPTHPROC)(GLdouble depth);
-GLAPI PFNGLCLEARDEPTHPROC glad_glClearDepth;
-#define glClearDepth glad_glClearDepth
-typedef void (APIENTRYP PFNGLSTENCILMASKPROC)(GLuint mask);
-GLAPI PFNGLSTENCILMASKPROC glad_glStencilMask;
-#define glStencilMask glad_glStencilMask
-typedef void (APIENTRYP PFNGLCOLORMASKPROC)(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
-GLAPI PFNGLCOLORMASKPROC glad_glColorMask;
-#define glColorMask glad_glColorMask
-typedef void (APIENTRYP PFNGLDEPTHMASKPROC)(GLboolean flag);
-GLAPI PFNGLDEPTHMASKPROC glad_glDepthMask;
-#define glDepthMask glad_glDepthMask
-typedef void (APIENTRYP PFNGLDISABLEPROC)(GLenum cap);
-GLAPI PFNGLDISABLEPROC glad_glDisable;
-#define glDisable glad_glDisable
-typedef void (APIENTRYP PFNGLENABLEPROC)(GLenum cap);
-GLAPI PFNGLENABLEPROC glad_glEnable;
-#define glEnable glad_glEnable
-typedef void (APIENTRYP PFNGLFINISHPROC)(void);
-GLAPI PFNGLFINISHPROC glad_glFinish;
-#define glFinish glad_glFinish
-typedef void (APIENTRYP PFNGLFLUSHPROC)(void);
-GLAPI PFNGLFLUSHPROC glad_glFlush;
-#define glFlush glad_glFlush
-typedef void (APIENTRYP PFNGLBLENDFUNCPROC)(GLenum sfactor, GLenum dfactor);
-GLAPI PFNGLBLENDFUNCPROC glad_glBlendFunc;
-#define glBlendFunc glad_glBlendFunc
-typedef void (APIENTRYP PFNGLLOGICOPPROC)(GLenum opcode);
-GLAPI PFNGLLOGICOPPROC glad_glLogicOp;
-#define glLogicOp glad_glLogicOp
-typedef void (APIENTRYP PFNGLSTENCILFUNCPROC)(GLenum func, GLint ref, GLuint mask);
-GLAPI PFNGLSTENCILFUNCPROC glad_glStencilFunc;
-#define glStencilFunc glad_glStencilFunc
-typedef void (APIENTRYP PFNGLSTENCILOPPROC)(GLenum fail, GLenum zfail, GLenum zpass);
-GLAPI PFNGLSTENCILOPPROC glad_glStencilOp;
-#define glStencilOp glad_glStencilOp
-typedef void (APIENTRYP PFNGLDEPTHFUNCPROC)(GLenum func);
-GLAPI PFNGLDEPTHFUNCPROC glad_glDepthFunc;
-#define glDepthFunc glad_glDepthFunc
-typedef void (APIENTRYP PFNGLPIXELSTOREFPROC)(GLenum pname, GLfloat param);
-GLAPI PFNGLPIXELSTOREFPROC glad_glPixelStoref;
-#define glPixelStoref glad_glPixelStoref
-typedef void (APIENTRYP PFNGLPIXELSTOREIPROC)(GLenum pname, GLint param);
-GLAPI PFNGLPIXELSTOREIPROC glad_glPixelStorei;
-#define glPixelStorei glad_glPixelStorei
-typedef void (APIENTRYP PFNGLREADBUFFERPROC)(GLenum src);
-GLAPI PFNGLREADBUFFERPROC glad_glReadBuffer;
-#define glReadBuffer glad_glReadBuffer
-typedef void (APIENTRYP PFNGLREADPIXELSPROC)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels);
-GLAPI PFNGLREADPIXELSPROC glad_glReadPixels;
-#define glReadPixels glad_glReadPixels
-typedef void (APIENTRYP PFNGLGETBOOLEANVPROC)(GLenum pname, GLboolean *data);
-GLAPI PFNGLGETBOOLEANVPROC glad_glGetBooleanv;
-#define glGetBooleanv glad_glGetBooleanv
-typedef void (APIENTRYP PFNGLGETDOUBLEVPROC)(GLenum pname, GLdouble *data);
-GLAPI PFNGLGETDOUBLEVPROC glad_glGetDoublev;
-#define glGetDoublev glad_glGetDoublev
-typedef GLenum (APIENTRYP PFNGLGETERRORPROC)(void);
-GLAPI PFNGLGETERRORPROC glad_glGetError;
-#define glGetError glad_glGetError
-typedef void (APIENTRYP PFNGLGETFLOATVPROC)(GLenum pname, GLfloat *data);
-GLAPI PFNGLGETFLOATVPROC glad_glGetFloatv;
-#define glGetFloatv glad_glGetFloatv
-typedef void (APIENTRYP PFNGLGETINTEGERVPROC)(GLenum pname, GLint *data);
-GLAPI PFNGLGETINTEGERVPROC glad_glGetIntegerv;
-#define glGetIntegerv glad_glGetIntegerv
-typedef const GLubyte * (APIENTRYP PFNGLGETSTRINGPROC)(GLenum name);
-GLAPI PFNGLGETSTRINGPROC glad_glGetString;
-#define glGetString glad_glGetString
-typedef void (APIENTRYP PFNGLGETTEXIMAGEPROC)(GLenum target, GLint level, GLenum format, GLenum type, void *pixels);
-GLAPI PFNGLGETTEXIMAGEPROC glad_glGetTexImage;
-#define glGetTexImage glad_glGetTexImage
-typedef void (APIENTRYP PFNGLGETTEXPARAMETERFVPROC)(GLenum target, GLenum pname, GLfloat *params);
-GLAPI PFNGLGETTEXPARAMETERFVPROC glad_glGetTexParameterfv;
-#define glGetTexParameterfv glad_glGetTexParameterfv
-typedef void (APIENTRYP PFNGLGETTEXPARAMETERIVPROC)(GLenum target, GLenum pname, GLint *params);
-GLAPI PFNGLGETTEXPARAMETERIVPROC glad_glGetTexParameteriv;
-#define glGetTexParameteriv glad_glGetTexParameteriv
-typedef void (APIENTRYP PFNGLGETTEXLEVELPARAMETERFVPROC)(GLenum target, GLint level, GLenum pname, GLfloat *params);
-GLAPI PFNGLGETTEXLEVELPARAMETERFVPROC glad_glGetTexLevelParameterfv;
-#define glGetTexLevelParameterfv glad_glGetTexLevelParameterfv
-typedef void (APIENTRYP PFNGLGETTEXLEVELPARAMETERIVPROC)(GLenum target, GLint level, GLenum pname, GLint *params);
-GLAPI PFNGLGETTEXLEVELPARAMETERIVPROC glad_glGetTexLevelParameteriv;
-#define glGetTexLevelParameteriv glad_glGetTexLevelParameteriv
-typedef GLboolean (APIENTRYP PFNGLISENABLEDPROC)(GLenum cap);
-GLAPI PFNGLISENABLEDPROC glad_glIsEnabled;
-#define glIsEnabled glad_glIsEnabled
-typedef void (APIENTRYP PFNGLDEPTHRANGEPROC)(GLdouble n, GLdouble f);
-GLAPI PFNGLDEPTHRANGEPROC glad_glDepthRange;
-#define glDepthRange glad_glDepthRange
-typedef void (APIENTRYP PFNGLVIEWPORTPROC)(GLint x, GLint y, GLsizei width, GLsizei height);
-GLAPI PFNGLVIEWPORTPROC glad_glViewport;
-#define glViewport glad_glViewport
-typedef void (APIENTRYP PFNGLNEWLISTPROC)(GLuint list, GLenum mode);
-GLAPI PFNGLNEWLISTPROC glad_glNewList;
-#define glNewList glad_glNewList
-typedef void (APIENTRYP PFNGLENDLISTPROC)(void);
-GLAPI PFNGLENDLISTPROC glad_glEndList;
-#define glEndList glad_glEndList
-typedef void (APIENTRYP PFNGLCALLLISTPROC)(GLuint list);
-GLAPI PFNGLCALLLISTPROC glad_glCallList;
-#define glCallList glad_glCallList
-typedef void (APIENTRYP PFNGLCALLLISTSPROC)(GLsizei n, GLenum type, const void *lists);
-GLAPI PFNGLCALLLISTSPROC glad_glCallLists;
-#define glCallLists glad_glCallLists
-typedef void (APIENTRYP PFNGLDELETELISTSPROC)(GLuint list, GLsizei range);
-GLAPI PFNGLDELETELISTSPROC glad_glDeleteLists;
-#define glDeleteLists glad_glDeleteLists
-typedef GLuint (APIENTRYP PFNGLGENLISTSPROC)(GLsizei range);
-GLAPI PFNGLGENLISTSPROC glad_glGenLists;
-#define glGenLists glad_glGenLists
-typedef void (APIENTRYP PFNGLLISTBASEPROC)(GLuint base);
-GLAPI PFNGLLISTBASEPROC glad_glListBase;
-#define glListBase glad_glListBase
-typedef void (APIENTRYP PFNGLBEGINPROC)(GLenum mode);
-GLAPI PFNGLBEGINPROC glad_glBegin;
-#define glBegin glad_glBegin
-typedef void (APIENTRYP PFNGLBITMAPPROC)(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte *bitmap);
-GLAPI PFNGLBITMAPPROC glad_glBitmap;
-#define glBitmap glad_glBitmap
-typedef void (APIENTRYP PFNGLCOLOR3BPROC)(GLbyte red, GLbyte green, GLbyte blue);
-GLAPI PFNGLCOLOR3BPROC glad_glColor3b;
-#define glColor3b glad_glColor3b
-typedef void (APIENTRYP PFNGLCOLOR3BVPROC)(const GLbyte *v);
-GLAPI PFNGLCOLOR3BVPROC glad_glColor3bv;
-#define glColor3bv glad_glColor3bv
-typedef void (APIENTRYP PFNGLCOLOR3DPROC)(GLdouble red, GLdouble green, GLdouble blue);
-GLAPI PFNGLCOLOR3DPROC glad_glColor3d;
-#define glColor3d glad_glColor3d
-typedef void (APIENTRYP PFNGLCOLOR3DVPROC)(const GLdouble *v);
-GLAPI PFNGLCOLOR3DVPROC glad_glColor3dv;
-#define glColor3dv glad_glColor3dv
-typedef void (APIENTRYP PFNGLCOLOR3FPROC)(GLfloat red, GLfloat green, GLfloat blue);
-GLAPI PFNGLCOLOR3FPROC glad_glColor3f;
-#define glColor3f glad_glColor3f
-typedef void (APIENTRYP PFNGLCOLOR3FVPROC)(const GLfloat *v);
-GLAPI PFNGLCOLOR3FVPROC glad_glColor3fv;
-#define glColor3fv glad_glColor3fv
-typedef void (APIENTRYP PFNGLCOLOR3IPROC)(GLint red, GLint green, GLint blue);
-GLAPI PFNGLCOLOR3IPROC glad_glColor3i;
-#define glColor3i glad_glColor3i
-typedef void (APIENTRYP PFNGLCOLOR3IVPROC)(const GLint *v);
-GLAPI PFNGLCOLOR3IVPROC glad_glColor3iv;
-#define glColor3iv glad_glColor3iv
-typedef void (APIENTRYP PFNGLCOLOR3SPROC)(GLshort red, GLshort green, GLshort blue);
-GLAPI PFNGLCOLOR3SPROC glad_glColor3s;
-#define glColor3s glad_glColor3s
-typedef void (APIENTRYP PFNGLCOLOR3SVPROC)(const GLshort *v);
-GLAPI PFNGLCOLOR3SVPROC glad_glColor3sv;
-#define glColor3sv glad_glColor3sv
-typedef void (APIENTRYP PFNGLCOLOR3UBPROC)(GLubyte red, GLubyte green, GLubyte blue);
-GLAPI PFNGLCOLOR3UBPROC glad_glColor3ub;
-#define glColor3ub glad_glColor3ub
-typedef void (APIENTRYP PFNGLCOLOR3UBVPROC)(const GLubyte *v);
-GLAPI PFNGLCOLOR3UBVPROC glad_glColor3ubv;
-#define glColor3ubv glad_glColor3ubv
-typedef void (APIENTRYP PFNGLCOLOR3UIPROC)(GLuint red, GLuint green, GLuint blue);
-GLAPI PFNGLCOLOR3UIPROC glad_glColor3ui;
-#define glColor3ui glad_glColor3ui
-typedef void (APIENTRYP PFNGLCOLOR3UIVPROC)(const GLuint *v);
-GLAPI PFNGLCOLOR3UIVPROC glad_glColor3uiv;
-#define glColor3uiv glad_glColor3uiv
-typedef void (APIENTRYP PFNGLCOLOR3USPROC)(GLushort red, GLushort green, GLushort blue);
-GLAPI PFNGLCOLOR3USPROC glad_glColor3us;
-#define glColor3us glad_glColor3us
-typedef void (APIENTRYP PFNGLCOLOR3USVPROC)(const GLushort *v);
-GLAPI PFNGLCOLOR3USVPROC glad_glColor3usv;
-#define glColor3usv glad_glColor3usv
-typedef void (APIENTRYP PFNGLCOLOR4BPROC)(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha);
-GLAPI PFNGLCOLOR4BPROC glad_glColor4b;
-#define glColor4b glad_glColor4b
-typedef void (APIENTRYP PFNGLCOLOR4BVPROC)(const GLbyte *v);
-GLAPI PFNGLCOLOR4BVPROC glad_glColor4bv;
-#define glColor4bv glad_glColor4bv
-typedef void (APIENTRYP PFNGLCOLOR4DPROC)(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha);
-GLAPI PFNGLCOLOR4DPROC glad_glColor4d;
-#define glColor4d glad_glColor4d
-typedef void (APIENTRYP PFNGLCOLOR4DVPROC)(const GLdouble *v);
-GLAPI PFNGLCOLOR4DVPROC glad_glColor4dv;
-#define glColor4dv glad_glColor4dv
-typedef void (APIENTRYP PFNGLCOLOR4FPROC)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
-GLAPI PFNGLCOLOR4FPROC glad_glColor4f;
-#define glColor4f glad_glColor4f
-typedef void (APIENTRYP PFNGLCOLOR4FVPROC)(const GLfloat *v);
-GLAPI PFNGLCOLOR4FVPROC glad_glColor4fv;
-#define glColor4fv glad_glColor4fv
-typedef void (APIENTRYP PFNGLCOLOR4IPROC)(GLint red, GLint green, GLint blue, GLint alpha);
-GLAPI PFNGLCOLOR4IPROC glad_glColor4i;
-#define glColor4i glad_glColor4i
-typedef void (APIENTRYP PFNGLCOLOR4IVPROC)(const GLint *v);
-GLAPI PFNGLCOLOR4IVPROC glad_glColor4iv;
-#define glColor4iv glad_glColor4iv
-typedef void (APIENTRYP PFNGLCOLOR4SPROC)(GLshort red, GLshort green, GLshort blue, GLshort alpha);
-GLAPI PFNGLCOLOR4SPROC glad_glColor4s;
-#define glColor4s glad_glColor4s
-typedef void (APIENTRYP PFNGLCOLOR4SVPROC)(const GLshort *v);
-GLAPI PFNGLCOLOR4SVPROC glad_glColor4sv;
-#define glColor4sv glad_glColor4sv
-typedef void (APIENTRYP PFNGLCOLOR4UBPROC)(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha);
-GLAPI PFNGLCOLOR4UBPROC glad_glColor4ub;
-#define glColor4ub glad_glColor4ub
-typedef void (APIENTRYP PFNGLCOLOR4UBVPROC)(const GLubyte *v);
-GLAPI PFNGLCOLOR4UBVPROC glad_glColor4ubv;
-#define glColor4ubv glad_glColor4ubv
-typedef void (APIENTRYP PFNGLCOLOR4UIPROC)(GLuint red, GLuint green, GLuint blue, GLuint alpha);
-GLAPI PFNGLCOLOR4UIPROC glad_glColor4ui;
-#define glColor4ui glad_glColor4ui
-typedef void (APIENTRYP PFNGLCOLOR4UIVPROC)(const GLuint *v);
-GLAPI PFNGLCOLOR4UIVPROC glad_glColor4uiv;
-#define glColor4uiv glad_glColor4uiv
-typedef void (APIENTRYP PFNGLCOLOR4USPROC)(GLushort red, GLushort green, GLushort blue, GLushort alpha);
-GLAPI PFNGLCOLOR4USPROC glad_glColor4us;
-#define glColor4us glad_glColor4us
-typedef void (APIENTRYP PFNGLCOLOR4USVPROC)(const GLushort *v);
-GLAPI PFNGLCOLOR4USVPROC glad_glColor4usv;
-#define glColor4usv glad_glColor4usv
-typedef void (APIENTRYP PFNGLEDGEFLAGPROC)(GLboolean flag);
-GLAPI PFNGLEDGEFLAGPROC glad_glEdgeFlag;
-#define glEdgeFlag glad_glEdgeFlag
-typedef void (APIENTRYP PFNGLEDGEFLAGVPROC)(const GLboolean *flag);
-GLAPI PFNGLEDGEFLAGVPROC glad_glEdgeFlagv;
-#define glEdgeFlagv glad_glEdgeFlagv
-typedef void (APIENTRYP PFNGLENDPROC)(void);
-GLAPI PFNGLENDPROC glad_glEnd;
-#define glEnd glad_glEnd
-typedef void (APIENTRYP PFNGLINDEXDPROC)(GLdouble c);
-GLAPI PFNGLINDEXDPROC glad_glIndexd;
-#define glIndexd glad_glIndexd
-typedef void (APIENTRYP PFNGLINDEXDVPROC)(const GLdouble *c);
-GLAPI PFNGLINDEXDVPROC glad_glIndexdv;
-#define glIndexdv glad_glIndexdv
-typedef void (APIENTRYP PFNGLINDEXFPROC)(GLfloat c);
-GLAPI PFNGLINDEXFPROC glad_glIndexf;
-#define glIndexf glad_glIndexf
-typedef void (APIENTRYP PFNGLINDEXFVPROC)(const GLfloat *c);
-GLAPI PFNGLINDEXFVPROC glad_glIndexfv;
-#define glIndexfv glad_glIndexfv
-typedef void (APIENTRYP PFNGLINDEXIPROC)(GLint c);
-GLAPI PFNGLINDEXIPROC glad_glIndexi;
-#define glIndexi glad_glIndexi
-typedef void (APIENTRYP PFNGLINDEXIVPROC)(const GLint *c);
-GLAPI PFNGLINDEXIVPROC glad_glIndexiv;
-#define glIndexiv glad_glIndexiv
-typedef void (APIENTRYP PFNGLINDEXSPROC)(GLshort c);
-GLAPI PFNGLINDEXSPROC glad_glIndexs;
-#define glIndexs glad_glIndexs
-typedef void (APIENTRYP PFNGLINDEXSVPROC)(const GLshort *c);
-GLAPI PFNGLINDEXSVPROC glad_glIndexsv;
-#define glIndexsv glad_glIndexsv
-typedef void (APIENTRYP PFNGLNORMAL3BPROC)(GLbyte nx, GLbyte ny, GLbyte nz);
-GLAPI PFNGLNORMAL3BPROC glad_glNormal3b;
-#define glNormal3b glad_glNormal3b
-typedef void (APIENTRYP PFNGLNORMAL3BVPROC)(const GLbyte *v);
-GLAPI PFNGLNORMAL3BVPROC glad_glNormal3bv;
-#define glNormal3bv glad_glNormal3bv
-typedef void (APIENTRYP PFNGLNORMAL3DPROC)(GLdouble nx, GLdouble ny, GLdouble nz);
-GLAPI PFNGLNORMAL3DPROC glad_glNormal3d;
-#define glNormal3d glad_glNormal3d
-typedef void (APIENTRYP PFNGLNORMAL3DVPROC)(const GLdouble *v);
-GLAPI PFNGLNORMAL3DVPROC glad_glNormal3dv;
-#define glNormal3dv glad_glNormal3dv
-typedef void (APIENTRYP PFNGLNORMAL3FPROC)(GLfloat nx, GLfloat ny, GLfloat nz);
-GLAPI PFNGLNORMAL3FPROC glad_glNormal3f;
-#define glNormal3f glad_glNormal3f
-typedef void (APIENTRYP PFNGLNORMAL3FVPROC)(const GLfloat *v);
-GLAPI PFNGLNORMAL3FVPROC glad_glNormal3fv;
-#define glNormal3fv glad_glNormal3fv
-typedef void (APIENTRYP PFNGLNORMAL3IPROC)(GLint nx, GLint ny, GLint nz);
-GLAPI PFNGLNORMAL3IPROC glad_glNormal3i;
-#define glNormal3i glad_glNormal3i
-typedef void (APIENTRYP PFNGLNORMAL3IVPROC)(const GLint *v);
-GLAPI PFNGLNORMAL3IVPROC glad_glNormal3iv;
-#define glNormal3iv glad_glNormal3iv
-typedef void (APIENTRYP PFNGLNORMAL3SPROC)(GLshort nx, GLshort ny, GLshort nz);
-GLAPI PFNGLNORMAL3SPROC glad_glNormal3s;
-#define glNormal3s glad_glNormal3s
-typedef void (APIENTRYP PFNGLNORMAL3SVPROC)(const GLshort *v);
-GLAPI PFNGLNORMAL3SVPROC glad_glNormal3sv;
-#define glNormal3sv glad_glNormal3sv
-typedef void (APIENTRYP PFNGLRASTERPOS2DPROC)(GLdouble x, GLdouble y);
-GLAPI PFNGLRASTERPOS2DPROC glad_glRasterPos2d;
-#define glRasterPos2d glad_glRasterPos2d
-typedef void (APIENTRYP PFNGLRASTERPOS2DVPROC)(const GLdouble *v);
-GLAPI PFNGLRASTERPOS2DVPROC glad_glRasterPos2dv;
-#define glRasterPos2dv glad_glRasterPos2dv
-typedef void (APIENTRYP PFNGLRASTERPOS2FPROC)(GLfloat x, GLfloat y);
-GLAPI PFNGLRASTERPOS2FPROC glad_glRasterPos2f;
-#define glRasterPos2f glad_glRasterPos2f
-typedef void (APIENTRYP PFNGLRASTERPOS2FVPROC)(const GLfloat *v);
-GLAPI PFNGLRASTERPOS2FVPROC glad_glRasterPos2fv;
-#define glRasterPos2fv glad_glRasterPos2fv
-typedef void (APIENTRYP PFNGLRASTERPOS2IPROC)(GLint x, GLint y);
-GLAPI PFNGLRASTERPOS2IPROC glad_glRasterPos2i;
-#define glRasterPos2i glad_glRasterPos2i
-typedef void (APIENTRYP PFNGLRASTERPOS2IVPROC)(const GLint *v);
-GLAPI PFNGLRASTERPOS2IVPROC glad_glRasterPos2iv;
-#define glRasterPos2iv glad_glRasterPos2iv
-typedef void (APIENTRYP PFNGLRASTERPOS2SPROC)(GLshort x, GLshort y);
-GLAPI PFNGLRASTERPOS2SPROC glad_glRasterPos2s;
-#define glRasterPos2s glad_glRasterPos2s
-typedef void (APIENTRYP PFNGLRASTERPOS2SVPROC)(const GLshort *v);
-GLAPI PFNGLRASTERPOS2SVPROC glad_glRasterPos2sv;
-#define glRasterPos2sv glad_glRasterPos2sv
-typedef void (APIENTRYP PFNGLRASTERPOS3DPROC)(GLdouble x, GLdouble y, GLdouble z);
-GLAPI PFNGLRASTERPOS3DPROC glad_glRasterPos3d;
-#define glRasterPos3d glad_glRasterPos3d
-typedef void (APIENTRYP PFNGLRASTERPOS3DVPROC)(const GLdouble *v);
-GLAPI PFNGLRASTERPOS3DVPROC glad_glRasterPos3dv;
-#define glRasterPos3dv glad_glRasterPos3dv
-typedef void (APIENTRYP PFNGLRASTERPOS3FPROC)(GLfloat x, GLfloat y, GLfloat z);
-GLAPI PFNGLRASTERPOS3FPROC glad_glRasterPos3f;
-#define glRasterPos3f glad_glRasterPos3f
-typedef void (APIENTRYP PFNGLRASTERPOS3FVPROC)(const GLfloat *v);
-GLAPI PFNGLRASTERPOS3FVPROC glad_glRasterPos3fv;
-#define glRasterPos3fv glad_glRasterPos3fv
-typedef void (APIENTRYP PFNGLRASTERPOS3IPROC)(GLint x, GLint y, GLint z);
-GLAPI PFNGLRASTERPOS3IPROC glad_glRasterPos3i;
-#define glRasterPos3i glad_glRasterPos3i
-typedef void (APIENTRYP PFNGLRASTERPOS3IVPROC)(const GLint *v);
-GLAPI PFNGLRASTERPOS3IVPROC glad_glRasterPos3iv;
-#define glRasterPos3iv glad_glRasterPos3iv
-typedef void (APIENTRYP PFNGLRASTERPOS3SPROC)(GLshort x, GLshort y, GLshort z);
-GLAPI PFNGLRASTERPOS3SPROC glad_glRasterPos3s;
-#define glRasterPos3s glad_glRasterPos3s
-typedef void (APIENTRYP PFNGLRASTERPOS3SVPROC)(const GLshort *v);
-GLAPI PFNGLRASTERPOS3SVPROC glad_glRasterPos3sv;
-#define glRasterPos3sv glad_glRasterPos3sv
-typedef void (APIENTRYP PFNGLRASTERPOS4DPROC)(GLdouble x, GLdouble y, GLdouble z, GLdouble w);
-GLAPI PFNGLRASTERPOS4DPROC glad_glRasterPos4d;
-#define glRasterPos4d glad_glRasterPos4d
-typedef void (APIENTRYP PFNGLRASTERPOS4DVPROC)(const GLdouble *v);
-GLAPI PFNGLRASTERPOS4DVPROC glad_glRasterPos4dv;
-#define glRasterPos4dv glad_glRasterPos4dv
-typedef void (APIENTRYP PFNGLRASTERPOS4FPROC)(GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-GLAPI PFNGLRASTERPOS4FPROC glad_glRasterPos4f;
-#define glRasterPos4f glad_glRasterPos4f
-typedef void (APIENTRYP PFNGLRASTERPOS4FVPROC)(const GLfloat *v);
-GLAPI PFNGLRASTERPOS4FVPROC glad_glRasterPos4fv;
-#define glRasterPos4fv glad_glRasterPos4fv
-typedef void (APIENTRYP PFNGLRASTERPOS4IPROC)(GLint x, GLint y, GLint z, GLint w);
-GLAPI PFNGLRASTERPOS4IPROC glad_glRasterPos4i;
-#define glRasterPos4i glad_glRasterPos4i
-typedef void (APIENTRYP PFNGLRASTERPOS4IVPROC)(const GLint *v);
-GLAPI PFNGLRASTERPOS4IVPROC glad_glRasterPos4iv;
-#define glRasterPos4iv glad_glRasterPos4iv
-typedef void (APIENTRYP PFNGLRASTERPOS4SPROC)(GLshort x, GLshort y, GLshort z, GLshort w);
-GLAPI PFNGLRASTERPOS4SPROC glad_glRasterPos4s;
-#define glRasterPos4s glad_glRasterPos4s
-typedef void (APIENTRYP PFNGLRASTERPOS4SVPROC)(const GLshort *v);
-GLAPI PFNGLRASTERPOS4SVPROC glad_glRasterPos4sv;
-#define glRasterPos4sv glad_glRasterPos4sv
-typedef void (APIENTRYP PFNGLRECTDPROC)(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2);
-GLAPI PFNGLRECTDPROC glad_glRectd;
-#define glRectd glad_glRectd
-typedef void (APIENTRYP PFNGLRECTDVPROC)(const GLdouble *v1, const GLdouble *v2);
-GLAPI PFNGLRECTDVPROC glad_glRectdv;
-#define glRectdv glad_glRectdv
-typedef void (APIENTRYP PFNGLRECTFPROC)(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2);
-GLAPI PFNGLRECTFPROC glad_glRectf;
-#define glRectf glad_glRectf
-typedef void (APIENTRYP PFNGLRECTFVPROC)(const GLfloat *v1, const GLfloat *v2);
-GLAPI PFNGLRECTFVPROC glad_glRectfv;
-#define glRectfv glad_glRectfv
-typedef void (APIENTRYP PFNGLRECTIPROC)(GLint x1, GLint y1, GLint x2, GLint y2);
-GLAPI PFNGLRECTIPROC glad_glRecti;
-#define glRecti glad_glRecti
-typedef void (APIENTRYP PFNGLRECTIVPROC)(const GLint *v1, const GLint *v2);
-GLAPI PFNGLRECTIVPROC glad_glRectiv;
-#define glRectiv glad_glRectiv
-typedef void (APIENTRYP PFNGLRECTSPROC)(GLshort x1, GLshort y1, GLshort x2, GLshort y2);
-GLAPI PFNGLRECTSPROC glad_glRects;
-#define glRects glad_glRects
-typedef void (APIENTRYP PFNGLRECTSVPROC)(const GLshort *v1, const GLshort *v2);
-GLAPI PFNGLRECTSVPROC glad_glRectsv;
-#define glRectsv glad_glRectsv
-typedef void (APIENTRYP PFNGLTEXCOORD1DPROC)(GLdouble s);
-GLAPI PFNGLTEXCOORD1DPROC glad_glTexCoord1d;
-#define glTexCoord1d glad_glTexCoord1d
-typedef void (APIENTRYP PFNGLTEXCOORD1DVPROC)(const GLdouble *v);
-GLAPI PFNGLTEXCOORD1DVPROC glad_glTexCoord1dv;
-#define glTexCoord1dv glad_glTexCoord1dv
-typedef void (APIENTRYP PFNGLTEXCOORD1FPROC)(GLfloat s);
-GLAPI PFNGLTEXCOORD1FPROC glad_glTexCoord1f;
-#define glTexCoord1f glad_glTexCoord1f
-typedef void (APIENTRYP PFNGLTEXCOORD1FVPROC)(const GLfloat *v);
-GLAPI PFNGLTEXCOORD1FVPROC glad_glTexCoord1fv;
-#define glTexCoord1fv glad_glTexCoord1fv
-typedef void (APIENTRYP PFNGLTEXCOORD1IPROC)(GLint s);
-GLAPI PFNGLTEXCOORD1IPROC glad_glTexCoord1i;
-#define glTexCoord1i glad_glTexCoord1i
-typedef void (APIENTRYP PFNGLTEXCOORD1IVPROC)(const GLint *v);
-GLAPI PFNGLTEXCOORD1IVPROC glad_glTexCoord1iv;
-#define glTexCoord1iv glad_glTexCoord1iv
-typedef void (APIENTRYP PFNGLTEXCOORD1SPROC)(GLshort s);
-GLAPI PFNGLTEXCOORD1SPROC glad_glTexCoord1s;
-#define glTexCoord1s glad_glTexCoord1s
-typedef void (APIENTRYP PFNGLTEXCOORD1SVPROC)(const GLshort *v);
-GLAPI PFNGLTEXCOORD1SVPROC glad_glTexCoord1sv;
-#define glTexCoord1sv glad_glTexCoord1sv
-typedef void (APIENTRYP PFNGLTEXCOORD2DPROC)(GLdouble s, GLdouble t);
-GLAPI PFNGLTEXCOORD2DPROC glad_glTexCoord2d;
-#define glTexCoord2d glad_glTexCoord2d
-typedef void (APIENTRYP PFNGLTEXCOORD2DVPROC)(const GLdouble *v);
-GLAPI PFNGLTEXCOORD2DVPROC glad_glTexCoord2dv;
-#define glTexCoord2dv glad_glTexCoord2dv
-typedef void (APIENTRYP PFNGLTEXCOORD2FPROC)(GLfloat s, GLfloat t);
-GLAPI PFNGLTEXCOORD2FPROC glad_glTexCoord2f;
-#define glTexCoord2f glad_glTexCoord2f
-typedef void (APIENTRYP PFNGLTEXCOORD2FVPROC)(const GLfloat *v);
-GLAPI PFNGLTEXCOORD2FVPROC glad_glTexCoord2fv;
-#define glTexCoord2fv glad_glTexCoord2fv
-typedef void (APIENTRYP PFNGLTEXCOORD2IPROC)(GLint s, GLint t);
-GLAPI PFNGLTEXCOORD2IPROC glad_glTexCoord2i;
-#define glTexCoord2i glad_glTexCoord2i
-typedef void (APIENTRYP PFNGLTEXCOORD2IVPROC)(const GLint *v);
-GLAPI PFNGLTEXCOORD2IVPROC glad_glTexCoord2iv;
-#define glTexCoord2iv glad_glTexCoord2iv
-typedef void (APIENTRYP PFNGLTEXCOORD2SPROC)(GLshort s, GLshort t);
-GLAPI PFNGLTEXCOORD2SPROC glad_glTexCoord2s;
-#define glTexCoord2s glad_glTexCoord2s
-typedef void (APIENTRYP PFNGLTEXCOORD2SVPROC)(const GLshort *v);
-GLAPI PFNGLTEXCOORD2SVPROC glad_glTexCoord2sv;
-#define glTexCoord2sv glad_glTexCoord2sv
-typedef void (APIENTRYP PFNGLTEXCOORD3DPROC)(GLdouble s, GLdouble t, GLdouble r);
-GLAPI PFNGLTEXCOORD3DPROC glad_glTexCoord3d;
-#define glTexCoord3d glad_glTexCoord3d
-typedef void (APIENTRYP PFNGLTEXCOORD3DVPROC)(const GLdouble *v);
-GLAPI PFNGLTEXCOORD3DVPROC glad_glTexCoord3dv;
-#define glTexCoord3dv glad_glTexCoord3dv
-typedef void (APIENTRYP PFNGLTEXCOORD3FPROC)(GLfloat s, GLfloat t, GLfloat r);
-GLAPI PFNGLTEXCOORD3FPROC glad_glTexCoord3f;
-#define glTexCoord3f glad_glTexCoord3f
-typedef void (APIENTRYP PFNGLTEXCOORD3FVPROC)(const GLfloat *v);
-GLAPI PFNGLTEXCOORD3FVPROC glad_glTexCoord3fv;
-#define glTexCoord3fv glad_glTexCoord3fv
-typedef void (APIENTRYP PFNGLTEXCOORD3IPROC)(GLint s, GLint t, GLint r);
-GLAPI PFNGLTEXCOORD3IPROC glad_glTexCoord3i;
-#define glTexCoord3i glad_glTexCoord3i
-typedef void (APIENTRYP PFNGLTEXCOORD3IVPROC)(const GLint *v);
-GLAPI PFNGLTEXCOORD3IVPROC glad_glTexCoord3iv;
-#define glTexCoord3iv glad_glTexCoord3iv
-typedef void (APIENTRYP PFNGLTEXCOORD3SPROC)(GLshort s, GLshort t, GLshort r);
-GLAPI PFNGLTEXCOORD3SPROC glad_glTexCoord3s;
-#define glTexCoord3s glad_glTexCoord3s
-typedef void (APIENTRYP PFNGLTEXCOORD3SVPROC)(const GLshort *v);
-GLAPI PFNGLTEXCOORD3SVPROC glad_glTexCoord3sv;
-#define glTexCoord3sv glad_glTexCoord3sv
-typedef void (APIENTRYP PFNGLTEXCOORD4DPROC)(GLdouble s, GLdouble t, GLdouble r, GLdouble q);
-GLAPI PFNGLTEXCOORD4DPROC glad_glTexCoord4d;
-#define glTexCoord4d glad_glTexCoord4d
-typedef void (APIENTRYP PFNGLTEXCOORD4DVPROC)(const GLdouble *v);
-GLAPI PFNGLTEXCOORD4DVPROC glad_glTexCoord4dv;
-#define glTexCoord4dv glad_glTexCoord4dv
-typedef void (APIENTRYP PFNGLTEXCOORD4FPROC)(GLfloat s, GLfloat t, GLfloat r, GLfloat q);
-GLAPI PFNGLTEXCOORD4FPROC glad_glTexCoord4f;
-#define glTexCoord4f glad_glTexCoord4f
-typedef void (APIENTRYP PFNGLTEXCOORD4FVPROC)(const GLfloat *v);
-GLAPI PFNGLTEXCOORD4FVPROC glad_glTexCoord4fv;
-#define glTexCoord4fv glad_glTexCoord4fv
-typedef void (APIENTRYP PFNGLTEXCOORD4IPROC)(GLint s, GLint t, GLint r, GLint q);
-GLAPI PFNGLTEXCOORD4IPROC glad_glTexCoord4i;
-#define glTexCoord4i glad_glTexCoord4i
-typedef void (APIENTRYP PFNGLTEXCOORD4IVPROC)(const GLint *v);
-GLAPI PFNGLTEXCOORD4IVPROC glad_glTexCoord4iv;
-#define glTexCoord4iv glad_glTexCoord4iv
-typedef void (APIENTRYP PFNGLTEXCOORD4SPROC)(GLshort s, GLshort t, GLshort r, GLshort q);
-GLAPI PFNGLTEXCOORD4SPROC glad_glTexCoord4s;
-#define glTexCoord4s glad_glTexCoord4s
-typedef void (APIENTRYP PFNGLTEXCOORD4SVPROC)(const GLshort *v);
-GLAPI PFNGLTEXCOORD4SVPROC glad_glTexCoord4sv;
-#define glTexCoord4sv glad_glTexCoord4sv
-typedef void (APIENTRYP PFNGLVERTEX2DPROC)(GLdouble x, GLdouble y);
-GLAPI PFNGLVERTEX2DPROC glad_glVertex2d;
-#define glVertex2d glad_glVertex2d
-typedef void (APIENTRYP PFNGLVERTEX2DVPROC)(const GLdouble *v);
-GLAPI PFNGLVERTEX2DVPROC glad_glVertex2dv;
-#define glVertex2dv glad_glVertex2dv
-typedef void (APIENTRYP PFNGLVERTEX2FPROC)(GLfloat x, GLfloat y);
-GLAPI PFNGLVERTEX2FPROC glad_glVertex2f;
-#define glVertex2f glad_glVertex2f
-typedef void (APIENTRYP PFNGLVERTEX2FVPROC)(const GLfloat *v);
-GLAPI PFNGLVERTEX2FVPROC glad_glVertex2fv;
-#define glVertex2fv glad_glVertex2fv
-typedef void (APIENTRYP PFNGLVERTEX2IPROC)(GLint x, GLint y);
-GLAPI PFNGLVERTEX2IPROC glad_glVertex2i;
-#define glVertex2i glad_glVertex2i
-typedef void (APIENTRYP PFNGLVERTEX2IVPROC)(const GLint *v);
-GLAPI PFNGLVERTEX2IVPROC glad_glVertex2iv;
-#define glVertex2iv glad_glVertex2iv
-typedef void (APIENTRYP PFNGLVERTEX2SPROC)(GLshort x, GLshort y);
-GLAPI PFNGLVERTEX2SPROC glad_glVertex2s;
-#define glVertex2s glad_glVertex2s
-typedef void (APIENTRYP PFNGLVERTEX2SVPROC)(const GLshort *v);
-GLAPI PFNGLVERTEX2SVPROC glad_glVertex2sv;
-#define glVertex2sv glad_glVertex2sv
-typedef void (APIENTRYP PFNGLVERTEX3DPROC)(GLdouble x, GLdouble y, GLdouble z);
-GLAPI PFNGLVERTEX3DPROC glad_glVertex3d;
-#define glVertex3d glad_glVertex3d
-typedef void (APIENTRYP PFNGLVERTEX3DVPROC)(const GLdouble *v);
-GLAPI PFNGLVERTEX3DVPROC glad_glVertex3dv;
-#define glVertex3dv glad_glVertex3dv
-typedef void (APIENTRYP PFNGLVERTEX3FPROC)(GLfloat x, GLfloat y, GLfloat z);
-GLAPI PFNGLVERTEX3FPROC glad_glVertex3f;
-#define glVertex3f glad_glVertex3f
-typedef void (APIENTRYP PFNGLVERTEX3FVPROC)(const GLfloat *v);
-GLAPI PFNGLVERTEX3FVPROC glad_glVertex3fv;
-#define glVertex3fv glad_glVertex3fv
-typedef void (APIENTRYP PFNGLVERTEX3IPROC)(GLint x, GLint y, GLint z);
-GLAPI PFNGLVERTEX3IPROC glad_glVertex3i;
-#define glVertex3i glad_glVertex3i
-typedef void (APIENTRYP PFNGLVERTEX3IVPROC)(const GLint *v);
-GLAPI PFNGLVERTEX3IVPROC glad_glVertex3iv;
-#define glVertex3iv glad_glVertex3iv
-typedef void (APIENTRYP PFNGLVERTEX3SPROC)(GLshort x, GLshort y, GLshort z);
-GLAPI PFNGLVERTEX3SPROC glad_glVertex3s;
-#define glVertex3s glad_glVertex3s
-typedef void (APIENTRYP PFNGLVERTEX3SVPROC)(const GLshort *v);
-GLAPI PFNGLVERTEX3SVPROC glad_glVertex3sv;
-#define glVertex3sv glad_glVertex3sv
-typedef void (APIENTRYP PFNGLVERTEX4DPROC)(GLdouble x, GLdouble y, GLdouble z, GLdouble w);
-GLAPI PFNGLVERTEX4DPROC glad_glVertex4d;
-#define glVertex4d glad_glVertex4d
-typedef void (APIENTRYP PFNGLVERTEX4DVPROC)(const GLdouble *v);
-GLAPI PFNGLVERTEX4DVPROC glad_glVertex4dv;
-#define glVertex4dv glad_glVertex4dv
-typedef void (APIENTRYP PFNGLVERTEX4FPROC)(GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-GLAPI PFNGLVERTEX4FPROC glad_glVertex4f;
-#define glVertex4f glad_glVertex4f
-typedef void (APIENTRYP PFNGLVERTEX4FVPROC)(const GLfloat *v);
-GLAPI PFNGLVERTEX4FVPROC glad_glVertex4fv;
-#define glVertex4fv glad_glVertex4fv
-typedef void (APIENTRYP PFNGLVERTEX4IPROC)(GLint x, GLint y, GLint z, GLint w);
-GLAPI PFNGLVERTEX4IPROC glad_glVertex4i;
-#define glVertex4i glad_glVertex4i
-typedef void (APIENTRYP PFNGLVERTEX4IVPROC)(const GLint *v);
-GLAPI PFNGLVERTEX4IVPROC glad_glVertex4iv;
-#define glVertex4iv glad_glVertex4iv
-typedef void (APIENTRYP PFNGLVERTEX4SPROC)(GLshort x, GLshort y, GLshort z, GLshort w);
-GLAPI PFNGLVERTEX4SPROC glad_glVertex4s;
-#define glVertex4s glad_glVertex4s
-typedef void (APIENTRYP PFNGLVERTEX4SVPROC)(const GLshort *v);
-GLAPI PFNGLVERTEX4SVPROC glad_glVertex4sv;
-#define glVertex4sv glad_glVertex4sv
-typedef void (APIENTRYP PFNGLCLIPPLANEPROC)(GLenum plane, const GLdouble *equation);
-GLAPI PFNGLCLIPPLANEPROC glad_glClipPlane;
-#define glClipPlane glad_glClipPlane
-typedef void (APIENTRYP PFNGLCOLORMATERIALPROC)(GLenum face, GLenum mode);
-GLAPI PFNGLCOLORMATERIALPROC glad_glColorMaterial;
-#define glColorMaterial glad_glColorMaterial
-typedef void (APIENTRYP PFNGLFOGFPROC)(GLenum pname, GLfloat param);
-GLAPI PFNGLFOGFPROC glad_glFogf;
-#define glFogf glad_glFogf
-typedef void (APIENTRYP PFNGLFOGFVPROC)(GLenum pname, const GLfloat *params);
-GLAPI PFNGLFOGFVPROC glad_glFogfv;
-#define glFogfv glad_glFogfv
-typedef void (APIENTRYP PFNGLFOGIPROC)(GLenum pname, GLint param);
-GLAPI PFNGLFOGIPROC glad_glFogi;
-#define glFogi glad_glFogi
-typedef void (APIENTRYP PFNGLFOGIVPROC)(GLenum pname, const GLint *params);
-GLAPI PFNGLFOGIVPROC glad_glFogiv;
-#define glFogiv glad_glFogiv
-typedef void (APIENTRYP PFNGLLIGHTFPROC)(GLenum light, GLenum pname, GLfloat param);
-GLAPI PFNGLLIGHTFPROC glad_glLightf;
-#define glLightf glad_glLightf
-typedef void (APIENTRYP PFNGLLIGHTFVPROC)(GLenum light, GLenum pname, const GLfloat *params);
-GLAPI PFNGLLIGHTFVPROC glad_glLightfv;
-#define glLightfv glad_glLightfv
-typedef void (APIENTRYP PFNGLLIGHTIPROC)(GLenum light, GLenum pname, GLint param);
-GLAPI PFNGLLIGHTIPROC glad_glLighti;
-#define glLighti glad_glLighti
-typedef void (APIENTRYP PFNGLLIGHTIVPROC)(GLenum light, GLenum pname, const GLint *params);
-GLAPI PFNGLLIGHTIVPROC glad_glLightiv;
-#define glLightiv glad_glLightiv
-typedef void (APIENTRYP PFNGLLIGHTMODELFPROC)(GLenum pname, GLfloat param);
-GLAPI PFNGLLIGHTMODELFPROC glad_glLightModelf;
-#define glLightModelf glad_glLightModelf
-typedef void (APIENTRYP PFNGLLIGHTMODELFVPROC)(GLenum pname, const GLfloat *params);
-GLAPI PFNGLLIGHTMODELFVPROC glad_glLightModelfv;
-#define glLightModelfv glad_glLightModelfv
-typedef void (APIENTRYP PFNGLLIGHTMODELIPROC)(GLenum pname, GLint param);
-GLAPI PFNGLLIGHTMODELIPROC glad_glLightModeli;
-#define glLightModeli glad_glLightModeli
-typedef void (APIENTRYP PFNGLLIGHTMODELIVPROC)(GLenum pname, const GLint *params);
-GLAPI PFNGLLIGHTMODELIVPROC glad_glLightModeliv;
-#define glLightModeliv glad_glLightModeliv
-typedef void (APIENTRYP PFNGLLINESTIPPLEPROC)(GLint factor, GLushort pattern);
-GLAPI PFNGLLINESTIPPLEPROC glad_glLineStipple;
-#define glLineStipple glad_glLineStipple
-typedef void (APIENTRYP PFNGLMATERIALFPROC)(GLenum face, GLenum pname, GLfloat param);
-GLAPI PFNGLMATERIALFPROC glad_glMaterialf;
-#define glMaterialf glad_glMaterialf
-typedef void (APIENTRYP PFNGLMATERIALFVPROC)(GLenum face, GLenum pname, const GLfloat *params);
-GLAPI PFNGLMATERIALFVPROC glad_glMaterialfv;
-#define glMaterialfv glad_glMaterialfv
-typedef void (APIENTRYP PFNGLMATERIALIPROC)(GLenum face, GLenum pname, GLint param);
-GLAPI PFNGLMATERIALIPROC glad_glMateriali;
-#define glMateriali glad_glMateriali
-typedef void (APIENTRYP PFNGLMATERIALIVPROC)(GLenum face, GLenum pname, const GLint *params);
-GLAPI PFNGLMATERIALIVPROC glad_glMaterialiv;
-#define glMaterialiv glad_glMaterialiv
-typedef void (APIENTRYP PFNGLPOLYGONSTIPPLEPROC)(const GLubyte *mask);
-GLAPI PFNGLPOLYGONSTIPPLEPROC glad_glPolygonStipple;
-#define glPolygonStipple glad_glPolygonStipple
-typedef void (APIENTRYP PFNGLSHADEMODELPROC)(GLenum mode);
-GLAPI PFNGLSHADEMODELPROC glad_glShadeModel;
-#define glShadeModel glad_glShadeModel
-typedef void (APIENTRYP PFNGLTEXENVFPROC)(GLenum target, GLenum pname, GLfloat param);
-GLAPI PFNGLTEXENVFPROC glad_glTexEnvf;
-#define glTexEnvf glad_glTexEnvf
-typedef void (APIENTRYP PFNGLTEXENVFVPROC)(GLenum target, GLenum pname, const GLfloat *params);
-GLAPI PFNGLTEXENVFVPROC glad_glTexEnvfv;
-#define glTexEnvfv glad_glTexEnvfv
-typedef void (APIENTRYP PFNGLTEXENVIPROC)(GLenum target, GLenum pname, GLint param);
-GLAPI PFNGLTEXENVIPROC glad_glTexEnvi;
-#define glTexEnvi glad_glTexEnvi
-typedef void (APIENTRYP PFNGLTEXENVIVPROC)(GLenum target, GLenum pname, const GLint *params);
-GLAPI PFNGLTEXENVIVPROC glad_glTexEnviv;
-#define glTexEnviv glad_glTexEnviv
-typedef void (APIENTRYP PFNGLTEXGENDPROC)(GLenum coord, GLenum pname, GLdouble param);
-GLAPI PFNGLTEXGENDPROC glad_glTexGend;
-#define glTexGend glad_glTexGend
-typedef void (APIENTRYP PFNGLTEXGENDVPROC)(GLenum coord, GLenum pname, const GLdouble *params);
-GLAPI PFNGLTEXGENDVPROC glad_glTexGendv;
-#define glTexGendv glad_glTexGendv
-typedef void (APIENTRYP PFNGLTEXGENFPROC)(GLenum coord, GLenum pname, GLfloat param);
-GLAPI PFNGLTEXGENFPROC glad_glTexGenf;
-#define glTexGenf glad_glTexGenf
-typedef void (APIENTRYP PFNGLTEXGENFVPROC)(GLenum coord, GLenum pname, const GLfloat *params);
-GLAPI PFNGLTEXGENFVPROC glad_glTexGenfv;
-#define glTexGenfv glad_glTexGenfv
-typedef void (APIENTRYP PFNGLTEXGENIPROC)(GLenum coord, GLenum pname, GLint param);
-GLAPI PFNGLTEXGENIPROC glad_glTexGeni;
-#define glTexGeni glad_glTexGeni
-typedef void (APIENTRYP PFNGLTEXGENIVPROC)(GLenum coord, GLenum pname, const GLint *params);
-GLAPI PFNGLTEXGENIVPROC glad_glTexGeniv;
-#define glTexGeniv glad_glTexGeniv
-typedef void (APIENTRYP PFNGLFEEDBACKBUFFERPROC)(GLsizei size, GLenum type, GLfloat *buffer);
-GLAPI PFNGLFEEDBACKBUFFERPROC glad_glFeedbackBuffer;
-#define glFeedbackBuffer glad_glFeedbackBuffer
-typedef void (APIENTRYP PFNGLSELECTBUFFERPROC)(GLsizei size, GLuint *buffer);
-GLAPI PFNGLSELECTBUFFERPROC glad_glSelectBuffer;
-#define glSelectBuffer glad_glSelectBuffer
-typedef GLint (APIENTRYP PFNGLRENDERMODEPROC)(GLenum mode);
-GLAPI PFNGLRENDERMODEPROC glad_glRenderMode;
-#define glRenderMode glad_glRenderMode
-typedef void (APIENTRYP PFNGLINITNAMESPROC)(void);
-GLAPI PFNGLINITNAMESPROC glad_glInitNames;
-#define glInitNames glad_glInitNames
-typedef void (APIENTRYP PFNGLLOADNAMEPROC)(GLuint name);
-GLAPI PFNGLLOADNAMEPROC glad_glLoadName;
-#define glLoadName glad_glLoadName
-typedef void (APIENTRYP PFNGLPASSTHROUGHPROC)(GLfloat token);
-GLAPI PFNGLPASSTHROUGHPROC glad_glPassThrough;
-#define glPassThrough glad_glPassThrough
-typedef void (APIENTRYP PFNGLPOPNAMEPROC)(void);
-GLAPI PFNGLPOPNAMEPROC glad_glPopName;
-#define glPopName glad_glPopName
-typedef void (APIENTRYP PFNGLPUSHNAMEPROC)(GLuint name);
-GLAPI PFNGLPUSHNAMEPROC glad_glPushName;
-#define glPushName glad_glPushName
-typedef void (APIENTRYP PFNGLCLEARACCUMPROC)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
-GLAPI PFNGLCLEARACCUMPROC glad_glClearAccum;
-#define glClearAccum glad_glClearAccum
-typedef void (APIENTRYP PFNGLCLEARINDEXPROC)(GLfloat c);
-GLAPI PFNGLCLEARINDEXPROC glad_glClearIndex;
-#define glClearIndex glad_glClearIndex
-typedef void (APIENTRYP PFNGLINDEXMASKPROC)(GLuint mask);
-GLAPI PFNGLINDEXMASKPROC glad_glIndexMask;
-#define glIndexMask glad_glIndexMask
-typedef void (APIENTRYP PFNGLACCUMPROC)(GLenum op, GLfloat value);
-GLAPI PFNGLACCUMPROC glad_glAccum;
-#define glAccum glad_glAccum
-typedef void (APIENTRYP PFNGLPOPATTRIBPROC)(void);
-GLAPI PFNGLPOPATTRIBPROC glad_glPopAttrib;
-#define glPopAttrib glad_glPopAttrib
-typedef void (APIENTRYP PFNGLPUSHATTRIBPROC)(GLbitfield mask);
-GLAPI PFNGLPUSHATTRIBPROC glad_glPushAttrib;
-#define glPushAttrib glad_glPushAttrib
-typedef void (APIENTRYP PFNGLMAP1DPROC)(GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points);
-GLAPI PFNGLMAP1DPROC glad_glMap1d;
-#define glMap1d glad_glMap1d
-typedef void (APIENTRYP PFNGLMAP1FPROC)(GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points);
-GLAPI PFNGLMAP1FPROC glad_glMap1f;
-#define glMap1f glad_glMap1f
-typedef void (APIENTRYP PFNGLMAP2DPROC)(GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points);
-GLAPI PFNGLMAP2DPROC glad_glMap2d;
-#define glMap2d glad_glMap2d
-typedef void (APIENTRYP PFNGLMAP2FPROC)(GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points);
-GLAPI PFNGLMAP2FPROC glad_glMap2f;
-#define glMap2f glad_glMap2f
-typedef void (APIENTRYP PFNGLMAPGRID1DPROC)(GLint un, GLdouble u1, GLdouble u2);
-GLAPI PFNGLMAPGRID1DPROC glad_glMapGrid1d;
-#define glMapGrid1d glad_glMapGrid1d
-typedef void (APIENTRYP PFNGLMAPGRID1FPROC)(GLint un, GLfloat u1, GLfloat u2);
-GLAPI PFNGLMAPGRID1FPROC glad_glMapGrid1f;
-#define glMapGrid1f glad_glMapGrid1f
-typedef void (APIENTRYP PFNGLMAPGRID2DPROC)(GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2);
-GLAPI PFNGLMAPGRID2DPROC glad_glMapGrid2d;
-#define glMapGrid2d glad_glMapGrid2d
-typedef void (APIENTRYP PFNGLMAPGRID2FPROC)(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2);
-GLAPI PFNGLMAPGRID2FPROC glad_glMapGrid2f;
-#define glMapGrid2f glad_glMapGrid2f
-typedef void (APIENTRYP PFNGLEVALCOORD1DPROC)(GLdouble u);
-GLAPI PFNGLEVALCOORD1DPROC glad_glEvalCoord1d;
-#define glEvalCoord1d glad_glEvalCoord1d
-typedef void (APIENTRYP PFNGLEVALCOORD1DVPROC)(const GLdouble *u);
-GLAPI PFNGLEVALCOORD1DVPROC glad_glEvalCoord1dv;
-#define glEvalCoord1dv glad_glEvalCoord1dv
-typedef void (APIENTRYP PFNGLEVALCOORD1FPROC)(GLfloat u);
-GLAPI PFNGLEVALCOORD1FPROC glad_glEvalCoord1f;
-#define glEvalCoord1f glad_glEvalCoord1f
-typedef void (APIENTRYP PFNGLEVALCOORD1FVPROC)(const GLfloat *u);
-GLAPI PFNGLEVALCOORD1FVPROC glad_glEvalCoord1fv;
-#define glEvalCoord1fv glad_glEvalCoord1fv
-typedef void (APIENTRYP PFNGLEVALCOORD2DPROC)(GLdouble u, GLdouble v);
-GLAPI PFNGLEVALCOORD2DPROC glad_glEvalCoord2d;
-#define glEvalCoord2d glad_glEvalCoord2d
-typedef void (APIENTRYP PFNGLEVALCOORD2DVPROC)(const GLdouble *u);
-GLAPI PFNGLEVALCOORD2DVPROC glad_glEvalCoord2dv;
-#define glEvalCoord2dv glad_glEvalCoord2dv
-typedef void (APIENTRYP PFNGLEVALCOORD2FPROC)(GLfloat u, GLfloat v);
-GLAPI PFNGLEVALCOORD2FPROC glad_glEvalCoord2f;
-#define glEvalCoord2f glad_glEvalCoord2f
-typedef void (APIENTRYP PFNGLEVALCOORD2FVPROC)(const GLfloat *u);
-GLAPI PFNGLEVALCOORD2FVPROC glad_glEvalCoord2fv;
-#define glEvalCoord2fv glad_glEvalCoord2fv
-typedef void (APIENTRYP PFNGLEVALMESH1PROC)(GLenum mode, GLint i1, GLint i2);
-GLAPI PFNGLEVALMESH1PROC glad_glEvalMesh1;
-#define glEvalMesh1 glad_glEvalMesh1
-typedef void (APIENTRYP PFNGLEVALPOINT1PROC)(GLint i);
-GLAPI PFNGLEVALPOINT1PROC glad_glEvalPoint1;
-#define glEvalPoint1 glad_glEvalPoint1
-typedef void (APIENTRYP PFNGLEVALMESH2PROC)(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2);
-GLAPI PFNGLEVALMESH2PROC glad_glEvalMesh2;
-#define glEvalMesh2 glad_glEvalMesh2
-typedef void (APIENTRYP PFNGLEVALPOINT2PROC)(GLint i, GLint j);
-GLAPI PFNGLEVALPOINT2PROC glad_glEvalPoint2;
-#define glEvalPoint2 glad_glEvalPoint2
-typedef void (APIENTRYP PFNGLALPHAFUNCPROC)(GLenum func, GLfloat ref);
-GLAPI PFNGLALPHAFUNCPROC glad_glAlphaFunc;
-#define glAlphaFunc glad_glAlphaFunc
-typedef void (APIENTRYP PFNGLPIXELZOOMPROC)(GLfloat xfactor, GLfloat yfactor);
-GLAPI PFNGLPIXELZOOMPROC glad_glPixelZoom;
-#define glPixelZoom glad_glPixelZoom
-typedef void (APIENTRYP PFNGLPIXELTRANSFERFPROC)(GLenum pname, GLfloat param);
-GLAPI PFNGLPIXELTRANSFERFPROC glad_glPixelTransferf;
-#define glPixelTransferf glad_glPixelTransferf
-typedef void (APIENTRYP PFNGLPIXELTRANSFERIPROC)(GLenum pname, GLint param);
-GLAPI PFNGLPIXELTRANSFERIPROC glad_glPixelTransferi;
-#define glPixelTransferi glad_glPixelTransferi
-typedef void (APIENTRYP PFNGLPIXELMAPFVPROC)(GLenum map, GLsizei mapsize, const GLfloat *values);
-GLAPI PFNGLPIXELMAPFVPROC glad_glPixelMapfv;
-#define glPixelMapfv glad_glPixelMapfv
-typedef void (APIENTRYP PFNGLPIXELMAPUIVPROC)(GLenum map, GLsizei mapsize, const GLuint *values);
-GLAPI PFNGLPIXELMAPUIVPROC glad_glPixelMapuiv;
-#define glPixelMapuiv glad_glPixelMapuiv
-typedef void (APIENTRYP PFNGLPIXELMAPUSVPROC)(GLenum map, GLsizei mapsize, const GLushort *values);
-GLAPI PFNGLPIXELMAPUSVPROC glad_glPixelMapusv;
-#define glPixelMapusv glad_glPixelMapusv
-typedef void (APIENTRYP PFNGLCOPYPIXELSPROC)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type);
-GLAPI PFNGLCOPYPIXELSPROC glad_glCopyPixels;
-#define glCopyPixels glad_glCopyPixels
-typedef void (APIENTRYP PFNGLDRAWPIXELSPROC)(GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);
-GLAPI PFNGLDRAWPIXELSPROC glad_glDrawPixels;
-#define glDrawPixels glad_glDrawPixels
-typedef void (APIENTRYP PFNGLGETCLIPPLANEPROC)(GLenum plane, GLdouble *equation);
-GLAPI PFNGLGETCLIPPLANEPROC glad_glGetClipPlane;
-#define glGetClipPlane glad_glGetClipPlane
-typedef void (APIENTRYP PFNGLGETLIGHTFVPROC)(GLenum light, GLenum pname, GLfloat *params);
-GLAPI PFNGLGETLIGHTFVPROC glad_glGetLightfv;
-#define glGetLightfv glad_glGetLightfv
-typedef void (APIENTRYP PFNGLGETLIGHTIVPROC)(GLenum light, GLenum pname, GLint *params);
-GLAPI PFNGLGETLIGHTIVPROC glad_glGetLightiv;
-#define glGetLightiv glad_glGetLightiv
-typedef void (APIENTRYP PFNGLGETMAPDVPROC)(GLenum target, GLenum query, GLdouble *v);
-GLAPI PFNGLGETMAPDVPROC glad_glGetMapdv;
-#define glGetMapdv glad_glGetMapdv
-typedef void (APIENTRYP PFNGLGETMAPFVPROC)(GLenum target, GLenum query, GLfloat *v);
-GLAPI PFNGLGETMAPFVPROC glad_glGetMapfv;
-#define glGetMapfv glad_glGetMapfv
-typedef void (APIENTRYP PFNGLGETMAPIVPROC)(GLenum target, GLenum query, GLint *v);
-GLAPI PFNGLGETMAPIVPROC glad_glGetMapiv;
-#define glGetMapiv glad_glGetMapiv
-typedef void (APIENTRYP PFNGLGETMATERIALFVPROC)(GLenum face, GLenum pname, GLfloat *params);
-GLAPI PFNGLGETMATERIALFVPROC glad_glGetMaterialfv;
-#define glGetMaterialfv glad_glGetMaterialfv
-typedef void (APIENTRYP PFNGLGETMATERIALIVPROC)(GLenum face, GLenum pname, GLint *params);
-GLAPI PFNGLGETMATERIALIVPROC glad_glGetMaterialiv;
-#define glGetMaterialiv glad_glGetMaterialiv
-typedef void (APIENTRYP PFNGLGETPIXELMAPFVPROC)(GLenum map, GLfloat *values);
-GLAPI PFNGLGETPIXELMAPFVPROC glad_glGetPixelMapfv;
-#define glGetPixelMapfv glad_glGetPixelMapfv
-typedef void (APIENTRYP PFNGLGETPIXELMAPUIVPROC)(GLenum map, GLuint *values);
-GLAPI PFNGLGETPIXELMAPUIVPROC glad_glGetPixelMapuiv;
-#define glGetPixelMapuiv glad_glGetPixelMapuiv
-typedef void (APIENTRYP PFNGLGETPIXELMAPUSVPROC)(GLenum map, GLushort *values);
-GLAPI PFNGLGETPIXELMAPUSVPROC glad_glGetPixelMapusv;
-#define glGetPixelMapusv glad_glGetPixelMapusv
-typedef void (APIENTRYP PFNGLGETPOLYGONSTIPPLEPROC)(GLubyte *mask);
-GLAPI PFNGLGETPOLYGONSTIPPLEPROC glad_glGetPolygonStipple;
-#define glGetPolygonStipple glad_glGetPolygonStipple
-typedef void (APIENTRYP PFNGLGETTEXENVFVPROC)(GLenum target, GLenum pname, GLfloat *params);
-GLAPI PFNGLGETTEXENVFVPROC glad_glGetTexEnvfv;
-#define glGetTexEnvfv glad_glGetTexEnvfv
-typedef void (APIENTRYP PFNGLGETTEXENVIVPROC)(GLenum target, GLenum pname, GLint *params);
-GLAPI PFNGLGETTEXENVIVPROC glad_glGetTexEnviv;
-#define glGetTexEnviv glad_glGetTexEnviv
-typedef void (APIENTRYP PFNGLGETTEXGENDVPROC)(GLenum coord, GLenum pname, GLdouble *params);
-GLAPI PFNGLGETTEXGENDVPROC glad_glGetTexGendv;
-#define glGetTexGendv glad_glGetTexGendv
-typedef void (APIENTRYP PFNGLGETTEXGENFVPROC)(GLenum coord, GLenum pname, GLfloat *params);
-GLAPI PFNGLGETTEXGENFVPROC glad_glGetTexGenfv;
-#define glGetTexGenfv glad_glGetTexGenfv
-typedef void (APIENTRYP PFNGLGETTEXGENIVPROC)(GLenum coord, GLenum pname, GLint *params);
-GLAPI PFNGLGETTEXGENIVPROC glad_glGetTexGeniv;
-#define glGetTexGeniv glad_glGetTexGeniv
-typedef GLboolean (APIENTRYP PFNGLISLISTPROC)(GLuint list);
-GLAPI PFNGLISLISTPROC glad_glIsList;
-#define glIsList glad_glIsList
-typedef void (APIENTRYP PFNGLFRUSTUMPROC)(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);
-GLAPI PFNGLFRUSTUMPROC glad_glFrustum;
-#define glFrustum glad_glFrustum
-typedef void (APIENTRYP PFNGLLOADIDENTITYPROC)(void);
-GLAPI PFNGLLOADIDENTITYPROC glad_glLoadIdentity;
-#define glLoadIdentity glad_glLoadIdentity
-typedef void (APIENTRYP PFNGLLOADMATRIXFPROC)(const GLfloat *m);
-GLAPI PFNGLLOADMATRIXFPROC glad_glLoadMatrixf;
-#define glLoadMatrixf glad_glLoadMatrixf
-typedef void (APIENTRYP PFNGLLOADMATRIXDPROC)(const GLdouble *m);
-GLAPI PFNGLLOADMATRIXDPROC glad_glLoadMatrixd;
-#define glLoadMatrixd glad_glLoadMatrixd
-typedef void (APIENTRYP PFNGLMATRIXMODEPROC)(GLenum mode);
-GLAPI PFNGLMATRIXMODEPROC glad_glMatrixMode;
-#define glMatrixMode glad_glMatrixMode
-typedef void (APIENTRYP PFNGLMULTMATRIXFPROC)(const GLfloat *m);
-GLAPI PFNGLMULTMATRIXFPROC glad_glMultMatrixf;
-#define glMultMatrixf glad_glMultMatrixf
-typedef void (APIENTRYP PFNGLMULTMATRIXDPROC)(const GLdouble *m);
-GLAPI PFNGLMULTMATRIXDPROC glad_glMultMatrixd;
-#define glMultMatrixd glad_glMultMatrixd
-typedef void (APIENTRYP PFNGLORTHOPROC)(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);
-GLAPI PFNGLORTHOPROC glad_glOrtho;
-#define glOrtho glad_glOrtho
-typedef void (APIENTRYP PFNGLPOPMATRIXPROC)(void);
-GLAPI PFNGLPOPMATRIXPROC glad_glPopMatrix;
-#define glPopMatrix glad_glPopMatrix
-typedef void (APIENTRYP PFNGLPUSHMATRIXPROC)(void);
-GLAPI PFNGLPUSHMATRIXPROC glad_glPushMatrix;
-#define glPushMatrix glad_glPushMatrix
-typedef void (APIENTRYP PFNGLROTATEDPROC)(GLdouble angle, GLdouble x, GLdouble y, GLdouble z);
-GLAPI PFNGLROTATEDPROC glad_glRotated;
-#define glRotated glad_glRotated
-typedef void (APIENTRYP PFNGLROTATEFPROC)(GLfloat angle, GLfloat x, GLfloat y, GLfloat z);
-GLAPI PFNGLROTATEFPROC glad_glRotatef;
-#define glRotatef glad_glRotatef
-typedef void (APIENTRYP PFNGLSCALEDPROC)(GLdouble x, GLdouble y, GLdouble z);
-GLAPI PFNGLSCALEDPROC glad_glScaled;
-#define glScaled glad_glScaled
-typedef void (APIENTRYP PFNGLSCALEFPROC)(GLfloat x, GLfloat y, GLfloat z);
-GLAPI PFNGLSCALEFPROC glad_glScalef;
-#define glScalef glad_glScalef
-typedef void (APIENTRYP PFNGLTRANSLATEDPROC)(GLdouble x, GLdouble y, GLdouble z);
-GLAPI PFNGLTRANSLATEDPROC glad_glTranslated;
-#define glTranslated glad_glTranslated
-typedef void (APIENTRYP PFNGLTRANSLATEFPROC)(GLfloat x, GLfloat y, GLfloat z);
-GLAPI PFNGLTRANSLATEFPROC glad_glTranslatef;
-#define glTranslatef glad_glTranslatef
-#endif
-#ifndef GL_VERSION_1_1
-#define GL_VERSION_1_1 1
-GLAPI int GLAD_GL_VERSION_1_1;
-typedef void (APIENTRYP PFNGLDRAWARRAYSPROC)(GLenum mode, GLint first, GLsizei count);
-GLAPI PFNGLDRAWARRAYSPROC glad_glDrawArrays;
-#define glDrawArrays glad_glDrawArrays
-typedef void (APIENTRYP PFNGLDRAWELEMENTSPROC)(GLenum mode, GLsizei count, GLenum type, const void *indices);
-GLAPI PFNGLDRAWELEMENTSPROC glad_glDrawElements;
-#define glDrawElements glad_glDrawElements
-typedef void (APIENTRYP PFNGLGETPOINTERVPROC)(GLenum pname, void **params);
-GLAPI PFNGLGETPOINTERVPROC glad_glGetPointerv;
-#define glGetPointerv glad_glGetPointerv
-typedef void (APIENTRYP PFNGLPOLYGONOFFSETPROC)(GLfloat factor, GLfloat units);
-GLAPI PFNGLPOLYGONOFFSETPROC glad_glPolygonOffset;
-#define glPolygonOffset glad_glPolygonOffset
-typedef void (APIENTRYP PFNGLCOPYTEXIMAGE1DPROC)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);
-GLAPI PFNGLCOPYTEXIMAGE1DPROC glad_glCopyTexImage1D;
-#define glCopyTexImage1D glad_glCopyTexImage1D
-typedef void (APIENTRYP PFNGLCOPYTEXIMAGE2DPROC)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
-GLAPI PFNGLCOPYTEXIMAGE2DPROC glad_glCopyTexImage2D;
-#define glCopyTexImage2D glad_glCopyTexImage2D
-typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE1DPROC)(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
-GLAPI PFNGLCOPYTEXSUBIMAGE1DPROC glad_glCopyTexSubImage1D;
-#define glCopyTexSubImage1D glad_glCopyTexSubImage1D
-typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE2DPROC)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
-GLAPI PFNGLCOPYTEXSUBIMAGE2DPROC glad_glCopyTexSubImage2D;
-#define glCopyTexSubImage2D glad_glCopyTexSubImage2D
-typedef void (APIENTRYP PFNGLTEXSUBIMAGE1DPROC)(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels);
-GLAPI PFNGLTEXSUBIMAGE1DPROC glad_glTexSubImage1D;
-#define glTexSubImage1D glad_glTexSubImage1D
-typedef void (APIENTRYP PFNGLTEXSUBIMAGE2DPROC)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);
-GLAPI PFNGLTEXSUBIMAGE2DPROC glad_glTexSubImage2D;
-#define glTexSubImage2D glad_glTexSubImage2D
-typedef void (APIENTRYP PFNGLBINDTEXTUREPROC)(GLenum target, GLuint texture);
-GLAPI PFNGLBINDTEXTUREPROC glad_glBindTexture;
-#define glBindTexture glad_glBindTexture
-typedef void (APIENTRYP PFNGLDELETETEXTURESPROC)(GLsizei n, const GLuint *textures);
-GLAPI PFNGLDELETETEXTURESPROC glad_glDeleteTextures;
-#define glDeleteTextures glad_glDeleteTextures
-typedef void (APIENTRYP PFNGLGENTEXTURESPROC)(GLsizei n, GLuint *textures);
-GLAPI PFNGLGENTEXTURESPROC glad_glGenTextures;
-#define glGenTextures glad_glGenTextures
-typedef GLboolean (APIENTRYP PFNGLISTEXTUREPROC)(GLuint texture);
-GLAPI PFNGLISTEXTUREPROC glad_glIsTexture;
-#define glIsTexture glad_glIsTexture
-typedef void (APIENTRYP PFNGLARRAYELEMENTPROC)(GLint i);
-GLAPI PFNGLARRAYELEMENTPROC glad_glArrayElement;
-#define glArrayElement glad_glArrayElement
-typedef void (APIENTRYP PFNGLCOLORPOINTERPROC)(GLint size, GLenum type, GLsizei stride, const void *pointer);
-GLAPI PFNGLCOLORPOINTERPROC glad_glColorPointer;
-#define glColorPointer glad_glColorPointer
-typedef void (APIENTRYP PFNGLDISABLECLIENTSTATEPROC)(GLenum array);
-GLAPI PFNGLDISABLECLIENTSTATEPROC glad_glDisableClientState;
-#define glDisableClientState glad_glDisableClientState
-typedef void (APIENTRYP PFNGLEDGEFLAGPOINTERPROC)(GLsizei stride, const void *pointer);
-GLAPI PFNGLEDGEFLAGPOINTERPROC glad_glEdgeFlagPointer;
-#define glEdgeFlagPointer glad_glEdgeFlagPointer
-typedef void (APIENTRYP PFNGLENABLECLIENTSTATEPROC)(GLenum array);
-GLAPI PFNGLENABLECLIENTSTATEPROC glad_glEnableClientState;
-#define glEnableClientState glad_glEnableClientState
-typedef void (APIENTRYP PFNGLINDEXPOINTERPROC)(GLenum type, GLsizei stride, const void *pointer);
-GLAPI PFNGLINDEXPOINTERPROC glad_glIndexPointer;
-#define glIndexPointer glad_glIndexPointer
-typedef void (APIENTRYP PFNGLINTERLEAVEDARRAYSPROC)(GLenum format, GLsizei stride, const void *pointer);
-GLAPI PFNGLINTERLEAVEDARRAYSPROC glad_glInterleavedArrays;
-#define glInterleavedArrays glad_glInterleavedArrays
-typedef void (APIENTRYP PFNGLNORMALPOINTERPROC)(GLenum type, GLsizei stride, const void *pointer);
-GLAPI PFNGLNORMALPOINTERPROC glad_glNormalPointer;
-#define glNormalPointer glad_glNormalPointer
-typedef void (APIENTRYP PFNGLTEXCOORDPOINTERPROC)(GLint size, GLenum type, GLsizei stride, const void *pointer);
-GLAPI PFNGLTEXCOORDPOINTERPROC glad_glTexCoordPointer;
-#define glTexCoordPointer glad_glTexCoordPointer
-typedef void (APIENTRYP PFNGLVERTEXPOINTERPROC)(GLint size, GLenum type, GLsizei stride, const void *pointer);
-GLAPI PFNGLVERTEXPOINTERPROC glad_glVertexPointer;
-#define glVertexPointer glad_glVertexPointer
-typedef GLboolean (APIENTRYP PFNGLARETEXTURESRESIDENTPROC)(GLsizei n, const GLuint *textures, GLboolean *residences);
-GLAPI PFNGLARETEXTURESRESIDENTPROC glad_glAreTexturesResident;
-#define glAreTexturesResident glad_glAreTexturesResident
-typedef void (APIENTRYP PFNGLPRIORITIZETEXTURESPROC)(GLsizei n, const GLuint *textures, const GLfloat *priorities);
-GLAPI PFNGLPRIORITIZETEXTURESPROC glad_glPrioritizeTextures;
-#define glPrioritizeTextures glad_glPrioritizeTextures
-typedef void (APIENTRYP PFNGLINDEXUBPROC)(GLubyte c);
-GLAPI PFNGLINDEXUBPROC glad_glIndexub;
-#define glIndexub glad_glIndexub
-typedef void (APIENTRYP PFNGLINDEXUBVPROC)(const GLubyte *c);
-GLAPI PFNGLINDEXUBVPROC glad_glIndexubv;
-#define glIndexubv glad_glIndexubv
-typedef void (APIENTRYP PFNGLPOPCLIENTATTRIBPROC)(void);
-GLAPI PFNGLPOPCLIENTATTRIBPROC glad_glPopClientAttrib;
-#define glPopClientAttrib glad_glPopClientAttrib
-typedef void (APIENTRYP PFNGLPUSHCLIENTATTRIBPROC)(GLbitfield mask);
-GLAPI PFNGLPUSHCLIENTATTRIBPROC glad_glPushClientAttrib;
-#define glPushClientAttrib glad_glPushClientAttrib
-#endif
-#ifndef GL_VERSION_1_2
-#define GL_VERSION_1_2 1
-GLAPI int GLAD_GL_VERSION_1_2;
-typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSPROC)(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices);
-GLAPI PFNGLDRAWRANGEELEMENTSPROC glad_glDrawRangeElements;
-#define glDrawRangeElements glad_glDrawRangeElements
-typedef void (APIENTRYP PFNGLTEXIMAGE3DPROC)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);
-GLAPI PFNGLTEXIMAGE3DPROC glad_glTexImage3D;
-#define glTexImage3D glad_glTexImage3D
-typedef void (APIENTRYP PFNGLTEXSUBIMAGE3DPROC)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);
-GLAPI PFNGLTEXSUBIMAGE3DPROC glad_glTexSubImage3D;
-#define glTexSubImage3D glad_glTexSubImage3D
-typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DPROC)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
-GLAPI PFNGLCOPYTEXSUBIMAGE3DPROC glad_glCopyTexSubImage3D;
-#define glCopyTexSubImage3D glad_glCopyTexSubImage3D
-#endif
-#ifndef GL_VERSION_1_3
-#define GL_VERSION_1_3 1
-GLAPI int GLAD_GL_VERSION_1_3;
-typedef void (APIENTRYP PFNGLACTIVETEXTUREPROC)(GLenum texture);
-GLAPI PFNGLACTIVETEXTUREPROC glad_glActiveTexture;
-#define glActiveTexture glad_glActiveTexture
-typedef void (APIENTRYP PFNGLSAMPLECOVERAGEPROC)(GLfloat value, GLboolean invert);
-GLAPI PFNGLSAMPLECOVERAGEPROC glad_glSampleCoverage;
-#define glSampleCoverage glad_glSampleCoverage
-typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DPROC)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data);
-GLAPI PFNGLCOMPRESSEDTEXIMAGE3DPROC glad_glCompressedTexImage3D;
-#define glCompressedTexImage3D glad_glCompressedTexImage3D
-typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DPROC)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data);
-GLAPI PFNGLCOMPRESSEDTEXIMAGE2DPROC glad_glCompressedTexImage2D;
-#define glCompressedTexImage2D glad_glCompressedTexImage2D
-typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DPROC)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *data);
-GLAPI PFNGLCOMPRESSEDTEXIMAGE1DPROC glad_glCompressedTexImage1D;
-#define glCompressedTexImage1D glad_glCompressedTexImage1D
-typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data);
-GLAPI PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC glad_glCompressedTexSubImage3D;
-#define glCompressedTexSubImage3D glad_glCompressedTexSubImage3D
-typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data);
-GLAPI PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC glad_glCompressedTexSubImage2D;
-#define glCompressedTexSubImage2D glad_glCompressedTexSubImage2D
-typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC)(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *data);
-GLAPI PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC glad_glCompressedTexSubImage1D;
-#define glCompressedTexSubImage1D glad_glCompressedTexSubImage1D
-typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEPROC)(GLenum target, GLint level, void *img);
-GLAPI PFNGLGETCOMPRESSEDTEXIMAGEPROC glad_glGetCompressedTexImage;
-#define glGetCompressedTexImage glad_glGetCompressedTexImage
-typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREPROC)(GLenum texture);
-GLAPI PFNGLCLIENTACTIVETEXTUREPROC glad_glClientActiveTexture;
-#define glClientActiveTexture glad_glClientActiveTexture
-typedef void (APIENTRYP PFNGLMULTITEXCOORD1DPROC)(GLenum target, GLdouble s);
-GLAPI PFNGLMULTITEXCOORD1DPROC glad_glMultiTexCoord1d;
-#define glMultiTexCoord1d glad_glMultiTexCoord1d
-typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVPROC)(GLenum target, const GLdouble *v);
-GLAPI PFNGLMULTITEXCOORD1DVPROC glad_glMultiTexCoord1dv;
-#define glMultiTexCoord1dv glad_glMultiTexCoord1dv
-typedef void (APIENTRYP PFNGLMULTITEXCOORD1FPROC)(GLenum target, GLfloat s);
-GLAPI PFNGLMULTITEXCOORD1FPROC glad_glMultiTexCoord1f;
-#define glMultiTexCoord1f glad_glMultiTexCoord1f
-typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVPROC)(GLenum target, const GLfloat *v);
-GLAPI PFNGLMULTITEXCOORD1FVPROC glad_glMultiTexCoord1fv;
-#define glMultiTexCoord1fv glad_glMultiTexCoord1fv
-typedef void (APIENTRYP PFNGLMULTITEXCOORD1IPROC)(GLenum target, GLint s);
-GLAPI PFNGLMULTITEXCOORD1IPROC glad_glMultiTexCoord1i;
-#define glMultiTexCoord1i glad_glMultiTexCoord1i
-typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVPROC)(GLenum target, const GLint *v);
-GLAPI PFNGLMULTITEXCOORD1IVPROC glad_glMultiTexCoord1iv;
-#define glMultiTexCoord1iv glad_glMultiTexCoord1iv
-typedef void (APIENTRYP PFNGLMULTITEXCOORD1SPROC)(GLenum target, GLshort s);
-GLAPI PFNGLMULTITEXCOORD1SPROC glad_glMultiTexCoord1s;
-#define glMultiTexCoord1s glad_glMultiTexCoord1s
-typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVPROC)(GLenum target, const GLshort *v);
-GLAPI PFNGLMULTITEXCOORD1SVPROC glad_glMultiTexCoord1sv;
-#define glMultiTexCoord1sv glad_glMultiTexCoord1sv
-typedef void (APIENTRYP PFNGLMULTITEXCOORD2DPROC)(GLenum target, GLdouble s, GLdouble t);
-GLAPI PFNGLMULTITEXCOORD2DPROC glad_glMultiTexCoord2d;
-#define glMultiTexCoord2d glad_glMultiTexCoord2d
-typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVPROC)(GLenum target, const GLdouble *v);
-GLAPI PFNGLMULTITEXCOORD2DVPROC glad_glMultiTexCoord2dv;
-#define glMultiTexCoord2dv glad_glMultiTexCoord2dv
-typedef void (APIENTRYP PFNGLMULTITEXCOORD2FPROC)(GLenum target, GLfloat s, GLfloat t);
-GLAPI PFNGLMULTITEXCOORD2FPROC glad_glMultiTexCoord2f;
-#define glMultiTexCoord2f glad_glMultiTexCoord2f
-typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVPROC)(GLenum target, const GLfloat *v);
-GLAPI PFNGLMULTITEXCOORD2FVPROC glad_glMultiTexCoord2fv;
-#define glMultiTexCoord2fv glad_glMultiTexCoord2fv
-typedef void (APIENTRYP PFNGLMULTITEXCOORD2IPROC)(GLenum target, GLint s, GLint t);
-GLAPI PFNGLMULTITEXCOORD2IPROC glad_glMultiTexCoord2i;
-#define glMultiTexCoord2i glad_glMultiTexCoord2i
-typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVPROC)(GLenum target, const GLint *v);
-GLAPI PFNGLMULTITEXCOORD2IVPROC glad_glMultiTexCoord2iv;
-#define glMultiTexCoord2iv glad_glMultiTexCoord2iv
-typedef void (APIENTRYP PFNGLMULTITEXCOORD2SPROC)(GLenum target, GLshort s, GLshort t);
-GLAPI PFNGLMULTITEXCOORD2SPROC glad_glMultiTexCoord2s;
-#define glMultiTexCoord2s glad_glMultiTexCoord2s
-typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVPROC)(GLenum target, const GLshort *v);
-GLAPI PFNGLMULTITEXCOORD2SVPROC glad_glMultiTexCoord2sv;
-#define glMultiTexCoord2sv glad_glMultiTexCoord2sv
-typedef void (APIENTRYP PFNGLMULTITEXCOORD3DPROC)(GLenum target, GLdouble s, GLdouble t, GLdouble r);
-GLAPI PFNGLMULTITEXCOORD3DPROC glad_glMultiTexCoord3d;
-#define glMultiTexCoord3d glad_glMultiTexCoord3d
-typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVPROC)(GLenum target, const GLdouble *v);
-GLAPI PFNGLMULTITEXCOORD3DVPROC glad_glMultiTexCoord3dv;
-#define glMultiTexCoord3dv glad_glMultiTexCoord3dv
-typedef void (APIENTRYP PFNGLMULTITEXCOORD3FPROC)(GLenum target, GLfloat s, GLfloat t, GLfloat r);
-GLAPI PFNGLMULTITEXCOORD3FPROC glad_glMultiTexCoord3f;
-#define glMultiTexCoord3f glad_glMultiTexCoord3f
-typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVPROC)(GLenum target, const GLfloat *v);
-GLAPI PFNGLMULTITEXCOORD3FVPROC glad_glMultiTexCoord3fv;
-#define glMultiTexCoord3fv glad_glMultiTexCoord3fv
-typedef void (APIENTRYP PFNGLMULTITEXCOORD3IPROC)(GLenum target, GLint s, GLint t, GLint r);
-GLAPI PFNGLMULTITEXCOORD3IPROC glad_glMultiTexCoord3i;
-#define glMultiTexCoord3i glad_glMultiTexCoord3i
-typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVPROC)(GLenum target, const GLint *v);
-GLAPI PFNGLMULTITEXCOORD3IVPROC glad_glMultiTexCoord3iv;
-#define glMultiTexCoord3iv glad_glMultiTexCoord3iv
-typedef void (APIENTRYP PFNGLMULTITEXCOORD3SPROC)(GLenum target, GLshort s, GLshort t, GLshort r);
-GLAPI PFNGLMULTITEXCOORD3SPROC glad_glMultiTexCoord3s;
-#define glMultiTexCoord3s glad_glMultiTexCoord3s
-typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVPROC)(GLenum target, const GLshort *v);
-GLAPI PFNGLMULTITEXCOORD3SVPROC glad_glMultiTexCoord3sv;
-#define glMultiTexCoord3sv glad_glMultiTexCoord3sv
-typedef void (APIENTRYP PFNGLMULTITEXCOORD4DPROC)(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
-GLAPI PFNGLMULTITEXCOORD4DPROC glad_glMultiTexCoord4d;
-#define glMultiTexCoord4d glad_glMultiTexCoord4d
-typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVPROC)(GLenum target, const GLdouble *v);
-GLAPI PFNGLMULTITEXCOORD4DVPROC glad_glMultiTexCoord4dv;
-#define glMultiTexCoord4dv glad_glMultiTexCoord4dv
-typedef void (APIENTRYP PFNGLMULTITEXCOORD4FPROC)(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
-GLAPI PFNGLMULTITEXCOORD4FPROC glad_glMultiTexCoord4f;
-#define glMultiTexCoord4f glad_glMultiTexCoord4f
-typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVPROC)(GLenum target, const GLfloat *v);
-GLAPI PFNGLMULTITEXCOORD4FVPROC glad_glMultiTexCoord4fv;
-#define glMultiTexCoord4fv glad_glMultiTexCoord4fv
-typedef void (APIENTRYP PFNGLMULTITEXCOORD4IPROC)(GLenum target, GLint s, GLint t, GLint r, GLint q);
-GLAPI PFNGLMULTITEXCOORD4IPROC glad_glMultiTexCoord4i;
-#define glMultiTexCoord4i glad_glMultiTexCoord4i
-typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVPROC)(GLenum target, const GLint *v);
-GLAPI PFNGLMULTITEXCOORD4IVPROC glad_glMultiTexCoord4iv;
-#define glMultiTexCoord4iv glad_glMultiTexCoord4iv
-typedef void (APIENTRYP PFNGLMULTITEXCOORD4SPROC)(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
-GLAPI PFNGLMULTITEXCOORD4SPROC glad_glMultiTexCoord4s;
-#define glMultiTexCoord4s glad_glMultiTexCoord4s
-typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVPROC)(GLenum target, const GLshort *v);
-GLAPI PFNGLMULTITEXCOORD4SVPROC glad_glMultiTexCoord4sv;
-#define glMultiTexCoord4sv glad_glMultiTexCoord4sv
-typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXFPROC)(const GLfloat *m);
-GLAPI PFNGLLOADTRANSPOSEMATRIXFPROC glad_glLoadTransposeMatrixf;
-#define glLoadTransposeMatrixf glad_glLoadTransposeMatrixf
-typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXDPROC)(const GLdouble *m);
-GLAPI PFNGLLOADTRANSPOSEMATRIXDPROC glad_glLoadTransposeMatrixd;
-#define glLoadTransposeMatrixd glad_glLoadTransposeMatrixd
-typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXFPROC)(const GLfloat *m);
-GLAPI PFNGLMULTTRANSPOSEMATRIXFPROC glad_glMultTransposeMatrixf;
-#define glMultTransposeMatrixf glad_glMultTransposeMatrixf
-typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXDPROC)(const GLdouble *m);
-GLAPI PFNGLMULTTRANSPOSEMATRIXDPROC glad_glMultTransposeMatrixd;
-#define glMultTransposeMatrixd glad_glMultTransposeMatrixd
-#endif
-#ifndef GL_VERSION_1_4
-#define GL_VERSION_1_4 1
-GLAPI int GLAD_GL_VERSION_1_4;
-typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEPROC)(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
-GLAPI PFNGLBLENDFUNCSEPARATEPROC glad_glBlendFuncSeparate;
-#define glBlendFuncSeparate glad_glBlendFuncSeparate
-typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSPROC)(GLenum mode, const GLint *first, const GLsizei *count, GLsizei drawcount);
-GLAPI PFNGLMULTIDRAWARRAYSPROC glad_glMultiDrawArrays;
-#define glMultiDrawArrays glad_glMultiDrawArrays
-typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSPROC)(GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei drawcount);
-GLAPI PFNGLMULTIDRAWELEMENTSPROC glad_glMultiDrawElements;
-#define glMultiDrawElements glad_glMultiDrawElements
-typedef void (APIENTRYP PFNGLPOINTPARAMETERFPROC)(GLenum pname, GLfloat param);
-GLAPI PFNGLPOINTPARAMETERFPROC glad_glPointParameterf;
-#define glPointParameterf glad_glPointParameterf
-typedef void (APIENTRYP PFNGLPOINTPARAMETERFVPROC)(GLenum pname, const GLfloat *params);
-GLAPI PFNGLPOINTPARAMETERFVPROC glad_glPointParameterfv;
-#define glPointParameterfv glad_glPointParameterfv
-typedef void (APIENTRYP PFNGLPOINTPARAMETERIPROC)(GLenum pname, GLint param);
-GLAPI PFNGLPOINTPARAMETERIPROC glad_glPointParameteri;
-#define glPointParameteri glad_glPointParameteri
-typedef void (APIENTRYP PFNGLPOINTPARAMETERIVPROC)(GLenum pname, const GLint *params);
-GLAPI PFNGLPOINTPARAMETERIVPROC glad_glPointParameteriv;
-#define glPointParameteriv glad_glPointParameteriv
-typedef void (APIENTRYP PFNGLFOGCOORDFPROC)(GLfloat coord);
-GLAPI PFNGLFOGCOORDFPROC glad_glFogCoordf;
-#define glFogCoordf glad_glFogCoordf
-typedef void (APIENTRYP PFNGLFOGCOORDFVPROC)(const GLfloat *coord);
-GLAPI PFNGLFOGCOORDFVPROC glad_glFogCoordfv;
-#define glFogCoordfv glad_glFogCoordfv
-typedef void (APIENTRYP PFNGLFOGCOORDDPROC)(GLdouble coord);
-GLAPI PFNGLFOGCOORDDPROC glad_glFogCoordd;
-#define glFogCoordd glad_glFogCoordd
-typedef void (APIENTRYP PFNGLFOGCOORDDVPROC)(const GLdouble *coord);
-GLAPI PFNGLFOGCOORDDVPROC glad_glFogCoorddv;
-#define glFogCoorddv glad_glFogCoorddv
-typedef void (APIENTRYP PFNGLFOGCOORDPOINTERPROC)(GLenum type, GLsizei stride, const void *pointer);
-GLAPI PFNGLFOGCOORDPOINTERPROC glad_glFogCoordPointer;
-#define glFogCoordPointer glad_glFogCoordPointer
-typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BPROC)(GLbyte red, GLbyte green, GLbyte blue);
-GLAPI PFNGLSECONDARYCOLOR3BPROC glad_glSecondaryColor3b;
-#define glSecondaryColor3b glad_glSecondaryColor3b
-typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BVPROC)(const GLbyte *v);
-GLAPI PFNGLSECONDARYCOLOR3BVPROC glad_glSecondaryColor3bv;
-#define glSecondaryColor3bv glad_glSecondaryColor3bv
-typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DPROC)(GLdouble red, GLdouble green, GLdouble blue);
-GLAPI PFNGLSECONDARYCOLOR3DPROC glad_glSecondaryColor3d;
-#define glSecondaryColor3d glad_glSecondaryColor3d
-typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DVPROC)(const GLdouble *v);
-GLAPI PFNGLSECONDARYCOLOR3DVPROC glad_glSecondaryColor3dv;
-#define glSecondaryColor3dv glad_glSecondaryColor3dv
-typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FPROC)(GLfloat red, GLfloat green, GLfloat blue);
-GLAPI PFNGLSECONDARYCOLOR3FPROC glad_glSecondaryColor3f;
-#define glSecondaryColor3f glad_glSecondaryColor3f
-typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FVPROC)(const GLfloat *v);
-GLAPI PFNGLSECONDARYCOLOR3FVPROC glad_glSecondaryColor3fv;
-#define glSecondaryColor3fv glad_glSecondaryColor3fv
-typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IPROC)(GLint red, GLint green, GLint blue);
-GLAPI PFNGLSECONDARYCOLOR3IPROC glad_glSecondaryColor3i;
-#define glSecondaryColor3i glad_glSecondaryColor3i
-typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IVPROC)(const GLint *v);
-GLAPI PFNGLSECONDARYCOLOR3IVPROC glad_glSecondaryColor3iv;
-#define glSecondaryColor3iv glad_glSecondaryColor3iv
-typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SPROC)(GLshort red, GLshort green, GLshort blue);
-GLAPI PFNGLSECONDARYCOLOR3SPROC glad_glSecondaryColor3s;
-#define glSecondaryColor3s glad_glSecondaryColor3s
-typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SVPROC)(const GLshort *v);
-GLAPI PFNGLSECONDARYCOLOR3SVPROC glad_glSecondaryColor3sv;
-#define glSecondaryColor3sv glad_glSecondaryColor3sv
-typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBPROC)(GLubyte red, GLubyte green, GLubyte blue);
-GLAPI PFNGLSECONDARYCOLOR3UBPROC glad_glSecondaryColor3ub;
-#define glSecondaryColor3ub glad_glSecondaryColor3ub
-typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBVPROC)(const GLubyte *v);
-GLAPI PFNGLSECONDARYCOLOR3UBVPROC glad_glSecondaryColor3ubv;
-#define glSecondaryColor3ubv glad_glSecondaryColor3ubv
-typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIPROC)(GLuint red, GLuint green, GLuint blue);
-GLAPI PFNGLSECONDARYCOLOR3UIPROC glad_glSecondaryColor3ui;
-#define glSecondaryColor3ui glad_glSecondaryColor3ui
-typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIVPROC)(const GLuint *v);
-GLAPI PFNGLSECONDARYCOLOR3UIVPROC glad_glSecondaryColor3uiv;
-#define glSecondaryColor3uiv glad_glSecondaryColor3uiv
-typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USPROC)(GLushort red, GLushort green, GLushort blue);
-GLAPI PFNGLSECONDARYCOLOR3USPROC glad_glSecondaryColor3us;
-#define glSecondaryColor3us glad_glSecondaryColor3us
-typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USVPROC)(const GLushort *v);
-GLAPI PFNGLSECONDARYCOLOR3USVPROC glad_glSecondaryColor3usv;
-#define glSecondaryColor3usv glad_glSecondaryColor3usv
-typedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTERPROC)(GLint size, GLenum type, GLsizei stride, const void *pointer);
-GLAPI PFNGLSECONDARYCOLORPOINTERPROC glad_glSecondaryColorPointer;
-#define glSecondaryColorPointer glad_glSecondaryColorPointer
-typedef void (APIENTRYP PFNGLWINDOWPOS2DPROC)(GLdouble x, GLdouble y);
-GLAPI PFNGLWINDOWPOS2DPROC glad_glWindowPos2d;
-#define glWindowPos2d glad_glWindowPos2d
-typedef void (APIENTRYP PFNGLWINDOWPOS2DVPROC)(const GLdouble *v);
-GLAPI PFNGLWINDOWPOS2DVPROC glad_glWindowPos2dv;
-#define glWindowPos2dv glad_glWindowPos2dv
-typedef void (APIENTRYP PFNGLWINDOWPOS2FPROC)(GLfloat x, GLfloat y);
-GLAPI PFNGLWINDOWPOS2FPROC glad_glWindowPos2f;
-#define glWindowPos2f glad_glWindowPos2f
-typedef void (APIENTRYP PFNGLWINDOWPOS2FVPROC)(const GLfloat *v);
-GLAPI PFNGLWINDOWPOS2FVPROC glad_glWindowPos2fv;
-#define glWindowPos2fv glad_glWindowPos2fv
-typedef void (APIENTRYP PFNGLWINDOWPOS2IPROC)(GLint x, GLint y);
-GLAPI PFNGLWINDOWPOS2IPROC glad_glWindowPos2i;
-#define glWindowPos2i glad_glWindowPos2i
-typedef void (APIENTRYP PFNGLWINDOWPOS2IVPROC)(const GLint *v);
-GLAPI PFNGLWINDOWPOS2IVPROC glad_glWindowPos2iv;
-#define glWindowPos2iv glad_glWindowPos2iv
-typedef void (APIENTRYP PFNGLWINDOWPOS2SPROC)(GLshort x, GLshort y);
-GLAPI PFNGLWINDOWPOS2SPROC glad_glWindowPos2s;
-#define glWindowPos2s glad_glWindowPos2s
-typedef void (APIENTRYP PFNGLWINDOWPOS2SVPROC)(const GLshort *v);
-GLAPI PFNGLWINDOWPOS2SVPROC glad_glWindowPos2sv;
-#define glWindowPos2sv glad_glWindowPos2sv
-typedef void (APIENTRYP PFNGLWINDOWPOS3DPROC)(GLdouble x, GLdouble y, GLdouble z);
-GLAPI PFNGLWINDOWPOS3DPROC glad_glWindowPos3d;
-#define glWindowPos3d glad_glWindowPos3d
-typedef void (APIENTRYP PFNGLWINDOWPOS3DVPROC)(const GLdouble *v);
-GLAPI PFNGLWINDOWPOS3DVPROC glad_glWindowPos3dv;
-#define glWindowPos3dv glad_glWindowPos3dv
-typedef void (APIENTRYP PFNGLWINDOWPOS3FPROC)(GLfloat x, GLfloat y, GLfloat z);
-GLAPI PFNGLWINDOWPOS3FPROC glad_glWindowPos3f;
-#define glWindowPos3f glad_glWindowPos3f
-typedef void (APIENTRYP PFNGLWINDOWPOS3FVPROC)(const GLfloat *v);
-GLAPI PFNGLWINDOWPOS3FVPROC glad_glWindowPos3fv;
-#define glWindowPos3fv glad_glWindowPos3fv
-typedef void (APIENTRYP PFNGLWINDOWPOS3IPROC)(GLint x, GLint y, GLint z);
-GLAPI PFNGLWINDOWPOS3IPROC glad_glWindowPos3i;
-#define glWindowPos3i glad_glWindowPos3i
-typedef void (APIENTRYP PFNGLWINDOWPOS3IVPROC)(const GLint *v);
-GLAPI PFNGLWINDOWPOS3IVPROC glad_glWindowPos3iv;
-#define glWindowPos3iv glad_glWindowPos3iv
-typedef void (APIENTRYP PFNGLWINDOWPOS3SPROC)(GLshort x, GLshort y, GLshort z);
-GLAPI PFNGLWINDOWPOS3SPROC glad_glWindowPos3s;
-#define glWindowPos3s glad_glWindowPos3s
-typedef void (APIENTRYP PFNGLWINDOWPOS3SVPROC)(const GLshort *v);
-GLAPI PFNGLWINDOWPOS3SVPROC glad_glWindowPos3sv;
-#define glWindowPos3sv glad_glWindowPos3sv
-typedef void (APIENTRYP PFNGLBLENDCOLORPROC)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
-GLAPI PFNGLBLENDCOLORPROC glad_glBlendColor;
-#define glBlendColor glad_glBlendColor
-typedef void (APIENTRYP PFNGLBLENDEQUATIONPROC)(GLenum mode);
-GLAPI PFNGLBLENDEQUATIONPROC glad_glBlendEquation;
-#define glBlendEquation glad_glBlendEquation
-#endif
-#ifndef GL_VERSION_1_5
-#define GL_VERSION_1_5 1
-GLAPI int GLAD_GL_VERSION_1_5;
-typedef void (APIENTRYP PFNGLGENQUERIESPROC)(GLsizei n, GLuint *ids);
-GLAPI PFNGLGENQUERIESPROC glad_glGenQueries;
-#define glGenQueries glad_glGenQueries
-typedef void (APIENTRYP PFNGLDELETEQUERIESPROC)(GLsizei n, const GLuint *ids);
-GLAPI PFNGLDELETEQUERIESPROC glad_glDeleteQueries;
-#define glDeleteQueries glad_glDeleteQueries
-typedef GLboolean (APIENTRYP PFNGLISQUERYPROC)(GLuint id);
-GLAPI PFNGLISQUERYPROC glad_glIsQuery;
-#define glIsQuery glad_glIsQuery
-typedef void (APIENTRYP PFNGLBEGINQUERYPROC)(GLenum target, GLuint id);
-GLAPI PFNGLBEGINQUERYPROC glad_glBeginQuery;
-#define glBeginQuery glad_glBeginQuery
-typedef void (APIENTRYP PFNGLENDQUERYPROC)(GLenum target);
-GLAPI PFNGLENDQUERYPROC glad_glEndQuery;
-#define glEndQuery glad_glEndQuery
-typedef void (APIENTRYP PFNGLGETQUERYIVPROC)(GLenum target, GLenum pname, GLint *params);
-GLAPI PFNGLGETQUERYIVPROC glad_glGetQueryiv;
-#define glGetQueryiv glad_glGetQueryiv
-typedef void (APIENTRYP PFNGLGETQUERYOBJECTIVPROC)(GLuint id, GLenum pname, GLint *params);
-GLAPI PFNGLGETQUERYOBJECTIVPROC glad_glGetQueryObjectiv;
-#define glGetQueryObjectiv glad_glGetQueryObjectiv
-typedef void (APIENTRYP PFNGLGETQUERYOBJECTUIVPROC)(GLuint id, GLenum pname, GLuint *params);
-GLAPI PFNGLGETQUERYOBJECTUIVPROC glad_glGetQueryObjectuiv;
-#define glGetQueryObjectuiv glad_glGetQueryObjectuiv
-typedef void (APIENTRYP PFNGLBINDBUFFERPROC)(GLenum target, GLuint buffer);
-GLAPI PFNGLBINDBUFFERPROC glad_glBindBuffer;
-#define glBindBuffer glad_glBindBuffer
-typedef void (APIENTRYP PFNGLDELETEBUFFERSPROC)(GLsizei n, const GLuint *buffers);
-GLAPI PFNGLDELETEBUFFERSPROC glad_glDeleteBuffers;
-#define glDeleteBuffers glad_glDeleteBuffers
-typedef void (APIENTRYP PFNGLGENBUFFERSPROC)(GLsizei n, GLuint *buffers);
-GLAPI PFNGLGENBUFFERSPROC glad_glGenBuffers;
-#define glGenBuffers glad_glGenBuffers
-typedef GLboolean (APIENTRYP PFNGLISBUFFERPROC)(GLuint buffer);
-GLAPI PFNGLISBUFFERPROC glad_glIsBuffer;
-#define glIsBuffer glad_glIsBuffer
-typedef void (APIENTRYP PFNGLBUFFERDATAPROC)(GLenum target, GLsizeiptr size, const void *data, GLenum usage);
-GLAPI PFNGLBUFFERDATAPROC glad_glBufferData;
-#define glBufferData glad_glBufferData
-typedef void (APIENTRYP PFNGLBUFFERSUBDATAPROC)(GLenum target, GLintptr offset, GLsizeiptr size, const void *data);
-GLAPI PFNGLBUFFERSUBDATAPROC glad_glBufferSubData;
-#define glBufferSubData glad_glBufferSubData
-typedef void (APIENTRYP PFNGLGETBUFFERSUBDATAPROC)(GLenum target, GLintptr offset, GLsizeiptr size, void *data);
-GLAPI PFNGLGETBUFFERSUBDATAPROC glad_glGetBufferSubData;
-#define glGetBufferSubData glad_glGetBufferSubData
-typedef void * (APIENTRYP PFNGLMAPBUFFERPROC)(GLenum target, GLenum access);
-GLAPI PFNGLMAPBUFFERPROC glad_glMapBuffer;
-#define glMapBuffer glad_glMapBuffer
-typedef GLboolean (APIENTRYP PFNGLUNMAPBUFFERPROC)(GLenum target);
-GLAPI PFNGLUNMAPBUFFERPROC glad_glUnmapBuffer;
-#define glUnmapBuffer glad_glUnmapBuffer
-typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERIVPROC)(GLenum target, GLenum pname, GLint *params);
-GLAPI PFNGLGETBUFFERPARAMETERIVPROC glad_glGetBufferParameteriv;
-#define glGetBufferParameteriv glad_glGetBufferParameteriv
-typedef void (APIENTRYP PFNGLGETBUFFERPOINTERVPROC)(GLenum target, GLenum pname, void **params);
-GLAPI PFNGLGETBUFFERPOINTERVPROC glad_glGetBufferPointerv;
-#define glGetBufferPointerv glad_glGetBufferPointerv
-#endif
-#ifndef GL_VERSION_2_0
-#define GL_VERSION_2_0 1
-GLAPI int GLAD_GL_VERSION_2_0;
-typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEPROC)(GLenum modeRGB, GLenum modeAlpha);
-GLAPI PFNGLBLENDEQUATIONSEPARATEPROC glad_glBlendEquationSeparate;
-#define glBlendEquationSeparate glad_glBlendEquationSeparate
-typedef void (APIENTRYP PFNGLDRAWBUFFERSPROC)(GLsizei n, const GLenum *bufs);
-GLAPI PFNGLDRAWBUFFERSPROC glad_glDrawBuffers;
-#define glDrawBuffers glad_glDrawBuffers
-typedef void (APIENTRYP PFNGLSTENCILOPSEPARATEPROC)(GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
-GLAPI PFNGLSTENCILOPSEPARATEPROC glad_glStencilOpSeparate;
-#define glStencilOpSeparate glad_glStencilOpSeparate
-typedef void (APIENTRYP PFNGLSTENCILFUNCSEPARATEPROC)(GLenum face, GLenum func, GLint ref, GLuint mask);
-GLAPI PFNGLSTENCILFUNCSEPARATEPROC glad_glStencilFuncSeparate;
-#define glStencilFuncSeparate glad_glStencilFuncSeparate
-typedef void (APIENTRYP PFNGLSTENCILMASKSEPARATEPROC)(GLenum face, GLuint mask);
-GLAPI PFNGLSTENCILMASKSEPARATEPROC glad_glStencilMaskSeparate;
-#define glStencilMaskSeparate glad_glStencilMaskSeparate
-typedef void (APIENTRYP PFNGLATTACHSHADERPROC)(GLuint program, GLuint shader);
-GLAPI PFNGLATTACHSHADERPROC glad_glAttachShader;
-#define glAttachShader glad_glAttachShader
-typedef void (APIENTRYP PFNGLBINDATTRIBLOCATIONPROC)(GLuint program, GLuint index, const GLchar *name);
-GLAPI PFNGLBINDATTRIBLOCATIONPROC glad_glBindAttribLocation;
-#define glBindAttribLocation glad_glBindAttribLocation
-typedef void (APIENTRYP PFNGLCOMPILESHADERPROC)(GLuint shader);
-GLAPI PFNGLCOMPILESHADERPROC glad_glCompileShader;
-#define glCompileShader glad_glCompileShader
-typedef GLuint (APIENTRYP PFNGLCREATEPROGRAMPROC)(void);
-GLAPI PFNGLCREATEPROGRAMPROC glad_glCreateProgram;
-#define glCreateProgram glad_glCreateProgram
-typedef GLuint (APIENTRYP PFNGLCREATESHADERPROC)(GLenum type);
-GLAPI PFNGLCREATESHADERPROC glad_glCreateShader;
-#define glCreateShader glad_glCreateShader
-typedef void (APIENTRYP PFNGLDELETEPROGRAMPROC)(GLuint program);
-GLAPI PFNGLDELETEPROGRAMPROC glad_glDeleteProgram;
-#define glDeleteProgram glad_glDeleteProgram
-typedef void (APIENTRYP PFNGLDELETESHADERPROC)(GLuint shader);
-GLAPI PFNGLDELETESHADERPROC glad_glDeleteShader;
-#define glDeleteShader glad_glDeleteShader
-typedef void (APIENTRYP PFNGLDETACHSHADERPROC)(GLuint program, GLuint shader);
-GLAPI PFNGLDETACHSHADERPROC glad_glDetachShader;
-#define glDetachShader glad_glDetachShader
-typedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYPROC)(GLuint index);
-GLAPI PFNGLDISABLEVERTEXATTRIBARRAYPROC glad_glDisableVertexAttribArray;
-#define glDisableVertexAttribArray glad_glDisableVertexAttribArray
-typedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYPROC)(GLuint index);
-GLAPI PFNGLENABLEVERTEXATTRIBARRAYPROC glad_glEnableVertexAttribArray;
-#define glEnableVertexAttribArray glad_glEnableVertexAttribArray
-typedef void (APIENTRYP PFNGLGETACTIVEATTRIBPROC)(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
-GLAPI PFNGLGETACTIVEATTRIBPROC glad_glGetActiveAttrib;
-#define glGetActiveAttrib glad_glGetActiveAttrib
-typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMPROC)(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
-GLAPI PFNGLGETACTIVEUNIFORMPROC glad_glGetActiveUniform;
-#define glGetActiveUniform glad_glGetActiveUniform
-typedef void (APIENTRYP PFNGLGETATTACHEDSHADERSPROC)(GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders);
-GLAPI PFNGLGETATTACHEDSHADERSPROC glad_glGetAttachedShaders;
-#define glGetAttachedShaders glad_glGetAttachedShaders
-typedef GLint (APIENTRYP PFNGLGETATTRIBLOCATIONPROC)(GLuint program, const GLchar *name);
-GLAPI PFNGLGETATTRIBLOCATIONPROC glad_glGetAttribLocation;
-#define glGetAttribLocation glad_glGetAttribLocation
-typedef void (APIENTRYP PFNGLGETPROGRAMIVPROC)(GLuint program, GLenum pname, GLint *params);
-GLAPI PFNGLGETPROGRAMIVPROC glad_glGetProgramiv;
-#define glGetProgramiv glad_glGetProgramiv
-typedef void (APIENTRYP PFNGLGETPROGRAMINFOLOGPROC)(GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
-GLAPI PFNGLGETPROGRAMINFOLOGPROC glad_glGetProgramInfoLog;
-#define glGetProgramInfoLog glad_glGetProgramInfoLog
-typedef void (APIENTRYP PFNGLGETSHADERIVPROC)(GLuint shader, GLenum pname, GLint *params);
-GLAPI PFNGLGETSHADERIVPROC glad_glGetShaderiv;
-#define glGetShaderiv glad_glGetShaderiv
-typedef void (APIENTRYP PFNGLGETSHADERINFOLOGPROC)(GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
-GLAPI PFNGLGETSHADERINFOLOGPROC glad_glGetShaderInfoLog;
-#define glGetShaderInfoLog glad_glGetShaderInfoLog
-typedef void (APIENTRYP PFNGLGETSHADERSOURCEPROC)(GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source);
-GLAPI PFNGLGETSHADERSOURCEPROC glad_glGetShaderSource;
-#define glGetShaderSource glad_glGetShaderSource
-typedef GLint (APIENTRYP PFNGLGETUNIFORMLOCATIONPROC)(GLuint program, const GLchar *name);
-GLAPI PFNGLGETUNIFORMLOCATIONPROC glad_glGetUniformLocation;
-#define glGetUniformLocation glad_glGetUniformLocation
-typedef void (APIENTRYP PFNGLGETUNIFORMFVPROC)(GLuint program, GLint location, GLfloat *params);
-GLAPI PFNGLGETUNIFORMFVPROC glad_glGetUniformfv;
-#define glGetUniformfv glad_glGetUniformfv
-typedef void (APIENTRYP PFNGLGETUNIFORMIVPROC)(GLuint program, GLint location, GLint *params);
-GLAPI PFNGLGETUNIFORMIVPROC glad_glGetUniformiv;
-#define glGetUniformiv glad_glGetUniformiv
-typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVPROC)(GLuint index, GLenum pname, GLdouble *params);
-GLAPI PFNGLGETVERTEXATTRIBDVPROC glad_glGetVertexAttribdv;
-#define glGetVertexAttribdv glad_glGetVertexAttribdv
-typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVPROC)(GLuint index, GLenum pname, GLfloat *params);
-GLAPI PFNGLGETVERTEXATTRIBFVPROC glad_glGetVertexAttribfv;
-#define glGetVertexAttribfv glad_glGetVertexAttribfv
-typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVPROC)(GLuint index, GLenum pname, GLint *params);
-GLAPI PFNGLGETVERTEXATTRIBIVPROC glad_glGetVertexAttribiv;
-#define glGetVertexAttribiv glad_glGetVertexAttribiv
-typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVPROC)(GLuint index, GLenum pname, void **pointer);
-GLAPI PFNGLGETVERTEXATTRIBPOINTERVPROC glad_glGetVertexAttribPointerv;
-#define glGetVertexAttribPointerv glad_glGetVertexAttribPointerv
-typedef GLboolean (APIENTRYP PFNGLISPROGRAMPROC)(GLuint program);
-GLAPI PFNGLISPROGRAMPROC glad_glIsProgram;
-#define glIsProgram glad_glIsProgram
-typedef GLboolean (APIENTRYP PFNGLISSHADERPROC)(GLuint shader);
-GLAPI PFNGLISSHADERPROC glad_glIsShader;
-#define glIsShader glad_glIsShader
-typedef void (APIENTRYP PFNGLLINKPROGRAMPROC)(GLuint program);
-GLAPI PFNGLLINKPROGRAMPROC glad_glLinkProgram;
-#define glLinkProgram glad_glLinkProgram
-typedef void (APIENTRYP PFNGLSHADERSOURCEPROC)(GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length);
-GLAPI PFNGLSHADERSOURCEPROC glad_glShaderSource;
-#define glShaderSource glad_glShaderSource
-typedef void (APIENTRYP PFNGLUSEPROGRAMPROC)(GLuint program);
-GLAPI PFNGLUSEPROGRAMPROC glad_glUseProgram;
-#define glUseProgram glad_glUseProgram
-typedef void (APIENTRYP PFNGLUNIFORM1FPROC)(GLint location, GLfloat v0);
-GLAPI PFNGLUNIFORM1FPROC glad_glUniform1f;
-#define glUniform1f glad_glUniform1f
-typedef void (APIENTRYP PFNGLUNIFORM2FPROC)(GLint location, GLfloat v0, GLfloat v1);
-GLAPI PFNGLUNIFORM2FPROC glad_glUniform2f;
-#define glUniform2f glad_glUniform2f
-typedef void (APIENTRYP PFNGLUNIFORM3FPROC)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
-GLAPI PFNGLUNIFORM3FPROC glad_glUniform3f;
-#define glUniform3f glad_glUniform3f
-typedef void (APIENTRYP PFNGLUNIFORM4FPROC)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
-GLAPI PFNGLUNIFORM4FPROC glad_glUniform4f;
-#define glUniform4f glad_glUniform4f
-typedef void (APIENTRYP PFNGLUNIFORM1IPROC)(GLint location, GLint v0);
-GLAPI PFNGLUNIFORM1IPROC glad_glUniform1i;
-#define glUniform1i glad_glUniform1i
-typedef void (APIENTRYP PFNGLUNIFORM2IPROC)(GLint location, GLint v0, GLint v1);
-GLAPI PFNGLUNIFORM2IPROC glad_glUniform2i;
-#define glUniform2i glad_glUniform2i
-typedef void (APIENTRYP PFNGLUNIFORM3IPROC)(GLint location, GLint v0, GLint v1, GLint v2);
-GLAPI PFNGLUNIFORM3IPROC glad_glUniform3i;
-#define glUniform3i glad_glUniform3i
-typedef void (APIENTRYP PFNGLUNIFORM4IPROC)(GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
-GLAPI PFNGLUNIFORM4IPROC glad_glUniform4i;
-#define glUniform4i glad_glUniform4i
-typedef void (APIENTRYP PFNGLUNIFORM1FVPROC)(GLint location, GLsizei count, const GLfloat *value);
-GLAPI PFNGLUNIFORM1FVPROC glad_glUniform1fv;
-#define glUniform1fv glad_glUniform1fv
-typedef void (APIENTRYP PFNGLUNIFORM2FVPROC)(GLint location, GLsizei count, const GLfloat *value);
-GLAPI PFNGLUNIFORM2FVPROC glad_glUniform2fv;
-#define glUniform2fv glad_glUniform2fv
-typedef void (APIENTRYP PFNGLUNIFORM3FVPROC)(GLint location, GLsizei count, const GLfloat *value);
-GLAPI PFNGLUNIFORM3FVPROC glad_glUniform3fv;
-#define glUniform3fv glad_glUniform3fv
-typedef void (APIENTRYP PFNGLUNIFORM4FVPROC)(GLint location, GLsizei count, const GLfloat *value);
-GLAPI PFNGLUNIFORM4FVPROC glad_glUniform4fv;
-#define glUniform4fv glad_glUniform4fv
-typedef void (APIENTRYP PFNGLUNIFORM1IVPROC)(GLint location, GLsizei count, const GLint *value);
-GLAPI PFNGLUNIFORM1IVPROC glad_glUniform1iv;
-#define glUniform1iv glad_glUniform1iv
-typedef void (APIENTRYP PFNGLUNIFORM2IVPROC)(GLint location, GLsizei count, const GLint *value);
-GLAPI PFNGLUNIFORM2IVPROC glad_glUniform2iv;
-#define glUniform2iv glad_glUniform2iv
-typedef void (APIENTRYP PFNGLUNIFORM3IVPROC)(GLint location, GLsizei count, const GLint *value);
-GLAPI PFNGLUNIFORM3IVPROC glad_glUniform3iv;
-#define glUniform3iv glad_glUniform3iv
-typedef void (APIENTRYP PFNGLUNIFORM4IVPROC)(GLint location, GLsizei count, const GLint *value);
-GLAPI PFNGLUNIFORM4IVPROC glad_glUniform4iv;
-#define glUniform4iv glad_glUniform4iv
-typedef void (APIENTRYP PFNGLUNIFORMMATRIX2FVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GLAPI PFNGLUNIFORMMATRIX2FVPROC glad_glUniformMatrix2fv;
-#define glUniformMatrix2fv glad_glUniformMatrix2fv
-typedef void (APIENTRYP PFNGLUNIFORMMATRIX3FVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GLAPI PFNGLUNIFORMMATRIX3FVPROC glad_glUniformMatrix3fv;
-#define glUniformMatrix3fv glad_glUniformMatrix3fv
-typedef void (APIENTRYP PFNGLUNIFORMMATRIX4FVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GLAPI PFNGLUNIFORMMATRIX4FVPROC glad_glUniformMatrix4fv;
-#define glUniformMatrix4fv glad_glUniformMatrix4fv
-typedef void (APIENTRYP PFNGLVALIDATEPROGRAMPROC)(GLuint program);
-GLAPI PFNGLVALIDATEPROGRAMPROC glad_glValidateProgram;
-#define glValidateProgram glad_glValidateProgram
-typedef void (APIENTRYP PFNGLVERTEXATTRIB1DPROC)(GLuint index, GLdouble x);
-GLAPI PFNGLVERTEXATTRIB1DPROC glad_glVertexAttrib1d;
-#define glVertexAttrib1d glad_glVertexAttrib1d
-typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVPROC)(GLuint index, const GLdouble *v);
-GLAPI PFNGLVERTEXATTRIB1DVPROC glad_glVertexAttrib1dv;
-#define glVertexAttrib1dv glad_glVertexAttrib1dv
-typedef void (APIENTRYP PFNGLVERTEXATTRIB1FPROC)(GLuint index, GLfloat x);
-GLAPI PFNGLVERTEXATTRIB1FPROC glad_glVertexAttrib1f;
-#define glVertexAttrib1f glad_glVertexAttrib1f
-typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVPROC)(GLuint index, const GLfloat *v);
-GLAPI PFNGLVERTEXATTRIB1FVPROC glad_glVertexAttrib1fv;
-#define glVertexAttrib1fv glad_glVertexAttrib1fv
-typedef void (APIENTRYP PFNGLVERTEXATTRIB1SPROC)(GLuint index, GLshort x);
-GLAPI PFNGLVERTEXATTRIB1SPROC glad_glVertexAttrib1s;
-#define glVertexAttrib1s glad_glVertexAttrib1s
-typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVPROC)(GLuint index, const GLshort *v);
-GLAPI PFNGLVERTEXATTRIB1SVPROC glad_glVertexAttrib1sv;
-#define glVertexAttrib1sv glad_glVertexAttrib1sv
-typedef void (APIENTRYP PFNGLVERTEXATTRIB2DPROC)(GLuint index, GLdouble x, GLdouble y);
-GLAPI PFNGLVERTEXATTRIB2DPROC glad_glVertexAttrib2d;
-#define glVertexAttrib2d glad_glVertexAttrib2d
-typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVPROC)(GLuint index, const GLdouble *v);
-GLAPI PFNGLVERTEXATTRIB2DVPROC glad_glVertexAttrib2dv;
-#define glVertexAttrib2dv glad_glVertexAttrib2dv
-typedef void (APIENTRYP PFNGLVERTEXATTRIB2FPROC)(GLuint index, GLfloat x, GLfloat y);
-GLAPI PFNGLVERTEXATTRIB2FPROC glad_glVertexAttrib2f;
-#define glVertexAttrib2f glad_glVertexAttrib2f
-typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVPROC)(GLuint index, const GLfloat *v);
-GLAPI PFNGLVERTEXATTRIB2FVPROC glad_glVertexAttrib2fv;
-#define glVertexAttrib2fv glad_glVertexAttrib2fv
-typedef void (APIENTRYP PFNGLVERTEXATTRIB2SPROC)(GLuint index, GLshort x, GLshort y);
-GLAPI PFNGLVERTEXATTRIB2SPROC glad_glVertexAttrib2s;
-#define glVertexAttrib2s glad_glVertexAttrib2s
-typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVPROC)(GLuint index, const GLshort *v);
-GLAPI PFNGLVERTEXATTRIB2SVPROC glad_glVertexAttrib2sv;
-#define glVertexAttrib2sv glad_glVertexAttrib2sv
-typedef void (APIENTRYP PFNGLVERTEXATTRIB3DPROC)(GLuint index, GLdouble x, GLdouble y, GLdouble z);
-GLAPI PFNGLVERTEXATTRIB3DPROC glad_glVertexAttrib3d;
-#define glVertexAttrib3d glad_glVertexAttrib3d
-typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVPROC)(GLuint index, const GLdouble *v);
-GLAPI PFNGLVERTEXATTRIB3DVPROC glad_glVertexAttrib3dv;
-#define glVertexAttrib3dv glad_glVertexAttrib3dv
-typedef void (APIENTRYP PFNGLVERTEXATTRIB3FPROC)(GLuint index, GLfloat x, GLfloat y, GLfloat z);
-GLAPI PFNGLVERTEXATTRIB3FPROC glad_glVertexAttrib3f;
-#define glVertexAttrib3f glad_glVertexAttrib3f
-typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVPROC)(GLuint index, const GLfloat *v);
-GLAPI PFNGLVERTEXATTRIB3FVPROC glad_glVertexAttrib3fv;
-#define glVertexAttrib3fv glad_glVertexAttrib3fv
-typedef void (APIENTRYP PFNGLVERTEXATTRIB3SPROC)(GLuint index, GLshort x, GLshort y, GLshort z);
-GLAPI PFNGLVERTEXATTRIB3SPROC glad_glVertexAttrib3s;
-#define glVertexAttrib3s glad_glVertexAttrib3s
-typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVPROC)(GLuint index, const GLshort *v);
-GLAPI PFNGLVERTEXATTRIB3SVPROC glad_glVertexAttrib3sv;
-#define glVertexAttrib3sv glad_glVertexAttrib3sv
-typedef void (APIENTRYP PFNGLVERTEXATTRIB4NBVPROC)(GLuint index, const GLbyte *v);
-GLAPI PFNGLVERTEXATTRIB4NBVPROC glad_glVertexAttrib4Nbv;
-#define glVertexAttrib4Nbv glad_glVertexAttrib4Nbv
-typedef void (APIENTRYP PFNGLVERTEXATTRIB4NIVPROC)(GLuint index, const GLint *v);
-GLAPI PFNGLVERTEXATTRIB4NIVPROC glad_glVertexAttrib4Niv;
-#define glVertexAttrib4Niv glad_glVertexAttrib4Niv
-typedef void (APIENTRYP PFNGLVERTEXATTRIB4NSVPROC)(GLuint index, const GLshort *v);
-GLAPI PFNGLVERTEXATTRIB4NSVPROC glad_glVertexAttrib4Nsv;
-#define glVertexAttrib4Nsv glad_glVertexAttrib4Nsv
-typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBPROC)(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
-GLAPI PFNGLVERTEXATTRIB4NUBPROC glad_glVertexAttrib4Nub;
-#define glVertexAttrib4Nub glad_glVertexAttrib4Nub
-typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBVPROC)(GLuint index, const GLubyte *v);
-GLAPI PFNGLVERTEXATTRIB4NUBVPROC glad_glVertexAttrib4Nubv;
-#define glVertexAttrib4Nubv glad_glVertexAttrib4Nubv
-typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUIVPROC)(GLuint index, const GLuint *v);
-GLAPI PFNGLVERTEXATTRIB4NUIVPROC glad_glVertexAttrib4Nuiv;
-#define glVertexAttrib4Nuiv glad_glVertexAttrib4Nuiv
-typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUSVPROC)(GLuint index, const GLushort *v);
-GLAPI PFNGLVERTEXATTRIB4NUSVPROC glad_glVertexAttrib4Nusv;
-#define glVertexAttrib4Nusv glad_glVertexAttrib4Nusv
-typedef void (APIENTRYP PFNGLVERTEXATTRIB4BVPROC)(GLuint index, const GLbyte *v);
-GLAPI PFNGLVERTEXATTRIB4BVPROC glad_glVertexAttrib4bv;
-#define glVertexAttrib4bv glad_glVertexAttrib4bv
-typedef void (APIENTRYP PFNGLVERTEXATTRIB4DPROC)(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
-GLAPI PFNGLVERTEXATTRIB4DPROC glad_glVertexAttrib4d;
-#define glVertexAttrib4d glad_glVertexAttrib4d
-typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVPROC)(GLuint index, const GLdouble *v);
-GLAPI PFNGLVERTEXATTRIB4DVPROC glad_glVertexAttrib4dv;
-#define glVertexAttrib4dv glad_glVertexAttrib4dv
-typedef void (APIENTRYP PFNGLVERTEXATTRIB4FPROC)(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-GLAPI PFNGLVERTEXATTRIB4FPROC glad_glVertexAttrib4f;
-#define glVertexAttrib4f glad_glVertexAttrib4f
-typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVPROC)(GLuint index, const GLfloat *v);
-GLAPI PFNGLVERTEXATTRIB4FVPROC glad_glVertexAttrib4fv;
-#define glVertexAttrib4fv glad_glVertexAttrib4fv
-typedef void (APIENTRYP PFNGLVERTEXATTRIB4IVPROC)(GLuint index, const GLint *v);
-GLAPI PFNGLVERTEXATTRIB4IVPROC glad_glVertexAttrib4iv;
-#define glVertexAttrib4iv glad_glVertexAttrib4iv
-typedef void (APIENTRYP PFNGLVERTEXATTRIB4SPROC)(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
-GLAPI PFNGLVERTEXATTRIB4SPROC glad_glVertexAttrib4s;
-#define glVertexAttrib4s glad_glVertexAttrib4s
-typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVPROC)(GLuint index, const GLshort *v);
-GLAPI PFNGLVERTEXATTRIB4SVPROC glad_glVertexAttrib4sv;
-#define glVertexAttrib4sv glad_glVertexAttrib4sv
-typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVPROC)(GLuint index, const GLubyte *v);
-GLAPI PFNGLVERTEXATTRIB4UBVPROC glad_glVertexAttrib4ubv;
-#define glVertexAttrib4ubv glad_glVertexAttrib4ubv
-typedef void (APIENTRYP PFNGLVERTEXATTRIB4UIVPROC)(GLuint index, const GLuint *v);
-GLAPI PFNGLVERTEXATTRIB4UIVPROC glad_glVertexAttrib4uiv;
-#define glVertexAttrib4uiv glad_glVertexAttrib4uiv
-typedef void (APIENTRYP PFNGLVERTEXATTRIB4USVPROC)(GLuint index, const GLushort *v);
-GLAPI PFNGLVERTEXATTRIB4USVPROC glad_glVertexAttrib4usv;
-#define glVertexAttrib4usv glad_glVertexAttrib4usv
-typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERPROC)(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer);
-GLAPI PFNGLVERTEXATTRIBPOINTERPROC glad_glVertexAttribPointer;
-#define glVertexAttribPointer glad_glVertexAttribPointer
-#endif
-#ifndef GL_VERSION_2_1
-#define GL_VERSION_2_1 1
-GLAPI int GLAD_GL_VERSION_2_1;
-typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X3FVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GLAPI PFNGLUNIFORMMATRIX2X3FVPROC glad_glUniformMatrix2x3fv;
-#define glUniformMatrix2x3fv glad_glUniformMatrix2x3fv
-typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X2FVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GLAPI PFNGLUNIFORMMATRIX3X2FVPROC glad_glUniformMatrix3x2fv;
-#define glUniformMatrix3x2fv glad_glUniformMatrix3x2fv
-typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X4FVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GLAPI PFNGLUNIFORMMATRIX2X4FVPROC glad_glUniformMatrix2x4fv;
-#define glUniformMatrix2x4fv glad_glUniformMatrix2x4fv
-typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X2FVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GLAPI PFNGLUNIFORMMATRIX4X2FVPROC glad_glUniformMatrix4x2fv;
-#define glUniformMatrix4x2fv glad_glUniformMatrix4x2fv
-typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X4FVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GLAPI PFNGLUNIFORMMATRIX3X4FVPROC glad_glUniformMatrix3x4fv;
-#define glUniformMatrix3x4fv glad_glUniformMatrix3x4fv
-typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X3FVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GLAPI PFNGLUNIFORMMATRIX4X3FVPROC glad_glUniformMatrix4x3fv;
-#define glUniformMatrix4x3fv glad_glUniformMatrix4x3fv
-#endif
-#ifndef GL_VERSION_3_0
-#define GL_VERSION_3_0 1
-GLAPI int GLAD_GL_VERSION_3_0;
-typedef void (APIENTRYP PFNGLCOLORMASKIPROC)(GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a);
-GLAPI PFNGLCOLORMASKIPROC glad_glColorMaski;
-#define glColorMaski glad_glColorMaski
-typedef void (APIENTRYP PFNGLGETBOOLEANI_VPROC)(GLenum target, GLuint index, GLboolean *data);
-GLAPI PFNGLGETBOOLEANI_VPROC glad_glGetBooleani_v;
-#define glGetBooleani_v glad_glGetBooleani_v
-typedef void (APIENTRYP PFNGLGETINTEGERI_VPROC)(GLenum target, GLuint index, GLint *data);
-GLAPI PFNGLGETINTEGERI_VPROC glad_glGetIntegeri_v;
-#define glGetIntegeri_v glad_glGetIntegeri_v
-typedef void (APIENTRYP PFNGLENABLEIPROC)(GLenum target, GLuint index);
-GLAPI PFNGLENABLEIPROC glad_glEnablei;
-#define glEnablei glad_glEnablei
-typedef void (APIENTRYP PFNGLDISABLEIPROC)(GLenum target, GLuint index);
-GLAPI PFNGLDISABLEIPROC glad_glDisablei;
-#define glDisablei glad_glDisablei
-typedef GLboolean (APIENTRYP PFNGLISENABLEDIPROC)(GLenum target, GLuint index);
-GLAPI PFNGLISENABLEDIPROC glad_glIsEnabledi;
-#define glIsEnabledi glad_glIsEnabledi
-typedef void (APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKPROC)(GLenum primitiveMode);
-GLAPI PFNGLBEGINTRANSFORMFEEDBACKPROC glad_glBeginTransformFeedback;
-#define glBeginTransformFeedback glad_glBeginTransformFeedback
-typedef void (APIENTRYP PFNGLENDTRANSFORMFEEDBACKPROC)(void);
-GLAPI PFNGLENDTRANSFORMFEEDBACKPROC glad_glEndTransformFeedback;
-#define glEndTransformFeedback glad_glEndTransformFeedback
-typedef void (APIENTRYP PFNGLBINDBUFFERRANGEPROC)(GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
-GLAPI PFNGLBINDBUFFERRANGEPROC glad_glBindBufferRange;
-#define glBindBufferRange glad_glBindBufferRange
-typedef void (APIENTRYP PFNGLBINDBUFFERBASEPROC)(GLenum target, GLuint index, GLuint buffer);
-GLAPI PFNGLBINDBUFFERBASEPROC glad_glBindBufferBase;
-#define glBindBufferBase glad_glBindBufferBase
-typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSPROC)(GLuint program, GLsizei count, const GLchar *const*varyings, GLenum bufferMode);
-GLAPI PFNGLTRANSFORMFEEDBACKVARYINGSPROC glad_glTransformFeedbackVaryings;
-#define glTransformFeedbackVaryings glad_glTransformFeedbackVaryings
-typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGPROC)(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);
-GLAPI PFNGLGETTRANSFORMFEEDBACKVARYINGPROC glad_glGetTransformFeedbackVarying;
-#define glGetTransformFeedbackVarying glad_glGetTransformFeedbackVarying
-typedef void (APIENTRYP PFNGLCLAMPCOLORPROC)(GLenum target, GLenum clamp);
-GLAPI PFNGLCLAMPCOLORPROC glad_glClampColor;
-#define glClampColor glad_glClampColor
-typedef void (APIENTRYP PFNGLBEGINCONDITIONALRENDERPROC)(GLuint id, GLenum mode);
-GLAPI PFNGLBEGINCONDITIONALRENDERPROC glad_glBeginConditionalRender;
-#define glBeginConditionalRender glad_glBeginConditionalRender
-typedef void (APIENTRYP PFNGLENDCONDITIONALRENDERPROC)(void);
-GLAPI PFNGLENDCONDITIONALRENDERPROC glad_glEndConditionalRender;
-#define glEndConditionalRender glad_glEndConditionalRender
-typedef void (APIENTRYP PFNGLVERTEXATTRIBIPOINTERPROC)(GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer);
-GLAPI PFNGLVERTEXATTRIBIPOINTERPROC glad_glVertexAttribIPointer;
-#define glVertexAttribIPointer glad_glVertexAttribIPointer
-typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIIVPROC)(GLuint index, GLenum pname, GLint *params);
-GLAPI PFNGLGETVERTEXATTRIBIIVPROC glad_glGetVertexAttribIiv;
-#define glGetVertexAttribIiv glad_glGetVertexAttribIiv
-typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIUIVPROC)(GLuint index, GLenum pname, GLuint *params);
-GLAPI PFNGLGETVERTEXATTRIBIUIVPROC glad_glGetVertexAttribIuiv;
-#define glGetVertexAttribIuiv glad_glGetVertexAttribIuiv
-typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IPROC)(GLuint index, GLint x);
-GLAPI PFNGLVERTEXATTRIBI1IPROC glad_glVertexAttribI1i;
-#define glVertexAttribI1i glad_glVertexAttribI1i
-typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IPROC)(GLuint index, GLint x, GLint y);
-GLAPI PFNGLVERTEXATTRIBI2IPROC glad_glVertexAttribI2i;
-#define glVertexAttribI2i glad_glVertexAttribI2i
-typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IPROC)(GLuint index, GLint x, GLint y, GLint z);
-GLAPI PFNGLVERTEXATTRIBI3IPROC glad_glVertexAttribI3i;
-#define glVertexAttribI3i glad_glVertexAttribI3i
-typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IPROC)(GLuint index, GLint x, GLint y, GLint z, GLint w);
-GLAPI PFNGLVERTEXATTRIBI4IPROC glad_glVertexAttribI4i;
-#define glVertexAttribI4i glad_glVertexAttribI4i
-typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIPROC)(GLuint index, GLuint x);
-GLAPI PFNGLVERTEXATTRIBI1UIPROC glad_glVertexAttribI1ui;
-#define glVertexAttribI1ui glad_glVertexAttribI1ui
-typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIPROC)(GLuint index, GLuint x, GLuint y);
-GLAPI PFNGLVERTEXATTRIBI2UIPROC glad_glVertexAttribI2ui;
-#define glVertexAttribI2ui glad_glVertexAttribI2ui
-typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIPROC)(GLuint index, GLuint x, GLuint y, GLuint z);
-GLAPI PFNGLVERTEXATTRIBI3UIPROC glad_glVertexAttribI3ui;
-#define glVertexAttribI3ui glad_glVertexAttribI3ui
-typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIPROC)(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
-GLAPI PFNGLVERTEXATTRIBI4UIPROC glad_glVertexAttribI4ui;
-#define glVertexAttribI4ui glad_glVertexAttribI4ui
-typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IVPROC)(GLuint index, const GLint *v);
-GLAPI PFNGLVERTEXATTRIBI1IVPROC glad_glVertexAttribI1iv;
-#define glVertexAttribI1iv glad_glVertexAttribI1iv
-typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IVPROC)(GLuint index, const GLint *v);
-GLAPI PFNGLVERTEXATTRIBI2IVPROC glad_glVertexAttribI2iv;
-#define glVertexAttribI2iv glad_glVertexAttribI2iv
-typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IVPROC)(GLuint index, const GLint *v);
-GLAPI PFNGLVERTEXATTRIBI3IVPROC glad_glVertexAttribI3iv;
-#define glVertexAttribI3iv glad_glVertexAttribI3iv
-typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IVPROC)(GLuint index, const GLint *v);
-GLAPI PFNGLVERTEXATTRIBI4IVPROC glad_glVertexAttribI4iv;
-#define glVertexAttribI4iv glad_glVertexAttribI4iv
-typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIVPROC)(GLuint index, const GLuint *v);
-GLAPI PFNGLVERTEXATTRIBI1UIVPROC glad_glVertexAttribI1uiv;
-#define glVertexAttribI1uiv glad_glVertexAttribI1uiv
-typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIVPROC)(GLuint index, const GLuint *v);
-GLAPI PFNGLVERTEXATTRIBI2UIVPROC glad_glVertexAttribI2uiv;
-#define glVertexAttribI2uiv glad_glVertexAttribI2uiv
-typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIVPROC)(GLuint index, const GLuint *v);
-GLAPI PFNGLVERTEXATTRIBI3UIVPROC glad_glVertexAttribI3uiv;
-#define glVertexAttribI3uiv glad_glVertexAttribI3uiv
-typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIVPROC)(GLuint index, const GLuint *v);
-GLAPI PFNGLVERTEXATTRIBI4UIVPROC glad_glVertexAttribI4uiv;
-#define glVertexAttribI4uiv glad_glVertexAttribI4uiv
-typedef void (APIENTRYP PFNGLVERTEXATTRIBI4BVPROC)(GLuint index, const GLbyte *v);
-GLAPI PFNGLVERTEXATTRIBI4BVPROC glad_glVertexAttribI4bv;
-#define glVertexAttribI4bv glad_glVertexAttribI4bv
-typedef void (APIENTRYP PFNGLVERTEXATTRIBI4SVPROC)(GLuint index, const GLshort *v);
-GLAPI PFNGLVERTEXATTRIBI4SVPROC glad_glVertexAttribI4sv;
-#define glVertexAttribI4sv glad_glVertexAttribI4sv
-typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UBVPROC)(GLuint index, const GLubyte *v);
-GLAPI PFNGLVERTEXATTRIBI4UBVPROC glad_glVertexAttribI4ubv;
-#define glVertexAttribI4ubv glad_glVertexAttribI4ubv
-typedef void (APIENTRYP PFNGLVERTEXATTRIBI4USVPROC)(GLuint index, const GLushort *v);
-GLAPI PFNGLVERTEXATTRIBI4USVPROC glad_glVertexAttribI4usv;
-#define glVertexAttribI4usv glad_glVertexAttribI4usv
-typedef void (APIENTRYP PFNGLGETUNIFORMUIVPROC)(GLuint program, GLint location, GLuint *params);
-GLAPI PFNGLGETUNIFORMUIVPROC glad_glGetUniformuiv;
-#define glGetUniformuiv glad_glGetUniformuiv
-typedef void (APIENTRYP PFNGLBINDFRAGDATALOCATIONPROC)(GLuint program, GLuint color, const GLchar *name);
-GLAPI PFNGLBINDFRAGDATALOCATIONPROC glad_glBindFragDataLocation;
-#define glBindFragDataLocation glad_glBindFragDataLocation
-typedef GLint (APIENTRYP PFNGLGETFRAGDATALOCATIONPROC)(GLuint program, const GLchar *name);
-GLAPI PFNGLGETFRAGDATALOCATIONPROC glad_glGetFragDataLocation;
-#define glGetFragDataLocation glad_glGetFragDataLocation
-typedef void (APIENTRYP PFNGLUNIFORM1UIPROC)(GLint location, GLuint v0);
-GLAPI PFNGLUNIFORM1UIPROC glad_glUniform1ui;
-#define glUniform1ui glad_glUniform1ui
-typedef void (APIENTRYP PFNGLUNIFORM2UIPROC)(GLint location, GLuint v0, GLuint v1);
-GLAPI PFNGLUNIFORM2UIPROC glad_glUniform2ui;
-#define glUniform2ui glad_glUniform2ui
-typedef void (APIENTRYP PFNGLUNIFORM3UIPROC)(GLint location, GLuint v0, GLuint v1, GLuint v2);
-GLAPI PFNGLUNIFORM3UIPROC glad_glUniform3ui;
-#define glUniform3ui glad_glUniform3ui
-typedef void (APIENTRYP PFNGLUNIFORM4UIPROC)(GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
-GLAPI PFNGLUNIFORM4UIPROC glad_glUniform4ui;
-#define glUniform4ui glad_glUniform4ui
-typedef void (APIENTRYP PFNGLUNIFORM1UIVPROC)(GLint location, GLsizei count, const GLuint *value);
-GLAPI PFNGLUNIFORM1UIVPROC glad_glUniform1uiv;
-#define glUniform1uiv glad_glUniform1uiv
-typedef void (APIENTRYP PFNGLUNIFORM2UIVPROC)(GLint location, GLsizei count, const GLuint *value);
-GLAPI PFNGLUNIFORM2UIVPROC glad_glUniform2uiv;
-#define glUniform2uiv glad_glUniform2uiv
-typedef void (APIENTRYP PFNGLUNIFORM3UIVPROC)(GLint location, GLsizei count, const GLuint *value);
-GLAPI PFNGLUNIFORM3UIVPROC glad_glUniform3uiv;
-#define glUniform3uiv glad_glUniform3uiv
-typedef void (APIENTRYP PFNGLUNIFORM4UIVPROC)(GLint location, GLsizei count, const GLuint *value);
-GLAPI PFNGLUNIFORM4UIVPROC glad_glUniform4uiv;
-#define glUniform4uiv glad_glUniform4uiv
-typedef void (APIENTRYP PFNGLTEXPARAMETERIIVPROC)(GLenum target, GLenum pname, const GLint *params);
-GLAPI PFNGLTEXPARAMETERIIVPROC glad_glTexParameterIiv;
-#define glTexParameterIiv glad_glTexParameterIiv
-typedef void (APIENTRYP PFNGLTEXPARAMETERIUIVPROC)(GLenum target, GLenum pname, const GLuint *params);
-GLAPI PFNGLTEXPARAMETERIUIVPROC glad_glTexParameterIuiv;
-#define glTexParameterIuiv glad_glTexParameterIuiv
-typedef void (APIENTRYP PFNGLGETTEXPARAMETERIIVPROC)(GLenum target, GLenum pname, GLint *params);
-GLAPI PFNGLGETTEXPARAMETERIIVPROC glad_glGetTexParameterIiv;
-#define glGetTexParameterIiv glad_glGetTexParameterIiv
-typedef void (APIENTRYP PFNGLGETTEXPARAMETERIUIVPROC)(GLenum target, GLenum pname, GLuint *params);
-GLAPI PFNGLGETTEXPARAMETERIUIVPROC glad_glGetTexParameterIuiv;
-#define glGetTexParameterIuiv glad_glGetTexParameterIuiv
-typedef void (APIENTRYP PFNGLCLEARBUFFERIVPROC)(GLenum buffer, GLint drawbuffer, const GLint *value);
-GLAPI PFNGLCLEARBUFFERIVPROC glad_glClearBufferiv;
-#define glClearBufferiv glad_glClearBufferiv
-typedef void (APIENTRYP PFNGLCLEARBUFFERUIVPROC)(GLenum buffer, GLint drawbuffer, const GLuint *value);
-GLAPI PFNGLCLEARBUFFERUIVPROC glad_glClearBufferuiv;
-#define glClearBufferuiv glad_glClearBufferuiv
-typedef void (APIENTRYP PFNGLCLEARBUFFERFVPROC)(GLenum buffer, GLint drawbuffer, const GLfloat *value);
-GLAPI PFNGLCLEARBUFFERFVPROC glad_glClearBufferfv;
-#define glClearBufferfv glad_glClearBufferfv
-typedef void (APIENTRYP PFNGLCLEARBUFFERFIPROC)(GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil);
-GLAPI PFNGLCLEARBUFFERFIPROC glad_glClearBufferfi;
-#define glClearBufferfi glad_glClearBufferfi
-typedef const GLubyte * (APIENTRYP PFNGLGETSTRINGIPROC)(GLenum name, GLuint index);
-GLAPI PFNGLGETSTRINGIPROC glad_glGetStringi;
-#define glGetStringi glad_glGetStringi
-typedef GLboolean (APIENTRYP PFNGLISRENDERBUFFERPROC)(GLuint renderbuffer);
-GLAPI PFNGLISRENDERBUFFERPROC glad_glIsRenderbuffer;
-#define glIsRenderbuffer glad_glIsRenderbuffer
-typedef void (APIENTRYP PFNGLBINDRENDERBUFFERPROC)(GLenum target, GLuint renderbuffer);
-GLAPI PFNGLBINDRENDERBUFFERPROC glad_glBindRenderbuffer;
-#define glBindRenderbuffer glad_glBindRenderbuffer
-typedef void (APIENTRYP PFNGLDELETERENDERBUFFERSPROC)(GLsizei n, const GLuint *renderbuffers);
-GLAPI PFNGLDELETERENDERBUFFERSPROC glad_glDeleteRenderbuffers;
-#define glDeleteRenderbuffers glad_glDeleteRenderbuffers
-typedef void (APIENTRYP PFNGLGENRENDERBUFFERSPROC)(GLsizei n, GLuint *renderbuffers);
-GLAPI PFNGLGENRENDERBUFFERSPROC glad_glGenRenderbuffers;
-#define glGenRenderbuffers glad_glGenRenderbuffers
-typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEPROC)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
-GLAPI PFNGLRENDERBUFFERSTORAGEPROC glad_glRenderbufferStorage;
-#define glRenderbufferStorage glad_glRenderbufferStorage
-typedef void (APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVPROC)(GLenum target, GLenum pname, GLint *params);
-GLAPI PFNGLGETRENDERBUFFERPARAMETERIVPROC glad_glGetRenderbufferParameteriv;
-#define glGetRenderbufferParameteriv glad_glGetRenderbufferParameteriv
-typedef GLboolean (APIENTRYP PFNGLISFRAMEBUFFERPROC)(GLuint framebuffer);
-GLAPI PFNGLISFRAMEBUFFERPROC glad_glIsFramebuffer;
-#define glIsFramebuffer glad_glIsFramebuffer
-typedef void (APIENTRYP PFNGLBINDFRAMEBUFFERPROC)(GLenum target, GLuint framebuffer);
-GLAPI PFNGLBINDFRAMEBUFFERPROC glad_glBindFramebuffer;
-#define glBindFramebuffer glad_glBindFramebuffer
-typedef void (APIENTRYP PFNGLDELETEFRAMEBUFFERSPROC)(GLsizei n, const GLuint *framebuffers);
-GLAPI PFNGLDELETEFRAMEBUFFERSPROC glad_glDeleteFramebuffers;
-#define glDeleteFramebuffers glad_glDeleteFramebuffers
-typedef void (APIENTRYP PFNGLGENFRAMEBUFFERSPROC)(GLsizei n, GLuint *framebuffers);
-GLAPI PFNGLGENFRAMEBUFFERSPROC glad_glGenFramebuffers;
-#define glGenFramebuffers glad_glGenFramebuffers
-typedef GLenum (APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSPROC)(GLenum target);
-GLAPI PFNGLCHECKFRAMEBUFFERSTATUSPROC glad_glCheckFramebufferStatus;
-#define glCheckFramebufferStatus glad_glCheckFramebufferStatus
-typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE1DPROC)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
-GLAPI PFNGLFRAMEBUFFERTEXTURE1DPROC glad_glFramebufferTexture1D;
-#define glFramebufferTexture1D glad_glFramebufferTexture1D
-typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DPROC)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
-GLAPI PFNGLFRAMEBUFFERTEXTURE2DPROC glad_glFramebufferTexture2D;
-#define glFramebufferTexture2D glad_glFramebufferTexture2D
-typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DPROC)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
-GLAPI PFNGLFRAMEBUFFERTEXTURE3DPROC glad_glFramebufferTexture3D;
-#define glFramebufferTexture3D glad_glFramebufferTexture3D
-typedef void (APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFERPROC)(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
-GLAPI PFNGLFRAMEBUFFERRENDERBUFFERPROC glad_glFramebufferRenderbuffer;
-#define glFramebufferRenderbuffer glad_glFramebufferRenderbuffer
-typedef void (APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC)(GLenum target, GLenum attachment, GLenum pname, GLint *params);
-GLAPI PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC glad_glGetFramebufferAttachmentParameteriv;
-#define glGetFramebufferAttachmentParameteriv glad_glGetFramebufferAttachmentParameteriv
-typedef void (APIENTRYP PFNGLGENERATEMIPMAPPROC)(GLenum target);
-GLAPI PFNGLGENERATEMIPMAPPROC glad_glGenerateMipmap;
-#define glGenerateMipmap glad_glGenerateMipmap
-typedef void (APIENTRYP PFNGLBLITFRAMEBUFFERPROC)(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
-GLAPI PFNGLBLITFRAMEBUFFERPROC glad_glBlitFramebuffer;
-#define glBlitFramebuffer glad_glBlitFramebuffer
-typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
-GLAPI PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC glad_glRenderbufferStorageMultisample;
-#define glRenderbufferStorageMultisample glad_glRenderbufferStorageMultisample
-typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYERPROC)(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
-GLAPI PFNGLFRAMEBUFFERTEXTURELAYERPROC glad_glFramebufferTextureLayer;
-#define glFramebufferTextureLayer glad_glFramebufferTextureLayer
-typedef void * (APIENTRYP PFNGLMAPBUFFERRANGEPROC)(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
-GLAPI PFNGLMAPBUFFERRANGEPROC glad_glMapBufferRange;
-#define glMapBufferRange glad_glMapBufferRange
-typedef void (APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEPROC)(GLenum target, GLintptr offset, GLsizeiptr length);
-GLAPI PFNGLFLUSHMAPPEDBUFFERRANGEPROC glad_glFlushMappedBufferRange;
-#define glFlushMappedBufferRange glad_glFlushMappedBufferRange
-typedef void (APIENTRYP PFNGLBINDVERTEXARRAYPROC)(GLuint array);
-GLAPI PFNGLBINDVERTEXARRAYPROC glad_glBindVertexArray;
-#define glBindVertexArray glad_glBindVertexArray
-typedef void (APIENTRYP PFNGLDELETEVERTEXARRAYSPROC)(GLsizei n, const GLuint *arrays);
-GLAPI PFNGLDELETEVERTEXARRAYSPROC glad_glDeleteVertexArrays;
-#define glDeleteVertexArrays glad_glDeleteVertexArrays
-typedef void (APIENTRYP PFNGLGENVERTEXARRAYSPROC)(GLsizei n, GLuint *arrays);
-GLAPI PFNGLGENVERTEXARRAYSPROC glad_glGenVertexArrays;
-#define glGenVertexArrays glad_glGenVertexArrays
-typedef GLboolean (APIENTRYP PFNGLISVERTEXARRAYPROC)(GLuint array);
-GLAPI PFNGLISVERTEXARRAYPROC glad_glIsVertexArray;
-#define glIsVertexArray glad_glIsVertexArray
-#endif
-#ifndef GL_VERSION_3_1
-#define GL_VERSION_3_1 1
-GLAPI int GLAD_GL_VERSION_3_1;
-typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDPROC)(GLenum mode, GLint first, GLsizei count, GLsizei instancecount);
-GLAPI PFNGLDRAWARRAYSINSTANCEDPROC glad_glDrawArraysInstanced;
-#define glDrawArraysInstanced glad_glDrawArraysInstanced
-typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDPROC)(GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount);
-GLAPI PFNGLDRAWELEMENTSINSTANCEDPROC glad_glDrawElementsInstanced;
-#define glDrawElementsInstanced glad_glDrawElementsInstanced
-typedef void (APIENTRYP PFNGLTEXBUFFERPROC)(GLenum target, GLenum internalformat, GLuint buffer);
-GLAPI PFNGLTEXBUFFERPROC glad_glTexBuffer;
-#define glTexBuffer glad_glTexBuffer
-typedef void (APIENTRYP PFNGLPRIMITIVERESTARTINDEXPROC)(GLuint index);
-GLAPI PFNGLPRIMITIVERESTARTINDEXPROC glad_glPrimitiveRestartIndex;
-#define glPrimitiveRestartIndex glad_glPrimitiveRestartIndex
-typedef void (APIENTRYP PFNGLCOPYBUFFERSUBDATAPROC)(GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
-GLAPI PFNGLCOPYBUFFERSUBDATAPROC glad_glCopyBufferSubData;
-#define glCopyBufferSubData glad_glCopyBufferSubData
-typedef void (APIENTRYP PFNGLGETUNIFORMINDICESPROC)(GLuint program, GLsizei uniformCount, const GLchar *const*uniformNames, GLuint *uniformIndices);
-GLAPI PFNGLGETUNIFORMINDICESPROC glad_glGetUniformIndices;
-#define glGetUniformIndices glad_glGetUniformIndices
-typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMSIVPROC)(GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params);
-GLAPI PFNGLGETACTIVEUNIFORMSIVPROC glad_glGetActiveUniformsiv;
-#define glGetActiveUniformsiv glad_glGetActiveUniformsiv
-typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMNAMEPROC)(GLuint program, GLuint uniformIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformName);
-GLAPI PFNGLGETACTIVEUNIFORMNAMEPROC glad_glGetActiveUniformName;
-#define glGetActiveUniformName glad_glGetActiveUniformName
-typedef GLuint (APIENTRYP PFNGLGETUNIFORMBLOCKINDEXPROC)(GLuint program, const GLchar *uniformBlockName);
-GLAPI PFNGLGETUNIFORMBLOCKINDEXPROC glad_glGetUniformBlockIndex;
-#define glGetUniformBlockIndex glad_glGetUniformBlockIndex
-typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMBLOCKIVPROC)(GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params);
-GLAPI PFNGLGETACTIVEUNIFORMBLOCKIVPROC glad_glGetActiveUniformBlockiv;
-#define glGetActiveUniformBlockiv glad_glGetActiveUniformBlockiv
-typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC)(GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName);
-GLAPI PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC glad_glGetActiveUniformBlockName;
-#define glGetActiveUniformBlockName glad_glGetActiveUniformBlockName
-typedef void (APIENTRYP PFNGLUNIFORMBLOCKBINDINGPROC)(GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding);
-GLAPI PFNGLUNIFORMBLOCKBINDINGPROC glad_glUniformBlockBinding;
-#define glUniformBlockBinding glad_glUniformBlockBinding
-#endif
-#ifndef GL_ES_VERSION_2_0
-#define GL_ES_VERSION_2_0 1
-GLAPI int GLAD_GL_ES_VERSION_2_0;
-typedef void (APIENTRYP PFNGLCLEARDEPTHFPROC)(GLfloat d);
-GLAPI PFNGLCLEARDEPTHFPROC glad_glClearDepthf;
-#define glClearDepthf glad_glClearDepthf
-typedef void (APIENTRYP PFNGLDEPTHRANGEFPROC)(GLfloat n, GLfloat f);
-GLAPI PFNGLDEPTHRANGEFPROC glad_glDepthRangef;
-#define glDepthRangef glad_glDepthRangef
-typedef void (APIENTRYP PFNGLGETSHADERPRECISIONFORMATPROC)(GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision);
-GLAPI PFNGLGETSHADERPRECISIONFORMATPROC glad_glGetShaderPrecisionFormat;
-#define glGetShaderPrecisionFormat glad_glGetShaderPrecisionFormat
-typedef void (APIENTRYP PFNGLRELEASESHADERCOMPILERPROC)(void);
-GLAPI PFNGLRELEASESHADERCOMPILERPROC glad_glReleaseShaderCompiler;
-#define glReleaseShaderCompiler glad_glReleaseShaderCompiler
-typedef void (APIENTRYP PFNGLSHADERBINARYPROC)(GLsizei count, const GLuint *shaders, GLenum binaryFormat, const void *binary, GLsizei length);
-GLAPI PFNGLSHADERBINARYPROC glad_glShaderBinary;
-#define glShaderBinary glad_glShaderBinary
-#endif
-#define GL_DEBUG_OUTPUT_SYNCHRONOUS 0x8242
-#define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH 0x8243
-#define GL_DEBUG_CALLBACK_FUNCTION 0x8244
-#define GL_DEBUG_CALLBACK_USER_PARAM 0x8245
-#define GL_DEBUG_SOURCE_API 0x8246
-#define GL_DEBUG_SOURCE_WINDOW_SYSTEM 0x8247
-#define GL_DEBUG_SOURCE_SHADER_COMPILER 0x8248
-#define GL_DEBUG_SOURCE_THIRD_PARTY 0x8249
-#define GL_DEBUG_SOURCE_APPLICATION 0x824A
-#define GL_DEBUG_SOURCE_OTHER 0x824B
-#define GL_DEBUG_TYPE_ERROR 0x824C
-#define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR 0x824D
-#define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR 0x824E
-#define GL_DEBUG_TYPE_PORTABILITY 0x824F
-#define GL_DEBUG_TYPE_PERFORMANCE 0x8250
-#define GL_DEBUG_TYPE_OTHER 0x8251
-#define GL_DEBUG_TYPE_MARKER 0x8268
-#define GL_DEBUG_TYPE_PUSH_GROUP 0x8269
-#define GL_DEBUG_TYPE_POP_GROUP 0x826A
-#define GL_DEBUG_SEVERITY_NOTIFICATION 0x826B
-#define GL_MAX_DEBUG_GROUP_STACK_DEPTH 0x826C
-#define GL_DEBUG_GROUP_STACK_DEPTH 0x826D
-#define GL_BUFFER 0x82E0
-#define GL_SHADER 0x82E1
-#define GL_PROGRAM 0x82E2
-#define GL_QUERY 0x82E3
-#define GL_PROGRAM_PIPELINE 0x82E4
-#define GL_SAMPLER 0x82E6
-#define GL_MAX_LABEL_LENGTH 0x82E8
-#define GL_MAX_DEBUG_MESSAGE_LENGTH 0x9143
-#define GL_MAX_DEBUG_LOGGED_MESSAGES 0x9144
-#define GL_DEBUG_LOGGED_MESSAGES 0x9145
-#define GL_DEBUG_SEVERITY_HIGH 0x9146
-#define GL_DEBUG_SEVERITY_MEDIUM 0x9147
-#define GL_DEBUG_SEVERITY_LOW 0x9148
-#define GL_DEBUG_OUTPUT 0x92E0
-#define GL_CONTEXT_FLAG_DEBUG_BIT 0x00000002
-#define GL_DEBUG_OUTPUT_SYNCHRONOUS_KHR 0x8242
-#define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_KHR 0x8243
-#define GL_DEBUG_CALLBACK_FUNCTION_KHR 0x8244
-#define GL_DEBUG_CALLBACK_USER_PARAM_KHR 0x8245
-#define GL_DEBUG_SOURCE_API_KHR 0x8246
-#define GL_DEBUG_SOURCE_WINDOW_SYSTEM_KHR 0x8247
-#define GL_DEBUG_SOURCE_SHADER_COMPILER_KHR 0x8248
-#define GL_DEBUG_SOURCE_THIRD_PARTY_KHR 0x8249
-#define GL_DEBUG_SOURCE_APPLICATION_KHR 0x824A
-#define GL_DEBUG_SOURCE_OTHER_KHR 0x824B
-#define GL_DEBUG_TYPE_ERROR_KHR 0x824C
-#define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_KHR 0x824D
-#define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_KHR 0x824E
-#define GL_DEBUG_TYPE_PORTABILITY_KHR 0x824F
-#define GL_DEBUG_TYPE_PERFORMANCE_KHR 0x8250
-#define GL_DEBUG_TYPE_OTHER_KHR 0x8251
-#define GL_DEBUG_TYPE_MARKER_KHR 0x8268
-#define GL_DEBUG_TYPE_PUSH_GROUP_KHR 0x8269
-#define GL_DEBUG_TYPE_POP_GROUP_KHR 0x826A
-#define GL_DEBUG_SEVERITY_NOTIFICATION_KHR 0x826B
-#define GL_MAX_DEBUG_GROUP_STACK_DEPTH_KHR 0x826C
-#define GL_DEBUG_GROUP_STACK_DEPTH_KHR 0x826D
-#define GL_BUFFER_KHR 0x82E0
-#define GL_SHADER_KHR 0x82E1
-#define GL_PROGRAM_KHR 0x82E2
-#define GL_VERTEX_ARRAY_KHR 0x8074
-#define GL_QUERY_KHR 0x82E3
-#define GL_PROGRAM_PIPELINE_KHR 0x82E4
-#define GL_SAMPLER_KHR 0x82E6
-#define GL_MAX_LABEL_LENGTH_KHR 0x82E8
-#define GL_MAX_DEBUG_MESSAGE_LENGTH_KHR 0x9143
-#define GL_MAX_DEBUG_LOGGED_MESSAGES_KHR 0x9144
-#define GL_DEBUG_LOGGED_MESSAGES_KHR 0x9145
-#define GL_DEBUG_SEVERITY_HIGH_KHR 0x9146
-#define GL_DEBUG_SEVERITY_MEDIUM_KHR 0x9147
-#define GL_DEBUG_SEVERITY_LOW_KHR 0x9148
-#define GL_DEBUG_OUTPUT_KHR 0x92E0
-#define GL_CONTEXT_FLAG_DEBUG_BIT_KHR 0x00000002
-#define GL_STACK_OVERFLOW_KHR 0x0503
-#define GL_STACK_UNDERFLOW_KHR 0x0504
-#define GL_DISPLAY_LIST 0x82E7
-#ifndef GL_KHR_debug
-#define GL_KHR_debug 1
-GLAPI int GLAD_GL_KHR_debug;
-typedef void (APIENTRYP PFNGLDEBUGMESSAGECONTROLPROC)(GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);
-GLAPI PFNGLDEBUGMESSAGECONTROLPROC glad_glDebugMessageControl;
-#define glDebugMessageControl glad_glDebugMessageControl
-typedef void (APIENTRYP PFNGLDEBUGMESSAGEINSERTPROC)(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);
-GLAPI PFNGLDEBUGMESSAGEINSERTPROC glad_glDebugMessageInsert;
-#define glDebugMessageInsert glad_glDebugMessageInsert
-typedef void (APIENTRYP PFNGLDEBUGMESSAGECALLBACKPROC)(GLDEBUGPROC callback, const void *userParam);
-GLAPI PFNGLDEBUGMESSAGECALLBACKPROC glad_glDebugMessageCallback;
-#define glDebugMessageCallback glad_glDebugMessageCallback
-typedef GLuint (APIENTRYP PFNGLGETDEBUGMESSAGELOGPROC)(GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);
-GLAPI PFNGLGETDEBUGMESSAGELOGPROC glad_glGetDebugMessageLog;
-#define glGetDebugMessageLog glad_glGetDebugMessageLog
-typedef void (APIENTRYP PFNGLPUSHDEBUGGROUPPROC)(GLenum source, GLuint id, GLsizei length, const GLchar *message);
-GLAPI PFNGLPUSHDEBUGGROUPPROC glad_glPushDebugGroup;
-#define glPushDebugGroup glad_glPushDebugGroup
-typedef void (APIENTRYP PFNGLPOPDEBUGGROUPPROC)(void);
-GLAPI PFNGLPOPDEBUGGROUPPROC glad_glPopDebugGroup;
-#define glPopDebugGroup glad_glPopDebugGroup
-typedef void (APIENTRYP PFNGLOBJECTLABELPROC)(GLenum identifier, GLuint name, GLsizei length, const GLchar *label);
-GLAPI PFNGLOBJECTLABELPROC glad_glObjectLabel;
-#define glObjectLabel glad_glObjectLabel
-typedef void (APIENTRYP PFNGLGETOBJECTLABELPROC)(GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label);
-GLAPI PFNGLGETOBJECTLABELPROC glad_glGetObjectLabel;
-#define glGetObjectLabel glad_glGetObjectLabel
-typedef void (APIENTRYP PFNGLOBJECTPTRLABELPROC)(const void *ptr, GLsizei length, const GLchar *label);
-GLAPI PFNGLOBJECTPTRLABELPROC glad_glObjectPtrLabel;
-#define glObjectPtrLabel glad_glObjectPtrLabel
-typedef void (APIENTRYP PFNGLGETOBJECTPTRLABELPROC)(const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label);
-GLAPI PFNGLGETOBJECTPTRLABELPROC glad_glGetObjectPtrLabel;
-#define glGetObjectPtrLabel glad_glGetObjectPtrLabel
-typedef void (APIENTRYP PFNGLDEBUGMESSAGECONTROLKHRPROC)(GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);
-GLAPI PFNGLDEBUGMESSAGECONTROLKHRPROC glad_glDebugMessageControlKHR;
-#define glDebugMessageControlKHR glad_glDebugMessageControlKHR
-typedef void (APIENTRYP PFNGLDEBUGMESSAGEINSERTKHRPROC)(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);
-GLAPI PFNGLDEBUGMESSAGEINSERTKHRPROC glad_glDebugMessageInsertKHR;
-#define glDebugMessageInsertKHR glad_glDebugMessageInsertKHR
-typedef void (APIENTRYP PFNGLDEBUGMESSAGECALLBACKKHRPROC)(GLDEBUGPROCKHR callback, const void *userParam);
-GLAPI PFNGLDEBUGMESSAGECALLBACKKHRPROC glad_glDebugMessageCallbackKHR;
-#define glDebugMessageCallbackKHR glad_glDebugMessageCallbackKHR
-typedef GLuint (APIENTRYP PFNGLGETDEBUGMESSAGELOGKHRPROC)(GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);
-GLAPI PFNGLGETDEBUGMESSAGELOGKHRPROC glad_glGetDebugMessageLogKHR;
-#define glGetDebugMessageLogKHR glad_glGetDebugMessageLogKHR
-typedef void (APIENTRYP PFNGLPUSHDEBUGGROUPKHRPROC)(GLenum source, GLuint id, GLsizei length, const GLchar *message);
-GLAPI PFNGLPUSHDEBUGGROUPKHRPROC glad_glPushDebugGroupKHR;
-#define glPushDebugGroupKHR glad_glPushDebugGroupKHR
-typedef void (APIENTRYP PFNGLPOPDEBUGGROUPKHRPROC)(void);
-GLAPI PFNGLPOPDEBUGGROUPKHRPROC glad_glPopDebugGroupKHR;
-#define glPopDebugGroupKHR glad_glPopDebugGroupKHR
-typedef void (APIENTRYP PFNGLOBJECTLABELKHRPROC)(GLenum identifier, GLuint name, GLsizei length, const GLchar *label);
-GLAPI PFNGLOBJECTLABELKHRPROC glad_glObjectLabelKHR;
-#define glObjectLabelKHR glad_glObjectLabelKHR
-typedef void (APIENTRYP PFNGLGETOBJECTLABELKHRPROC)(GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label);
-GLAPI PFNGLGETOBJECTLABELKHRPROC glad_glGetObjectLabelKHR;
-#define glGetObjectLabelKHR glad_glGetObjectLabelKHR
-typedef void (APIENTRYP PFNGLOBJECTPTRLABELKHRPROC)(const void *ptr, GLsizei length, const GLchar *label);
-GLAPI PFNGLOBJECTPTRLABELKHRPROC glad_glObjectPtrLabelKHR;
-#define glObjectPtrLabelKHR glad_glObjectPtrLabelKHR
-typedef void (APIENTRYP PFNGLGETOBJECTPTRLABELKHRPROC)(const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label);
-GLAPI PFNGLGETOBJECTPTRLABELKHRPROC glad_glGetObjectPtrLabelKHR;
-#define glGetObjectPtrLabelKHR glad_glGetObjectPtrLabelKHR
-typedef void (APIENTRYP PFNGLGETPOINTERVKHRPROC)(GLenum pname, void **params);
-GLAPI PFNGLGETPOINTERVKHRPROC glad_glGetPointervKHR;
-#define glGetPointervKHR glad_glGetPointervKHR
-#endif
-#ifndef GL_KHR_debug
-#define GL_KHR_debug 1
-GLAPI int GLAD_GL_KHR_debug;
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/rebuild_PC/PsyCross/include/PsyX/common/half_float.h b/rebuild_PC/PsyCross/include/PsyX/common/half_float.h
deleted file mode 100644
index 16aeb2d6d..000000000
--- a/rebuild_PC/PsyCross/include/PsyX/common/half_float.h
+++ /dev/null
@@ -1,36 +0,0 @@
-#ifndef HALF_FLOAT
-#define HALF_FLOAT
-
-
-typedef struct half
-{
- unsigned short sh;
-
-#if defined(_LANGUAGE_C_PLUS_PLUS)||defined(__cplusplus)||defined(c_plusplus)
- half() {};
- half(const float x);
- half(const half& other);
- operator float() const;
-
- half& operator=(const half& other)
- {
- sh = other.sh;
- return *this;
- }
-#endif
-
-} half;
-
-
-#if defined(_LANGUAGE_C_PLUS_PLUS)||defined(__cplusplus)||defined(c_plusplus)
-extern "C" {
-#endif
-
-extern short to_half_float(const float x);
-extern float from_half_float(const short x);
-
-#if defined(_LANGUAGE_C_PLUS_PLUS)||defined(__cplusplus)||defined(c_plusplus)
-}
-#endif
-
-#endif // HALF_FLOAT
\ No newline at end of file
diff --git a/rebuild_PC/PsyCross/include/PsyX/common/pgxp_defs.h b/rebuild_PC/PsyCross/include/PsyX/common/pgxp_defs.h
deleted file mode 100644
index 825f81923..000000000
--- a/rebuild_PC/PsyCross/include/PsyX/common/pgxp_defs.h
+++ /dev/null
@@ -1,78 +0,0 @@
-#ifndef PGXP_DEFS_H
-#define PGXP_DEFS_H
-
-#include "PsyX/PsyX_config.h"
-
-#if USE_PGXP
-#include "PsyX/common/half_float.h"
-
-// Helpful macro
-#define PGXP_LOOKUP_VALUE(x, y) (*(u_short*)&(x) | (*(u_short*)&(y) << 16))
-
-//-------------------------------------
-
-// in C++, VERTTYPE can be declared as half
-// use `_HF` to convert to half whenever you in C mode.
-#if defined(_LANGUAGE_C_PLUS_PLUS)||defined(__cplusplus)||defined(c_plusplus)
-typedef half VERTTYPE;
-#define _HF(x) x
-#else
-typedef short VERTTYPE;
-#define _HF(x) to_half_float(x)
-#endif
-
-typedef struct
-{
- float px, py, pz; // 32 bit values
- VERTTYPE x, y, z; // 16 bit values (for lookup and backwards compat if not found in cache)
-} PGXPVector3D;
-
-typedef struct
-{
- uint lookup;
- float px, py, pz;
- float scr_h, ofx, ofy;
-} PGXPVData;
-
-#if defined(_LANGUAGE_C_PLUS_PLUS)||defined(__cplusplus)||defined(c_plusplus)
-extern "C" {
-#endif
-
-extern PGXPVector3D g_FP_SXYZ0; // direct access PGXP without table lookup
-extern PGXPVector3D g_FP_SXYZ1;
-extern PGXPVector3D g_FP_SXYZ2;
-
-/* clears PGXP vertex buffer */
-void PGXP_ClearCache();
-
-/* emits new PGXP vertex */
-ushort PGXP_EmitCacheData(PGXPVData* newData);
-
-/* sets Z offset (works like Z bias) */
-void PGXP_SetZOffsetScale(float offset, float scale);
-
-/* searches for vertex with given lookup value */
-int PGXP_GetCacheData(PGXPVData* out, uint lookup, ushort indexhint /* = 0xFFFF */);
-
-/* used by primitive setup */
-ushort PGXP_GetIndex(int checkTransform);
-
-#if defined(_LANGUAGE_C_PLUS_PLUS)||defined(__cplusplus)||defined(c_plusplus)
-}
-#endif
-
-// special PGXP type
-typedef struct { /* 2D short vector */
- half vx, vy;
- ushort pgxp_index;
-} DVECTORF;
-
-#else
-typedef short VERTTYPE;
-
-#define _HF(x) x
-
-#endif
-
-
-#endif // PGXP_DEFS
\ No newline at end of file
diff --git a/rebuild_PC/PsyCross/include/PsyX/util/timer.h b/rebuild_PC/PsyCross/include/PsyX/util/timer.h
deleted file mode 100644
index 4ed4419b2..000000000
--- a/rebuild_PC/PsyCross/include/PsyX/util/timer.h
+++ /dev/null
@@ -1,30 +0,0 @@
-#ifndef UTIL_TIMER_H
-#define UTIL_TIMER_H
-
-#ifdef _WIN32
-#include
-#else
-#include
-#endif
-
-typedef struct
-{
-#ifdef _WIN32
- uint64_t clockStart;
-#else
- struct timeval timeStart;
-#endif // _WIN32
-} timerCtx_t;
-
-#if defined(_LANGUAGE_C_PLUS_PLUS)||defined(__cplusplus)||defined(c_plusplus)
-extern "C" {
-#endif
-
-extern void Util_InitHPCTimer(timerCtx_t* timer);
-extern double Util_GetHPCTime(timerCtx_t* timer, int reset /*= 0*/);
-
-#if defined(_LANGUAGE_C_PLUS_PLUS)||defined(__cplusplus)||defined(c_plusplus)
-}
-#endif
-
-#endif
\ No newline at end of file
diff --git a/rebuild_PC/PsyCross/include/psx/abs.h b/rebuild_PC/PsyCross/include/psx/abs.h
deleted file mode 100644
index 6f581558a..000000000
--- a/rebuild_PC/PsyCross/include/psx/abs.h
+++ /dev/null
@@ -1,18 +0,0 @@
-#ifndef ABS_H
-#define ABS_H
-
-#ifndef ABS
-#define ABS(x) fst_abs(x)
-#endif
-
-#if defined(_LANGUAGE_C_PLUS_PLUS)||defined(__cplusplus)||defined(c_plusplus)
-extern "C" {
-#endif
-
-extern int fst_abs(int x);
-
-#if defined(_LANGUAGE_C_PLUS_PLUS)||defined(__cplusplus)||defined(c_plusplus)
-}
-#endif
-
-#endif
\ No newline at end of file
diff --git a/rebuild_PC/PsyCross/include/psx/asm.h b/rebuild_PC/PsyCross/include/psx/asm.h
deleted file mode 100644
index 45f28f84e..000000000
--- a/rebuild_PC/PsyCross/include/psx/asm.h
+++ /dev/null
@@ -1,12 +0,0 @@
-#ifndef ASM_H
-#define ASM_H
-
-/*
-
-This header must be empty
-
-*/
-
-#define NREGS 40
-
-#endif
diff --git a/rebuild_PC/PsyCross/include/psx/gtemac.h b/rebuild_PC/PsyCross/include/psx/gtemac.h
deleted file mode 100644
index f619966bf..000000000
--- a/rebuild_PC/PsyCross/include/psx/gtemac.h
+++ /dev/null
@@ -1,360 +0,0 @@
-#ifndef GTEMAC_H
-#define GTEMAC_H
-
-/*
- * GTE inline functions(Simple)
- */
-
-#define gte_RotTransPers(r1,r2,r3,r4,r5) \
- { gte_ldv0(r1); \
- gte_rtps(); \
- gte_stsxy(r2); \
- gte_stdp(r3); \
- gte_stflg(r4); \
- gte_stszotz(r5); }
-
-#define gte_RotTransPers3(r1,r2,r3,r4,r5,r6,r7,r8,r9) \
- { gte_ldv3(r1,r2,r3); \
- gte_rtpt(); \
- gte_stsxy3(r4,r5,r6); \
- gte_stdp(r7); \
- gte_stflg(r8); \
- gte_stszotz(r9); }
-
-#define gte_RotTrans(r1,r2,r3) \
- { gte_ldv0(r1); \
- gte_rt(); \
- gte_stlvnl(r2); \
- gte_stflg(r3); }
-
-#define gte_LocalLight(r1,r2) \
- { gte_ldv0(r1); \
- gte_ll(); \
- gte_stlvl(r2); }
-
-#define gte_LightColor(r1,r2) \
- { gte_ldlvl(r1); \
- gte_lc(); \
- gte_stlvl(r2); }
-
-#define gte_DpqColorLight(r1,r2,r3,r4) \
- { gte_ldlvl(r1); \
- gte_ldrgb(r2); \
- gte_lddp(r3); \
- gte_dpcl(); \
- gte_strgb(r4); }
-
-#define gte_DpqColor(r1,r2,r3) \
- { gte_ldrgb(r1); \
- gte_lddp(r2); \
- gte_dpcs(); \
- gte_strgb(r3); }
-
-#define gte_DpqColor3(r1,r2,r3,r4,r5,r6,r7) \
- { gte_ldrgb3(r1,r2,r3); \
- gte_lddp(r4); \
- gte_dpct(); \
- gte_strgb3(r5,r6,r7); }
-
-#define gte_Intpl(r1,r2,r3) \
- { gte_ldlvl(r1); \
- gte_lddp(r2); \
- gte_intpl(); \
- gte_strgb(r3); }
-
-#define gte_Square12(r1,r2) \
- { gte_ldlvl(r1); \
- gte_sqr12(); \
- gte_stlvnl(r2); }
-
-#define gte_Square0(r1,r2) \
- { gte_ldlvl(r1); \
- gte_sqr0(); \
- gte_stlvnl(r2); }
-
-#define gte_NormalColor(r1,r2) \
- { gte_ldv0(r1); \
- gte_ncs(); \
- gte_strgb(r2); }
-
-#define gte_NormalColor3(r1,r2,r3,r4,r5,r6) \
- { gte_ldv3(r1,r2,r3); \
- gte_nct(); \
- gte_strgb3(r4,r5,r6); }
-
-#define gte_NormalColorDpq(r1,r2,r3,r4) \
- { gte_ldv0(r1); \
- gte_ldrgb(r2); \
- gte_lddp(r3); \
- gte_ncds(); \
- gte_strgb(r4); }
-
-#define gte_NormalColorDpq3(r1,r2,r3,r4,r5,r6,r7,r8) \
- { gte_ldv3(r1,r2,r3); \
- gte_ldrgb(r4); \
- gte_lddp(r5); \
- gte_ncdt(); \
- gte_strgb3(r6,r7,r8); }
-
-#define gte_NormalColorCol(r1,r2,r3) \
- { gte_ldv0(r1); \
- gte_ldrgb(r2); \
- gte_nccs(); \
- gte_strgb(r3); }
-
-#define gte_NormalColorCol3(r1,r2,r3,r4,r5,r6,r7) \
- { gte_ldv3(r1,r2,r3); \
- gte_ldrgb(r4); \
- gte_ncct(); \
- gte_strgb3(r5,r6,r7); }
-
-#define gte_ColorDpq(r1,r2,r3,r4) \
- { gte_ldlvl(r1); \
- gte_ldrgb(r2); \
- gte_lddp(r3); \
- gte_cdp(); \
- gte_strgb(r4); }
-
-#define gte_ColorCol(r1,r2,r3) \
- { gte_ldlvl(r1); \
- gte_ldrgb(r2); \
- gte_cc(); \
- gte_strgb(r3); }
-
-#define gte_NormalClip(r1,r2,r3,r4) \
- { gte_ldsxy3(r1,r2,r3); \
- gte_nclip(); \
- gte_stopz(r4); }
-
-#define gte_AverageZ3(r1,r2,r3,r4) \
- { gte_ldsz3(r1,r2,r3); \
- gte_avsz3(); \
- gte_stotz(r4); }
-
-#define gte_AverageZ4(r1,r2,r3,r4,r5) \
- { gte_ldsz4(r1,r2,r3,r4); \
- gte_avsz4(); \
- gte_stotz(r5); }
-
-#define gte_OuterProduct12(r1,r2,r3) \
- { gte_ldopv1(r1); \
- gte_ldopv2(r2); \
- gte_op12(); \
- gte_stlvnl(r3); }
-
-#define gte_OuterProduct0(r1,r2,r3) \
- { gte_ldopv1(r1); \
- gte_ldopv2(r2); \
- gte_op0(); \
- gte_stlvnl(r3); }
-
-#define gte_OuterProduct12SVL(r1,r2,r3) \
- { gte_ldopv1SV(r1); \
- gte_ldopv2SV(r2); \
- gte_op12(); \
- gte_stlvnl(r3); }
-
-#define gte_OuterProduct0SVL(r1,r2,r3) \
- { gte_ldopv1SV(r1); \
- gte_ldopv2SV(r2); \
- gte_op0(); \
- gte_stlvnl(r3); }
-
-#define gte_OuterProduct12SV(r1,r2,r3) \
- { gte_ldopv1SV(r1); \
- gte_ldopv2SV(r2); \
- gte_op12(); \
- gte_stsv(r3); }
-
-#define gte_OuterProduct0SV(r1,r2,r3) \
- { gte_ldopv1SV(r1); \
- gte_ldopv2SV(r2); \
- gte_op0(); \
- gte_stsv(r3); }
-
-#define gte_Lzc(r1,r2) \
- { gte_ldlzc(r1); \
- gte_nop(); \
- gte_nop(); \
- gte_stlzc(r2); }
-
- /*
- * GTE inline functions(Combination)
- * 4 vertices functions can't be replaced by equivalent macros
- * because they use OR of flags after rtpt & rtps
- * Please write directry in your program.
- */
-#define gte_RotAverage3(r1,r2,r3,r4,r5,r6,r7,r8,r9) \
- { gte_ldv3(r1,r2,r3); \
- gte_rtpt(); \
- gte_stsxy3(r4,r5,r6); \
- gte_stdp(r7); \
- gte_stflg(r8); \
- gte_avsz3(); \
- gte_stotz(r9); }
-
-#define gte_RotNclip3(r1,r2,r3,r4,r5,r6,r7,r8,r9,r10) \
- { gte_ldv3(r1,r2,r3); \
- gte_rtpt(); \
- gte_stflg(r9); \
- gte_nclip(); \
- gte_stopz(r10); \
- gte_stsxy3(r4,r5,r6); \
- gte_stdp(r7); \
- gte_stszotz(r8); }
-
-#define gte_RotAverageNclip3(r1,r2,r3,r4,r5,r6,r7,r8,r9,r10) \
- { gte_ldv3(r1,r2,r3); \
- gte_rtpt(); \
- gte_stflg(r9); \
- gte_nclip(); \
- gte_stopz(r10); \
- gte_stsxy3(r4,r5,r6); \
- gte_stdp(r7); \
- gte_avsz3(); \
- gte_stotz(r8); }
-
-#define gte_RotColorDpq(r1,r2,r3,r4,r5,r6,r7) \
- { gte_ldv0(r1); \
- gte_rtps(); \
- gte_stsxy(r4); \
- gte_stflg(r6); \
- gte_ldv0(r2); \
- gte_ldrgb(r3); \
- gte_ncds(); \
- gte_strgb(r5); \
- gte_stszotz(r7); }
-
-#define gte_RotColorDpq3(r1,r2,r3,r4,r5,r6,r7,r8,r9,r10,r11,r12,r13,r14,r15) \
- { gte_ldv3(r1,r2,r3); \
- gte_rtpt(); \
- gte_stsxy3(r8,r9,r10); \
- gte_stflg(r14); \
- gte_ldv3(r4,r5,r6); \
- gte_ldrgb(r7); \
- gte_ncdt(); \
- gte_strgb3(r11,r12,r13);\
- gte_stszotz(r15); }
-
-#define gte_RotAverageNclipColorDpq3(r1,r2,r3,r4,r5,r6,r7,r8,r9,r10,r11,r12,r13,r14,r15,r16) \
- { gte_ldv3(r1,r2,r3); \
- gte_rtpt(); \
- gte_stflg(r15); \
- gte_nclip(); \
- gte_stopz(r16); \
- gte_ldv3(r4,r5,r6); \
- gte_ldrgb(r7); \
- gte_ncdt(); \
- gte_stsxy3(r8,r9,r10); \
- gte_strgb3(r11,r12,r13);\
- gte_avsz3(); \
- gte_stotz(r14); }
-
-#define gte_RotAverageNclipColorCol3(r1,r2,r3,r4,r5,r6,r7,r8,r9,r10,r11,r12,r13,r14,r15,r16) \
- { gte_ldv3(r1,r2,r3); \
- gte_rtpt(); \
- gte_stflg(r15); \
- gte_nclip(); \
- gte_stopz(r16); \
- gte_ldv3(r4,r5,r6); \
- gte_ldrgb(r7); \
- gte_ncct(); \
- gte_stsxy3(r8,r9,r10); \
- gte_strgb3(r11,r12,r13);\
- gte_avsz3(); \
- gte_stotz(r14); }
-
-#define gte_LoadAverage12(r1,r2,r3,r4,r5) \
- { gte_lddp(r3); \
- gte_ldlvl(r1); \
- gte_gpf12(); \
- gte_lddp(r4); \
- gte_ldlvl(r2); \
- gte_gpl12(); \
- gte_stlvl(r5); }
-
-#define gte_LoadAverage0(r1,r2,r3,r4,r5) \
- { gte_lddp(r3); \
- gte_ldlvl(r1); \
- gte_gpf0(); \
- gte_lddp(r4); \
- gte_ldlvl(r2); \
- gte_gpl0(); \
- gte_stlvl(r5); }
-
-#define gte_LoadAverageShort12(r1,r2,r3,r4,r5) \
- { gte_lddp(r3); \
- gte_ldsv(r1); \
- gte_gpf12(); \
- gte_lddp(r4); \
- gte_ldsv(r2); \
- gte_gpl12(); \
- gte_stsv(r5); }
-
-#define gte_LoadAverageShort0(r1,r2,r3,r4,r5) \
- { gte_lddp(r3); \
- gte_ldsv(r1); \
- gte_gpf0(); \
- gte_lddp(r4); \
- gte_ldsv(r2); \
- gte_gpl0(); \
- gte_stsv(r5); }
-
-#define gte_LoadAverageByte(r1,r2,r3,r4,r5) \
- { gte_lddp(r3); \
- gte_ldbv(r1); \
- gte_gpf12(); \
- gte_lddp(r4); \
- gte_ldbv(r2); \
- gte_gpl12(); \
- gte_stbv(r5); }
-
-#define gte_LoadAverageCol(r1,r2,r3,r4,r5) \
- { gte_lddp(r3); \
- gte_ldcv(r1); \
- gte_gpf12(); \
- gte_lddp(r4); \
- gte_ldcv(r2); \
- gte_gpl12(); \
- gte_stcv(r5); }
-
- /*
- *
- */
-#define gte_MulMatrix0(r1,r2,r3) \
- { gte_SetRotMatrix(r1); \
- gte_ldclmv(r2); \
- gte_rtir(); \
- gte_stclmv(r3); \
- gte_ldclmv((char*)r2+2);\
- gte_rtir(); \
- gte_stclmv((char*)r3+2);\
- gte_ldclmv((char*)r2+4);\
- gte_rtir(); \
- gte_stclmv((char*)r3+4); }
-
-#define gte_ApplyMatrix(r1,r2,r3) \
- { gte_SetRotMatrix(r1); \
- gte_ldv0(r2); \
- gte_rtv0(); \
- gte_stlvnl(r3); }
-
-#define gte_ApplyMatrixSV(r1,r2,r3) \
- { gte_SetRotMatrix(r1); \
- gte_ldv0(r2); \
- gte_rtv0(); \
- gte_stsv(r3); }
-
-#define gte_CompMatrix(r1,r2,r3) \
- { gte_MulMatrix0(r1,r2,r3);\
- gte_SetTransMatrix(r1); \
- gte_ldlv0((char*)r2+20);\
- gte_rt(); \
- gte_stlvnl((char*)r3+20); }
-
-#define gte_ApplyRotMatrix(r1,r2) \
- { gte_ldv0(r1); \
- gte_rtv0(); \
- gte_stlvnl(r2); }
-
-#endif
\ No newline at end of file
diff --git a/rebuild_PC/PsyCross/include/psx/gtereg.h b/rebuild_PC/PsyCross/include/psx/gtereg.h
deleted file mode 100644
index 19ea73cc0..000000000
--- a/rebuild_PC/PsyCross/include/psx/gtereg.h
+++ /dev/null
@@ -1,222 +0,0 @@
-#ifndef GTEREG_H
-#define GTEREG_H
-
-#ifdef Status
-// Fix for stupid GLES headers in RPI or MESA, whatever... just get rid of this dumb shit
-#undef Status
-#endif
-
-typedef union
-{
- struct { unsigned char l, h, h2, h3; } b;
- struct { unsigned short l, h; } w;
- struct { char l, h, h2, h3; } sb;
- struct { short l, h; } sw;
-
- unsigned int d;
- int sd;
-} PAIR;
-
-typedef struct {
- unsigned char r, g, b, c;
-} CBGR;
-
-typedef struct {
- short x, y, z, pad;
-} SVector3D;
-
-typedef struct {
- short x, y;
-} SVector2D;
-
-typedef struct {
- short z, pad;
-} SVector2Dz;
-
-typedef struct {
- short m11, m12, m13, m21, m22, m23, m31, m32, m33, pad;
-} SMatrix3D;
-
-typedef union
-{
- struct
- {
- SVector3D v0, v1, v2;
- CBGR rgb;
- int otz;
- int ir0, ir1, ir2, ir3;
- SVector2D sxy0, sxy1, sxy2, sxyp;
- SVector2Dz sz0, sz1, sz2, sz3;
- CBGR rgb0, rgb1, rgb2;
- int reserved;
- int mac0, mac1, mac2, mac3;
- unsigned int irgb, orgb;
- int lzcs, lzcr;
- } n;
-
- unsigned int r[32];
- PAIR p[32];
-
-} psxCP2Data;
-
-typedef union
-{
- struct {
- SMatrix3D rMatrix;
- int trX, trY, trZ;
- SMatrix3D lMatrix;
- int rbk, gbk, bbk;
- SMatrix3D cMatrix;
- int rfc, gfc, bfc;
- int ofx, ofy;
- int h;
- int dqa, dqb;
- int zsf3, zsf4;
- int flag;
- } n;
- unsigned int r[32];
- PAIR p[32];
-} psxCP2Ctrl;
-
-typedef union {
- struct {
- unsigned int Index, Random, EntryLo0, BPC,
- Context, BDA, PIDMask, DCIC,
- BadVAddr, BDAM, EntryHi, BPCM,
- Status, Cause, EPC, PRid,
- Config, LLAddr, WatchLO, WatchHI,
- XContext, Reserved1, Reserved2, Reserved3,
- Reserved4, Reserved5, ECC, CacheErr,
- TagLo, TagHi, ErrorEPC, Reserved6;
- } n;
- unsigned int r[32];
-} psxCP0Regs;
-
-typedef struct
-{
- psxCP0Regs CP0; /* Coprocessor0 Registers */
- psxCP2Data CP2D; /* Cop2 data registers */
- psxCP2Ctrl CP2C; /* Cop2 control registers */
-} GTERegisters;
-
-#if defined(_LANGUAGE_C_PLUS_PLUS)||defined(__cplusplus)||defined(c_plusplus)
-extern "C" {
-#endif
-
-extern GTERegisters gteRegs;
-
-extern int GTE_operator(int);
-extern int LIM(int value, int max, int min, unsigned int flag);
-
-#if defined(_LANGUAGE_C_PLUS_PLUS)||defined(__cplusplus)||defined(c_plusplus)
-}
-#endif
-
-/* Data Registers mtc2 mfc2 */
-#define C2_VX0 (gteRegs.CP2D.p[ 0 ].sw.l)
-#define C2_VY0 (gteRegs.CP2D.p[ 0 ].sw.h)
-#define C2_VZ0 (gteRegs.CP2D.p[ 1 ].sw.l)
-#define C2_VX1 (gteRegs.CP2D.p[ 2 ].w.l)
-#define C2_VY1 (gteRegs.CP2D.p[ 2 ].w.h)
-#define C2_VZ1 (gteRegs.CP2D.p[ 3 ].w.l)
-#define C2_VX2 (gteRegs.CP2D.p[ 4 ].w.l)
-#define C2_VY2 (gteRegs.CP2D.p[ 4 ].w.h)
-#define C2_VZ2 (gteRegs.CP2D.p[ 5 ].w.l)
-#define C2_R (gteRegs.CP2D.p[ 6 ].b.l)
-#define C2_G (gteRegs.CP2D.p[ 6 ].b.h)
-#define C2_B (gteRegs.CP2D.p[ 6 ].b.h2)
-#define C2_CODE (gteRegs.CP2D.p[ 6 ].b.h3)
-#define C2_OTZ (gteRegs.CP2D.p[ 7 ].w.l)
-#define C2_IR0 (gteRegs.CP2D.p[ 8 ].sw.l)
-#define C2_IR1 (gteRegs.CP2D.p[ 9 ].sw.l)
-#define C2_IR2 (gteRegs.CP2D.p[ 10 ].sw.l)
-#define C2_IR3 (gteRegs.CP2D.p[ 11 ].sw.l)
-#define C2_SXY0 (gteRegs.CP2D.p[ 12 ].d)
-#define C2_SX0 (gteRegs.CP2D.p[ 12 ].sw.l)
-#define C2_SY0 (gteRegs.CP2D.p[ 12 ].sw.h)
-#define C2_SXY1 (gteRegs.CP2D.p[ 13 ].d)
-#define C2_SX1 (gteRegs.CP2D.p[ 13 ].sw.l)
-#define C2_SY1 (gteRegs.CP2D.p[ 13 ].sw.h)
-#define C2_SXY2 (gteRegs.CP2D.p[ 14 ].d)
-#define C2_SX2 (gteRegs.CP2D.p[ 14 ].sw.l)
-#define C2_SY2 (gteRegs.CP2D.p[ 14 ].sw.h)
-#define C2_SXYP (gteRegs.CP2D.p[ 15 ].d)
-#define C2_SXP (gteRegs.CP2D.p[ 15 ].sw.l)
-#define C2_SYP (gteRegs.CP2D.p[ 15 ].sw.h)
-#define C2_SZ0 (gteRegs.CP2D.p[ 16 ].w.l)
-#define C2_SZ1 (gteRegs.CP2D.p[ 17 ].w.l)
-#define C2_SZ2 (gteRegs.CP2D.p[ 18 ].w.l)
-#define C2_SZ3 (gteRegs.CP2D.p[ 19 ].w.l)
-#define C2_RGB0 (gteRegs.CP2D.p[ 20 ].d)
-#define C2_R0 (gteRegs.CP2D.p[ 20 ].b.l)
-#define C2_G0 (gteRegs.CP2D.p[ 20 ].b.h)
-#define C2_B0 (gteRegs.CP2D.p[ 20 ].b.h2)
-#define C2_CD0 (gteRegs.CP2D.p[ 20 ].b.h3)
-#define C2_RGB1 (gteRegs.CP2D.p[ 21 ].d)
-#define C2_R1 (gteRegs.CP2D.p[ 21 ].b.l)
-#define C2_G1 (gteRegs.CP2D.p[ 21 ].b.h)
-#define C2_B1 (gteRegs.CP2D.p[ 21 ].b.h2)
-#define C2_CD1 (gteRegs.CP2D.p[ 21 ].b.h3)
-#define C2_RGB2 (gteRegs.CP2D.p[ 22 ].d)
-#define C2_R2 (gteRegs.CP2D.p[ 22 ].b.l)
-#define C2_G2 (gteRegs.CP2D.p[ 22 ].b.h)
-#define C2_B2 (gteRegs.CP2D.p[ 22 ].b.h2)
-#define C2_CD2 (gteRegs.CP2D.p[ 22 ].b.h3)
-#define C2_RES1 (gteRegs.CP2D.p[ 23 ].d)
-#define C2_MAC0 (gteRegs.CP2D.p[ 24 ].sd)
-#define C2_MAC1 (gteRegs.CP2D.p[ 25 ].sd)
-#define C2_MAC2 (gteRegs.CP2D.p[ 26 ].sd)
-#define C2_MAC3 (gteRegs.CP2D.p[ 27 ].sd)
-#define C2_IRGB (gteRegs.CP2D.p[ 28 ].d)
-#define C2_ORGB (gteRegs.CP2D.p[ 29 ].d)
-#define C2_LZCS (gteRegs.CP2D.p[ 30 ].d)
-#define C2_LZCR (gteRegs.CP2D.p[ 31 ].d)
-
-/* Control Registers ctc2 cfc2*/
-
-#define C2_R11 (gteRegs.CP2C.p[ 0 ].sw.l)
-#define C2_R12 (gteRegs.CP2C.p[ 0 ].sw.h)
-#define C2_R13 (gteRegs.CP2C.p[ 1 ].sw.l)
-#define C2_R21 (gteRegs.CP2C.p[ 1 ].sw.h)
-#define C2_R22 (gteRegs.CP2C.p[ 2 ].sw.l)
-#define C2_R23 (gteRegs.CP2C.p[ 2 ].sw.h)
-#define C2_R31 (gteRegs.CP2C.p[ 3 ].sw.l)
-#define C2_R32 (gteRegs.CP2C.p[ 3 ].sw.h)
-#define C2_R33 (gteRegs.CP2C.p[ 4 ].sw.l)
-#define C2_TRX (gteRegs.CP2C.p[ 5 ].sd)
-#define C2_TRY (gteRegs.CP2C.p[ 6 ].sd)
-#define C2_TRZ (gteRegs.CP2C.p[ 7 ].sd)
-#define C2_L11 (gteRegs.CP2C.p[ 8 ].sw.l)
-#define C2_L12 (gteRegs.CP2C.p[ 8 ].sw.h)
-#define C2_L13 (gteRegs.CP2C.p[ 9 ].sw.l)
-#define C2_L21 (gteRegs.CP2C.p[ 9 ].sw.h)
-#define C2_L22 (gteRegs.CP2C.p[ 10 ].sw.l)
-#define C2_L23 (gteRegs.CP2C.p[ 10 ].sw.h)
-#define C2_L31 (gteRegs.CP2C.p[ 11 ].sw.l)
-#define C2_L32 (gteRegs.CP2C.p[ 11 ].sw.h)
-#define C2_L33 (gteRegs.CP2C.p[ 12 ].sw.l)
-#define C2_RBK (gteRegs.CP2C.p[ 13 ].sd)
-#define C2_GBK (gteRegs.CP2C.p[ 14 ].sd)
-#define C2_BBK (gteRegs.CP2C.p[ 15 ].sd)
-#define C2_LR1 (gteRegs.CP2C.p[ 16 ].sw.l)
-#define C2_LR2 (gteRegs.CP2C.p[ 16 ].sw.h)
-#define C2_LR3 (gteRegs.CP2C.p[ 17 ].sw.l)
-#define C2_LG1 (gteRegs.CP2C.p[ 17 ].sw.h)
-#define C2_LG2 (gteRegs.CP2C.p[ 18 ].sw.l)
-#define C2_LG3 (gteRegs.CP2C.p[ 18 ].sw.h)
-#define C2_LB1 (gteRegs.CP2C.p[ 19 ].sw.l)
-#define C2_LB2 (gteRegs.CP2C.p[ 19 ].sw.h)
-#define C2_LB3 (gteRegs.CP2C.p[ 20 ].sw.l)
-#define C2_RFC (gteRegs.CP2C.p[ 21 ].sd)
-#define C2_GFC (gteRegs.CP2C.p[ 22 ].sd)
-#define C2_BFC (gteRegs.CP2C.p[ 23 ].sd)
-#define C2_OFX (gteRegs.CP2C.p[ 24 ].sd)
-#define C2_OFY (gteRegs.CP2C.p[ 25 ].sd)
-#define C2_H (gteRegs.CP2C.p[ 26 ].sw.l)
-#define C2_DQA (gteRegs.CP2C.p[ 27 ].sw.l)
-#define C2_DQB (gteRegs.CP2C.p[ 28 ].sd)
-#define C2_ZSF3 (gteRegs.CP2C.p[ 29 ].sw.l)
-#define C2_ZSF4 (gteRegs.CP2C.p[ 30 ].sw.l)
-#define C2_FLAG (gteRegs.CP2C.p[ 31 ].d)
-
-#endif
\ No newline at end of file
diff --git a/rebuild_PC/PsyCross/include/psx/inline_c.h b/rebuild_PC/PsyCross/include/psx/inline_c.h
deleted file mode 100644
index 4f1835ba8..000000000
--- a/rebuild_PC/PsyCross/include/psx/inline_c.h
+++ /dev/null
@@ -1,719 +0,0 @@
-#ifndef INLINE_C_H
-#define INLINE_C_H
-
-#if defined(_LANGUAGE_C_PLUS_PLUS)||defined(__cplusplus)||defined(c_plusplus)
-extern "C" {
-#endif
-
-/* Psy-X specific calls */
-
-/* sets cop2 data register value. LWC2 is the same kind*/
-extern void MTC2(unsigned int value, int reg);
-extern void MTC2_S(int value, int reg);
-
-/* sets cop2 control register value */
-extern void CTC2(unsigned int value, int reg);
-extern void CTC2_S(int value, int reg);
-
-/* returns cop2 register value. SWC2 is the same kind */
-extern unsigned int MFC2(int reg);
-extern int MFC2_S(int reg);
-
-/* returns cop2 control register value */
-extern unsigned int CFC2(int reg);
-extern int CFC2_S(int reg);
-
-/* performs cop2 opcode */
-extern int doCOP2(int op);
-
-#if defined(_LANGUAGE_C_PLUS_PLUS)||defined(__cplusplus)||defined(c_plusplus)
-}
-#endif
-
-/*
- * Type 1 functions
- */
-
- // ctc2 21-23
-#define gte_ldfc( r0 ) \
- { CTC2(*(uint*)((char*)(r0)+0), 21);\
- CTC2(*(uint*)((char*)(r0)+4), 22);\
- CTC2(*(uint*)((char*)(r0)+8), 23);}
-
-// mtc2 0-1
-#define gte_ldv0( r0 )\
- { MTC2(*(uint*)((char*)(r0)+0), 0);\
- MTC2(*(uint*)((char*)(r0)+4), 1);}
-
-// mtc2 2-3
-#define gte_ldv1( r0 )\
- { MTC2(*(uint*)((char*)(r0)+0), 2);\
- MTC2(*(uint*)((char*)(r0)+4), 3);}
-
-// mtc2 4-5
-#define gte_ldv2( r0 )\
- { MTC2(*(uint*)((char*)(r0)+0), 4);\
- MTC2(*(uint*)((char*)(r0)+4), 5);}
-
-// mtc2 0-5
-#define gte_ldv3( r0, r1, r2 ) \
- { MTC2(*(uint*)((char*)(r0)+0), 0);\
- MTC2(*(uint*)((char*)(r0)+4), 1);\
- MTC2(*(uint*)((char*)(r1)+0), 2);\
- MTC2(*(uint*)((char*)(r1)+4), 3);\
- MTC2(*(uint*)((char*)(r2)+0), 4);\
- MTC2(*(uint*)((char*)(r2)+4), 5);}
-
-// load mtc2 9,10,11
-#define gte_ldclmv( r0 ) \
- { MTC2(*(ushort*)((char*)(r0)), 9); \
- MTC2(*(ushort*)((char*)(r0)+6), 10); \
- MTC2(*(ushort*)((char*)(r0)+12), 11); }
-
-// lwc2 9-11
-#define gte_ldlvl( r0 ) \
- { MTC2(*(uint*)((char*)(r0)), 9); \
- MTC2(*(uint*)((char*)(r0)+4), 10);\
- MTC2(*(uint*)((char*)(r0)+8), 11);}
-
-// mtc2 9,10,11
-#define gte_ldsv( r0 ) \
- { MTC2(*(ushort*)((char*)(r0)), 9);\
- MTC2(*(ushort*)((char*)(r0)+2), 10);\
- MTC2(*(ushort*)((char*)(r0)+4), 11); }
-
-// mtc2 9,10
-#define gte_ldbv( r0 ) \
- { MTC2(*((char*)(r0)), 9);\
- MTC2(*((char*)(r0)+1), 10); }
-
-// mtc2 9,10,11
-#define gte_ldcv( r0 ) \
- { MTC2(*((char*)(r0)), 9);\
- MTC2(*((char*)(r0)+1), 10);\
- MTC2(*((char*)(r0)+2), 11); }
-
-// lwc2 6
-#define gte_ldrgb( r0 ) \
- { MTC2(*(uint*)((char*)(r0)), 6); }
-
-// lwc2 6,20,21,22
-#define gte_ldrgb3( r0, r1, r2 ) \
- { MTC2(*(uint*)((char*)(r0)), 20); \
- MTC2(*(uint*)((char*)(r1)), 21); \
- MTC2(*(uint*)((char*)(r2)), 22); \
- MTC2(*(uint*)((char*)(r2)), 6); }
-
-// mtc2 0, lwc2 1
-#define gte_ldlv0( r0 ) \
- { MTC2((*(ushort*)((char*)(r0)+4) << 16) | *(ushort*)((char*)(r0)));\
- MTC2(*(ushort*)((char*)(r0)+8) << 16); }
-
-// mtc2 8
-#define gte_lddp( r0 ) \
- { MTC2(*(uint*)(r0), 8); }
-
-// ctc2 13 14 15
-#define gte_ldbkdir( r0, r1, r2 ) \
- { CTC2(r0, 13); \
- CTC2(r1, 14); \
- CTC2(r2, 15); }
-
-// mtc2 12,13,14
-#define gte_ldsxy3( r0, r1, r2 )\
- { MTC2(*(uint*)(r0), 12); \
- MTC2(*(uint*)(r2), 14); \
- MTC2(*(uint*)(r1), 13); }
-
-// mtc2 12,13,14
-#define gte_ldsxy3c( r0 ) \
- { MTC2(*(uint*)((char*)(r0)+0), 12 ); \
- MTC2(*(uint*)((char*)(r0)+4), 13 ); \
- MTC2(*(uint*)((char*)(r0)+8), 14 ); }
-
-// mtc2 17,18,19
-#define gte_ldsz3( r0, r1, r2 ) \
- { MTC2(*(uint*)((char*)(r0)), 17 ); \
- MTC2(*(uint*)((char*)(r1)), 18 ); \
- MTC2(*(uint*)((char*)(r2)), 19 ); }
-
-// mtc2 16,17,18,19
-#define gte_ldsz4( r0, r1, r2, r3 ) \
- { MTC2(*(uint*)((char*)(r0)), 16 ); \
- MTC2(*(uint*)((char*)(r1)), 17 ); \
- MTC2(*(uint*)((char*)(r2)), 18 ); \
- MTC2(*(uint*)((char*)(r3)), 19 ); }
-
-// ctc2 0,2,4
-#define gte_ldopv1( r0 ) \
- { CTC2(*(uint*)((char*)(r0)), 0);\
- CTC2(*(uint*)((char*)(r0)+4), 2);\
- CTC2(*(uint*)((char*)(r0 +8), 4);}
-
-// lwc2 9,10,11
-#define gte_ldopv2( r0 ) \
- { MTC2(*(uint*)((char*)(r0)), 9);\
- MTC2(*(uint*)((char*)(r0)+4), 10);\
- MTC2(*(uint*)((char*)(r0)+8), 11);}
-
-// ctc2 26
-#define gte_SetGeomScreen( r0 ) \
- { CTC2(r0, 26); }
-
-// ctc2 24,25
-#define gte_SetGeomOffset( r0, r1 )\
- { CTC2(r0 << 16, 24); \
- CTC2(r1 << 16, 25);}
-
-// ctc2 13,14,15
-#define gte_SetBackColor( r0, r1, r2 ) \
- { CTC2(r0 << 4, 13); \
- CTC2(r1 << 4, 14); \
- CTC2(r2 << 4, 15); }
-
-
-// ctc2 21, 22, 23
-#define gte_SetFarColor( r0, r1, r2 ) \
- { CTC2(r0 << 4, 21); \
- CTC2(r1 << 4, 22); \
- CTC2(r2 << 4, 23); }
-
- // load ctc2 8-11
-#define gte_SetLightMatrix( r0 ) \
- { CTC2(*(uint*)((char*)(r0)), 8);\
- CTC2(*(uint*)((char*)(r0)+4), 9);\
- CTC2(*(uint*)((char*)(r0)+8), 10);\
- CTC2(*(uint*)((char*)(r0)+12), 11);\
- CTC2(*(uint*)((char*)(r0)+16), 12);}
-
-// load ctc2 16-20
-#define gte_SetColorMatrix( r0 ) \
- { CTC2(*(uint*)((char*)(r0)), 16);\
- CTC2(*(uint*)((char*)(r0)+4), 17);\
- CTC2(*(uint*)((char*)(r0)+8), 18);\
- CTC2(*(uint*)((char*)(r0)+12), 19);\
- CTC2(*(uint*)((char*)(r0)+16), 20);}
-
-// load ctc2 0-4
-#define gte_SetRotMatrix( r0 ) \
- { CTC2(*(uint*)((char*)(r0)), 0);\
- CTC2(*(uint*)((char*)(r0)+4), 1);\
- CTC2(*(uint*)((char*)(r0)+8), 2);\
- CTC2(*(uint*)((char*)(r0)+12), 3);\
- CTC2(*(uint*)((char*)(r0)+16), 4);}
-
-// load ctc2 5-7
-#define gte_SetTransVector( r0 )\
- { CTC2_S(*(int*)((char*)(r0)+0), 5);\
- CTC2_S(*(int*)((char*)(r0)+4), 6);\
- CTC2_S(*(int*)((char*)(r0)+8), 7);}
-
-// load ctc2 5-7
-#define gte_SetTransMatrix( r0 ) \
- { CTC2(*(uint*)((char*)(r0)+20), 5);\
- CTC2(*(uint*)((char*)(r0)+24), 6);\
- CTC2(*(uint*)((char*)(r0)+28), 7);}
-
-// ctc2 8-12
-#define gte_SetLightMatrix( r0 )\
- { CTC2(*(uint*)((char*)(r0)), 8);\
- CTC2(*(uint*)((char*)(r0)+4), 9);\
- CTC2(*(uint*)((char*)(r0)+8), 10);\
- CTC2(*(uint*)((char*)(r0)+12), 11);\
- CTC2(*(uint*)((char*)(r0)+16), 12);}
-
-// ctc2 16-20
-#define gte_SetColorMatrix( r0 )\
- { CTC2(*(uint*)((char*)(r0)), 16);\
- CTC2(*(uint*)((char*)(r0)+4), 17);\
- CTC2(*(uint*)((char*)(r0)+8), 18);\
- CTC2(*(uint*)((char*)(r0)+12), 19);\
- CTC2(*(uint*)((char*)(r0)+16), 20);}
-
-// mtc2 9,10,11
-#define gte_ldopv2SV( r0 ) \
- { MTC2(*(ushort*)((char*)(r0)), 9);\
- MTC2(*(ushort*)((char*)(r0) + 2), 10);\
- MTC2(*(ushort*)((char*)(r0) + 4), 11);}
-
-// ctc2 0,2,4
-#define gte_ldopv1SV( r0 )\
- { CTC2(*(ushort*)((char*)(r0)), 0);\
- CTC2(*(ushort*)((char*)(r0) + 2), 2);\
- CTC2(*(ushort*)((char*)(r0) + 4), 4);}
-
-// mtc2 30
-#define gte_ldlzc( r0 ) \
- MTC2(*(uint*)((char*)(r0)), 30);
-
-/*
- * Type 2 functions
- */
-
- // FIXME: there is lack of some macros
- // please refer to official Psy-Q PSX SDK headers
- // and this: https://github.com/ogamespec/pops-gte/blob/master/docs/gte.txt
-
-#define gte_nop()
-
-#define gte_rtps() doCOP2(0x0180001);
-
-#define gte_rtpt() doCOP2(0x0280030);
-
-#define gte_rt() doCOP2(0x0480012);
-
-#define gte_rtv0() doCOP2(0x0486012);
-
-#define gte_rtv1() doCOP2(0x048E012);
-
-#define gte_rtv2() doCOP2(0x0496012);
-
-#define gte_rtir() doCOP2(0x049E012);
-
-#define gte_rtir_sf0() doCOP2(0x041E012);
-
-#define gte_rtv0tr() doCOP2(0x0480012);
-
-#define gte_rtv1tr() doCOP2(0x0488012);
-
-#define gte_rtv2tr() doCOP2(0x0490012);
-
-#define gte_rtirtr() op2 0x0498012);
-
-#define gte_rtv0bk() doCOP2(0x0482012);
-
-#define gte_rtv1bk() doCOP2(0x048A012);
-
-#define gte_rtv2bk() doCOP2(0x0492012);
-
-#define gte_rtirbk() doCOP2(0x049A012);
-
-#define gte_ll() doCOP2(0x04A6412);
-
-#define gte_llv0() doCOP2(0x04A6012);
-
-#define gte_llv1() doCOP2(0x04AE012);
-
-#define gte_llv2() doCOP2(0x04B6012);
-
-#define gte_llir() doCOP2(0x04BE012);
-
-#define gte_llv0tr() doCOP2(0x04A0012);
-
-#define gte_llv1tr() doCOP2(0x04A8012);
-
-#define gte_llv2tr() doCOP2(0x04B0012);
-
-#define gte_llirtr() doCOP2(0x04B8012);
-
-#define gte_llv0bk() doCOP2(0x04A2012);
-
-#define gte_llv1bk() doCOP2(0x4AA012);
-
-#define gte_llv2bk() doCOP2(0x04B2012);
-
-#define gte_llirbk() doCOP2(0x04BA012);
-
-#define gte_lc() doCOP2(0x04DA412);
-
-#define gte_lcv0() doCOP2(0x04C6012);
-
-#define gte_lcv1() doCOP2(0x04CE012);
-
-#define gte_lcv2() doCOP2(0x04D6012);
-
-#define gte_lcir() doCOP2(0x04DE012);
-
-#define gte_lcv0tr() doCOP2(0x04C0012);
-
-#define gte_lcv1tr() doCOP2(0x04C8012);
-
-#define gte_lcv2tr() doCOP2(0x04D0012);
-
-#define gte_lcirtr() doCOP2(0x04D8012);
-
-#define gte_lcv0bk() doCOP2(0x04C2012);
-
-#define gte_lcv1bk() doCOP2(0x04CA012);
-
-#define gte_lcv2bk() doCOP2(0x04D2012);
-
-#define gte_lcirbk() doCOP2(0x04DA012);
-
-#define gte_dpcl() doCOP2(0x0680029);
-
-#define gte_dpcs() doCOP2(0x0780010);
-
-#define gte_dpct() doCOP2(0x0F8002A);
-
-#define gte_intpl() doCOP2(0x0980011);
-
-#define gte_sqr12() doCOP2(0x0A80428);
-
-#define gte_sqr0() doCOP2(0x0A00428);
-
-#define gte_ncs() doCOP2(0x0C8041E);
-
-#define gte_nct() doCOP2(0x0D80420);
-
-#define gte_ncds() doCOP2(0x0E80413);
-
-#define gte_ncdt() doCOP2(0x0F80416);
-
-#define gte_nccs() doCOP2(0x0108041B);
-
-#define gte_ncct() doCOP2(0x0118043F);
-
-#define gte_cdp() doCOP2(0x01280414);
-
-#define gte_cc() doCOP2(0x0138041C);
-
-#define gte_nclip() doCOP2(0x01400006);
-
-#define gte_avsz3() doCOP2(0x0158002D);
-
-#define gte_avsz4() doCOP2(0x0168002E);
-
-#define gte_op12() doCOP2(0x0178000C);
-
-#define gte_op0() doCOP2(0x0170000C);
-
-#define gte_gpf12() doCOP2(0x0198003D);
-
-#define gte_gpf0() doCOP2(0x0190003D);
-
-#define gte_gpl12() doCOP2(0x01A8003E);
-
-#define gte_gpl0() doCOP2(0x01A0003E0);
-
-#define gte_mvmva_core( r0 ) doCOP2(r0)
-
-#define gte_mvmva(sf,mx,v,cv,lm) gte_mvmva_core( 0x0400012 | \
- ((sf)<<19) | ((mx)<<17) | ((v)<<15) | ((cv)<<13) | ((lm)<<10) )
-
-
-/*
- * Type 2 functions without nop
- */
-
-
-#define gte_rtps_b() doCOP2(0x0180001);
-
-#define gte_rtpt_b() doCOP2(0x0280030);
-
-#define gte_rt_b() doCOP2(0x0480012);
-
-#define gte_rtv0_b() doCOP2(0x0486012);
-
-#define gte_rtv1_b() doCOP2(0x048E012);
-
-#define gte_rtv2_b() doCOP2(0x0496012);
-
-#define gte_rtir_b() doCOP2(0x049E012);
-
-#define gte_rtir_sf0_b() doCOP2(0x041E012);
-
-#define gte_rtv0tr_b() doCOP2(0x0480012);
-
-#define gte_rtv1tr_b() doCOP2(0x0488012);
-
-#define gte_rtv2tr_b() doCOP2(0x0490012);
-
-#define gte_rtirtr_b() doCOP2(0x0498012);
-
-#define gte_rtv0bk_b() doCOP2(0x0482012);
-
-#define gte_rtv1bk_b() doCOP2(0x048A012);
-
-#define gte_rtv2bk_b() doCOP2(0x0492012);
-
-#define gte_rtirbk_b() doCOP2(0x049A012);
-
-#define gte_ll_b() doCOP2(0x04A6412);
-
-#define gte_llv0_b() doCOP2(0x04A6012);
-
-#define gte_llv1_b() doCOP2(0x04AE012);
-
-#define gte_llv2_b() doCOP2(0x04B6012);
-
-#define gte_llir_b() doCOP2(0x04BE012);
-
-#define gte_llv0tr_b() doCOP2(0x04A0012);
-
-#define gte_llv1tr_b() doCOP2(0x04A8012);
-
-#define gte_llv2tr_b() doCOP2(0x04B0012);
-
-#define gte_llirtr_b() doCOP2(0x04B8012);
-
-#define gte_llv0bk_b() doCOP2(0x04A2012);
-
-#define gte_llv1bk_b() doCOP2(0x4AA012);
-
-#define gte_llv2bk_b() doCOP2(0x04B2012);
-
-#define gte_llirbk_b() doCOP2(0x04BA012);
-
-#define gte_lc_b() doCOP2(0x04DA412);
-
-#define gte_lcv0_b() doCOP2(0x04C6012);
-
-#define gte_lcv1_b() doCOP2(0x04CE012);
-
-#define gte_lcv2_b() doCOP2(0x04D6012);
-
-#define gte_lcir_b() doCOP2(0x04DE012);
-
-#define gte_lcv0tr_b() doCOP2(0x04C0012);
-
-#define gte_lcv1tr_b() doCOP2(0x04C8012);
-
-#define gte_lcv2tr_b() doCOP2(0x04D0012);
-
-#define gte_lcirtr_b() doCOP2(0x04D8012);
-
-#define gte_lcv0bk_b() doCOP2(0x04C2012);
-
-#define gte_lcv1bk_b() doCOP2(0x04CA012);
-
-#define gte_lcv2bk_b() doCOP2(0x04D2012);
-
-#define gte_lcirbk_b() doCOP2(0x04DA012);
-
-#define gte_dpcl_b() doCOP2(0x0680029);
-
-#define gte_dpcs_b() doCOP2(0x0780010);
-
-#define gte_dpct_b() doCOP2(0x0F8002A);
-
-#define gte_intpl_b() doCOP2(0x0980011);
-
-#define gte_sqr12_b() doCOP2(0x0A80428);
-
-#define gte_sqr0_b() doCOP2(0x0A00428);
-
-#define gte_ncs_b() doCOP2(0x0C8041E);
-
-#define gte_nct_b() doCOP2(0x0D80420);
-
-#define gte_ncds_b() doCOP2(0x0E80413);
-
-#define gte_ncdt_b() doCOP2(0x0F80416);
-
-#define gte_nccs_b() doCOP2(0x0108041B);
-
-#define gte_ncct_b() doCOP2(0x0118043F);
-
-#define gte_cdp_b() doCOP2(0x01280414);
-
-#define gte_cc_b() doCOP2(0x0138041C);
-
-#define gte_nclip_b() doCOP2(0x01400006);
-
-#define gte_avsz3_b() doCOP2(0x0158002D);
-
-#define gte_avsz4_b() doCOP2(0x0168002E);
-
-#define gte_op12_b() doCOP2(0x0178000C);
-
-#define gte_op0_b() doCOP2(0x0170000C);
-
-#define gte_gpf12_b() doCOP2(0x0198003D);
-
-#define gte_gpf0_b() doCOP2(0x0190003D);
-
-#define gte_gpl12_b() doCOP2(0x01A8003E);
-
-#define gte_gpl0_b() doCOP2(0x01A0003E0);
-
-#define gte_mvmva_core_b( r0 ) doCOP2(r0)
-
-#define gte_mvmva_b(sf,mx,v,cv,lm) gte_mvmva_core_b( 0x0400012 | \
- ((sf)<<19) | ((mx)<<17) | ((v)<<15) | ((cv)<<13) | ((lm)<<10) )
-
-
- /*
- * Type 3 functions
- */
-
-// store mfc2 9,10,11
-#define gte_stclmv( r0 ) \
- { *(ushort*)((char*)(r0)) = MFC2(9) & 0xFFFF; \
- *(ushort*)((char*)(r0)+6) = MFC2(10) & 0xFFFF; \
- *(ushort*)((char*)(r0)+12) = MFC2(11) & 0xFFFF;}
-
-#if USE_PGXP
-
-// swc2 14
-#define gte_stsxy( r0 ) \
- {*(uint*)((char*)(r0)) = *(uint*)&g_FP_SXYZ2.x;}
-
-// mfc2 12-14
-#define gte_stsxy3( r0, r1, r2 ) \
- { *(uint*)((char*)(r0)) = *(uint*)&g_FP_SXYZ0.x;\
- *(uint*)((char*)(r1)) = *(uint*)&g_FP_SXYZ1.x;\
- *(uint*)((char*)(r2)) = *(uint*)&g_FP_SXYZ2.x;}
-
-// swc2 14
-#define gte_stsxy2( r0 ) gte_stsxy(r0)
-
-// swc2 13
-#define gte_stsxy1( r0 ) \
- { *(uint*)((char*)(r0)) = *(uint*)&g_FP_SXYZ1.x;}
-
-// swc2 12
-#define gte_stsxy0( r0 ) \
- { *(uint*)((char*)(r0)) = *(uint*)&g_FP_SXYZ0.x;}
-
-#else
-
-// swc2 14
-#define gte_stsxy( r0 ) \
- { *(uint*)((char*)(r0)) = MFC2(14);}
-
-// mfc2 12-14
-#define gte_stsxy3( r0, r1, r2 ) \
- { *(uint*)((char*)(r0)) = MFC2(12);\
- *(uint*)((char*)(r1)) = MFC2(13);\
- *(uint*)((char*)(r2)) = MFC2(14);}
-
-// swc2 14
-#define gte_stsxy2( r0 ) gte_stsxy(r0)
-
-// swc2 13
-#define gte_stsxy1( r0 ) \
- { *(uint*)((char*)(r0)) = MFC2(13);}
-
-// swc2 12
-#define gte_stsxy0( r0 ) \
- { *(uint*)((char*)(r0)) = MFC2(12);}
-
-#endif // USE_PGXP
-
-// swc2 8
-#define gte_stdp( r0 ) \
- { *(uint*)((char*)(r0)) = MFC2(8);}
-
-// cfc2 31
-#define gte_stflg( r0 ) \
- { *(uint*)((char*)(r0)) = CFC2(31);}
-
-// swc2 7
-#define gte_stotz( r0 ) \
- { *(uint*)((char*)(r0)) = MFC2(7);}
-
-// mfc2 19
-#define gte_stszotz( r0 ) \
- { *(uint*)((char*)(r0)) = MFC2(19) >> 2;}
-
-// swc2 24
-#define gte_stopz( r0 ) \
- { *(uint*)((char*)(r0)) = MFC2(24);}
-
-// swc2 19
-#define gte_stsz( r0 ) \
- { *(uint*)((char*)(r0)) = MFC2(19);}
-
-// swc2 9-11
-#define gte_stlvl( r0 ) \
- { *(uint*)((char*)(r0)) = MFC2(9); \
- *(uint*)((char*)(r0)+4) = MFC2(10);\
- *(uint*)((char*)(r0)+8) = MFC2(11);}
-
-// mfc2 9, 10, 11
-#define gte_stsv( r0 ) \
- { *(ushort*)((char*)(r0)) = MFC2(9) & 0xFFFF; \
- *(ushort*)((char*)(r0)+2) = MFC2(10) & 0xFFFF;\
- *(ushort*)((char*)(r0)+4) = MFC2(11) & 0xFFFF;}
-
-// mfc2 9,10
-#define gte_stbv( r0 ) \
- { *((char*)(r0)) = MFC2(9) & 0xFF; \
- *((char*)(r0)+1) = MFC2(10) & 0xFF;}
-
-// mfc2 9,10,11
-#define gte_stcv( r0 ) \
- { *((char*)(r0)) = MFC2(9) & 0xFF; \
- *((char*)(r0)+1) = MFC2(10) & 0xFF;\
- *((char*)(r0)+2) = MFC2(11) & 0xFF;}
-
-// swc2 17,18,19
-#define gte_stsz3( r0, r1, r2 ) \
- { *(uint*)((char*)(r0)) = MFC2(17);\
- *(uint*)((char*)(r1)) = MFC2(18);\
- *(uint*)((char*)(r2)) = MFC2(19);}
-
-// swc2 25,26,27
-#define gte_stlvnl( r0 ) \
- { *(uint*)((char*)(r0)+0) = MFC2(25);\
- *(uint*)((char*)(r0)+4) = MFC2(26);\
- *(uint*)((char*)(r0)+8) = MFC2(27);}
-
-// ctc2 5,6,7
-#define gte_ldtr( r0, r1, r2 ) \
- { CTC2(r0, 5);\
- CTC2(r1, 6);\
- CTC2(r2, 7);}
-
-// cfc2 5,6,7
-#define gte_sttr( r0 ) \
- { *(uint*)((char*)(r0)+0) = CFC2(5);\
- *(uint*)((char*)(r0)+4) = CFC2(6);\
- *(uint*)((char*)(r0)+8) = CFC2(7);}
-
-// swc2 22
-#define gte_strgb( r0 )\
- { *(uint*)((char*)(r0)) = MFC2(22);}
-
-// swc2 20 21 22
-#define gte_strgb3( r0, r1, r2 )\
- { *(uint*)((char*)(r0)) = MFC2(20);\
- *(uint*)((char*)(r1)) = MFC2(21);\
- *(uint*)((char*)(r2)) = MFC2(22);}
-
-
-// store cfc2 0-7
-#define gte_ReadRotMatrix( r0 ) \
- { *(uint*)((char*)(r0)) = CFC2(0); \
- *(uint*)((char*)(r0)+4) = CFC2(1); \
- *(uint*)((char*)(r0)+8) = CFC2(2); \
- *(uint*)((char*)(r0)+12) = CFC2(3); \
- *(uint*)((char*)(r0)+16) = CFC2(4); \
- *(uint*)((char*)(r0)+20) = CFC2(5); \
- *(uint*)((char*)(r0)+24) = CFC2(6); \
- *(uint*)((char*)(r0)+28) = CFC2(7);}
-
-// cfc2 16-23
-#define gte_ReadColorMatrix( r0 ) \
- { *(uint*)((char*)(r0)) = CFC2(16); \
- *(uint*)((char*)(r0)+4) = CFC2(17); \
- *(uint*)((char*)(r0)+8) = CFC2(18); \
- *(uint*)((char*)(r0)+12) = CFC2(19); \
- *(uint*)((char*)(r0)+16) = CFC2(20); \
- *(uint*)((char*)(r0)+20) = CFC2(21); \
- *(uint*)((char*)(r0)+24) = CFC2(22); \
- *(uint*)((char*)(r0)+28) = CFC2(23);}
-
-// cfc2 8-15
-#define gte_ReadLightMatrix( r0 ) \
- { *(uint*)((char*)(r0)) = CFC2(8); \
- *(uint*)((char*)(r0)+4) = CFC2(9); \
- *(uint*)((char*)(r0)+8) = CFC2(10); \
- *(uint*)((char*)(r0)+12) = CFC2(11); \
- *(uint*)((char*)(r0)+16) = CFC2(12); \
- *(uint*)((char*)(r0)+20) = CFC2(13); \
- *(uint*)((char*)(r0)+24) = CFC2(14); \
- *(uint*)((char*)(r0)+28) = CFC2(15);}
-
-// swc2 31
-#define gte_stlzc( r0 ) \
- *(ushort*)((char*)(r0)) = MFC2(31);
-
-// cfc2 21,22,23
-#define gte_stfc( r0 )\
- { *(uint*)((char*)(r0)+0) = CFC2(21);\
- *(uint*)((char*)(r0)+4) = CFC2(22);\
- *(uint*)((char*)(r0)+8) = CFC2(23);}
-
-#endif
\ No newline at end of file
diff --git a/rebuild_PC/PsyCross/include/psx/kernel.h b/rebuild_PC/PsyCross/include/psx/kernel.h
deleted file mode 100644
index e841d7c54..000000000
--- a/rebuild_PC/PsyCross/include/psx/kernel.h
+++ /dev/null
@@ -1,157 +0,0 @@
-#ifndef KERNEL_H
-#define KERNEL_H
-
-#ifndef R3000_H
-#include "r3000.h"
-#endif
-
-#ifndef ASM_H
-#include "asm.h"
-#endif
-
-#define DescMask 0xff000000
-#define DescTH DescMask
-#define DescHW 0xf0000000
-#define DescEV 0xf1000000
-#define DescRC 0xf2000000
-#define DescUEV 0xf3000000
-#define DescSW 0xf4000000
-
-#define HwVBLANK (DescHW|0x01)
-#define HwGPU (DescHW|0x02)
-#define HwCdRom (DescHW|0x03)
-#define HwDMAC (DescHW|0x04)
-#define HwRTC0 (DescHW|0x05)
-#define HwRTC1 (DescHW|0x06)
-#define HwRTC2 (DescHW|0x07)
-#define HwCNTL (DescHW|0x08)
-#define HwSPU (DescHW|0x09)
-#define HwPIO (DescHW|0x0a)
-#define HwSIO (DescHW|0x0b)
-
-#define HwCPU (DescHW|0x10)
-#define HwCARD (DescHW|0x11)
-#define HwCARD_0 (DescHW|0x12)
-#define HwCARD_1 (DescHW|0x13)
-#define SwCARD (DescSW|0x01)
-#define SwMATH (DescSW|0x02)
-
-#define RCntCNT0 (DescRC|0x00)
-#define RCntCNT1 (DescRC|0x01)
-#define RCntCNT2 (DescRC|0x02)
-#define RCntCNT3 (DescRC|0x03)
-
-#define RCntMdINTR 0x1000
-#define RCntMdNOINTR 0x2000
-#define RCntMdSC 0x0001
-#define RCntMdSP 0x0000
-#define RCntMdFR 0x0000
-#define RCntMdGATE 0x0010
-
-#define EvSpCZ 0x0001 /* counter becomes zero */
-#define EvSpINT 0x0002 /* interrupted */
-#define EvSpIOE 0x0004 /* end of i/o */
-#define EvSpCLOSE 0x0008 /* file was closed */
-#define EvSpACK 0x0010 /* command acknowledged */
-#define EvSpCOMP 0x0020 /* command completed */
-#define EvSpDR 0x0040 /* data ready */
-#define EvSpDE 0x0080 /* data end */
-#define EvSpTIMOUT 0x0100 /* time out */
-#define EvSpUNKNOWN 0x0200 /* unknown command */
-#define EvSpIOER 0x0400 /* end of read buffer */
-#define EvSpIOEW 0x0800 /* end of write buffer */
-#define EvSpTRAP 0x1000 /* general interrupt */
-#define EvSpNEW 0x2000 /* new device */
-#define EvSpSYSCALL 0x4000 /* system call instruction */
-#define EvSpERROR 0x8000 /* error happned */
-#define EvSpPERROR 0x8001 /* previous write error happned */
-#define EvSpEDOM 0x0301 /* domain error in libmath */
-#define EvSpERANGE 0x0302 /* range error in libmath */
-
-#define EvMdINTR 0x1000
-#define EvMdNOINTR 0x2000
-
-#define EvStUNUSED 0x0000
-#define EvStWAIT 0x1000
-#define EvStACTIVE 0x2000
-#define EvStALREADY 0x4000
-
-#define TcbMdRT 0x1000 /* reserved by system */
-#define TcbMdPRI 0x2000 /* reserved by system */
-
-#define TcbStUNUSED 0x1000
-#define TcbStACTIVE 0x4000
-
-struct ToT {
- unsigned long *head;
- long size;
-};
-
-struct TCBH {
- struct TCB *entry; /* NULL */
- long flag;
-};
-
-struct TCB {
- long status;
- long mode;
- unsigned long reg[NREGS]; /* never change the offset of this */
- long system[6]; /* reserved by system */
-};
-
-struct EvCB {
- unsigned long desc;
- long status;
- long spec;
- long mode;
- long (*FHandler)();
- long system[2]; /* reserved by system */
-};
-
-//#if !defined(D3D9)
-#if 0///@FIXME Really not defined D3D9 :/
-struct EXEC {
- unsigned long pc0;
- unsigned long gp0;
- unsigned long t_addr;
- unsigned long t_size;
- unsigned long d_addr;
- unsigned long d_size;
- unsigned long b_addr;
- unsigned long b_size;
- unsigned long s_addr;
- unsigned long s_size;
- unsigned long sp,fp,gp,ret,base;
-};
-
-
-struct XF_HDR {
- char key[8];
- unsigned long text;
- unsigned long data;
- struct EXEC exec;
- char title[60]; /* "PlayStation(tm) Executable A1" */
-};
-#endif
-
-struct DIRENTRY {
- char name[20];
- long attr;
- long size;
- struct DIRENTRY *next;
- long head;
- char system[4];
-};
-
-
-extern struct ToT SysToT[32];
-
-extern long SysClearRCnt[];
-
-#ifndef NULL
-#define NULL (0)
-#endif
-
-#endif /* _KERNEL_H */
-
-
diff --git a/rebuild_PC/PsyCross/include/psx/libapi.h b/rebuild_PC/PsyCross/include/psx/libapi.h
deleted file mode 100644
index cf5924a41..000000000
--- a/rebuild_PC/PsyCross/include/psx/libapi.h
+++ /dev/null
@@ -1,116 +0,0 @@
-#ifndef LIBAPI_H
-#define LIBAPI_H
-
-#ifndef KERNEL_H
-#include "kernel.h"
-#endif
-
-#if defined(_LANGUAGE_C_PLUS_PLUS)||defined(__cplusplus)||defined(c_plusplus)
-extern "C" {
-#endif
-
-extern long SetRCnt(long spec, unsigned short target, long mode);
-extern long GetRCnt(long spec);
-extern long ResetRCnt(long spec);
-extern long StartRCnt(long spec);
-extern long StopRCnt(long spec);
-
-extern long OpenEvent(unsigned long desc,long spec,long mode,long(*func)());
-extern long CloseEvent(unsigned long event);
-extern long WaitEvent(unsigned long event);
-extern long TestEvent(unsigned long event);
-extern long EnableEvent(unsigned long event);
-extern long DisableEvent(unsigned long event);
-extern void DeliverEvent(unsigned long ev1, long ev2);
-extern void UnDeliverEvent(unsigned long ev1, long ev2);
-
-extern long OpenTh(long (*func)(), unsigned long , unsigned long);
-extern int CloseTh(long unk00);
-extern int ChangeTh(long unk00);
-
-/*
-extern long open(char* unk00, unsigned long);
-extern long close(long unk00);
-extern long lseek(long unk00, long, long);
-extern long read(long unk00, void *, long);
-extern long write(long unk00, void *, long);
-extern long ioctl(long unk00, long, long);
-
-extern struct DIRENTRY* firstfile(char* unk00, struct DIRENTRY *);
-extern struct DIRENTRY* nextfile(struct DIRENTRY* unk00);
-
-extern long erase(char* unk00);
-extern long undelete(char* unk00);
-extern long format(char* unk00);
-extern long rename(char* unk00, char *);
-extern long cd(char* unk00);
-*/
-
-extern long LoadTest(char* unk00, struct EXEC *);
-extern long Load(char * unk00, struct EXEC *);
-extern long Exec(struct EXEC * unk00, long, char **);
-extern long LoadExec(char * unk00, unsigned long, unsigned long);
-
-extern long InitPAD(char * unk00,long ,char *,long);
-extern long StartPAD();
-extern void StopPAD();
-extern void EnablePAD();
-extern void DisablePAD();
-
-extern void FlushCache();
-extern void ReturnFromException();
-extern int EnterCriticalSection();
-extern void ExitCriticalSection();
-extern void Exception();
-extern void SwEnterCriticalSection();
-extern void SwExitCriticalSection();
-
-extern unsigned long SetSp(unsigned long newsp);
-extern unsigned long GetSp();
-extern unsigned long GetGp();
-extern unsigned long GetCr();
-extern unsigned long GetSr();
-extern unsigned long GetSysSp();
-
-extern long SetConf(unsigned long,unsigned long,unsigned long);
-extern void GetConf(unsigned long *,unsigned long *,unsigned long *);
-
-/*
-extern long _get_errno(void);
-extern long _get_error(long);
-*/
-extern void SystemError( char, long);
-extern void SetMem(long);
-
-extern long Krom2RawAdd( unsigned long );
-extern long Krom2RawAdd2(unsigned short);
-
-extern void _96_init(void);
-extern void _96_remove(void);
-extern void _boot(void);
-
-extern void ChangeClearPAD( long );
-
-/* prototypes added by shino 96/05/22 */
-extern void InitCARD(long val);
-extern long StartCARD();
-extern long StopCARD();
-extern void _bu_init();
-extern long _card_info(long chan);
-extern long _card_clear(long chan);
-extern long _card_load(long chan);
-extern long _card_auto(long val);
-extern void _new_card();
-extern long _card_status(long drv);
-extern long _card_wait(long drv);
-extern unsigned long _card_chan(void);
-extern long _card_write(long chan, long block, unsigned char *buf);
-extern long _card_read(long chan, long block, unsigned char *buf);
-extern long _card_format(long chan);
-
-#if defined(_LANGUAGE_C_PLUS_PLUS)||defined(__cplusplus)||defined(c_plusplus)
-}
-#endif
-
-
-#endif
diff --git a/rebuild_PC/PsyCross/include/psx/libcd.h b/rebuild_PC/PsyCross/include/psx/libcd.h
deleted file mode 100644
index 4c426a27b..000000000
--- a/rebuild_PC/PsyCross/include/psx/libcd.h
+++ /dev/null
@@ -1,262 +0,0 @@
-#ifndef LIBCD_H
-#define LIBCD_H
-
-#include "types.h"
-
-#define DECODE_BCD(x) (((x) >> 4) * 10 + ((x) & 0xF))
-#define ENCODE_BCD(x) ((((x) / 10) << 4) | ((x) % 10))
-
-#define CdlModeStream 0x100 /* Normal Streaming */
-#define CdlModeStream2 0x120 /* SUB HEADER information includes */
-#define CdlModeSpeed 0x80 /* 0: normal speed 1: double speed */
-#define CdlModeRT 0x40 /* 0: ADPCM off 1: ADPCM on */
-#define CdlModeSize1 0x20 /* 0: 2048 byte 1: 2340byte */
-#define CdlModeSize0 0x10 /* 0: - 1: 2328byte */
-#define CdlModeSF 0x08 /* 0: Channel off 1: Channel on */
-#define CdlModeRept 0x04 /* 0: Report off 1: Report on */
-#define CdlModeAP 0x02 /* 0: AutoPause off 1: AutoPause on */
-#define CdlModeDA 0x01 /* 0: CD-DA off 1: CD-DA on */
-
-/*
- * Status Contents
- */
-#define CdlStatPlay 0x80 /* playing CD-DA */
-#define CdlStatSeek 0x40 /* seeking */
-#define CdlStatRead 0x20 /* reading data sectors */
-#define CdlStatShellOpen 0x10 /* once shell open */
-#define CdlStatSeekError 0x04 /* seek error detected */
-#define CdlStatStandby 0x02 /* spindle motor rotating */
-#define CdlStatError 0x01 /* command error detected */
-
-/*
- * Macros for CdGetDiskType()
- */
-#define CdlStatNoDisk 0
-#define CdlOtherFormat 1
-#define CdlCdromFormat 2
-
-/*
- * CD-ROM Primitive Commands
- */
-#define CdlNop 0x01
-#define CdlSetloc 0x02
-#define CdlPlay 0x03
-#define CdlForward 0x04
-#define CdlBackward 0x05
-#define CdlReadN 0x06
-#define CdlStandby 0x07
-#define CdlStop 0x08
-#define CdlPause 0x09
-#define CdlMute 0x0b
-#define CdlDemute 0x0c
-#define CdlSetfilter 0x0d
-#define CdlSetmode 0x0e
-#define CdlGetparam 0x0f
-#define CdlGetlocL 0x10
-#define CdlGetlocP 0x11
-#define CdlGetTN 0x13
-#define CdlGetTD 0x14
-#define CdlSeekL 0x15
-#define CdlSeekP 0x16
-#define CdlReadS 0x1B
-
-/*
- * Interrupts
- */
-#define CdlNoIntr 0x00 /* No interrupt */
-#define CdlDataReady 0x01 /* Data Ready */
-#define CdlComplete 0x02 /* Command Complete */
-#define CdlAcknowledge 0x03 /* Acknowledge (reserved) */
-#define CdlDataEnd 0x04 /* End of Data Detected */
-#define CdlDiskError 0x05 /* Error Detected */
-
-/*
- * Library Macros
- */
-#ifndef btoi
-#define btoi(b) ((b)/16*10 + (b)%16) /* BCD to u_char */
-#endif
-#ifndef itob
-#define itob(i) ((i)/10*16 + (i)%10) /* u_char to BCD */
-#endif
-
-#define CdSeekL(p) CdControl(CdlSeekL, (u_char *)p, 0)
-#define CdSeekP(p) CdControl(CdlSeekP, (u_char *)p, 0)
-#define CdStandby() CdControl(CdlStandby, 0, 0)
-#define CdPause() CdControl(CdlPause, 0, 0)
-#define CdStop() CdControl(CdlStop, 0, 0)
-#define CdMute() CdControl(CdlMute, 0, 0)
-#define CdDeMute() CdControl(CdlDemute, 0, 0)
-#define CdForward() CdControl(CdlForward, 0, 0)
-#define CdBackward() CdControl(CdlBackward, 0, 0)
-
-/*
- * Position
- */
-#define CdlMAXTOC 100
-
-/*
- * Callback
- */
-
-typedef void (*CdlCB)(u_char,u_char *);
-
-/*
- * Location
- */
-typedef struct {
- u_char minute; /* minute (BCD) */
- u_char second; /* second (BCD) */
- u_char sector; /* sector (BCD) */
- u_char track; /* track (void) */
-} CdlLOC;
-
-/*
- * ADPCM Filter
- */
-typedef struct {
- u_char file; /* file ID (always 1) */
- u_char chan; /* channel ID */
- u_short pad;
-} CdlFILTER;
-
-/*
- * Attenuator
- */
-typedef struct {
- u_char val0; /* volume for CD(L) -> SPU (L) */
- u_char val1; /* volume for CD(L) -> SPU (R) */
- u_char val2; /* volume for CD(R) -> SPU (L) */
- u_char val3; /* volume for CD(R) -> SPU (R) */
-} CdlATV;
-
-/*
- * Low Level File System for CdSearchFile()
- */
-#define CdlMAXFILE 64 /* max number of files in a diRECT16ory */
-#define CdlMAXDIR 128 /* max number of total diRECT16ories */
-#define CdlMAXLEVEL 8 /* max levels of diRECT16ories */
-
-typedef struct {
- CdlLOC pos; /* file location */
- u_long size; /* file size */
- char name[16]; /* file name (body) */
-} CdlFILE;
-
-
-/*#define MULTI_INTERRUPT */
-#ifndef MULTI_INTERRUPT
-#define pauseMULI()
-#define restartMULI()
-#endif
-
-/*
- * Streaming Structures
- */
-typedef struct {
- u_short id;
- u_short type;
- u_short secCount;
- u_short nSectors;
- u_long frameCount;
- u_long frameSize;
-
- u_short width;
- u_short height;
- u_long dummy1;
- u_long dummy2;
- CdlLOC loc;
-} StHEADER; /* CD-ROM STR structure */
-
-#define StFREE 0x0000
-#define StREWIND 0x0001
-#define StCOMPLETE 0x0002
-#define StBUSY 0x0003
-#define StLOCK 0x0004
-
-#define EDC 0
-#define SECTOR_SIZE (512) /* Sector Size (word) */
-#define HEADER_SIZE (8) /* Header Size (word) */
-
-#define StSTATUS 0x00
-#define StVER 0x00
-#define StTYPE 0x01
-#define StSECTOR_OFFSET 0x02
-#define StSECTOR_SIZE 0x03
-#define StFRAME_NO 0x04
-#define StFRAME_SIZE 0x06
-
-#define StMOVIE_WIDTH 0x08
-#define StMOVIE_HEIGHT 0x09
-
-
-#if defined(_LANGUAGE_C_PLUS_PLUS)||defined(__cplusplus)||defined(c_plusplus)
-extern "C" {
-#endif
-
-/* Initializes CD filesystem using ISO 9660 compliant file */
-extern void PsyX_CDFS_Init(const char* imageFileName, int track /*= 0*/, int sectorSize /*= 0*/);
-
-/* Initializes CD filesystem using ISO 9660 compliant stream */
-extern void PsyX_CDFS_Init_Mem(const u_long* data, int size, int track /*= 0*/, int sectorSize /*= 0*/);
-
-void StSetRing(u_long *ring_addr,u_long ring_size);
-void StClearRing(void);
-void StUnSetRing(void);
-void StSetStream(u_long mode,u_long start_frame,u_long end_frame,
- void (*func1)(),void (*func2)());
-void StSetEmulate(u_long *addr,u_long mode,u_long start_frame,
- u_long end_frame,void (*func1)(),void (*func2)());
-u_long StFreeRing(u_long *base);
-u_long StGetNext(u_long **addr,u_long **header);
-u_long StGetNextS(u_long **addr,u_long **header);
-u_short StNextStatus(u_long **addr,u_long **header);
-void StRingStatus(short *free_sectors,short *over_sectors);
-void StSetMask(u_long mask,u_long start,u_long end);
-void StCdInterrupt(void);
-int StGetBackloc(CdlLOC *loc);
-int StSetChannel(u_long channel);
-
-void CdFlush(void);
-CdlFILE *CdSearchFile(CdlFILE *fp, char *name);
-CdlLOC *CdIntToPos(int i, CdlLOC *p) ;
-char *CdComstr(u_char com);
-char *CdIntstr(u_char intr);
-int CdControl(u_char com, u_char *param, u_char *result);
-int CdControlB(u_char com, u_char *param, u_char *result);
-int CdControlF(u_char com, u_char *param);
-int CdGetSector(void *madr, int size);
-int CdGetSector2( void* madr, int size );
-int CdDataSync(int mode);
-int CdGetToc(CdlLOC *loc) ;
-int CdPlay(int mode, int *track, int offset);
-int CdMix(CdlATV *vol);
-int CdPosToInt(CdlLOC *p);
-int CdRead(int sectors, u_long *buf, int mode);
-int CdRead2(long mode);
-int CdReadFile(char *file, u_long *addr, int nbyte);
-int CdReadSync(int mode, u_char *result);
-int CdReady(int mode, u_char *result) ;
-int CdSetDebug(int level);
-int CdSync(int mode, u_char *result) ;
-void (*CdDataCallback(void (*func)()));
-CdlCB CdReadCallback(CdlCB func);
-CdlCB CdReadyCallback(CdlCB func);
-CdlCB CdSyncCallback(CdlCB func);
-int CdInit(void);
-int CdReset(int mode);
-int CdStatus(void);
-int CdLastCom(void);
-CdlLOC *CdLastPos(void);
-int CdMode(void);
-int CdDiskReady( int mode );
-int CdGetDiskType( void );
-struct EXEC *CdReadExec(char *file);
-void CdReadBreak( void );
-
-#if defined(_LANGUAGE_C_PLUS_PLUS)||defined(__cplusplus)||defined(c_plusplus)
-}
-#endif
-
-
-#endif
diff --git a/rebuild_PC/PsyCross/include/psx/libetc.h b/rebuild_PC/PsyCross/include/psx/libetc.h
deleted file mode 100644
index 38e1e4701..000000000
--- a/rebuild_PC/PsyCross/include/psx/libetc.h
+++ /dev/null
@@ -1,67 +0,0 @@
-#ifndef LIBETC_H
-#define LIBETC_H
-
-#include "types.h"
-
-extern int PadIdentifier;
-
-#define PADLup (1<<12)
-#define PADLdown (1<<14)
-#define PADLleft (1<<15)
-#define PADLright (1<<13)
-#define PADRup (1<< 4)
-#define PADRdown (1<< 6)
-#define PADRleft (1<< 7)
-#define PADRright (1<< 5)
-#define PADi (1<< 9)
-#define PADj (1<<10)
-#define PADk (1<< 8)
-#define PADl (1<< 3)
-#define PADm (1<< 1)
-#define PADn (1<< 2)
-#define PADo (1<< 0)
-#define PADh (1<<11)
-#define PADL1 PADn
-#define PADL2 PADo
-#define PADR1 PADl
-#define PADR2 PADm
-#define PADstart PADh
-#define PADselect PADk
-
-#define MOUSEleft (1<<3)
-#define MOUSEright (1<<2)
-
-#define _PAD(x,y) ((y)<<((x)<<4))
-
-#define getScratchAddr(offset) ((u_long *)(_scratchData+(offset)*4))
-
-#define MODE_NTSC 0
-#define MODE_PAL 1
-
-#if defined(_LANGUAGE_C_PLUS_PLUS)||defined(__cplusplus)||defined(c_plusplus)
-extern "C" {
-#endif
-extern char* _scratchData;
-
-extern int CheckCallback(void);
-extern void PadInit(int mode);
-extern int ResetCallback(void);
-extern int RestartCallback(void);
-extern int StopCallback(void);
-extern int VSync(int mode);
-extern int VSyncCallback(void (*f)(void)) ;
-extern long GetVideoMode (void);
-extern long SetVideoMode (long mode);
-extern u_long PadRead(int id);
-extern void PadStop(void);
-extern void(*vsync_callback)(void);
-
-#if defined(_LANGUAGE_C_PLUS_PLUS)||defined(__cplusplus)||defined(c_plusplus)
-}
-#endif
-
-
-
-#endif
-
-
diff --git a/rebuild_PC/PsyCross/include/psx/libgpu.h b/rebuild_PC/PsyCross/include/psx/libgpu.h
deleted file mode 100644
index 38eb94a0c..000000000
--- a/rebuild_PC/PsyCross/include/psx/libgpu.h
+++ /dev/null
@@ -1,887 +0,0 @@
-#ifndef LIBGPU_H
-#define LIBGPU_H
-
-#include "types.h"
-#include "PsyX/common/pgxp_defs.h"
-
-extern int (*GPU_printf)(const char *fmt, ...);
-
-#define WAIT_TIME 0x800000
-
-#define limitRange(x, l, h) ((x)=((x)<(l)?(l):(x)>(h)?(h):(x)))
-
-#define setVector(v, _x, _y, _z) \
- (v)->vx = _x, (v)->vy = _y, (v)->vz = _z
-
-#define applyVector(v, _x, _y, _z, op) \
- (v)->vx op _x, (v)->vy op _y, (v)->vz op _z
-
-#define copyVector(v0, v1) \
- (v0)->vx = (v1)->vx, (v0)->vy = (v1)->vy, (v0)->vz = (v1)->vz
-
-#define addVector(v0, v1) \
- (v0)->vx += (v1)->vx, \
- (v0)->vy += (v1)->vy, \
- (v0)->vz += (v1)->vz
-
-#define dumpVector(str, v) \
- GPU_printf("%s=(%d,%d,%d)\n", str, (v)->vx, (v)->vy, (v)->vz)
-
-#define dumpMatrix(x) \
- GPU_printf("\t%5d,%5d,%5d\n",(x)->m[0][0],(x)->m[0][1],(x)->m[0][2]),\
- GPU_printf("\t%5d,%5d,%5d\n",(x)->m[1][0],(x)->m[1][1],(x)->m[1][2]),\
- GPU_printf("\t%5d,%5d,%5d\n",(x)->m[2][0],(x)->m[2][1],(x)->m[2][2])
-
-#define setRECT(r, _x, _y, _w, _h) \
- (r)->x = (_x),(r)->y = (_y),(r)->w = (_w),(r)->h = (_h)
-
-/*
- * Set Primitive Attributes
- */
-#define setTPage(p,tp,abr,x,y) \
- ((p)->tpage = getTPage(tp,abr,x,y))
-
-#define setClut(p,x,y) \
- ((p)->clut = getClut(x,y))
-
-/*
- * Set Primitive Colors
- */
-#define setRGB0(p,_r0,_g0,_b0) \
- (p)->r0 = _r0,(p)->g0 = _g0,(p)->b0 = _b0
-
-#define setRGB1(p,_r1,_g1,_b1) \
- (p)->r1 = _r1,(p)->g1 = _g1,(p)->b1 = _b1
-
-#define setRGB2(p,_r2,_g2,_b2) \
- (p)->r2 = _r2,(p)->g2 = _g2,(p)->b2 = _b2
-
-#define setRGB3(p,_r3,_g3,_b3) \
- (p)->r3 = _r3,(p)->g3 = _g3,(p)->b3 = _b3
-
-
-
-
-#define setRGBP0(p,_r0,_g0,_b0,_p0) \
- (p)->r0 = _r0,(p)->g0 = _g0,(p)->b0 = _b0,(p)->p0 = _p0
-
-#define setRGBP1(p,_r1,_g1,_b1,_p1) \
- (p)->r1 = _r1,(p)->g1 = _g1,(p)->b1 = _b1,(p)->p1 = _p1
-
-#define setRGBP2(p,_r2,_g2,_b2,_p2) \
- (p)->r2 = _r2,(p)->g2 = _g2,(p)->b2 = _b2,(p)->p2 = _p2
-
-#define setRGBP3(p,_r3,_g3,_b3,_p3) \
- (p)->r3 = _r3,(p)->g3 = _g3,(p)->b3 = _b3,(p)->p3 = _p3
-
-/*
- * Set Primitive Screen Points
- */
-#define setXY0(p,_x0,_y0) \
- (p)->x0 = (_x0), (p)->y0 = (_y0) \
-
-#define setXY2(p,_x0,_y0,_x1,_y1) \
- (p)->x0 = (_x0), (p)->y0 = (_y0), \
- (p)->x1 = (_x1), (p)->y1 = (_y1)
-
-#define setXY3(p,_x0,_y0,_x1,_y1,_x2,_y2) \
- (p)->x0 = (_x0), (p)->y0 = (_y0), \
- (p)->x1 = (_x1), (p)->y1 = (_y1), \
- (p)->x2 = (_x2), (p)->y2 = (_y2)
-
-#define setXY4(p,_x0,_y0,_x1,_y1,_x2,_y2,_x3,_y3) \
- (p)->x0 = (_x0), (p)->y0 = (_y0), \
- (p)->x1 = (_x1), (p)->y1 = (_y1), \
- (p)->x2 = (_x2), (p)->y2 = (_y2), \
- (p)->x3 = (_x3), (p)->y3 = (_y3)
-
-#define setXYWH(p,_x0,_y0,_w,_h) \
- (p)->x0 = (_x0), (p)->y0 = (_y0), \
- (p)->x1 = (_x0)+(_w), (p)->y1 = (_y0), \
- (p)->x2 = (_x0), (p)->y2 = (_y0)+(_h), \
- (p)->x3 = (_x0)+(_w), (p)->y3 = (_y0)+(_h)
-
-/*
- * Set Primitive Width/Height
- */
-#define setWH(p,_w,_h) (p)->w = _w, (p)->h = _h
-
-/*
- * Set Primitive Texture Points
- */
-#define setUV0(p,_u0,_v0) \
- (p)->u0 = (_u0), (p)->v0 = (_v0) \
-
-#define setUV3(p,_u0,_v0,_u1,_v1,_u2,_v2) \
- (p)->u0 = (_u0), (p)->v0 = (_v0), \
- (p)->u1 = (_u1), (p)->v1 = (_v1), \
- (p)->u2 = (_u2), (p)->v2 = (_v2)
-
-#define setUV4(p,_u0,_v0,_u1,_v1,_u2,_v2,_u3,_v3) \
- (p)->u0 = (_u0), (p)->v0 = (_v0), \
- (p)->u1 = (_u1), (p)->v1 = (_v1), \
- (p)->u2 = (_u2), (p)->v2 = (_v2), \
- (p)->u3 = (_u3), (p)->v3 = (_v3)
-
-#define setUVWH(p,_u0,_v0,_w,_h) \
- (p)->u0 = (_u0), (p)->v0 = (_v0), \
- (p)->u1 = (_u0)+(_w), (p)->v1 = (_v0), \
- (p)->u2 = (_u0), (p)->v2 = (_v0)+(_h), \
- (p)->u3 = (_u0)+(_w), (p)->v3 = (_v0)+(_h)
-
-
-/*
- * Dump Primivie Parameters
- */
-#define dumpRECT16(r) \
- GPU_printf("(%d,%d)-(%d,%d)\n", (r)->x,(r)->y,(r)->w,(r)->h)
-
-#define dumpWH(p) GPU_printf("(%d,%d)\n", (p)->w, (p)->h )
-#define dumpXY0(p) GPU_printf("(%d,%d)\n", (p)->x0, (p)->y0)
-#define dumpUV0(p) GPU_printf("(%d,%d)\n", (p)->u0, (p)->v0)
-
-#define dumpXY2(p) \
- GPU_printf("(%d,%d)-(%d,%d)\n", \
- (p)->x0, (p)->y0, (p)->x1, (p)->y1)
-
-#define dumpXY3(p) \
- GPU_printf("(%d,%d)-(%d,%d)-(%d,%d)\n", \
- (p)->x0, (p)->y0, (p)->x1, (p)->y1, \
- (p)->x2, (p)->y2)
-
-#define dumpUV3(p) \
- GPU_printf("(%d,%d)-(%d,%d)-(%d,%d)\n", \
- (p)->u0, (p)->v0, (p)->u1, (p)->v1, \
- (p)->u2, (p)->v2)
-
-#define dumpXY4(p) \
- GPU_printf("(%d,%d)-(%d,%d)-(%d,%d)-(%d,%d)\n", \
- (p)->x0, (p)->y0, (p)->x1, (p)->y1, \
- (p)->x2, (p)->y2, (p)->x3, (p)->y3)
-
-#define dumpUV4(p) \
- GPU_printf("(%d,%d)-(%d,%d)-(%d,%d)-(%d,%d)\n", \
- (p)->u0, (p)->v0, (p)->u1, (p)->v1, \
- (p)->u2, (p)->v2, (p)->u3, (p)->v3)
-
-#define dumpRGB0(p) \
- GPU_printf("(%3d,%3d,%3d)\n", (p)->r0, (p)->g0, (p)->b0)
-
-#define dumpRGB1(p) \
- GPU_printf("(%3d,%3d,%3d)\n", (p)->r1, (p)->g1, (p)->b1)
-
-#define dumpRGB2(p) \
- GPU_printf("(%3d,%3d,%3d)\n", (p)->r2, (p)->g2, (p)->b2)
-
-#define dumpRGB3(p) \
- GPU_printf("(%3d,%3d,%3d)\n", (p)->r3, (p)->g3, (p)->b3)
-
- /*
- * Primitive Handling Macros
- */
-
-#if USE_EXTENDED_PRIM_POINTERS
-
-#define isendprim(p) ((((P_TAG *)(p))->addr) == (uintptr_t)&prim_terminator)
-#define nextPrim(p) (void *)(((P_TAG *)(p))->addr)
-
-#define setaddr(p, _addr) (((P_TAG *)(p))->addr = (uintptr_t)((u_long*)_addr))
-#define getaddr(p) (uintptr_t)(((P_TAG *)(p))->addr)
-
-#else
-
-#define isendprim(p) ((((P_TAG *)(p))->addr)==0xffffff)
-#define nextPrim(p) (void *)((((P_TAG *)(p))->addr))
-
-#define setaddr(p, _addr) (((P_TAG *)(p))->addr = (u_long)((u_long*)_addr))
-#define getaddr(p) (u_long)(((P_TAG *)(p))->addr)
-
-#endif
-
-#define setlen( p, _len) (((P_TAG *)(p))->len = (u_char)(_len))
-#define setcode(p, _code) (((P_TAG *)(p))->code = (u_char)(_code))
-
-#define getlen(p) (u_char)(((P_TAG *)(p))->len)
-#define getcode(p) (u_char)(((P_TAG *)(p))->code)
-
-#if USE_PGXP && USE_EXTENDED_PRIM_POINTERS
-#define setpgxpindex(p, i) (((P_TAG *)(p))->pgxp_index = (u_short)(i))
-#define addPrim(ot, p) setaddr(p, getaddr(ot)), setaddr(ot, p), setpgxpindex(p, PGXP_GetIndex(1))
-#else
-#define addPrim(ot, p) setaddr(p, getaddr(ot)), setaddr(ot, p)
-#endif
-
-#define addPrims(ot, p0, p1) setaddr(p1, getaddr(ot)),setaddr(ot, p0)
-
-#define catPrim(p0, p1) setaddr(p0, p1)
-
-#if USE_EXTENDED_PRIM_POINTERS
-#define termPrim(p) setaddr(p, &prim_terminator)
-#else
-#define termPrim(p) setaddr(p, 0xffffffff)
-#endif
-
-#define setSemiTrans(p, abe) \
- ((abe)?setcode(p, getcode(p)|0x02):setcode(p, getcode(p)&~0x02))
-
-#define setShadeTex(p, tge) \
- ((tge)?setcode(p, getcode(p)|0x01):setcode(p, getcode(p)&~0x01))
-
-#define getTPage(tp, abr, x, y) \
- ((((tp)&0x3)<<7)|(((abr)&0x3)<<5)|(((y)&0x100)>>4)|(((x)&0x3ff)>>6)| \
- (((y)&0x200)<<2))
-
-#define getClut(x, y) \
- (((y)<<6)|(((x)>>4)&0x3f))
-
-#define dumpTPage(tpage) \
- GPU_printf("tpage: (%d,%d,%d,%d)\n", \
- ((tpage)>>7)&0x3,((tpage)>>5)&0x3, \
- ((tpage)<<6)&0x3c0, \
- (((tpage)<<4)&0x100)+(((tpage)>>2)&0x200))
-
-#define dumpClut(clut) \
- GPU_printf("clut: (%d,%d)\n", (clut&0x3f)<<4, (clut>>6))
-
-#define _get_mode(dfe, dtd, tpage) \
- ((0xe1000000)|((dtd)?0x0200:0)| \
- ((dfe)?0x0400:0)|((tpage)&0x9ff))
-
-#if USE_EXTENDED_PRIM_POINTERS
-#define setDrawTPage(p, dfe, dtd, tpage) \
- setlen(p, 1), \
- ((u_long *)(p))[2] = _get_mode(dfe, dtd, tpage)
-#else
-#define setDrawTPage(p, dfe, dtd, tpage) \
- setlen(p, 1), \
- ((u_long *)(p))[1] = _get_mode(dfe, dtd, tpage)
-#endif
-
-#define _get_tw(tw) \
- (tw ? ((0xe2000000)|((((tw)->y&0xff)>>3)<<15)| \
- ((((tw)->x&0xff)>>3)<<10)|(((~((tw)->h-1)&0xff)>>3)<<5)| \
- (((~((tw)->w-1)&0xff)>>3))) : 0)
-
-#define setTexWindow(p, tw) \
- setlen(p, 2), \
- ((u_long *)(p))[1] = _get_tw(tw), \
- ((u_long *)(p))[2] = 0
-
-#define _get_len(rect) \
- (((RECT16)->w*(rect)->h+1)/2+4)
-
-#define setDrawLoad(pt, rect) \
- (_get_len(RECT16) <= 16) ? ( \
- (setlen(pt, _get_len(rect))), \
- ((pt)->code[0] = 0xa0000000), \
- ((pt)->code[1] = *((u_long *)&(rect)->x)), \
- ((pt)->code[2] = *((u_long *)&(rect)->w)), \
- ((pt)->p[_get_len(rect)-4] = 0x01000000) \
- ) : ( \
- (setlen(pt,0)) \
- )
-
-#define setDrawStp(p, pbw) \
- setlen(p, 2), \
- ((u_long *)p)[1] = 0xe6000000|(pbw?0x01:0), \
- ((u_long *)p)[2] = 0
-
-#if USE_EXTENDED_PRIM_POINTERS
-#define setDrawMode(p, dfe, dtd, tpage, tw) \
- setlen(p, 3), \
- ((u_long *)p)[2] = _get_mode(dfe, dtd, tpage), \
- ((u_long *)p)[3] = _get_tw((RECT16 *)tw)
-#else
-#define setDrawMode(p, dfe, dtd, tpage, tw) \
- setlen(p, 2), \
- ((u_long *)p)[1] = _get_mode(dfe, dtd, tpage), \
- ((u_long *)p)[2] = _get_tw((RECT16 *)tw)
-#endif
-
-
-/* Primitive Lentgh Code */
-/*-------------------------------------------------------------------- */
-/* */
-#define setPolyF3(p) setlen(p, 4), setcode(p, 0x20)
-#define setPolyFT3(p) setlen(p, 7), setcode(p, 0x24)
-#define setPolyG3(p) setlen(p, 6), setcode(p, 0x30)
-#define setPolyGT3(p) setlen(p, 9), setcode(p, 0x34)
-#define setPolyF4(p) setlen(p, 5), setcode(p, 0x28)
-#define setPolyFT4(p) setlen(p, 9), setcode(p, 0x2c)
-#define setPolyG4(p) setlen(p, 8), setcode(p, 0x38)
-#define setPolyGT4(p) setlen(p, 12), setcode(p, 0x3c)
-
-#define setSprt8(p) setlen(p, 3), setcode(p, 0x74)
-#define setSprt16(p) setlen(p, 3), setcode(p, 0x7c)
-#define setSprt(p) setlen(p, 4), setcode(p, 0x64)
-
-#define setTile1(p) setlen(p, 2), setcode(p, 0x68)
-#define setTile8(p) setlen(p, 2), setcode(p, 0x70)
-#define setTile16(p) setlen(p, 2), setcode(p, 0x78)
-#define setTile(p) setlen(p, 3), setcode(p, 0x60)
-#define setLineF2(p) setlen(p, 3), setcode(p, 0x40)
-#define setLineG2(p) setlen(p, 4), setcode(p, 0x50)
-#define setLineF3(p) setlen(p, 5), setcode(p, 0x48),(p)->pad = 0x55555555
-#define setLineG3(p) setlen(p, 7), setcode(p, 0x58),(p)->pad = 0x55555555, \
- (p)->p2 = 0
-#define setLineF4(p) setlen(p, 6), setcode(p, 0x4c),(p)->pad = 0x55555555
-#define setLineG4(p) setlen(p, 9), setcode(p, 0x5c),(p)->pad = 0x55555555, \
- (p)->p2 = 0, (p)->p3 = 0
-
-/*
- * RECT16angle:
- */
-#pragma pack(push,1)
-
-typedef struct _RECT16 {
- short x, y; /* offset point on VRAM */
- short w, h; /* width and height */
-} RECT16;
-
-// Psy-X custom struct to handle polygons
-
-#if USE_EXTENDED_PRIM_POINTERS
-
-#if defined(_M_X64) || defined(__amd64__)
-
-#define DECLARE_P_ADDR \
- uintptr_t addr; \
- uint len : 16; \
- uint pgxp_index : 16;
-
-#define P_LEN 3 // 4 longs
-
-#else
-
-#define DECLARE_P_ADDR \
- uintptr_t addr; \
- uint len : 16; \
- uint pgxp_index : 16;
-
-#define P_LEN 2 // 2 longs
-
-#endif // _M_X64 || __amd64__
-
-#define DECLARE_P_ADDR_PTAG DECLARE_P_ADDR
-
-#else // just don't use that, okay... it's just for reference
-
-#define DECLARE_P_ADDR_PTAG \
- unsigned addr : 24; \
- unsigned len : 8;
-
-#define DECLARE_P_ADDR \
- u_long tag;
-
-#define P_LEN 1 // 1 long
-
-#endif
-
-/*
- * Polygon Primitive Definitions
- */
-
-typedef struct {
- DECLARE_P_ADDR_PTAG
-} OT_TAG;
-
-typedef struct {
- DECLARE_P_ADDR_PTAG
- u_char pad0, pad1, pad2, code;
-} P_TAG;
-
-typedef struct {
- DECLARE_P_ADDR
- u_char r0, g0, b0, code;
- VERTTYPE x0, y0;
- VERTTYPE x1, y1;
- VERTTYPE x2, y2;
-} POLY_F3; /* Flat Triangle */
-
-typedef struct {
- DECLARE_P_ADDR
- u_char r0, g0, b0, code;
- VERTTYPE x0, y0;
- VERTTYPE x1, y1;
- VERTTYPE x2, y2;
- VERTTYPE x3, y3;
-} POLY_F4; /* Flat Quadrangle */
-
-typedef struct {
- DECLARE_P_ADDR
- u_char r0, g0, b0, code;
- VERTTYPE x0, y0;
- u_char u0, v0; u_short clut;
- VERTTYPE x1, y1;
- u_char u1, v1; u_short tpage;
- VERTTYPE x2, y2;
- u_char u2, v2; u_short pad1;
-} POLY_FT3; /* Flat Textured Triangle */
-
-typedef struct {
- DECLARE_P_ADDR
- u_char r0, g0, b0, code;
- VERTTYPE x0, y0;
- u_char u0, v0; u_short clut;
- VERTTYPE x1, y1;
- u_char u1, v1; u_short tpage;
- VERTTYPE x2, y2;
- u_char u2, v2; u_short pad1;
- VERTTYPE x3, y3;
- u_char u3, v3; u_short pad2;
-} POLY_FT4; /* Flat Textured Quadrangle */
-
-typedef struct {
- DECLARE_P_ADDR
- u_char r0, g0, b0, code;
- VERTTYPE x0, y0;
- u_char r1, g1, b1, pad1;
- VERTTYPE x1, y1;
- u_char r2, g2, b2, pad2;
- VERTTYPE x2, y2;
-} POLY_G3; /* Gouraud Triangle */
-
-typedef struct {
- DECLARE_P_ADDR
- u_char r0, g0, b0, code;
- VERTTYPE x0, y0;
- u_char r1, g1, b1, pad1;
- VERTTYPE x1, y1;
- u_char r2, g2, b2, pad2;
- VERTTYPE x2, y2;
- u_char r3, g3, b3, pad3;
- VERTTYPE x3, y3;
-} POLY_G4; /* Gouraud Quadrangle */
-
-typedef struct {
- DECLARE_P_ADDR
- u_char r0, g0, b0, code;
- VERTTYPE x0, y0;
- u_char u0, v0; u_short clut;
- u_char r1, g1, b1, p1;
- VERTTYPE x1, y1;
- u_char u1, v1; u_short tpage;
- u_char r2, g2, b2, p2;
- VERTTYPE x2, y2;
- u_char u2, v2; u_short pad2;
-} POLY_GT3; /* Gouraud Textured Triangle */
-
-typedef struct {
- DECLARE_P_ADDR
- u_char r0, g0, b0, code;
- VERTTYPE x0, y0;
- u_char u0, v0; u_short clut;
- u_char r1, g1, b1, p1;
- VERTTYPE x1, y1;
- u_char u1, v1; u_short tpage;
- u_char r2, g2, b2, p2;
- VERTTYPE x2, y2;
- u_char u2, v2; u_short pad2;
- u_char r3, g3, b3, p3;//10
- VERTTYPE x3, y3;//11
- u_char u3, v3; u_short pad3;
-} POLY_GT4; /* Gouraud Textured Quadrangle */
-
-/*
- * Line Primitive Definitions
- */
-typedef struct {
- DECLARE_P_ADDR
- u_char r0, g0, b0, code;
- VERTTYPE x0, y0;
- VERTTYPE x1, y1;
-} LINE_F2; /* Unconnected Flat Line */
-
-typedef struct {
- DECLARE_P_ADDR
- u_char r0, g0, b0, code;
- VERTTYPE x0, y0;
- u_char r1, g1, b1, p1;
- VERTTYPE x1, y1;
-} LINE_G2; /* Unconnected Gouraud Line */
-
-typedef struct {
- DECLARE_P_ADDR
- u_char r0, g0, b0, code;
- VERTTYPE x0, y0;
- VERTTYPE x1, y1;
- VERTTYPE x2, y2;
- u_long pad;
-} LINE_F3; /* 2 connected Flat Line */
-
-typedef struct {
- DECLARE_P_ADDR
- u_char r0, g0, b0, code;
- VERTTYPE x0, y0;
- u_char r1, g1, b1, p1;
- VERTTYPE x1, y1;
- u_char r2, g2, b2, p2;
- VERTTYPE x2, y2;
- u_long pad;
-} LINE_G3; /* 2 connected Gouraud Line */
-
-typedef struct {
- DECLARE_P_ADDR
- u_char r0, g0, b0, code;
- VERTTYPE x0, y0;
- VERTTYPE x1, y1;
- VERTTYPE x2, y2;
- VERTTYPE x3, y3;
- u_long pad;
-} LINE_F4; /* 3 connected Flat Line Quadrangle */
-
-typedef struct {
- DECLARE_P_ADDR
- u_char r0, g0, b0, code;
- VERTTYPE x0, y0;
- u_char r1, g1, b1, p1;
- VERTTYPE x1, y1;
- u_char r2, g2, b2, p2;
- VERTTYPE x2, y2;
- u_char r3, g3, b3, p3;
- VERTTYPE x3, y3;
- u_long pad;
-} LINE_G4; /* 3 connected Gouraud Line */
-
-/*
- * Sprite Primitive Definitions
- */
-typedef struct {
- DECLARE_P_ADDR
- u_char r0, g0, b0, code;
- VERTTYPE x0, y0;
- u_char u0, v0; u_short clut;
- VERTTYPE w, h;
-} SPRT; /* free size Sprite */
-
-typedef struct {
- DECLARE_P_ADDR
- u_char r0, g0, b0, code;
- VERTTYPE x0, y0;
- u_char u0, v0; u_short clut;
-} SPRT_16; /* 16x16 Sprite */
-
-typedef struct {
- DECLARE_P_ADDR
- u_char r0, g0, b0, code;
- VERTTYPE x0, y0;
- u_char u0, v0; u_short clut;
-} SPRT_8; /* 8x8 Sprite */
-
-/*
- * Tile Primitive Definitions
- */
-typedef struct {
- DECLARE_P_ADDR
- u_char r0, g0, b0, code;
- VERTTYPE x0, y0;
- VERTTYPE w, h;
-} TILE; /* free size Tile */
-
-typedef struct {
- DECLARE_P_ADDR
- u_char r0, g0, b0, code;
- VERTTYPE x0, y0;
-} TILE_16; /* 16x16 Tile */
-
-typedef struct {
- DECLARE_P_ADDR
- u_char r0, g0, b0, code;
- VERTTYPE x0, y0;
-} TILE_8; /* 8x8 Tile */
-
-typedef struct {
- DECLARE_P_ADDR
- u_char r0, g0, b0, code;
- VERTTYPE x0, y0;
-} TILE_1; /* 1x1 Tile */
-
-/*
- * Special Primitive Definitions
- */
-typedef struct {
- DECLARE_P_ADDR
- u_long code[2];
-} DR_MODE; /* Drawing Mode */
-
-typedef struct {
- DECLARE_P_ADDR
- u_long code[2];
-} DR_TWIN; /* Texture Window */
-
-typedef struct {
- DECLARE_P_ADDR
- u_long code[2];
-} DR_AREA; /* Drawing Area */
-
-typedef struct {
- DECLARE_P_ADDR
- u_long code[2];
-} DR_OFFSET; /* Drawing Offset */
-
-typedef struct { /* MoveImage */
- DECLARE_P_ADDR
- u_long code[5];
-} DR_MOVE;
-
-typedef struct { /* LoadImage */
- DECLARE_P_ADDR
- u_long code[3];
- u_long p[13];
-} DR_LOAD;
-
-typedef struct {
- DECLARE_P_ADDR
- u_long code[1];
-} DR_TPAGE; /* Drawing TPage */
-
-typedef struct {
- DECLARE_P_ADDR
- u_long code[2];
-} DR_STP; /* Drawing STP */
-
-/*
-* PSY-X commands
-*/
-
-typedef struct {
- DECLARE_P_ADDR
- u_long code[2];
-} DR_PSYX_TEX;
-
-typedef struct {
- DECLARE_P_ADDR
- u_long code;
- const char* text;
-} DR_PSYX_DBGMARKER;
-
-/*
- * Environment
- */
-typedef struct {
- DECLARE_P_ADDR
- u_long code[15];
-} DR_ENV; /* Packed Drawing Environment */
-
-typedef struct {
- RECT16 clip; /* clip area */
- short ofs[2]; /* drawing offset */
- RECT16 tw; /* texture window */
- u_short tpage; /* texture page */
- u_char dtd; /* dither flag (0:off, 1:on) */
- u_char dfe; /* flag to draw on display area (0:off 1:on) */
- u_char drt;
- u_char isbg; /* enable to auto-clear */
- u_char r0, g0, b0; /* initital background color */
- DR_ENV dr_env; /* reserved */
-} DRAWENV;
-
-typedef struct {
- RECT16 disp; /* display area */
- RECT16 screen; /* display start point */
- u_char isinter; /* interlace 0: off 1: on */
- u_char isrgb24; /* RGB24 bit mode */
- u_char pad0, pad1; /* reserved */
-} DISPENV;
-
-/*
- * Font Stream Parameters
- */
-#define FNT_MAX_ID 8 /* max number of stream ID */
-#define FNT_MAX_SPRT 1024 /* max number of sprites in all streams */
-
-/*
- * Multi-purpose Sony-TMD primitive
- */
-typedef struct {
- u_long id;
- u_char r0, g0, b0, p0; /* Color of vertex 0 */
- u_char r1, g1, b1, p1; /* Color of vertex 1 */
- u_char r2, g2, b2, p2; /* Color of vertex 2 */
- u_char r3, g3, b3, p3; /* Color of vertex 3 */
- u_short tpage, clut; /* texture page ID, clut ID */
- u_char u0, v0, u1, v1; /* texture corner point */
- u_char u2, v2, u3, v3;
-
- /* independent vertex model */
- SVECTOR x0, x1, x2, x3; /* 3D corner point */
- SVECTOR n0, n1, n2, n3; /* 3D corner normal vector */
-
- /* Common vertex model */
- SVECTOR *v_ofs; /* offset to vertex database */
- SVECTOR *n_ofs; /* offset to normal database */
-
- u_short vert0, vert1; /* index of vertex */
- u_short vert2, vert3;
- u_short norm0, norm1; /* index of normal */
- u_short norm2, norm3;
-
-
-} TMD_PRIM;
-
-/*
- * Multi-purpose TIM image
- */
-typedef struct {
- u_long mode; /* pixel mode */
- RECT16 *cRECT16; /* CLUT RECT16angle on frame buffer */
- u_long *caddr; /* CLUT address on main memory */
- RECT16 *pRECT16; /* texture image RECT16angle on frame buffer */
- u_long *paddr; /* texture image address on main memory */
-} TIM_IMAGE;
-
-#pragma pack(pop)
-
-#if defined(_LANGUAGE_C_PLUS_PLUS)||defined(__cplusplus)||defined(c_plusplus)
-extern "C" {
-#endif
-
-#if USE_EXTENDED_PRIM_POINTERS
-extern OT_TAG prim_terminator;
-#endif
-
-#ifdef LoadImage
-#undef LoadImage
-#endif
-
-/*
- * Prototypes
- */
-#ifndef _FNTPRINT_
-#define _FNTPRINT_
-extern int FntPrint(char* fmt, ...);
-#endif /* _FNTPRINT_ */
-#ifndef _KANJIFNTPRINT_
-#define _KANJIFNTPRINT_
-extern int KanjiFntPrint(char* text, ...);
-#endif /* _KANJIFNTPRINT_ */
-
-extern DISPENV *GetDispEnv(DISPENV *env);
-extern DISPENV *PutDispEnv(DISPENV *env);
-extern DISPENV *SetDefDispEnv(DISPENV *env, int x, int y, int w, int h);
-extern DRAWENV *GetDrawEnv(DRAWENV *env);
-extern DRAWENV *PutDrawEnv(DRAWENV *env);
-extern DRAWENV *SetDefDrawEnv(DRAWENV *env, int x, int y, int w, int h);
-extern TIM_IMAGE *ReadTIM(TIM_IMAGE *timimg);
-extern TMD_PRIM *ReadTMD(TMD_PRIM *tmdprim);
-extern int CheckPrim(char *s, u_long *p);
-extern int ClearImage(RECT16 *RECT16, u_char r, u_char g, u_char b);
-extern int ClearImage2(RECT16 *RECT16, u_char r, u_char g, u_char b);
-extern int DrawSync(int mode);
-extern int FntOpen(int x, int y, int w, int h, int isbg, int n);
-extern int GetGraphDebug(void);
-extern int GetTimSize(u_char *sjis);
-extern int IsEndPrim(void *p);
-extern int KanjiFntOpen(int x, int y, int w, int h, int dx, int dy, int cx, int cy, int isbg, int n);
-extern void KanjiFntClose(void);
-extern int Krom2Tim(u_char *sjis, u_long *taddr, int dx, int dy, int cdx, int cdy, u_int fg, u_int bg);
-extern int LoadImagePSX(RECT16 *rect, u_long *p);
-extern int LoadImage(RECT16* rect, u_long* p);
-extern int LoadImage2(RECT16* rect, u_long* p);
-extern int MargePrim(void *p0, void *p1);
-extern int MoveImage(RECT16* rect, int x, int y);
-extern int OpenTIM(u_long *addr);
-extern int OpenTMD(u_long *tmd, int obj_no);
-extern int ResetGraph(int mode);
-extern int SetGraphDebug(int level);
-extern int StoreImage(RECT16 *rect, u_long *p);
-extern u_long *ClearOTag(u_long *ot, int n);
-extern u_long *ClearOTagR(u_long *ot, int n);
-extern u_long *FntFlush();
-extern u_long *KanjiFntFlush(int id);
-extern u_long DrawSyncCallback(void (*func)(void));
-extern u_short GetClut(int x, int y);
-extern u_short GetTPage(int tp, int abr, int x, int y);
-extern u_short LoadClut(u_long *clut, int x, int y);
-extern u_short LoadClut2(u_long *clut, int x, int y);
-extern u_short LoadTPage(u_long *pix, int tp, int abr, int x, int y, int w, int h);
-extern void *NextPrim(void *p);
-extern void AddPrim(void *ot, void *p);
-extern void AddPrims(void *ot, void *p0, void *p1);
-extern void CatPrim(void *p0, void *p1);
-extern void DrawOTag(u_long *p);
-extern void DrawOTagIO(u_long *p);
-extern void DrawOTagEnv(u_long *p, DRAWENV *env);
-extern void DrawPrim(void *p);
-extern void DumpClut(u_short clut);
-extern void DumpDispEnv(DISPENV *env);
-extern void DumpDrawEnv(DRAWENV *env);
-extern void DumpOTag(u_long *p);
-extern void DumpTPage(u_short tpage);
-extern void FntLoad(int x, int y);
-extern void SetDispMask(int mask);
-extern void SetDrawArea(DR_AREA *p, RECT16 *r);
-extern void SetDrawEnv(DR_ENV *dr_env, DRAWENV *env);
-extern void SetDrawLoad(DR_LOAD *p, RECT16 *RECT16);
-extern void SetDrawMode(DR_MODE *p, int dfe, int dtd, int tpage, RECT16 *tw);
-extern void SetDrawTPage(DR_TPAGE *p, int dfe, int dtd, int tpage);
-extern void SetDrawMove(DR_MOVE *p, RECT16 *RECT16, int x, int y);
-extern void SetDrawOffset(DR_OFFSET *p, u_short *ofs);
-extern void SetDrawStp(DR_STP *p, int pbw);
-extern void SetDumpFnt(int id);
-extern void SetLineF2(LINE_F2 *p);
-extern void SetLineF3(LINE_F3 *p);
-extern void SetLineF4(LINE_F4 *p);
-extern void SetLineG2(LINE_G2 *p);
-extern void SetLineG3(LINE_G3 *p);
-extern void SetLineG4(LINE_G4 *p);
-extern void SetPolyF3(POLY_F3 *p);
-extern void SetPolyF4(POLY_F4 *p);
-extern void SetPolyFT3(POLY_FT3 *p);
-extern void SetPolyFT4(POLY_FT4 *p);
-extern void SetPolyG3(POLY_G3 *p);
-extern void SetPolyG4(POLY_G4 *p);
-extern void SetPolyGT3(POLY_GT3 *p);
-extern void SetPolyGT4(POLY_GT4 *p);
-extern void SetSemiTrans(void *p, int abe);
-extern void SetShadeTex(void *p, int tge);
-extern void SetSprt(SPRT *p);
-extern void SetSprt16(SPRT_16 *p);
-extern void SetSprt8(SPRT_8 *p);
-extern void SetTexWindow(DR_TWIN *p, RECT16 *tw);
-extern void SetTile(TILE *p);
-extern void SetTile1(TILE_1 *p);
-extern void SetTile16(TILE_16 *p);
-extern void SetTile8(TILE_8 *p);
-extern void TermPrim(void *p);
-extern u_long *BreakDraw(void);
-extern void ContinueDraw(u_long *insaddr, u_long *contaddr);
-extern int IsIdleGPU(int max_count);
-extern int GetODE(void);
-extern int LoadImage2(RECT16 *RECT16, u_long *p);
-extern int StoreImage2(RECT16 *RECT16, u_long *p);
-extern int MoveImage2(RECT16 *RECT16, int x, int y);
-extern int DrawOTag2(u_long *p);
-extern void GetDrawMode(DR_MODE *p);
-extern void GetTexWindow(DR_TWIN *p);
-extern void GetDrawArea(DR_AREA *p);
-extern void GetDrawOffset(DR_OFFSET *p);
-extern void GetDrawEnv2(DR_ENV *p);
-
-/*
-* PSY-X commands
-*/
-
-extern void SetPsyXTexture(DR_PSYX_TEX *p, uint grTextureId, int width, int height);
-extern void SetPsyXDebugMarker(DR_PSYX_DBGMARKER* p, const char* str);
-
-#ifdef _DEBUG
-#define PSYX_DBG_MARKER_TEXT(primptr, ot, text) \
- { \
- DR_PSYX_DBGMARKER* marker; \
- marker = (DR_PSYX_DBGMARKER*)(primptr); \
- SetPsyXDebugMarker(marker, text); \
- (primptr) += sizeof(DR_PSYX_DBGMARKER); \
- addPrim((ot), marker); \
- }
-#else
-#define PSYX_DBG_MARKER_TEXT(primptr, ot, text)
-#endif
-
-#define PSYX_DBG_MARKER_RESET(primptr, ot) PSYX_DBG_MARKER_TEXT(primptr, ot, nullptr)
-
-#if defined(_LANGUAGE_C_PLUS_PLUS)||defined(__cplusplus)||defined(c_plusplus)
-}
-#endif
-
-#endif
diff --git a/rebuild_PC/PsyCross/include/psx/libgte.h b/rebuild_PC/PsyCross/include/psx/libgte.h
deleted file mode 100644
index b42deb38c..000000000
--- a/rebuild_PC/PsyCross/include/psx/libgte.h
+++ /dev/null
@@ -1,93 +0,0 @@
-#ifndef LIBGTE_H
-#define LIBGTE_H
-
-#include "types.h"
-#include "PsyX/common/pgxp_defs.h"
-
-typedef struct {
- short m[3][3]; /* 3x3 rotation matrix */
- long t[3]; /* transfer vector */
-} MATRIX;
-
-typedef struct { /* long word type 3D vector */
- long vx, vy;
- long vz, pad;
-} VECTOR;
-
-typedef struct { /* short word type 3D vector */
- short vx, vy;
- short vz, pad;
-} SVECTOR;
-
-typedef struct { /* color type vector */
- unsigned char r, g, b, cd;
-} CVECTOR;
-
-typedef struct { /* 2D short vector */
- short vx, vy;
-} DVECTOR;
-
-#if defined(_LANGUAGE_C_PLUS_PLUS)||defined(__cplusplus)||defined(c_plusplus)
-extern "C" {
-#endif
-
-extern void InitGeom();
-extern void SetGeomOffset(int ofx, int ofy);
-extern void SetGeomScreen(int h);
-
-extern void SetRotMatrix(MATRIX* m);
-extern void SetLightMatrix(MATRIX* m);
-extern void SetColorMatrix(MATRIX* m);
-extern void SetTransMatrix(MATRIX* m);
-extern void PushMatrix();
-extern void PopMatrix();
-VECTOR *ApplyMatrix(MATRIX *m, SVECTOR *v0, VECTOR *v1);
-VECTOR *ApplyRotMatrix(SVECTOR *v0, VECTOR *v1);
-VECTOR *ApplyRotMatrixLV(VECTOR *v0, VECTOR *v1);
-SVECTOR *ApplyMatrixSV(MATRIX *m, SVECTOR *v0, SVECTOR *v1);
-VECTOR *ApplyMatrixLV(MATRIX *m, VECTOR *v0, VECTOR *v1);
-extern void RotTrans(SVECTOR* v0, VECTOR* v1, long* flag);
-extern void RotTransSV(SVECTOR* v0, SVECTOR* v1, long* flag);
-extern long RotTransPers(SVECTOR* v0, long* sxy, long* p, long* flag);
-extern long RotTransPers3(SVECTOR* v0, SVECTOR* v1, SVECTOR* v2, long* sxy0, long* sxy1, long* sxy2, long* p, long* flag);
-extern long RotTransPers4(SVECTOR* v0, SVECTOR* v1, SVECTOR* v2, SVECTOR* v3, long* sxy0, long* sxy1, long* sxy2, long* sxy3, long* p, long* flag);
-extern void NormalColor(SVECTOR* v0, CVECTOR* v1);
-extern void NormalColor3(SVECTOR* v0, SVECTOR* v1, SVECTOR* v2, CVECTOR* v3, CVECTOR* v4, CVECTOR* v5);
-extern void NormalColorDpq(SVECTOR* v0, CVECTOR* v1, long p, CVECTOR* v2);
-extern void NormalColorCol(SVECTOR* v0, CVECTOR* v1, CVECTOR* v2);
-extern void NormalColorCol3(SVECTOR* v0, SVECTOR* v1, SVECTOR* v2, CVECTOR* v3, CVECTOR* v4, CVECTOR* v5, CVECTOR* v6);
-extern void LocalLight(SVECTOR* v0, VECTOR* v1);
-extern long RotAverageNclip4(SVECTOR* v0, SVECTOR* v1, SVECTOR* v2, SVECTOR* v3, long* sxy0/*arg_10*/, long* sxy1/*arg_14*/, long* sxy2/*arg_18*/, long* sxy3/*arg_1C*/, long* p/*arg_20*/, long* otz/*arg_24*/, long* flag/*arg_28*/);
-extern MATRIX* MulMatrix0(MATRIX* m0, MATRIX* m1, MATRIX* m2);
-extern MATRIX* MulMatrix(MATRIX* m0, MATRIX* m1);
-extern MATRIX* MulMatrix2(MATRIX* m0, MATRIX* m1);
-extern void SetBackColor(long rbk, long gbk, long bbk);
-extern void SetFarColor(long rfc, long gfc, long bfc);
-extern MATRIX* RotMatrix(SVECTOR* r, MATRIX* m);
-extern MATRIX* RotMatrixYXZ(SVECTOR* r, MATRIX* m);
-extern MATRIX* RotMatrixZYX_gte(SVECTOR* r, MATRIX* m);
-extern MATRIX* RotMatrixX(long r, MATRIX *m);
-extern MATRIX* RotMatrixY(long r, MATRIX *m);
-extern MATRIX* RotMatrixZ(long r, MATRIX *m);
-extern MATRIX* TransMatrix(MATRIX* m, VECTOR* v);
-extern MATRIX* CompMatrix(MATRIX* m0, MATRIX* m1, MATRIX* m2);
-extern MATRIX* ScaleMatrix(MATRIX* m, VECTOR* v);
-extern MATRIX* MulRotMatrix(MATRIX* m0);
-extern void ColorDpq(VECTOR* v0, CVECTOR* v1, long p, CVECTOR* v2);
-extern void ColorCol(VECTOR* v0, CVECTOR* v1, CVECTOR* v2);
-extern long NormalClip(long sxy0, long sxy1, long sxy2);
-extern void SetDQA(int iDQA);
-extern void SetDQB(int iDQB);
-extern void SetFogNear(long a, long h);
-extern void SetFogNearFar(long a, long b, long h);
-extern long SquareRoot0(long a);
-
-extern int rsin(int a);
-extern int rcos(int a);
-extern long ratan2(long y, long x);
-
-#if defined(_LANGUAGE_C_PLUS_PLUS)||defined(__cplusplus)||defined(c_plusplus)
-}
-#endif
-
-#endif
\ No newline at end of file
diff --git a/rebuild_PC/PsyCross/include/psx/libmath.h b/rebuild_PC/PsyCross/include/psx/libmath.h
deleted file mode 100644
index 8d56293c8..000000000
--- a/rebuild_PC/PsyCross/include/psx/libmath.h
+++ /dev/null
@@ -1,12 +0,0 @@
-#ifndef LIBMATH_H
-#define LIBMATH_H
-
-#define _USE_MATH_DEFINES
-
-#ifdef __GNUC__
-#include
-#endif
-
-#include
-
-#endif
\ No newline at end of file
diff --git a/rebuild_PC/PsyCross/include/psx/libmcrd.h b/rebuild_PC/PsyCross/include/psx/libmcrd.h
deleted file mode 100644
index 0d6c460ba..000000000
--- a/rebuild_PC/PsyCross/include/psx/libmcrd.h
+++ /dev/null
@@ -1,53 +0,0 @@
-#ifndef LIBMCRD_H
-#define LIBMCRD_H
-
-#include "kernel.h"
-
-typedef void (*MemCB)( long cmds, long rslt );
-
-#define McFuncExist (1)
-#define McFuncAccept (2)
-#define McFuncReadFile (3)
-#define McFuncWriteFile (4)
-#define McFuncReadData (5)
-#define McFuncWriteData (6)
-
-#define McErrNone (0)
-#define McErrCardNotExist (1)
-#define McErrCardInvalid (2)
-#define McErrNewCard (3)
-#define McErrNotFormat (4)
-#define McErrFileNotExist (5)
-#define McErrAlreadyExist (6)
-#define McErrBlockFull (7)
-#define McErrExtend (0x8000)
-
-#if defined(_LANGUAGE_C_PLUS_PLUS)||defined(__cplusplus)||defined(c_plusplus)
-extern "C" {
-#endif
-
-extern void MemCardInit( long val );
-extern void MemCardEnd( void );
-extern void MemCardStart(void);
-extern void MemCardStop(void);
-extern long MemCardExist( long chan );
-extern long MemCardAccept( long chan );
-extern long MemCardOpen( long chan, char* file, long flag );
-extern void MemCardClose(void);
-extern long MemCardReadData( unsigned long* adrs, long ofs, long bytes );
-extern long MemCardReadFile( long chan, char* file, unsigned long* adrs, long ofs, long bytes );
-extern long MemCardWriteData( unsigned long* adrs, long ofs, long bytes );
-extern long MemCardWriteFile( long chan, char* file, unsigned long* adrs, long ofs ,long bytes );
-extern long MemCardCreateFile( long chan, char* file, long blocks );
-extern long MemCardDeleteFile( long chan, char* file );
-extern long MemCardFormat( long chan );
-extern long MemCardUnformat(long chan);
-extern long MemCardSync( long mode, long* cmds, long* rslt );
-extern MemCB MemCardCallback( MemCB func );
-extern long MemCardGetDirentry( long chan, char* name, struct DIRENTRY* dir, long* files, long ofs, long max );
-
-#if defined(_LANGUAGE_C_PLUS_PLUS)||defined(__cplusplus)||defined(c_plusplus)
-}
-#endif
-
-#endif
diff --git a/rebuild_PC/PsyCross/include/psx/libpad.h b/rebuild_PC/PsyCross/include/psx/libpad.h
deleted file mode 100644
index 48682e9b7..000000000
--- a/rebuild_PC/PsyCross/include/psx/libpad.h
+++ /dev/null
@@ -1,61 +0,0 @@
-#ifndef LIBPAD_H
-#define LIBPAD_H
-
-#define PadStateDiscon 0
-#define PadStateFindPad 1
-#define PadStateFindCTP1 2
-#define PadStateFindCTP2 3
-#define PadStateReqInfo 4
-#define PadStateExecCmd 5
-#define PadStateStable 6
-
-#define InfoModeCurID 1
-#define InfoModeCurExID 2
-#define InfoModeCurExOffs 3
-#define InfoModeIdTable 4
-
-#define InfoActFunc 1
-#define InfoActSub 2
-#define InfoActSize 3
-#define InfoActCurr 4
-#define InfoActSign 5
-
-#define PadMaxCurr 60
-#define PadCurrCTP1 10
-
-#define MAX_CONTROLLERS 2 // TODO: multi-tap (2 ports * 5 taps (1st is Direct))
-
-typedef struct PADRAW
-{
- unsigned char status; // size=0, offset=0
- unsigned char id; // size=0, offset=1
- unsigned char buttons[2]; // size=2, offset=2
- unsigned char analog[4]; // size=4, offset=4
-} *LPPADRAW;
-
-#if defined(_LANGUAGE_C_PLUS_PLUS)||defined(__cplusplus)||defined(c_plusplus)
-extern "C" {
-#endif
-
-extern void PadInitDirect(unsigned char* pad1, unsigned char* pad2);
-extern void PadInitMtap(unsigned char* unk00, unsigned char* unk01);
-extern void PadInitGun(unsigned char* unk00, int unk01);
-extern int PadChkVsync();
-extern void PadStartCom();
-extern void PadStopCom();
-extern unsigned int PadEnableCom(unsigned int unk00);
-extern void PadEnableGun(unsigned char unk00);
-extern void PadRemoveGun();
-extern int PadGetState(int port);
-extern int PadInfoMode(int port, int term, int offs);
-extern int PadInfoAct(int port, int acno, int term);
-extern int PadInfoComb(int unk00, int, int unk01);
-extern int PadSetActAlign(int port, unsigned char* table);
-extern int PadSetMainMode(int socket, int offs, int lock);
-extern void PadSetAct(int port, unsigned char* table, int len);
-
-#if defined(_LANGUAGE_C_PLUS_PLUS)||defined(__cplusplus)||defined(c_plusplus)
-}
-#endif
-
-#endif
\ No newline at end of file
diff --git a/rebuild_PC/PsyCross/include/psx/libpress.h b/rebuild_PC/PsyCross/include/psx/libpress.h
deleted file mode 100644
index 9d46de142..000000000
--- a/rebuild_PC/PsyCross/include/psx/libpress.h
+++ /dev/null
@@ -1,21 +0,0 @@
-#ifndef LIBPRESS_H
-#define LIBPRESS_H
-
-#if defined(_LANGUAGE_C_PLUS_PLUS)||defined(__cplusplus)||defined(c_plusplus)
-extern "C" {
-#endif
-
-extern void DecDCTReset(int mode);
-extern int DecDCTBufSize(u_long *bs);
-extern void DecDCTvlc(u_long *bs, u_long *buf);
-extern void DecDCTin(u_long *buf, int mode);
-extern void DecDCTout(u_long *buf, int size);
-extern int DecDCTinSync( int mode) ;
-extern int DecDCToutSync( int mode) ;
-
-#if defined(_LANGUAGE_C_PLUS_PLUS)||defined(__cplusplus)||defined(c_plusplus)
-}
-#endif
-
-
-#endif
diff --git a/rebuild_PC/PsyCross/include/psx/libsn.h b/rebuild_PC/PsyCross/include/psx/libsn.h
deleted file mode 100644
index c87d8eadd..000000000
--- a/rebuild_PC/PsyCross/include/psx/libsn.h
+++ /dev/null
@@ -1,23 +0,0 @@
-#ifndef LIBSN_H
-#define LIBSN_H
-
-#include
-
-#if defined(_LANGUAGE_C_PLUS_PLUS)||defined(__cplusplus)||defined(c_plusplus)
-extern "C" {
-#endif
-
-extern int PCinit();
-extern uintptr_t PCopen(char* name, int flags, int perms);
-extern int PCcreat(char* name, int perms);
-extern int PClseek(uintptr_t fd, int offset, int mode);
-extern int PCread(uintptr_t fd, char* buff, int len);
-extern int PCwrite(uintptr_t fd, char* buff, int len);
-extern int PCclose(uintptr_t fd);
-
-#if defined(_LANGUAGE_C_PLUS_PLUS)||defined(__cplusplus)||defined(c_plusplus)
-}
-#endif
-
-
-#endif
\ No newline at end of file
diff --git a/rebuild_PC/PsyCross/include/psx/libspu.h b/rebuild_PC/PsyCross/include/psx/libspu.h
deleted file mode 100644
index 1a5d876ca..000000000
--- a/rebuild_PC/PsyCross/include/psx/libspu.h
+++ /dev/null
@@ -1,533 +0,0 @@
-#ifndef LIBSPU_H
-#define LIBSPU_H
-
-/* ----------------------------------------------------------------
- * CONSTANT
- * ---------------------------------------------------------------- */
-
-#define SPU_SUCCESS 0
-#define SPU_INVALID_ARGS (-3)
-#define SPU_DIAG (-2)
-#define SPU_CHECK (-1)
-#define SPU_OFF 0
-#define SPU_ON 1
-#define SPU_CLEAR 2
-#define SPU_RESET 3
-#define SPU_DONT_CARE 4
-#define SPU_ALL 0
-#define SPU_CDONLY 5
-#define SPU_VOICEONLY 6
-#define SPU_CONT 7
-#define SPU_BIT 8
-#define SPU_NULL 0
-/* Macros below will be obsoleted. */
-#define SpuDiag SPU_DIAG
-#define SpuCheck SPU_CHECK
-#define SpuOff SPU_OFF
-#define SpuOn SPU_ON
-#define SpuClear SPU_CLEAR
-#define SpuReset SPU_RESET
-#define SpuDontCare SPU_DONT_CARE
-#define SpuALL SPU_ALL
-#define SpuCDOnly SPU_CDONLY
-#define SpuVoiceOnly SPU_VOICEONLY
-#define SpuCont SPU_CONT
-#define SpuNull SPU_NULL
-
-#define SPU_OFF_ENV_ON 2
-#define SPU_ON_ENV_OFF 3
-/* Macros below will be obsoleted. */
-#define SpuOffEnvOn SPU_OFF_ENV_ON
-#define SpuOnEnvOff SPU_ON_ENV_OFF
-
-#define SPU_ERROR (-1)
-/* Macros below will be obsoleted. */
-#define SpuError SPU_ERROR
-
-#define SPU_TRANSFER_BY_DMA 0L
-#define SPU_TRANSFER_BY_IO 1L
-/* Macros below will be obsoleted. */
-#define SpuTransferByDMA SPU_TRANSFER_BY_DMA
-#define SpuTransferByIO SPU_TRANSFER_BY_IO
-#define SpuTransByDMA SpuTransferByDMA
-#define SpuTransByIO SpuTransferByIO
-
-#define SPU_TRANSFER_WAIT 1
-#define SPU_TRANSFER_PEEK 0
-#define SPU_TRANSFER_GLANCE SPU_TRANSFER_PEEK
-
-/*
- * Voice designate
- */
-
-#ifndef __SPU_VOICE
-#define __SPU_VOICE
-
-#define SPU_00CH (0x1L<< 0)
-#define SPU_01CH (0x1L<< 1)
-#define SPU_02CH (0x1L<< 2)
-#define SPU_03CH (0x1L<< 3)
-#define SPU_04CH (0x1L<< 4)
-#define SPU_05CH (0x1L<< 5)
-#define SPU_06CH (0x1L<< 6)
-#define SPU_07CH (0x1L<< 7)
-#define SPU_08CH (0x1L<< 8)
-#define SPU_09CH (0x1L<< 9)
-#define SPU_10CH (0x1L<<10)
-#define SPU_11CH (0x1L<<11)
-#define SPU_12CH (0x1L<<12)
-#define SPU_13CH (0x1L<<13)
-#define SPU_14CH (0x1L<<14)
-#define SPU_15CH (0x1L<<15)
-#define SPU_16CH (0x1L<<16)
-#define SPU_17CH (0x1L<<17)
-#define SPU_18CH (0x1L<<18)
-#define SPU_19CH (0x1L<<19)
-
-#define SPU_20CH (0x1L<<20)
-#define SPU_21CH (0x1L<<21)
-#define SPU_22CH (0x1L<<22)
-#define SPU_23CH (0x1L<<23)
-
-#define SPU_0CH SPU_00CH
-#define SPU_1CH SPU_01CH
-#define SPU_2CH SPU_02CH
-#define SPU_3CH SPU_03CH
-#define SPU_4CH SPU_04CH
-#define SPU_5CH SPU_05CH
-#define SPU_6CH SPU_06CH
-#define SPU_7CH SPU_07CH
-#define SPU_8CH SPU_08CH
-#define SPU_9CH SPU_09CH
-
-#define SPU_ALLCH (SPU_00CH | SPU_01CH | SPU_02CH | SPU_03CH | SPU_04CH | \
- SPU_05CH | SPU_06CH | SPU_07CH | SPU_08CH | SPU_09CH | \
- SPU_10CH | SPU_11CH | SPU_12CH | SPU_13CH | SPU_14CH | \
- SPU_15CH | SPU_16CH | SPU_17CH | SPU_18CH | SPU_19CH | \
- SPU_20CH | SPU_21CH | SPU_22CH | SPU_23CH)
-
-#define SPU_KEYCH(x) (0x1L<<(x))
-#define SPU_VOICECH(x) SPU_KEYCH(x)
-
-#endif /* __SPU_VOICE */
-
-/* for Voice setting */
-
-#define SPU_VOICE_VOLL (0x01 << 0) /* volume (left) */
-#define SPU_VOICE_VOLR (0x01 << 1) /* volume (right) */
-#define SPU_VOICE_VOLMODEL (0x01 << 2) /* volume mode (left) */
-#define SPU_VOICE_VOLMODER (0x01 << 3) /* volume mode (right) */
-#define SPU_VOICE_PITCH (0x01 << 4) /* tone (pitch setting) */
-#define SPU_VOICE_NOTE (0x01 << 5) /* tone (note setting) */
-#define SPU_VOICE_SAMPLE_NOTE (0x01 << 6) /* waveform data sample note */
-#define SPU_VOICE_WDSA (0x01 << 7) /* waveform data start address */
-#define SPU_VOICE_ADSR_AMODE (0x01 << 8) /* ADSR Attack rate mode */
-#define SPU_VOICE_ADSR_SMODE (0x01 << 9) /* ADSR Sustain rate mode */
-#define SPU_VOICE_ADSR_RMODE (0x01 << 10) /* ADSR Release rate mode */
-#define SPU_VOICE_ADSR_AR (0x01 << 11) /* ADSR Attack rate */
-#define SPU_VOICE_ADSR_DR (0x01 << 12) /* ADSR Decay rate */
-#define SPU_VOICE_ADSR_SR (0x01 << 13) /* ADSR Sustain rate */
-#define SPU_VOICE_ADSR_RR (0x01 << 14) /* ADSR Release rate */
-#define SPU_VOICE_ADSR_SL (0x01 << 15) /* ADSR Sustain level */
-#define SPU_VOICE_LSAX (0x01 << 16) /* start address for loop */
-#define SPU_VOICE_ADSR_ADSR1 (0x01 << 17) /* ADSR adsr1 for `VagAtr' */
-#define SPU_VOICE_ADSR_ADSR2 (0x01 << 18) /* ADSR adsr2 for `VagAtr' */
-
-#define SPU_VOICE_DIRECT16 0
-#define SPU_VOICE_LINEARIncN 1
-#define SPU_VOICE_LINEARIncR 2
-#define SPU_VOICE_LINEARDecN 3
-#define SPU_VOICE_LINEARDecR 4
-#define SPU_VOICE_EXPIncN 5
-#define SPU_VOICE_EXPIncR 6
-#define SPU_VOICE_EXPDec 7
-#define SPU_VOICE_EXPDecN SPU_VOICE_EXPDec
-#define SPU_VOICE_EXPDecR SPU_VOICE_EXPDec
-
-#define SPU_DECODED_FIRSTHALF 0
-#define SPU_DECODED_SECONDHALF 1
-#define SPU_DECODE_FIRSTHALF SPU_DECODED_FIRSTHALF
-#define SPU_DECODE_SECONDHALF SPU_DECODED_SECONDHALF
-
-
-#define SPU_COMMON_MVOLL (0x01 << 0) /* master volume (left) */
-#define SPU_COMMON_MVOLR (0x01 << 1) /* master volume (right) */
-#define SPU_COMMON_MVOLMODEL (0x01 << 2) /* master volume mode (left) */
-#define SPU_COMMON_MVOLMODER (0x01 << 3) /* master volume mode (right) */
-#define SPU_COMMON_RVOLL (0x01 << 4) /* reverb volume (left) */
-#define SPU_COMMON_RVOLR (0x01 << 5) /* reverb volume (right) */
-#define SPU_COMMON_CDVOLL (0x01 << 6) /* CD input volume (left) */
-#define SPU_COMMON_CDVOLR (0x01 << 7) /* CD input volume (right) */
-#define SPU_COMMON_CDREV (0x01 << 8) /* CD input reverb on/off */
-#define SPU_COMMON_CDMIX (0x01 << 9) /* CD input on/off */
-#define SPU_COMMON_EXTVOLL (0x01 << 10) /* external digital input volume (left) */
-#define SPU_COMMON_EXTVOLR (0x01 << 11) /* external digital input volume (right) */
-#define SPU_COMMON_EXTREV (0x01 << 12) /* external digital input reverb on/off */
-#define SPU_COMMON_EXTMIX (0x01 << 13) /* external digital input on/off */
-
-/* for Reverb setting */
-
-#define SPU_REV_MODE (0x01 << 0) /* mode setting */
-#define SPU_REV_DEPTHL (0x01 << 1) /* reverb depth (left) */
-#define SPU_REV_DEPTHR (0x01 << 2) /* reverb depth (right) */
-#define SPU_REV_DELAYTIME (0x01 << 3) /* Delay Time (ECHO, DELAY only) */
-#define SPU_REV_FEEDBACK (0x01 << 4) /* Feedback (ECHO only) */
-
-#define SPU_REV_MODE_CHECK (-1)
-#define SPU_REV_MODE_OFF 0
-#define SPU_REV_MODE_ROOM 1
-#define SPU_REV_MODE_STUDIO_A 2
-#define SPU_REV_MODE_STUDIO_B 3
-#define SPU_REV_MODE_STUDIO_C 4
-#define SPU_REV_MODE_HALL 5
-#define SPU_REV_MODE_SPACE 6
-#define SPU_REV_MODE_ECHO 7
-#define SPU_REV_MODE_DELAY 8
-#define SPU_REV_MODE_PIPE 9
-#define SPU_REV_MODE_MAX 10
-
-#define SPU_REV_MODE_CLEAR_WA 0x100
-
-/* ----------------------------------------------------------------
- * Event flushing
- * ---------------------------------------------------------------- */
-
-#define SPU_EVENT_KEY (0x01 << 0)
-#define SPU_EVENT_PITCHLFO (0x01 << 1)
-#define SPU_EVENT_NOISE (0x01 << 2)
-#define SPU_EVENT_REVERB (0x01 << 3)
-
-#define SPU_EVENT_ALL 0
-
-/* ----------------------------------------------------------------
- * Structure
- * ---------------------------------------------------------------- */
-
-typedef struct {
- short left; /* Lch */
- short right; /* Rch */
-} SpuVolume;
-
-typedef struct {
- unsigned long voice; /* set voice:
- SpuSetVoiceAttr: each voice is a bit array
- SpuGetVoiceAttr: voice is a bit value */
- unsigned long mask; /* settings attribute bit (invalid with Get) */
- SpuVolume volume; /* volume */
- SpuVolume volmode; /* volume mode */
- SpuVolume volumex; /* current volume (invalid with Set) */
- unsigned short pitch; /* tone (pitch setting) */
- unsigned short note; /* tone (note setting) */
- unsigned short sample_note; /* tone (note setting) */
- short envx; /* current envelope value (invalid with Set) */
- unsigned long addr; /* waveform data start address */
- unsigned long loop_addr; /* loop start address */
- long a_mode; /* Attack rate mode */
- long s_mode; /* Sustain rate mode */
- long r_mode; /* Release rate mode */
- unsigned short ar; /* Attack rate */
- unsigned short dr; /* Decay rate */
- unsigned short sr; /* Sustain rate */
- unsigned short rr; /* Release rate */
- unsigned short sl; /* Sustain level */
- unsigned short adsr1; /* adsr1 for `VagAtr' */
- unsigned short adsr2; /* adsr2 for `VagAtr' */
-} SpuVoiceAttr;
-
-typedef struct {
- short voiceNum; /* voice number */
- short pad; /* padding */
- SpuVoiceAttr attr; /* voice attribute */
-} SpuLVoiceAttr;
-
-typedef struct {
- unsigned long mask; /* settings mask */
-
- long mode; /* reverb mode */
- SpuVolume depth; /* reverb depth */
- long delay; /* Delay Time (ECHO, DELAY only) */
- long feedback; /* Feedback (ECHO only) */
-} SpuReverbAttr;
-
-#define SPU_DECODEDDATA_SIZE 0x200
-#define SPU_DECODEDATA_SIZE SPU_DECODEDDATA_SIZE
-typedef struct {
- short cd_left [SPU_DECODEDDATA_SIZE];
- short cd_right [SPU_DECODEDDATA_SIZE];
- short voice1 [SPU_DECODEDDATA_SIZE];
- short voice3 [SPU_DECODEDDATA_SIZE];
-} SpuDecodedData;
-typedef SpuDecodedData SpuDecodeData;
-
-typedef struct {
- SpuVolume volume; /* volume */
- long reverb; /* reverb on/off */
- long mix; /* mixing on/off */
-} SpuExtAttr;
-
-typedef struct {
- unsigned long mask; /* settings mask */
-
- SpuVolume mvol; /* master volume */
- SpuVolume mvolmode; /* master volume mode */
- SpuVolume mvolx; /* current master volume */
- SpuExtAttr cd; /* CD input attributes */
- SpuExtAttr ext; /* external digital input attributes */
-} SpuCommonAttr;
-
-#ifndef __SPU_IRQCALLBACK_PROC
-#define __SPU_IRQCALLBACK_PROC
-typedef void (*SpuIRQCallbackProc)(void);
-#endif /* __SPU_IRQCALLBACK_PROC */
-#ifndef __SPU_TRANSFERCALLBACK_PROC
-#define __SPU_TRANSFERCALLBACK_PROC
-typedef void (*SpuTransferCallbackProc)(void);
-#endif /* __SPU_TRANSFERCALLBACK_PROC */
-
-/* ----------------------------------------------------------------
- * for SPU Malloc (used in SpuInitMalloc())
- * ---------------------------------------------------------------- */
-
-#define SPU_MALLOC_RECSIZ 8
-
-/* ----------------------------------------------------------------
- * User specifiable global environment
- * ---------------------------------------------------------------- */
-
-typedef struct {
- unsigned long mask;
- unsigned long queueing;
-} SpuEnv;
-
-#define SPU_ENV_EVENT_QUEUEING (0x01 << 0)
-
-/* ----------------------------------------------------------------
- * prototype declaration
- * ---------------------------------------------------------------- */
-
-#if defined(_LANGUAGE_C_PLUS_PLUS) || defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
-extern void SpuInit (void);
-extern void SpuInitHot (void);
-extern void SpuStart (void);
-extern void SpuQuit (void);
-extern long SpuSetMute (long on_off);
-extern long SpuGetMute (void);
-extern void SpuSetEnv (SpuEnv *env);
-
-extern long SpuSetNoiseClock (long n_clock);
-extern long SpuGetNoiseClock (void);
-extern unsigned long SpuSetNoiseVoice (long on_off, unsigned long voice_bit);
-extern unsigned long SpuGetNoiseVoice (void);
-
-extern long SpuSetReverb (long on_off);
-extern long SpuGetReverb (void);
-extern long SpuSetReverbModeParam (SpuReverbAttr *attr);
-extern void SpuGetReverbModeParam (SpuReverbAttr *attr);
-extern long SpuSetReverbDepth (SpuReverbAttr *attr);
-extern long SpuReserveReverbWorkArea (long on_off);
-extern long SpuIsReverbWorkAreaReserved (long on_off);
-extern unsigned long SpuSetReverbVoice (long on_off, unsigned long voice_bit);
-extern unsigned long SpuGetReverbVoice (void);
-extern long SpuClearReverbWorkArea (long mode);
-
-extern unsigned long SpuWrite (unsigned char *addr, unsigned long size);
-extern unsigned long SpuWrite0 (unsigned long size);
-extern unsigned long SpuRead (unsigned char *addr, unsigned long size);
-extern long SpuSetTransferMode (long mode);
-#define SpuSetTransMode(mode) SpuSetTransferMode((mode))
-extern long SpuGetTransferMode (void);
-#define SpuGetTransMode() SpuGetTransferMode()
-extern unsigned long SpuSetTransferStartAddr (unsigned long addr);
-#define SpuSetTransStartAddr(addr) SpuSetTransferStartAddr((addr))
-extern unsigned long SpuGetTransferStartAddr (void);
-#define SpuGetTransStartAddr() SpuGetTransferStartAddr()
-extern unsigned long SpuWritePartly (unsigned char *addr, unsigned long size);
-
-extern long SpuIsTransferCompleted (long flag);
-extern SpuTransferCallbackProc SpuSetTransferCallback (SpuTransferCallbackProc func);
-extern long SpuReadDecodedData (SpuDecodedData *d_data, long flag);
-#define SpuReadDecodeData(d_data,flag) SpuReadDecodedData((d_data), (flag))
-
-extern long SpuSetIRQ (long on_off);
-extern long SpuGetIRQ (void);
-extern unsigned long SpuSetIRQAddr (unsigned long);
-extern unsigned long SpuGetIRQAddr (void);
-extern SpuIRQCallbackProc SpuSetIRQCallback (SpuIRQCallbackProc);
-
-extern void SpuSetVoiceAttr (SpuVoiceAttr *arg);
-extern void SpuGetVoiceAttr (SpuVoiceAttr *arg);
-extern void SpuSetKey (long on_off, unsigned long voice_bit);
-extern void SpuSetKeyOnWithAttr (SpuVoiceAttr *attr);
-extern long SpuGetKeyStatus (unsigned long voice_bit);
-extern void SpuGetAllKeysStatus (char *status);
-extern unsigned long SpuFlush (unsigned long ev);
-
-extern unsigned long SpuSetPitchLFOVoice (long on_off, unsigned long voice_bit);
-extern unsigned long SpuGetPitchLFOVoice (void);
-
-extern void SpuSetCommonAttr (SpuCommonAttr *attr);
-extern void SpuGetCommonAttr (SpuCommonAttr *attr);
-
-extern long SpuInitMalloc (long num, char *top);
-extern long SpuMalloc (long size);
-extern long SpuMallocWithStartAddr (unsigned long addr, long size);
-extern void SpuFree (unsigned long addr);
-
-extern long SpuRGetAllKeysStatus (long min_, long max_, char *status);
-extern long SpuRSetVoiceAttr (long min_, long max_, SpuVoiceAttr *arg);
-
-extern void SpuNSetVoiceAttr (int vNum, SpuVoiceAttr *arg);
-extern void SpuNGetVoiceAttr (int vNum, SpuVoiceAttr *arg);
-
-extern void SpuLSetVoiceAttr (int num, SpuLVoiceAttr *argList);
-
-extern void SpuSetVoiceVolume (int vNum, short volL, short volR);
-extern void SpuSetVoiceVolumeAttr (int vNum, short volL, short volR,
- short volModeL, short volModeR);
-extern void SpuSetVoicePitch (int vNum, unsigned short pitch);
-extern void SpuSetVoiceNote (int vNum, unsigned short note);
-extern void SpuSetVoiceSampleNote (int vNum, unsigned short sampleNote);
-extern void SpuSetVoiceStartAddr (int vNum, unsigned long startAddr);
-extern void SpuSetVoiceLoopStartAddr (int vNum, unsigned long lsa);
-extern void SpuSetVoiceAR (int vNum, unsigned short AR);
-extern void SpuSetVoiceDR (int vNum, unsigned short DR);
-extern void SpuSetVoiceSR (int vNum, unsigned short SR);
-extern void SpuSetVoiceRR (int vNum, unsigned short RR);
-extern void SpuSetVoiceSL (int vNum, unsigned short SL);
-extern void SpuSetVoiceARAttr (int vNum, unsigned short AR, long ARmode);
-extern void SpuSetVoiceSRAttr (int vNum, unsigned short SR, long SRmode);
-extern void SpuSetVoiceRRAttr (int vNum, unsigned short RR, long RRmode);
-extern void SpuSetVoiceADSR (int vNum, unsigned short AR, unsigned short DR,
- unsigned short SR, unsigned short RR,
- unsigned short SL);
-extern void SpuSetVoiceADSRAttr (int vNum,
- unsigned short AR, unsigned short DR,
- unsigned short SR, unsigned short RR,
- unsigned short SL,
- long ARmode, long SRmode, long RRmode);
-
-extern void SpuGetVoiceVolume (int vNum, short *volL, short *volR);
-extern void SpuGetVoiceVolumeAttr (int vNum, short *volL, short *volR,
- short *volModeL, short *volModeR);
-extern void SpuGetVoiceVolumeX (int vNum, short *volXL, short *volXR);
-extern void SpuGetVoicePitch (int vNum, unsigned short *pitch);
-extern void SpuGetVoiceNote (int vNum, unsigned short *note);
-extern void SpuGetVoiceSampleNote (int vNum, unsigned short *sampleNote);
-extern void SpuGetVoiceEnvelope (int vNum, short *envx);
-extern void SpuGetVoiceStartAddr (int vNum, unsigned long *startAddr);
-extern void SpuGetVoiceLoopStartAddr (int vNum, unsigned long *loopStartAddr);
-extern void SpuGetVoiceAR (int vNum, unsigned short *AR);
-extern void SpuGetVoiceDR (int vNum, unsigned short *DR);
-extern void SpuGetVoiceSR (int vNum, unsigned short *SR);
-extern void SpuGetVoiceRR (int vNum, unsigned short *RR);
-extern void SpuGetVoiceSL (int vNum, unsigned short *SL);
-extern void SpuGetVoiceARAttr (int vNum, unsigned short *AR, long *ARmode);
-extern void SpuGetVoiceSRAttr (int vNum, unsigned short *SR, long *SRmode);
-extern void SpuGetVoiceRRAttr (int vNum, unsigned short *RR, long *RRmode);
-extern void SpuGetVoiceADSR (int vNum,
- unsigned short *AR, unsigned short *DR,
- unsigned short *SR, unsigned short *RR,
- unsigned short *SL);
-extern void SpuGetVoiceADSRAttr (int vNum,
- unsigned short *AR, unsigned short *DR,
- unsigned short *SR, unsigned short *RR,
- unsigned short *SL,
- long *ARmode, long *SRmode, long *RRmode);
-extern void SpuGetVoiceEnvelopeAttr (int vNum, long *keyStat, short *envx );
-
-extern void SpuSetCommonMasterVolume (short mvol_left, short mvol_right);
-extern void SpuSetCommonMasterVolumeAttr (short mvol_left, short mvol_right,
- short mvolmode_left,
- short mvolmode_right);
-extern void SpuSetCommonCDMix (long cd_mix);
-extern void SpuSetCommonCDVolume (short cd_left, short cd_right);
-extern void SpuSetCommonCDReverb (long cd_reverb);
-
-extern void SpuGetCommonMasterVolume (short *mvol_left, short *mvol_right);
-extern void SpuGetCommonMasterVolumeX (short *mvolx_left, short *mvolx_right);
-extern void SpuGetCommonMasterVolumeAttr (short *mvol_left, short *mvol_right,
- short *mvolmode_left,
- short *mvolmode_right);
-extern void SpuGetCommonCDMix (long *cd_mix);
-extern void SpuGetCommonCDVolume (short *cd_left, short *cd_right);
-extern void SpuGetCommonCDReverb (long *cd_reverb);
-
-extern long SpuSetReverbModeType (long mode);
-extern void SpuSetReverbModeDepth (short depth_left, short depth_right);
-extern void SpuSetReverbModeDelayTime (long delay);
-extern void SpuSetReverbModeFeedback (long feedback);
-extern void SpuGetReverbModeType (long *mode);
-extern void SpuGetReverbModeDepth (short *depth_left, short *depth_right);
-extern void SpuGetReverbModeDelayTime (long *delay);
-extern void SpuGetReverbModeFeedback (long *feedback);
-extern void SpuSetESA( long revAddr );
-#if defined(_LANGUAGE_C_PLUS_PLUS) || defined(__cplusplus) || defined(c_plusplus)
-}
-#endif
-
-/* ---------------------------------------------------------------- */
-
-#define SPU_ST_NOT_AVAILABLE 0
-#define SPU_ST_ACCEPT 1
-
-#define SPU_ST_ERROR (-1)
-#define SPU_ST_INVALID_ARGUMENT (-2)
-#define SPU_ST_WRONG_STATUS (-3)
-
-#define SPU_ST_STOP 2
-#define SPU_ST_IDLE 3
-#define SPU_ST_PREPARE 4
-#define SPU_ST_START 5
-#define SPU_ST_PLAY 6
-#define SPU_ST_TRANSFER 7
-#define SPU_ST_FINAL 8
-
-
-/* VAG's header size */
-#define SPU_ST_VAG_HEADER_SIZE 0x30
-
-typedef struct {
- char status; /* stream status */
- char pad1; /* padding */
- char pad2; /* padding */
- char pad3; /* padding */
- long last_size; /* the size of last transferring
- (last_size <= (size / 2)) */
- unsigned long buf_addr; /* The start address of stream buffer */
- unsigned long data_addr; /* The start address of SPU streaming
- data in main memory */
-} SpuStVoiceAttr;
-
-typedef struct {
- long size; /* The size of stream buffer */
- long low_priority; /* transfer priority */
- SpuStVoiceAttr voice [24];
-} SpuStEnv;
-
-#ifndef __SPU_ST_TRANSFERCALLBACK_PROC
-#define __SPU_ST_TRANSFERCALLBACK_PROC
-typedef void (*SpuStCallbackProc)(unsigned long, long);
-#endif /* __SPU_TRANSFERCALLBACK_PROC */
-
-#if defined(_LANGUAGE_C_PLUS_PLUS) || defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
-extern SpuStEnv *SpuStInit (long);
-extern long SpuStQuit (void);
-extern long SpuStGetStatus (void);
-extern unsigned long SpuStGetVoiceStatus (void);
-extern long SpuStTransfer (long flag, unsigned long voice_bit);
-extern SpuStCallbackProc SpuStSetPreparationFinishedCallback (SpuStCallbackProc func);
-extern SpuStCallbackProc SpuStSetTransferFinishedCallback (SpuStCallbackProc func);
-extern SpuStCallbackProc SpuStSetStreamFinishedCallback (SpuStCallbackProc func);
-#if defined(_LANGUAGE_C_PLUS_PLUS) || defined(__cplusplus) || defined(c_plusplus)
-}
-#endif
-
-/* ----------------------------------------------------------------
- * End on File
- * ---------------------------------------------------------------- */
-#endif /* _LIBSPU_H_ */
-/* DON'T ADD STUFF AFTER THIS */
diff --git a/rebuild_PC/PsyCross/include/psx/r3000.h b/rebuild_PC/PsyCross/include/psx/r3000.h
deleted file mode 100644
index 38453a087..000000000
--- a/rebuild_PC/PsyCross/include/psx/r3000.h
+++ /dev/null
@@ -1,235 +0,0 @@
-#ifndef R3000_H
-#define R3000_H
-
-#define K0BASE 0x80000000
-#define K0SIZE 0x20000000
-#define K1BASE 0xA0000000
-#define K1SIZE 0x20000000
-#define K2BASE 0xC0000000
-#define K2SIZE 0x20000000
-
-
-
-#define UT_VEC K0BASE /* utlbmiss vector */
-#define E_VEC (K0BASE+0x80) /* exception vector */
-#define R_VEC (K1BASE+0x1fc00000) /* reset vector */
-
-/*
- * Address conversion macros
- */
-#define K0_TO_K1(x) ((unsigned)(x)|0xA0000000) /* kseg0 to kseg1 */
-#define K1_TO_K0(x) ((unsigned)(x)&0x9FFFFFFF) /* kseg1 to kseg0 */
-#define K0_TO_PHYS(x) ((unsigned)(x)&0x1FFFFFFF) /* kseg0 to physical */
-#define K1_TO_PHYS(x) ((unsigned)(x)&0x1FFFFFFF) /* kseg1 to physical */
-#define PHYS_TO_K0(x) ((unsigned)(x)|0x80000000) /* physical to kseg0 */
-#define PHYS_TO_K1(x) ((unsigned)(x)|0xA0000000) /* physical to kseg1 */
-
-/*
- * Address predicates
- */
-#define IS_KSEG0(x) ((unsigned)(x) >= K0BASE && (unsigned)(x) < K1BASE)
-#define IS_KSEG1(x) ((unsigned)(x) >= K1BASE && (unsigned)(x) < K2BASE)
-#define IS_KSEG2(x) ((unsigned)(x) >= K2BASE && (unsigned)(x) < KPTEBASE)
-#define IS_KPTESEG(x) ((unsigned)(x) >= KPTEBASE)
-#define IS_KUSEG(x) ((unsigned)(x) < K0BASE)
-
-/*
- * Cache size constants
- */
-#define MINCACHE +(4*1024) /* leading plus for mas's benefit */
-#define MAXCACHE +(64*1024) /* leading plus for mas's benefit */
-
-
-/*
- * Status register
- */
-#define SR_CUMASK 0xf0000000 /* coproc usable bits */
-
-#define SR_CU3 0x80000000 /* Coprocessor 3 usable */
-#define SR_CU2 0x40000000 /* Coprocessor 2 usable */
-#define SR_CU1 0x20000000 /* Coprocessor 1 usable */
-#define SR_CU0 0x10000000 /* Coprocessor 0 usable */
-
-#define SR_BEV 0x00400000 /* use boot exception vectors */
-
-/* Cache control bits */
-#define SR_TS 0x00200000 /* TLB shutdown */
-#define SR_PE 0x00100000 /* cache parity error */
-#define SR_CM 0x00080000 /* cache miss */
-#define SR_PZ 0x00040000 /* cache parity zero */
-#define SR_SWC 0x00020000 /* swap cache */
-#define SR_ISC 0x00010000 /* Isolate data cache */
-
-#define SR_MM_MODE 0x00010000 /* lwl/swl/etc become scache/etc */
-#define lcache lwl
-#define scache swl
-#define flush lwr $0,
-#define inval swr $0,
-
-/*
- * Interrupt enable bits
- * (NOTE: bits set to 1 enable the corresponding level interrupt)
- */
-#define SR_IMASK 0x0000ff00 /* Interrupt mask */
-#define SR_IMASK8 0x00000000 /* mask level 8 */
-#define SR_IMASK7 0x00008000 /* mask level 7 */
-#define SR_IMASK6 0x0000c000 /* mask level 6 */
-#define SR_IMASK5 0x0000e000 /* mask level 5 */
-#define SR_IMASK4 0x0000f000 /* mask level 4 */
-#define SR_IMASK3 0x0000f800 /* mask level 3 */
-#define SR_IMASK2 0x0000fc00 /* mask level 2 */
-#define SR_IMASK1 0x0000fe00 /* mask level 1 */
-#define SR_IMASK0 0x0000ff00 /* mask level 0 */
-
-#define SR_IBIT8 0x00008000 /* bit level 8 */
-#define SR_IBIT7 0x00004000 /* bit level 7 */
-#define SR_IBIT6 0x00002000 /* bit level 6 */
-#define SR_IBIT5 0x00001000 /* bit level 5 */
-#define SR_IBIT4 0x00000800 /* bit level 4 */
-#define SR_IBIT3 0x00000400 /* bit level 3 */
-#define SR_IBIT2 0x00000200 /* bit level 2 */
-#define SR_IBIT1 0x00000100 /* bit level 1 */
-
-#define SR_KUO 0x00000020 /* old kernel/user, 0 => k, 1 => u */
-#define SR_IEO 0x00000010 /* old interrupt enable, 1 => enable */
-#define SR_KUP 0x00000008 /* prev kernel/user, 0 => k, 1 => u */
-#define SR_IEP 0x00000004 /* prev interrupt enable, 1 => enable */
-#define SR_KUC 0x00000002 /* cur kernel/user, 0 => k, 1 => u */
-#define SR_IEC 0x00000001 /* cur interrupt enable, 1 => enable */
-
-#define SR_IMASKSHIFT 8
-
-#define SR_FMT "\20\40BD\26TS\25PE\24CM\23PZ\22SwC\21IsC\20IM7\17IM6\16IM5\15IM4\14IM3\13IM2\12IM1\11IM0\6KUo\5IEo\4KUp\3IEp\2KUc\1IEc"
-
-/*
- * Cause Register
- */
-#define CAUSE_BD 0x80000000 /* Branch delay slot */
-#define CAUSE_CEMASK 0x30000000 /* coprocessor error */
-#define CAUSE_CESHIFT 28
-
-/* Interrupt pending bits */
-#define CAUSE_IP8 0x00008000 /* External level 8 pending */
-#define CAUSE_IP7 0x00004000 /* External level 7 pending */
-#define CAUSE_IP6 0x00002000 /* External level 6 pending */
-#define CAUSE_IP5 0x00001000 /* External level 5 pending */
-#define CAUSE_IP4 0x00000800 /* External level 4 pending */
-#define CAUSE_IP3 0x00000400 /* External level 3 pending */
-#define CAUSE_SW2 0x00000200 /* Software level 2 pending */
-#define CAUSE_SW1 0x00000100 /* Software level 1 pending */
-
-#define CAUSE_IPMASK 0x0000FF00 /* Pending interrupt mask */
-#define CAUSE_IPSHIFT 8
-
-#define CAUSE_EXCMASK 0x0000003C /* Cause code bits */
-#define CAUSE_EXCSHIFT 2
-
-#define CAUSE_FMT "\20\40BD\36CE1\35CE0\20IP8\17IP7\16IP6\15IP5\14IP4\13IP3\12SW2\11SW1\1INT"
-
-/* Cause register exception codes */
-
-#define EXC_CODE(x) ((x)<<2)
-
-/* Hardware exception codes */
-#define EXC_INT EXC_CODE(0) /* interrupt */
-#define EXC_MOD EXC_CODE(1) /* TLB mod */
-#define EXC_RMISS EXC_CODE(2) /* Read TLB Miss */
-#define EXC_WMISS EXC_CODE(3) /* Write TLB Miss */
-#define EXC_RADE EXC_CODE(4) /* Read Address Error */
-#define EXC_WADE EXC_CODE(5) /* Write Address Error */
-#define EXC_IBE EXC_CODE(6) /* Instruction Bus Error */
-#define EXC_DBE EXC_CODE(7) /* Data Bus Error */
-#define EXC_SYSCALL EXC_CODE(8) /* SYSCALL */
-#define EXC_BREAK EXC_CODE(9) /* BREAKpoint */
-#define EXC_II EXC_CODE(10) /* Illegal Instruction */
-#define EXC_CPU EXC_CODE(11) /* CoProcessor Unusable */
-#define EXC_OV EXC_CODE(12) /* OVerflow */
-
-/* software exception codes */
-#define SEXC_SEGV EXC_CODE(16) /* Software detected seg viol */
-#define SEXC_RESCHED EXC_CODE(17) /* resched request */
-#define SEXC_PAGEIN EXC_CODE(18) /* page-in request */
-#define SEXC_CPU EXC_CODE(19) /* coprocessor unusable */
-
-
-/*
- * Coprocessor 0 registers
- */
-#define C0_INX $0 /* tlb index */
-#define C0_RAND $1 /* tlb random */
-#define C0_TLBLO $2 /* tlb entry low */
-
-#define C0_CTXT $4 /* tlb context */
-
-#define C0_PIDMASK $6 /* Mips2 */
-
-#define C0_BADVADDR $8 /* bad virtual address */
-
-#define C0_TLBHI $10 /* tlb entry hi */
-#define C0_PID $10 /* Mips2 */
-
-#define C0_SR $12 /* status register */
-#define C0_CAUSE $13 /* exception cause */
-#define C0_EPC $14 /* exception pc */
-#define C0_PRID $15 /* revision identifier */
-#define C0_ERREG $16 /* Mips2 */
-
-/*
- * Coprocessor 0 operations
- */
-#define C0_READI 0x1 /* read ITLB entry addressed by C0_INDEX */
-#define C0_WRITEI 0x2 /* write ITLB entry addressed by C0_INDEX */
-#define C0_WRITER 0x6 /* write ITLB entry addressed by C0_RAND */
-#define C0_PROBE 0x8 /* probe for ITLB entry addressed by TLBHI */
-#define C0_RFE 0x10 /* restore for exception */
-
-/*
- * Flags for the nofault handler. 0 means no fault is expected.
- */
-#define NF_BADADDR 1 /* badaddr, wbadaddr */
-#define NF_COPYIO 2 /* copyin, copyout */
-#define NF_ADDUPC 3 /* addupc */
-#define NF_FSUMEM 4 /* fubyte, subyte, fuword, suword */
-#define NF_USERACC 5 /* useracc */
-#define NF_SOFTFP 6 /* softfp */
-#define NF_REVID 7 /* revision ids */
-#define NF_NENTRIES 8
-
-/*
- * TLB size constants
- */
-#define TLBWIREDBASE 0 /* WAG for now */
-#define NWIREDENTRIES 8 /* WAG for now */
-#define TLBRANDOMBASE NWIREDENTRIES
-#define NRANDOMENTRIES (NTLBENTRIES-NWIREDENTRIES)
-#define NTLBENTRIES 64 /* WAG for now */
-
-#define TLBRAND_RANDMASK 0x00003f00
-#define TLBRAND_RANDSHIFT 8
-
-
-/*
- * Chip interrupt vector
- */
-#define NC0VECS 8
-#ifndef LOCORE
-#ifdef KERNEL
-#if defined(_LANGUAGE_C_PLUS_PLUS)||defined(__cplusplus)||defined(c_plusplus)
-extern "C" {
-#endif
-extern int (*c0vec_tbl[])();
-#if defined(_LANGUAGE_C_PLUS_PLUS)||defined(__cplusplus)||defined(c_plusplus)
-}
-#endif
-#endif
-#endif /* !LOCORE */
-
-#define BRK_KERNEL 0xf1
-#define EXCEPT_NORM 1
-#define EXCEPT_UTLB 2
-#define EXCEPT_BRKPT 3
-#define EXCEPT_DB 4
-#define EXCEPT_GDB 4
-#define EXCEPT_INT 9
-#define EXCEPT_ELSE 0xff
-#endif /* _R3000_H */
diff --git a/rebuild_PC/PsyCross/include/psx/rand.h b/rebuild_PC/PsyCross/include/psx/rand.h
deleted file mode 100644
index 54eac6826..000000000
--- a/rebuild_PC/PsyCross/include/psx/rand.h
+++ /dev/null
@@ -1,7 +0,0 @@
-#ifndef RAND_H
-#define RAND_H
-
-#include
-#include
-
-#endif
\ No newline at end of file
diff --git a/rebuild_PC/PsyCross/include/psx/strings.h b/rebuild_PC/PsyCross/include/psx/strings.h
deleted file mode 100644
index 962883249..000000000
--- a/rebuild_PC/PsyCross/include/psx/strings.h
+++ /dev/null
@@ -1,7 +0,0 @@
-#ifndef STRINGS_H
-#define STRINGS_H
-
-#include // temp
-#include // temp
-
-#endif
\ No newline at end of file
diff --git a/rebuild_PC/PsyCross/include/psx/types.h b/rebuild_PC/PsyCross/include/psx/types.h
deleted file mode 100644
index 40961494e..000000000
--- a/rebuild_PC/PsyCross/include/psx/types.h
+++ /dev/null
@@ -1,52 +0,0 @@
-#ifndef TYPES_H
-#define TYPES_H
-
-#include
-#include
-
-#if !defined(__APPLE__)
-/* major part of a device */
-#define major(x) ((int)(((unsigned)(x)>>8)&0377))
-
-/* minor part of a device */
-#define minor(x) ((int)((x)&0377))
-
-/* make a device number */
-#define makedev(x,y) ((dev_t)(((x)<<8) | (y)))
-
-#endif
-
-#ifndef _UCHAR_T
-#define _UCHAR_T
-typedef unsigned char u_char;
-#endif
-#ifndef _USHORT_T
-#define _USHORT_T
-typedef unsigned short u_short;
-#endif
-#ifndef _UINT_T
-#define _UINT_T
-typedef unsigned int u_int;
-#endif
-#ifndef _ULONG_T
-#define _ULONG_T
-typedef unsigned long u_long;
-#endif
-#ifndef _SYSIII_USHORT
-#define _SYSIII_USHORT
-typedef unsigned short ushort; /* sys III compat */
-#endif
-#ifndef __psx__
-#ifndef _SYSV_UINT
-#define _SYSV_UINT
-typedef unsigned int uint; /* sys V compat */
-#endif
-#ifndef _SYSV_ULONG
-#define _SYSV_ULONG
-typedef unsigned long ulong; /* sys V compat */
-#endif
-#endif /* ! __psx__ */
-
-#define NBBY 8
-
-#endif
diff --git a/rebuild_PC/build-mingw-clang.nix b/rebuild_PC/build-mingw-clang.nix
index c0486c34c..9c730ec2f 100755
--- a/rebuild_PC/build-mingw-clang.nix
+++ b/rebuild_PC/build-mingw-clang.nix
@@ -3,4 +3,4 @@
, pkgsCross ? pkgs.pkgsCross.mingw32
}:
-pkgsCross.callPackage ./default.nix { stdenv = pkgsCross.clangStdenv; }
+pkgsCross.callPackage ./default.nix { stdenv = pkgsCross.clangStdenv; trustCompiler = true; }
diff --git a/rebuild_PC/default.nix b/rebuild_PC/default.nix
index 8196b7b93..b8190350f 100644
--- a/rebuild_PC/default.nix
+++ b/rebuild_PC/default.nix
@@ -2,14 +2,29 @@
, stdenv
, callPackage
, pkg-config
+, cmake
+, openal
+, SDL2
, ctrModSDK ? ./..
-, psyCross ? callPackage ./PsyCross.nix { inherit psyCrossDebug; }
-, psyCrossDebug ? false
+, withDebug ? true
+, trustCompiler ? false
}:
let
isWindows = stdenv.hostPlatform.uname.system == "Windows";
+ openalWithWindows =
+ if isWindows then
+ (openal.override {
+ alsaSupport = false;
+ dbusSupport = false;
+ pipewireSupport = false;
+ pulseSupport = false;
+ }).overrideAttrs (prevAttrs: {
+ meta = prevAttrs.meta // { inherit (SDL2.meta) platforms; };
+ })
+ else openal;
+
mainProgram = if isWindows then "CrashTeamRacingPC.exe" else "CrashTeamRacingPC";
in
stdenv.mkDerivation (finalAttrs: {
@@ -21,36 +36,33 @@ stdenv.mkDerivation (finalAttrs: {
if ctrModSDK == ./.. then "CTR-ModSDK/rebuild_PC"
else "source/rebuild_PC";
- nativeBuildInputs = [ pkg-config ];
- buildInputs = psyCross.propagatedBuildInputs;
-
- LDLIBS = "-L./PsyCross";
+ nativeBuildInputs = [ pkg-config cmake ];
+ buildInputs = [ openalWithWindows SDL2 ];
# Disables incompatible hardening
hardeningDisable = [ "format" ];
- postPatch = ''
- rm -r PsyCross
- ln -s ${psyCross} PsyCross
- '';
-
installPhase = ''
runHook preInstall
mkdir -p $out/bin
'' + lib.strings.optionalString isWindows ''
- cp ${psyCross.openal}/bin/*.dll $out/bin/
- cp ${psyCross.SDL2}/bin/*.dll $out/bin/
+ cp ${openalWithWindows}/bin/*.dll $out/bin/
+ cp ${SDL2}/bin/*.dll $out/bin/
'' + ''
cp ${mainProgram} $out/bin/
runHook postInstall
'';
+ # If you need vendored deps
+ #cmakeFlags = [ "-DCMAKE_SKIP_BUILD_RPATH=TRUE" ];
+
# Debug
- CFLAGS = "-g -gdwarf-2";
- dontStrip = true;
- passthru = { inherit psyCross; };
+ cmakeFlags = lib.optionals withDebug [ "-DCMAKE_BUILD_TYPE=Debug" ]
+ ++ lib.optionals trustCompiler [ "-DCMAKE_C_COMPILER_WORKS=1" "-DCMAKE_CXX_COMPILER_WORKS=1" ];
+ dontStrip = withDebug;
+ passthru = { openal = openalWithWindows; };
# Shows the proper compile date in the logs
env.SOURCE_DATE_EPOCH = (builtins.currentTime or ctrModSDK.lastModified);
@@ -61,6 +73,6 @@ stdenv.mkDerivation (finalAttrs: {
license = lib.licenses.publicDomain;
maintainers = with lib.maintainers; [ pedrohlc ];
inherit mainProgram;
- inherit (psyCross.meta) platforms;
+ inherit (SDL2.meta) platforms;
};
})
diff --git a/rebuild_PC/thirdparty/PsyCross b/rebuild_PC/thirdparty/PsyCross
new file mode 160000
index 000000000..0ce306d6c
--- /dev/null
+++ b/rebuild_PC/thirdparty/PsyCross
@@ -0,0 +1 @@
+Subproject commit 0ce306d6c32412986037e7e5e1dbdc1bf72e066a
diff --git a/rebuild_PC/thirdparty/SDL b/rebuild_PC/thirdparty/SDL
new file mode 160000
index 000000000..f461d91cd
--- /dev/null
+++ b/rebuild_PC/thirdparty/SDL
@@ -0,0 +1 @@
+Subproject commit f461d91cd265d7b9a44b4d472b1df0c0ad2855a0
diff --git a/rebuild_PC/thirdparty/openal-soft b/rebuild_PC/thirdparty/openal-soft
new file mode 160000
index 000000000..d3875f333
--- /dev/null
+++ b/rebuild_PC/thirdparty/openal-soft
@@ -0,0 +1 @@
+Subproject commit d3875f333fb6abe2f39d82caca329414871ae53b