include/SDL_opengl.h
changeset 214 0e5d6dd77bda
child 242 4bcb29d3769c
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/include/SDL_opengl.h	Thu Oct 25 05:37:32 2001 +0000
     1.3 @@ -0,0 +1,307 @@
     1.4 +/*
     1.5 +    SDL - Simple DirectMedia Layer
     1.6 +    Copyright (C) 1997, 1998, 1999, 2000, 2001  Sam Lantinga
     1.7 +
     1.8 +    This library is free software; you can redistribute it and/or
     1.9 +    modify it under the terms of the GNU Library General Public
    1.10 +    License as published by the Free Software Foundation; either
    1.11 +    version 2 of the License, or (at your option) any later version.
    1.12 +
    1.13 +    This library is distributed in the hope that it will be useful,
    1.14 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
    1.15 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    1.16 +    Library General Public License for more details.
    1.17 +
    1.18 +    You should have received a copy of the GNU Library General Public
    1.19 +    License along with this library; if not, write to the Free
    1.20 +    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    1.21 +
    1.22 +    Sam Lantinga
    1.23 +    slouken@devolution.com
    1.24 +*/
    1.25 +
    1.26 +#ifdef SAVE_RCSID
    1.27 +static char rcsid =
    1.28 + "@(#) $Id$";
    1.29 +#endif
    1.30 +
    1.31 +/* This is a simple file to encapsulate the OpenGL API headers */
    1.32 +
    1.33 +#ifdef WIN32
    1.34 +#define WIN32_LEAN_AND_MEAN
    1.35 +#include <windows.h>
    1.36 +#endif
    1.37 +#if defined(__APPLE__) && defined(__MACH__)
    1.38 +#include <OpenGL/gl.h>	/* Header File For The OpenGL Library */
    1.39 +#include <OpenGL/glu.h>	/* Header File For The GLU Library */
    1.40 +#else
    1.41 +#ifndef NO_SDL_GLEXT
    1.42 +#define __glext_h_  /* Don't let gl.h include glext.h */
    1.43 +#endif
    1.44 +#include <GL/gl.h>	/* Header File For The OpenGL Library */
    1.45 +#include <GL/glu.h>	/* Header File For The GLU Library */
    1.46 +#ifndef NO_SDL_GLEXT
    1.47 +#undef __glext_h_
    1.48 +#endif
    1.49 +#endif
    1.50 +
    1.51 +/* This file taken from "GLext.h" from the Jeff Molofee OpenGL tutorials.
    1.52 +   It is included here because glext.h is not available on some systems.
    1.53 +   If you don't want this version included, simply define "NO_SDL_GLEXT"
    1.54 + */
    1.55 +#ifndef NO_SDL_GLEXT
    1.56 +#ifndef __glext_h_
    1.57 +#define __glext_h_
    1.58 +
    1.59 +#ifdef __cplusplus
    1.60 +extern "C" {
    1.61 +#endif
    1.62 +
    1.63 +#ifndef APIENTRY
    1.64 +#define APIENTRY
    1.65 +#endif
    1.66 +
    1.67 +/*
    1.68 +** Copyright 1992-1999 Silicon Graphics, Inc.
    1.69 +** All Rights Reserved.
    1.70 +**
    1.71 +** This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
    1.72 +** the contents of this file may not be disclosed to third parties, copied or
    1.73 +** duplicated in any form, in whole or in part, without the prior written
    1.74 +** permission of Silicon Graphics, Inc.
    1.75 +**
    1.76 +** RESTRICTED RIGHTS LEGEND:
    1.77 +** Use, duplication or disclosure by the Government is subject to restrictions
    1.78 +** as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
    1.79 +** and Computer Software clause at DFARS 252.227-7013, and/or in similar or
    1.80 +** successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
    1.81 +** rights reserved under the Copyright Laws of the United States.
    1.82 +*/
    1.83 +
    1.84 +#define GL_ARB_multitexture                 1
    1.85 +#define GL_EXT_abgr                         1
    1.86 +#define GL_EXT_bgra                         1
    1.87 +#define GL_EXT_clip_volume_hint             1
    1.88 +#define GL_EXT_compiled_vertex_array        1
    1.89 +#define GL_EXT_cull_vertex                  1
    1.90 +#define GL_EXT_packed_pixels                1
    1.91 +#define GL_EXT_point_parameters             1
    1.92 +#define GL_EXT_stencil_wrap                 1
    1.93 +#define GL_EXT_texture_env_add              1
    1.94 +#define GL_EXT_texture_env_combine          1
    1.95 +#define GL_EXT_vertex_array                 1
    1.96 +#define GL_NV_texgen_reflection             1
    1.97 +#define GL_NV_texture_env_combine4          1
    1.98 +#define GL_WIN_swap_hint                    1
    1.99 +
   1.100 +/* EXT_abgr */
   1.101 +#define GL_ABGR_EXT                         0x8000
   1.102 +
   1.103 +/* EXT_packed_pixels */
   1.104 +#define GL_UNSIGNED_BYTE_3_3_2_EXT          0x8032
   1.105 +#define GL_UNSIGNED_SHORT_4_4_4_4_EXT       0x8033
   1.106 +#define GL_UNSIGNED_SHORT_5_5_5_1_EXT       0x8034
   1.107 +#define GL_UNSIGNED_INT_8_8_8_8_EXT         0x8035
   1.108 +#define GL_UNSIGNED_INT_10_10_10_2_EXT      0x8036
   1.109 +
   1.110 +/* EXT_vertex_array */
   1.111 +#define GL_VERTEX_ARRAY_EXT                 0x8074
   1.112 +#define GL_NORMAL_ARRAY_EXT                 0x8075
   1.113 +#define GL_COLOR_ARRAY_EXT                  0x8076
   1.114 +#define GL_INDEX_ARRAY_EXT                  0x8077
   1.115 +#define GL_TEXTURE_COORD_ARRAY_EXT          0x8078
   1.116 +#define GL_EDGE_FLAG_ARRAY_EXT              0x8079
   1.117 +#define GL_VERTEX_ARRAY_SIZE_EXT            0x807A
   1.118 +#define GL_VERTEX_ARRAY_TYPE_EXT            0x807B
   1.119 +#define GL_VERTEX_ARRAY_STRIDE_EXT          0x807C
   1.120 +#define GL_VERTEX_ARRAY_COUNT_EXT           0x807D
   1.121 +#define GL_NORMAL_ARRAY_TYPE_EXT            0x807E
   1.122 +#define GL_NORMAL_ARRAY_STRIDE_EXT          0x807F
   1.123 +#define GL_NORMAL_ARRAY_COUNT_EXT           0x8080
   1.124 +#define GL_COLOR_ARRAY_SIZE_EXT             0x8081
   1.125 +#define GL_COLOR_ARRAY_TYPE_EXT             0x8082
   1.126 +#define GL_COLOR_ARRAY_STRIDE_EXT           0x8083
   1.127 +#define GL_COLOR_ARRAY_COUNT_EXT            0x8084
   1.128 +#define GL_INDEX_ARRAY_TYPE_EXT             0x8085
   1.129 +#define GL_INDEX_ARRAY_STRIDE_EXT           0x8086
   1.130 +#define GL_INDEX_ARRAY_COUNT_EXT            0x8087
   1.131 +#define GL_TEXTURE_COORD_ARRAY_SIZE_EXT     0x8088
   1.132 +#define GL_TEXTURE_COORD_ARRAY_TYPE_EXT     0x8089
   1.133 +#define GL_TEXTURE_COORD_ARRAY_STRIDE_EXT   0x808A
   1.134 +#define GL_TEXTURE_COORD_ARRAY_COUNT_EXT    0x808B
   1.135 +#define GL_EDGE_FLAG_ARRAY_STRIDE_EXT       0x808C
   1.136 +#define GL_EDGE_FLAG_ARRAY_COUNT_EXT        0x808D
   1.137 +#define GL_VERTEX_ARRAY_POINTER_EXT         0x808E
   1.138 +#define GL_NORMAL_ARRAY_POINTER_EXT         0x808F
   1.139 +#define GL_COLOR_ARRAY_POINTER_EXT          0x8090
   1.140 +#define GL_INDEX_ARRAY_POINTER_EXT          0x8091
   1.141 +#define GL_TEXTURE_COORD_ARRAY_POINTER_EXT  0x8092
   1.142 +#define GL_EDGE_FLAG_ARRAY_POINTER_EXT      0x8093
   1.143 +
   1.144 +/* EXT_bgra */
   1.145 +#define GL_BGR_EXT                          0x80E0
   1.146 +#define GL_BGRA_EXT                         0x80E1
   1.147 +
   1.148 +/* EXT_clip_volume_hint */
   1.149 +#define GL_CLIP_VOLUME_CLIPPING_HINT_EXT    0x80F0
   1.150 +
   1.151 +/* EXT_point_parameters */
   1.152 +#define GL_POINT_SIZE_MIN_EXT               0x8126
   1.153 +#define GL_POINT_SIZE_MAX_EXT               0x8127
   1.154 +#define GL_POINT_FADE_THRESHOLD_SIZE_EXT    0x8128
   1.155 +#define GL_DISTANCE_ATTENUATION_EXT         0x8129
   1.156 +
   1.157 +/* EXT_compiled_vertex_array */
   1.158 +#define GL_ARRAY_ELEMENT_LOCK_FIRST_EXT     0x81A8
   1.159 +#define GL_ARRAY_ELEMENT_LOCK_COUNT_EXT     0x81A9
   1.160 +
   1.161 +/* EXT_cull_vertex */
   1.162 +#define GL_CULL_VERTEX_EXT                  0x81AA
   1.163 +#define GL_CULL_VERTEX_EYE_POSITION_EXT     0x81AB
   1.164 +#define GL_CULL_VERTEX_OBJECT_POSITION_EXT  0x81AC
   1.165 +
   1.166 +/* ARB_multitexture */
   1.167 +#define GL_ACTIVE_TEXTURE_ARB               0x84E0
   1.168 +#define GL_CLIENT_ACTIVE_TEXTURE_ARB        0x84E1
   1.169 +#define GL_MAX_TEXTURE_UNITS_ARB            0x84E2
   1.170 +#define GL_TEXTURE0_ARB                     0x84C0
   1.171 +#define GL_TEXTURE1_ARB                     0x84C1
   1.172 +#define GL_TEXTURE2_ARB                     0x84C2
   1.173 +#define GL_TEXTURE3_ARB                     0x84C3
   1.174 +#define GL_TEXTURE4_ARB                     0x84C4
   1.175 +#define GL_TEXTURE5_ARB                     0x84C5
   1.176 +#define GL_TEXTURE6_ARB                     0x84C6
   1.177 +#define GL_TEXTURE7_ARB                     0x84C7
   1.178 +#define GL_TEXTURE8_ARB                     0x84C8
   1.179 +#define GL_TEXTURE9_ARB                     0x84C9
   1.180 +#define GL_TEXTURE10_ARB                    0x84CA
   1.181 +#define GL_TEXTURE11_ARB                    0x84CB
   1.182 +#define GL_TEXTURE12_ARB                    0x84CC
   1.183 +#define GL_TEXTURE13_ARB                    0x84CD
   1.184 +#define GL_TEXTURE14_ARB                    0x84CE
   1.185 +#define GL_TEXTURE15_ARB                    0x84CF
   1.186 +#define GL_TEXTURE16_ARB                    0x84D0
   1.187 +#define GL_TEXTURE17_ARB                    0x84D1
   1.188 +#define GL_TEXTURE18_ARB                    0x84D2
   1.189 +#define GL_TEXTURE19_ARB                    0x84D3
   1.190 +#define GL_TEXTURE20_ARB                    0x84D4
   1.191 +#define GL_TEXTURE21_ARB                    0x84D5
   1.192 +#define GL_TEXTURE22_ARB                    0x84D6
   1.193 +#define GL_TEXTURE23_ARB                    0x84D7
   1.194 +#define GL_TEXTURE24_ARB                    0x84D8
   1.195 +#define GL_TEXTURE25_ARB                    0x84D9
   1.196 +#define GL_TEXTURE26_ARB                    0x84DA
   1.197 +#define GL_TEXTURE27_ARB                    0x84DB
   1.198 +#define GL_TEXTURE28_ARB                    0x84DC
   1.199 +#define GL_TEXTURE29_ARB                    0x84DD
   1.200 +#define GL_TEXTURE30_ARB                    0x84DE
   1.201 +#define GL_TEXTURE31_ARB                    0x84DF
   1.202 +
   1.203 +/* EXT_stencil_wrap */
   1.204 +#define GL_INCR_WRAP_EXT                    0x8507
   1.205 +#define GL_DECR_WRAP_EXT                    0x8508
   1.206 +
   1.207 +/* NV_texgen_reflection */
   1.208 +#define GL_NORMAL_MAP_NV                    0x8511
   1.209 +#define GL_REFLECTION_MAP_NV                0x8512
   1.210 +
   1.211 +/* EXT_texture_env_combine */
   1.212 +#define GL_COMBINE_EXT                      0x8570
   1.213 +#define GL_COMBINE_RGB_EXT                  0x8571
   1.214 +#define GL_COMBINE_ALPHA_EXT                0x8572
   1.215 +#define GL_RGB_SCALE_EXT                    0x8573
   1.216 +#define GL_ADD_SIGNED_EXT                   0x8574
   1.217 +#define GL_INTERPOLATE_EXT                  0x8575
   1.218 +#define GL_CONSTANT_EXT                     0x8576
   1.219 +#define GL_PRIMARY_COLOR_EXT                0x8577
   1.220 +#define GL_PREVIOUS_EXT                     0x8578
   1.221 +#define GL_SOURCE0_RGB_EXT                  0x8580
   1.222 +#define GL_SOURCE1_RGB_EXT                  0x8581
   1.223 +#define GL_SOURCE2_RGB_EXT                  0x8582
   1.224 +#define GL_SOURCE0_ALPHA_EXT                0x8588
   1.225 +#define GL_SOURCE1_ALPHA_EXT                0x8589
   1.226 +#define GL_SOURCE2_ALPHA_EXT                0x858A
   1.227 +#define GL_OPERAND0_RGB_EXT                 0x8590
   1.228 +#define GL_OPERAND1_RGB_EXT                 0x8591
   1.229 +#define GL_OPERAND2_RGB_EXT                 0x8592
   1.230 +#define GL_OPERAND0_ALPHA_EXT               0x8598
   1.231 +#define GL_OPERAND1_ALPHA_EXT               0x8599
   1.232 +#define GL_OPERAND2_ALPHA_EXT               0x859A
   1.233 +
   1.234 +/* NV_texture_env_combine4 */
   1.235 +#define GL_COMBINE4_NV                      0x8503
   1.236 +#define GL_SOURCE3_RGB_NV                   0x8583
   1.237 +#define GL_SOURCE3_ALPHA_NV                 0x858B
   1.238 +#define GL_OPERAND3_RGB_NV                  0x8593
   1.239 +#define GL_OPERAND3_ALPHA_NV                0x859B
   1.240 +
   1.241 +/*************************************************************/
   1.242 +
   1.243 +/* EXT_vertex_array */
   1.244 +typedef void (APIENTRY * PFNGLARRAYELEMENTEXTPROC) (GLint i);
   1.245 +typedef void (APIENTRY * PFNGLCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
   1.246 +typedef void (APIENTRY * PFNGLDRAWARRAYSEXTPROC) (GLenum mode, GLint first, GLsizei count);
   1.247 +typedef void (APIENTRY * PFNGLEDGEFLAGPOINTEREXTPROC) (GLsizei stride, GLsizei count, const GLboolean *pointer);
   1.248 +typedef void (APIENTRY * PFNGLGETPOINTERVEXTPROC) (GLenum pname, GLvoid* *params);
   1.249 +typedef void (APIENTRY * PFNGLINDEXPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
   1.250 +typedef void (APIENTRY * PFNGLNORMALPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
   1.251 +typedef void (APIENTRY * PFNGLTEXCOORDPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
   1.252 +typedef void (APIENTRY * PFNGLVERTEXPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
   1.253 +
   1.254 +/* ARB_multitexture */
   1.255 +typedef void (APIENTRY * PFNGLMULTITEXCOORD1DARBPROC) (GLenum target, GLdouble s);
   1.256 +typedef void (APIENTRY * PFNGLMULTITEXCOORD1DVARBPROC) (GLenum target, const GLdouble *v);
   1.257 +typedef void (APIENTRY * PFNGLMULTITEXCOORD1FARBPROC) (GLenum target, GLfloat s);
   1.258 +typedef void (APIENTRY * PFNGLMULTITEXCOORD1FVARBPROC) (GLenum target, const GLfloat *v);
   1.259 +typedef void (APIENTRY * PFNGLMULTITEXCOORD1IARBPROC) (GLenum target, GLint s);
   1.260 +typedef void (APIENTRY * PFNGLMULTITEXCOORD1IVARBPROC) (GLenum target, const GLint *v);
   1.261 +typedef void (APIENTRY * PFNGLMULTITEXCOORD1SARBPROC) (GLenum target, GLshort s);
   1.262 +typedef void (APIENTRY * PFNGLMULTITEXCOORD1SVARBPROC) (GLenum target, const GLshort *v);
   1.263 +typedef void (APIENTRY * PFNGLMULTITEXCOORD2DARBPROC) (GLenum target, GLdouble s, GLdouble t);
   1.264 +typedef void (APIENTRY * PFNGLMULTITEXCOORD2DVARBPROC) (GLenum target, const GLdouble *v);
   1.265 +typedef void (APIENTRY * PFNGLMULTITEXCOORD2FARBPROC) (GLenum target, GLfloat s, GLfloat t);
   1.266 +typedef void (APIENTRY * PFNGLMULTITEXCOORD2FVARBPROC) (GLenum target, const GLfloat *v);
   1.267 +typedef void (APIENTRY * PFNGLMULTITEXCOORD2IARBPROC) (GLenum target, GLint s, GLint t);
   1.268 +typedef void (APIENTRY * PFNGLMULTITEXCOORD2IVARBPROC) (GLenum target, const GLint *v);
   1.269 +typedef void (APIENTRY * PFNGLMULTITEXCOORD2SARBPROC) (GLenum target, GLshort s, GLshort t);
   1.270 +typedef void (APIENTRY * PFNGLMULTITEXCOORD2SVARBPROC) (GLenum target, const GLshort *v);
   1.271 +typedef void (APIENTRY * PFNGLMULTITEXCOORD3DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r);
   1.272 +typedef void (APIENTRY * PFNGLMULTITEXCOORD3DVARBPROC) (GLenum target, const GLdouble *v);
   1.273 +typedef void (APIENTRY * PFNGLMULTITEXCOORD3FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r);
   1.274 +typedef void (APIENTRY * PFNGLMULTITEXCOORD3FVARBPROC) (GLenum target, const GLfloat *v);
   1.275 +typedef void (APIENTRY * PFNGLMULTITEXCOORD3IARBPROC) (GLenum target, GLint s, GLint t, GLint r);
   1.276 +typedef void (APIENTRY * PFNGLMULTITEXCOORD3IVARBPROC) (GLenum target, const GLint *v);
   1.277 +typedef void (APIENTRY * PFNGLMULTITEXCOORD3SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r);
   1.278 +typedef void (APIENTRY * PFNGLMULTITEXCOORD3SVARBPROC) (GLenum target, const GLshort *v);
   1.279 +typedef void (APIENTRY * PFNGLMULTITEXCOORD4DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
   1.280 +typedef void (APIENTRY * PFNGLMULTITEXCOORD4DVARBPROC) (GLenum target, const GLdouble *v);
   1.281 +typedef void (APIENTRY * PFNGLMULTITEXCOORD4FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
   1.282 +typedef void (APIENTRY * PFNGLMULTITEXCOORD4FVARBPROC) (GLenum target, const GLfloat *v);
   1.283 +typedef void (APIENTRY * PFNGLMULTITEXCOORD4IARBPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q);
   1.284 +typedef void (APIENTRY * PFNGLMULTITEXCOORD4IVARBPROC) (GLenum target, const GLint *v);
   1.285 +typedef void (APIENTRY * PFNGLMULTITEXCOORD4SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
   1.286 +typedef void (APIENTRY * PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLshort *v);
   1.287 +typedef void (APIENTRY * PFNGLACTIVETEXTUREARBPROC) (GLenum target);
   1.288 +typedef void (APIENTRY * PFNGLCLIENTACTIVETEXTUREARBPROC) (GLenum target);
   1.289 +
   1.290 +/* EXT_compiled_vertex_array */
   1.291 +typedef void (APIENTRY * PFNGLLOCKARRAYSEXTPROC) (GLint first, GLsizei count);
   1.292 +typedef void (APIENTRY * PFNGLUNLOCKARRAYSEXTPROC) (void);
   1.293 +
   1.294 +/* EXT_cull_vertex */
   1.295 +typedef void (APIENTRY * PFNGLCULLPARAMETERDVEXTPROC) (GLenum pname, GLdouble* params);
   1.296 +typedef void (APIENTRY * PFNGLCULLPARAMETERFVEXTPROC) (GLenum pname, GLfloat* params);
   1.297 +
   1.298 +/* WIN_swap_hint */
   1.299 +typedef void (APIENTRY * PFNGLADDSWAPHINTRECTWINPROC) (GLint x, GLint y, GLsizei width, GLsizei height);
   1.300 +
   1.301 +/* EXT_point_parameter */
   1.302 +typedef void (APIENTRY * PFNGLPOINTPARAMETERFEXTPROC) (GLenum pname, GLfloat param);
   1.303 +typedef void (APIENTRY * PFNGLPOINTPARAMETERFVEXTPROC) (GLenum pname, const GLfloat *params);
   1.304 +
   1.305 +#ifdef __cplusplus
   1.306 +}
   1.307 +#endif
   1.308 +
   1.309 +#endif /* __glext_h_ */
   1.310 +#endif /* NO_SDL_GLEXT */