UFO: Alien Invasion
r_gles_android.h
Go to the documentation of this file.
1 
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.
15 
16 See the GNU General Public License for more details.
17 
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21 
22 */
23 
24 #pragma once
25 
26 #include <GLES/gl.h>
27 #include <GLES/glext.h>
28 
29 #ifndef APIENTRY
30 #define APIENTRY
31 #endif
32 
33 #define GL_FRAMEBUFFER_EXT GL_FRAMEBUFFER_OES
34 #define GL_FRAMEBUFFER_COMPLETE_EXT GL_FRAMEBUFFER_COMPLETE_OES
35 #define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_OES
36 #define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_OES
37 #define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_OES
38 #define GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT GL_FRAMEBUFFER_INCOMPLETE_FORMATS_OES
39 #define GL_INVALID_FRAMEBUFFER_OPERATION_EXT GL_INVALID_FRAMEBUFFER_OPERATION_OES
40 #define GL_FRAMEBUFFER_UNSUPPORTED_EXT GL_FRAMEBUFFER_UNSUPPORTED_OES
41 #define GL_FRAMEBUFFER_BINDING_EXT GL_FRAMEBUFFER_BINDING_OES
42 #define GL_RENDERBUFFER_EXT GL_RENDERBUFFER_OES
43 #define GL_MAX_RENDERBUFFER_SIZE_EXT GL_MAX_RENDERBUFFER_SIZE_OES
44 #define GL_COLOR_ATTACHMENT0_EXT GL_COLOR_ATTACHMENT0_OES
45 #define GL_DEPTH_ATTACHMENT_EXT GL_DEPTH_ATTACHMENT_OES
46 #define GL_DEPTH_COMPONENT GL_DEPTH_COMPONENT16_OES
47 #define GL_SOURCE0_RGB GL_SRC0_RGB
48 #define GL_SOURCE1_RGB GL_SRC1_RGB
49 #define GL_SOURCE2_RGB GL_SRC2_RGB
50 #define GL_SOURCE0_ALPHA GL_SRC0_ALPHA
51 #define GL_SOURCE1_ALPHA GL_SRC1_ALPHA
52 #define GL_SOURCE2_ALPHA GL_SRC2_ALPHA
53 
54 #ifndef GL_CLAMP
55 #define GL_CLAMP GL_CLAMP_TO_EDGE /* Not exactly GL_CLAMP but very close */
56 #endif
57 
58 #define glTranslated( X, Y, Z ) glTranslatex( (X)*0x10000, (Y)*0x10000, (Z)*0x10000 )
59 
60 /* GLES 2 defines for shaders */
61 #define GL_COMPILE_STATUS 0x8B81
62 #define GL_LINK_STATUS 0x8B82
63 #define GL_FRAGMENT_SHADER 0x8B30
64 #define GL_VERTEX_SHADER 0x8B31
65 #define GL_SHADING_LANGUAGE_VERSION 0x8B8C
66 #define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C
67 #define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS
68 #define GL_MAX_VERTEX_ATTRIBS 0x8869
69 #define GL_MAX_TEXTURE_COORDS GL_MAX_TEXTURE_UNITS
70 #define GL_MAX_VARYING_VECTORS 0x8DFC
71 #define GL_MAX_FRAGMENT_UNIFORM_VECTORS 0x8DFD
72 #define GL_MAX_VERTEX_UNIFORM_VECTORS 0x8DFB