Avoid including Windows.h in gl_core_3_1.h

This commit is contained in:
Snesrev
2022-10-15 20:27:16 +02:00
parent 863a2b9da7
commit bf30ca0548
2 changed files with 12 additions and 27 deletions

View File

@@ -17,7 +17,7 @@ static unsigned int g_program, g_VAO;
static GlTextureWithSize g_texture;
static GlslShader *g_glsl_shader;
static void APIENTRY MessageCallback(GLenum source,
static void GL_APIENTRY MessageCallback(GLenum source,
GLenum type,
GLuint id,
GLenum severity,

View File

@@ -26,32 +26,18 @@
#define __gltypes_h_
#define __gl_ATI_h_
#ifndef APIENTRY
#if defined(__MINGW32__)
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN 1
#endif
#ifndef NOMINMAX
#define NOMINMAX
#endif
#include <windows.h>
#elif (_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED) || defined(__BORLANDC__)
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN 1
#endif
#ifndef NOMINMAX
#define NOMINMAX
#endif
#include <windows.h>
#else
#define APIENTRY
#endif
#endif /*APIENTRY*/
#ifndef GL_APIENTRY
#if (_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED)
#define GL_APIENTRY __stdcall
#else
#define GL_APIENTRY
#endif
#endif // GL_APIENTRY
#ifndef CODEGEN_FUNCPTR
#define CODEGEN_REMOVE_FUNCPTR
#if defined(_WIN32)
#define CODEGEN_FUNCPTR APIENTRY
#define CODEGEN_FUNCPTR GL_APIENTRY
#else
#define CODEGEN_FUNCPTR
#endif
@@ -61,7 +47,6 @@
#define GLAPI extern
#endif
#ifndef GL_LOAD_GEN_BASIC_OPENGL_TYPEDEFS
#define GL_LOAD_GEN_BASIC_OPENGL_TYPEDEFS
@@ -143,9 +128,9 @@ typedef unsigned int GLhandleARB;
typedef struct __GLsync *GLsync;
struct _cl_context;
struct _cl_event;
typedef void (APIENTRY *GLDEBUGPROC)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam);
typedef void (APIENTRY *GLDEBUGPROCARB)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam);
typedef void (APIENTRY *GLDEBUGPROCAMD)(GLuint id,GLenum category,GLenum severity,GLsizei length,const GLchar *message,void *userParam);
typedef void (GL_APIENTRY *GLDEBUGPROC)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam);
typedef void (GL_APIENTRY *GLDEBUGPROCARB)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam);
typedef void (GL_APIENTRY *GLDEBUGPROCAMD)(GLuint id,GLenum category,GLenum severity,GLsizei length,const GLchar *message,void *userParam);
typedef unsigned short GLhalfNV;
typedef GLintptr GLvdpauSurfaceNV;