1 /******************************************************************************
2 * Arachnoid Graphics Plugin for Mupen64Plus
3 * http://bitbucket.org/wahrhaft/mupen64plus-video-arachnoid/
5 * Copyright (C) 2009 Jon Ring
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 2
10 * of the License, or (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 *****************************************************************************/
25 #define GL_GLEXT_PROTOTYPES
27 #if defined(__MACOSX__)
28 #include <OpenGL/gl.h>
29 #elif defined(__MACOS__)
35 #include <SDL_opengles.h>
36 #define GL_CLAMP GL_CLAMP_TO_EDGE
37 #define GL_MAX_TEXTURE_UNITS_ARB GL_MAX_TEXTURE_IMAGE_UNITS
38 #define GL_MIRRORED_REPEAT_ARB GL_MIRRORED_REPEAT_OES
39 #define GL_MIRRORED_REPEAT_IBM GL_MIRRORED_REPEAT_OES
40 #define GL_TEXTURE0_ARB GL_TEXTURE0
41 #define GL_TEXTURE1_ARB GL_TEXTURE1
42 #define GL_TEXTURE2_ARB GL_TEXTURE2
43 #define GL_TEXTURE3_ARB GL_TEXTURE3
44 #define GL_TEXTURE4_ARB GL_TEXTURE4
45 #define GL_TEXTURE5_ARB GL_TEXTURE5
46 #define GL_TEXTURE6_ARB GL_TEXTURE6
47 #define GL_TEXTURE7_ARB GL_TEXTURE7
48 #define GL_ADD_SIGNED_ARB GL_ADD_SIGNED
49 #define GL_SUBTRACT_ARB GL_SUBTRACT
50 #define GL_INTERPOLATE_ARB GL_INTERPOLATE
51 #define GL_CONSTANT_ARB GL_CONSTANT
52 #define GL_PREVIOUS_ARB GL_PREVIOUS
53 #define GL_COMBINE_ARB GL_COMBINE
54 #define GL_COMBINE_RGB_ARB GL_COMBINE_RGB
55 #define GL_COMBINE_ALPHA_ARB GL_COMBINE_ALPHA
56 #define GL_PRIMARY_COLOR_ARB GL_PRIMARY_COLOR
57 #define GL_SOURCE0_RGB_ARB GL_SRC0_RGB
58 #define GL_OPERAND0_RGB_ARB GL_OPERAND0_RGB
59 #define GL_SOURCE1_RGB_ARB GL_SRC1_RGB
60 #define GL_OPERAND1_RGB_ARB GL_OPERAND1_RGB
61 #define GL_SOURCE2_RGB_ARB GL_SRC2_RGB
62 #define GL_OPERAND2_RGB_ARB GL_OPERAND2_RGB
63 #define GL_SOURCE3_RGB_ARB GL_SRC3_RGB
64 #define GL_OPERAND3_RGB_ARB GL_OPERAND3_RGB
65 #define GL_SOURCE0_ALPHA_ARB GL_SRC0_ALPHA
66 #define GL_OPERAND0_ALPHA_ARB GL_OPERAND0_ALPHA
67 #define GL_SOURCE1_ALPHA_ARB GL_SRC1_ALPHA
68 #define GL_OPERAND1_ALPHA_ARB GL_OPERAND1_ALPHA
69 #define GL_SOURCE2_ALPHA_ARB GL_SRC2_ALPHA
70 #define GL_OPERAND2_ALPHA_ARB GL_OPERAND2_ALPHA
71 #define GL_SOURCE3_ALPHA_ARB GL_SRC3_ALPHA
72 #define GL_OPERAND3_ALPHA_ARB GL_OPERAND3_ALPHA
73 #define GL_MAX_TEXTURE_IMAGE_UNITS GL_MAX_TEXTURE_UNITS
75 #define GL_RGBA8 GL_RGBA
76 #define GL_RGB5_A1 0x8057
77 #define GL_RGBA4 0x8056
79 #define glClearDepth glClearDepthf
80 #define glDepthRange glDepthRangef
81 #define glOrtho glOrthof
83 #define glColor4fv(a) glColor4f(a[0], a[1], a[2], a[3])
85 #define glActiveTextureARB glActiveTexture
86 #define glClientActiveTextureARB glClientActiveTexture
87 #define APIENTRYP GL_API
88 #define GLdouble GLfloat
91 extern GLint glsav_col_size;
92 extern GLenum glsav_col_type;
93 extern GLsizei glsav_col_stride;
94 extern GLvoid* glsav_col_array;
96 extern GLint glsav_vtx_size;
97 extern GLenum glsav_vtx_type;
98 extern GLsizei glsav_vtx_stride;
99 extern GLvoid* glsav_vtx_array;
101 extern GLint glsav_tex_size;
102 extern GLenum glsav_tex_type;
103 extern GLsizei glsav_tex_stride;
104 extern GLvoid* glsav_tex_array;
106 extern GLint glsav_tex1_size;
107 extern GLenum glsav_tex1_type;
108 extern GLsizei glsav_tex1_stride;
109 extern GLvoid* glsav_tex1_array;
116 #include <GL/glext.h>