daily update on 20231104 by nitload youmu
This commit is contained in:
@@ -1,6 +0,0 @@
|
||||
#pragma once
|
||||
/*
|
||||
#include "GLAD/gl.h"
|
||||
#include "glfw/glfw3.h"
|
||||
#include "StgSharpGraphic.h"
|
||||
*/
|
||||
@@ -0,0 +1,253 @@
|
||||
#ifndef SSG
|
||||
#define SSG
|
||||
|
||||
#define SSG_Api
|
||||
|
||||
|
||||
|
||||
#ifdef _WIN32
|
||||
#define _CRT_SECURE_NO_WARNINGS 1
|
||||
#endif
|
||||
|
||||
#include "ssgc_framework.h"
|
||||
#include "ssgc_internal.h"
|
||||
#include "glad_gl.h"
|
||||
#include "glad_wgl.h"
|
||||
#include "glfw3.h"
|
||||
#include <immintrin.h>
|
||||
|
||||
|
||||
#pragma region debug
|
||||
|
||||
SSCAPI void printShaderCode(char* const* code);
|
||||
|
||||
#pragma endregion
|
||||
|
||||
|
||||
|
||||
#pragma region Internal
|
||||
|
||||
extern __m128* defaultVecPtr;
|
||||
#define ALIGN(simdVec) _mm_loadu_ps(&simdVec)
|
||||
|
||||
extern GladGLContext* currentContext;
|
||||
|
||||
typedef struct glfwContext
|
||||
{
|
||||
int(SSCDECL* Init)(void);
|
||||
void(SSCDECL* Terminate)(void);
|
||||
void(SSCDECL* InitHint)(int hint, int value);
|
||||
void(SSCDECL* GetVersion)(int* major, int* minor, int* rev);
|
||||
char* (SSCDECL* GetVersionString)(void);
|
||||
int(SSCDECL* GetError)(char** description);
|
||||
GLFWerrorfun(SSCDECL* SetErrorCallback)(GLFWerrorfun callback);
|
||||
GLFWmonitor** (SSCDECL* GetMonitors)(int* count);
|
||||
GLFWmonitor* (SSCDECL* GetPrimaryMonitor)(void);
|
||||
void(SSCDECL* GetMonitorPos)(GLFWmonitor* monitor, int* xpos, int* ypos);
|
||||
void(SSCDECL* GetMonitorWorkarea)(GLFWmonitor* monitor, int* xpos, int* ypos, int* width, int* height);
|
||||
void(SSCDECL* GetMonitorPhysicalSize)(GLFWmonitor* monitor, int* widthMM, int* heightMM);
|
||||
void(SSCDECL* GetMonitorContentScale)(GLFWmonitor* monitor, float* xscale, float* yscale);
|
||||
char* (SSCDECL* GetMonitorName)(GLFWmonitor* monitor);
|
||||
void(SSCDECL* SetMonitorUserPointer)(GLFWmonitor* monitor, void* pointer);
|
||||
void* (SSCDECL* GetMonitorUserPointer)(GLFWmonitor* monitor);
|
||||
GLFWmonitorfun(SSCDECL* SetMonitorCallback)(GLFWmonitorfun callback);
|
||||
GLFWvidmode* (SSCDECL* GetVideoModes)(GLFWmonitor* monitor, int* count);
|
||||
GLFWvidmode* (SSCDECL* GetVideoMode)(GLFWmonitor* monitor);
|
||||
void(SSCDECL* SetGamma)(GLFWmonitor* monitor, float gamma);
|
||||
GLFWgammaramp* (SSCDECL* GetGammaRamp)(GLFWmonitor* monitor);
|
||||
void(SSCDECL* SetGammaRamp)(GLFWmonitor* monitor, GLFWgammaramp* ramp);
|
||||
void(SSCDECL* DefaultWindowHints)(void);
|
||||
void(SSCDECL* WindowHint)(int hint, int value);
|
||||
void(SSCDECL* WindowHintString)(int hint, char* value);
|
||||
GLFWwindow* (SSCDECL* CreateWindowProc)(int width, int height, char* title, GLFWmonitor* monitor, GLFWwindow* share);
|
||||
void(SSCDECL* DestroyWindow)(GLFWwindow* window);
|
||||
int(SSCDECL* WindowShouldClose)(GLFWwindow* window);
|
||||
void(SSCDECL* SetWindowShouldClose)(GLFWwindow* window, int value);
|
||||
void(SSCDECL* SetWindowTitle)(GLFWwindow* window, char* title);
|
||||
void(SSCDECL* SetWindowIcon)(GLFWwindow* window, int count, GLFWimage* images);
|
||||
void(SSCDECL* GetWindowPos)(GLFWwindow* window, int* xpos, int* ypos);
|
||||
void(SSCDECL* SetWindowPos)(GLFWwindow* window, int xpos, int ypos);
|
||||
void(SSCDECL* GetWindowSize)(GLFWwindow* window, int* width, int* height);
|
||||
void(SSCDECL* SetWindowSizeLimits)(GLFWwindow* window, int minwidth, int minheight, int maxwidth, int maxheight);
|
||||
void(SSCDECL* SetWindowAspectRatio)(GLFWwindow* window, int numer, int denom);
|
||||
void(SSCDECL* SetWindowSize)(GLFWwindow* window, int width, int height);
|
||||
void(SSCDECL* GetFramebufferSize)(GLFWwindow* window, int* width, int* height);
|
||||
void(SSCDECL* GetWindowFrameSize)(GLFWwindow* window, int* left, int* top, int* right, int* bottom);
|
||||
void(SSCDECL* GetWindowContentScale)(GLFWwindow* window, float* xscale, float* yscale);
|
||||
float(SSCDECL* GetWindowOpacity)(GLFWwindow* window);
|
||||
void(SSCDECL* SetWindowOpacity)(GLFWwindow* window, float opacity);
|
||||
void(SSCDECL* IconifyWindow)(GLFWwindow* window);
|
||||
void(SSCDECL* RestoreWindow)(GLFWwindow* window);
|
||||
void(SSCDECL* MaximizeWindow)(GLFWwindow* window);
|
||||
void(SSCDECL* ShowWindow)(GLFWwindow* window);
|
||||
void(SSCDECL* HideWindow)(GLFWwindow* window);
|
||||
void(SSCDECL* FocusWindow)(GLFWwindow* window);
|
||||
void(SSCDECL* RequestWindowAttention)(GLFWwindow* window);
|
||||
GLFWmonitor* (SSCDECL* GetWindowMonitor)(GLFWwindow* window);
|
||||
void(SSCDECL* SetWindowMonitor)(GLFWwindow* window, GLFWmonitor* monitor, int xpos, int ypos, int width, int height, int refreshRate);
|
||||
int(SSCDECL* GetWindowAttrib)(GLFWwindow* window, int attrib);
|
||||
void(SSCDECL* SetWindowAttrib)(GLFWwindow* window, int attrib, int value);
|
||||
void(SSCDECL* SetWindowUserPointer)(GLFWwindow* window, void* pointer);
|
||||
void* (SSCDECL* GetWindowUserPointer)(GLFWwindow* window);
|
||||
GLFWwindowposfun(SSCDECL* SetWindowPosCallback)(GLFWwindow* window, GLFWwindowposfun callback);
|
||||
GLFWwindowsizefun(SSCDECL* SetWindowSizeCallback)(GLFWwindow* window, GLFWwindowsizefun callback);
|
||||
GLFWwindowclosefun(SSCDECL* SetWindowCloseCallback)(GLFWwindow* window, GLFWwindowclosefun callback);
|
||||
GLFWwindowrefreshfun(SSCDECL* SetWindowRefreshCallback)(GLFWwindow* window, GLFWwindowrefreshfun callback);
|
||||
GLFWwindowfocusfun(SSCDECL* SetWindowFocusCallback)(GLFWwindow* window, GLFWwindowfocusfun callback);
|
||||
GLFWwindowiconifyfun(SSCDECL* SetWindowIconifyCallback)(GLFWwindow* window, GLFWwindowiconifyfun callback);
|
||||
GLFWwindowmaximizefun(SSCDECL* SetWindowMaximizeCallback)(GLFWwindow* window, GLFWwindowmaximizefun callback);
|
||||
GLFWframebuffersizefun(SSCDECL* SetFramebufferSizeCallback)(GLFWwindow* window, GLFWframebuffersizefun callback);
|
||||
GLFWwindowcontentscalefun(SSCDECL* SetWindowContentScaleCallback)(GLFWwindow* window, GLFWwindowcontentscalefun callback);
|
||||
void(SSCDECL* PollEvents)(void);
|
||||
void(SSCDECL* WaitEvents)(void);
|
||||
void(SSCDECL* WaitEventsTimeout)(double timeout);
|
||||
void(SSCDECL* PostEmptyEvent)(void);
|
||||
int(SSCDECL* GetInputMode)(GLFWwindow* window, int mode);
|
||||
void(SSCDECL* SetInputMode)(GLFWwindow* window, int mode, int value);
|
||||
int(SSCDECL* RawMouseMotionSupported)(void);
|
||||
char* (SSCDECL* GetKeyName)(int key, int scancode);
|
||||
int(SSCDECL* GetKeyScancode)(int key);
|
||||
int(SSCDECL* GetKey)(GLFWwindow* window, int key);
|
||||
int(SSCDECL* GetMouseButton)(GLFWwindow* window, int button);
|
||||
void(SSCDECL* GetCursorPos)(GLFWwindow* window, double* xpos, double* ypos);
|
||||
void(SSCDECL* SetCursorPos)(GLFWwindow* window, double xpos, double ypos);
|
||||
GLFWcursor* (SSCDECL* CreateCursor)(GLFWimage* image, int xhot, int yhot);
|
||||
GLFWcursor* (SSCDECL* CreateStandardCursor)(int shape);
|
||||
void(SSCDECL* DestroyCursor)(GLFWcursor* cursor);
|
||||
void(SSCDECL* SetCursor)(GLFWwindow* window, GLFWcursor* cursor);
|
||||
GLFWkeyfun(SSCDECL* SetKeyCallback)(GLFWwindow* window, GLFWkeyfun callback);
|
||||
GLFWcharfun(SSCDECL* SetCharCallback)(GLFWwindow* window, GLFWcharfun callback);
|
||||
GLFWcharmodsfun(SSCDECL* SetCharModsCallback)(GLFWwindow* window, GLFWcharmodsfun callback);
|
||||
GLFWmousebuttonfun(SSCDECL* SetMouseButtonCallback)(GLFWwindow* window, GLFWmousebuttonfun callback);
|
||||
GLFWcursorposfun(SSCDECL* SetCursorPosCallback)(GLFWwindow* window, GLFWcursorposfun callback);
|
||||
GLFWcursorenterfun(SSCDECL* SetCursorEnterCallback)(GLFWwindow* window, GLFWcursorenterfun callback);
|
||||
GLFWscrollfun(SSCDECL* SetScrollCallback)(GLFWwindow* window, GLFWscrollfun callback);
|
||||
GLFWdropfun(SSCDECL* SetDropCallback)(GLFWwindow* window, GLFWdropfun callback);
|
||||
int(SSCDECL* JoystickPresent)(int jid);
|
||||
float* (SSCDECL* GetJoystickAxes)(int jid, int* count);
|
||||
unsigned char* (SSCDECL* GetJoystickButtons)(int jid, int* count);
|
||||
unsigned char* (SSCDECL* GetJoystickHats)(int jid, int* count);
|
||||
char* (SSCDECL* GetJoystickName)(int jid);
|
||||
char* (SSCDECL* GetJoystickGUID)(int jid);
|
||||
void(SSCDECL* SetJoystickUserPointer)(int jid, void* pointer);
|
||||
void* (SSCDECL* GetJoystickUserPointer)(int jid);
|
||||
int(SSCDECL* JoystickIsGamepad)(int jid);
|
||||
GLFWjoystickfun(SSCDECL* SetJoystickCallback)(GLFWjoystickfun callback);
|
||||
int(SSCDECL* UpdateGamepadMappings)(char* string);
|
||||
char* (SSCDECL* GetGamepadName)(int jid);
|
||||
int(SSCDECL* GetGamepadState)(int jid, GLFWgamepadstate* state);
|
||||
void(SSCDECL* SetClipboardString)(GLFWwindow* window, char* string);
|
||||
char* (SSCDECL* GetClipboardString)(GLFWwindow* window);
|
||||
double(SSCDECL* GetTime)(void);
|
||||
void(SSCDECL* SetTime)(double time);
|
||||
uint64_t* (SSCDECL* GetTimerValue)(void);
|
||||
uint64_t* (SSCDECL* GetTimerFrequency)(void);
|
||||
void(SSCDECL* MakeContextCurrent)(GLFWwindow* window);
|
||||
GLFWwindow* (SSCDECL* GetCurrentContext)(void);
|
||||
void(SSCDECL* SwapBuffers)(GLFWwindow* window);
|
||||
void(SSCDECL* SwapInterval)(int interval);
|
||||
int(SSCDECL* ExtensionSupported)(char* extension);
|
||||
GLFWglproc(SSCDECL* GetProcAddress)(char* procname);
|
||||
int(SSCDECL* VulkanSupported)(void);
|
||||
char** (SSCDECL* GetRequiredInstanceExtensions)(uint32_t* count);
|
||||
|
||||
#if defined(VK_VERSION_1_0)
|
||||
GLFWvkproc(SSCDECL* GetInstanceProcAddress)(VkInstance instance, char* procname);
|
||||
int(SSCDECL* GetPhysicalDevicePresentationSupport)(VkInstance instance, VkPhysicalDevice device, uint32_t* queuefamily);
|
||||
VkResult(SSCDECL* CreateWindowSurface)(VkInstance instance, GLFWwindow* window, VkAllocationCallbacks* allocator, VkSurfaceKHR* surface);
|
||||
#endif
|
||||
}glfwContext;
|
||||
|
||||
extern glfwContext* glfw;
|
||||
|
||||
#pragma endregion
|
||||
|
||||
SSCAPI char* infolog[512];
|
||||
|
||||
|
||||
|
||||
SSCAPI void _cdecl initGL(int majorVersion, int minorVersion);
|
||||
SSCAPI int _cdecl initGLAD(void);
|
||||
SSCAPI unsigned int _cdecl loadShaderCode(char* const shaderCode, GLint shadertype);
|
||||
SSCAPI unsigned int _cdecl linkShaderProgram(GLuint shadertype);
|
||||
SSCAPI char* _cdecl readLog(void);
|
||||
|
||||
//linear related function
|
||||
|
||||
|
||||
|
||||
|
||||
SSCAPI __m128* __cdecl set_m128ptr_default();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#pragma region mat define
|
||||
|
||||
typedef union matrix2map
|
||||
{
|
||||
__m128 colum[2];
|
||||
float m[4][2];
|
||||
}matrix2map;
|
||||
|
||||
typedef struct matrix3map
|
||||
{
|
||||
__m128 colum[3];
|
||||
float m[4][3];
|
||||
}matrix3map;
|
||||
|
||||
typedef union matrix4map {
|
||||
__m128 colum[4];
|
||||
float m[4][4];
|
||||
}matrix4map;
|
||||
|
||||
|
||||
#pragma endregion
|
||||
|
||||
#pragma region mat2
|
||||
|
||||
|
||||
SSCAPI _inline void __cdecl transpose2to3(matrix2map* source, matrix3map* target);
|
||||
SSCAPI _inline void __cdecl transpose2to4(matrix2map* source, matrix4map* target);
|
||||
|
||||
SSCAPI _inline void __cdecl deinit_mat2(matrix2map* mat);
|
||||
|
||||
#pragma endregion
|
||||
|
||||
#pragma region mat3
|
||||
|
||||
|
||||
SSCAPI __inline void _cdecl transpose3to2(matrix3map* source, matrix2map* target);
|
||||
SSCAPI __inline void _cdecl transpose3to3(matrix3map* source, matrix3map* target);
|
||||
SSCAPI __inline void _cdecl transpose3to4(matrix3map* source, matrix4map* target);
|
||||
|
||||
SSCAPI _inline float _cdecl det_mat3(matrix3map* mat);
|
||||
SSCAPI __inline float det_mat3_internal(__m128 const c1, __m128 const c2, __m128 const c3);
|
||||
|
||||
#pragma endregion
|
||||
|
||||
#pragma region mat4
|
||||
//type and function for 4 colum matrix
|
||||
|
||||
|
||||
SSCAPI __inline void __cdecl transpose4to2(matrix4map* source, matrix4map* target);
|
||||
SSCAPI __inline void __cdecl transpose4to4(matrix4map* matrix, matrix4map* target);
|
||||
|
||||
SSCAPI __inline float __cdecl det_mat4(matrix4map* matPtr, matrix4map* transpose);
|
||||
|
||||
SSCAPI __inline void __cdecl deinit_mat4(matrix4map* matPtr);
|
||||
|
||||
#pragma endregion
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // !SSG
|
||||
|
||||
@@ -1,255 +0,0 @@
|
||||
#ifndef SSG
|
||||
#define SSG
|
||||
|
||||
#define SSG_Api
|
||||
|
||||
#ifdef SSG_Api
|
||||
#define SSGC_API __declspec(dllexport)
|
||||
#define ssgcDecl _cdecl
|
||||
#else
|
||||
#define SSGC_API __declspec(dllimport)
|
||||
#endif
|
||||
|
||||
#include "framework.h"
|
||||
#include "GLAD/gl.h"
|
||||
#include "glad/wgl.h"
|
||||
#include "glfw/glfw3.h"
|
||||
#include <immintrin.h>
|
||||
|
||||
#pragma comment(lib, "glfw3.lib")
|
||||
|
||||
#pragma region debug
|
||||
|
||||
SSGC_API void printShaderCode(char* const* code);
|
||||
|
||||
#pragma endregion
|
||||
|
||||
|
||||
|
||||
#pragma region Internal
|
||||
|
||||
extern __m128* defaultVecPtr;
|
||||
#define ALIGN(simdVec) _mm_loadu_ps(&simdVec)
|
||||
|
||||
extern GladGLContext* currentContext;
|
||||
|
||||
typedef struct glfwContext
|
||||
{
|
||||
int(ssgcDecl* Init)(void);
|
||||
void(ssgcDecl* Terminate)(void);
|
||||
void(ssgcDecl* InitHint)(int hint, int value);
|
||||
void(ssgcDecl* GetVersion)(int* major, int* minor, int* rev);
|
||||
char* (ssgcDecl* GetVersionString)(void);
|
||||
int(ssgcDecl* GetError)(char** description);
|
||||
GLFWerrorfun(ssgcDecl* SetErrorCallback)(GLFWerrorfun callback);
|
||||
GLFWmonitor** (ssgcDecl* GetMonitors)(int* count);
|
||||
GLFWmonitor* (ssgcDecl* GetPrimaryMonitor)(void);
|
||||
void(ssgcDecl* GetMonitorPos)(GLFWmonitor* monitor, int* xpos, int* ypos);
|
||||
void(ssgcDecl* GetMonitorWorkarea)(GLFWmonitor* monitor, int* xpos, int* ypos, int* width, int* height);
|
||||
void(ssgcDecl* GetMonitorPhysicalSize)(GLFWmonitor* monitor, int* widthMM, int* heightMM);
|
||||
void(ssgcDecl* GetMonitorContentScale)(GLFWmonitor* monitor, float* xscale, float* yscale);
|
||||
char* (ssgcDecl* GetMonitorName)(GLFWmonitor* monitor);
|
||||
void(ssgcDecl* SetMonitorUserPointer)(GLFWmonitor* monitor, void* pointer);
|
||||
void* (ssgcDecl* GetMonitorUserPointer)(GLFWmonitor* monitor);
|
||||
GLFWmonitorfun(ssgcDecl* SetMonitorCallback)(GLFWmonitorfun callback);
|
||||
GLFWvidmode* (ssgcDecl* GetVideoModes)(GLFWmonitor* monitor, int* count);
|
||||
GLFWvidmode* (ssgcDecl* GetVideoMode)(GLFWmonitor* monitor);
|
||||
void(ssgcDecl* SetGamma)(GLFWmonitor* monitor, float gamma);
|
||||
GLFWgammaramp* (ssgcDecl* GetGammaRamp)(GLFWmonitor* monitor);
|
||||
void(ssgcDecl* SetGammaRamp)(GLFWmonitor* monitor, GLFWgammaramp* ramp);
|
||||
void(ssgcDecl* DefaultWindowHints)(void);
|
||||
void(ssgcDecl* WindowHint)(int hint, int value);
|
||||
void(ssgcDecl* WindowHintString)(int hint, char* value);
|
||||
GLFWwindow* (ssgcDecl* CreateWindowProc)(int width, int height, char* title, GLFWmonitor* monitor, GLFWwindow* share);
|
||||
void(ssgcDecl* DestroyWindow)(GLFWwindow* window);
|
||||
int(ssgcDecl* WindowShouldClose)(GLFWwindow* window);
|
||||
void(ssgcDecl* SetWindowShouldClose)(GLFWwindow* window, int value);
|
||||
void(ssgcDecl* SetWindowTitle)(GLFWwindow* window, char* title);
|
||||
void(ssgcDecl* SetWindowIcon)(GLFWwindow* window, int count, GLFWimage* images);
|
||||
void(ssgcDecl* GetWindowPos)(GLFWwindow* window, int* xpos, int* ypos);
|
||||
void(ssgcDecl* SetWindowPos)(GLFWwindow* window, int xpos, int ypos);
|
||||
void(ssgcDecl* GetWindowSize)(GLFWwindow* window, int* width, int* height);
|
||||
void(ssgcDecl* SetWindowSizeLimits)(GLFWwindow* window, int minwidth, int minheight, int maxwidth, int maxheight);
|
||||
void(ssgcDecl* SetWindowAspectRatio)(GLFWwindow* window, int numer, int denom);
|
||||
void(ssgcDecl* SetWindowSize)(GLFWwindow* window, int width, int height);
|
||||
void(ssgcDecl* GetFramebufferSize)(GLFWwindow* window, int* width, int* height);
|
||||
void(ssgcDecl* GetWindowFrameSize)(GLFWwindow* window, int* left, int* top, int* right, int* bottom);
|
||||
void(ssgcDecl* GetWindowContentScale)(GLFWwindow* window, float* xscale, float* yscale);
|
||||
float(ssgcDecl* GetWindowOpacity)(GLFWwindow* window);
|
||||
void(ssgcDecl* SetWindowOpacity)(GLFWwindow* window, float opacity);
|
||||
void(ssgcDecl* IconifyWindow)(GLFWwindow* window);
|
||||
void(ssgcDecl* RestoreWindow)(GLFWwindow* window);
|
||||
void(ssgcDecl* MaximizeWindow)(GLFWwindow* window);
|
||||
void(ssgcDecl* ShowWindow)(GLFWwindow* window);
|
||||
void(ssgcDecl* HideWindow)(GLFWwindow* window);
|
||||
void(ssgcDecl* FocusWindow)(GLFWwindow* window);
|
||||
void(ssgcDecl* RequestWindowAttention)(GLFWwindow* window);
|
||||
GLFWmonitor* (ssgcDecl* GetWindowMonitor)(GLFWwindow* window);
|
||||
void(ssgcDecl* SetWindowMonitor)(GLFWwindow* window, GLFWmonitor* monitor, int xpos, int ypos, int width, int height, int refreshRate);
|
||||
int(ssgcDecl* GetWindowAttrib)(GLFWwindow* window, int attrib);
|
||||
void(ssgcDecl* SetWindowAttrib)(GLFWwindow* window, int attrib, int value);
|
||||
void(ssgcDecl* SetWindowUserPointer)(GLFWwindow* window, void* pointer);
|
||||
void* (ssgcDecl* GetWindowUserPointer)(GLFWwindow* window);
|
||||
GLFWwindowposfun(ssgcDecl* SetWindowPosCallback)(GLFWwindow* window, GLFWwindowposfun callback);
|
||||
GLFWwindowsizefun(ssgcDecl* SetWindowSizeCallback)(GLFWwindow* window, GLFWwindowsizefun callback);
|
||||
GLFWwindowclosefun(ssgcDecl* SetWindowCloseCallback)(GLFWwindow* window, GLFWwindowclosefun callback);
|
||||
GLFWwindowrefreshfun(ssgcDecl* SetWindowRefreshCallback)(GLFWwindow* window, GLFWwindowrefreshfun callback);
|
||||
GLFWwindowfocusfun(ssgcDecl* SetWindowFocusCallback)(GLFWwindow* window, GLFWwindowfocusfun callback);
|
||||
GLFWwindowiconifyfun(ssgcDecl* SetWindowIconifyCallback)(GLFWwindow* window, GLFWwindowiconifyfun callback);
|
||||
GLFWwindowmaximizefun(ssgcDecl* SetWindowMaximizeCallback)(GLFWwindow* window, GLFWwindowmaximizefun callback);
|
||||
GLFWframebuffersizefun(ssgcDecl* SetFramebufferSizeCallback)(GLFWwindow* window, GLFWframebuffersizefun callback);
|
||||
GLFWwindowcontentscalefun(ssgcDecl* SetWindowContentScaleCallback)(GLFWwindow* window, GLFWwindowcontentscalefun callback);
|
||||
void(ssgcDecl* PollEvents)(void);
|
||||
void(ssgcDecl* WaitEvents)(void);
|
||||
void(ssgcDecl* WaitEventsTimeout)(double timeout);
|
||||
void(ssgcDecl* PostEmptyEvent)(void);
|
||||
int(ssgcDecl* GetInputMode)(GLFWwindow* window, int mode);
|
||||
void(ssgcDecl* SetInputMode)(GLFWwindow* window, int mode, int value);
|
||||
int(ssgcDecl* RawMouseMotionSupported)(void);
|
||||
char* (ssgcDecl* GetKeyName)(int key, int scancode);
|
||||
int(ssgcDecl* GetKeyScancode)(int key);
|
||||
int(ssgcDecl* GetKey)(GLFWwindow* window, int key);
|
||||
int(ssgcDecl* GetMouseButton)(GLFWwindow* window, int button);
|
||||
void(ssgcDecl* GetCursorPos)(GLFWwindow* window, double* xpos, double* ypos);
|
||||
void(ssgcDecl* SetCursorPos)(GLFWwindow* window, double xpos, double ypos);
|
||||
GLFWcursor* (ssgcDecl* CreateCursor)(GLFWimage* image, int xhot, int yhot);
|
||||
GLFWcursor* (ssgcDecl* CreateStandardCursor)(int shape);
|
||||
void(ssgcDecl* DestroyCursor)(GLFWcursor* cursor);
|
||||
void(ssgcDecl* SetCursor)(GLFWwindow* window, GLFWcursor* cursor);
|
||||
GLFWkeyfun(ssgcDecl* SetKeyCallback)(GLFWwindow* window, GLFWkeyfun callback);
|
||||
GLFWcharfun(ssgcDecl* SetCharCallback)(GLFWwindow* window, GLFWcharfun callback);
|
||||
GLFWcharmodsfun(ssgcDecl* SetCharModsCallback)(GLFWwindow* window, GLFWcharmodsfun callback);
|
||||
GLFWmousebuttonfun(ssgcDecl* SetMouseButtonCallback)(GLFWwindow* window, GLFWmousebuttonfun callback);
|
||||
GLFWcursorposfun(ssgcDecl* SetCursorPosCallback)(GLFWwindow* window, GLFWcursorposfun callback);
|
||||
GLFWcursorenterfun(ssgcDecl* SetCursorEnterCallback)(GLFWwindow* window, GLFWcursorenterfun callback);
|
||||
GLFWscrollfun(ssgcDecl* SetScrollCallback)(GLFWwindow* window, GLFWscrollfun callback);
|
||||
GLFWdropfun(ssgcDecl* SetDropCallback)(GLFWwindow* window, GLFWdropfun callback);
|
||||
int(ssgcDecl* JoystickPresent)(int jid);
|
||||
float* (ssgcDecl* GetJoystickAxes)(int jid, int* count);
|
||||
unsigned char* (ssgcDecl* GetJoystickButtons)(int jid, int* count);
|
||||
unsigned char* (ssgcDecl* GetJoystickHats)(int jid, int* count);
|
||||
char* (ssgcDecl* GetJoystickName)(int jid);
|
||||
char* (ssgcDecl* GetJoystickGUID)(int jid);
|
||||
void(ssgcDecl* SetJoystickUserPointer)(int jid, void* pointer);
|
||||
void* (ssgcDecl* GetJoystickUserPointer)(int jid);
|
||||
int(ssgcDecl* JoystickIsGamepad)(int jid);
|
||||
GLFWjoystickfun(ssgcDecl* SetJoystickCallback)(GLFWjoystickfun callback);
|
||||
int(ssgcDecl* UpdateGamepadMappings)(char* string);
|
||||
char* (ssgcDecl* GetGamepadName)(int jid);
|
||||
int(ssgcDecl* GetGamepadState)(int jid, GLFWgamepadstate* state);
|
||||
void(ssgcDecl* SetClipboardString)(GLFWwindow* window, char* string);
|
||||
char* (ssgcDecl* GetClipboardString)(GLFWwindow* window);
|
||||
double(ssgcDecl* GetTime)(void);
|
||||
void(ssgcDecl* SetTime)(double time);
|
||||
uint64_t* (ssgcDecl* GetTimerValue)(void);
|
||||
uint64_t* (ssgcDecl* GetTimerFrequency)(void);
|
||||
void(ssgcDecl* MakeContextCurrent)(GLFWwindow* window);
|
||||
GLFWwindow* (ssgcDecl* GetCurrentContext)(void);
|
||||
void(ssgcDecl* SwapBuffers)(GLFWwindow* window);
|
||||
void(ssgcDecl* SwapInterval)(int interval);
|
||||
int(ssgcDecl* ExtensionSupported)(char* extension);
|
||||
GLFWglproc(ssgcDecl* GetProcAddress)(char* procname);
|
||||
int(ssgcDecl* VulkanSupported)(void);
|
||||
char** (ssgcDecl* GetRequiredInstanceExtensions)(uint32_t* count);
|
||||
|
||||
#if defined(VK_VERSION_1_0)
|
||||
GLFWvkproc(ssgcDecl* GetInstanceProcAddress)(VkInstance instance, char* procname);
|
||||
int(ssgcDecl* GetPhysicalDevicePresentationSupport)(VkInstance instance, VkPhysicalDevice device, uint32_t* queuefamily);
|
||||
VkResult(ssgcDecl* CreateWindowSurface)(VkInstance instance, GLFWwindow* window, VkAllocationCallbacks* allocator, VkSurfaceKHR* surface);
|
||||
#endif
|
||||
}glfwContext;
|
||||
|
||||
extern glfwContext* glfw;
|
||||
|
||||
#pragma endregion
|
||||
|
||||
SSGC_API char* infolog[512];
|
||||
|
||||
|
||||
|
||||
SSGC_API glfwContext* _cdecl initGL(int majorVersion, int minorVersion, glfwContext* ptr);
|
||||
SSGC_API int _cdecl initGLAD(void);
|
||||
SSGC_API unsigned int _cdecl loadShaderCode(char* const shaderCode, GLint shadertype);
|
||||
SSGC_API unsigned int _cdecl linkShaderProgram(GLuint shadertype);
|
||||
SSGC_API void _cdecl setCurrentGLcontext(GladGLContext* contextPtr);
|
||||
SSGC_API char* _cdecl readLog(void);
|
||||
|
||||
//linear related function
|
||||
|
||||
|
||||
|
||||
|
||||
SSGC_API __m128* __cdecl set_m128ptr_default();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#pragma region mat define
|
||||
|
||||
typedef union matrix2map
|
||||
{
|
||||
__m128 colum[2];
|
||||
float m[4][2];
|
||||
}matrix2map;
|
||||
|
||||
typedef struct matrix3map
|
||||
{
|
||||
__m128 colum[3];
|
||||
float m[4][3];
|
||||
}matrix3map;
|
||||
|
||||
typedef union matrix4map {
|
||||
__m128 colum[4];
|
||||
float m[4][4];
|
||||
}matrix4map;
|
||||
|
||||
|
||||
#pragma endregion
|
||||
|
||||
#pragma region mat2
|
||||
|
||||
|
||||
SSGC_API _inline void __cdecl transpose2to3(matrix2map* source, matrix3map* target);
|
||||
SSGC_API _inline void __cdecl transpose2to4(matrix2map* source, matrix4map* target);
|
||||
|
||||
SSGC_API _inline void __cdecl deinit_mat2(matrix2map* mat);
|
||||
|
||||
#pragma endregion
|
||||
|
||||
#pragma region mat3
|
||||
|
||||
|
||||
SSGC_API __inline void _cdecl transpose3to2(matrix3map* source, matrix2map* target);
|
||||
SSGC_API __inline void _cdecl transpose3to3(matrix3map* source, matrix3map* target);
|
||||
SSGC_API __inline void _cdecl transpose3to4(matrix3map* source, matrix4map* target);
|
||||
|
||||
SSGC_API _inline float _cdecl det_mat3(matrix3map* mat);
|
||||
SSGC_API __inline float det_mat3_internal(__m128 const c1, __m128 const c2, __m128 const c3);
|
||||
|
||||
#pragma endregion
|
||||
|
||||
#pragma region mat4
|
||||
//type and function for 4 colum matrix
|
||||
|
||||
|
||||
SSGC_API __inline void __cdecl transpose4to2(matrix4map* source, matrix4map* target);
|
||||
SSGC_API __inline void __cdecl transpose4to4(matrix4map* matrix, matrix4map* target);
|
||||
|
||||
SSGC_API __inline float __cdecl det_mat4(matrix4map* matPtr, matrix4map* transpose);
|
||||
|
||||
SSGC_API __inline void __cdecl deinit_mat4(matrix4map* matPtr);
|
||||
|
||||
#pragma endregion
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // !SSG
|
||||
|
||||
@@ -1,779 +0,0 @@
|
||||
/**
|
||||
* Loader generated by glad 2.0.4 on Thu Oct 26 14:05:44 2023
|
||||
*
|
||||
* SPDX-License-Identifier: (WTFPL OR CC0-1.0) AND Apache-2.0
|
||||
*
|
||||
* Generator: C/C++
|
||||
* Specification: gl
|
||||
* Extensions: 7
|
||||
*
|
||||
* APIs:
|
||||
* - glsc2=2.0
|
||||
*
|
||||
* Options:
|
||||
* - ALIAS = False
|
||||
* - DEBUG = False
|
||||
* - HEADER_ONLY = False
|
||||
* - LOADER = True
|
||||
* - MX = True
|
||||
* - ON_DEMAND = False
|
||||
*
|
||||
* Commandline:
|
||||
* --api='glsc2=2.0' --extensions='GL_EXT_texture_compression_s3tc,GL_IMG_pvric_end_to_end_signature,GL_IMG_tile_region_protection,GL_OES_depth24,GL_OES_depth32,GL_OES_rgb8_rgba8,GL_OES_standard_derivatives' c --loader --mx
|
||||
*
|
||||
* Online:
|
||||
* http://glad.sh/#api=glsc2%3D2.0&extensions=GL_EXT_texture_compression_s3tc%2CGL_IMG_pvric_end_to_end_signature%2CGL_IMG_tile_region_protection%2CGL_OES_depth24%2CGL_OES_depth32%2CGL_OES_rgb8_rgba8%2CGL_OES_standard_derivatives&generator=c&options=LOADER%2CMX
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef GLAD_GLSC2_H_
|
||||
#define GLAD_GLSC2_H_
|
||||
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wreserved-id-macro"
|
||||
#endif
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
|
||||
#define GLAD_GLSC2
|
||||
#define GLAD_OPTION_GLSC2_LOADER
|
||||
#define GLAD_OPTION_GLSC2_MX
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef GLAD_PLATFORM_H_
|
||||
#define GLAD_PLATFORM_H_
|
||||
|
||||
#ifndef GLAD_PLATFORM_WIN32
|
||||
#if defined(_WIN32) || defined(__WIN32__) || defined(WIN32) || defined(__MINGW32__)
|
||||
#define GLAD_PLATFORM_WIN32 1
|
||||
#else
|
||||
#define GLAD_PLATFORM_WIN32 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef GLAD_PLATFORM_APPLE
|
||||
#ifdef __APPLE__
|
||||
#define GLAD_PLATFORM_APPLE 1
|
||||
#else
|
||||
#define GLAD_PLATFORM_APPLE 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef GLAD_PLATFORM_EMSCRIPTEN
|
||||
#ifdef __EMSCRIPTEN__
|
||||
#define GLAD_PLATFORM_EMSCRIPTEN 1
|
||||
#else
|
||||
#define GLAD_PLATFORM_EMSCRIPTEN 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef GLAD_PLATFORM_UWP
|
||||
#if defined(_MSC_VER) && !defined(GLAD_INTERNAL_HAVE_WINAPIFAMILY)
|
||||
#ifdef __has_include
|
||||
#if __has_include(<winapifamily.h>)
|
||||
#define GLAD_INTERNAL_HAVE_WINAPIFAMILY 1
|
||||
#endif
|
||||
#elif _MSC_VER >= 1700 && !_USING_V110_SDK71_
|
||||
#define GLAD_INTERNAL_HAVE_WINAPIFAMILY 1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef GLAD_INTERNAL_HAVE_WINAPIFAMILY
|
||||
#include <winapifamily.h>
|
||||
#if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) && WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
|
||||
#define GLAD_PLATFORM_UWP 1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef GLAD_PLATFORM_UWP
|
||||
#define GLAD_PLATFORM_UWP 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef __GNUC__
|
||||
#define GLAD_GNUC_EXTENSION __extension__
|
||||
#else
|
||||
#define GLAD_GNUC_EXTENSION
|
||||
#endif
|
||||
|
||||
#define GLAD_UNUSED(x) (void)(x)
|
||||
|
||||
#ifndef GLAD_API_CALL
|
||||
#if defined(GLAD_API_CALL_EXPORT)
|
||||
#if GLAD_PLATFORM_WIN32 || defined(__CYGWIN__)
|
||||
#if defined(GLAD_API_CALL_EXPORT_BUILD)
|
||||
#if defined(__GNUC__)
|
||||
#define GLAD_API_CALL __attribute__ ((dllexport)) extern
|
||||
#else
|
||||
#define GLAD_API_CALL __declspec(dllexport) extern
|
||||
#endif
|
||||
#else
|
||||
#if defined(__GNUC__)
|
||||
#define GLAD_API_CALL __attribute__ ((dllimport)) extern
|
||||
#else
|
||||
#define GLAD_API_CALL __declspec(dllimport) extern
|
||||
#endif
|
||||
#endif
|
||||
#elif defined(__GNUC__) && defined(GLAD_API_CALL_EXPORT_BUILD)
|
||||
#define GLAD_API_CALL __attribute__ ((visibility ("default"))) extern
|
||||
#else
|
||||
#define GLAD_API_CALL extern
|
||||
#endif
|
||||
#else
|
||||
#define GLAD_API_CALL extern
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef APIENTRY
|
||||
#define GLAD_API_PTR APIENTRY
|
||||
#elif GLAD_PLATFORM_WIN32
|
||||
#define GLAD_API_PTR __stdcall
|
||||
#else
|
||||
#define GLAD_API_PTR
|
||||
#endif
|
||||
|
||||
#ifndef GLAPI
|
||||
#define GLAPI GLAD_API_CALL
|
||||
#endif
|
||||
|
||||
#ifndef GLAPIENTRY
|
||||
#define GLAPIENTRY GLAD_API_PTR
|
||||
#endif
|
||||
|
||||
#define GLAD_MAKE_VERSION(major, minor) (major * 10000 + minor)
|
||||
#define GLAD_VERSION_MAJOR(version) (version / 10000)
|
||||
#define GLAD_VERSION_MINOR(version) (version % 10000)
|
||||
|
||||
#define GLAD_GENERATOR_VERSION "2.0.4"
|
||||
|
||||
typedef void (*GLADapiproc)(void);
|
||||
|
||||
typedef GLADapiproc (*GLADloadfunc)(const char *name);
|
||||
typedef GLADapiproc (*GLADuserptrloadfunc)(void *userptr, const char *name);
|
||||
|
||||
typedef void (*GLADprecallback)(const char *name, GLADapiproc apiproc, int len_args, ...);
|
||||
typedef void (*GLADpostcallback)(void *ret, const char *name, GLADapiproc apiproc, int len_args, ...);
|
||||
|
||||
#endif /* GLAD_PLATFORM_H_ */
|
||||
|
||||
#define GL_ACTIVE_TEXTURE 0x84E0
|
||||
#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E
|
||||
#define GL_ALIASED_POINT_SIZE_RANGE 0x846D
|
||||
#define GL_ALPHA_BITS 0x0D55
|
||||
#define GL_ALWAYS 0x0207
|
||||
#define GL_ARRAY_BUFFER 0x8892
|
||||
#define GL_ARRAY_BUFFER_BINDING 0x8894
|
||||
#define GL_BACK 0x0405
|
||||
#define GL_BLEND 0x0BE2
|
||||
#define GL_BLEND_COLOR 0x8005
|
||||
#define GL_BLEND_DST_ALPHA 0x80CA
|
||||
#define GL_BLEND_DST_RGB 0x80C8
|
||||
#define GL_BLEND_EQUATION 0x8009
|
||||
#define GL_BLEND_EQUATION_ALPHA 0x883D
|
||||
#define GL_BLEND_EQUATION_RGB 0x8009
|
||||
#define GL_BLEND_SRC_ALPHA 0x80CB
|
||||
#define GL_BLEND_SRC_RGB 0x80C9
|
||||
#define GL_BLUE_BITS 0x0D54
|
||||
#define GL_BUFFER_SIZE 0x8764
|
||||
#define GL_BUFFER_USAGE 0x8765
|
||||
#define GL_BYTE 0x1400
|
||||
#define GL_CCW 0x0901
|
||||
#define GL_CLAMP_TO_EDGE 0x812F
|
||||
#define GL_COLOR_ATTACHMENT0 0x8CE0
|
||||
#define GL_COLOR_BUFFER_BIT 0x00004000
|
||||
#define GL_COLOR_CLEAR_VALUE 0x0C22
|
||||
#define GL_COLOR_WRITEMASK 0x0C23
|
||||
#define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1
|
||||
#define GL_COMPRESSED_RGBA_S3TC_DXT3_EXT 0x83F2
|
||||
#define GL_COMPRESSED_RGBA_S3TC_DXT5_EXT 0x83F3
|
||||
#define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0
|
||||
#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3
|
||||
#define GL_CONSTANT_ALPHA 0x8003
|
||||
#define GL_CONSTANT_COLOR 0x8001
|
||||
#define GL_CONTEXT_LOST 0x0507
|
||||
#define GL_CONTEXT_ROBUST_ACCESS 0x90F3
|
||||
#define GL_CULL_FACE 0x0B44
|
||||
#define GL_CULL_FACE_MODE 0x0B45
|
||||
#define GL_CURRENT_PROGRAM 0x8B8D
|
||||
#define GL_CURRENT_VERTEX_ATTRIB 0x8626
|
||||
#define GL_CW 0x0900
|
||||
#define GL_DECR 0x1E03
|
||||
#define GL_DECR_WRAP 0x8508
|
||||
#define GL_DEPTH_ATTACHMENT 0x8D00
|
||||
#define GL_DEPTH_BITS 0x0D56
|
||||
#define GL_DEPTH_BUFFER_BIT 0x00000100
|
||||
#define GL_DEPTH_CLEAR_VALUE 0x0B73
|
||||
#define GL_DEPTH_COMPONENT16 0x81A5
|
||||
#define GL_DEPTH_COMPONENT24_OES 0x81A6
|
||||
#define GL_DEPTH_COMPONENT32_OES 0x81A7
|
||||
#define GL_DEPTH_FUNC 0x0B74
|
||||
#define GL_DEPTH_RANGE 0x0B70
|
||||
#define GL_DEPTH_TEST 0x0B71
|
||||
#define GL_DEPTH_WRITEMASK 0x0B72
|
||||
#define GL_DITHER 0x0BD0
|
||||
#define GL_DONT_CARE 0x1100
|
||||
#define GL_DST_ALPHA 0x0304
|
||||
#define GL_DST_COLOR 0x0306
|
||||
#define GL_DYNAMIC_DRAW 0x88E8
|
||||
#define GL_ELEMENT_ARRAY_BUFFER 0x8893
|
||||
#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895
|
||||
#define GL_EQUAL 0x0202
|
||||
#define GL_EXTENSIONS 0x1F03
|
||||
#define GL_FALSE 0
|
||||
#define GL_FASTEST 0x1101
|
||||
#define GL_FLOAT 0x1406
|
||||
#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES 0x8B8B
|
||||
#define GL_FRAMEBUFFER 0x8D40
|
||||
#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1
|
||||
#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0
|
||||
#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2
|
||||
#define GL_FRAMEBUFFER_BINDING 0x8CA6
|
||||
#define GL_FRAMEBUFFER_COMPLETE 0x8CD5
|
||||
#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6
|
||||
#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS 0x8CD9
|
||||
#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7
|
||||
#define GL_FRAMEBUFFER_UNDEFINED 0x8219
|
||||
#define GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD
|
||||
#define GL_FRONT 0x0404
|
||||
#define GL_FRONT_AND_BACK 0x0408
|
||||
#define GL_FRONT_FACE 0x0B46
|
||||
#define GL_FUNC_ADD 0x8006
|
||||
#define GL_FUNC_REVERSE_SUBTRACT 0x800B
|
||||
#define GL_FUNC_SUBTRACT 0x800A
|
||||
#define GL_GENERATE_MIPMAP_HINT 0x8192
|
||||
#define GL_GEQUAL 0x0206
|
||||
#define GL_GREATER 0x0204
|
||||
#define GL_GREEN_BITS 0x0D53
|
||||
#define GL_GUILTY_CONTEXT_RESET 0x8253
|
||||
#define GL_HIGH_FLOAT 0x8DF2
|
||||
#define GL_HIGH_INT 0x8DF5
|
||||
#define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B
|
||||
#define GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A
|
||||
#define GL_INCR 0x1E02
|
||||
#define GL_INCR_WRAP 0x8507
|
||||
#define GL_INNOCENT_CONTEXT_RESET 0x8254
|
||||
#define GL_INT 0x1404
|
||||
#define GL_INVALID_ENUM 0x0500
|
||||
#define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506
|
||||
#define GL_INVALID_OPERATION 0x0502
|
||||
#define GL_INVALID_VALUE 0x0501
|
||||
#define GL_INVERT 0x150A
|
||||
#define GL_KEEP 0x1E00
|
||||
#define GL_LEQUAL 0x0203
|
||||
#define GL_LESS 0x0201
|
||||
#define GL_LINEAR 0x2601
|
||||
#define GL_LINEAR_MIPMAP_LINEAR 0x2703
|
||||
#define GL_LINEAR_MIPMAP_NEAREST 0x2701
|
||||
#define GL_LINES 0x0001
|
||||
#define GL_LINE_LOOP 0x0002
|
||||
#define GL_LINE_STRIP 0x0003
|
||||
#define GL_LINE_WIDTH 0x0B21
|
||||
#define GL_LINK_STATUS 0x8B82
|
||||
#define GL_LOSE_CONTEXT_ON_RESET 0x8252
|
||||
#define GL_LOW_FLOAT 0x8DF0
|
||||
#define GL_LOW_INT 0x8DF3
|
||||
#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D
|
||||
#define GL_MAX_FRAGMENT_UNIFORM_VECTORS 0x8DFD
|
||||
#define GL_MAX_RENDERBUFFER_SIZE 0x84E8
|
||||
#define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872
|
||||
#define GL_MAX_TEXTURE_SIZE 0x0D33
|
||||
#define GL_MAX_VARYING_VECTORS 0x8DFC
|
||||
#define GL_MAX_VERTEX_ATTRIBS 0x8869
|
||||
#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C
|
||||
#define GL_MAX_VERTEX_UNIFORM_VECTORS 0x8DFB
|
||||
#define GL_MAX_VIEWPORT_DIMS 0x0D3A
|
||||
#define GL_MEDIUM_FLOAT 0x8DF1
|
||||
#define GL_MEDIUM_INT 0x8DF4
|
||||
#define GL_MIRRORED_REPEAT 0x8370
|
||||
#define GL_NEAREST 0x2600
|
||||
#define GL_NEAREST_MIPMAP_LINEAR 0x2702
|
||||
#define GL_NEAREST_MIPMAP_NEAREST 0x2700
|
||||
#define GL_NEVER 0x0200
|
||||
#define GL_NICEST 0x1102
|
||||
#define GL_NONE 0
|
||||
#define GL_NOTEQUAL 0x0205
|
||||
#define GL_NO_ERROR 0
|
||||
#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
|
||||
#define GL_NUM_PROGRAM_BINARY_FORMATS 0x87FE
|
||||
#define GL_ONE 1
|
||||
#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004
|
||||
#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002
|
||||
#define GL_ONE_MINUS_DST_ALPHA 0x0305
|
||||
#define GL_ONE_MINUS_DST_COLOR 0x0307
|
||||
#define GL_ONE_MINUS_SRC_ALPHA 0x0303
|
||||
#define GL_ONE_MINUS_SRC_COLOR 0x0301
|
||||
#define GL_OUT_OF_MEMORY 0x0505
|
||||
#define GL_PACK_ALIGNMENT 0x0D05
|
||||
#define GL_POINTS 0x0000
|
||||
#define GL_POLYGON_OFFSET_FACTOR 0x8038
|
||||
#define GL_POLYGON_OFFSET_FILL 0x8037
|
||||
#define GL_POLYGON_OFFSET_UNITS 0x2A00
|
||||
#define GL_PROGRAM_BINARY_FORMATS 0x87FF
|
||||
#define GL_PVRIC_SIGNATURE_MISMATCH_IMG 0x8EA3
|
||||
#define GL_R8 0x8229
|
||||
#define GL_RED 0x1903
|
||||
#define GL_RED_BITS 0x0D52
|
||||
#define GL_RENDERBUFFER 0x8D41
|
||||
#define GL_RENDERBUFFER_ALPHA_SIZE 0x8D53
|
||||
#define GL_RENDERBUFFER_BINDING 0x8CA7
|
||||
#define GL_RENDERBUFFER_BLUE_SIZE 0x8D52
|
||||
#define GL_RENDERBUFFER_DEPTH_SIZE 0x8D54
|
||||
#define GL_RENDERBUFFER_GREEN_SIZE 0x8D51
|
||||
#define GL_RENDERBUFFER_HEIGHT 0x8D43
|
||||
#define GL_RENDERBUFFER_INTERNAL_FORMAT 0x8D44
|
||||
#define GL_RENDERBUFFER_RED_SIZE 0x8D50
|
||||
#define GL_RENDERBUFFER_STENCIL_SIZE 0x8D55
|
||||
#define GL_RENDERBUFFER_WIDTH 0x8D42
|
||||
#define GL_RENDERER 0x1F01
|
||||
#define GL_REPEAT 0x2901
|
||||
#define GL_REPLACE 0x1E01
|
||||
#define GL_RESET_NOTIFICATION_STRATEGY 0x8256
|
||||
#define GL_RG 0x8227
|
||||
#define GL_RG8 0x822B
|
||||
#define GL_RGB 0x1907
|
||||
#define GL_RGB565 0x8D62
|
||||
#define GL_RGB5_A1 0x8057
|
||||
#define GL_RGB8 0x8051
|
||||
#define GL_RGB8_OES 0x8051
|
||||
#define GL_RGBA 0x1908
|
||||
#define GL_RGBA4 0x8056
|
||||
#define GL_RGBA8 0x8058
|
||||
#define GL_RGBA8_OES 0x8058
|
||||
#define GL_SAMPLER_2D 0x8B5E
|
||||
#define GL_SAMPLES 0x80A9
|
||||
#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E
|
||||
#define GL_SAMPLE_BUFFERS 0x80A8
|
||||
#define GL_SAMPLE_COVERAGE 0x80A0
|
||||
#define GL_SAMPLE_COVERAGE_INVERT 0x80AB
|
||||
#define GL_SAMPLE_COVERAGE_VALUE 0x80AA
|
||||
#define GL_SCISSOR_BOX 0x0C10
|
||||
#define GL_SCISSOR_TEST 0x0C11
|
||||
#define GL_SHADING_LANGUAGE_VERSION 0x8B8C
|
||||
#define GL_SHORT 0x1402
|
||||
#define GL_SRC_ALPHA 0x0302
|
||||
#define GL_SRC_ALPHA_SATURATE 0x0308
|
||||
#define GL_SRC_COLOR 0x0300
|
||||
#define GL_STATIC_DRAW 0x88E4
|
||||
#define GL_STENCIL_ATTACHMENT 0x8D20
|
||||
#define GL_STENCIL_BACK_FAIL 0x8801
|
||||
#define GL_STENCIL_BACK_FUNC 0x8800
|
||||
#define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802
|
||||
#define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803
|
||||
#define GL_STENCIL_BACK_REF 0x8CA3
|
||||
#define GL_STENCIL_BACK_VALUE_MASK 0x8CA4
|
||||
#define GL_STENCIL_BACK_WRITEMASK 0x8CA5
|
||||
#define GL_STENCIL_BITS 0x0D57
|
||||
#define GL_STENCIL_BUFFER_BIT 0x00000400
|
||||
#define GL_STENCIL_CLEAR_VALUE 0x0B91
|
||||
#define GL_STENCIL_FAIL 0x0B94
|
||||
#define GL_STENCIL_FUNC 0x0B92
|
||||
#define GL_STENCIL_INDEX8 0x8D48
|
||||
#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95
|
||||
#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96
|
||||
#define GL_STENCIL_REF 0x0B97
|
||||
#define GL_STENCIL_TEST 0x0B90
|
||||
#define GL_STENCIL_VALUE_MASK 0x0B93
|
||||
#define GL_STENCIL_WRITEMASK 0x0B98
|
||||
#define GL_STREAM_DRAW 0x88E0
|
||||
#define GL_SUBPIXEL_BITS 0x0D50
|
||||
#define GL_TEXTURE 0x1702
|
||||
#define GL_TEXTURE0 0x84C0
|
||||
#define GL_TEXTURE1 0x84C1
|
||||
#define GL_TEXTURE10 0x84CA
|
||||
#define GL_TEXTURE11 0x84CB
|
||||
#define GL_TEXTURE12 0x84CC
|
||||
#define GL_TEXTURE13 0x84CD
|
||||
#define GL_TEXTURE14 0x84CE
|
||||
#define GL_TEXTURE15 0x84CF
|
||||
#define GL_TEXTURE16 0x84D0
|
||||
#define GL_TEXTURE17 0x84D1
|
||||
#define GL_TEXTURE18 0x84D2
|
||||
#define GL_TEXTURE19 0x84D3
|
||||
#define GL_TEXTURE2 0x84C2
|
||||
#define GL_TEXTURE20 0x84D4
|
||||
#define GL_TEXTURE21 0x84D5
|
||||
#define GL_TEXTURE22 0x84D6
|
||||
#define GL_TEXTURE23 0x84D7
|
||||
#define GL_TEXTURE24 0x84D8
|
||||
#define GL_TEXTURE25 0x84D9
|
||||
#define GL_TEXTURE26 0x84DA
|
||||
#define GL_TEXTURE27 0x84DB
|
||||
#define GL_TEXTURE28 0x84DC
|
||||
#define GL_TEXTURE29 0x84DD
|
||||
#define GL_TEXTURE3 0x84C3
|
||||
#define GL_TEXTURE30 0x84DE
|
||||
#define GL_TEXTURE31 0x84DF
|
||||
#define GL_TEXTURE4 0x84C4
|
||||
#define GL_TEXTURE5 0x84C5
|
||||
#define GL_TEXTURE6 0x84C6
|
||||
#define GL_TEXTURE7 0x84C7
|
||||
#define GL_TEXTURE8 0x84C8
|
||||
#define GL_TEXTURE9 0x84C9
|
||||
#define GL_TEXTURE_2D 0x0DE1
|
||||
#define GL_TEXTURE_BINDING_2D 0x8069
|
||||
#define GL_TEXTURE_IMMUTABLE_FORMAT 0x912F
|
||||
#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_TRIANGLES 0x0004
|
||||
#define GL_TRIANGLE_FAN 0x0006
|
||||
#define GL_TRIANGLE_STRIP 0x0005
|
||||
#define GL_TRP_ERROR_CONTEXT_RESET_IMG 0x8EA1
|
||||
#define GL_TRP_IMG 0x8EA0
|
||||
#define GL_TRP_UNSUPPORTED_CONTEXT_IMG 0x8EA2
|
||||
#define GL_TRUE 1
|
||||
#define GL_UNKNOWN_CONTEXT_RESET 0x8255
|
||||
#define GL_UNPACK_ALIGNMENT 0x0CF5
|
||||
#define GL_UNSIGNED_BYTE 0x1401
|
||||
#define GL_UNSIGNED_INT 0x1405
|
||||
#define GL_UNSIGNED_SHORT 0x1403
|
||||
#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033
|
||||
#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034
|
||||
#define GL_UNSIGNED_SHORT_5_6_5 0x8363
|
||||
#define GL_VENDOR 0x1F00
|
||||
#define GL_VERSION 0x1F02
|
||||
#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F
|
||||
#define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622
|
||||
#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A
|
||||
#define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645
|
||||
#define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623
|
||||
#define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624
|
||||
#define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625
|
||||
#define GL_VIEWPORT 0x0BA2
|
||||
#define GL_ZERO 0
|
||||
|
||||
|
||||
#include <KHR/khrplatform.h>
|
||||
typedef unsigned int GLenum;
|
||||
typedef unsigned char GLboolean;
|
||||
typedef unsigned int GLbitfield;
|
||||
typedef void GLvoid;
|
||||
typedef khronos_int8_t GLbyte;
|
||||
typedef khronos_uint8_t GLubyte;
|
||||
typedef khronos_int16_t GLshort;
|
||||
typedef khronos_uint16_t GLushort;
|
||||
typedef int GLint;
|
||||
typedef unsigned int GLuint;
|
||||
typedef khronos_int32_t GLclampx;
|
||||
typedef int GLsizei;
|
||||
typedef khronos_float_t GLfloat;
|
||||
typedef khronos_float_t GLclampf;
|
||||
typedef double GLdouble;
|
||||
typedef double GLclampd;
|
||||
typedef void *GLeglClientBufferEXT;
|
||||
typedef void *GLeglImageOES;
|
||||
typedef char GLchar;
|
||||
typedef char GLcharARB;
|
||||
#ifdef __APPLE__
|
||||
typedef void *GLhandleARB;
|
||||
#else
|
||||
typedef unsigned int GLhandleARB;
|
||||
#endif
|
||||
typedef khronos_uint16_t GLhalf;
|
||||
typedef khronos_uint16_t GLhalfARB;
|
||||
typedef khronos_int32_t GLfixed;
|
||||
#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ > 1060)
|
||||
typedef khronos_intptr_t GLintptr;
|
||||
#else
|
||||
typedef khronos_intptr_t GLintptr;
|
||||
#endif
|
||||
#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ > 1060)
|
||||
typedef khronos_intptr_t GLintptrARB;
|
||||
#else
|
||||
typedef khronos_intptr_t GLintptrARB;
|
||||
#endif
|
||||
#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ > 1060)
|
||||
typedef khronos_ssize_t GLsizeiptr;
|
||||
#else
|
||||
typedef khronos_ssize_t GLsizeiptr;
|
||||
#endif
|
||||
#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ > 1060)
|
||||
typedef khronos_ssize_t GLsizeiptrARB;
|
||||
#else
|
||||
typedef khronos_ssize_t GLsizeiptrARB;
|
||||
#endif
|
||||
typedef khronos_int64_t GLint64;
|
||||
typedef khronos_int64_t GLint64EXT;
|
||||
typedef khronos_uint64_t GLuint64;
|
||||
typedef khronos_uint64_t GLuint64EXT;
|
||||
typedef struct __GLsync *GLsync;
|
||||
struct _cl_context;
|
||||
struct _cl_event;
|
||||
typedef void (GLAD_API_PTR *GLDEBUGPROC)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam);
|
||||
typedef void (GLAD_API_PTR *GLDEBUGPROCARB)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam);
|
||||
typedef void (GLAD_API_PTR *GLDEBUGPROCKHR)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam);
|
||||
typedef void (GLAD_API_PTR *GLDEBUGPROCAMD)(GLuint id,GLenum category,GLenum severity,GLsizei length,const GLchar *message,void *userParam);
|
||||
typedef unsigned short GLhalfNV;
|
||||
typedef GLintptr GLvdpauSurfaceNV;
|
||||
typedef void (GLAD_API_PTR *GLVULKANPROCNV)(void);
|
||||
|
||||
|
||||
#define GL_SC_VERSION_2_0 1
|
||||
#define GL_EXT_texture_compression_s3tc 1
|
||||
#define GL_IMG_pvric_end_to_end_signature 1
|
||||
#define GL_IMG_tile_region_protection 1
|
||||
#define GL_OES_depth24 1
|
||||
#define GL_OES_depth32 1
|
||||
#define GL_OES_rgb8_rgba8 1
|
||||
#define GL_OES_standard_derivatives 1
|
||||
|
||||
|
||||
typedef void (GLAD_API_PTR *PFNGLACTIVETEXTUREPROC)(GLenum texture);
|
||||
typedef void (GLAD_API_PTR *PFNGLBINDBUFFERPROC)(GLenum target, GLuint buffer);
|
||||
typedef void (GLAD_API_PTR *PFNGLBINDFRAMEBUFFERPROC)(GLenum target, GLuint framebuffer);
|
||||
typedef void (GLAD_API_PTR *PFNGLBINDRENDERBUFFERPROC)(GLenum target, GLuint renderbuffer);
|
||||
typedef void (GLAD_API_PTR *PFNGLBINDTEXTUREPROC)(GLenum target, GLuint texture);
|
||||
typedef void (GLAD_API_PTR *PFNGLBLENDCOLORPROC)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
|
||||
typedef void (GLAD_API_PTR *PFNGLBLENDEQUATIONPROC)(GLenum mode);
|
||||
typedef void (GLAD_API_PTR *PFNGLBLENDEQUATIONSEPARATEPROC)(GLenum modeRGB, GLenum modeAlpha);
|
||||
typedef void (GLAD_API_PTR *PFNGLBLENDFUNCPROC)(GLenum sfactor, GLenum dfactor);
|
||||
typedef void (GLAD_API_PTR *PFNGLBLENDFUNCSEPARATEPROC)(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
|
||||
typedef void (GLAD_API_PTR *PFNGLBUFFERDATAPROC)(GLenum target, GLsizeiptr size, const void * data, GLenum usage);
|
||||
typedef void (GLAD_API_PTR *PFNGLBUFFERSUBDATAPROC)(GLenum target, GLintptr offset, GLsizeiptr size, const void * data);
|
||||
typedef GLenum (GLAD_API_PTR *PFNGLCHECKFRAMEBUFFERSTATUSPROC)(GLenum target);
|
||||
typedef void (GLAD_API_PTR *PFNGLCLEARPROC)(GLbitfield mask);
|
||||
typedef void (GLAD_API_PTR *PFNGLCLEARCOLORPROC)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
|
||||
typedef void (GLAD_API_PTR *PFNGLCLEARDEPTHFPROC)(GLfloat d);
|
||||
typedef void (GLAD_API_PTR *PFNGLCLEARSTENCILPROC)(GLint s);
|
||||
typedef void (GLAD_API_PTR *PFNGLCOLORMASKPROC)(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
|
||||
typedef void (GLAD_API_PTR *PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void * data);
|
||||
typedef GLuint (GLAD_API_PTR *PFNGLCREATEPROGRAMPROC)(void);
|
||||
typedef void (GLAD_API_PTR *PFNGLCULLFACEPROC)(GLenum mode);
|
||||
typedef void (GLAD_API_PTR *PFNGLDEPTHFUNCPROC)(GLenum func);
|
||||
typedef void (GLAD_API_PTR *PFNGLDEPTHMASKPROC)(GLboolean flag);
|
||||
typedef void (GLAD_API_PTR *PFNGLDEPTHRANGEFPROC)(GLfloat n, GLfloat f);
|
||||
typedef void (GLAD_API_PTR *PFNGLDISABLEPROC)(GLenum cap);
|
||||
typedef void (GLAD_API_PTR *PFNGLDISABLEVERTEXATTRIBARRAYPROC)(GLuint index);
|
||||
typedef void (GLAD_API_PTR *PFNGLDRAWARRAYSPROC)(GLenum mode, GLint first, GLsizei count);
|
||||
typedef void (GLAD_API_PTR *PFNGLDRAWRANGEELEMENTSPROC)(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void * indices);
|
||||
typedef void (GLAD_API_PTR *PFNGLENABLEPROC)(GLenum cap);
|
||||
typedef void (GLAD_API_PTR *PFNGLENABLEVERTEXATTRIBARRAYPROC)(GLuint index);
|
||||
typedef void (GLAD_API_PTR *PFNGLFINISHPROC)(void);
|
||||
typedef void (GLAD_API_PTR *PFNGLFLUSHPROC)(void);
|
||||
typedef void (GLAD_API_PTR *PFNGLFRAMEBUFFERRENDERBUFFERPROC)(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
|
||||
typedef void (GLAD_API_PTR *PFNGLFRAMEBUFFERTEXTURE2DPROC)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
|
||||
typedef void (GLAD_API_PTR *PFNGLFRONTFACEPROC)(GLenum mode);
|
||||
typedef void (GLAD_API_PTR *PFNGLGENBUFFERSPROC)(GLsizei n, GLuint * buffers);
|
||||
typedef void (GLAD_API_PTR *PFNGLGENFRAMEBUFFERSPROC)(GLsizei n, GLuint * framebuffers);
|
||||
typedef void (GLAD_API_PTR *PFNGLGENRENDERBUFFERSPROC)(GLsizei n, GLuint * renderbuffers);
|
||||
typedef void (GLAD_API_PTR *PFNGLGENTEXTURESPROC)(GLsizei n, GLuint * textures);
|
||||
typedef void (GLAD_API_PTR *PFNGLGENERATEMIPMAPPROC)(GLenum target);
|
||||
typedef GLint (GLAD_API_PTR *PFNGLGETATTRIBLOCATIONPROC)(GLuint program, const GLchar * name);
|
||||
typedef void (GLAD_API_PTR *PFNGLGETBOOLEANVPROC)(GLenum pname, GLboolean * data);
|
||||
typedef void (GLAD_API_PTR *PFNGLGETBUFFERPARAMETERIVPROC)(GLenum target, GLenum pname, GLint * params);
|
||||
typedef GLenum (GLAD_API_PTR *PFNGLGETERRORPROC)(void);
|
||||
typedef void (GLAD_API_PTR *PFNGLGETFLOATVPROC)(GLenum pname, GLfloat * data);
|
||||
typedef void (GLAD_API_PTR *PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC)(GLenum target, GLenum attachment, GLenum pname, GLint * params);
|
||||
typedef GLenum (GLAD_API_PTR *PFNGLGETGRAPHICSRESETSTATUSPROC)(void);
|
||||
typedef void (GLAD_API_PTR *PFNGLGETINTEGERVPROC)(GLenum pname, GLint * data);
|
||||
typedef void (GLAD_API_PTR *PFNGLGETPROGRAMIVPROC)(GLuint program, GLenum pname, GLint * params);
|
||||
typedef void (GLAD_API_PTR *PFNGLGETRENDERBUFFERPARAMETERIVPROC)(GLenum target, GLenum pname, GLint * params);
|
||||
typedef const GLubyte * (GLAD_API_PTR *PFNGLGETSTRINGPROC)(GLenum name);
|
||||
typedef void (GLAD_API_PTR *PFNGLGETTEXPARAMETERFVPROC)(GLenum target, GLenum pname, GLfloat * params);
|
||||
typedef void (GLAD_API_PTR *PFNGLGETTEXPARAMETERIVPROC)(GLenum target, GLenum pname, GLint * params);
|
||||
typedef GLint (GLAD_API_PTR *PFNGLGETUNIFORMLOCATIONPROC)(GLuint program, const GLchar * name);
|
||||
typedef void (GLAD_API_PTR *PFNGLGETVERTEXATTRIBPOINTERVPROC)(GLuint index, GLenum pname, void ** pointer);
|
||||
typedef void (GLAD_API_PTR *PFNGLGETVERTEXATTRIBFVPROC)(GLuint index, GLenum pname, GLfloat * params);
|
||||
typedef void (GLAD_API_PTR *PFNGLGETVERTEXATTRIBIVPROC)(GLuint index, GLenum pname, GLint * params);
|
||||
typedef void (GLAD_API_PTR *PFNGLGETNUNIFORMFVPROC)(GLuint program, GLint location, GLsizei bufSize, GLfloat * params);
|
||||
typedef void (GLAD_API_PTR *PFNGLGETNUNIFORMIVPROC)(GLuint program, GLint location, GLsizei bufSize, GLint * params);
|
||||
typedef void (GLAD_API_PTR *PFNGLHINTPROC)(GLenum target, GLenum mode);
|
||||
typedef GLboolean (GLAD_API_PTR *PFNGLISENABLEDPROC)(GLenum cap);
|
||||
typedef void (GLAD_API_PTR *PFNGLLINEWIDTHPROC)(GLfloat width);
|
||||
typedef void (GLAD_API_PTR *PFNGLPIXELSTOREIPROC)(GLenum pname, GLint param);
|
||||
typedef void (GLAD_API_PTR *PFNGLPOLYGONOFFSETPROC)(GLfloat factor, GLfloat units);
|
||||
typedef void (GLAD_API_PTR *PFNGLPROGRAMBINARYPROC)(GLuint program, GLenum binaryFormat, const void * binary, GLsizei length);
|
||||
typedef void (GLAD_API_PTR *PFNGLREADNPIXELSPROC)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void * data);
|
||||
typedef void (GLAD_API_PTR *PFNGLRENDERBUFFERSTORAGEPROC)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
|
||||
typedef void (GLAD_API_PTR *PFNGLSAMPLECOVERAGEPROC)(GLfloat value, GLboolean invert);
|
||||
typedef void (GLAD_API_PTR *PFNGLSCISSORPROC)(GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
typedef void (GLAD_API_PTR *PFNGLSTENCILFUNCPROC)(GLenum func, GLint ref, GLuint mask);
|
||||
typedef void (GLAD_API_PTR *PFNGLSTENCILFUNCSEPARATEPROC)(GLenum face, GLenum func, GLint ref, GLuint mask);
|
||||
typedef void (GLAD_API_PTR *PFNGLSTENCILMASKPROC)(GLuint mask);
|
||||
typedef void (GLAD_API_PTR *PFNGLSTENCILMASKSEPARATEPROC)(GLenum face, GLuint mask);
|
||||
typedef void (GLAD_API_PTR *PFNGLSTENCILOPPROC)(GLenum fail, GLenum zfail, GLenum zpass);
|
||||
typedef void (GLAD_API_PTR *PFNGLSTENCILOPSEPARATEPROC)(GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
|
||||
typedef void (GLAD_API_PTR *PFNGLTEXPARAMETERFPROC)(GLenum target, GLenum pname, GLfloat param);
|
||||
typedef void (GLAD_API_PTR *PFNGLTEXPARAMETERFVPROC)(GLenum target, GLenum pname, const GLfloat * params);
|
||||
typedef void (GLAD_API_PTR *PFNGLTEXPARAMETERIPROC)(GLenum target, GLenum pname, GLint param);
|
||||
typedef void (GLAD_API_PTR *PFNGLTEXPARAMETERIVPROC)(GLenum target, GLenum pname, const GLint * params);
|
||||
typedef void (GLAD_API_PTR *PFNGLTEXSTORAGE2DPROC)(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
|
||||
typedef void (GLAD_API_PTR *PFNGLTEXSUBIMAGE2DPROC)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void * pixels);
|
||||
typedef void (GLAD_API_PTR *PFNGLUNIFORM1FPROC)(GLint location, GLfloat v0);
|
||||
typedef void (GLAD_API_PTR *PFNGLUNIFORM1FVPROC)(GLint location, GLsizei count, const GLfloat * value);
|
||||
typedef void (GLAD_API_PTR *PFNGLUNIFORM1IPROC)(GLint location, GLint v0);
|
||||
typedef void (GLAD_API_PTR *PFNGLUNIFORM1IVPROC)(GLint location, GLsizei count, const GLint * value);
|
||||
typedef void (GLAD_API_PTR *PFNGLUNIFORM2FPROC)(GLint location, GLfloat v0, GLfloat v1);
|
||||
typedef void (GLAD_API_PTR *PFNGLUNIFORM2FVPROC)(GLint location, GLsizei count, const GLfloat * value);
|
||||
typedef void (GLAD_API_PTR *PFNGLUNIFORM2IPROC)(GLint location, GLint v0, GLint v1);
|
||||
typedef void (GLAD_API_PTR *PFNGLUNIFORM2IVPROC)(GLint location, GLsizei count, const GLint * value);
|
||||
typedef void (GLAD_API_PTR *PFNGLUNIFORM3FPROC)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
|
||||
typedef void (GLAD_API_PTR *PFNGLUNIFORM3FVPROC)(GLint location, GLsizei count, const GLfloat * value);
|
||||
typedef void (GLAD_API_PTR *PFNGLUNIFORM3IPROC)(GLint location, GLint v0, GLint v1, GLint v2);
|
||||
typedef void (GLAD_API_PTR *PFNGLUNIFORM3IVPROC)(GLint location, GLsizei count, const GLint * value);
|
||||
typedef void (GLAD_API_PTR *PFNGLUNIFORM4FPROC)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
|
||||
typedef void (GLAD_API_PTR *PFNGLUNIFORM4FVPROC)(GLint location, GLsizei count, const GLfloat * value);
|
||||
typedef void (GLAD_API_PTR *PFNGLUNIFORM4IPROC)(GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
|
||||
typedef void (GLAD_API_PTR *PFNGLUNIFORM4IVPROC)(GLint location, GLsizei count, const GLint * value);
|
||||
typedef void (GLAD_API_PTR *PFNGLUNIFORMMATRIX2FVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value);
|
||||
typedef void (GLAD_API_PTR *PFNGLUNIFORMMATRIX3FVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value);
|
||||
typedef void (GLAD_API_PTR *PFNGLUNIFORMMATRIX4FVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value);
|
||||
typedef void (GLAD_API_PTR *PFNGLUSEPROGRAMPROC)(GLuint program);
|
||||
typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB1FPROC)(GLuint index, GLfloat x);
|
||||
typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB1FVPROC)(GLuint index, const GLfloat * v);
|
||||
typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB2FPROC)(GLuint index, GLfloat x, GLfloat y);
|
||||
typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB2FVPROC)(GLuint index, const GLfloat * v);
|
||||
typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB3FPROC)(GLuint index, GLfloat x, GLfloat y, GLfloat z);
|
||||
typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB3FVPROC)(GLuint index, const GLfloat * v);
|
||||
typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB4FPROC)(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
|
||||
typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB4FVPROC)(GLuint index, const GLfloat * v);
|
||||
typedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBPOINTERPROC)(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void * pointer);
|
||||
typedef void (GLAD_API_PTR *PFNGLVIEWPORTPROC)(GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
|
||||
typedef struct GladGLSC2Context {
|
||||
void* userptr;
|
||||
|
||||
int SC_VERSION_2_0;
|
||||
int EXT_texture_compression_s3tc;
|
||||
int IMG_pvric_end_to_end_signature;
|
||||
int IMG_tile_region_protection;
|
||||
int OES_depth24;
|
||||
int OES_depth32;
|
||||
int OES_rgb8_rgba8;
|
||||
int OES_standard_derivatives;
|
||||
|
||||
PFNGLACTIVETEXTUREPROC ActiveTexture;
|
||||
PFNGLBINDBUFFERPROC BindBuffer;
|
||||
PFNGLBINDFRAMEBUFFERPROC BindFramebuffer;
|
||||
PFNGLBINDRENDERBUFFERPROC BindRenderbuffer;
|
||||
PFNGLBINDTEXTUREPROC BindTexture;
|
||||
PFNGLBLENDCOLORPROC BlendColor;
|
||||
PFNGLBLENDEQUATIONPROC BlendEquation;
|
||||
PFNGLBLENDEQUATIONSEPARATEPROC BlendEquationSeparate;
|
||||
PFNGLBLENDFUNCPROC BlendFunc;
|
||||
PFNGLBLENDFUNCSEPARATEPROC BlendFuncSeparate;
|
||||
PFNGLBUFFERDATAPROC BufferData;
|
||||
PFNGLBUFFERSUBDATAPROC BufferSubData;
|
||||
PFNGLCHECKFRAMEBUFFERSTATUSPROC CheckFramebufferStatus;
|
||||
PFNGLCLEARPROC Clear;
|
||||
PFNGLCLEARCOLORPROC ClearColor;
|
||||
PFNGLCLEARDEPTHFPROC ClearDepthf;
|
||||
PFNGLCLEARSTENCILPROC ClearStencil;
|
||||
PFNGLCOLORMASKPROC ColorMask;
|
||||
PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC CompressedTexSubImage2D;
|
||||
PFNGLCREATEPROGRAMPROC CreateProgram;
|
||||
PFNGLCULLFACEPROC CullFace;
|
||||
PFNGLDEPTHFUNCPROC DepthFunc;
|
||||
PFNGLDEPTHMASKPROC DepthMask;
|
||||
PFNGLDEPTHRANGEFPROC DepthRangef;
|
||||
PFNGLDISABLEPROC Disable;
|
||||
PFNGLDISABLEVERTEXATTRIBARRAYPROC DisableVertexAttribArray;
|
||||
PFNGLDRAWARRAYSPROC DrawArrays;
|
||||
PFNGLDRAWRANGEELEMENTSPROC DrawRangeElements;
|
||||
PFNGLENABLEPROC Enable;
|
||||
PFNGLENABLEVERTEXATTRIBARRAYPROC EnableVertexAttribArray;
|
||||
PFNGLFINISHPROC Finish;
|
||||
PFNGLFLUSHPROC Flush;
|
||||
PFNGLFRAMEBUFFERRENDERBUFFERPROC FramebufferRenderbuffer;
|
||||
PFNGLFRAMEBUFFERTEXTURE2DPROC FramebufferTexture2D;
|
||||
PFNGLFRONTFACEPROC FrontFace;
|
||||
PFNGLGENBUFFERSPROC GenBuffers;
|
||||
PFNGLGENFRAMEBUFFERSPROC GenFramebuffers;
|
||||
PFNGLGENRENDERBUFFERSPROC GenRenderbuffers;
|
||||
PFNGLGENTEXTURESPROC GenTextures;
|
||||
PFNGLGENERATEMIPMAPPROC GenerateMipmap;
|
||||
PFNGLGETATTRIBLOCATIONPROC GetAttribLocation;
|
||||
PFNGLGETBOOLEANVPROC GetBooleanv;
|
||||
PFNGLGETBUFFERPARAMETERIVPROC GetBufferParameteriv;
|
||||
PFNGLGETERRORPROC GetError;
|
||||
PFNGLGETFLOATVPROC GetFloatv;
|
||||
PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC GetFramebufferAttachmentParameteriv;
|
||||
PFNGLGETGRAPHICSRESETSTATUSPROC GetGraphicsResetStatus;
|
||||
PFNGLGETINTEGERVPROC GetIntegerv;
|
||||
PFNGLGETPROGRAMIVPROC GetProgramiv;
|
||||
PFNGLGETRENDERBUFFERPARAMETERIVPROC GetRenderbufferParameteriv;
|
||||
PFNGLGETSTRINGPROC GetString;
|
||||
PFNGLGETTEXPARAMETERFVPROC GetTexParameterfv;
|
||||
PFNGLGETTEXPARAMETERIVPROC GetTexParameteriv;
|
||||
PFNGLGETUNIFORMLOCATIONPROC GetUniformLocation;
|
||||
PFNGLGETVERTEXATTRIBPOINTERVPROC GetVertexAttribPointerv;
|
||||
PFNGLGETVERTEXATTRIBFVPROC GetVertexAttribfv;
|
||||
PFNGLGETVERTEXATTRIBIVPROC GetVertexAttribiv;
|
||||
PFNGLGETNUNIFORMFVPROC GetnUniformfv;
|
||||
PFNGLGETNUNIFORMIVPROC GetnUniformiv;
|
||||
PFNGLHINTPROC Hint;
|
||||
PFNGLISENABLEDPROC IsEnabled;
|
||||
PFNGLLINEWIDTHPROC LineWidth;
|
||||
PFNGLPIXELSTOREIPROC PixelStorei;
|
||||
PFNGLPOLYGONOFFSETPROC PolygonOffset;
|
||||
PFNGLPROGRAMBINARYPROC ProgramBinary;
|
||||
PFNGLREADNPIXELSPROC ReadnPixels;
|
||||
PFNGLRENDERBUFFERSTORAGEPROC RenderbufferStorage;
|
||||
PFNGLSAMPLECOVERAGEPROC SampleCoverage;
|
||||
PFNGLSCISSORPROC Scissor;
|
||||
PFNGLSTENCILFUNCPROC StencilFunc;
|
||||
PFNGLSTENCILFUNCSEPARATEPROC StencilFuncSeparate;
|
||||
PFNGLSTENCILMASKPROC StencilMask;
|
||||
PFNGLSTENCILMASKSEPARATEPROC StencilMaskSeparate;
|
||||
PFNGLSTENCILOPPROC StencilOp;
|
||||
PFNGLSTENCILOPSEPARATEPROC StencilOpSeparate;
|
||||
PFNGLTEXPARAMETERFPROC TexParameterf;
|
||||
PFNGLTEXPARAMETERFVPROC TexParameterfv;
|
||||
PFNGLTEXPARAMETERIPROC TexParameteri;
|
||||
PFNGLTEXPARAMETERIVPROC TexParameteriv;
|
||||
PFNGLTEXSTORAGE2DPROC TexStorage2D;
|
||||
PFNGLTEXSUBIMAGE2DPROC TexSubImage2D;
|
||||
PFNGLUNIFORM1FPROC Uniform1f;
|
||||
PFNGLUNIFORM1FVPROC Uniform1fv;
|
||||
PFNGLUNIFORM1IPROC Uniform1i;
|
||||
PFNGLUNIFORM1IVPROC Uniform1iv;
|
||||
PFNGLUNIFORM2FPROC Uniform2f;
|
||||
PFNGLUNIFORM2FVPROC Uniform2fv;
|
||||
PFNGLUNIFORM2IPROC Uniform2i;
|
||||
PFNGLUNIFORM2IVPROC Uniform2iv;
|
||||
PFNGLUNIFORM3FPROC Uniform3f;
|
||||
PFNGLUNIFORM3FVPROC Uniform3fv;
|
||||
PFNGLUNIFORM3IPROC Uniform3i;
|
||||
PFNGLUNIFORM3IVPROC Uniform3iv;
|
||||
PFNGLUNIFORM4FPROC Uniform4f;
|
||||
PFNGLUNIFORM4FVPROC Uniform4fv;
|
||||
PFNGLUNIFORM4IPROC Uniform4i;
|
||||
PFNGLUNIFORM4IVPROC Uniform4iv;
|
||||
PFNGLUNIFORMMATRIX2FVPROC UniformMatrix2fv;
|
||||
PFNGLUNIFORMMATRIX3FVPROC UniformMatrix3fv;
|
||||
PFNGLUNIFORMMATRIX4FVPROC UniformMatrix4fv;
|
||||
PFNGLUSEPROGRAMPROC UseProgram;
|
||||
PFNGLVERTEXATTRIB1FPROC VertexAttrib1f;
|
||||
PFNGLVERTEXATTRIB1FVPROC VertexAttrib1fv;
|
||||
PFNGLVERTEXATTRIB2FPROC VertexAttrib2f;
|
||||
PFNGLVERTEXATTRIB2FVPROC VertexAttrib2fv;
|
||||
PFNGLVERTEXATTRIB3FPROC VertexAttrib3f;
|
||||
PFNGLVERTEXATTRIB3FVPROC VertexAttrib3fv;
|
||||
PFNGLVERTEXATTRIB4FPROC VertexAttrib4f;
|
||||
PFNGLVERTEXATTRIB4FVPROC VertexAttrib4fv;
|
||||
PFNGLVERTEXATTRIBPOINTERPROC VertexAttribPointer;
|
||||
PFNGLVIEWPORTPROC Viewport;
|
||||
|
||||
void* glad_loader_handle;
|
||||
} GladGLSC2Context;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
GLAD_API_CALL int gladLoadGLSC2ContextUserPtr(GladGLSC2Context *context, GLADuserptrloadfunc load, void *userptr);
|
||||
GLAD_API_CALL int gladLoadGLSC2Context(GladGLSC2Context *context, GLADloadfunc load);
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
@@ -4684,7 +4684,7 @@ extern "C" {
|
||||
|
||||
#pragma endregion
|
||||
|
||||
#include "KHR/khrplatform.h"
|
||||
#include "khrplatform.h"
|
||||
typedef unsigned int GLenum;
|
||||
typedef unsigned char GLboolean;
|
||||
typedef unsigned int GLbitfield;
|
||||
@@ -0,0 +1,779 @@
|
||||
/**
|
||||
* Loader generated by glad 2.0.4 on Thu Oct 26 14:05:44 2023
|
||||
*
|
||||
* SPDX-License-Identifier: (WTFPL OR CC0-1.0) AND Apache-2.0
|
||||
*
|
||||
* Generator: C/C++
|
||||
* Specification: gl
|
||||
* Extensions: 7
|
||||
*
|
||||
* APIs:
|
||||
* - glsc2=2.0
|
||||
*
|
||||
* Options:
|
||||
* - ALIAS = False
|
||||
* - DEBUG = False
|
||||
* - HEADER_ONLY = False
|
||||
* - LOADER = True
|
||||
* - MX = True
|
||||
* - ON_DEMAND = False
|
||||
*
|
||||
* Commandline:
|
||||
* --api='glsc2=2.0' --extensions='GL_EXT_texture_compression_s3tc,GL_IMG_pvric_end_to_end_signature,GL_IMG_tile_region_protection,GL_OES_depth24,GL_OES_depth32,GL_OES_rgb8_rgba8,GL_OES_standard_derivatives' c --loader --mx
|
||||
*
|
||||
* Online:
|
||||
* http://glad.sh/#api=glsc2%3D2.0&extensions=GL_EXT_texture_compression_s3tc%2CGL_IMG_pvric_end_to_end_signature%2CGL_IMG_tile_region_protection%2CGL_OES_depth24%2CGL_OES_depth32%2CGL_OES_rgb8_rgba8%2CGL_OES_standard_derivatives&generator=c&options=LOADER%2CMX
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef GLAD_GLSC2_H_
|
||||
#define GLAD_GLSC2_H_
|
||||
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wreserved-id-macro"
|
||||
#endif
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
|
||||
#define GLAD_GLSC2
|
||||
#define GLAD_OPTION_GLSC2_LOADER
|
||||
#define GLAD_OPTION_GLSC2_MX
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef GLAD_PLATFORM_H_
|
||||
#define GLAD_PLATFORM_H_
|
||||
|
||||
#ifndef GLAD_PLATFORM_WIN32
|
||||
#if defined(_WIN32) || defined(__WIN32__) || defined(WIN32) || defined(__MINGW32__)
|
||||
#define GLAD_PLATFORM_WIN32 1
|
||||
#else
|
||||
#define GLAD_PLATFORM_WIN32 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef GLAD_PLATFORM_APPLE
|
||||
#ifdef __APPLE__
|
||||
#define GLAD_PLATFORM_APPLE 1
|
||||
#else
|
||||
#define GLAD_PLATFORM_APPLE 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef GLAD_PLATFORM_EMSCRIPTEN
|
||||
#ifdef __EMSCRIPTEN__
|
||||
#define GLAD_PLATFORM_EMSCRIPTEN 1
|
||||
#else
|
||||
#define GLAD_PLATFORM_EMSCRIPTEN 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef GLAD_PLATFORM_UWP
|
||||
#if defined(_MSC_VER) && !defined(GLAD_INTERNAL_HAVE_WINAPIFAMILY)
|
||||
#ifdef __has_include
|
||||
#if __has_include(<winapifamily.h>)
|
||||
#define GLAD_INTERNAL_HAVE_WINAPIFAMILY 1
|
||||
#endif
|
||||
#elif _MSC_VER >= 1700 && !_USING_V110_SDK71_
|
||||
#define GLAD_INTERNAL_HAVE_WINAPIFAMILY 1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef GLAD_INTERNAL_HAVE_WINAPIFAMILY
|
||||
#include <winapifamily.h>
|
||||
#if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) && WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
|
||||
#define GLAD_PLATFORM_UWP 1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef GLAD_PLATFORM_UWP
|
||||
#define GLAD_PLATFORM_UWP 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef __GNUC__
|
||||
#define GLAD_GNUC_EXTENSION __extension__
|
||||
#else
|
||||
#define GLAD_GNUC_EXTENSION
|
||||
#endif
|
||||
|
||||
#define GLAD_UNUSED(x) (void)(x)
|
||||
|
||||
#ifndef GLAD_API_CALL
|
||||
#if defined(GLAD_API_CALL_EXPORT)
|
||||
#if GLAD_PLATFORM_WIN32 || defined(__CYGWIN__)
|
||||
#if defined(GLAD_API_CALL_EXPORT_BUILD)
|
||||
#if defined(__GNUC__)
|
||||
#define GLAD_API_CALL __attribute__ ((dllexport)) extern
|
||||
#else
|
||||
#define GLAD_API_CALL __declspec(dllexport) extern
|
||||
#endif
|
||||
#else
|
||||
#if defined(__GNUC__)
|
||||
#define GLAD_API_CALL __attribute__ ((dllimport)) extern
|
||||
#else
|
||||
#define GLAD_API_CALL __declspec(dllimport) extern
|
||||
#endif
|
||||
#endif
|
||||
#elif defined(__GNUC__) && defined(GLAD_API_CALL_EXPORT_BUILD)
|
||||
#define GLAD_API_CALL __attribute__ ((visibility ("default"))) extern
|
||||
#else
|
||||
#define GLAD_API_CALL extern
|
||||
#endif
|
||||
#else
|
||||
#define GLAD_API_CALL extern
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef APIENTRY
|
||||
#define GLAD_API_PTR APIENTRY
|
||||
#elif GLAD_PLATFORM_WIN32
|
||||
#define GLAD_API_PTR __stdcall
|
||||
#else
|
||||
#define GLAD_API_PTR
|
||||
#endif
|
||||
|
||||
#ifndef GLAPI
|
||||
#define GLAPI GLAD_API_CALL
|
||||
#endif
|
||||
|
||||
#ifndef GLAPIENTRY
|
||||
#define GLAPIENTRY GLAD_API_PTR
|
||||
#endif
|
||||
|
||||
#define GLAD_MAKE_VERSION(major, minor) (major * 10000 + minor)
|
||||
#define GLAD_VERSION_MAJOR(version) (version / 10000)
|
||||
#define GLAD_VERSION_MINOR(version) (version % 10000)
|
||||
|
||||
#define GLAD_GENERATOR_VERSION "2.0.4"
|
||||
|
||||
typedef void (*GLADapiproc)(void);
|
||||
|
||||
typedef GLADapiproc(*GLADloadfunc)(const char* name);
|
||||
typedef GLADapiproc(*GLADuserptrloadfunc)(void* userptr, const char* name);
|
||||
|
||||
typedef void (*GLADprecallback)(const char* name, GLADapiproc apiproc, int len_args, ...);
|
||||
typedef void (*GLADpostcallback)(void* ret, const char* name, GLADapiproc apiproc, int len_args, ...);
|
||||
|
||||
#endif /* GLAD_PLATFORM_H_ */
|
||||
|
||||
#define GL_ACTIVE_TEXTURE 0x84E0
|
||||
#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E
|
||||
#define GL_ALIASED_POINT_SIZE_RANGE 0x846D
|
||||
#define GL_ALPHA_BITS 0x0D55
|
||||
#define GL_ALWAYS 0x0207
|
||||
#define GL_ARRAY_BUFFER 0x8892
|
||||
#define GL_ARRAY_BUFFER_BINDING 0x8894
|
||||
#define GL_BACK 0x0405
|
||||
#define GL_BLEND 0x0BE2
|
||||
#define GL_BLEND_COLOR 0x8005
|
||||
#define GL_BLEND_DST_ALPHA 0x80CA
|
||||
#define GL_BLEND_DST_RGB 0x80C8
|
||||
#define GL_BLEND_EQUATION 0x8009
|
||||
#define GL_BLEND_EQUATION_ALPHA 0x883D
|
||||
#define GL_BLEND_EQUATION_RGB 0x8009
|
||||
#define GL_BLEND_SRC_ALPHA 0x80CB
|
||||
#define GL_BLEND_SRC_RGB 0x80C9
|
||||
#define GL_BLUE_BITS 0x0D54
|
||||
#define GL_BUFFER_SIZE 0x8764
|
||||
#define GL_BUFFER_USAGE 0x8765
|
||||
#define GL_BYTE 0x1400
|
||||
#define GL_CCW 0x0901
|
||||
#define GL_CLAMP_TO_EDGE 0x812F
|
||||
#define GL_COLOR_ATTACHMENT0 0x8CE0
|
||||
#define GL_COLOR_BUFFER_BIT 0x00004000
|
||||
#define GL_COLOR_CLEAR_VALUE 0x0C22
|
||||
#define GL_COLOR_WRITEMASK 0x0C23
|
||||
#define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1
|
||||
#define GL_COMPRESSED_RGBA_S3TC_DXT3_EXT 0x83F2
|
||||
#define GL_COMPRESSED_RGBA_S3TC_DXT5_EXT 0x83F3
|
||||
#define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0
|
||||
#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3
|
||||
#define GL_CONSTANT_ALPHA 0x8003
|
||||
#define GL_CONSTANT_COLOR 0x8001
|
||||
#define GL_CONTEXT_LOST 0x0507
|
||||
#define GL_CONTEXT_ROBUST_ACCESS 0x90F3
|
||||
#define GL_CULL_FACE 0x0B44
|
||||
#define GL_CULL_FACE_MODE 0x0B45
|
||||
#define GL_CURRENT_PROGRAM 0x8B8D
|
||||
#define GL_CURRENT_VERTEX_ATTRIB 0x8626
|
||||
#define GL_CW 0x0900
|
||||
#define GL_DECR 0x1E03
|
||||
#define GL_DECR_WRAP 0x8508
|
||||
#define GL_DEPTH_ATTACHMENT 0x8D00
|
||||
#define GL_DEPTH_BITS 0x0D56
|
||||
#define GL_DEPTH_BUFFER_BIT 0x00000100
|
||||
#define GL_DEPTH_CLEAR_VALUE 0x0B73
|
||||
#define GL_DEPTH_COMPONENT16 0x81A5
|
||||
#define GL_DEPTH_COMPONENT24_OES 0x81A6
|
||||
#define GL_DEPTH_COMPONENT32_OES 0x81A7
|
||||
#define GL_DEPTH_FUNC 0x0B74
|
||||
#define GL_DEPTH_RANGE 0x0B70
|
||||
#define GL_DEPTH_TEST 0x0B71
|
||||
#define GL_DEPTH_WRITEMASK 0x0B72
|
||||
#define GL_DITHER 0x0BD0
|
||||
#define GL_DONT_CARE 0x1100
|
||||
#define GL_DST_ALPHA 0x0304
|
||||
#define GL_DST_COLOR 0x0306
|
||||
#define GL_DYNAMIC_DRAW 0x88E8
|
||||
#define GL_ELEMENT_ARRAY_BUFFER 0x8893
|
||||
#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895
|
||||
#define GL_EQUAL 0x0202
|
||||
#define GL_EXTENSIONS 0x1F03
|
||||
#define GL_FALSE 0
|
||||
#define GL_FASTEST 0x1101
|
||||
#define GL_FLOAT 0x1406
|
||||
#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES 0x8B8B
|
||||
#define GL_FRAMEBUFFER 0x8D40
|
||||
#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1
|
||||
#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0
|
||||
#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2
|
||||
#define GL_FRAMEBUFFER_BINDING 0x8CA6
|
||||
#define GL_FRAMEBUFFER_COMPLETE 0x8CD5
|
||||
#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6
|
||||
#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS 0x8CD9
|
||||
#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7
|
||||
#define GL_FRAMEBUFFER_UNDEFINED 0x8219
|
||||
#define GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD
|
||||
#define GL_FRONT 0x0404
|
||||
#define GL_FRONT_AND_BACK 0x0408
|
||||
#define GL_FRONT_FACE 0x0B46
|
||||
#define GL_FUNC_ADD 0x8006
|
||||
#define GL_FUNC_REVERSE_SUBTRACT 0x800B
|
||||
#define GL_FUNC_SUBTRACT 0x800A
|
||||
#define GL_GENERATE_MIPMAP_HINT 0x8192
|
||||
#define GL_GEQUAL 0x0206
|
||||
#define GL_GREATER 0x0204
|
||||
#define GL_GREEN_BITS 0x0D53
|
||||
#define GL_GUILTY_CONTEXT_RESET 0x8253
|
||||
#define GL_HIGH_FLOAT 0x8DF2
|
||||
#define GL_HIGH_INT 0x8DF5
|
||||
#define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B
|
||||
#define GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A
|
||||
#define GL_INCR 0x1E02
|
||||
#define GL_INCR_WRAP 0x8507
|
||||
#define GL_INNOCENT_CONTEXT_RESET 0x8254
|
||||
#define GL_INT 0x1404
|
||||
#define GL_INVALID_ENUM 0x0500
|
||||
#define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506
|
||||
#define GL_INVALID_OPERATION 0x0502
|
||||
#define GL_INVALID_VALUE 0x0501
|
||||
#define GL_INVERT 0x150A
|
||||
#define GL_KEEP 0x1E00
|
||||
#define GL_LEQUAL 0x0203
|
||||
#define GL_LESS 0x0201
|
||||
#define GL_LINEAR 0x2601
|
||||
#define GL_LINEAR_MIPMAP_LINEAR 0x2703
|
||||
#define GL_LINEAR_MIPMAP_NEAREST 0x2701
|
||||
#define GL_LINES 0x0001
|
||||
#define GL_LINE_LOOP 0x0002
|
||||
#define GL_LINE_STRIP 0x0003
|
||||
#define GL_LINE_WIDTH 0x0B21
|
||||
#define GL_LINK_STATUS 0x8B82
|
||||
#define GL_LOSE_CONTEXT_ON_RESET 0x8252
|
||||
#define GL_LOW_FLOAT 0x8DF0
|
||||
#define GL_LOW_INT 0x8DF3
|
||||
#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D
|
||||
#define GL_MAX_FRAGMENT_UNIFORM_VECTORS 0x8DFD
|
||||
#define GL_MAX_RENDERBUFFER_SIZE 0x84E8
|
||||
#define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872
|
||||
#define GL_MAX_TEXTURE_SIZE 0x0D33
|
||||
#define GL_MAX_VARYING_VECTORS 0x8DFC
|
||||
#define GL_MAX_VERTEX_ATTRIBS 0x8869
|
||||
#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C
|
||||
#define GL_MAX_VERTEX_UNIFORM_VECTORS 0x8DFB
|
||||
#define GL_MAX_VIEWPORT_DIMS 0x0D3A
|
||||
#define GL_MEDIUM_FLOAT 0x8DF1
|
||||
#define GL_MEDIUM_INT 0x8DF4
|
||||
#define GL_MIRRORED_REPEAT 0x8370
|
||||
#define GL_NEAREST 0x2600
|
||||
#define GL_NEAREST_MIPMAP_LINEAR 0x2702
|
||||
#define GL_NEAREST_MIPMAP_NEAREST 0x2700
|
||||
#define GL_NEVER 0x0200
|
||||
#define GL_NICEST 0x1102
|
||||
#define GL_NONE 0
|
||||
#define GL_NOTEQUAL 0x0205
|
||||
#define GL_NO_ERROR 0
|
||||
#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
|
||||
#define GL_NUM_PROGRAM_BINARY_FORMATS 0x87FE
|
||||
#define GL_ONE 1
|
||||
#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004
|
||||
#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002
|
||||
#define GL_ONE_MINUS_DST_ALPHA 0x0305
|
||||
#define GL_ONE_MINUS_DST_COLOR 0x0307
|
||||
#define GL_ONE_MINUS_SRC_ALPHA 0x0303
|
||||
#define GL_ONE_MINUS_SRC_COLOR 0x0301
|
||||
#define GL_OUT_OF_MEMORY 0x0505
|
||||
#define GL_PACK_ALIGNMENT 0x0D05
|
||||
#define GL_POINTS 0x0000
|
||||
#define GL_POLYGON_OFFSET_FACTOR 0x8038
|
||||
#define GL_POLYGON_OFFSET_FILL 0x8037
|
||||
#define GL_POLYGON_OFFSET_UNITS 0x2A00
|
||||
#define GL_PROGRAM_BINARY_FORMATS 0x87FF
|
||||
#define GL_PVRIC_SIGNATURE_MISMATCH_IMG 0x8EA3
|
||||
#define GL_R8 0x8229
|
||||
#define GL_RED 0x1903
|
||||
#define GL_RED_BITS 0x0D52
|
||||
#define GL_RENDERBUFFER 0x8D41
|
||||
#define GL_RENDERBUFFER_ALPHA_SIZE 0x8D53
|
||||
#define GL_RENDERBUFFER_BINDING 0x8CA7
|
||||
#define GL_RENDERBUFFER_BLUE_SIZE 0x8D52
|
||||
#define GL_RENDERBUFFER_DEPTH_SIZE 0x8D54
|
||||
#define GL_RENDERBUFFER_GREEN_SIZE 0x8D51
|
||||
#define GL_RENDERBUFFER_HEIGHT 0x8D43
|
||||
#define GL_RENDERBUFFER_INTERNAL_FORMAT 0x8D44
|
||||
#define GL_RENDERBUFFER_RED_SIZE 0x8D50
|
||||
#define GL_RENDERBUFFER_STENCIL_SIZE 0x8D55
|
||||
#define GL_RENDERBUFFER_WIDTH 0x8D42
|
||||
#define GL_RENDERER 0x1F01
|
||||
#define GL_REPEAT 0x2901
|
||||
#define GL_REPLACE 0x1E01
|
||||
#define GL_RESET_NOTIFICATION_STRATEGY 0x8256
|
||||
#define GL_RG 0x8227
|
||||
#define GL_RG8 0x822B
|
||||
#define GL_RGB 0x1907
|
||||
#define GL_RGB565 0x8D62
|
||||
#define GL_RGB5_A1 0x8057
|
||||
#define GL_RGB8 0x8051
|
||||
#define GL_RGB8_OES 0x8051
|
||||
#define GL_RGBA 0x1908
|
||||
#define GL_RGBA4 0x8056
|
||||
#define GL_RGBA8 0x8058
|
||||
#define GL_RGBA8_OES 0x8058
|
||||
#define GL_SAMPLER_2D 0x8B5E
|
||||
#define GL_SAMPLES 0x80A9
|
||||
#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E
|
||||
#define GL_SAMPLE_BUFFERS 0x80A8
|
||||
#define GL_SAMPLE_COVERAGE 0x80A0
|
||||
#define GL_SAMPLE_COVERAGE_INVERT 0x80AB
|
||||
#define GL_SAMPLE_COVERAGE_VALUE 0x80AA
|
||||
#define GL_SCISSOR_BOX 0x0C10
|
||||
#define GL_SCISSOR_TEST 0x0C11
|
||||
#define GL_SHADING_LANGUAGE_VERSION 0x8B8C
|
||||
#define GL_SHORT 0x1402
|
||||
#define GL_SRC_ALPHA 0x0302
|
||||
#define GL_SRC_ALPHA_SATURATE 0x0308
|
||||
#define GL_SRC_COLOR 0x0300
|
||||
#define GL_STATIC_DRAW 0x88E4
|
||||
#define GL_STENCIL_ATTACHMENT 0x8D20
|
||||
#define GL_STENCIL_BACK_FAIL 0x8801
|
||||
#define GL_STENCIL_BACK_FUNC 0x8800
|
||||
#define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802
|
||||
#define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803
|
||||
#define GL_STENCIL_BACK_REF 0x8CA3
|
||||
#define GL_STENCIL_BACK_VALUE_MASK 0x8CA4
|
||||
#define GL_STENCIL_BACK_WRITEMASK 0x8CA5
|
||||
#define GL_STENCIL_BITS 0x0D57
|
||||
#define GL_STENCIL_BUFFER_BIT 0x00000400
|
||||
#define GL_STENCIL_CLEAR_VALUE 0x0B91
|
||||
#define GL_STENCIL_FAIL 0x0B94
|
||||
#define GL_STENCIL_FUNC 0x0B92
|
||||
#define GL_STENCIL_INDEX8 0x8D48
|
||||
#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95
|
||||
#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96
|
||||
#define GL_STENCIL_REF 0x0B97
|
||||
#define GL_STENCIL_TEST 0x0B90
|
||||
#define GL_STENCIL_VALUE_MASK 0x0B93
|
||||
#define GL_STENCIL_WRITEMASK 0x0B98
|
||||
#define GL_STREAM_DRAW 0x88E0
|
||||
#define GL_SUBPIXEL_BITS 0x0D50
|
||||
#define GL_TEXTURE 0x1702
|
||||
#define GL_TEXTURE0 0x84C0
|
||||
#define GL_TEXTURE1 0x84C1
|
||||
#define GL_TEXTURE10 0x84CA
|
||||
#define GL_TEXTURE11 0x84CB
|
||||
#define GL_TEXTURE12 0x84CC
|
||||
#define GL_TEXTURE13 0x84CD
|
||||
#define GL_TEXTURE14 0x84CE
|
||||
#define GL_TEXTURE15 0x84CF
|
||||
#define GL_TEXTURE16 0x84D0
|
||||
#define GL_TEXTURE17 0x84D1
|
||||
#define GL_TEXTURE18 0x84D2
|
||||
#define GL_TEXTURE19 0x84D3
|
||||
#define GL_TEXTURE2 0x84C2
|
||||
#define GL_TEXTURE20 0x84D4
|
||||
#define GL_TEXTURE21 0x84D5
|
||||
#define GL_TEXTURE22 0x84D6
|
||||
#define GL_TEXTURE23 0x84D7
|
||||
#define GL_TEXTURE24 0x84D8
|
||||
#define GL_TEXTURE25 0x84D9
|
||||
#define GL_TEXTURE26 0x84DA
|
||||
#define GL_TEXTURE27 0x84DB
|
||||
#define GL_TEXTURE28 0x84DC
|
||||
#define GL_TEXTURE29 0x84DD
|
||||
#define GL_TEXTURE3 0x84C3
|
||||
#define GL_TEXTURE30 0x84DE
|
||||
#define GL_TEXTURE31 0x84DF
|
||||
#define GL_TEXTURE4 0x84C4
|
||||
#define GL_TEXTURE5 0x84C5
|
||||
#define GL_TEXTURE6 0x84C6
|
||||
#define GL_TEXTURE7 0x84C7
|
||||
#define GL_TEXTURE8 0x84C8
|
||||
#define GL_TEXTURE9 0x84C9
|
||||
#define GL_TEXTURE_2D 0x0DE1
|
||||
#define GL_TEXTURE_BINDING_2D 0x8069
|
||||
#define GL_TEXTURE_IMMUTABLE_FORMAT 0x912F
|
||||
#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_TRIANGLES 0x0004
|
||||
#define GL_TRIANGLE_FAN 0x0006
|
||||
#define GL_TRIANGLE_STRIP 0x0005
|
||||
#define GL_TRP_ERROR_CONTEXT_RESET_IMG 0x8EA1
|
||||
#define GL_TRP_IMG 0x8EA0
|
||||
#define GL_TRP_UNSUPPORTED_CONTEXT_IMG 0x8EA2
|
||||
#define GL_TRUE 1
|
||||
#define GL_UNKNOWN_CONTEXT_RESET 0x8255
|
||||
#define GL_UNPACK_ALIGNMENT 0x0CF5
|
||||
#define GL_UNSIGNED_BYTE 0x1401
|
||||
#define GL_UNSIGNED_INT 0x1405
|
||||
#define GL_UNSIGNED_SHORT 0x1403
|
||||
#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033
|
||||
#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034
|
||||
#define GL_UNSIGNED_SHORT_5_6_5 0x8363
|
||||
#define GL_VENDOR 0x1F00
|
||||
#define GL_VERSION 0x1F02
|
||||
#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F
|
||||
#define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622
|
||||
#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A
|
||||
#define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645
|
||||
#define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623
|
||||
#define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624
|
||||
#define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625
|
||||
#define GL_VIEWPORT 0x0BA2
|
||||
#define GL_ZERO 0
|
||||
|
||||
|
||||
#include <khrplatform.h>
|
||||
typedef unsigned int GLenum;
|
||||
typedef unsigned char GLboolean;
|
||||
typedef unsigned int GLbitfield;
|
||||
typedef void GLvoid;
|
||||
typedef khronos_int8_t GLbyte;
|
||||
typedef khronos_uint8_t GLubyte;
|
||||
typedef khronos_int16_t GLshort;
|
||||
typedef khronos_uint16_t GLushort;
|
||||
typedef int GLint;
|
||||
typedef unsigned int GLuint;
|
||||
typedef khronos_int32_t GLclampx;
|
||||
typedef int GLsizei;
|
||||
typedef khronos_float_t GLfloat;
|
||||
typedef khronos_float_t GLclampf;
|
||||
typedef double GLdouble;
|
||||
typedef double GLclampd;
|
||||
typedef void* GLeglClientBufferEXT;
|
||||
typedef void* GLeglImageOES;
|
||||
typedef char GLchar;
|
||||
typedef char GLcharARB;
|
||||
#ifdef __APPLE__
|
||||
typedef void* GLhandleARB;
|
||||
#else
|
||||
typedef unsigned int GLhandleARB;
|
||||
#endif
|
||||
typedef khronos_uint16_t GLhalf;
|
||||
typedef khronos_uint16_t GLhalfARB;
|
||||
typedef khronos_int32_t GLfixed;
|
||||
#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ > 1060)
|
||||
typedef khronos_intptr_t GLintptr;
|
||||
#else
|
||||
typedef khronos_intptr_t GLintptr;
|
||||
#endif
|
||||
#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ > 1060)
|
||||
typedef khronos_intptr_t GLintptrARB;
|
||||
#else
|
||||
typedef khronos_intptr_t GLintptrARB;
|
||||
#endif
|
||||
#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ > 1060)
|
||||
typedef khronos_ssize_t GLsizeiptr;
|
||||
#else
|
||||
typedef khronos_ssize_t GLsizeiptr;
|
||||
#endif
|
||||
#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ > 1060)
|
||||
typedef khronos_ssize_t GLsizeiptrARB;
|
||||
#else
|
||||
typedef khronos_ssize_t GLsizeiptrARB;
|
||||
#endif
|
||||
typedef khronos_int64_t GLint64;
|
||||
typedef khronos_int64_t GLint64EXT;
|
||||
typedef khronos_uint64_t GLuint64;
|
||||
typedef khronos_uint64_t GLuint64EXT;
|
||||
typedef struct __GLsync* GLsync;
|
||||
struct _cl_context;
|
||||
struct _cl_event;
|
||||
typedef void (GLAD_API_PTR* GLDEBUGPROC)(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar* message, const void* userParam);
|
||||
typedef void (GLAD_API_PTR* GLDEBUGPROCARB)(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar* message, const void* userParam);
|
||||
typedef void (GLAD_API_PTR* GLDEBUGPROCKHR)(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar* message, const void* userParam);
|
||||
typedef void (GLAD_API_PTR* GLDEBUGPROCAMD)(GLuint id, GLenum category, GLenum severity, GLsizei length, const GLchar* message, void* userParam);
|
||||
typedef unsigned short GLhalfNV;
|
||||
typedef GLintptr GLvdpauSurfaceNV;
|
||||
typedef void (GLAD_API_PTR* GLVULKANPROCNV)(void);
|
||||
|
||||
|
||||
#define GL_SC_VERSION_2_0 1
|
||||
#define GL_EXT_texture_compression_s3tc 1
|
||||
#define GL_IMG_pvric_end_to_end_signature 1
|
||||
#define GL_IMG_tile_region_protection 1
|
||||
#define GL_OES_depth24 1
|
||||
#define GL_OES_depth32 1
|
||||
#define GL_OES_rgb8_rgba8 1
|
||||
#define GL_OES_standard_derivatives 1
|
||||
|
||||
|
||||
typedef void (GLAD_API_PTR* PFNGLACTIVETEXTUREPROC)(GLenum texture);
|
||||
typedef void (GLAD_API_PTR* PFNGLBINDBUFFERPROC)(GLenum target, GLuint buffer);
|
||||
typedef void (GLAD_API_PTR* PFNGLBINDFRAMEBUFFERPROC)(GLenum target, GLuint framebuffer);
|
||||
typedef void (GLAD_API_PTR* PFNGLBINDRENDERBUFFERPROC)(GLenum target, GLuint renderbuffer);
|
||||
typedef void (GLAD_API_PTR* PFNGLBINDTEXTUREPROC)(GLenum target, GLuint texture);
|
||||
typedef void (GLAD_API_PTR* PFNGLBLENDCOLORPROC)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
|
||||
typedef void (GLAD_API_PTR* PFNGLBLENDEQUATIONPROC)(GLenum mode);
|
||||
typedef void (GLAD_API_PTR* PFNGLBLENDEQUATIONSEPARATEPROC)(GLenum modeRGB, GLenum modeAlpha);
|
||||
typedef void (GLAD_API_PTR* PFNGLBLENDFUNCPROC)(GLenum sfactor, GLenum dfactor);
|
||||
typedef void (GLAD_API_PTR* PFNGLBLENDFUNCSEPARATEPROC)(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
|
||||
typedef void (GLAD_API_PTR* PFNGLBUFFERDATAPROC)(GLenum target, GLsizeiptr size, const void* data, GLenum usage);
|
||||
typedef void (GLAD_API_PTR* PFNGLBUFFERSUBDATAPROC)(GLenum target, GLintptr offset, GLsizeiptr size, const void* data);
|
||||
typedef GLenum(GLAD_API_PTR* PFNGLCHECKFRAMEBUFFERSTATUSPROC)(GLenum target);
|
||||
typedef void (GLAD_API_PTR* PFNGLCLEARPROC)(GLbitfield mask);
|
||||
typedef void (GLAD_API_PTR* PFNGLCLEARCOLORPROC)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
|
||||
typedef void (GLAD_API_PTR* PFNGLCLEARDEPTHFPROC)(GLfloat d);
|
||||
typedef void (GLAD_API_PTR* PFNGLCLEARSTENCILPROC)(GLint s);
|
||||
typedef void (GLAD_API_PTR* PFNGLCOLORMASKPROC)(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
|
||||
typedef void (GLAD_API_PTR* PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void* data);
|
||||
typedef GLuint(GLAD_API_PTR* PFNGLCREATEPROGRAMPROC)(void);
|
||||
typedef void (GLAD_API_PTR* PFNGLCULLFACEPROC)(GLenum mode);
|
||||
typedef void (GLAD_API_PTR* PFNGLDEPTHFUNCPROC)(GLenum func);
|
||||
typedef void (GLAD_API_PTR* PFNGLDEPTHMASKPROC)(GLboolean flag);
|
||||
typedef void (GLAD_API_PTR* PFNGLDEPTHRANGEFPROC)(GLfloat n, GLfloat f);
|
||||
typedef void (GLAD_API_PTR* PFNGLDISABLEPROC)(GLenum cap);
|
||||
typedef void (GLAD_API_PTR* PFNGLDISABLEVERTEXATTRIBARRAYPROC)(GLuint index);
|
||||
typedef void (GLAD_API_PTR* PFNGLDRAWARRAYSPROC)(GLenum mode, GLint first, GLsizei count);
|
||||
typedef void (GLAD_API_PTR* PFNGLDRAWRANGEELEMENTSPROC)(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void* indices);
|
||||
typedef void (GLAD_API_PTR* PFNGLENABLEPROC)(GLenum cap);
|
||||
typedef void (GLAD_API_PTR* PFNGLENABLEVERTEXATTRIBARRAYPROC)(GLuint index);
|
||||
typedef void (GLAD_API_PTR* PFNGLFINISHPROC)(void);
|
||||
typedef void (GLAD_API_PTR* PFNGLFLUSHPROC)(void);
|
||||
typedef void (GLAD_API_PTR* PFNGLFRAMEBUFFERRENDERBUFFERPROC)(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
|
||||
typedef void (GLAD_API_PTR* PFNGLFRAMEBUFFERTEXTURE2DPROC)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
|
||||
typedef void (GLAD_API_PTR* PFNGLFRONTFACEPROC)(GLenum mode);
|
||||
typedef void (GLAD_API_PTR* PFNGLGENBUFFERSPROC)(GLsizei n, GLuint* buffers);
|
||||
typedef void (GLAD_API_PTR* PFNGLGENFRAMEBUFFERSPROC)(GLsizei n, GLuint* framebuffers);
|
||||
typedef void (GLAD_API_PTR* PFNGLGENRENDERBUFFERSPROC)(GLsizei n, GLuint* renderbuffers);
|
||||
typedef void (GLAD_API_PTR* PFNGLGENTEXTURESPROC)(GLsizei n, GLuint* textures);
|
||||
typedef void (GLAD_API_PTR* PFNGLGENERATEMIPMAPPROC)(GLenum target);
|
||||
typedef GLint(GLAD_API_PTR* PFNGLGETATTRIBLOCATIONPROC)(GLuint program, const GLchar* name);
|
||||
typedef void (GLAD_API_PTR* PFNGLGETBOOLEANVPROC)(GLenum pname, GLboolean* data);
|
||||
typedef void (GLAD_API_PTR* PFNGLGETBUFFERPARAMETERIVPROC)(GLenum target, GLenum pname, GLint* params);
|
||||
typedef GLenum(GLAD_API_PTR* PFNGLGETERRORPROC)(void);
|
||||
typedef void (GLAD_API_PTR* PFNGLGETFLOATVPROC)(GLenum pname, GLfloat* data);
|
||||
typedef void (GLAD_API_PTR* PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC)(GLenum target, GLenum attachment, GLenum pname, GLint* params);
|
||||
typedef GLenum(GLAD_API_PTR* PFNGLGETGRAPHICSRESETSTATUSPROC)(void);
|
||||
typedef void (GLAD_API_PTR* PFNGLGETINTEGERVPROC)(GLenum pname, GLint* data);
|
||||
typedef void (GLAD_API_PTR* PFNGLGETPROGRAMIVPROC)(GLuint program, GLenum pname, GLint* params);
|
||||
typedef void (GLAD_API_PTR* PFNGLGETRENDERBUFFERPARAMETERIVPROC)(GLenum target, GLenum pname, GLint* params);
|
||||
typedef const GLubyte* (GLAD_API_PTR* PFNGLGETSTRINGPROC)(GLenum name);
|
||||
typedef void (GLAD_API_PTR* PFNGLGETTEXPARAMETERFVPROC)(GLenum target, GLenum pname, GLfloat* params);
|
||||
typedef void (GLAD_API_PTR* PFNGLGETTEXPARAMETERIVPROC)(GLenum target, GLenum pname, GLint* params);
|
||||
typedef GLint(GLAD_API_PTR* PFNGLGETUNIFORMLOCATIONPROC)(GLuint program, const GLchar* name);
|
||||
typedef void (GLAD_API_PTR* PFNGLGETVERTEXATTRIBPOINTERVPROC)(GLuint index, GLenum pname, void** pointer);
|
||||
typedef void (GLAD_API_PTR* PFNGLGETVERTEXATTRIBFVPROC)(GLuint index, GLenum pname, GLfloat* params);
|
||||
typedef void (GLAD_API_PTR* PFNGLGETVERTEXATTRIBIVPROC)(GLuint index, GLenum pname, GLint* params);
|
||||
typedef void (GLAD_API_PTR* PFNGLGETNUNIFORMFVPROC)(GLuint program, GLint location, GLsizei bufSize, GLfloat* params);
|
||||
typedef void (GLAD_API_PTR* PFNGLGETNUNIFORMIVPROC)(GLuint program, GLint location, GLsizei bufSize, GLint* params);
|
||||
typedef void (GLAD_API_PTR* PFNGLHINTPROC)(GLenum target, GLenum mode);
|
||||
typedef GLboolean(GLAD_API_PTR* PFNGLISENABLEDPROC)(GLenum cap);
|
||||
typedef void (GLAD_API_PTR* PFNGLLINEWIDTHPROC)(GLfloat width);
|
||||
typedef void (GLAD_API_PTR* PFNGLPIXELSTOREIPROC)(GLenum pname, GLint param);
|
||||
typedef void (GLAD_API_PTR* PFNGLPOLYGONOFFSETPROC)(GLfloat factor, GLfloat units);
|
||||
typedef void (GLAD_API_PTR* PFNGLPROGRAMBINARYPROC)(GLuint program, GLenum binaryFormat, const void* binary, GLsizei length);
|
||||
typedef void (GLAD_API_PTR* PFNGLREADNPIXELSPROC)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void* data);
|
||||
typedef void (GLAD_API_PTR* PFNGLRENDERBUFFERSTORAGEPROC)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
|
||||
typedef void (GLAD_API_PTR* PFNGLSAMPLECOVERAGEPROC)(GLfloat value, GLboolean invert);
|
||||
typedef void (GLAD_API_PTR* PFNGLSCISSORPROC)(GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
typedef void (GLAD_API_PTR* PFNGLSTENCILFUNCPROC)(GLenum func, GLint ref, GLuint mask);
|
||||
typedef void (GLAD_API_PTR* PFNGLSTENCILFUNCSEPARATEPROC)(GLenum face, GLenum func, GLint ref, GLuint mask);
|
||||
typedef void (GLAD_API_PTR* PFNGLSTENCILMASKPROC)(GLuint mask);
|
||||
typedef void (GLAD_API_PTR* PFNGLSTENCILMASKSEPARATEPROC)(GLenum face, GLuint mask);
|
||||
typedef void (GLAD_API_PTR* PFNGLSTENCILOPPROC)(GLenum fail, GLenum zfail, GLenum zpass);
|
||||
typedef void (GLAD_API_PTR* PFNGLSTENCILOPSEPARATEPROC)(GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
|
||||
typedef void (GLAD_API_PTR* PFNGLTEXPARAMETERFPROC)(GLenum target, GLenum pname, GLfloat param);
|
||||
typedef void (GLAD_API_PTR* PFNGLTEXPARAMETERFVPROC)(GLenum target, GLenum pname, const GLfloat* params);
|
||||
typedef void (GLAD_API_PTR* PFNGLTEXPARAMETERIPROC)(GLenum target, GLenum pname, GLint param);
|
||||
typedef void (GLAD_API_PTR* PFNGLTEXPARAMETERIVPROC)(GLenum target, GLenum pname, const GLint* params);
|
||||
typedef void (GLAD_API_PTR* PFNGLTEXSTORAGE2DPROC)(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
|
||||
typedef void (GLAD_API_PTR* PFNGLTEXSUBIMAGE2DPROC)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void* pixels);
|
||||
typedef void (GLAD_API_PTR* PFNGLUNIFORM1FPROC)(GLint location, GLfloat v0);
|
||||
typedef void (GLAD_API_PTR* PFNGLUNIFORM1FVPROC)(GLint location, GLsizei count, const GLfloat* value);
|
||||
typedef void (GLAD_API_PTR* PFNGLUNIFORM1IPROC)(GLint location, GLint v0);
|
||||
typedef void (GLAD_API_PTR* PFNGLUNIFORM1IVPROC)(GLint location, GLsizei count, const GLint* value);
|
||||
typedef void (GLAD_API_PTR* PFNGLUNIFORM2FPROC)(GLint location, GLfloat v0, GLfloat v1);
|
||||
typedef void (GLAD_API_PTR* PFNGLUNIFORM2FVPROC)(GLint location, GLsizei count, const GLfloat* value);
|
||||
typedef void (GLAD_API_PTR* PFNGLUNIFORM2IPROC)(GLint location, GLint v0, GLint v1);
|
||||
typedef void (GLAD_API_PTR* PFNGLUNIFORM2IVPROC)(GLint location, GLsizei count, const GLint* value);
|
||||
typedef void (GLAD_API_PTR* PFNGLUNIFORM3FPROC)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
|
||||
typedef void (GLAD_API_PTR* PFNGLUNIFORM3FVPROC)(GLint location, GLsizei count, const GLfloat* value);
|
||||
typedef void (GLAD_API_PTR* PFNGLUNIFORM3IPROC)(GLint location, GLint v0, GLint v1, GLint v2);
|
||||
typedef void (GLAD_API_PTR* PFNGLUNIFORM3IVPROC)(GLint location, GLsizei count, const GLint* value);
|
||||
typedef void (GLAD_API_PTR* PFNGLUNIFORM4FPROC)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
|
||||
typedef void (GLAD_API_PTR* PFNGLUNIFORM4FVPROC)(GLint location, GLsizei count, const GLfloat* value);
|
||||
typedef void (GLAD_API_PTR* PFNGLUNIFORM4IPROC)(GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
|
||||
typedef void (GLAD_API_PTR* PFNGLUNIFORM4IVPROC)(GLint location, GLsizei count, const GLint* value);
|
||||
typedef void (GLAD_API_PTR* PFNGLUNIFORMMATRIX2FVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
|
||||
typedef void (GLAD_API_PTR* PFNGLUNIFORMMATRIX3FVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
|
||||
typedef void (GLAD_API_PTR* PFNGLUNIFORMMATRIX4FVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
|
||||
typedef void (GLAD_API_PTR* PFNGLUSEPROGRAMPROC)(GLuint program);
|
||||
typedef void (GLAD_API_PTR* PFNGLVERTEXATTRIB1FPROC)(GLuint index, GLfloat x);
|
||||
typedef void (GLAD_API_PTR* PFNGLVERTEXATTRIB1FVPROC)(GLuint index, const GLfloat* v);
|
||||
typedef void (GLAD_API_PTR* PFNGLVERTEXATTRIB2FPROC)(GLuint index, GLfloat x, GLfloat y);
|
||||
typedef void (GLAD_API_PTR* PFNGLVERTEXATTRIB2FVPROC)(GLuint index, const GLfloat* v);
|
||||
typedef void (GLAD_API_PTR* PFNGLVERTEXATTRIB3FPROC)(GLuint index, GLfloat x, GLfloat y, GLfloat z);
|
||||
typedef void (GLAD_API_PTR* PFNGLVERTEXATTRIB3FVPROC)(GLuint index, const GLfloat* v);
|
||||
typedef void (GLAD_API_PTR* PFNGLVERTEXATTRIB4FPROC)(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
|
||||
typedef void (GLAD_API_PTR* PFNGLVERTEXATTRIB4FVPROC)(GLuint index, const GLfloat* v);
|
||||
typedef void (GLAD_API_PTR* PFNGLVERTEXATTRIBPOINTERPROC)(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void* pointer);
|
||||
typedef void (GLAD_API_PTR* PFNGLVIEWPORTPROC)(GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
|
||||
typedef struct GladGLSC2Context {
|
||||
void* userptr;
|
||||
|
||||
int SC_VERSION_2_0;
|
||||
int EXT_texture_compression_s3tc;
|
||||
int IMG_pvric_end_to_end_signature;
|
||||
int IMG_tile_region_protection;
|
||||
int OES_depth24;
|
||||
int OES_depth32;
|
||||
int OES_rgb8_rgba8;
|
||||
int OES_standard_derivatives;
|
||||
|
||||
PFNGLACTIVETEXTUREPROC ActiveTexture;
|
||||
PFNGLBINDBUFFERPROC BindBuffer;
|
||||
PFNGLBINDFRAMEBUFFERPROC BindFramebuffer;
|
||||
PFNGLBINDRENDERBUFFERPROC BindRenderbuffer;
|
||||
PFNGLBINDTEXTUREPROC BindTexture;
|
||||
PFNGLBLENDCOLORPROC BlendColor;
|
||||
PFNGLBLENDEQUATIONPROC BlendEquation;
|
||||
PFNGLBLENDEQUATIONSEPARATEPROC BlendEquationSeparate;
|
||||
PFNGLBLENDFUNCPROC BlendFunc;
|
||||
PFNGLBLENDFUNCSEPARATEPROC BlendFuncSeparate;
|
||||
PFNGLBUFFERDATAPROC BufferData;
|
||||
PFNGLBUFFERSUBDATAPROC BufferSubData;
|
||||
PFNGLCHECKFRAMEBUFFERSTATUSPROC CheckFramebufferStatus;
|
||||
PFNGLCLEARPROC Clear;
|
||||
PFNGLCLEARCOLORPROC ClearColor;
|
||||
PFNGLCLEARDEPTHFPROC ClearDepthf;
|
||||
PFNGLCLEARSTENCILPROC ClearStencil;
|
||||
PFNGLCOLORMASKPROC ColorMask;
|
||||
PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC CompressedTexSubImage2D;
|
||||
PFNGLCREATEPROGRAMPROC CreateProgram;
|
||||
PFNGLCULLFACEPROC CullFace;
|
||||
PFNGLDEPTHFUNCPROC DepthFunc;
|
||||
PFNGLDEPTHMASKPROC DepthMask;
|
||||
PFNGLDEPTHRANGEFPROC DepthRangef;
|
||||
PFNGLDISABLEPROC Disable;
|
||||
PFNGLDISABLEVERTEXATTRIBARRAYPROC DisableVertexAttribArray;
|
||||
PFNGLDRAWARRAYSPROC DrawArrays;
|
||||
PFNGLDRAWRANGEELEMENTSPROC DrawRangeElements;
|
||||
PFNGLENABLEPROC Enable;
|
||||
PFNGLENABLEVERTEXATTRIBARRAYPROC EnableVertexAttribArray;
|
||||
PFNGLFINISHPROC Finish;
|
||||
PFNGLFLUSHPROC Flush;
|
||||
PFNGLFRAMEBUFFERRENDERBUFFERPROC FramebufferRenderbuffer;
|
||||
PFNGLFRAMEBUFFERTEXTURE2DPROC FramebufferTexture2D;
|
||||
PFNGLFRONTFACEPROC FrontFace;
|
||||
PFNGLGENBUFFERSPROC GenBuffers;
|
||||
PFNGLGENFRAMEBUFFERSPROC GenFramebuffers;
|
||||
PFNGLGENRENDERBUFFERSPROC GenRenderbuffers;
|
||||
PFNGLGENTEXTURESPROC GenTextures;
|
||||
PFNGLGENERATEMIPMAPPROC GenerateMipmap;
|
||||
PFNGLGETATTRIBLOCATIONPROC GetAttribLocation;
|
||||
PFNGLGETBOOLEANVPROC GetBooleanv;
|
||||
PFNGLGETBUFFERPARAMETERIVPROC GetBufferParameteriv;
|
||||
PFNGLGETERRORPROC GetError;
|
||||
PFNGLGETFLOATVPROC GetFloatv;
|
||||
PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC GetFramebufferAttachmentParameteriv;
|
||||
PFNGLGETGRAPHICSRESETSTATUSPROC GetGraphicsResetStatus;
|
||||
PFNGLGETINTEGERVPROC GetIntegerv;
|
||||
PFNGLGETPROGRAMIVPROC GetProgramiv;
|
||||
PFNGLGETRENDERBUFFERPARAMETERIVPROC GetRenderbufferParameteriv;
|
||||
PFNGLGETSTRINGPROC GetString;
|
||||
PFNGLGETTEXPARAMETERFVPROC GetTexParameterfv;
|
||||
PFNGLGETTEXPARAMETERIVPROC GetTexParameteriv;
|
||||
PFNGLGETUNIFORMLOCATIONPROC GetUniformLocation;
|
||||
PFNGLGETVERTEXATTRIBPOINTERVPROC GetVertexAttribPointerv;
|
||||
PFNGLGETVERTEXATTRIBFVPROC GetVertexAttribfv;
|
||||
PFNGLGETVERTEXATTRIBIVPROC GetVertexAttribiv;
|
||||
PFNGLGETNUNIFORMFVPROC GetnUniformfv;
|
||||
PFNGLGETNUNIFORMIVPROC GetnUniformiv;
|
||||
PFNGLHINTPROC Hint;
|
||||
PFNGLISENABLEDPROC IsEnabled;
|
||||
PFNGLLINEWIDTHPROC LineWidth;
|
||||
PFNGLPIXELSTOREIPROC PixelStorei;
|
||||
PFNGLPOLYGONOFFSETPROC PolygonOffset;
|
||||
PFNGLPROGRAMBINARYPROC ProgramBinary;
|
||||
PFNGLREADNPIXELSPROC ReadnPixels;
|
||||
PFNGLRENDERBUFFERSTORAGEPROC RenderbufferStorage;
|
||||
PFNGLSAMPLECOVERAGEPROC SampleCoverage;
|
||||
PFNGLSCISSORPROC Scissor;
|
||||
PFNGLSTENCILFUNCPROC StencilFunc;
|
||||
PFNGLSTENCILFUNCSEPARATEPROC StencilFuncSeparate;
|
||||
PFNGLSTENCILMASKPROC StencilMask;
|
||||
PFNGLSTENCILMASKSEPARATEPROC StencilMaskSeparate;
|
||||
PFNGLSTENCILOPPROC StencilOp;
|
||||
PFNGLSTENCILOPSEPARATEPROC StencilOpSeparate;
|
||||
PFNGLTEXPARAMETERFPROC TexParameterf;
|
||||
PFNGLTEXPARAMETERFVPROC TexParameterfv;
|
||||
PFNGLTEXPARAMETERIPROC TexParameteri;
|
||||
PFNGLTEXPARAMETERIVPROC TexParameteriv;
|
||||
PFNGLTEXSTORAGE2DPROC TexStorage2D;
|
||||
PFNGLTEXSUBIMAGE2DPROC TexSubImage2D;
|
||||
PFNGLUNIFORM1FPROC Uniform1f;
|
||||
PFNGLUNIFORM1FVPROC Uniform1fv;
|
||||
PFNGLUNIFORM1IPROC Uniform1i;
|
||||
PFNGLUNIFORM1IVPROC Uniform1iv;
|
||||
PFNGLUNIFORM2FPROC Uniform2f;
|
||||
PFNGLUNIFORM2FVPROC Uniform2fv;
|
||||
PFNGLUNIFORM2IPROC Uniform2i;
|
||||
PFNGLUNIFORM2IVPROC Uniform2iv;
|
||||
PFNGLUNIFORM3FPROC Uniform3f;
|
||||
PFNGLUNIFORM3FVPROC Uniform3fv;
|
||||
PFNGLUNIFORM3IPROC Uniform3i;
|
||||
PFNGLUNIFORM3IVPROC Uniform3iv;
|
||||
PFNGLUNIFORM4FPROC Uniform4f;
|
||||
PFNGLUNIFORM4FVPROC Uniform4fv;
|
||||
PFNGLUNIFORM4IPROC Uniform4i;
|
||||
PFNGLUNIFORM4IVPROC Uniform4iv;
|
||||
PFNGLUNIFORMMATRIX2FVPROC UniformMatrix2fv;
|
||||
PFNGLUNIFORMMATRIX3FVPROC UniformMatrix3fv;
|
||||
PFNGLUNIFORMMATRIX4FVPROC UniformMatrix4fv;
|
||||
PFNGLUSEPROGRAMPROC UseProgram;
|
||||
PFNGLVERTEXATTRIB1FPROC VertexAttrib1f;
|
||||
PFNGLVERTEXATTRIB1FVPROC VertexAttrib1fv;
|
||||
PFNGLVERTEXATTRIB2FPROC VertexAttrib2f;
|
||||
PFNGLVERTEXATTRIB2FVPROC VertexAttrib2fv;
|
||||
PFNGLVERTEXATTRIB3FPROC VertexAttrib3f;
|
||||
PFNGLVERTEXATTRIB3FVPROC VertexAttrib3fv;
|
||||
PFNGLVERTEXATTRIB4FPROC VertexAttrib4f;
|
||||
PFNGLVERTEXATTRIB4FVPROC VertexAttrib4fv;
|
||||
PFNGLVERTEXATTRIBPOINTERPROC VertexAttribPointer;
|
||||
PFNGLVIEWPORTPROC Viewport;
|
||||
|
||||
void* glad_loader_handle;
|
||||
} GladGLSC2Context;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
GLAD_API_CALL int gladLoadGLSC2ContextUserPtr(GladGLSC2Context* context, GLADuserptrloadfunc load, void* userptr);
|
||||
GLAD_API_CALL int gladLoadGLSC2Context(GladGLSC2Context* context, GLADloadfunc load);
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
@@ -30,7 +30,7 @@
|
||||
#define GLAD_WGL_H_
|
||||
|
||||
#include <windows.h>
|
||||
#include <glad/gl.h>
|
||||
#include <glad_gl.h>
|
||||
|
||||
#define GLAD_WGL
|
||||
#define GLAD_OPTION_WGL_LOADER
|
||||
File diff suppressed because it is too large
Load Diff
+24
-24
@@ -178,7 +178,7 @@ extern "C" {
|
||||
*
|
||||
* @ingroup native
|
||||
*/
|
||||
GLFWAPI const char* glfwGetWin32Adapter(GLFWmonitor* monitor);
|
||||
SSCAPI const char* glfwGetWin32Adapter(GLFWmonitor* monitor);
|
||||
|
||||
/*! @brief Returns the display device name of the specified monitor.
|
||||
*
|
||||
@@ -195,7 +195,7 @@ GLFWAPI const char* glfwGetWin32Adapter(GLFWmonitor* monitor);
|
||||
*
|
||||
* @ingroup native
|
||||
*/
|
||||
GLFWAPI const char* glfwGetWin32Monitor(GLFWmonitor* monitor);
|
||||
SSCAPI const char* glfwGetWin32Monitor(GLFWmonitor* monitor);
|
||||
|
||||
/*! @brief Returns the `HWND` of the specified window.
|
||||
*
|
||||
@@ -219,7 +219,7 @@ GLFWAPI const char* glfwGetWin32Monitor(GLFWmonitor* monitor);
|
||||
*
|
||||
* @ingroup native
|
||||
*/
|
||||
GLFWAPI HWND glfwGetWin32Window(GLFWwindow* window);
|
||||
SSCAPI HWND glfwGetWin32Window(GLFWwindow* window);
|
||||
#endif
|
||||
|
||||
#if defined(GLFW_EXPOSE_NATIVE_WGL)
|
||||
@@ -246,7 +246,7 @@ GLFWAPI HWND glfwGetWin32Window(GLFWwindow* window);
|
||||
*
|
||||
* @ingroup native
|
||||
*/
|
||||
GLFWAPI HGLRC glfwGetWGLContext(GLFWwindow* window);
|
||||
SSCAPI HGLRC glfwGetWGLContext(GLFWwindow* window);
|
||||
#endif
|
||||
|
||||
#if defined(GLFW_EXPOSE_NATIVE_COCOA)
|
||||
@@ -264,7 +264,7 @@ GLFWAPI HGLRC glfwGetWGLContext(GLFWwindow* window);
|
||||
*
|
||||
* @ingroup native
|
||||
*/
|
||||
GLFWAPI CGDirectDisplayID glfwGetCocoaMonitor(GLFWmonitor* monitor);
|
||||
SSCAPI CGDirectDisplayID glfwGetCocoaMonitor(GLFWmonitor* monitor);
|
||||
|
||||
/*! @brief Returns the `NSWindow` of the specified window.
|
||||
*
|
||||
@@ -280,7 +280,7 @@ GLFWAPI CGDirectDisplayID glfwGetCocoaMonitor(GLFWmonitor* monitor);
|
||||
*
|
||||
* @ingroup native
|
||||
*/
|
||||
GLFWAPI id glfwGetCocoaWindow(GLFWwindow* window);
|
||||
SSCAPI id glfwGetCocoaWindow(GLFWwindow* window);
|
||||
#endif
|
||||
|
||||
#if defined(GLFW_EXPOSE_NATIVE_NSGL)
|
||||
@@ -299,7 +299,7 @@ GLFWAPI id glfwGetCocoaWindow(GLFWwindow* window);
|
||||
*
|
||||
* @ingroup native
|
||||
*/
|
||||
GLFWAPI id glfwGetNSGLContext(GLFWwindow* window);
|
||||
SSCAPI id glfwGetNSGLContext(GLFWwindow* window);
|
||||
#endif
|
||||
|
||||
#if defined(GLFW_EXPOSE_NATIVE_X11)
|
||||
@@ -317,7 +317,7 @@ GLFWAPI id glfwGetNSGLContext(GLFWwindow* window);
|
||||
*
|
||||
* @ingroup native
|
||||
*/
|
||||
GLFWAPI Display* glfwGetX11Display(void);
|
||||
SSCAPI Display* glfwGetX11Display(void);
|
||||
|
||||
/*! @brief Returns the `RRCrtc` of the specified monitor.
|
||||
*
|
||||
@@ -333,7 +333,7 @@ GLFWAPI Display* glfwGetX11Display(void);
|
||||
*
|
||||
* @ingroup native
|
||||
*/
|
||||
GLFWAPI RRCrtc glfwGetX11Adapter(GLFWmonitor* monitor);
|
||||
SSCAPI RRCrtc glfwGetX11Adapter(GLFWmonitor* monitor);
|
||||
|
||||
/*! @brief Returns the `RROutput` of the specified monitor.
|
||||
*
|
||||
@@ -349,7 +349,7 @@ GLFWAPI RRCrtc glfwGetX11Adapter(GLFWmonitor* monitor);
|
||||
*
|
||||
* @ingroup native
|
||||
*/
|
||||
GLFWAPI RROutput glfwGetX11Monitor(GLFWmonitor* monitor);
|
||||
SSCAPI RROutput glfwGetX11Monitor(GLFWmonitor* monitor);
|
||||
|
||||
/*! @brief Returns the `Window` of the specified window.
|
||||
*
|
||||
@@ -365,7 +365,7 @@ GLFWAPI RROutput glfwGetX11Monitor(GLFWmonitor* monitor);
|
||||
*
|
||||
* @ingroup native
|
||||
*/
|
||||
GLFWAPI Window glfwGetX11Window(GLFWwindow* window);
|
||||
SSCAPI Window glfwGetX11Window(GLFWwindow* window);
|
||||
|
||||
/*! @brief Sets the current primary selection to the specified string.
|
||||
*
|
||||
@@ -387,7 +387,7 @@ GLFWAPI Window glfwGetX11Window(GLFWwindow* window);
|
||||
*
|
||||
* @ingroup native
|
||||
*/
|
||||
GLFWAPI void glfwSetX11SelectionString(const char* string);
|
||||
SSCAPI void glfwSetX11SelectionString(const char* string);
|
||||
|
||||
/*! @brief Returns the contents of the current primary selection as a string.
|
||||
*
|
||||
@@ -415,7 +415,7 @@ GLFWAPI void glfwSetX11SelectionString(const char* string);
|
||||
*
|
||||
* @ingroup native
|
||||
*/
|
||||
GLFWAPI const char* glfwGetX11SelectionString(void);
|
||||
SSCAPI const char* glfwGetX11SelectionString(void);
|
||||
#endif
|
||||
|
||||
#if defined(GLFW_EXPOSE_NATIVE_GLX)
|
||||
@@ -434,7 +434,7 @@ GLFWAPI const char* glfwGetX11SelectionString(void);
|
||||
*
|
||||
* @ingroup native
|
||||
*/
|
||||
GLFWAPI GLXContext glfwGetGLXContext(GLFWwindow* window);
|
||||
SSCAPI GLXContext glfwGetGLXContext(GLFWwindow* window);
|
||||
|
||||
/*! @brief Returns the `GLXWindow` of the specified window.
|
||||
*
|
||||
@@ -451,7 +451,7 @@ GLFWAPI GLXContext glfwGetGLXContext(GLFWwindow* window);
|
||||
*
|
||||
* @ingroup native
|
||||
*/
|
||||
GLFWAPI GLXWindow glfwGetGLXWindow(GLFWwindow* window);
|
||||
SSCAPI GLXWindow glfwGetGLXWindow(GLFWwindow* window);
|
||||
#endif
|
||||
|
||||
#if defined(GLFW_EXPOSE_NATIVE_WAYLAND)
|
||||
@@ -469,7 +469,7 @@ GLFWAPI GLXWindow glfwGetGLXWindow(GLFWwindow* window);
|
||||
*
|
||||
* @ingroup native
|
||||
*/
|
||||
GLFWAPI struct wl_display* glfwGetWaylandDisplay(void);
|
||||
SSCAPI struct wl_display* glfwGetWaylandDisplay(void);
|
||||
|
||||
/*! @brief Returns the `struct wl_output*` of the specified monitor.
|
||||
*
|
||||
@@ -485,7 +485,7 @@ GLFWAPI struct wl_display* glfwGetWaylandDisplay(void);
|
||||
*
|
||||
* @ingroup native
|
||||
*/
|
||||
GLFWAPI struct wl_output* glfwGetWaylandMonitor(GLFWmonitor* monitor);
|
||||
SSCAPI struct wl_output* glfwGetWaylandMonitor(GLFWmonitor* monitor);
|
||||
|
||||
/*! @brief Returns the main `struct wl_surface*` of the specified window.
|
||||
*
|
||||
@@ -501,7 +501,7 @@ GLFWAPI struct wl_output* glfwGetWaylandMonitor(GLFWmonitor* monitor);
|
||||
*
|
||||
* @ingroup native
|
||||
*/
|
||||
GLFWAPI struct wl_surface* glfwGetWaylandWindow(GLFWwindow* window);
|
||||
SSCAPI struct wl_surface* glfwGetWaylandWindow(GLFWwindow* window);
|
||||
#endif
|
||||
|
||||
#if defined(GLFW_EXPOSE_NATIVE_EGL)
|
||||
@@ -522,7 +522,7 @@ GLFWAPI struct wl_surface* glfwGetWaylandWindow(GLFWwindow* window);
|
||||
*
|
||||
* @ingroup native
|
||||
*/
|
||||
GLFWAPI EGLDisplay glfwGetEGLDisplay(void);
|
||||
SSCAPI EGLDisplay glfwGetEGLDisplay(void);
|
||||
|
||||
/*! @brief Returns the `EGLContext` of the specified window.
|
||||
*
|
||||
@@ -539,7 +539,7 @@ GLFWAPI EGLDisplay glfwGetEGLDisplay(void);
|
||||
*
|
||||
* @ingroup native
|
||||
*/
|
||||
GLFWAPI EGLContext glfwGetEGLContext(GLFWwindow* window);
|
||||
SSCAPI EGLContext glfwGetEGLContext(GLFWwindow* window);
|
||||
|
||||
/*! @brief Returns the `EGLSurface` of the specified window.
|
||||
*
|
||||
@@ -556,7 +556,7 @@ GLFWAPI EGLContext glfwGetEGLContext(GLFWwindow* window);
|
||||
*
|
||||
* @ingroup native
|
||||
*/
|
||||
GLFWAPI EGLSurface glfwGetEGLSurface(GLFWwindow* window);
|
||||
SSCAPI EGLSurface glfwGetEGLSurface(GLFWwindow* window);
|
||||
#endif
|
||||
|
||||
#if defined(GLFW_EXPOSE_NATIVE_OSMESA)
|
||||
@@ -582,7 +582,7 @@ GLFWAPI EGLSurface glfwGetEGLSurface(GLFWwindow* window);
|
||||
*
|
||||
* @ingroup native
|
||||
*/
|
||||
GLFWAPI int glfwGetOSMesaColorBuffer(GLFWwindow* window, int* width, int* height, int* format, void** buffer);
|
||||
SSCAPI int glfwGetOSMesaColorBuffer(GLFWwindow* window, int* width, int* height, int* format, void** buffer);
|
||||
|
||||
/*! @brief Retrieves the depth buffer associated with the specified window.
|
||||
*
|
||||
@@ -606,7 +606,7 @@ GLFWAPI int glfwGetOSMesaColorBuffer(GLFWwindow* window, int* width, int* height
|
||||
*
|
||||
* @ingroup native
|
||||
*/
|
||||
GLFWAPI int glfwGetOSMesaDepthBuffer(GLFWwindow* window, int* width, int* height, int* bytesPerValue, void** buffer);
|
||||
SSCAPI int glfwGetOSMesaDepthBuffer(GLFWwindow* window, int* width, int* height, int* bytesPerValue, void** buffer);
|
||||
|
||||
/*! @brief Returns the `OSMesaContext` of the specified window.
|
||||
*
|
||||
@@ -623,7 +623,7 @@ GLFWAPI int glfwGetOSMesaDepthBuffer(GLFWwindow* window, int* width, int* height
|
||||
*
|
||||
* @ingroup native
|
||||
*/
|
||||
GLFWAPI OSMesaContext glfwGetOSMesaContext(GLFWwindow* window);
|
||||
SSCAPI OSMesaContext glfwGetOSMesaContext(GLFWwindow* window);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,32 @@
|
||||
//========================================================================
|
||||
// GLFW 3.4 - www.glfw.org
|
||||
//------------------------------------------------------------------------
|
||||
// Copyright (c) 2006-2017 Camilla Löwy <elmindreda@glfw.org>
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied
|
||||
// warranty. In no event will the authors be held liable for any damages
|
||||
// arising from the use of this software.
|
||||
//
|
||||
// Permission is granted to anyone to use this software for any purpose,
|
||||
// including commercial applications, and to alter it and redistribute it
|
||||
// freely, subject to the following restrictions:
|
||||
//
|
||||
// 1. The origin of this software must not be misrepresented; you must not
|
||||
// claim that you wrote the original software. If you use this software
|
||||
// in a product, an acknowledgment in the product documentation would
|
||||
// be appreciated but is not required.
|
||||
//
|
||||
// 2. Altered source versions must be plainly marked as such, and must not
|
||||
// be misrepresented as being the original software.
|
||||
//
|
||||
// 3. This notice may not be removed or altered from any source
|
||||
// distribution.
|
||||
//
|
||||
//========================================================================
|
||||
|
||||
GLFWbool _glfwInitJoysticksNull(void);
|
||||
void _glfwTerminateJoysticksNull(void);
|
||||
GLFWbool _glfwPollJoystickNull(_GLFWjoystick* js, int mode);
|
||||
const char* _glfwGetMappingNameNull(void);
|
||||
void _glfwUpdateGamepadGUIDNull(char* guid);
|
||||
|
||||
@@ -0,0 +1,273 @@
|
||||
//========================================================================
|
||||
// GLFW 3.4 - www.glfw.org
|
||||
//------------------------------------------------------------------------
|
||||
// Copyright (c) 2016 Google Inc.
|
||||
// Copyright (c) 2016-2017 Camilla Löwy <elmindreda@glfw.org>
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied
|
||||
// warranty. In no event will the authors be held liable for any damages
|
||||
// arising from the use of this software.
|
||||
//
|
||||
// Permission is granted to anyone to use this software for any purpose,
|
||||
// including commercial applications, and to alter it and redistribute it
|
||||
// freely, subject to the following restrictions:
|
||||
//
|
||||
// 1. The origin of this software must not be misrepresented; you must not
|
||||
// claim that you wrote the original software. If you use this software
|
||||
// in a product, an acknowledgment in the product documentation would
|
||||
// be appreciated but is not required.
|
||||
//
|
||||
// 2. Altered source versions must be plainly marked as such, and must not
|
||||
// be misrepresented as being the original software.
|
||||
//
|
||||
// 3. This notice may not be removed or altered from any source
|
||||
// distribution.
|
||||
//
|
||||
//========================================================================
|
||||
|
||||
#define GLFW_NULL_WINDOW_STATE _GLFWwindowNull null;
|
||||
#define GLFW_NULL_LIBRARY_WINDOW_STATE _GLFWlibraryNull null;
|
||||
#define GLFW_NULL_MONITOR_STATE _GLFWmonitorNull null;
|
||||
|
||||
#define GLFW_NULL_CONTEXT_STATE
|
||||
#define GLFW_NULL_CURSOR_STATE
|
||||
#define GLFW_NULL_LIBRARY_CONTEXT_STATE
|
||||
|
||||
#define GLFW_NULL_SC_FIRST GLFW_NULL_SC_SPACE
|
||||
#define GLFW_NULL_SC_SPACE 1
|
||||
#define GLFW_NULL_SC_APOSTROPHE 2
|
||||
#define GLFW_NULL_SC_COMMA 3
|
||||
#define GLFW_NULL_SC_MINUS 4
|
||||
#define GLFW_NULL_SC_PERIOD 5
|
||||
#define GLFW_NULL_SC_SLASH 6
|
||||
#define GLFW_NULL_SC_0 7
|
||||
#define GLFW_NULL_SC_1 8
|
||||
#define GLFW_NULL_SC_2 9
|
||||
#define GLFW_NULL_SC_3 10
|
||||
#define GLFW_NULL_SC_4 11
|
||||
#define GLFW_NULL_SC_5 12
|
||||
#define GLFW_NULL_SC_6 13
|
||||
#define GLFW_NULL_SC_7 14
|
||||
#define GLFW_NULL_SC_8 15
|
||||
#define GLFW_NULL_SC_9 16
|
||||
#define GLFW_NULL_SC_SEMICOLON 17
|
||||
#define GLFW_NULL_SC_EQUAL 18
|
||||
#define GLFW_NULL_SC_LEFT_BRACKET 19
|
||||
#define GLFW_NULL_SC_BACKSLASH 20
|
||||
#define GLFW_NULL_SC_RIGHT_BRACKET 21
|
||||
#define GLFW_NULL_SC_GRAVE_ACCENT 22
|
||||
#define GLFW_NULL_SC_WORLD_1 23
|
||||
#define GLFW_NULL_SC_WORLD_2 24
|
||||
#define GLFW_NULL_SC_ESCAPE 25
|
||||
#define GLFW_NULL_SC_ENTER 26
|
||||
#define GLFW_NULL_SC_TAB 27
|
||||
#define GLFW_NULL_SC_BACKSPACE 28
|
||||
#define GLFW_NULL_SC_INSERT 29
|
||||
#define GLFW_NULL_SC_DELETE 30
|
||||
#define GLFW_NULL_SC_RIGHT 31
|
||||
#define GLFW_NULL_SC_LEFT 32
|
||||
#define GLFW_NULL_SC_DOWN 33
|
||||
#define GLFW_NULL_SC_UP 34
|
||||
#define GLFW_NULL_SC_PAGE_UP 35
|
||||
#define GLFW_NULL_SC_PAGE_DOWN 36
|
||||
#define GLFW_NULL_SC_HOME 37
|
||||
#define GLFW_NULL_SC_END 38
|
||||
#define GLFW_NULL_SC_CAPS_LOCK 39
|
||||
#define GLFW_NULL_SC_SCROLL_LOCK 40
|
||||
#define GLFW_NULL_SC_NUM_LOCK 41
|
||||
#define GLFW_NULL_SC_PRINT_SCREEN 42
|
||||
#define GLFW_NULL_SC_PAUSE 43
|
||||
#define GLFW_NULL_SC_A 44
|
||||
#define GLFW_NULL_SC_B 45
|
||||
#define GLFW_NULL_SC_C 46
|
||||
#define GLFW_NULL_SC_D 47
|
||||
#define GLFW_NULL_SC_E 48
|
||||
#define GLFW_NULL_SC_F 49
|
||||
#define GLFW_NULL_SC_G 50
|
||||
#define GLFW_NULL_SC_H 51
|
||||
#define GLFW_NULL_SC_I 52
|
||||
#define GLFW_NULL_SC_J 53
|
||||
#define GLFW_NULL_SC_K 54
|
||||
#define GLFW_NULL_SC_L 55
|
||||
#define GLFW_NULL_SC_M 56
|
||||
#define GLFW_NULL_SC_N 57
|
||||
#define GLFW_NULL_SC_O 58
|
||||
#define GLFW_NULL_SC_P 59
|
||||
#define GLFW_NULL_SC_Q 60
|
||||
#define GLFW_NULL_SC_R 61
|
||||
#define GLFW_NULL_SC_S 62
|
||||
#define GLFW_NULL_SC_T 63
|
||||
#define GLFW_NULL_SC_U 64
|
||||
#define GLFW_NULL_SC_V 65
|
||||
#define GLFW_NULL_SC_W 66
|
||||
#define GLFW_NULL_SC_X 67
|
||||
#define GLFW_NULL_SC_Y 68
|
||||
#define GLFW_NULL_SC_Z 69
|
||||
#define GLFW_NULL_SC_F1 70
|
||||
#define GLFW_NULL_SC_F2 71
|
||||
#define GLFW_NULL_SC_F3 72
|
||||
#define GLFW_NULL_SC_F4 73
|
||||
#define GLFW_NULL_SC_F5 74
|
||||
#define GLFW_NULL_SC_F6 75
|
||||
#define GLFW_NULL_SC_F7 76
|
||||
#define GLFW_NULL_SC_F8 77
|
||||
#define GLFW_NULL_SC_F9 78
|
||||
#define GLFW_NULL_SC_F10 79
|
||||
#define GLFW_NULL_SC_F11 80
|
||||
#define GLFW_NULL_SC_F12 81
|
||||
#define GLFW_NULL_SC_F13 82
|
||||
#define GLFW_NULL_SC_F14 83
|
||||
#define GLFW_NULL_SC_F15 84
|
||||
#define GLFW_NULL_SC_F16 85
|
||||
#define GLFW_NULL_SC_F17 86
|
||||
#define GLFW_NULL_SC_F18 87
|
||||
#define GLFW_NULL_SC_F19 88
|
||||
#define GLFW_NULL_SC_F20 89
|
||||
#define GLFW_NULL_SC_F21 90
|
||||
#define GLFW_NULL_SC_F22 91
|
||||
#define GLFW_NULL_SC_F23 92
|
||||
#define GLFW_NULL_SC_F24 93
|
||||
#define GLFW_NULL_SC_F25 94
|
||||
#define GLFW_NULL_SC_KP_0 95
|
||||
#define GLFW_NULL_SC_KP_1 96
|
||||
#define GLFW_NULL_SC_KP_2 97
|
||||
#define GLFW_NULL_SC_KP_3 98
|
||||
#define GLFW_NULL_SC_KP_4 99
|
||||
#define GLFW_NULL_SC_KP_5 100
|
||||
#define GLFW_NULL_SC_KP_6 101
|
||||
#define GLFW_NULL_SC_KP_7 102
|
||||
#define GLFW_NULL_SC_KP_8 103
|
||||
#define GLFW_NULL_SC_KP_9 104
|
||||
#define GLFW_NULL_SC_KP_DECIMAL 105
|
||||
#define GLFW_NULL_SC_KP_DIVIDE 106
|
||||
#define GLFW_NULL_SC_KP_MULTIPLY 107
|
||||
#define GLFW_NULL_SC_KP_SUBTRACT 108
|
||||
#define GLFW_NULL_SC_KP_ADD 109
|
||||
#define GLFW_NULL_SC_KP_ENTER 110
|
||||
#define GLFW_NULL_SC_KP_EQUAL 111
|
||||
#define GLFW_NULL_SC_LEFT_SHIFT 112
|
||||
#define GLFW_NULL_SC_LEFT_CONTROL 113
|
||||
#define GLFW_NULL_SC_LEFT_ALT 114
|
||||
#define GLFW_NULL_SC_LEFT_SUPER 115
|
||||
#define GLFW_NULL_SC_RIGHT_SHIFT 116
|
||||
#define GLFW_NULL_SC_RIGHT_CONTROL 117
|
||||
#define GLFW_NULL_SC_RIGHT_ALT 118
|
||||
#define GLFW_NULL_SC_RIGHT_SUPER 119
|
||||
#define GLFW_NULL_SC_MENU 120
|
||||
#define GLFW_NULL_SC_LAST GLFW_NULL_SC_MENU
|
||||
|
||||
// Null-specific per-window data
|
||||
//
|
||||
typedef struct _GLFWwindowNull
|
||||
{
|
||||
int xpos;
|
||||
int ypos;
|
||||
int width;
|
||||
int height;
|
||||
char* title;
|
||||
GLFWbool visible;
|
||||
GLFWbool iconified;
|
||||
GLFWbool maximized;
|
||||
GLFWbool resizable;
|
||||
GLFWbool decorated;
|
||||
GLFWbool floating;
|
||||
GLFWbool transparent;
|
||||
float opacity;
|
||||
} _GLFWwindowNull;
|
||||
|
||||
// Null-specific per-monitor data
|
||||
//
|
||||
typedef struct _GLFWmonitorNull
|
||||
{
|
||||
GLFWgammaramp ramp;
|
||||
} _GLFWmonitorNull;
|
||||
|
||||
// Null-specific global data
|
||||
//
|
||||
typedef struct _GLFWlibraryNull
|
||||
{
|
||||
int xcursor;
|
||||
int ycursor;
|
||||
char* clipboardString;
|
||||
_GLFWwindow* focusedWindow;
|
||||
uint16_t keycodes[GLFW_NULL_SC_LAST + 1];
|
||||
uint8_t scancodes[GLFW_KEY_LAST + 1];
|
||||
} _GLFWlibraryNull;
|
||||
|
||||
void _glfwPollMonitorsNull(void);
|
||||
|
||||
GLFWbool _glfwConnectNull(int platformID, _GLFWplatform* platform);
|
||||
int _glfwInitNull(void);
|
||||
void _glfwTerminateNull(void);
|
||||
|
||||
void _glfwFreeMonitorNull(_GLFWmonitor* monitor);
|
||||
void _glfwGetMonitorPosNull(_GLFWmonitor* monitor, int* xpos, int* ypos);
|
||||
void _glfwGetMonitorContentScaleNull(_GLFWmonitor* monitor, float* xscale, float* yscale);
|
||||
void _glfwGetMonitorWorkareaNull(_GLFWmonitor* monitor, int* xpos, int* ypos, int* width, int* height);
|
||||
GLFWvidmode* _glfwGetVideoModesNull(_GLFWmonitor* monitor, int* found);
|
||||
void _glfwGetVideoModeNull(_GLFWmonitor* monitor, GLFWvidmode* mode);
|
||||
GLFWbool _glfwGetGammaRampNull(_GLFWmonitor* monitor, GLFWgammaramp* ramp);
|
||||
void _glfwSetGammaRampNull(_GLFWmonitor* monitor, const GLFWgammaramp* ramp);
|
||||
|
||||
GLFWbool _glfwCreateWindowNull(_GLFWwindow* window, const _GLFWwndconfig* wndconfig, const _GLFWctxconfig* ctxconfig, const _GLFWfbconfig* fbconfig);
|
||||
void _glfwDestroyWindowNull(_GLFWwindow* window);
|
||||
void _glfwSetWindowTitleNull(_GLFWwindow* window, const char* title);
|
||||
void _glfwSetWindowIconNull(_GLFWwindow* window, int count, const GLFWimage* images);
|
||||
void _glfwSetWindowMonitorNull(_GLFWwindow* window, _GLFWmonitor* monitor, int xpos, int ypos, int width, int height, int refreshRate);
|
||||
void _glfwGetWindowPosNull(_GLFWwindow* window, int* xpos, int* ypos);
|
||||
void _glfwSetWindowPosNull(_GLFWwindow* window, int xpos, int ypos);
|
||||
void _glfwGetWindowSizeNull(_GLFWwindow* window, int* width, int* height);
|
||||
void _glfwSetWindowSizeNull(_GLFWwindow* window, int width, int height);
|
||||
void _glfwSetWindowSizeLimitsNull(_GLFWwindow* window, int minwidth, int minheight, int maxwidth, int maxheight);
|
||||
void _glfwSetWindowAspectRatioNull(_GLFWwindow* window, int n, int d);
|
||||
void _glfwGetFramebufferSizeNull(_GLFWwindow* window, int* width, int* height);
|
||||
void _glfwGetWindowFrameSizeNull(_GLFWwindow* window, int* left, int* top, int* right, int* bottom);
|
||||
void _glfwGetWindowContentScaleNull(_GLFWwindow* window, float* xscale, float* yscale);
|
||||
void _glfwIconifyWindowNull(_GLFWwindow* window);
|
||||
void _glfwRestoreWindowNull(_GLFWwindow* window);
|
||||
void _glfwMaximizeWindowNull(_GLFWwindow* window);
|
||||
GLFWbool _glfwWindowMaximizedNull(_GLFWwindow* window);
|
||||
GLFWbool _glfwWindowHoveredNull(_GLFWwindow* window);
|
||||
GLFWbool _glfwFramebufferTransparentNull(_GLFWwindow* window);
|
||||
void _glfwSetWindowResizableNull(_GLFWwindow* window, GLFWbool enabled);
|
||||
void _glfwSetWindowDecoratedNull(_GLFWwindow* window, GLFWbool enabled);
|
||||
void _glfwSetWindowFloatingNull(_GLFWwindow* window, GLFWbool enabled);
|
||||
void _glfwSetWindowMousePassthroughNull(_GLFWwindow* window, GLFWbool enabled);
|
||||
float _glfwGetWindowOpacityNull(_GLFWwindow* window);
|
||||
void _glfwSetWindowOpacityNull(_GLFWwindow* window, float opacity);
|
||||
void _glfwSetRawMouseMotionNull(_GLFWwindow *window, GLFWbool enabled);
|
||||
GLFWbool _glfwRawMouseMotionSupportedNull(void);
|
||||
void _glfwShowWindowNull(_GLFWwindow* window);
|
||||
void _glfwRequestWindowAttentionNull(_GLFWwindow* window);
|
||||
void _glfwRequestWindowAttentionNull(_GLFWwindow* window);
|
||||
void _glfwHideWindowNull(_GLFWwindow* window);
|
||||
void _glfwFocusWindowNull(_GLFWwindow* window);
|
||||
GLFWbool _glfwWindowFocusedNull(_GLFWwindow* window);
|
||||
GLFWbool _glfwWindowIconifiedNull(_GLFWwindow* window);
|
||||
GLFWbool _glfwWindowVisibleNull(_GLFWwindow* window);
|
||||
void _glfwPollEventsNull(void);
|
||||
void _glfwWaitEventsNull(void);
|
||||
void _glfwWaitEventsTimeoutNull(double timeout);
|
||||
void _glfwPostEmptyEventNull(void);
|
||||
void _glfwGetCursorPosNull(_GLFWwindow* window, double* xpos, double* ypos);
|
||||
void _glfwSetCursorPosNull(_GLFWwindow* window, double x, double y);
|
||||
void _glfwSetCursorModeNull(_GLFWwindow* window, int mode);
|
||||
GLFWbool _glfwCreateCursorNull(_GLFWcursor* cursor, const GLFWimage* image, int xhot, int yhot);
|
||||
GLFWbool _glfwCreateStandardCursorNull(_GLFWcursor* cursor, int shape);
|
||||
void _glfwDestroyCursorNull(_GLFWcursor* cursor);
|
||||
void _glfwSetCursorNull(_GLFWwindow* window, _GLFWcursor* cursor);
|
||||
void _glfwSetClipboardStringNull(const char* string);
|
||||
const char* _glfwGetClipboardStringNull(void);
|
||||
const char* _glfwGetScancodeNameNull(int scancode);
|
||||
int _glfwGetKeyScancodeNull(int key);
|
||||
|
||||
EGLenum _glfwGetEGLPlatformNull(EGLint** attribs);
|
||||
EGLNativeDisplayType _glfwGetEGLNativeDisplayNull(void);
|
||||
EGLNativeWindowType _glfwGetEGLNativeWindowNull(_GLFWwindow* window);
|
||||
|
||||
void _glfwGetRequiredInstanceExtensionsNull(char** extensions);
|
||||
GLFWbool _glfwGetPhysicalDevicePresentationSupportNull(VkInstance instance, VkPhysicalDevice device, uint32_t queuefamily);
|
||||
VkResult _glfwCreateWindowSurfaceNull(VkInstance instance, _GLFWwindow* window, const VkAllocationCallbacks* allocator, VkSurfaceKHR* surface);
|
||||
|
||||
void _glfwPollMonitorsNull(void);
|
||||
|
||||
@@ -0,0 +1,203 @@
|
||||
//========================================================================
|
||||
// GLFW 3.4 - www.glfw.org
|
||||
//------------------------------------------------------------------------
|
||||
// Copyright (c) 2002-2006 Marcus Geelnard
|
||||
// Copyright (c) 2006-2018 Camilla Löwy <elmindreda@glfw.org>
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied
|
||||
// warranty. In no event will the authors be held liable for any damages
|
||||
// arising from the use of this software.
|
||||
//
|
||||
// Permission is granted to anyone to use this software for any purpose,
|
||||
// including commercial applications, and to alter it and redistribute it
|
||||
// freely, subject to the following restrictions:
|
||||
//
|
||||
// 1. The origin of this software must not be misrepresented; you must not
|
||||
// claim that you wrote the original software. If you use this software
|
||||
// in a product, an acknowledgment in the product documentation would
|
||||
// be appreciated but is not required.
|
||||
//
|
||||
// 2. Altered source versions must be plainly marked as such, and must not
|
||||
// be misrepresented as being the original software.
|
||||
//
|
||||
// 3. This notice may not be removed or altered from any source
|
||||
// distribution.
|
||||
//
|
||||
//========================================================================
|
||||
|
||||
#if defined(GLFW_BUILD_WIN32_TIMER) || \
|
||||
defined(GLFW_BUILD_WIN32_MODULE) || \
|
||||
defined(GLFW_BUILD_WIN32_THREAD) || \
|
||||
defined(GLFW_BUILD_COCOA_TIMER) || \
|
||||
defined(GLFW_BUILD_POSIX_TIMER) || \
|
||||
defined(GLFW_BUILD_POSIX_MODULE) || \
|
||||
defined(GLFW_BUILD_POSIX_THREAD) || \
|
||||
defined(GLFW_BUILD_POSIX_POLL) || \
|
||||
defined(GLFW_BUILD_LINUX_JOYSTICK)
|
||||
#error "You must not define these; define zero or more _GLFW_<platform> macros instead"
|
||||
#endif
|
||||
|
||||
#include "glfw_null_platform.h"
|
||||
|
||||
#if defined(_GLFW_WIN32)
|
||||
#include "glfw_win32_platform.h"
|
||||
#else
|
||||
#define GLFW_WIN32_WINDOW_STATE
|
||||
#define GLFW_WIN32_MONITOR_STATE
|
||||
#define GLFW_WIN32_CURSOR_STATE
|
||||
#define GLFW_WIN32_LIBRARY_WINDOW_STATE
|
||||
#define GLFW_WGL_CONTEXT_STATE
|
||||
#define GLFW_WGL_LIBRARY_CONTEXT_STATE
|
||||
#endif
|
||||
|
||||
#if defined(_GLFW_COCOA)
|
||||
#include "cocoa_platform.h"
|
||||
#else
|
||||
#define GLFW_COCOA_WINDOW_STATE
|
||||
#define GLFW_COCOA_MONITOR_STATE
|
||||
#define GLFW_COCOA_CURSOR_STATE
|
||||
#define GLFW_COCOA_LIBRARY_WINDOW_STATE
|
||||
#define GLFW_NSGL_CONTEXT_STATE
|
||||
#define GLFW_NSGL_LIBRARY_CONTEXT_STATE
|
||||
#endif
|
||||
|
||||
#if defined(_GLFW_WAYLAND)
|
||||
#include "wl_platform.h"
|
||||
#else
|
||||
#define GLFW_WAYLAND_WINDOW_STATE
|
||||
#define GLFW_WAYLAND_MONITOR_STATE
|
||||
#define GLFW_WAYLAND_CURSOR_STATE
|
||||
#define GLFW_WAYLAND_LIBRARY_WINDOW_STATE
|
||||
#endif
|
||||
|
||||
#if defined(_GLFW_X11)
|
||||
#include "x11_platform.h"
|
||||
#else
|
||||
#define GLFW_X11_WINDOW_STATE
|
||||
#define GLFW_X11_MONITOR_STATE
|
||||
#define GLFW_X11_CURSOR_STATE
|
||||
#define GLFW_X11_LIBRARY_WINDOW_STATE
|
||||
#define GLFW_GLX_CONTEXT_STATE
|
||||
#define GLFW_GLX_LIBRARY_CONTEXT_STATE
|
||||
#endif
|
||||
|
||||
#include "glfw_null_joystick.h"
|
||||
|
||||
#if defined(_GLFW_WIN32)
|
||||
#include "glfw_win32_joystick.h"
|
||||
#else
|
||||
#define GLFW_WIN32_JOYSTICK_STATE
|
||||
#define GLFW_WIN32_LIBRARY_JOYSTICK_STATE
|
||||
#endif
|
||||
|
||||
#if defined(_GLFW_COCOA)
|
||||
#include "cocoa_joystick.h"
|
||||
#else
|
||||
#define GLFW_COCOA_JOYSTICK_STATE
|
||||
#define GLFW_COCOA_LIBRARY_JOYSTICK_STATE
|
||||
#endif
|
||||
|
||||
#if (defined(_GLFW_X11) || defined(_GLFW_WAYLAND)) && defined(__linux__)
|
||||
#define GLFW_BUILD_LINUX_JOYSTICK
|
||||
#endif
|
||||
|
||||
#if defined(GLFW_BUILD_LINUX_JOYSTICK)
|
||||
#include "linux_joystick.h"
|
||||
#else
|
||||
#define GLFW_LINUX_JOYSTICK_STATE
|
||||
#define GLFW_LINUX_LIBRARY_JOYSTICK_STATE
|
||||
#endif
|
||||
|
||||
#define GLFW_PLATFORM_WINDOW_STATE \
|
||||
GLFW_WIN32_WINDOW_STATE \
|
||||
GLFW_COCOA_WINDOW_STATE \
|
||||
GLFW_WAYLAND_WINDOW_STATE \
|
||||
GLFW_X11_WINDOW_STATE \
|
||||
GLFW_NULL_WINDOW_STATE \
|
||||
|
||||
#define GLFW_PLATFORM_MONITOR_STATE \
|
||||
GLFW_WIN32_MONITOR_STATE \
|
||||
GLFW_COCOA_MONITOR_STATE \
|
||||
GLFW_WAYLAND_MONITOR_STATE \
|
||||
GLFW_X11_MONITOR_STATE \
|
||||
GLFW_NULL_MONITOR_STATE \
|
||||
|
||||
#define GLFW_PLATFORM_CURSOR_STATE \
|
||||
GLFW_WIN32_CURSOR_STATE \
|
||||
GLFW_COCOA_CURSOR_STATE \
|
||||
GLFW_WAYLAND_CURSOR_STATE \
|
||||
GLFW_X11_CURSOR_STATE \
|
||||
GLFW_NULL_CURSOR_STATE \
|
||||
|
||||
#define GLFW_PLATFORM_JOYSTICK_STATE \
|
||||
GLFW_WIN32_JOYSTICK_STATE \
|
||||
GLFW_COCOA_JOYSTICK_STATE \
|
||||
GLFW_LINUX_JOYSTICK_STATE
|
||||
|
||||
#define GLFW_PLATFORM_LIBRARY_WINDOW_STATE \
|
||||
GLFW_WIN32_LIBRARY_WINDOW_STATE \
|
||||
GLFW_COCOA_LIBRARY_WINDOW_STATE \
|
||||
GLFW_WAYLAND_LIBRARY_WINDOW_STATE \
|
||||
GLFW_X11_LIBRARY_WINDOW_STATE \
|
||||
GLFW_NULL_LIBRARY_WINDOW_STATE \
|
||||
|
||||
#define GLFW_PLATFORM_LIBRARY_JOYSTICK_STATE \
|
||||
GLFW_WIN32_LIBRARY_JOYSTICK_STATE \
|
||||
GLFW_COCOA_LIBRARY_JOYSTICK_STATE \
|
||||
GLFW_LINUX_LIBRARY_JOYSTICK_STATE
|
||||
|
||||
#define GLFW_PLATFORM_CONTEXT_STATE \
|
||||
GLFW_WGL_CONTEXT_STATE \
|
||||
GLFW_NSGL_CONTEXT_STATE \
|
||||
GLFW_GLX_CONTEXT_STATE
|
||||
|
||||
#define GLFW_PLATFORM_LIBRARY_CONTEXT_STATE \
|
||||
GLFW_WGL_LIBRARY_CONTEXT_STATE \
|
||||
GLFW_NSGL_LIBRARY_CONTEXT_STATE \
|
||||
GLFW_GLX_LIBRARY_CONTEXT_STATE
|
||||
|
||||
#if defined(_WIN32)
|
||||
#define GLFW_BUILD_WIN32_THREAD
|
||||
#else
|
||||
#define GLFW_BUILD_POSIX_THREAD
|
||||
#endif
|
||||
|
||||
#if defined(GLFW_BUILD_WIN32_THREAD)
|
||||
#include "glfw_win32_thread.h"
|
||||
#define GLFW_PLATFORM_TLS_STATE GLFW_WIN32_TLS_STATE
|
||||
#define GLFW_PLATFORM_MUTEX_STATE GLFW_WIN32_MUTEX_STATE
|
||||
#elif defined(GLFW_BUILD_POSIX_THREAD)
|
||||
#include "posix_thread.h"
|
||||
#define GLFW_PLATFORM_TLS_STATE GLFW_POSIX_TLS_STATE
|
||||
#define GLFW_PLATFORM_MUTEX_STATE GLFW_POSIX_MUTEX_STATE
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32)
|
||||
#define GLFW_BUILD_WIN32_TIMER
|
||||
#elif defined(__APPLE__)
|
||||
#define GLFW_BUILD_COCOA_TIMER
|
||||
#else
|
||||
#define GLFW_BUILD_POSIX_TIMER
|
||||
#endif
|
||||
|
||||
#if defined(GLFW_BUILD_WIN32_TIMER)
|
||||
#include "glfw_win32_time.h"
|
||||
#define GLFW_PLATFORM_LIBRARY_TIMER_STATE GLFW_WIN32_LIBRARY_TIMER_STATE
|
||||
#elif defined(GLFW_BUILD_COCOA_TIMER)
|
||||
#include "cocoa_time.h"
|
||||
#define GLFW_PLATFORM_LIBRARY_TIMER_STATE GLFW_COCOA_LIBRARY_TIMER_STATE
|
||||
#elif defined(GLFW_BUILD_POSIX_TIMER)
|
||||
#include "posix_time.h"
|
||||
#define GLFW_PLATFORM_LIBRARY_TIMER_STATE GLFW_POSIX_LIBRARY_TIMER_STATE
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32)
|
||||
#define GLFW_BUILD_WIN32_MODULE
|
||||
#else
|
||||
#define GLFW_BUILD_POSIX_MODULE
|
||||
#endif
|
||||
|
||||
#if defined(_GLFW_WAYLAND) || defined(_GLFW_X11)
|
||||
#define GLFW_BUILD_POSIX_POLL
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
//========================================================================
|
||||
// GLFW 3.4 Win32 - www.glfw.org
|
||||
//------------------------------------------------------------------------
|
||||
// Copyright (c) 2006-2017 Camilla Löwy <elmindreda@glfw.org>
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied
|
||||
// warranty. In no event will the authors be held liable for any damages
|
||||
// arising from the use of this software.
|
||||
//
|
||||
// Permission is granted to anyone to use this software for any purpose,
|
||||
// including commercial applications, and to alter it and redistribute it
|
||||
// freely, subject to the following restrictions:
|
||||
//
|
||||
// 1. The origin of this software must not be misrepresented; you must not
|
||||
// claim that you wrote the original software. If you use this software
|
||||
// in a product, an acknowledgment in the product documentation would
|
||||
// be appreciated but is not required.
|
||||
//
|
||||
// 2. Altered source versions must be plainly marked as such, and must not
|
||||
// be misrepresented as being the original software.
|
||||
//
|
||||
// 3. This notice may not be removed or altered from any source
|
||||
// distribution.
|
||||
//
|
||||
//========================================================================
|
||||
|
||||
#define GLFW_WIN32_JOYSTICK_STATE _GLFWjoystickWin32 win32;
|
||||
#define GLFW_WIN32_LIBRARY_JOYSTICK_STATE
|
||||
|
||||
// Joystick element (axis, button or slider)
|
||||
//
|
||||
typedef struct _GLFWjoyobjectWin32
|
||||
{
|
||||
int offset;
|
||||
int type;
|
||||
} _GLFWjoyobjectWin32;
|
||||
|
||||
// Win32-specific per-joystick data
|
||||
//
|
||||
typedef struct _GLFWjoystickWin32
|
||||
{
|
||||
_GLFWjoyobjectWin32* objects;
|
||||
int objectCount;
|
||||
IDirectInputDevice8W* device;
|
||||
DWORD index;
|
||||
GUID guid;
|
||||
} _GLFWjoystickWin32;
|
||||
|
||||
void _glfwDetectJoystickConnectionWin32(void);
|
||||
void _glfwDetectJoystickDisconnectionWin32(void);
|
||||
|
||||
@@ -0,0 +1,624 @@
|
||||
//========================================================================
|
||||
// GLFW 3.4 Win32 - www.glfw.org
|
||||
//------------------------------------------------------------------------
|
||||
// Copyright (c) 2002-2006 Marcus Geelnard
|
||||
// Copyright (c) 2006-2019 Camilla Löwy <elmindreda@glfw.org>
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied
|
||||
// warranty. In no event will the authors be held liable for any damages
|
||||
// arising from the use of this software.
|
||||
//
|
||||
// Permission is granted to anyone to use this software for any purpose,
|
||||
// including commercial applications, and to alter it and redistribute it
|
||||
// freely, subject to the following restrictions:
|
||||
//
|
||||
// 1. The origin of this software must not be misrepresented; you must not
|
||||
// claim that you wrote the original software. If you use this software
|
||||
// in a product, an acknowledgment in the product documentation would
|
||||
// be appreciated but is not required.
|
||||
//
|
||||
// 2. Altered source versions must be plainly marked as such, and must not
|
||||
// be misrepresented as being the original software.
|
||||
//
|
||||
// 3. This notice may not be removed or altered from any source
|
||||
// distribution.
|
||||
//
|
||||
//========================================================================
|
||||
|
||||
// We don't need all the fancy stuff
|
||||
#ifndef NOMINMAX
|
||||
#define NOMINMAX
|
||||
#endif
|
||||
|
||||
#ifndef VC_EXTRALEAN
|
||||
#define VC_EXTRALEAN
|
||||
#endif
|
||||
|
||||
#ifndef WIN32_LEAN_AND_MEAN
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#endif
|
||||
|
||||
// This is a workaround for the fact that glfw3.h needs to export APIENTRY (for
|
||||
// example to allow applications to correctly declare a GL_KHR_debug callback)
|
||||
// but windows.h assumes no one will define APIENTRY before it does
|
||||
#undef APIENTRY
|
||||
|
||||
// GLFW on Windows is Unicode only and does not work in MBCS mode
|
||||
#ifndef UNICODE
|
||||
#define UNICODE
|
||||
#endif
|
||||
|
||||
// GLFW requires Windows XP or later
|
||||
#if WINVER < 0x0501
|
||||
#undef WINVER
|
||||
#define WINVER 0x0501
|
||||
#endif
|
||||
#if _WIN32_WINNT < 0x0501
|
||||
#undef _WIN32_WINNT
|
||||
#define _WIN32_WINNT 0x0501
|
||||
#endif
|
||||
|
||||
// GLFW uses DirectInput8 interfaces
|
||||
#define DIRECTINPUT_VERSION 0x0800
|
||||
|
||||
// GLFW uses OEM cursor resources
|
||||
#define OEMRESOURCE
|
||||
|
||||
#include <wctype.h>
|
||||
#include <windows.h>
|
||||
#include <dinput.h>
|
||||
#include <xinput.h>
|
||||
#include <dbt.h>
|
||||
|
||||
// HACK: Define macros that some windows.h variants don't
|
||||
#ifndef WM_MOUSEHWHEEL
|
||||
#define WM_MOUSEHWHEEL 0x020E
|
||||
#endif
|
||||
#ifndef WM_DWMCOMPOSITIONCHANGED
|
||||
#define WM_DWMCOMPOSITIONCHANGED 0x031E
|
||||
#endif
|
||||
#ifndef WM_DWMCOLORIZATIONCOLORCHANGED
|
||||
#define WM_DWMCOLORIZATIONCOLORCHANGED 0x0320
|
||||
#endif
|
||||
#ifndef WM_COPYGLOBALDATA
|
||||
#define WM_COPYGLOBALDATA 0x0049
|
||||
#endif
|
||||
#ifndef WM_UNICHAR
|
||||
#define WM_UNICHAR 0x0109
|
||||
#endif
|
||||
#ifndef UNICODE_NOCHAR
|
||||
#define UNICODE_NOCHAR 0xFFFF
|
||||
#endif
|
||||
#ifndef WM_DPICHANGED
|
||||
#define WM_DPICHANGED 0x02E0
|
||||
#endif
|
||||
#ifndef GET_XBUTTON_WPARAM
|
||||
#define GET_XBUTTON_WPARAM(w) (HIWORD(w))
|
||||
#endif
|
||||
#ifndef EDS_ROTATEDMODE
|
||||
#define EDS_ROTATEDMODE 0x00000004
|
||||
#endif
|
||||
#ifndef DISPLAY_DEVICE_ACTIVE
|
||||
#define DISPLAY_DEVICE_ACTIVE 0x00000001
|
||||
#endif
|
||||
#ifndef _WIN32_WINNT_WINBLUE
|
||||
#define _WIN32_WINNT_WINBLUE 0x0603
|
||||
#endif
|
||||
#ifndef _WIN32_WINNT_WIN8
|
||||
#define _WIN32_WINNT_WIN8 0x0602
|
||||
#endif
|
||||
#ifndef WM_GETDPISCALEDSIZE
|
||||
#define WM_GETDPISCALEDSIZE 0x02e4
|
||||
#endif
|
||||
#ifndef USER_DEFAULT_SCREEN_DPI
|
||||
#define USER_DEFAULT_SCREEN_DPI 96
|
||||
#endif
|
||||
#ifndef OCR_HAND
|
||||
#define OCR_HAND 32649
|
||||
#endif
|
||||
|
||||
#if WINVER < 0x0601
|
||||
typedef struct
|
||||
{
|
||||
DWORD cbSize;
|
||||
DWORD ExtStatus;
|
||||
} CHANGEFILTERSTRUCT;
|
||||
#ifndef MSGFLT_ALLOW
|
||||
#define MSGFLT_ALLOW 1
|
||||
#endif
|
||||
#endif /*Windows 7*/
|
||||
|
||||
#if WINVER < 0x0600
|
||||
#define DWM_BB_ENABLE 0x00000001
|
||||
#define DWM_BB_BLURREGION 0x00000002
|
||||
typedef struct
|
||||
{
|
||||
DWORD dwFlags;
|
||||
BOOL fEnable;
|
||||
HRGN hRgnBlur;
|
||||
BOOL fTransitionOnMaximized;
|
||||
} DWM_BLURBEHIND;
|
||||
#else
|
||||
#include <dwmapi.h>
|
||||
#endif /*Windows Vista*/
|
||||
|
||||
#ifndef DPI_ENUMS_DECLARED
|
||||
typedef enum
|
||||
{
|
||||
PROCESS_DPI_UNAWARE = 0,
|
||||
PROCESS_SYSTEM_DPI_AWARE = 1,
|
||||
PROCESS_PER_MONITOR_DPI_AWARE = 2
|
||||
} PROCESS_DPI_AWARENESS;
|
||||
typedef enum
|
||||
{
|
||||
MDT_EFFECTIVE_DPI = 0,
|
||||
MDT_ANGULAR_DPI = 1,
|
||||
MDT_RAW_DPI = 2,
|
||||
MDT_DEFAULT = MDT_EFFECTIVE_DPI
|
||||
} MONITOR_DPI_TYPE;
|
||||
#endif /*DPI_ENUMS_DECLARED*/
|
||||
|
||||
#ifndef DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2
|
||||
#define DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2 ((HANDLE) -4)
|
||||
#endif /*DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2*/
|
||||
|
||||
// Replacement for versionhelpers.h macros, as we cannot rely on the
|
||||
// application having a correct embedded manifest
|
||||
//
|
||||
#define IsWindowsVistaOrGreater() \
|
||||
_glfwIsWindowsVersionOrGreaterWin32(HIBYTE(_WIN32_WINNT_VISTA), \
|
||||
LOBYTE(_WIN32_WINNT_VISTA), 0)
|
||||
#define IsWindows7OrGreater() \
|
||||
_glfwIsWindowsVersionOrGreaterWin32(HIBYTE(_WIN32_WINNT_WIN7), \
|
||||
LOBYTE(_WIN32_WINNT_WIN7), 0)
|
||||
#define IsWindows8OrGreater() \
|
||||
_glfwIsWindowsVersionOrGreaterWin32(HIBYTE(_WIN32_WINNT_WIN8), \
|
||||
LOBYTE(_WIN32_WINNT_WIN8), 0)
|
||||
#define IsWindows8Point1OrGreater() \
|
||||
_glfwIsWindowsVersionOrGreaterWin32(HIBYTE(_WIN32_WINNT_WINBLUE), \
|
||||
LOBYTE(_WIN32_WINNT_WINBLUE), 0)
|
||||
|
||||
// Windows 10 Anniversary Update
|
||||
#define _glfwIsWindows10Version1607OrGreaterWin32() \
|
||||
_glfwIsWindows10BuildOrGreaterWin32(14393)
|
||||
// Windows 10 Creators Update
|
||||
#define _glfwIsWindows10Version1703OrGreaterWin32() \
|
||||
_glfwIsWindows10BuildOrGreaterWin32(15063)
|
||||
|
||||
// HACK: Define macros that some xinput.h variants don't
|
||||
#ifndef XINPUT_CAPS_WIRELESS
|
||||
#define XINPUT_CAPS_WIRELESS 0x0002
|
||||
#endif
|
||||
#ifndef XINPUT_DEVSUBTYPE_WHEEL
|
||||
#define XINPUT_DEVSUBTYPE_WHEEL 0x02
|
||||
#endif
|
||||
#ifndef XINPUT_DEVSUBTYPE_ARCADE_STICK
|
||||
#define XINPUT_DEVSUBTYPE_ARCADE_STICK 0x03
|
||||
#endif
|
||||
#ifndef XINPUT_DEVSUBTYPE_FLIGHT_STICK
|
||||
#define XINPUT_DEVSUBTYPE_FLIGHT_STICK 0x04
|
||||
#endif
|
||||
#ifndef XINPUT_DEVSUBTYPE_DANCE_PAD
|
||||
#define XINPUT_DEVSUBTYPE_DANCE_PAD 0x05
|
||||
#endif
|
||||
#ifndef XINPUT_DEVSUBTYPE_GUITAR
|
||||
#define XINPUT_DEVSUBTYPE_GUITAR 0x06
|
||||
#endif
|
||||
#ifndef XINPUT_DEVSUBTYPE_DRUM_KIT
|
||||
#define XINPUT_DEVSUBTYPE_DRUM_KIT 0x08
|
||||
#endif
|
||||
#ifndef XINPUT_DEVSUBTYPE_ARCADE_PAD
|
||||
#define XINPUT_DEVSUBTYPE_ARCADE_PAD 0x13
|
||||
#endif
|
||||
#ifndef XUSER_MAX_COUNT
|
||||
#define XUSER_MAX_COUNT 4
|
||||
#endif
|
||||
|
||||
// HACK: Define macros that some dinput.h variants don't
|
||||
#ifndef DIDFT_OPTIONAL
|
||||
#define DIDFT_OPTIONAL 0x80000000
|
||||
#endif
|
||||
|
||||
#define WGL_NUMBER_PIXEL_FORMATS_ARB 0x2000
|
||||
#define WGL_SUPPORT_OPENGL_ARB 0x2010
|
||||
#define WGL_DRAW_TO_WINDOW_ARB 0x2001
|
||||
#define WGL_PIXEL_TYPE_ARB 0x2013
|
||||
#define WGL_TYPE_RGBA_ARB 0x202b
|
||||
#define WGL_ACCELERATION_ARB 0x2003
|
||||
#define WGL_NO_ACCELERATION_ARB 0x2025
|
||||
#define WGL_RED_BITS_ARB 0x2015
|
||||
#define WGL_RED_SHIFT_ARB 0x2016
|
||||
#define WGL_GREEN_BITS_ARB 0x2017
|
||||
#define WGL_GREEN_SHIFT_ARB 0x2018
|
||||
#define WGL_BLUE_BITS_ARB 0x2019
|
||||
#define WGL_BLUE_SHIFT_ARB 0x201a
|
||||
#define WGL_ALPHA_BITS_ARB 0x201b
|
||||
#define WGL_ALPHA_SHIFT_ARB 0x201c
|
||||
#define WGL_ACCUM_BITS_ARB 0x201d
|
||||
#define WGL_ACCUM_RED_BITS_ARB 0x201e
|
||||
#define WGL_ACCUM_GREEN_BITS_ARB 0x201f
|
||||
#define WGL_ACCUM_BLUE_BITS_ARB 0x2020
|
||||
#define WGL_ACCUM_ALPHA_BITS_ARB 0x2021
|
||||
#define WGL_DEPTH_BITS_ARB 0x2022
|
||||
#define WGL_STENCIL_BITS_ARB 0x2023
|
||||
#define WGL_AUX_BUFFERS_ARB 0x2024
|
||||
#define WGL_STEREO_ARB 0x2012
|
||||
#define WGL_DOUBLE_BUFFER_ARB 0x2011
|
||||
#define WGL_SAMPLES_ARB 0x2042
|
||||
#define WGL_FRAMEBUFFER_SRGB_CAPABLE_ARB 0x20a9
|
||||
#define WGL_CONTEXT_DEBUG_BIT_ARB 0x00000001
|
||||
#define WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x00000002
|
||||
#define WGL_CONTEXT_PROFILE_MASK_ARB 0x9126
|
||||
#define WGL_CONTEXT_CORE_PROFILE_BIT_ARB 0x00000001
|
||||
#define WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB 0x00000002
|
||||
#define WGL_CONTEXT_MAJOR_VERSION_ARB 0x2091
|
||||
#define WGL_CONTEXT_MINOR_VERSION_ARB 0x2092
|
||||
#define WGL_CONTEXT_FLAGS_ARB 0x2094
|
||||
#define WGL_CONTEXT_ES2_PROFILE_BIT_EXT 0x00000004
|
||||
#define WGL_CONTEXT_ROBUST_ACCESS_BIT_ARB 0x00000004
|
||||
#define WGL_LOSE_CONTEXT_ON_RESET_ARB 0x8252
|
||||
#define WGL_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB 0x8256
|
||||
#define WGL_NO_RESET_NOTIFICATION_ARB 0x8261
|
||||
#define WGL_CONTEXT_RELEASE_BEHAVIOR_ARB 0x2097
|
||||
#define WGL_CONTEXT_RELEASE_BEHAVIOR_NONE_ARB 0
|
||||
#define WGL_CONTEXT_RELEASE_BEHAVIOR_FLUSH_ARB 0x2098
|
||||
#define WGL_CONTEXT_OPENGL_NO_ERROR_ARB 0x31b3
|
||||
#define WGL_COLORSPACE_EXT 0x309d
|
||||
#define WGL_COLORSPACE_SRGB_EXT 0x3089
|
||||
|
||||
#define ERROR_INVALID_VERSION_ARB 0x2095
|
||||
#define ERROR_INVALID_PROFILE_ARB 0x2096
|
||||
#define ERROR_INCOMPATIBLE_DEVICE_CONTEXTS_ARB 0x2054
|
||||
|
||||
// xinput.dll function pointer typedefs
|
||||
typedef DWORD (WINAPI * PFN_XInputGetCapabilities)(DWORD,DWORD,XINPUT_CAPABILITIES*);
|
||||
typedef DWORD (WINAPI * PFN_XInputGetState)(DWORD,XINPUT_STATE*);
|
||||
#define XInputGetCapabilities _glfw.win32.xinput.GetCapabilities
|
||||
#define XInputGetState _glfw.win32.xinput.GetState
|
||||
|
||||
// dinput8.dll function pointer typedefs
|
||||
typedef HRESULT (WINAPI * PFN_DirectInput8Create)(HINSTANCE,DWORD,REFIID,LPVOID*,LPUNKNOWN);
|
||||
#define DirectInput8Create _glfw.win32.dinput8.Create
|
||||
|
||||
// user32.dll function pointer typedefs
|
||||
typedef BOOL (WINAPI * PFN_SetProcessDPIAware)(void);
|
||||
typedef BOOL (WINAPI * PFN_ChangeWindowMessageFilterEx)(HWND,UINT,DWORD,CHANGEFILTERSTRUCT*);
|
||||
typedef BOOL (WINAPI * PFN_EnableNonClientDpiScaling)(HWND);
|
||||
typedef BOOL (WINAPI * PFN_SetProcessDpiAwarenessContext)(HANDLE);
|
||||
typedef UINT (WINAPI * PFN_GetDpiForWindow)(HWND);
|
||||
typedef BOOL (WINAPI * PFN_AdjustWindowRectExForDpi)(LPRECT,DWORD,BOOL,DWORD,UINT);
|
||||
typedef int (WINAPI * PFN_GetSystemMetricsForDpi)(int,UINT);
|
||||
#define SetProcessDPIAware _glfw.win32.user32.SetProcessDPIAware_
|
||||
#define ChangeWindowMessageFilterEx _glfw.win32.user32.ChangeWindowMessageFilterEx_
|
||||
#define EnableNonClientDpiScaling _glfw.win32.user32.EnableNonClientDpiScaling_
|
||||
#define SetProcessDpiAwarenessContext _glfw.win32.user32.SetProcessDpiAwarenessContext_
|
||||
#define GetDpiForWindow _glfw.win32.user32.GetDpiForWindow_
|
||||
#define AdjustWindowRectExForDpi _glfw.win32.user32.AdjustWindowRectExForDpi_
|
||||
#define GetSystemMetricsForDpi _glfw.win32.user32.GetSystemMetricsForDpi_
|
||||
|
||||
// dwmapi.dll function pointer typedefs
|
||||
typedef HRESULT (WINAPI * PFN_DwmIsCompositionEnabled)(BOOL*);
|
||||
typedef HRESULT (WINAPI * PFN_DwmFlush)(VOID);
|
||||
typedef HRESULT(WINAPI * PFN_DwmEnableBlurBehindWindow)(HWND,const DWM_BLURBEHIND*);
|
||||
typedef HRESULT (WINAPI * PFN_DwmGetColorizationColor)(DWORD*,BOOL*);
|
||||
#define DwmIsCompositionEnabled _glfw.win32.dwmapi.IsCompositionEnabled
|
||||
#define DwmFlush _glfw.win32.dwmapi.Flush
|
||||
#define DwmEnableBlurBehindWindow _glfw.win32.dwmapi.EnableBlurBehindWindow
|
||||
#define DwmGetColorizationColor _glfw.win32.dwmapi.GetColorizationColor
|
||||
|
||||
// shcore.dll function pointer typedefs
|
||||
typedef HRESULT (WINAPI * PFN_SetProcessDpiAwareness)(PROCESS_DPI_AWARENESS);
|
||||
typedef HRESULT (WINAPI * PFN_GetDpiForMonitor)(HMONITOR,MONITOR_DPI_TYPE,UINT*,UINT*);
|
||||
#define SetProcessDpiAwareness _glfw.win32.shcore.SetProcessDpiAwareness_
|
||||
#define GetDpiForMonitor _glfw.win32.shcore.GetDpiForMonitor_
|
||||
|
||||
// ntdll.dll function pointer typedefs
|
||||
typedef LONG (WINAPI * PFN_RtlVerifyVersionInfo)(OSVERSIONINFOEXW*,ULONG,ULONGLONG);
|
||||
#define RtlVerifyVersionInfo _glfw.win32.ntdll.RtlVerifyVersionInfo_
|
||||
|
||||
// WGL extension pointer typedefs
|
||||
typedef BOOL (WINAPI * PFNWGLSWAPINTERVALEXTPROC)(int);
|
||||
typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBIVARBPROC)(HDC,int,int,UINT,const int*,int*);
|
||||
typedef const char* (WINAPI * PFNWGLGETEXTENSIONSSTRINGEXTPROC)(void);
|
||||
typedef const char* (WINAPI * PFNWGLGETEXTENSIONSSTRINGARBPROC)(HDC);
|
||||
typedef HGLRC (WINAPI * PFNWGLCREATECONTEXTATTRIBSARBPROC)(HDC,HGLRC,const int*);
|
||||
#define wglSwapIntervalEXT _glfw.wgl.SwapIntervalEXT
|
||||
#define wglGetPixelFormatAttribivARB _glfw.wgl.GetPixelFormatAttribivARB
|
||||
#define wglGetExtensionsStringEXT _glfw.wgl.GetExtensionsStringEXT
|
||||
#define wglGetExtensionsStringARB _glfw.wgl.GetExtensionsStringARB
|
||||
#define wglCreateContextAttribsARB _glfw.wgl.CreateContextAttribsARB
|
||||
|
||||
// opengl32.dll function pointer typedefs
|
||||
typedef HGLRC (WINAPI * PFN_wglCreateContext)(HDC);
|
||||
typedef BOOL (WINAPI * PFN_wglDeleteContext)(HGLRC);
|
||||
typedef PROC (WINAPI * PFN_wglGetProcAddress)(LPCSTR);
|
||||
typedef HDC (WINAPI * PFN_wglGetCurrentDC)(void);
|
||||
typedef HGLRC (WINAPI * PFN_wglGetCurrentContext)(void);
|
||||
typedef BOOL (WINAPI * PFN_wglMakeCurrent)(HDC,HGLRC);
|
||||
typedef BOOL (WINAPI * PFN_wglShareLists)(HGLRC,HGLRC);
|
||||
#define wglCreateContext _glfw.wgl.CreateContext
|
||||
#define wglDeleteContext _glfw.wgl.DeleteContext
|
||||
#define wglGetProcAddress _glfw.wgl.GetProcAddress
|
||||
#define wglGetCurrentDC _glfw.wgl.GetCurrentDC
|
||||
#define wglGetCurrentContext _glfw.wgl.GetCurrentContext
|
||||
#define wglMakeCurrent _glfw.wgl.MakeCurrent
|
||||
#define wglShareLists _glfw.wgl.ShareLists
|
||||
|
||||
typedef VkFlags VkWin32SurfaceCreateFlagsKHR;
|
||||
|
||||
typedef struct VkWin32SurfaceCreateInfoKHR
|
||||
{
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkWin32SurfaceCreateFlagsKHR flags;
|
||||
HINSTANCE hinstance;
|
||||
HWND hwnd;
|
||||
} VkWin32SurfaceCreateInfoKHR;
|
||||
|
||||
typedef VkResult (APIENTRY *PFN_vkCreateWin32SurfaceKHR)(VkInstance,const VkWin32SurfaceCreateInfoKHR*,const VkAllocationCallbacks*,VkSurfaceKHR*);
|
||||
typedef VkBool32 (APIENTRY *PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR)(VkPhysicalDevice,uint32_t);
|
||||
|
||||
#define GLFW_WIN32_WINDOW_STATE _GLFWwindowWin32 win32;
|
||||
#define GLFW_WIN32_LIBRARY_WINDOW_STATE _GLFWlibraryWin32 win32;
|
||||
#define GLFW_WIN32_MONITOR_STATE _GLFWmonitorWin32 win32;
|
||||
#define GLFW_WIN32_CURSOR_STATE _GLFWcursorWin32 win32;
|
||||
|
||||
#define GLFW_WGL_CONTEXT_STATE _GLFWcontextWGL wgl;
|
||||
#define GLFW_WGL_LIBRARY_CONTEXT_STATE _GLFWlibraryWGL wgl;
|
||||
|
||||
|
||||
// WGL-specific per-context data
|
||||
//
|
||||
typedef struct _GLFWcontextWGL
|
||||
{
|
||||
HDC dc;
|
||||
HGLRC handle;
|
||||
int interval;
|
||||
} _GLFWcontextWGL;
|
||||
|
||||
// WGL-specific global data
|
||||
//
|
||||
typedef struct _GLFWlibraryWGL
|
||||
{
|
||||
HINSTANCE instance;
|
||||
PFN_wglCreateContext CreateContext;
|
||||
PFN_wglDeleteContext DeleteContext;
|
||||
PFN_wglGetProcAddress GetProcAddress;
|
||||
PFN_wglGetCurrentDC GetCurrentDC;
|
||||
PFN_wglGetCurrentContext GetCurrentContext;
|
||||
PFN_wglMakeCurrent MakeCurrent;
|
||||
PFN_wglShareLists ShareLists;
|
||||
|
||||
PFNWGLSWAPINTERVALEXTPROC SwapIntervalEXT;
|
||||
PFNWGLGETPIXELFORMATATTRIBIVARBPROC GetPixelFormatAttribivARB;
|
||||
PFNWGLGETEXTENSIONSSTRINGEXTPROC GetExtensionsStringEXT;
|
||||
PFNWGLGETEXTENSIONSSTRINGARBPROC GetExtensionsStringARB;
|
||||
PFNWGLCREATECONTEXTATTRIBSARBPROC CreateContextAttribsARB;
|
||||
GLFWbool EXT_swap_control;
|
||||
GLFWbool EXT_colorspace;
|
||||
GLFWbool ARB_multisample;
|
||||
GLFWbool ARB_framebuffer_sRGB;
|
||||
GLFWbool EXT_framebuffer_sRGB;
|
||||
GLFWbool ARB_pixel_format;
|
||||
GLFWbool ARB_create_context;
|
||||
GLFWbool ARB_create_context_profile;
|
||||
GLFWbool EXT_create_context_es2_profile;
|
||||
GLFWbool ARB_create_context_robustness;
|
||||
GLFWbool ARB_create_context_no_error;
|
||||
GLFWbool ARB_context_flush_control;
|
||||
} _GLFWlibraryWGL;
|
||||
|
||||
// Win32-specific per-window data
|
||||
//
|
||||
typedef struct _GLFWwindowWin32
|
||||
{
|
||||
HWND handle;
|
||||
HICON bigIcon;
|
||||
HICON smallIcon;
|
||||
|
||||
GLFWbool cursorTracked;
|
||||
GLFWbool frameAction;
|
||||
GLFWbool iconified;
|
||||
GLFWbool maximized;
|
||||
// Whether to enable framebuffer transparency on DWM
|
||||
GLFWbool transparent;
|
||||
GLFWbool scaleToMonitor;
|
||||
GLFWbool keymenu;
|
||||
|
||||
// Cached size used to filter out duplicate events
|
||||
int width, height;
|
||||
|
||||
// The last received cursor position, regardless of source
|
||||
int lastCursorPosX, lastCursorPosY;
|
||||
// The last received high surrogate when decoding pairs of UTF-16 messages
|
||||
WCHAR highSurrogate;
|
||||
} _GLFWwindowWin32;
|
||||
|
||||
// Win32-specific global data
|
||||
//
|
||||
typedef struct _GLFWlibraryWin32
|
||||
{
|
||||
HINSTANCE instance;
|
||||
HWND helperWindowHandle;
|
||||
ATOM helperWindowClass;
|
||||
ATOM mainWindowClass;
|
||||
HDEVNOTIFY deviceNotificationHandle;
|
||||
int acquiredMonitorCount;
|
||||
char* clipboardString;
|
||||
short int keycodes[512];
|
||||
short int scancodes[GLFW_KEY_LAST + 1];
|
||||
char keynames[GLFW_KEY_LAST + 1][5];
|
||||
// Where to place the cursor when re-enabled
|
||||
double restoreCursorPosX, restoreCursorPosY;
|
||||
// The window whose disabled cursor mode is active
|
||||
_GLFWwindow* disabledCursorWindow;
|
||||
// The window the cursor is captured in
|
||||
_GLFWwindow* capturedCursorWindow;
|
||||
RAWINPUT* rawInput;
|
||||
int rawInputSize;
|
||||
UINT mouseTrailSize;
|
||||
|
||||
struct {
|
||||
HINSTANCE instance;
|
||||
PFN_DirectInput8Create Create;
|
||||
IDirectInput8W* api;
|
||||
} dinput8;
|
||||
|
||||
struct {
|
||||
HINSTANCE instance;
|
||||
PFN_XInputGetCapabilities GetCapabilities;
|
||||
PFN_XInputGetState GetState;
|
||||
} xinput;
|
||||
|
||||
struct {
|
||||
HINSTANCE instance;
|
||||
PFN_SetProcessDPIAware SetProcessDPIAware_;
|
||||
PFN_ChangeWindowMessageFilterEx ChangeWindowMessageFilterEx_;
|
||||
PFN_EnableNonClientDpiScaling EnableNonClientDpiScaling_;
|
||||
PFN_SetProcessDpiAwarenessContext SetProcessDpiAwarenessContext_;
|
||||
PFN_GetDpiForWindow GetDpiForWindow_;
|
||||
PFN_AdjustWindowRectExForDpi AdjustWindowRectExForDpi_;
|
||||
PFN_GetSystemMetricsForDpi GetSystemMetricsForDpi_;
|
||||
} user32;
|
||||
|
||||
struct {
|
||||
HINSTANCE instance;
|
||||
PFN_DwmIsCompositionEnabled IsCompositionEnabled;
|
||||
PFN_DwmFlush Flush;
|
||||
PFN_DwmEnableBlurBehindWindow EnableBlurBehindWindow;
|
||||
PFN_DwmGetColorizationColor GetColorizationColor;
|
||||
} dwmapi;
|
||||
|
||||
struct {
|
||||
HINSTANCE instance;
|
||||
PFN_SetProcessDpiAwareness SetProcessDpiAwareness_;
|
||||
PFN_GetDpiForMonitor GetDpiForMonitor_;
|
||||
} shcore;
|
||||
|
||||
struct {
|
||||
HINSTANCE instance;
|
||||
PFN_RtlVerifyVersionInfo RtlVerifyVersionInfo_;
|
||||
} ntdll;
|
||||
} _GLFWlibraryWin32;
|
||||
|
||||
// Win32-specific per-monitor data
|
||||
//
|
||||
typedef struct _GLFWmonitorWin32
|
||||
{
|
||||
HMONITOR handle;
|
||||
// This size matches the static size of DISPLAY_DEVICE.DeviceName
|
||||
WCHAR adapterName[32];
|
||||
WCHAR displayName[32];
|
||||
char publicAdapterName[32];
|
||||
char publicDisplayName[32];
|
||||
GLFWbool modesPruned;
|
||||
GLFWbool modeChanged;
|
||||
} _GLFWmonitorWin32;
|
||||
|
||||
// Win32-specific per-cursor data
|
||||
//
|
||||
typedef struct _GLFWcursorWin32
|
||||
{
|
||||
HCURSOR handle;
|
||||
} _GLFWcursorWin32;
|
||||
|
||||
|
||||
GLFWbool _glfwConnectWin32(int platformID, _GLFWplatform* platform);
|
||||
int _glfwInitWin32(void);
|
||||
void _glfwTerminateWin32(void);
|
||||
|
||||
WCHAR* _glfwCreateWideStringFromUTF8Win32(const char* source);
|
||||
char* _glfwCreateUTF8FromWideStringWin32(const WCHAR* source);
|
||||
BOOL _glfwIsWindowsVersionOrGreaterWin32(WORD major, WORD minor, WORD sp);
|
||||
BOOL _glfwIsWindows10BuildOrGreaterWin32(WORD build);
|
||||
void _glfwInputErrorWin32(int error, const char* description);
|
||||
void _glfwUpdateKeyNamesWin32(void);
|
||||
|
||||
void _glfwPollMonitorsWin32(void);
|
||||
void _glfwSetVideoModeWin32(_GLFWmonitor* monitor, const GLFWvidmode* desired);
|
||||
void _glfwRestoreVideoModeWin32(_GLFWmonitor* monitor);
|
||||
void _glfwGetHMONITORContentScaleWin32(HMONITOR handle, float* xscale, float* yscale);
|
||||
|
||||
GLFWbool _glfwCreateWindowWin32(_GLFWwindow* window, const _GLFWwndconfig* wndconfig, const _GLFWctxconfig* ctxconfig, const _GLFWfbconfig* fbconfig);
|
||||
void _glfwDestroyWindowWin32(_GLFWwindow* window);
|
||||
void _glfwSetWindowTitleWin32(_GLFWwindow* window, const char* title);
|
||||
void _glfwSetWindowIconWin32(_GLFWwindow* window, int count, const GLFWimage* images);
|
||||
void _glfwGetWindowPosWin32(_GLFWwindow* window, int* xpos, int* ypos);
|
||||
void _glfwSetWindowPosWin32(_GLFWwindow* window, int xpos, int ypos);
|
||||
void _glfwGetWindowSizeWin32(_GLFWwindow* window, int* width, int* height);
|
||||
void _glfwSetWindowSizeWin32(_GLFWwindow* window, int width, int height);
|
||||
void _glfwSetWindowSizeLimitsWin32(_GLFWwindow* window, int minwidth, int minheight, int maxwidth, int maxheight);
|
||||
void _glfwSetWindowAspectRatioWin32(_GLFWwindow* window, int numer, int denom);
|
||||
void _glfwGetFramebufferSizeWin32(_GLFWwindow* window, int* width, int* height);
|
||||
void _glfwGetWindowFrameSizeWin32(_GLFWwindow* window, int* left, int* top, int* right, int* bottom);
|
||||
void _glfwGetWindowContentScaleWin32(_GLFWwindow* window, float* xscale, float* yscale);
|
||||
void _glfwIconifyWindowWin32(_GLFWwindow* window);
|
||||
void _glfwRestoreWindowWin32(_GLFWwindow* window);
|
||||
void _glfwMaximizeWindowWin32(_GLFWwindow* window);
|
||||
void _glfwShowWindowWin32(_GLFWwindow* window);
|
||||
void _glfwHideWindowWin32(_GLFWwindow* window);
|
||||
void _glfwRequestWindowAttentionWin32(_GLFWwindow* window);
|
||||
void _glfwFocusWindowWin32(_GLFWwindow* window);
|
||||
void _glfwSetWindowMonitorWin32(_GLFWwindow* window, _GLFWmonitor* monitor, int xpos, int ypos, int width, int height, int refreshRate);
|
||||
GLFWbool _glfwWindowFocusedWin32(_GLFWwindow* window);
|
||||
GLFWbool _glfwWindowIconifiedWin32(_GLFWwindow* window);
|
||||
GLFWbool _glfwWindowVisibleWin32(_GLFWwindow* window);
|
||||
GLFWbool _glfwWindowMaximizedWin32(_GLFWwindow* window);
|
||||
GLFWbool _glfwWindowHoveredWin32(_GLFWwindow* window);
|
||||
GLFWbool _glfwFramebufferTransparentWin32(_GLFWwindow* window);
|
||||
void _glfwSetWindowResizableWin32(_GLFWwindow* window, GLFWbool enabled);
|
||||
void _glfwSetWindowDecoratedWin32(_GLFWwindow* window, GLFWbool enabled);
|
||||
void _glfwSetWindowFloatingWin32(_GLFWwindow* window, GLFWbool enabled);
|
||||
void _glfwSetWindowMousePassthroughWin32(_GLFWwindow* window, GLFWbool enabled);
|
||||
float _glfwGetWindowOpacityWin32(_GLFWwindow* window);
|
||||
void _glfwSetWindowOpacityWin32(_GLFWwindow* window, float opacity);
|
||||
|
||||
void _glfwSetRawMouseMotionWin32(_GLFWwindow *window, GLFWbool enabled);
|
||||
GLFWbool _glfwRawMouseMotionSupportedWin32(void);
|
||||
|
||||
void _glfwPollEventsWin32(void);
|
||||
void _glfwWaitEventsWin32(void);
|
||||
void _glfwWaitEventsTimeoutWin32(double timeout);
|
||||
void _glfwPostEmptyEventWin32(void);
|
||||
|
||||
void _glfwGetCursorPosWin32(_GLFWwindow* window, double* xpos, double* ypos);
|
||||
void _glfwSetCursorPosWin32(_GLFWwindow* window, double xpos, double ypos);
|
||||
void _glfwSetCursorModeWin32(_GLFWwindow* window, int mode);
|
||||
const char* _glfwGetScancodeNameWin32(int scancode);
|
||||
int _glfwGetKeyScancodeWin32(int key);
|
||||
GLFWbool _glfwCreateCursorWin32(_GLFWcursor* cursor, const GLFWimage* image, int xhot, int yhot);
|
||||
GLFWbool _glfwCreateStandardCursorWin32(_GLFWcursor* cursor, int shape);
|
||||
void _glfwDestroyCursorWin32(_GLFWcursor* cursor);
|
||||
void _glfwSetCursorWin32(_GLFWwindow* window, _GLFWcursor* cursor);
|
||||
void _glfwSetClipboardStringWin32(const char* string);
|
||||
const char* _glfwGetClipboardStringWin32(void);
|
||||
|
||||
EGLenum _glfwGetEGLPlatformWin32(EGLint** attribs);
|
||||
EGLNativeDisplayType _glfwGetEGLNativeDisplayWin32(void);
|
||||
EGLNativeWindowType _glfwGetEGLNativeWindowWin32(_GLFWwindow* window);
|
||||
|
||||
void _glfwGetRequiredInstanceExtensionsWin32(char** extensions);
|
||||
GLFWbool _glfwGetPhysicalDevicePresentationSupportWin32(VkInstance instance, VkPhysicalDevice device, uint32_t queuefamily);
|
||||
VkResult _glfwCreateWindowSurfaceWin32(VkInstance instance, _GLFWwindow* window, const VkAllocationCallbacks* allocator, VkSurfaceKHR* surface);
|
||||
|
||||
void _glfwFreeMonitorWin32(_GLFWmonitor* monitor);
|
||||
void _glfwGetMonitorPosWin32(_GLFWmonitor* monitor, int* xpos, int* ypos);
|
||||
void _glfwGetMonitorContentScaleWin32(_GLFWmonitor* monitor, float* xscale, float* yscale);
|
||||
void _glfwGetMonitorWorkareaWin32(_GLFWmonitor* monitor, int* xpos, int* ypos, int* width, int* height);
|
||||
GLFWvidmode* _glfwGetVideoModesWin32(_GLFWmonitor* monitor, int* count);
|
||||
void _glfwGetVideoModeWin32(_GLFWmonitor* monitor, GLFWvidmode* mode);
|
||||
GLFWbool _glfwGetGammaRampWin32(_GLFWmonitor* monitor, GLFWgammaramp* ramp);
|
||||
void _glfwSetGammaRampWin32(_GLFWmonitor* monitor, const GLFWgammaramp* ramp);
|
||||
|
||||
GLFWbool _glfwInitJoysticksWin32(void);
|
||||
void _glfwTerminateJoysticksWin32(void);
|
||||
GLFWbool _glfwPollJoystickWin32(_GLFWjoystick* js, int mode);
|
||||
const char* _glfwGetMappingNameWin32(void);
|
||||
void _glfwUpdateGamepadGUIDWin32(char* guid);
|
||||
|
||||
GLFWbool _glfwInitWGL(void);
|
||||
void _glfwTerminateWGL(void);
|
||||
GLFWbool _glfwCreateContextWGL(_GLFWwindow* window,
|
||||
const _GLFWctxconfig* ctxconfig,
|
||||
const _GLFWfbconfig* fbconfig);
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
//========================================================================
|
||||
// GLFW 3.4 Win32 - www.glfw.org
|
||||
//------------------------------------------------------------------------
|
||||
// Copyright (c) 2002-2006 Marcus Geelnard
|
||||
// Copyright (c) 2006-2017 Camilla Löwy <elmindreda@glfw.org>
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied
|
||||
// warranty. In no event will the authors be held liable for any damages
|
||||
// arising from the use of this software.
|
||||
//
|
||||
// Permission is granted to anyone to use this software for any purpose,
|
||||
// including commercial applications, and to alter it and redistribute it
|
||||
// freely, subject to the following restrictions:
|
||||
//
|
||||
// 1. The origin of this software must not be misrepresented; you must not
|
||||
// claim that you wrote the original software. If you use this software
|
||||
// in a product, an acknowledgment in the product documentation would
|
||||
// be appreciated but is not required.
|
||||
//
|
||||
// 2. Altered source versions must be plainly marked as such, and must not
|
||||
// be misrepresented as being the original software.
|
||||
//
|
||||
// 3. This notice may not be removed or altered from any source
|
||||
// distribution.
|
||||
//
|
||||
//========================================================================
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
#define GLFW_WIN32_TLS_STATE _GLFWtlsWin32 win32;
|
||||
#define GLFW_WIN32_MUTEX_STATE _GLFWmutexWin32 win32;
|
||||
|
||||
// Win32-specific thread local storage data
|
||||
//
|
||||
typedef struct _GLFWtlsWin32
|
||||
{
|
||||
GLFWbool allocated;
|
||||
DWORD index;
|
||||
} _GLFWtlsWin32;
|
||||
|
||||
// Win32-specific mutex data
|
||||
//
|
||||
typedef struct _GLFWmutexWin32
|
||||
{
|
||||
GLFWbool allocated;
|
||||
CRITICAL_SECTION section;
|
||||
} _GLFWmutexWin32;
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
//========================================================================
|
||||
// GLFW 3.4 Win32 - www.glfw.org
|
||||
//------------------------------------------------------------------------
|
||||
// Copyright (c) 2002-2006 Marcus Geelnard
|
||||
// Copyright (c) 2006-2017 Camilla Löwy <elmindreda@glfw.org>
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied
|
||||
// warranty. In no event will the authors be held liable for any damages
|
||||
// arising from the use of this software.
|
||||
//
|
||||
// Permission is granted to anyone to use this software for any purpose,
|
||||
// including commercial applications, and to alter it and redistribute it
|
||||
// freely, subject to the following restrictions:
|
||||
//
|
||||
// 1. The origin of this software must not be misrepresented; you must not
|
||||
// claim that you wrote the original software. If you use this software
|
||||
// in a product, an acknowledgment in the product documentation would
|
||||
// be appreciated but is not required.
|
||||
//
|
||||
// 2. Altered source versions must be plainly marked as such, and must not
|
||||
// be misrepresented as being the original software.
|
||||
//
|
||||
// 3. This notice may not be removed or altered from any source
|
||||
// distribution.
|
||||
//
|
||||
//========================================================================
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
#define GLFW_WIN32_LIBRARY_TIMER_STATE _GLFWtimerWin32 win32;
|
||||
|
||||
// Win32-specific global timer data
|
||||
//
|
||||
typedef struct _GLFWtimerWin32
|
||||
{
|
||||
uint64_t frequency;
|
||||
} _GLFWtimerWin32;
|
||||
|
||||
+2
-7
@@ -4,13 +4,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef _GLFW_BUILD_DLL
|
||||
|
||||
#define _GLFW_BUILD_DLL
|
||||
|
||||
#endif // ! _GLFW_BUILD_DLL
|
||||
|
||||
|
||||
#define WIN32_LEAN_AND_MEAN // 从 Windows 头文件中排除极少使用的内容
|
||||
// Windows 头文件
|
||||
#include <windows.h>
|
||||
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
#pragma once
|
||||
/*
|
||||
#include "GLAD/gl.h"
|
||||
#include "glfw3.h"
|
||||
#include "StgSharpC.h"
|
||||
*/
|
||||
|
||||
#ifndef SSG_INTERNAL
|
||||
#define GGS_CINTERNAL
|
||||
|
||||
#if _WIN32
|
||||
#define SSCAPI __declspec(dllexport)
|
||||
#elif defined _LINUX_
|
||||
#define SSCAPI __attribute__((visibility("default")))
|
||||
#elif defined _APPLE_
|
||||
#define SSCAPI __attribute__((visibility("default")))
|
||||
#else
|
||||
#defien SSCAPI
|
||||
#endif
|
||||
|
||||
#define SSCDECL __cdecl
|
||||
|
||||
|
||||
|
||||
#endif //
|
||||
|
||||
Reference in New Issue
Block a user