Added missing launcher
[mupen64plus-pandora.git] / source / mupen64plus-video-arachnoid / src / OpenGL.h
CommitLineData
22726e4d 1/******************************************************************************
2 * Arachnoid Graphics Plugin for Mupen64Plus
3 * http://bitbucket.org/wahrhaft/mupen64plus-video-arachnoid/
4 *
5 * Copyright (C) 2009 Jon Ring
6 *
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.
11 *
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.
16 *
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 *****************************************************************************/
21#ifndef OPENGL_H
22#define OPENGL_H
23
24#ifndef WIN32
25 #define GL_GLEXT_PROTOTYPES
26#endif
27#if defined(__MACOSX__)
28#include <OpenGL/gl.h>
29#elif defined(__MACOS__)
30#include <gl.h>
31#else
32#ifdef HAVE_GLES
33#include <GLES/gl.h>
34#include "eglport.h"
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
74
75#define GL_RGBA8 GL_RGBA
76#define GL_RGB5_A1 0x8057
77#define GL_RGBA4 0x8056
78
79#define glClearDepth glClearDepthf
80#define glDepthRange glDepthRangef
81#define glOrtho glOrthof
82
83#define glColor4fv(a) glColor4f(a[0], a[1], a[2], a[3])
84
85#define glActiveTextureARB glActiveTexture
86#define glClientActiveTextureARB glClientActiveTexture
87#define APIENTRYP GL_API
88#define GLdouble GLfloat
89
90// save of GL Array
91extern GLint glsav_col_size;
92extern GLenum glsav_col_type;
93extern GLsizei glsav_col_stride;
94extern GLvoid* glsav_col_array;
95
96extern GLint glsav_vtx_size;
97extern GLenum glsav_vtx_type;
98extern GLsizei glsav_vtx_stride;
99extern GLvoid* glsav_vtx_array;
100
101extern GLint glsav_tex_size;
102extern GLenum glsav_tex_type;
103extern GLsizei glsav_tex_stride;
104extern GLvoid* glsav_tex_array;
105
106extern GLint glsav_tex1_size;
107extern GLenum glsav_tex1_type;
108extern GLsizei glsav_tex1_stride;
109extern GLvoid* glsav_tex1_array;
110
111#else
112#include <GL/gl.h>
113#endif
114#endif
115#ifndef WIN32
116 #include <GL/glext.h>
117#endif
118
119#endif