From 2b94829b1237e5a7947d597f945b6f248df2e4a9 Mon Sep 17 00:00:00 2001
From: Ozkan Sezer <[EMAIL REDACTED]>
Date: Fri, 18 Jun 2021 23:50:24 +0300
Subject: [PATCH] SDL_opengl.h: upgrade glext part to v40 (updates some cpp
checks.)
SDL-1.2 and sdl12-compat versions are fully in sync now.
---
include/SDL/SDL_opengl.h | 49 +++++++++++++++++++++++++---------------
1 file changed, 31 insertions(+), 18 deletions(-)
diff --git a/include/SDL/SDL_opengl.h b/include/SDL/SDL_opengl.h
index 000c873..1a33a90 100644
--- a/include/SDL/SDL_opengl.h
+++ b/include/SDL/SDL_opengl.h
@@ -23,8 +23,10 @@
functionality to let you build an SDL-1.2-based project without having the
real SDL-1.2 available to you. */
-/* This file is a verbatim copy of SDL 1.2's, the only exceptions being
-doxygen comments and MacOS Classic #include fixes - both removed here. */
+/* This file is a verbatim copy of SDL 1.2's, except for the
+ MacOS Classic include fixes being removed. */
+
+/* This is a simple file to encapsulate the OpenGL API headers */
#include "SDL_config.h"
@@ -33,27 +35,28 @@ doxygen comments and MacOS Classic #include fixes - both removed here. */
#define WIN32_LEAN_AND_MEAN
#endif
#ifndef NOMINMAX
-#define NOMINMAX /* Don't defined min() and max() */
+#define NOMINMAX /* Don't define min() and max() */
#endif
#include <windows.h>
#endif
#ifndef NO_SDL_GLEXT
-#define __glext_h_ /* Don't let gl.h include glext.h */
-#define __gl_glext_h_ /* Don't let gl.h include glext.h */
+#define __glext_h_ /* Don't let gl.h include glext.h */
+#define __gl_glext_h_ /* Don't let gl.h include glext.h */
#endif
#if defined(__MACOSX__)
-#include <OpenGL/gl.h> /* Header File For The OpenGL Library */
-#include <OpenGL/glu.h> /* Header File For The GLU Library */
+#include <OpenGL/gl.h> /* Header File For The OpenGL Library */
+#include <OpenGL/glu.h> /* Header File For The GLU Library */
#else
-#include <GL/gl.h> /* Header File For The OpenGL Library */
-#include <GL/glu.h> /* Header File For The GLU Library */
+#include <GL/gl.h> /* Header File For The OpenGL Library */
+#include <GL/glu.h> /* Header File For The GLU Library */
#endif
#ifndef NO_SDL_GLEXT
#undef __glext_h_
#undef __gl_glext_h_
#endif
-/* This is included here because glext.h is not available on some systems.
+/** glext.h
+ * This is included here because glext.h is not available on some systems.
* If you don't want this version included, simply define "NO_SDL_GLEXT"
*/
#ifndef NO_SDL_GLEXT
@@ -106,9 +109,9 @@ extern "C" {
/*************************************************************/
/* Header file version number, required by OpenGL ABI for Linux */
-/* glext.h last updated 2007/02/12 */
+/* glext.h last updated 2008/03/24 */
/* Current version at http://www.opengl.org/registry/ */
-#define GL_GLEXT_VERSION 39
+#define GL_GLEXT_VERSION 40
#ifndef GL_VERSION_1_2
#define GL_UNSIGNED_BYTE_3_3_2 0x8032
@@ -3151,8 +3154,8 @@ extern "C" {
#ifndef GL_EXT_framebuffer_blit
#define GL_READ_FRAMEBUFFER_EXT 0x8CA8
#define GL_DRAW_FRAMEBUFFER_EXT 0x8CA9
-#define GL_READ_FRAMEBUFFER_BINDING_EXT 0x8CAA
#define GL_DRAW_FRAMEBUFFER_BINDING_EXT GL_FRAMEBUFFER_BINDING_EXT
+#define GL_READ_FRAMEBUFFER_BINDING_EXT 0x8CAA
#endif
#ifndef GL_EXT_framebuffer_multisample
@@ -3439,6 +3442,9 @@ extern "C" {
#define GL_RGBA_INTEGER_MODE_EXT 0x8D9E
#endif
+#ifndef GL_GREMEDY_frame_terminator
+#endif
+
/*************************************************************/
@@ -3490,16 +3496,16 @@ typedef unsigned short GLhalfNV;
#endif
#ifndef GLEXT_64_TYPES_DEFINED
-/* This code block is duplicated in glext.h, so must be protected */
+/* This code block is duplicated in glxext.h, so must be protected */
#define GLEXT_64_TYPES_DEFINED
/* Define int32_t, int64_t, and uint64_t types for UST/MSC */
/* (as used in the GL_EXT_timer_query extension). */
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
#include <inttypes.h>
-#elif defined(__sun__)
+#elif defined(__sun__) || defined(__digital__)
#include <inttypes.h>
#if defined(__STDC__)
-#if defined(__arch64__)
+#if defined(__arch64__) || defined(_LP64)
typedef long int int64_t;
typedef unsigned long int uint64_t;
#else
@@ -3507,7 +3513,7 @@ typedef long long int int64_t;
typedef unsigned long long int uint64_t;
#endif /* __arch64__ */
#endif /* __STDC__ */
-#elif defined( __VMS )
+#elif defined( __VMS ) || defined(__sgi)
#include <inttypes.h>
#elif defined(__SCO__) || defined(__USLC__)
#include <stdint.h>
@@ -7328,6 +7334,14 @@ typedef void (APIENTRYP PFNGLCLEARCOLORIIEXTPROC) (GLint red, GLint green, GLint
typedef void (APIENTRYP PFNGLCLEARCOLORIUIEXTPROC) (GLuint red, GLuint green, GLuint blue, GLuint alpha);
#endif
+#ifndef GL_GREMEDY_frame_terminator
+#define GL_GREMEDY_frame_terminator 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glFrameTerminatorGREMEDY (void);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLFRAMETERMINATORGREMEDYPROC) (void);
+#endif
+
#ifdef __cplusplus
}
@@ -7335,4 +7349,3 @@ typedef void (APIENTRYP PFNGLCLEARCOLORIUIEXTPROC) (GLuint red, GLuint green, GL
#endif /* GL_GLEXT_LEGACY */
#endif /* NO_SDL_GLEXT */
-