include/SDL_opengl.h
author Jørgen P. Tjernø <jorgen@uberent.com>
Wed, 04 Jun 2014 10:33:23 -0700
changeset 8812 b0f96c169c97
parent 8811 3f0b8a86c65b
child 8825 0cb64df3fa28
permissions -rw-r--r--
SDL_opengl: Fix Mac build for SDK 10.9 too.
slouken@214
     1
/*
slouken@5535
     2
  Simple DirectMedia Layer
slouken@8149
     3
  Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
slouken@5535
     4
slouken@5535
     5
  This software is provided 'as-is', without any express or implied
slouken@5535
     6
  warranty.  In no event will the authors be held liable for any damages
slouken@5535
     7
  arising from the use of this software.
slouken@5535
     8
slouken@5535
     9
  Permission is granted to anyone to use this software for any purpose,
slouken@5535
    10
  including commercial applications, and to alter it and redistribute it
slouken@5535
    11
  freely, subject to the following restrictions:
slouken@5535
    12
slouken@5535
    13
  1. The origin of this software must not be misrepresented; you must not
slouken@5535
    14
     claim that you wrote the original software. If you use this software
slouken@5535
    15
     in a product, an acknowledgment in the product documentation would be
slouken@5535
    16
     appreciated but is not required.
slouken@5535
    17
  2. Altered source versions must be plainly marked as such, and must not be
slouken@5535
    18
     misrepresented as being the original software.
slouken@5535
    19
  3. This notice may not be removed or altered from any source distribution.
slouken@214
    20
*/
slouken@214
    21
slouken@3407
    22
/**
slouken@3407
    23
 *  \file SDL_opengl.h
slouken@7191
    24
 *
slouken@3407
    25
 *  This is a simple file to encapsulate the OpenGL API headers.
slouken@3407
    26
 */
slouken@214
    27
slouken@3241
    28
#ifndef _SDL_opengl_h
slouken@3241
    29
#define _SDL_opengl_h
slouken@3241
    30
slouken@1402
    31
#include "SDL_config.h"
slouken@1402
    32
slouken@6044
    33
#ifndef __IPHONEOS__
slouken@6044
    34
slouken@5086
    35
#ifdef __WIN32__
slouken@8742
    36
#ifndef WIN32_LEAN_AND_MEAN
slouken@214
    37
#define WIN32_LEAN_AND_MEAN
slouken@8742
    38
#endif
slouken@725
    39
#ifndef NOMINMAX
slouken@1895
    40
#define NOMINMAX                /* Don't defined min() and max() */
slouken@725
    41
#endif
slouken@214
    42
#include <windows.h>
slouken@214
    43
#endif
icculus@5958
    44
slouken@4922
    45
#ifdef __glext_h_
slouken@4922
    46
/* Someone has already included glext.h */
slouken@4922
    47
#define NO_SDL_GLEXT
slouken@4922
    48
#endif
slouken@932
    49
#ifndef NO_SDL_GLEXT
slouken@1895
    50
#define __glext_h_              /* Don't let gl.h include glext.h */
slouken@932
    51
#endif
slouken@1424
    52
#if defined(__MACOSX__)
jorgen@8811
    53
#include <stddef.h>             /* Needed for ptrdiff_t */
jorgen@8812
    54
/* Hack to prevent duplicate definition of GLsizeiptrARB and GLintptrARB in <OpenGL/gltypes.h> */
jorgen@8812
    55
#define GL_ARB_vertex_buffer_object 1
slouken@1895
    56
#include <OpenGL/gl.h>          /* Header File For The OpenGL Library */
jorgen@8812
    57
#undef GL_ARB_vertex_buffer_object
slouken@3241
    58
#define __X_GL_H
slouken@214
    59
#else
slouken@1895
    60
#include <GL/gl.h>              /* Header File For The OpenGL Library */
slouken@932
    61
#endif
slouken@214
    62
#ifndef NO_SDL_GLEXT
slouken@214
    63
#undef __glext_h_
slouken@214
    64
#endif
slouken@214
    65
slouken@3407
    66
/**
slouken@3407
    67
 *  \file SDL_opengl.h
slouken@7191
    68
 *
slouken@3407
    69
 *  This file is included because glext.h is not available on some systems.
slouken@3407
    70
 *  If you don't want this version included, simply define ::NO_SDL_GLEXT.
slouken@7191
    71
 *
slouken@3407
    72
 *  The latest version is available from:
slouken@7191
    73
 *      http://www.opengl.org/registry/
slouken@214
    74
 */
slouken@3407
    75
slouken@3407
    76
/**
slouken@3407
    77
 *  \def NO_SDL_GLEXT
slouken@7191
    78
 *
slouken@7191
    79
 *  Define this if you have your own version of glext.h and want to disable the
slouken@3407
    80
 *  version included in SDL_opengl.h.
slouken@3407
    81
 */
slouken@3407
    82
slouken@1895
    83
#if !defined(NO_SDL_GLEXT) && !defined(GL_GLEXT_LEGACY)
jorgen@8805
    84
#include "SDL_opengl_glext.h"
slouken@214
    85
#endif /* NO_SDL_GLEXT */
slouken@3241
    86
slouken@6044
    87
#endif /* !__IPHONEOS__ */
slouken@6044
    88
slouken@3241
    89
#endif /* _SDL_opengl_h */
slouken@3241
    90
slouken@3241
    91
/* vi: set ts=4 sw=4 expandtab: */