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