Skip to content

Commit

Permalink
SDL_opengl.h: upgrade glext part to v40 (updates some cpp checks.)
Browse files Browse the repository at this point in the history
SDL-1.2 and sdl12-compat versions are fully in sync now.
  • Loading branch information
sezero committed Jun 18, 2021
1 parent 0da355b commit 2b94829
Showing 1 changed file with 31 additions and 18 deletions.
49 changes: 31 additions & 18 deletions include/SDL/SDL_opengl.h
Expand Up @@ -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"

Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -3439,6 +3442,9 @@ extern "C" {
#define GL_RGBA_INTEGER_MODE_EXT 0x8D9E
#endif

#ifndef GL_GREMEDY_frame_terminator
#endif


/*************************************************************/

Expand Down Expand Up @@ -3490,24 +3496,24 @@ 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
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>
Expand Down Expand Up @@ -7328,11 +7334,18 @@ 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
}
#endif

#endif /* GL_GLEXT_LEGACY */
#endif /* NO_SDL_GLEXT */

0 comments on commit 2b94829

Please sign in to comment.