1 /* This Source Code Form is subject to the terms of the Mozilla Public
2  * License, v. 2.0. If a copy of the MPL was not distributed with this
3  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4 
5 typedef int8_t GLbyte;
6 typedef uint8_t GLubyte;
7 typedef int16_t GLshort;
8 typedef uint16_t GLushort;
9 typedef int32_t GLint;
10 typedef uint32_t GLuint;
11 typedef int64_t GLint64;
12 typedef uint64_t GLuint64;
13 
14 typedef float GLfloat;
15 typedef double GLdouble;
16 
17 typedef uint32_t GLenum;
18 typedef int32_t GLboolean;
19 typedef uint32_t GLbitfield;
20 
21 typedef int32_t GLsizei;
22 typedef size_t GLsizeiptr;
23 typedef intptr_t GLintptr;
24 
25 #define GL_NO_ERROR 0
26 
27 #define GL_RGBA32F 0x8814
28 #define GL_RGBA8 0x8058
29 #define GL_R8 0x8229
30 #define GL_RGBA32I 0x8D82
31 #define GL_BGRA8 0x93A1
32 
33 #define GL_BYTE 0x1400
34 #define GL_UNSIGNED_BYTE 0x1401
35 #define GL_SHORT 0x1402
36 #define GL_UNSIGNED_SHORT 0x1403
37 #define GL_INT 0x1404
38 #define GL_UNSIGNED_INT 0x1405
39 #define GL_FLOAT 0x1406
40 
41 #define GL_RED 0x1903
42 #define GL_GREEN 0x1904
43 #define GL_BLUE 0x1905
44 #define GL_ALPHA 0x1906
45 #define GL_RGB 0x1907
46 #define GL_RGBA 0x1908
47 #define GL_RGBA_INTEGER 0x8D99
48 #define GL_BGRA 0x80E1
49 
50 #define GL_DEPTH_COMPONENT 0x1902
51 #define GL_DEPTH_COMPONENT16 0x81A5
52 #define GL_DEPTH_COMPONENT24 0x81A6
53 #define GL_DEPTH_COMPONENT32 0x81A7
54 
55 #define GL_ARRAY_BUFFER 0x8892
56 #define GL_ELEMENT_ARRAY_BUFFER 0x8893
57 
58 #define GL_READ_FRAMEBUFFER 0x8CA8
59 #define GL_DRAW_FRAMEBUFFER 0x8CA9
60 #define GL_FRAMEBUFFER 0x8D40
61 #define GL_DRAW_FRAMEBUFFER_BINDING 0x8CA6
62 #define GL_READ_FRAMEBUFFER_BINDING 0x8CAA
63 #define GL_RENDERBUFFER 0x8D41
64 #define GL_COLOR_ATTACHMENT0 0x8CE0
65 #define GL_DEPTH_ATTACHMENT 0x8D00
66 #define GL_STENCIL_ATTACHMENT 0x8D20
67 #define GL_FRAMEBUFFER_COMPLETE 0x8CD5
68 #define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6
69 #define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7
70 #define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER 0x8CDB
71 #define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER 0x8CDC
72 #define GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD
73 #define GL_COLOR_BUFFER_BIT 0x00004000
74 #define GL_DEPTH_BUFFER_BIT 0x00000100
75 #define GL_STENCIL_BUFFER_BIT 0x00000400
76 
77 #define GL_PIXEL_PACK_BUFFER 0x88EB
78 #define GL_PIXEL_UNPACK_BUFFER 0x88EC
79 #define GL_PIXEL_PACK_BUFFER_BINDING 0x88ED
80 #define GL_PIXEL_UNPACK_BUFFER_BINDING 0x88EF
81 #define GL_UNPACK_ROW_LENGTH 0x0CF2
82 #define GL_UNPACK_ALIGNMENT 0x0CF5
83 
84 #define GL_QUERY_RESULT 0x8866
85 #define GL_QUERY_RESULT_AVAILABLE 0x8867
86 #define GL_TIME_ELAPSED 0x88BF
87 #define GL_SAMPLES_PASSED 0x8914
88 
89 #define GL_NEAREST 0x2600
90 #define GL_LINEAR 0x2601
91 #define GL_NEAREST_MIPMAP_NEAREST 0x2700
92 #define GL_NEAREST_MIPMAP_LINEAR 0x2702
93 #define GL_LINEAR_MIPMAP_NEAREST 0x2701
94 #define GL_LINEAR_MIPMAP_LINEAR 0x2703
95 #define GL_TEXTURE_WRAP_S 0x2802
96 #define GL_TEXTURE_WRAP_T 0x2803
97 #define GL_TEXTURE_MAG_FILTER 0x2800
98 #define GL_TEXTURE_MIN_FILTER 0x2801
99 #define GL_CLAMP_TO_EDGE 0x812F
100 #define GL_TEXTURE_2D 0x0DE1
101 #define GL_TEXTURE_3D 0x806F
102 #define GL_TEXTURE_2D_ARRAY 0x8C1A
103 #define GL_TEXTURE_RECTANGLE 0x84F5
104 #define GL_TEXTURE0 0x84C0
105 #define GL_TEXTURE1 0x84C1
106 #define GL_TEXTURE2 0x84C2
107 #define GL_TEXTURE3 0x84C3
108 #define GL_TEXTURE4 0x84C4
109 #define GL_TEXTURE5 0x84C5
110 #define GL_TEXTURE6 0x84C6
111 #define GL_TEXTURE7 0x84C7
112 #define GL_TEXTURE8 0x84C8
113 #define GL_TEXTURE9 0x84C9
114 #define GL_TEXTURE10 0x84CA
115 #define GL_TEXTURE11 0x84CB
116 #define GL_TEXTURE12 0x84CC
117 #define GL_TEXTURE13 0x84CD
118 #define GL_TEXTURE14 0x84CE
119 #define GL_TEXTURE15 0x84CF
120 #define GL_MAX_TEXTURE_UNITS 0x84E2
121 #define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872
122 #define GL_MAX_TEXTURE_SIZE 0x0D33
123 #define GL_MAX_ARRAY_TEXTURE_LAYERS 0x88FF
124 
125 #define GL_VERTEX_SHADER 0x8B31
126 #define GL_FRAGMENT_SHADER 0x8B30
127 
128 #define GL_BLEND 0x0BE2
129 #define GL_ZERO 0
130 #define GL_ONE 1
131 #define GL_SRC_COLOR 0x0300
132 #define GL_ONE_MINUS_SRC_COLOR 0x0301
133 #define GL_SRC_ALPHA 0x0302
134 #define GL_ONE_MINUS_SRC_ALPHA 0x0303
135 #define GL_DST_ALPHA 0x0304
136 #define GL_ONE_MINUS_DST_ALPHA 0x0305
137 #define GL_DST_COLOR 0x0306
138 #define GL_ONE_MINUS_DST_COLOR 0x0307
139 #define GL_CONSTANT_COLOR 0x8001
140 #define GL_ONE_MINUS_CONSTANT_COLOR 0x8002
141 #define GL_CONSTANT_ALPHA 0x8003
142 #define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004
143 #define GL_SRC1_ALPHA 0x8589
144 #define GL_SRC1_COLOR 0x88F9
145 #define GL_ONE_MINUS_SRC1_COLOR 0x88FA
146 #define GL_ONE_MINUS_SRC1_ALPHA 0x88FB
147 
148 #define GL_FUNC_ADD 0x8006
149 
150 #define GL_NEVER 0x0200
151 #define GL_LESS 0x0201
152 #define GL_EQUAL 0x0202
153 #define GL_LEQUAL 0x0203
154 #define GL_GREATER 0x0204
155 #define GL_NOTEQUAL 0x0205
156 #define GL_GEQUAL 0x0206
157 #define GL_ALWAYS 0x0207
158 #define GL_DEPTH_TEST 0x0B71
159 #define GL_DEPTH_WRITEMASK 0x0B72
160 
161 #define GL_SCISSOR_TEST 0x0C11
162 
163 #define GL_VENDOR 0x1F00
164 #define GL_RENDERER 0x1F01
165 #define GL_VERSION 0x1F02
166 #define GL_EXTENSIONS 0x1F03
167 #define GL_NUM_EXTENSIONS 0x821D
168 
169 #define GL_POINTS 0x0000
170 #define GL_LINES 0x0001
171 #define GL_LINE_LOOP 0x0002
172 #define GL_LINE_STRIP 0x0003
173 #define GL_TRIANGLES 0x0004
174 #define GL_TRIANGLE_STRIP 0x0005
175 #define GL_TRIANGLE_FAN 0x0006
176 #define GL_QUADS 0x0007
177