|
1 |
|
2 {$mode objfpc} |
|
3 unit gles11; |
|
4 interface |
|
5 |
|
6 { |
|
7 Automatically converted by H2Pas 1.0.0 from gl.hh |
|
8 The following command line parameters were used: |
|
9 -P |
|
10 -l |
|
11 GLESv1_CM |
|
12 -o |
|
13 gles11.pp |
|
14 -D |
|
15 gl.hh |
|
16 } |
|
17 |
|
18 procedure init; |
|
19 |
|
20 const |
|
21 External_library='GLESv1_CM'; {Setup as you need} |
|
22 |
|
23 Type |
|
24 |
|
25 // khronos_int32_t = int32_t; |
|
26 // khronos_uint32_t = uint32_t; |
|
27 // khronos_int64_t = int64_t; |
|
28 // khronos_uint64_t = uint64_t; |
|
29 |
|
30 khronos_int32_t = longint; |
|
31 khronos_uint32_t = longword; |
|
32 khronos_int64_t = Int64; |
|
33 khronos_uint64_t = QWord; |
|
34 khronos_int8_t = char; |
|
35 khronos_uint8_t = byte; |
|
36 khronos_int16_t = smallint; |
|
37 khronos_uint16_t = word; |
|
38 khronos_intptr_t = longint; |
|
39 khronos_uintptr_t = dword; |
|
40 khronos_ssize_t = longint; |
|
41 khronos_usize_t = dword; |
|
42 khronos_float_t = single; |
|
43 |
|
44 GLvoid = pointer; |
|
45 GLenum = dword; |
|
46 GLboolean = byte; |
|
47 GLbitfield = dword; |
|
48 GLshort = smallint; |
|
49 GLint = longint; |
|
50 GLsizei = longint; |
|
51 GLushort = word; |
|
52 GLuint = dword; |
|
53 |
|
54 GLbyte = khronos_int8_t; |
|
55 GLubyte = khronos_uint8_t; |
|
56 GLfloat = khronos_float_t; |
|
57 GLclampf = khronos_float_t; |
|
58 GLfixed = khronos_int32_t; |
|
59 GLclampx = khronos_int32_t; |
|
60 GLintptr = khronos_intptr_t; |
|
61 GLsizeiptr = khronos_ssize_t; |
|
62 |
|
63 PGLboolean = ^GLboolean; |
|
64 PGLfixed = ^GLfixed; |
|
65 PGLfloat = ^GLfloat; |
|
66 PGLint = ^GLint; |
|
67 PGLuint = ^GLuint; |
|
68 PGLvoid = ^GLvoid; |
|
69 PGLubyte = ^GLubyte; |
|
70 {$IFDEF FPC} |
|
71 {$PACKRECORDS C} |
|
72 {$ENDIF} |
|
73 |
|
74 const |
|
75 // GL_API = KHRONOS_APICALL; |
|
76 {$define KHRONOS_APIENTRY} |
|
77 GL_DIRECT_TEXTURE_2D_QUALCOMM = $7E80; |
|
78 |
|
79 {*********************************************************** } |
|
80 { OpenGL ES core versions } |
|
81 |
|
82 const |
|
83 GL_VERSION_ES_CM_1_0 = 1; |
|
84 GL_VERSION_ES_CL_1_0 = 1; |
|
85 GL_VERSION_ES_CM_1_1 = 1; |
|
86 GL_VERSION_ES_CL_1_1 = 1; |
|
87 { ClearBufferMask } |
|
88 GL_DEPTH_BUFFER_BIT = $00000100; |
|
89 GL_STENCIL_BUFFER_BIT = $00000400; |
|
90 GL_COLOR_BUFFER_BIT = $00004000; |
|
91 { Boolean } |
|
92 GL_FALSE = 0; |
|
93 GL_TRUE = 1; |
|
94 { BeginMode } |
|
95 GL_POINTS = $0000; |
|
96 GL_LINES = $0001; |
|
97 GL_LINE_LOOP = $0002; |
|
98 GL_LINE_STRIP = $0003; |
|
99 GL_TRIANGLES = $0004; |
|
100 GL_TRIANGLE_STRIP = $0005; |
|
101 GL_TRIANGLE_FAN = $0006; |
|
102 { AlphaFunction } |
|
103 GL_NEVER = $0200; |
|
104 GL_LESS = $0201; |
|
105 GL_EQUAL = $0202; |
|
106 GL_LEQUAL = $0203; |
|
107 GL_GREATER = $0204; |
|
108 GL_NOTEQUAL = $0205; |
|
109 GL_GEQUAL = $0206; |
|
110 GL_ALWAYS = $0207; |
|
111 { BlendingFactorDest } |
|
112 GL_ZERO = 0; |
|
113 GL_ONE = 1; |
|
114 GL_SRC_COLOR = $0300; |
|
115 GL_ONE_MINUS_SRC_COLOR = $0301; |
|
116 GL_SRC_ALPHA = $0302; |
|
117 GL_ONE_MINUS_SRC_ALPHA = $0303; |
|
118 GL_DST_ALPHA = $0304; |
|
119 GL_ONE_MINUS_DST_ALPHA = $0305; |
|
120 { BlendingFactorSrc } |
|
121 { GL_ZERO } |
|
122 { GL_ONE } |
|
123 GL_DST_COLOR = $0306; |
|
124 GL_ONE_MINUS_DST_COLOR = $0307; |
|
125 GL_SRC_ALPHA_SATURATE = $0308; |
|
126 { GL_SRC_ALPHA } |
|
127 { GL_ONE_MINUS_SRC_ALPHA } |
|
128 { GL_DST_ALPHA } |
|
129 { GL_ONE_MINUS_DST_ALPHA } |
|
130 { ClipPlaneName } |
|
131 GL_CLIP_PLANE0 = $3000; |
|
132 GL_CLIP_PLANE1 = $3001; |
|
133 GL_CLIP_PLANE2 = $3002; |
|
134 GL_CLIP_PLANE3 = $3003; |
|
135 GL_CLIP_PLANE4 = $3004; |
|
136 GL_CLIP_PLANE5 = $3005; |
|
137 { ColorMaterialFace } |
|
138 { GL_FRONT_AND_BACK } |
|
139 { ColorMaterialParameter } |
|
140 { GL_AMBIENT_AND_DIFFUSE } |
|
141 { ColorPointerType } |
|
142 { GL_UNSIGNED_BYTE } |
|
143 { GL_FLOAT } |
|
144 { GL_FIXED } |
|
145 { CullFaceMode } |
|
146 GL_FRONT = $0404; |
|
147 GL_BACK = $0405; |
|
148 GL_FRONT_AND_BACK = $0408; |
|
149 { DepthFunction } |
|
150 { GL_NEVER } |
|
151 { GL_LESS } |
|
152 { GL_EQUAL } |
|
153 { GL_LEQUAL } |
|
154 { GL_GREATER } |
|
155 { GL_NOTEQUAL } |
|
156 { GL_GEQUAL } |
|
157 { GL_ALWAYS } |
|
158 { EnableCap } |
|
159 GL_FOG = $0B60; |
|
160 GL_LIGHTING = $0B50; |
|
161 GL_TEXTURE_2D = $0DE1; |
|
162 GL_CULL_FACE = $0B44; |
|
163 GL_ALPHA_TEST = $0BC0; |
|
164 GL_BLEND = $0BE2; |
|
165 GL_COLOR_LOGIC_OP = $0BF2; |
|
166 GL_DITHER = $0BD0; |
|
167 GL_STENCIL_TEST = $0B90; |
|
168 GL_DEPTH_TEST = $0B71; |
|
169 { GL_LIGHT0 } |
|
170 { GL_LIGHT1 } |
|
171 { GL_LIGHT2 } |
|
172 { GL_LIGHT3 } |
|
173 { GL_LIGHT4 } |
|
174 { GL_LIGHT5 } |
|
175 { GL_LIGHT6 } |
|
176 { GL_LIGHT7 } |
|
177 GL_POINT_SMOOTH = $0B10; |
|
178 GL_LINE_SMOOTH = $0B20; |
|
179 GL_SCISSOR_TEST = $0C11; |
|
180 GL_COLOR_MATERIAL = $0B57; |
|
181 GL_NORMALIZE = $0BA1; |
|
182 GL_RESCALE_NORMAL = $803A; |
|
183 GL_POLYGON_OFFSET_FILL = $8037; |
|
184 GL_VERTEX_ARRAY = $8074; |
|
185 GL_NORMAL_ARRAY = $8075; |
|
186 GL_COLOR_ARRAY = $8076; |
|
187 GL_TEXTURE_COORD_ARRAY = $8078; |
|
188 GL_MULTISAMPLE = $809D; |
|
189 GL_SAMPLE_ALPHA_TO_COVERAGE = $809E; |
|
190 GL_SAMPLE_ALPHA_TO_ONE = $809F; |
|
191 GL_SAMPLE_COVERAGE = $80A0; |
|
192 { ErrorCode } |
|
193 GL_NO_ERROR = 0; |
|
194 GL_INVALID_ENUM = $0500; |
|
195 GL_INVALID_VALUE = $0501; |
|
196 GL_INVALID_OPERATION = $0502; |
|
197 GL_STACK_OVERFLOW = $0503; |
|
198 GL_STACK_UNDERFLOW = $0504; |
|
199 GL_OUT_OF_MEMORY = $0505; |
|
200 { FogMode } |
|
201 { GL_LINEAR } |
|
202 GL_EXP = $0800; |
|
203 GL_EXP2 = $0801; |
|
204 { FogParameter } |
|
205 GL_FOG_DENSITY = $0B62; |
|
206 GL_FOG_START = $0B63; |
|
207 GL_FOG_END = $0B64; |
|
208 GL_FOG_MODE = $0B65; |
|
209 GL_FOG_COLOR = $0B66; |
|
210 { FrontFaceDirection } |
|
211 GL_CW = $0900; |
|
212 GL_CCW = $0901; |
|
213 { GetPName } |
|
214 GL_CURRENT_COLOR = $0B00; |
|
215 GL_CURRENT_NORMAL = $0B02; |
|
216 GL_CURRENT_TEXTURE_COORDS = $0B03; |
|
217 GL_POINT_SIZE = $0B11; |
|
218 GL_POINT_SIZE_MIN = $8126; |
|
219 GL_POINT_SIZE_MAX = $8127; |
|
220 GL_POINT_FADE_THRESHOLD_SIZE = $8128; |
|
221 GL_POINT_DISTANCE_ATTENUATION = $8129; |
|
222 GL_SMOOTH_POINT_SIZE_RANGE = $0B12; |
|
223 GL_LINE_WIDTH = $0B21; |
|
224 GL_SMOOTH_LINE_WIDTH_RANGE = $0B22; |
|
225 GL_ALIASED_POINT_SIZE_RANGE = $846D; |
|
226 GL_ALIASED_LINE_WIDTH_RANGE = $846E; |
|
227 GL_CULL_FACE_MODE = $0B45; |
|
228 GL_FRONT_FACE = $0B46; |
|
229 GL_SHADE_MODEL = $0B54; |
|
230 GL_DEPTH_RANGE = $0B70; |
|
231 GL_DEPTH_WRITEMASK = $0B72; |
|
232 GL_DEPTH_CLEAR_VALUE = $0B73; |
|
233 GL_DEPTH_FUNC = $0B74; |
|
234 GL_STENCIL_CLEAR_VALUE = $0B91; |
|
235 GL_STENCIL_FUNC = $0B92; |
|
236 GL_STENCIL_VALUE_MASK = $0B93; |
|
237 GL_STENCIL_FAIL = $0B94; |
|
238 GL_STENCIL_PASS_DEPTH_FAIL = $0B95; |
|
239 GL_STENCIL_PASS_DEPTH_PASS = $0B96; |
|
240 GL_STENCIL_REF = $0B97; |
|
241 GL_STENCIL_WRITEMASK = $0B98; |
|
242 GL_MATRIX_MODE = $0BA0; |
|
243 GL_VIEWPORT = $0BA2; |
|
244 GL_MODELVIEW_STACK_DEPTH = $0BA3; |
|
245 GL_PROJECTION_STACK_DEPTH = $0BA4; |
|
246 GL_TEXTURE_STACK_DEPTH = $0BA5; |
|
247 GL_MODELVIEW_MATRIX = $0BA6; |
|
248 GL_PROJECTION_MATRIX = $0BA7; |
|
249 GL_TEXTURE_MATRIX = $0BA8; |
|
250 GL_ALPHA_TEST_FUNC = $0BC1; |
|
251 GL_ALPHA_TEST_REF = $0BC2; |
|
252 GL_BLEND_DST = $0BE0; |
|
253 GL_BLEND_SRC = $0BE1; |
|
254 GL_LOGIC_OP_MODE = $0BF0; |
|
255 GL_SCISSOR_BOX = $0C10; |
|
256 // GL_SCISSOR_TEST = $0C11; |
|
257 GL_COLOR_CLEAR_VALUE = $0C22; |
|
258 GL_COLOR_WRITEMASK = $0C23; |
|
259 GL_UNPACK_ALIGNMENT = $0CF5; |
|
260 GL_PACK_ALIGNMENT = $0D05; |
|
261 GL_MAX_LIGHTS = $0D31; |
|
262 GL_MAX_CLIP_PLANES = $0D32; |
|
263 GL_MAX_TEXTURE_SIZE = $0D33; |
|
264 GL_MAX_MODELVIEW_STACK_DEPTH = $0D36; |
|
265 GL_MAX_PROJECTION_STACK_DEPTH = $0D38; |
|
266 GL_MAX_TEXTURE_STACK_DEPTH = $0D39; |
|
267 GL_MAX_VIEWPORT_DIMS = $0D3A; |
|
268 GL_MAX_TEXTURE_UNITS = $84E2; |
|
269 GL_SUBPIXEL_BITS = $0D50; |
|
270 GL_RED_BITS = $0D52; |
|
271 GL_GREEN_BITS = $0D53; |
|
272 GL_BLUE_BITS = $0D54; |
|
273 GL_ALPHA_BITS = $0D55; |
|
274 GL_DEPTH_BITS = $0D56; |
|
275 GL_STENCIL_BITS = $0D57; |
|
276 GL_POLYGON_OFFSET_UNITS = $2A00; |
|
277 // GL_POLYGON_OFFSET_FILL = $8037; |
|
278 GL_POLYGON_OFFSET_FACTOR = $8038; |
|
279 GL_TEXTURE_BINDING_2D = $8069; |
|
280 GL_VERTEX_ARRAY_SIZE = $807A; |
|
281 GL_VERTEX_ARRAY_TYPE = $807B; |
|
282 GL_VERTEX_ARRAY_STRIDE = $807C; |
|
283 GL_NORMAL_ARRAY_TYPE = $807E; |
|
284 GL_NORMAL_ARRAY_STRIDE = $807F; |
|
285 GL_COLOR_ARRAY_SIZE = $8081; |
|
286 GL_COLOR_ARRAY_TYPE = $8082; |
|
287 GL_COLOR_ARRAY_STRIDE = $8083; |
|
288 GL_TEXTURE_COORD_ARRAY_SIZE = $8088; |
|
289 GL_TEXTURE_COORD_ARRAY_TYPE = $8089; |
|
290 GL_TEXTURE_COORD_ARRAY_STRIDE = $808A; |
|
291 GL_VERTEX_ARRAY_POINTER = $808E; |
|
292 GL_NORMAL_ARRAY_POINTER = $808F; |
|
293 GL_COLOR_ARRAY_POINTER = $8090; |
|
294 GL_TEXTURE_COORD_ARRAY_POINTER = $8092; |
|
295 GL_SAMPLE_BUFFERS = $80A8; |
|
296 GL_SAMPLES = $80A9; |
|
297 GL_SAMPLE_COVERAGE_VALUE = $80AA; |
|
298 GL_SAMPLE_COVERAGE_INVERT = $80AB; |
|
299 { GetTextureParameter } |
|
300 { GL_TEXTURE_MAG_FILTER } |
|
301 { GL_TEXTURE_MIN_FILTER } |
|
302 { GL_TEXTURE_WRAP_S } |
|
303 { GL_TEXTURE_WRAP_T } |
|
304 GL_NUM_COMPRESSED_TEXTURE_FORMATS = $86A2; |
|
305 GL_COMPRESSED_TEXTURE_FORMATS = $86A3; |
|
306 { HintMode } |
|
307 GL_DONT_CARE = $1100; |
|
308 GL_FASTEST = $1101; |
|
309 GL_NICEST = $1102; |
|
310 { HintTarget } |
|
311 GL_PERSPECTIVE_CORRECTION_HINT = $0C50; |
|
312 GL_POINT_SMOOTH_HINT = $0C51; |
|
313 GL_LINE_SMOOTH_HINT = $0C52; |
|
314 GL_FOG_HINT = $0C54; |
|
315 GL_GENERATE_MIPMAP_HINT = $8192; |
|
316 { LightModelParameter } |
|
317 GL_LIGHT_MODEL_AMBIENT = $0B53; |
|
318 GL_LIGHT_MODEL_TWO_SIDE = $0B52; |
|
319 { LightParameter } |
|
320 GL_AMBIENT = $1200; |
|
321 GL_DIFFUSE = $1201; |
|
322 GL_SPECULAR = $1202; |
|
323 GL_POSITION = $1203; |
|
324 GL_SPOT_DIRECTION = $1204; |
|
325 GL_SPOT_EXPONENT = $1205; |
|
326 GL_SPOT_CUTOFF = $1206; |
|
327 GL_CONSTANT_ATTENUATION = $1207; |
|
328 GL_LINEAR_ATTENUATION = $1208; |
|
329 GL_QUADRATIC_ATTENUATION = $1209; |
|
330 { DataType } |
|
331 GL_BYTE = $1400; |
|
332 GL_UNSIGNED_BYTE = $1401; |
|
333 GL_SHORT = $1402; |
|
334 GL_UNSIGNED_SHORT = $1403; |
|
335 GL_FLOAT = $1406; |
|
336 GL_FIXED = $140C; |
|
337 { LogicOp } |
|
338 GL_CLEAR = $1500; |
|
339 GL_AND = $1501; |
|
340 GL_AND_REVERSE = $1502; |
|
341 GL_COPY = $1503; |
|
342 GL_AND_INVERTED = $1504; |
|
343 GL_NOOP = $1505; |
|
344 GL_XOR = $1506; |
|
345 GL_OR = $1507; |
|
346 GL_NOR = $1508; |
|
347 GL_EQUIV = $1509; |
|
348 GL_INVERT = $150A; |
|
349 GL_OR_REVERSE = $150B; |
|
350 GL_COPY_INVERTED = $150C; |
|
351 GL_OR_INVERTED = $150D; |
|
352 GL_NAND = $150E; |
|
353 GL_SET = $150F; |
|
354 { MaterialFace } |
|
355 { GL_FRONT_AND_BACK } |
|
356 { MaterialParameter } |
|
357 GL_EMISSION = $1600; |
|
358 GL_SHININESS = $1601; |
|
359 GL_AMBIENT_AND_DIFFUSE = $1602; |
|
360 { GL_AMBIENT } |
|
361 { GL_DIFFUSE } |
|
362 { GL_SPECULAR } |
|
363 { MatrixMode } |
|
364 GL_MODELVIEW = $1700; |
|
365 GL_PROJECTION = $1701; |
|
366 GL_TEXTURE = $1702; |
|
367 { NormalPointerType } |
|
368 { GL_BYTE } |
|
369 { GL_SHORT } |
|
370 { GL_FLOAT } |
|
371 { GL_FIXED } |
|
372 { PixelFormat } |
|
373 GL_ALPHA = $1906; |
|
374 GL_RGB = $1907; |
|
375 GL_RGBA = $1908; |
|
376 GL_LUMINANCE = $1909; |
|
377 GL_LUMINANCE_ALPHA = $190A; |
|
378 { PixelStoreParameter } |
|
379 // GL_UNPACK_ALIGNMENT = $0CF5; |
|
380 // GL_PACK_ALIGNMENT = $0D05; |
|
381 { PixelType } |
|
382 { GL_UNSIGNED_BYTE } |
|
383 GL_UNSIGNED_SHORT_4_4_4_4 = $8033; |
|
384 GL_UNSIGNED_SHORT_5_5_5_1 = $8034; |
|
385 GL_UNSIGNED_SHORT_5_6_5 = $8363; |
|
386 { ShadingModel } |
|
387 GL_FLAT = $1D00; |
|
388 GL_SMOOTH = $1D01; |
|
389 { StencilFunction } |
|
390 { GL_NEVER } |
|
391 { GL_LESS } |
|
392 { GL_EQUAL } |
|
393 { GL_LEQUAL } |
|
394 { GL_GREATER } |
|
395 { GL_NOTEQUAL } |
|
396 { GL_GEQUAL } |
|
397 { GL_ALWAYS } |
|
398 { StencilOp } |
|
399 { GL_ZERO } |
|
400 GL_KEEP = $1E00; |
|
401 GL_REPLACE = $1E01; |
|
402 GL_INCR = $1E02; |
|
403 GL_DECR = $1E03; |
|
404 { GL_INVERT } |
|
405 { StringName } |
|
406 GL_VENDOR = $1F00; |
|
407 GL_RENDERER = $1F01; |
|
408 GL_VERSION = $1F02; |
|
409 GL_EXTENSIONS = $1F03; |
|
410 { TexCoordPointerType } |
|
411 { GL_SHORT } |
|
412 { GL_FLOAT } |
|
413 { GL_FIXED } |
|
414 { GL_BYTE } |
|
415 { TextureEnvMode } |
|
416 GL_MODULATE = $2100; |
|
417 GL_DECAL = $2101; |
|
418 { GL_BLEND } |
|
419 GL_ADD = $0104; |
|
420 { GL_REPLACE } |
|
421 { TextureEnvParameter } |
|
422 GL_TEXTURE_ENV_MODE = $2200; |
|
423 GL_TEXTURE_ENV_COLOR = $2201; |
|
424 { TextureEnvTarget } |
|
425 GL_TEXTURE_ENV = $2300; |
|
426 { TextureMagFilter } |
|
427 GL_NEAREST = $2600; |
|
428 GL_LINEAR = $2601; |
|
429 { TextureMinFilter } |
|
430 { GL_NEAREST } |
|
431 { GL_LINEAR } |
|
432 GL_NEAREST_MIPMAP_NEAREST = $2700; |
|
433 GL_LINEAR_MIPMAP_NEAREST = $2701; |
|
434 GL_NEAREST_MIPMAP_LINEAR = $2702; |
|
435 GL_LINEAR_MIPMAP_LINEAR = $2703; |
|
436 { TextureParameterName } |
|
437 GL_TEXTURE_MAG_FILTER = $2800; |
|
438 GL_TEXTURE_MIN_FILTER = $2801; |
|
439 GL_TEXTURE_WRAP_S = $2802; |
|
440 GL_TEXTURE_WRAP_T = $2803; |
|
441 GL_GENERATE_MIPMAP = $8191; |
|
442 { TextureTarget } |
|
443 { GL_TEXTURE_2D } |
|
444 { TextureUnit } |
|
445 GL_TEXTURE0 = $84C0; |
|
446 GL_TEXTURE1 = $84C1; |
|
447 GL_TEXTURE2 = $84C2; |
|
448 GL_TEXTURE3 = $84C3; |
|
449 GL_TEXTURE4 = $84C4; |
|
450 GL_TEXTURE5 = $84C5; |
|
451 GL_TEXTURE6 = $84C6; |
|
452 GL_TEXTURE7 = $84C7; |
|
453 GL_TEXTURE8 = $84C8; |
|
454 GL_TEXTURE9 = $84C9; |
|
455 GL_TEXTURE10 = $84CA; |
|
456 GL_TEXTURE11 = $84CB; |
|
457 GL_TEXTURE12 = $84CC; |
|
458 GL_TEXTURE13 = $84CD; |
|
459 GL_TEXTURE14 = $84CE; |
|
460 GL_TEXTURE15 = $84CF; |
|
461 GL_TEXTURE16 = $84D0; |
|
462 GL_TEXTURE17 = $84D1; |
|
463 GL_TEXTURE18 = $84D2; |
|
464 GL_TEXTURE19 = $84D3; |
|
465 GL_TEXTURE20 = $84D4; |
|
466 GL_TEXTURE21 = $84D5; |
|
467 GL_TEXTURE22 = $84D6; |
|
468 GL_TEXTURE23 = $84D7; |
|
469 GL_TEXTURE24 = $84D8; |
|
470 GL_TEXTURE25 = $84D9; |
|
471 GL_TEXTURE26 = $84DA; |
|
472 GL_TEXTURE27 = $84DB; |
|
473 GL_TEXTURE28 = $84DC; |
|
474 GL_TEXTURE29 = $84DD; |
|
475 GL_TEXTURE30 = $84DE; |
|
476 GL_TEXTURE31 = $84DF; |
|
477 GL_ACTIVE_TEXTURE = $84E0; |
|
478 GL_CLIENT_ACTIVE_TEXTURE = $84E1; |
|
479 { TextureWrapMode } |
|
480 GL_REPEAT = $2901; |
|
481 GL_CLAMP_TO_EDGE = $812F; |
|
482 { VertexPointerType } |
|
483 { GL_SHORT } |
|
484 { GL_FLOAT } |
|
485 { GL_FIXED } |
|
486 { GL_BYTE } |
|
487 { LightName } |
|
488 GL_LIGHT0 = $4000; |
|
489 GL_LIGHT1 = $4001; |
|
490 GL_LIGHT2 = $4002; |
|
491 GL_LIGHT3 = $4003; |
|
492 GL_LIGHT4 = $4004; |
|
493 GL_LIGHT5 = $4005; |
|
494 GL_LIGHT6 = $4006; |
|
495 GL_LIGHT7 = $4007; |
|
496 { Buffer Objects } |
|
497 GL_ARRAY_BUFFER = $8892; |
|
498 GL_ELEMENT_ARRAY_BUFFER = $8893; |
|
499 GL_ARRAY_BUFFER_BINDING = $8894; |
|
500 GL_ELEMENT_ARRAY_BUFFER_BINDING = $8895; |
|
501 GL_VERTEX_ARRAY_BUFFER_BINDING = $8896; |
|
502 GL_NORMAL_ARRAY_BUFFER_BINDING = $8897; |
|
503 GL_COLOR_ARRAY_BUFFER_BINDING = $8898; |
|
504 GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING = $889A; |
|
505 GL_STATIC_DRAW = $88E4; |
|
506 GL_DYNAMIC_DRAW = $88E8; |
|
507 GL_BUFFER_SIZE = $8764; |
|
508 GL_BUFFER_USAGE = $8765; |
|
509 { Texture combine + dot3 } |
|
510 GL_SUBTRACT = $84E7; |
|
511 GL_COMBINE = $8570; |
|
512 GL_COMBINE_RGB = $8571; |
|
513 GL_COMBINE_ALPHA = $8572; |
|
514 GL_RGB_SCALE = $8573; |
|
515 GL_ADD_SIGNED = $8574; |
|
516 GL_INTERPOLATE = $8575; |
|
517 GL_CONSTANT = $8576; |
|
518 GL_PRIMARY_COLOR = $8577; |
|
519 GL_PREVIOUS = $8578; |
|
520 GL_OPERAND0_RGB = $8590; |
|
521 GL_OPERAND1_RGB = $8591; |
|
522 GL_OPERAND2_RGB = $8592; |
|
523 GL_OPERAND0_ALPHA = $8598; |
|
524 GL_OPERAND1_ALPHA = $8599; |
|
525 GL_OPERAND2_ALPHA = $859A; |
|
526 GL_ALPHA_SCALE = $0D1C; |
|
527 GL_SRC0_RGB = $8580; |
|
528 GL_SRC1_RGB = $8581; |
|
529 GL_SRC2_RGB = $8582; |
|
530 GL_SRC0_ALPHA = $8588; |
|
531 GL_SRC1_ALPHA = $8589; |
|
532 GL_SRC2_ALPHA = $858A; |
|
533 GL_DOT3_RGB = $86AE; |
|
534 GL_DOT3_RGBA = $86AF; |
|
535 {------------------------------------------------------------------------* |
|
536 * required OES extension tokens |
|
537 *------------------------------------------------------------------------ } |
|
538 { OES_read_format } |
|
539 GL_IMPLEMENTATION_COLOR_READ_TYPE_OES = $8B9A; |
|
540 GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES = $8B9B; |
|
541 { GL_OES_compressed_paletted_texture } |
|
542 GL_PALETTE4_RGB8_OES = $8B90; |
|
543 GL_PALETTE4_RGBA8_OES = $8B91; |
|
544 GL_PALETTE4_R5_G6_B5_OES = $8B92; |
|
545 GL_PALETTE4_RGBA4_OES = $8B93; |
|
546 GL_PALETTE4_RGB5_A1_OES = $8B94; |
|
547 GL_PALETTE8_RGB8_OES = $8B95; |
|
548 GL_PALETTE8_RGBA8_OES = $8B96; |
|
549 GL_PALETTE8_R5_G6_B5_OES = $8B97; |
|
550 GL_PALETTE8_RGBA4_OES = $8B98; |
|
551 GL_PALETTE8_RGB5_A1_OES = $8B99; |
|
552 { OES_point_size_array } |
|
553 GL_POINT_SIZE_ARRAY_OES = $8B9C; |
|
554 GL_POINT_SIZE_ARRAY_TYPE_OES = $898A; |
|
555 GL_POINT_SIZE_ARRAY_STRIDE_OES = $898B; |
|
556 GL_POINT_SIZE_ARRAY_POINTER_OES = $898C; |
|
557 GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES = $8B9F; |
|
558 { GL_OES_point_sprite } |
|
559 GL_POINT_SPRITE_OES = $8861; |
|
560 GL_COORD_REPLACE_OES = $8862; |
|
561 {*********************************************************** } |
|
562 { Available only in Common profile } |
|
563 |
|
564 var |
|
565 glAlphaFunc : procedure(func:GLenum; ref:GLclampf);cdecl; |
|
566 glClearColor : procedure(red:GLclampf; green:GLclampf; blue:GLclampf; alpha:GLclampf);cdecl; |
|
567 glClearDepthf : procedure(depth:GLclampf);cdecl; |
|
568 (* Const before type ignored *) |
|
569 glClipPlanef : procedure(plane:GLenum; equation:pGLfloat);cdecl; |
|
570 glColor4f : procedure(red:GLfloat; green:GLfloat; blue:GLfloat; alpha:GLfloat);cdecl; |
|
571 glDepthRangef : procedure(zNear:GLclampf; zFar:GLclampf);cdecl; |
|
572 glFogf : procedure(pname:GLenum; param:GLfloat);cdecl; |
|
573 (* Const before type ignored *) |
|
574 glFogfv : procedure(pname:GLenum; params:pGLfloat);cdecl; |
|
575 glFrustumf : procedure(left:GLfloat; right:GLfloat; bottom:GLfloat; top:GLfloat; zNear:GLfloat; |
|
576 zFar:GLfloat);cdecl; |
|
577 glGetClipPlanef : procedure(pname:GLenum; eqn:array of GLfloat);cdecl; |
|
578 glGetFloatv : procedure(pname:GLenum; params:pGLfloat);cdecl; |
|
579 glGetLightfv : procedure(light:GLenum; pname:GLenum; params:pGLfloat);cdecl; |
|
580 glGetMaterialfv : procedure(face:GLenum; pname:GLenum; params:pGLfloat);cdecl; |
|
581 glGetTexEnvfv : procedure(env:GLenum; pname:GLenum; params:pGLfloat);cdecl; |
|
582 glGetTexParameterfv : procedure(target:GLenum; pname:GLenum; params:pGLfloat);cdecl; |
|
583 glLightModelf : procedure(pname:GLenum; param:GLfloat);cdecl; |
|
584 (* Const before type ignored *) |
|
585 glLightModelfv : procedure(pname:GLenum; params:pGLfloat);cdecl; |
|
586 glLightf : procedure(light:GLenum; pname:GLenum; param:GLfloat);cdecl; |
|
587 (* Const before type ignored *) |
|
588 glLightfv : procedure(light:GLenum; pname:GLenum; params:pGLfloat);cdecl; |
|
589 glLineWidth : procedure(width:GLfloat);cdecl; |
|
590 (* Const before type ignored *) |
|
591 glLoadMatrixf : procedure(m:pGLfloat);cdecl; |
|
592 glMaterialf : procedure(face:GLenum; pname:GLenum; param:GLfloat);cdecl; |
|
593 (* Const before type ignored *) |
|
594 glMaterialfv : procedure(face:GLenum; pname:GLenum; params:pGLfloat);cdecl; |
|
595 (* Const before type ignored *) |
|
596 glMultMatrixf : procedure(m:pGLfloat);cdecl; |
|
597 glMultiTexCoord4f : procedure(target:GLenum; s:GLfloat; t:GLfloat; r:GLfloat; q:GLfloat);cdecl; |
|
598 glNormal3f : procedure(nx:GLfloat; ny:GLfloat; nz:GLfloat);cdecl; |
|
599 glOrthof : procedure(left:GLfloat; right:GLfloat; bottom:GLfloat; top:GLfloat; zNear:GLfloat; |
|
600 zFar:GLfloat);cdecl; |
|
601 glPointParameterf : procedure(pname:GLenum; param:GLfloat);cdecl; |
|
602 (* Const before type ignored *) |
|
603 glPointParameterfv : procedure(pname:GLenum; params:pGLfloat);cdecl; |
|
604 glPointSize : procedure(size:GLfloat);cdecl; |
|
605 glPolygonOffset : procedure(factor:GLfloat; units:GLfloat);cdecl; |
|
606 glRotatef : procedure(angle:GLfloat; x:GLfloat; y:GLfloat; z:GLfloat);cdecl; |
|
607 glScalef : procedure(x:GLfloat; y:GLfloat; z:GLfloat);cdecl; |
|
608 glTexEnvf : procedure(target:GLenum; pname:GLenum; param:GLfloat);cdecl; |
|
609 (* Const before type ignored *) |
|
610 glTexEnvfv : procedure(target:GLenum; pname:GLenum; params:pGLfloat);cdecl; |
|
611 glTexParameterf : procedure(target:GLenum; pname:GLenum; param:GLfloat);cdecl; |
|
612 (* Const before type ignored *) |
|
613 glTexParameterfv : procedure(target:GLenum; pname:GLenum; params:pGLfloat);cdecl; |
|
614 glTranslatef : procedure(x:GLfloat; y:GLfloat; z:GLfloat);cdecl; |
|
615 { Available in both Common and Common-Lite profiles } |
|
616 glActiveTexture : procedure(texture:GLenum);cdecl; |
|
617 glAlphaFuncx : procedure(func:GLenum; ref:GLclampx);cdecl; |
|
618 glBindBuffer : procedure(target:GLenum; buffer:GLuint);cdecl; |
|
619 glBindTexture : procedure(target:GLenum; texture:GLuint);cdecl; |
|
620 glBlendFunc : procedure(sfactor:GLenum; dfactor:GLenum);cdecl; |
|
621 (* Const before type ignored *) |
|
622 glBufferData : procedure(target:GLenum; size:GLsizeiptr; data:pGLvoid; usage:GLenum);cdecl; |
|
623 (* Const before type ignored *) |
|
624 glBufferSubData : procedure(target:GLenum; offset:GLintptr; size:GLsizeiptr; data:pGLvoid);cdecl; |
|
625 glClear : procedure(mask:GLbitfield);cdecl; |
|
626 glClearColorx : procedure(red:GLclampx; green:GLclampx; blue:GLclampx; alpha:GLclampx);cdecl; |
|
627 glClearDepthx : procedure(depth:GLclampx);cdecl; |
|
628 glClearStencil : procedure(s:GLint);cdecl; |
|
629 glClientActiveTexture : procedure(texture:GLenum);cdecl; |
|
630 (* Const before type ignored *) |
|
631 glClipPlanex : procedure(plane:GLenum; equation:pGLfixed);cdecl; |
|
632 glColor4ub : procedure(red:GLubyte; green:GLubyte; blue:GLubyte; alpha:GLubyte);cdecl; |
|
633 glColor4x : procedure(red:GLfixed; green:GLfixed; blue:GLfixed; alpha:GLfixed);cdecl; |
|
634 glColorMask : procedure(red:GLboolean; green:GLboolean; blue:GLboolean; alpha:GLboolean);cdecl; |
|
635 (* Const before type ignored *) |
|
636 glColorPointer : procedure(size:GLint; _type:GLenum; stride:GLsizei; pointer:pGLvoid);cdecl; |
|
637 (* Const before type ignored *) |
|
638 glCompressedTexImage2D : procedure(target:GLenum; level:GLint; internalformat:GLenum; width:GLsizei; height:GLsizei; |
|
639 border:GLint; imageSize:GLsizei; data:pGLvoid);cdecl; |
|
640 (* Const before type ignored *) |
|
641 glCompressedTexSubImage2D : procedure(target:GLenum; level:GLint; xoffset:GLint; yoffset:GLint; width:GLsizei; |
|
642 height:GLsizei; format:GLenum; imageSize:GLsizei; data:pGLvoid);cdecl; |
|
643 glCopyTexImage2D : procedure(target:GLenum; level:GLint; internalformat:GLenum; x:GLint; y:GLint; |
|
644 width:GLsizei; height:GLsizei; border:GLint);cdecl; |
|
645 glCopyTexSubImage2D : procedure(target:GLenum; level:GLint; xoffset:GLint; yoffset:GLint; x:GLint; |
|
646 y:GLint; width:GLsizei; height:GLsizei);cdecl; |
|
647 glCullFace : procedure(mode:GLenum);cdecl; |
|
648 (* Const before type ignored *) |
|
649 glDeleteBuffers : procedure(n:GLsizei; buffers:pGLuint);cdecl; |
|
650 (* Const before type ignored *) |
|
651 glDeleteTextures : procedure(n:GLsizei; textures:pGLuint);cdecl; |
|
652 glDepthFunc : procedure(func:GLenum);cdecl; |
|
653 glDepthMask : procedure(flag:GLboolean);cdecl; |
|
654 glDepthRangex : procedure(zNear:GLclampx; zFar:GLclampx);cdecl; |
|
655 glDisable : procedure(cap:GLenum);cdecl; |
|
656 glDisableClientState : procedure(arry:GLenum);cdecl; |
|
657 glDrawArrays : procedure(mode:GLenum; first:GLint; count:GLsizei);cdecl; |
|
658 (* Const before type ignored *) |
|
659 glDrawElements : procedure(mode:GLenum; count:GLsizei; _type:GLenum; indices:pGLvoid);cdecl; |
|
660 glEnable : procedure(cap:GLenum);cdecl; |
|
661 glEnableClientState : procedure(arry:GLenum);cdecl; |
|
662 glFinish : procedure;cdecl; |
|
663 glFlush : procedure;cdecl; |
|
664 glFogx : procedure(pname:GLenum; param:GLfixed);cdecl; |
|
665 (* Const before type ignored *) |
|
666 glFogxv : procedure(pname:GLenum; params:pGLfixed);cdecl; |
|
667 glFrontFace : procedure(mode:GLenum);cdecl; |
|
668 glFrustumx : procedure(left:GLfixed; right:GLfixed; bottom:GLfixed; top:GLfixed; zNear:GLfixed; |
|
669 zFar:GLfixed);cdecl; |
|
670 glGetBooleanv : procedure(pname:GLenum; params:pGLboolean);cdecl; |
|
671 glGetBufferParameteriv : procedure(target:GLenum; pname:GLenum; params:pGLint);cdecl; |
|
672 glGetClipPlanex : procedure(pname:GLenum; eqn:array of GLfixed);cdecl; |
|
673 glGenBuffers : procedure(n:GLsizei; buffers:pGLuint);cdecl; |
|
674 glGenTextures : procedure(n:GLsizei; textures:pGLuint);cdecl; |
|
675 glGetError : function:GLenum;cdecl; |
|
676 glGetFixedv : procedure(pname:GLenum; params:pGLfixed);cdecl; |
|
677 glGetIntegerv : procedure(pname:GLenum; params:pGLint);cdecl; |
|
678 glGetLightxv : procedure(light:GLenum; pname:GLenum; params:pGLfixed);cdecl; |
|
679 glGetMaterialxv : procedure(face:GLenum; pname:GLenum; params:pGLfixed);cdecl; |
|
680 glGetPointerv : procedure(pname:GLenum; params:Ppointer);cdecl; |
|
681 (* Const before type ignored *) |
|
682 glGetString : function(name:GLenum):PGLubyte;cdecl; |
|
683 glGetTexEnviv : procedure(env:GLenum; pname:GLenum; params:pGLint);cdecl; |
|
684 glGetTexEnvxv : procedure(env:GLenum; pname:GLenum; params:pGLfixed);cdecl; |
|
685 glGetTexParameteriv : procedure(target:GLenum; pname:GLenum; params:pGLint);cdecl; |
|
686 glGetTexParameterxv : procedure(target:GLenum; pname:GLenum; params:pGLfixed);cdecl; |
|
687 glHint : procedure(target:GLenum; mode:GLenum);cdecl; |
|
688 glIsBuffer : function(buffer:GLuint):GLboolean;cdecl; |
|
689 glIsEnabled : function(cap:GLenum):GLboolean;cdecl; |
|
690 glIsTexture : function(texture:GLuint):GLboolean;cdecl; |
|
691 glLightModelx : procedure(pname:GLenum; param:GLfixed);cdecl; |
|
692 (* Const before type ignored *) |
|
693 glLightModelxv : procedure(pname:GLenum; params:pGLfixed);cdecl; |
|
694 glLightx : procedure(light:GLenum; pname:GLenum; param:GLfixed);cdecl; |
|
695 (* Const before type ignored *) |
|
696 glLightxv : procedure(light:GLenum; pname:GLenum; params:pGLfixed);cdecl; |
|
697 glLineWidthx : procedure(width:GLfixed);cdecl; |
|
698 glLoadIdentity : procedure;cdecl; |
|
699 (* Const before type ignored *) |
|
700 glLoadMatrixx : procedure(m:pGLfixed);cdecl; |
|
701 glLogicOp : procedure(opcode:GLenum);cdecl; |
|
702 glMaterialx : procedure(face:GLenum; pname:GLenum; param:GLfixed);cdecl; |
|
703 (* Const before type ignored *) |
|
704 glMaterialxv : procedure(face:GLenum; pname:GLenum; params:pGLfixed);cdecl; |
|
705 glMatrixMode : procedure(mode:GLenum);cdecl; |
|
706 (* Const before type ignored *) |
|
707 glMultMatrixx : procedure(m:pGLfixed);cdecl; |
|
708 glMultiTexCoord4x : procedure(target:GLenum; s:GLfixed; t:GLfixed; r:GLfixed; q:GLfixed);cdecl; |
|
709 glNormal3x : procedure(nx:GLfixed; ny:GLfixed; nz:GLfixed);cdecl; |
|
710 (* Const before type ignored *) |
|
711 glNormalPointer : procedure(_type:GLenum; stride:GLsizei; pointer:pGLvoid);cdecl; |
|
712 glOrthox : procedure(left:GLfixed; right:GLfixed; bottom:GLfixed; top:GLfixed; zNear:GLfixed; |
|
713 zFar:GLfixed);cdecl; |
|
714 glPixelStorei : procedure(pname:GLenum; param:GLint);cdecl; |
|
715 glPointParameterx : procedure(pname:GLenum; param:GLfixed);cdecl; |
|
716 (* Const before type ignored *) |
|
717 glPointParameterxv : procedure(pname:GLenum; params:pGLfixed);cdecl; |
|
718 glPointSizex : procedure(size:GLfixed);cdecl; |
|
719 glPolygonOffsetx : procedure(factor:GLfixed; units:GLfixed);cdecl; |
|
720 glPopMatrix : procedure;cdecl; |
|
721 glPushMatrix : procedure;cdecl; |
|
722 glReadPixels : procedure(x:GLint; y:GLint; width:GLsizei; height:GLsizei; format:GLenum; |
|
723 _type:GLenum; pixels:pGLvoid);cdecl; |
|
724 glRotatex : procedure(angle:GLfixed; x:GLfixed; y:GLfixed; z:GLfixed);cdecl; |
|
725 glSampleCoverage : procedure(value:GLclampf; invert:GLboolean);cdecl; |
|
726 glSampleCoveragex : procedure(value:GLclampx; invert:GLboolean);cdecl; |
|
727 glScalex : procedure(x:GLfixed; y:GLfixed; z:GLfixed);cdecl; |
|
728 glScissor : procedure(x:GLint; y:GLint; width:GLsizei; height:GLsizei);cdecl; |
|
729 glShadeModel : procedure(mode:GLenum);cdecl; |
|
730 glStencilFunc : procedure(func:GLenum; ref:GLint; mask:GLuint);cdecl; |
|
731 glStencilMask : procedure(mask:GLuint);cdecl; |
|
732 glStencilOp : procedure(fail:GLenum; zfail:GLenum; zpass:GLenum);cdecl; |
|
733 (* Const before type ignored *) |
|
734 glTexCoordPointer : procedure(size:GLint; _type:GLenum; stride:GLsizei; pointer:pGLvoid);cdecl; |
|
735 glTexEnvi : procedure(target:GLenum; pname:GLenum; param:GLint);cdecl; |
|
736 glTexEnvx : procedure(target:GLenum; pname:GLenum; param:GLfixed);cdecl; |
|
737 (* Const before type ignored *) |
|
738 glTexEnviv : procedure(target:GLenum; pname:GLenum; params:pGLint);cdecl; |
|
739 (* Const before type ignored *) |
|
740 glTexEnvxv : procedure(target:GLenum; pname:GLenum; params:pGLfixed);cdecl; |
|
741 (* Const before type ignored *) |
|
742 glTexImage2D : procedure(target:GLenum; level:GLint; internalformat:GLint; width:GLsizei; height:GLsizei; |
|
743 border:GLint; format:GLenum; _type:GLenum; pixels:pGLvoid);cdecl; |
|
744 glTexParameteri : procedure(target:GLenum; pname:GLenum; param:GLint);cdecl; |
|
745 glTexParameterx : procedure(target:GLenum; pname:GLenum; param:GLfixed);cdecl; |
|
746 (* Const before type ignored *) |
|
747 glTexParameteriv : procedure(target:GLenum; pname:GLenum; params:pGLint);cdecl; |
|
748 (* Const before type ignored *) |
|
749 glTexParameterxv : procedure(target:GLenum; pname:GLenum; params:pGLfixed);cdecl; |
|
750 (* Const before type ignored *) |
|
751 glTexSubImage2D : procedure(target:GLenum; level:GLint; xoffset:GLint; yoffset:GLint; width:GLsizei; |
|
752 height:GLsizei; format:GLenum; _type:GLenum; pixels:pGLvoid);cdecl; |
|
753 glTranslatex : procedure(x:GLfixed; y:GLfixed; z:GLfixed);cdecl; |
|
754 (* Const before type ignored *) |
|
755 glVertexPointer : procedure(size:GLint; _type:GLenum; stride:GLsizei; pointer:pGLvoid);cdecl; |
|
756 glViewport : procedure(x:GLint; y:GLint; width:GLsizei; height:GLsizei);cdecl; |
|
757 {------------------------------------------------------------------------* |
|
758 * Required OES extension functions |
|
759 *------------------------------------------------------------------------ } |
|
760 { GL_OES_read_format } |
|
761 |
|
762 const |
|
763 GL_OES_read_format = 1; |
|
764 { GL_OES_compressed_paletted_texture } |
|
765 GL_OES_compressed_paletted_texture = 1; |
|
766 { GL_OES_point_size_array } |
|
767 GL_OES_point_size_array = 1; |
|
768 (* Const before type ignored *) |
|
769 |
|
770 var |
|
771 glPointSizePointerOES : procedure(_type:GLenum; stride:GLsizei; pointer:pGLvoid);cdecl; |
|
772 { GL_OES_point_sprite } |
|
773 |
|
774 const |
|
775 GL_OES_point_sprite = 1; |
|
776 |
|
777 implementation |
|
778 |
|
779 uses |
|
780 SysUtils, dynlibs, uConsole; |
|
781 |
|
782 var |
|
783 hlib : tlibhandle; |
|
784 |
|
785 |
|
786 procedure Freegles11; |
|
787 begin |
|
788 // FreeLibrary(hlib); |
|
789 glAlphaFunc:=nil; |
|
790 glClearColor:=nil; |
|
791 glClearDepthf:=nil; |
|
792 glClipPlanef:=nil; |
|
793 glColor4f:=nil; |
|
794 glDepthRangef:=nil; |
|
795 glFogf:=nil; |
|
796 glFogfv:=nil; |
|
797 glFrustumf:=nil; |
|
798 glGetClipPlanef:=nil; |
|
799 glGetFloatv:=nil; |
|
800 glGetLightfv:=nil; |
|
801 glGetMaterialfv:=nil; |
|
802 glGetTexEnvfv:=nil; |
|
803 glGetTexParameterfv:=nil; |
|
804 glLightModelf:=nil; |
|
805 glLightModelfv:=nil; |
|
806 glLightf:=nil; |
|
807 glLightfv:=nil; |
|
808 glLineWidth:=nil; |
|
809 glLoadMatrixf:=nil; |
|
810 glMaterialf:=nil; |
|
811 glMaterialfv:=nil; |
|
812 glMultMatrixf:=nil; |
|
813 glMultiTexCoord4f:=nil; |
|
814 glNormal3f:=nil; |
|
815 glOrthof:=nil; |
|
816 glPointParameterf:=nil; |
|
817 glPointParameterfv:=nil; |
|
818 glPointSize:=nil; |
|
819 glPolygonOffset:=nil; |
|
820 glRotatef:=nil; |
|
821 glScalef:=nil; |
|
822 glTexEnvf:=nil; |
|
823 glTexEnvfv:=nil; |
|
824 glTexParameterf:=nil; |
|
825 glTexParameterfv:=nil; |
|
826 glTranslatef:=nil; |
|
827 glActiveTexture:=nil; |
|
828 glAlphaFuncx:=nil; |
|
829 glBindBuffer:=nil; |
|
830 glBindTexture:=nil; |
|
831 glBlendFunc:=nil; |
|
832 glBufferData:=nil; |
|
833 glBufferSubData:=nil; |
|
834 glClear:=nil; |
|
835 glClearColorx:=nil; |
|
836 glClearDepthx:=nil; |
|
837 glClearStencil:=nil; |
|
838 glClientActiveTexture:=nil; |
|
839 glClipPlanex:=nil; |
|
840 glColor4ub:=nil; |
|
841 glColor4x:=nil; |
|
842 glColorMask:=nil; |
|
843 glColorPointer:=nil; |
|
844 glCompressedTexImage2D:=nil; |
|
845 glCompressedTexSubImage2D:=nil; |
|
846 glCopyTexImage2D:=nil; |
|
847 glCopyTexSubImage2D:=nil; |
|
848 glCullFace:=nil; |
|
849 glDeleteBuffers:=nil; |
|
850 glDeleteTextures:=nil; |
|
851 glDepthFunc:=nil; |
|
852 glDepthMask:=nil; |
|
853 glDepthRangex:=nil; |
|
854 glDisable:=nil; |
|
855 glDisableClientState:=nil; |
|
856 glDrawArrays:=nil; |
|
857 glDrawElements:=nil; |
|
858 glEnable:=nil; |
|
859 glEnableClientState:=nil; |
|
860 glFinish:=nil; |
|
861 glFlush:=nil; |
|
862 glFogx:=nil; |
|
863 glFogxv:=nil; |
|
864 glFrontFace:=nil; |
|
865 glFrustumx:=nil; |
|
866 glGetBooleanv:=nil; |
|
867 glGetBufferParameteriv:=nil; |
|
868 glGetClipPlanex:=nil; |
|
869 glGenBuffers:=nil; |
|
870 glGenTextures:=nil; |
|
871 glGetError:=nil; |
|
872 glGetFixedv:=nil; |
|
873 glGetIntegerv:=nil; |
|
874 glGetLightxv:=nil; |
|
875 glGetMaterialxv:=nil; |
|
876 glGetPointerv:=nil; |
|
877 glGetString:=nil; |
|
878 glGetTexEnviv:=nil; |
|
879 glGetTexEnvxv:=nil; |
|
880 glGetTexParameteriv:=nil; |
|
881 glGetTexParameterxv:=nil; |
|
882 glHint:=nil; |
|
883 glIsBuffer:=nil; |
|
884 glIsEnabled:=nil; |
|
885 glIsTexture:=nil; |
|
886 glLightModelx:=nil; |
|
887 glLightModelxv:=nil; |
|
888 glLightx:=nil; |
|
889 glLightxv:=nil; |
|
890 glLineWidthx:=nil; |
|
891 glLoadIdentity:=nil; |
|
892 glLoadMatrixx:=nil; |
|
893 glLogicOp:=nil; |
|
894 glMaterialx:=nil; |
|
895 glMaterialxv:=nil; |
|
896 glMatrixMode:=nil; |
|
897 glMultMatrixx:=nil; |
|
898 glMultiTexCoord4x:=nil; |
|
899 glNormal3x:=nil; |
|
900 glNormalPointer:=nil; |
|
901 glOrthox:=nil; |
|
902 glPixelStorei:=nil; |
|
903 glPointParameterx:=nil; |
|
904 glPointParameterxv:=nil; |
|
905 glPointSizex:=nil; |
|
906 glPolygonOffsetx:=nil; |
|
907 glPopMatrix:=nil; |
|
908 glPushMatrix:=nil; |
|
909 glReadPixels:=nil; |
|
910 glRotatex:=nil; |
|
911 glSampleCoverage:=nil; |
|
912 glSampleCoveragex:=nil; |
|
913 glScalex:=nil; |
|
914 glScissor:=nil; |
|
915 glShadeModel:=nil; |
|
916 glStencilFunc:=nil; |
|
917 glStencilMask:=nil; |
|
918 glStencilOp:=nil; |
|
919 glTexCoordPointer:=nil; |
|
920 glTexEnvi:=nil; |
|
921 glTexEnvx:=nil; |
|
922 glTexEnviv:=nil; |
|
923 glTexEnvxv:=nil; |
|
924 glTexImage2D:=nil; |
|
925 glTexParameteri:=nil; |
|
926 glTexParameterx:=nil; |
|
927 glTexParameteriv:=nil; |
|
928 glTexParameterxv:=nil; |
|
929 glTexSubImage2D:=nil; |
|
930 glTranslatex:=nil; |
|
931 glVertexPointer:=nil; |
|
932 glViewport:=nil; |
|
933 glPointSizePointerOES:=nil; |
|
934 end; |
|
935 |
|
936 |
|
937 procedure Loadgles11(lib : pchar); |
|
938 begin |
|
939 Freegles11; |
|
940 WriteToConsole('loading lib'); |
|
941 hlib:=LoadLibrary(lib); |
|
942 if hlib=0 then |
|
943 begin |
|
944 WriteToConsole('crash'); |
|
945 raise Exception.Create(format('Could not load library: %s',[lib])); |
|
946 end; |
|
947 WriteToConsole('succeeded'); |
|
948 pointer(glAlphaFunc):=GetProcAddress(hlib,'glAlphaFunc'); |
|
949 pointer(glClearColor):=GetProcAddress(hlib,'glClearColor'); |
|
950 pointer(glClearDepthf):=GetProcAddress(hlib,'glClearDepthf'); |
|
951 pointer(glClipPlanef):=GetProcAddress(hlib,'glClipPlanef'); |
|
952 pointer(glColor4f):=GetProcAddress(hlib,'glColor4f'); |
|
953 pointer(glDepthRangef):=GetProcAddress(hlib,'glDepthRangef'); |
|
954 pointer(glFogf):=GetProcAddress(hlib,'glFogf'); |
|
955 pointer(glFogfv):=GetProcAddress(hlib,'glFogfv'); |
|
956 pointer(glFrustumf):=GetProcAddress(hlib,'glFrustumf'); |
|
957 pointer(glGetClipPlanef):=GetProcAddress(hlib,'glGetClipPlanef'); |
|
958 pointer(glGetFloatv):=GetProcAddress(hlib,'glGetFloatv'); |
|
959 pointer(glGetLightfv):=GetProcAddress(hlib,'glGetLightfv'); |
|
960 pointer(glGetMaterialfv):=GetProcAddress(hlib,'glGetMaterialfv'); |
|
961 pointer(glGetTexEnvfv):=GetProcAddress(hlib,'glGetTexEnvfv'); |
|
962 pointer(glGetTexParameterfv):=GetProcAddress(hlib,'glGetTexParameterfv'); |
|
963 pointer(glLightModelf):=GetProcAddress(hlib,'glLightModelf'); |
|
964 pointer(glLightModelfv):=GetProcAddress(hlib,'glLightModelfv'); |
|
965 pointer(glLightf):=GetProcAddress(hlib,'glLightf'); |
|
966 pointer(glLightfv):=GetProcAddress(hlib,'glLightfv'); |
|
967 pointer(glLineWidth):=GetProcAddress(hlib,'glLineWidth'); |
|
968 pointer(glLoadMatrixf):=GetProcAddress(hlib,'glLoadMatrixf'); |
|
969 pointer(glMaterialf):=GetProcAddress(hlib,'glMaterialf'); |
|
970 pointer(glMaterialfv):=GetProcAddress(hlib,'glMaterialfv'); |
|
971 pointer(glMultMatrixf):=GetProcAddress(hlib,'glMultMatrixf'); |
|
972 pointer(glMultiTexCoord4f):=GetProcAddress(hlib,'glMultiTexCoord4f'); |
|
973 pointer(glNormal3f):=GetProcAddress(hlib,'glNormal3f'); |
|
974 pointer(glOrthof):=GetProcAddress(hlib,'glOrthof'); |
|
975 pointer(glPointParameterf):=GetProcAddress(hlib,'glPointParameterf'); |
|
976 pointer(glPointParameterfv):=GetProcAddress(hlib,'glPointParameterfv'); |
|
977 pointer(glPointSize):=GetProcAddress(hlib,'glPointSize'); |
|
978 pointer(glPolygonOffset):=GetProcAddress(hlib,'glPolygonOffset'); |
|
979 pointer(glRotatef):=GetProcAddress(hlib,'glRotatef'); |
|
980 pointer(glScalef):=GetProcAddress(hlib,'glScalef'); |
|
981 pointer(glTexEnvf):=GetProcAddress(hlib,'glTexEnvf'); |
|
982 pointer(glTexEnvfv):=GetProcAddress(hlib,'glTexEnvfv'); |
|
983 pointer(glTexParameterf):=GetProcAddress(hlib,'glTexParameterf'); |
|
984 pointer(glTexParameterfv):=GetProcAddress(hlib,'glTexParameterfv'); |
|
985 pointer(glTranslatef):=GetProcAddress(hlib,'glTranslatef'); |
|
986 pointer(glActiveTexture):=GetProcAddress(hlib,'glActiveTexture'); |
|
987 pointer(glAlphaFuncx):=GetProcAddress(hlib,'glAlphaFuncx'); |
|
988 pointer(glBindBuffer):=GetProcAddress(hlib,'glBindBuffer'); |
|
989 pointer(glBindTexture):=GetProcAddress(hlib,'glBindTexture'); |
|
990 pointer(glBlendFunc):=GetProcAddress(hlib,'glBlendFunc'); |
|
991 pointer(glBufferData):=GetProcAddress(hlib,'glBufferData'); |
|
992 pointer(glBufferSubData):=GetProcAddress(hlib,'glBufferSubData'); |
|
993 pointer(glClear):=GetProcAddress(hlib,'glClear'); |
|
994 pointer(glClearColorx):=GetProcAddress(hlib,'glClearColorx'); |
|
995 pointer(glClearDepthx):=GetProcAddress(hlib,'glClearDepthx'); |
|
996 pointer(glClearStencil):=GetProcAddress(hlib,'glClearStencil'); |
|
997 pointer(glClientActiveTexture):=GetProcAddress(hlib,'glClientActiveTexture'); |
|
998 pointer(glClipPlanex):=GetProcAddress(hlib,'glClipPlanex'); |
|
999 pointer(glColor4ub):=GetProcAddress(hlib,'glColor4ub'); |
|
1000 pointer(glColor4x):=GetProcAddress(hlib,'glColor4x'); |
|
1001 pointer(glColorMask):=GetProcAddress(hlib,'glColorMask'); |
|
1002 pointer(glColorPointer):=GetProcAddress(hlib,'glColorPointer'); |
|
1003 pointer(glCompressedTexImage2D):=GetProcAddress(hlib,'glCompressedTexImage2D'); |
|
1004 pointer(glCompressedTexSubImage2D):=GetProcAddress(hlib,'glCompressedTexSubImage2D'); |
|
1005 pointer(glCopyTexImage2D):=GetProcAddress(hlib,'glCopyTexImage2D'); |
|
1006 pointer(glCopyTexSubImage2D):=GetProcAddress(hlib,'glCopyTexSubImage2D'); |
|
1007 pointer(glCullFace):=GetProcAddress(hlib,'glCullFace'); |
|
1008 pointer(glDeleteBuffers):=GetProcAddress(hlib,'glDeleteBuffers'); |
|
1009 pointer(glDeleteTextures):=GetProcAddress(hlib,'glDeleteTextures'); |
|
1010 pointer(glDepthFunc):=GetProcAddress(hlib,'glDepthFunc'); |
|
1011 pointer(glDepthMask):=GetProcAddress(hlib,'glDepthMask'); |
|
1012 pointer(glDepthRangex):=GetProcAddress(hlib,'glDepthRangex'); |
|
1013 pointer(glDisable):=GetProcAddress(hlib,'glDisable'); |
|
1014 pointer(glDisableClientState):=GetProcAddress(hlib,'glDisableClientState'); |
|
1015 pointer(glDrawArrays):=GetProcAddress(hlib,'glDrawArrays'); |
|
1016 pointer(glDrawElements):=GetProcAddress(hlib,'glDrawElements'); |
|
1017 pointer(glEnable):=GetProcAddress(hlib,'glEnable'); |
|
1018 pointer(glEnableClientState):=GetProcAddress(hlib,'glEnableClientState'); |
|
1019 pointer(glFinish):=GetProcAddress(hlib,'glFinish'); |
|
1020 pointer(glFlush):=GetProcAddress(hlib,'glFlush'); |
|
1021 pointer(glFogx):=GetProcAddress(hlib,'glFogx'); |
|
1022 pointer(glFogxv):=GetProcAddress(hlib,'glFogxv'); |
|
1023 pointer(glFrontFace):=GetProcAddress(hlib,'glFrontFace'); |
|
1024 pointer(glFrustumx):=GetProcAddress(hlib,'glFrustumx'); |
|
1025 pointer(glGetBooleanv):=GetProcAddress(hlib,'glGetBooleanv'); |
|
1026 pointer(glGetBufferParameteriv):=GetProcAddress(hlib,'glGetBufferParameteriv'); |
|
1027 pointer(glGetClipPlanex):=GetProcAddress(hlib,'glGetClipPlanex'); |
|
1028 pointer(glGenBuffers):=GetProcAddress(hlib,'glGenBuffers'); |
|
1029 pointer(glGenTextures):=GetProcAddress(hlib,'glGenTextures'); |
|
1030 pointer(glGetError):=GetProcAddress(hlib,'glGetError'); |
|
1031 pointer(glGetFixedv):=GetProcAddress(hlib,'glGetFixedv'); |
|
1032 pointer(glGetIntegerv):=GetProcAddress(hlib,'glGetIntegerv'); |
|
1033 pointer(glGetLightxv):=GetProcAddress(hlib,'glGetLightxv'); |
|
1034 pointer(glGetMaterialxv):=GetProcAddress(hlib,'glGetMaterialxv'); |
|
1035 pointer(glGetPointerv):=GetProcAddress(hlib,'glGetPointerv'); |
|
1036 pointer(glGetString):=GetProcAddress(hlib,'glGetString'); |
|
1037 pointer(glGetTexEnviv):=GetProcAddress(hlib,'glGetTexEnviv'); |
|
1038 pointer(glGetTexEnvxv):=GetProcAddress(hlib,'glGetTexEnvxv'); |
|
1039 pointer(glGetTexParameteriv):=GetProcAddress(hlib,'glGetTexParameteriv'); |
|
1040 pointer(glGetTexParameterxv):=GetProcAddress(hlib,'glGetTexParameterxv'); |
|
1041 pointer(glHint):=GetProcAddress(hlib,'glHint'); |
|
1042 pointer(glIsBuffer):=GetProcAddress(hlib,'glIsBuffer'); |
|
1043 pointer(glIsEnabled):=GetProcAddress(hlib,'glIsEnabled'); |
|
1044 pointer(glIsTexture):=GetProcAddress(hlib,'glIsTexture'); |
|
1045 pointer(glLightModelx):=GetProcAddress(hlib,'glLightModelx'); |
|
1046 pointer(glLightModelxv):=GetProcAddress(hlib,'glLightModelxv'); |
|
1047 pointer(glLightx):=GetProcAddress(hlib,'glLightx'); |
|
1048 pointer(glLightxv):=GetProcAddress(hlib,'glLightxv'); |
|
1049 pointer(glLineWidthx):=GetProcAddress(hlib,'glLineWidthx'); |
|
1050 pointer(glLoadIdentity):=GetProcAddress(hlib,'glLoadIdentity'); |
|
1051 pointer(glLoadMatrixx):=GetProcAddress(hlib,'glLoadMatrixx'); |
|
1052 pointer(glLogicOp):=GetProcAddress(hlib,'glLogicOp'); |
|
1053 pointer(glMaterialx):=GetProcAddress(hlib,'glMaterialx'); |
|
1054 pointer(glMaterialxv):=GetProcAddress(hlib,'glMaterialxv'); |
|
1055 pointer(glMatrixMode):=GetProcAddress(hlib,'glMatrixMode'); |
|
1056 pointer(glMultMatrixx):=GetProcAddress(hlib,'glMultMatrixx'); |
|
1057 pointer(glMultiTexCoord4x):=GetProcAddress(hlib,'glMultiTexCoord4x'); |
|
1058 pointer(glNormal3x):=GetProcAddress(hlib,'glNormal3x'); |
|
1059 pointer(glNormalPointer):=GetProcAddress(hlib,'glNormalPointer'); |
|
1060 pointer(glOrthox):=GetProcAddress(hlib,'glOrthox'); |
|
1061 pointer(glPixelStorei):=GetProcAddress(hlib,'glPixelStorei'); |
|
1062 pointer(glPointParameterx):=GetProcAddress(hlib,'glPointParameterx'); |
|
1063 pointer(glPointParameterxv):=GetProcAddress(hlib,'glPointParameterxv'); |
|
1064 pointer(glPointSizex):=GetProcAddress(hlib,'glPointSizex'); |
|
1065 pointer(glPolygonOffsetx):=GetProcAddress(hlib,'glPolygonOffsetx'); |
|
1066 pointer(glPopMatrix):=GetProcAddress(hlib,'glPopMatrix'); |
|
1067 pointer(glPushMatrix):=GetProcAddress(hlib,'glPushMatrix'); |
|
1068 pointer(glReadPixels):=GetProcAddress(hlib,'glReadPixels'); |
|
1069 pointer(glRotatex):=GetProcAddress(hlib,'glRotatex'); |
|
1070 pointer(glSampleCoverage):=GetProcAddress(hlib,'glSampleCoverage'); |
|
1071 pointer(glSampleCoveragex):=GetProcAddress(hlib,'glSampleCoveragex'); |
|
1072 pointer(glScalex):=GetProcAddress(hlib,'glScalex'); |
|
1073 pointer(glScissor):=GetProcAddress(hlib,'glScissor'); |
|
1074 pointer(glShadeModel):=GetProcAddress(hlib,'glShadeModel'); |
|
1075 pointer(glStencilFunc):=GetProcAddress(hlib,'glStencilFunc'); |
|
1076 pointer(glStencilMask):=GetProcAddress(hlib,'glStencilMask'); |
|
1077 pointer(glStencilOp):=GetProcAddress(hlib,'glStencilOp'); |
|
1078 pointer(glTexCoordPointer):=GetProcAddress(hlib,'glTexCoordPointer'); |
|
1079 pointer(glTexEnvi):=GetProcAddress(hlib,'glTexEnvi'); |
|
1080 pointer(glTexEnvx):=GetProcAddress(hlib,'glTexEnvx'); |
|
1081 pointer(glTexEnviv):=GetProcAddress(hlib,'glTexEnviv'); |
|
1082 pointer(glTexEnvxv):=GetProcAddress(hlib,'glTexEnvxv'); |
|
1083 pointer(glTexImage2D):=GetProcAddress(hlib,'glTexImage2D'); |
|
1084 pointer(glTexParameteri):=GetProcAddress(hlib,'glTexParameteri'); |
|
1085 pointer(glTexParameterx):=GetProcAddress(hlib,'glTexParameterx'); |
|
1086 pointer(glTexParameteriv):=GetProcAddress(hlib,'glTexParameteriv'); |
|
1087 pointer(glTexParameterxv):=GetProcAddress(hlib,'glTexParameterxv'); |
|
1088 pointer(glTexSubImage2D):=GetProcAddress(hlib,'glTexSubImage2D'); |
|
1089 pointer(glTranslatex):=GetProcAddress(hlib,'glTranslatex'); |
|
1090 pointer(glVertexPointer):=GetProcAddress(hlib,'glVertexPointer'); |
|
1091 pointer(glViewport):=GetProcAddress(hlib,'glViewport'); |
|
1092 pointer(glPointSizePointerOES):=GetProcAddress(hlib,'glPointSizePointerOES'); |
|
1093 end; |
|
1094 |
|
1095 procedure init; |
|
1096 begin |
|
1097 WriteToConsole('init'); |
|
1098 Loadgles11('libGLESv1_CM.so'); |
|
1099 end; |
|
1100 |
|
1101 |
|
1102 initialization |
|
1103 Loadgles11('gles11'); |
|
1104 finalization |
|
1105 Freegles11; |
|
1106 |
|
1107 end. |