You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2341 lines
165 KiB

  1. { ============================================================================
  2. OpenGL 4.5 - Headertranslation
  3. Version 4.5
  4. Supported environments and targets :
  5. - (Linux) FreePascal (1.9.3 and up)
  6. ==============================================================================
  7. Copyright (C) DGL-OpenGL-Portteam
  8. All Rights Reserved
  9. Obtained through:
  10. - Delphi OpenGL Community(DGL) - www.delphigl.com
  11. Converted and maintained by DGL's OpenGL-Portteam :
  12. - Bergmann89 - http://www.bergmann89.de
  13. ==============================================================================
  14. You may retrieve the latest version of this file at the Delphi OpenGL
  15. Community home page, located at http://www.delphigl.com/
  16. The contents of this file are used with permission, subject to
  17. the Mozilla Public License Version 1.1 (the "License"); you may
  18. not use this file except in compliance with the License. You may
  19. obtain a copy of the License at
  20. http://www.mozilla.org/MPL/MPL-1.1.html
  21. Software distributed under the License is distributed on an
  22. "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
  23. implied. See the License for the specific language governing
  24. rights and limitations under the License.
  25. ============================================================================== }
  26. unit dglOpenGLES;
  27. interface
  28. {$IFDEF FPC}
  29. {$MODE Delphi}
  30. {$ENDIF}
  31. // detecting Linux
  32. {$IFDEF linux} // Linux
  33. {$DEFINE DGL_LINUX}
  34. {$ENDIF}
  35. //check if system is supported and set system dependent constants
  36. uses
  37. sysutils
  38. {$IFDEF DGL_LINUX}
  39. , dl
  40. {$ENDIF}
  41. ;
  42. {$IFDEF DGL_LINUX}
  43. const
  44. LIBNAME_OPENGLES = 'libGLESv2.so';
  45. LIBNAME_EGL = 'libEGL.so';
  46. {$ELSE}
  47. {$ERROR 'unknown/unsupported system'}
  48. {$ENDIF}
  49. { ================================================== OpenGL Es ======================================================= }
  50. type
  51. { OpenGL ES 2.0 }
  52. GLbyte = Byte;
  53. GLclampf = Single;
  54. GLfixed = Integer;
  55. GLshort = ShortInt;
  56. GLushort = Word;
  57. GLvoid = Pointer;
  58. GLint64 = Int64;
  59. GLuint64 = UInt64;
  60. GLenum = Cardinal;
  61. GLuint = Cardinal;
  62. GLchar = AnsiChar;
  63. GLbitfield = Cardinal;
  64. GLint = Integer;
  65. GLboolean = ByteBool;
  66. GLsizei = Integer;
  67. GLfloat = Single;
  68. PGLbyte = ^GLbyte;
  69. PGLclampf = ^GLclampf;
  70. PGLfixed = ^GLfixed;
  71. PGLshort = ^GLshort;
  72. PGLushort = ^GLushort;
  73. PGLvoid = Pointer;
  74. PPGLvoid = ^PGLvoid;
  75. PGLint64 = ^GLint64;
  76. PGLuint64 = ^GLuint64;
  77. PGLenum = ^GLenum;
  78. PGLuint = ^GLuint;
  79. PGLchar = ^GLchar;
  80. PPGLchar = ^PGLChar;
  81. PGLbitfield = ^GLbitfield;
  82. PGLint = ^GLint;
  83. PGLboolean = ^GLboolean;
  84. PGLsizei = ^GLsizei;
  85. PGLfloat = ^GLfloat;
  86. { OpenGL ES 3.0 }
  87. GLsync = Pointer;
  88. const
  89. { OpenGL ES 2.0 }
  90. GL_DEPTH_BUFFER_BIT = $00000100;
  91. GL_STENCIL_BUFFER_BIT = $00000400;
  92. GL_COLOR_BUFFER_BIT = $00004000;
  93. GL_FALSE = $0000;
  94. GL_TRUE = $0001;
  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. GL_ZERO = $0000;
  103. GL_ONE = $0001;
  104. GL_SRC_COLOR = $0300;
  105. GL_ONE_MINUS_SRC_COLOR = $0301;
  106. GL_SRC_ALPHA = $0302;
  107. GL_ONE_MINUS_SRC_ALPHA = $0303;
  108. GL_DST_ALPHA = $0304;
  109. GL_ONE_MINUS_DST_ALPHA = $0305;
  110. GL_DST_COLOR = $0306;
  111. GL_ONE_MINUS_DST_COLOR = $0307;
  112. GL_SRC_ALPHA_SATURATE = $0308;
  113. GL_FUNC_ADD = $8006;
  114. GL_BLEND_EQUATION = $8009;
  115. GL_BLEND_EQUATION_RGB = $8009;
  116. GL_BLEND_EQUATION_ALPHA = $883D;
  117. GL_FUNC_SUBTRACT = $800A;
  118. GL_FUNC_REVERSE_SUBTRACT = $800B;
  119. GL_BLEND_DST_RGB = $80C8;
  120. GL_BLEND_SRC_RGB = $80C9;
  121. GL_BLEND_DST_ALPHA = $80CA;
  122. GL_BLEND_SRC_ALPHA = $80CB;
  123. GL_CONSTANT_COLOR = $8001;
  124. GL_ONE_MINUS_CONSTANT_COLOR = $8002;
  125. GL_CONSTANT_ALPHA = $8003;
  126. GL_ONE_MINUS_CONSTANT_ALPHA = $8004;
  127. GL_BLEND_COLOR = $8005;
  128. GL_ARRAY_BUFFER = $8892;
  129. GL_ELEMENT_ARRAY_BUFFER = $8893;
  130. GL_ARRAY_BUFFER_BINDING = $8894;
  131. GL_ELEMENT_ARRAY_BUFFER_BINDING = $8895;
  132. GL_STREAM_DRAW = $88E0;
  133. GL_STATIC_DRAW = $88E4;
  134. GL_DYNAMIC_DRAW = $88E8;
  135. GL_BUFFER_SIZE = $8764;
  136. GL_BUFFER_USAGE = $8765;
  137. GL_CURRENT_VERTEX_ATTRIB = $8626;
  138. GL_FRONT = $0404;
  139. GL_BACK = $0405;
  140. GL_FRONT_AND_BACK = $0408;
  141. GL_TEXTURE_2D = $0DE1;
  142. GL_CULL_FACE = $0B44;
  143. GL_BLEND = $0BE2;
  144. GL_DITHER = $0BD0;
  145. GL_STENCIL_TEST = $0B90;
  146. GL_DEPTH_TEST = $0B71;
  147. GL_SCISSOR_TEST = $0C11;
  148. GL_POLYGON_OFFSET_FILL = $8037;
  149. GL_SAMPLE_ALPHA_TO_COVERAGE = $809E;
  150. GL_SAMPLE_COVERAGE = $80A0;
  151. GL_NO_ERROR = $0000;
  152. GL_INVALID_ENUM = $0500;
  153. GL_INVALID_VALUE = $0501;
  154. GL_INVALID_OPERATION = $0502;
  155. GL_OUT_OF_MEMORY = $0505;
  156. GL_CW = $0900;
  157. GL_CCW = $0901;
  158. GL_LINE_WIDTH = $0B21;
  159. GL_ALIASED_POINT_SIZE_RANGE = $846D;
  160. GL_ALIASED_LINE_WIDTH_RANGE = $846E;
  161. GL_CULL_FACE_MODE = $0B45;
  162. GL_FRONT_FACE = $0B46;
  163. GL_DEPTH_RANGE = $0B70;
  164. GL_DEPTH_WRITEMASK = $0B72;
  165. GL_DEPTH_CLEAR_VALUE = $0B73;
  166. GL_DEPTH_FUNC = $0B74;
  167. GL_STENCIL_CLEAR_VALUE = $0B91;
  168. GL_STENCIL_FUNC = $0B92;
  169. GL_STENCIL_FAIL = $0B94;
  170. GL_STENCIL_PASS_DEPTH_FAIL = $0B95;
  171. GL_STENCIL_PASS_DEPTH_PASS = $0B96;
  172. GL_STENCIL_REF = $0B97;
  173. GL_STENCIL_VALUE_MASK = $0B93;
  174. GL_STENCIL_WRITEMASK = $0B98;
  175. GL_STENCIL_BACK_FUNC = $8800;
  176. GL_STENCIL_BACK_FAIL = $8801;
  177. GL_STENCIL_BACK_PASS_DEPTH_FAIL = $8802;
  178. GL_STENCIL_BACK_PASS_DEPTH_PASS = $8803;
  179. GL_STENCIL_BACK_REF = $8CA3;
  180. GL_STENCIL_BACK_VALUE_MASK = $8CA4;
  181. GL_STENCIL_BACK_WRITEMASK = $8CA5;
  182. GL_VIEWPORT = $0BA2;
  183. GL_SCISSOR_BOX = $0C10;
  184. GL_COLOR_CLEAR_VALUE = $0C22;
  185. GL_COLOR_WRITEMASK = $0C23;
  186. GL_UNPACK_ALIGNMENT = $0CF5;
  187. GL_PACK_ALIGNMENT = $0D05;
  188. GL_MAX_TEXTURE_SIZE = $0D33;
  189. GL_MAX_VIEWPORT_DIMS = $0D3A;
  190. GL_SUBPIXEL_BITS = $0D50;
  191. GL_RED_BITS = $0D52;
  192. GL_GREEN_BITS = $0D53;
  193. GL_BLUE_BITS = $0D54;
  194. GL_ALPHA_BITS = $0D55;
  195. GL_DEPTH_BITS = $0D56;
  196. GL_STENCIL_BITS = $0D57;
  197. GL_POLYGON_OFFSET_UNITS = $2A00;
  198. GL_POLYGON_OFFSET_FACTOR = $8038;
  199. GL_TEXTURE_BINDING_2D = $8069;
  200. GL_SAMPLE_BUFFERS = $80A8;
  201. GL_SAMPLES = $80A9;
  202. GL_SAMPLE_COVERAGE_VALUE = $80AA;
  203. GL_SAMPLE_COVERAGE_INVERT = $80AB;
  204. GL_NUM_COMPRESSED_TEXTURE_FORMATS = $86A2;
  205. GL_COMPRESSED_TEXTURE_FORMATS = $86A3;
  206. GL_DONT_CARE = $1100;
  207. GL_FASTEST = $1101;
  208. GL_NICEST = $1102;
  209. GL_GENERATE_MIPMAP_HINT = $8192;
  210. GL_BYTE = $1400;
  211. GL_UNSIGNED_BYTE = $1401;
  212. GL_SHORT = $1402;
  213. GL_UNSIGNED_SHORT = $1403;
  214. GL_INT = $1404;
  215. GL_UNSIGNED_INT = $1405;
  216. GL_FLOAT = $1406;
  217. GL_FIXED = $140C;
  218. GL_DEPTH_COMPONENT = $1902;
  219. GL_ALPHA = $1906;
  220. GL_RGB = $1907;
  221. GL_RGBA = $1908;
  222. GL_LUMINANCE = $1909;
  223. GL_LUMINANCE_ALPHA = $190A;
  224. GL_UNSIGNED_SHORT_4_4_4_4 = $8033;
  225. GL_UNSIGNED_SHORT_5_5_5_1 = $8034;
  226. GL_UNSIGNED_SHORT_5_6_5 = $8363;
  227. GL_FRAGMENT_SHADER = $8B30;
  228. GL_VERTEX_SHADER = $8B31;
  229. GL_MAX_VERTEX_ATTRIBS = $8869;
  230. GL_MAX_VERTEX_UNIFORM_VECTORS = $8DFB;
  231. GL_MAX_VARYING_VECTORS = $8DFC;
  232. GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS = $8B4D;
  233. GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS = $8B4C;
  234. GL_MAX_TEXTURE_IMAGE_UNITS = $8872;
  235. GL_MAX_FRAGMENT_UNIFORM_VECTORS = $8DFD;
  236. GL_SHADER_TYPE = $8B4F;
  237. GL_DELETE_STATUS = $8B80;
  238. GL_LINK_STATUS = $8B82;
  239. GL_VALIDATE_STATUS = $8B83;
  240. GL_ATTACHED_SHADERS = $8B85;
  241. GL_ACTIVE_UNIFORMS = $8B86;
  242. GL_ACTIVE_UNIFORM_MAX_LENGTH = $8B87;
  243. GL_ACTIVE_ATTRIBUTES = $8B89;
  244. GL_ACTIVE_ATTRIBUTE_MAX_LENGTH = $8B8A;
  245. GL_SHADING_LANGUAGE_VERSION = $8B8C;
  246. GL_CURRENT_PROGRAM = $8B8D;
  247. GL_NEVER = $0200;
  248. GL_LESS = $0201;
  249. GL_EQUAL = $0202;
  250. GL_LEQUAL = $0203;
  251. GL_GREATER = $0204;
  252. GL_NOTEQUAL = $0205;
  253. GL_GEQUAL = $0206;
  254. GL_ALWAYS = $0207;
  255. GL_KEEP = $1E00;
  256. GL_REPLACE = $1E01;
  257. GL_INCR = $1E02;
  258. GL_DECR = $1E03;
  259. GL_INVERT = $150A;
  260. GL_INCR_WRAP = $8507;
  261. GL_DECR_WRAP = $8508;
  262. GL_VENDOR = $1F00;
  263. GL_RENDERER = $1F01;
  264. GL_VERSION = $1F02;
  265. GL_EXTENSIONS = $1F03;
  266. GL_NEAREST = $2600;
  267. GL_LINEAR = $2601;
  268. GL_NEAREST_MIPMAP_NEAREST = $2700;
  269. GL_LINEAR_MIPMAP_NEAREST = $2701;
  270. GL_NEAREST_MIPMAP_LINEAR = $2702;
  271. GL_LINEAR_MIPMAP_LINEAR = $2703;
  272. GL_TEXTURE_MAG_FILTER = $2800;
  273. GL_TEXTURE_MIN_FILTER = $2801;
  274. GL_TEXTURE_WRAP_S = $2802;
  275. GL_TEXTURE_WRAP_T = $2803;
  276. GL_TEXTURE = $1702;
  277. GL_TEXTURE_CUBE_MAP = $8513;
  278. GL_TEXTURE_BINDING_CUBE_MAP = $8514;
  279. GL_TEXTURE_CUBE_MAP_POSITIVE_X = $8515;
  280. GL_TEXTURE_CUBE_MAP_NEGATIVE_X = $8516;
  281. GL_TEXTURE_CUBE_MAP_POSITIVE_Y = $8517;
  282. GL_TEXTURE_CUBE_MAP_NEGATIVE_Y = $8518;
  283. GL_TEXTURE_CUBE_MAP_POSITIVE_Z = $8519;
  284. GL_TEXTURE_CUBE_MAP_NEGATIVE_Z = $851A;
  285. GL_MAX_CUBE_MAP_TEXTURE_SIZE = $851C;
  286. GL_TEXTURE0 = $84C0;
  287. GL_TEXTURE1 = $84C1;
  288. GL_TEXTURE2 = $84C2;
  289. GL_TEXTURE3 = $84C3;
  290. GL_TEXTURE4 = $84C4;
  291. GL_TEXTURE5 = $84C5;
  292. GL_TEXTURE6 = $84C6;
  293. GL_TEXTURE7 = $84C7;
  294. GL_TEXTURE8 = $84C8;
  295. GL_TEXTURE9 = $84C9;
  296. GL_TEXTURE10 = $84CA;
  297. GL_TEXTURE11 = $84CB;
  298. GL_TEXTURE12 = $84CC;
  299. GL_TEXTURE13 = $84CD;
  300. GL_TEXTURE14 = $84CE;
  301. GL_TEXTURE15 = $84CF;
  302. GL_TEXTURE16 = $84D0;
  303. GL_TEXTURE17 = $84D1;
  304. GL_TEXTURE18 = $84D2;
  305. GL_TEXTURE19 = $84D3;
  306. GL_TEXTURE20 = $84D4;
  307. GL_TEXTURE21 = $84D5;
  308. GL_TEXTURE22 = $84D6;
  309. GL_TEXTURE23 = $84D7;
  310. GL_TEXTURE24 = $84D8;
  311. GL_TEXTURE25 = $84D9;
  312. GL_TEXTURE26 = $84DA;
  313. GL_TEXTURE27 = $84DB;
  314. GL_TEXTURE28 = $84DC;
  315. GL_TEXTURE29 = $84DD;
  316. GL_TEXTURE30 = $84DE;
  317. GL_TEXTURE31 = $84DF;
  318. GL_ACTIVE_TEXTURE = $84E0;
  319. GL_REPEAT = $2901;
  320. GL_CLAMP_TO_EDGE = $812F;
  321. GL_MIRRORED_REPEAT = $8370;
  322. GL_FLOAT_VEC2 = $8B50;
  323. GL_FLOAT_VEC3 = $8B51;
  324. GL_FLOAT_VEC4 = $8B52;
  325. GL_INT_VEC2 = $8B53;
  326. GL_INT_VEC3 = $8B54;
  327. GL_INT_VEC4 = $8B55;
  328. GL_BOOL = $8B56;
  329. GL_BOOL_VEC2 = $8B57;
  330. GL_BOOL_VEC3 = $8B58;
  331. GL_BOOL_VEC4 = $8B59;
  332. GL_FLOAT_MAT2 = $8B5A;
  333. GL_FLOAT_MAT3 = $8B5B;
  334. GL_FLOAT_MAT4 = $8B5C;
  335. GL_SAMPLER_2D = $8B5E;
  336. GL_SAMPLER_CUBE = $8B60;
  337. GL_VERTEX_ATTRIB_ARRAY_ENABLED = $8622;
  338. GL_VERTEX_ATTRIB_ARRAY_SIZE = $8623;
  339. GL_VERTEX_ATTRIB_ARRAY_STRIDE = $8624;
  340. GL_VERTEX_ATTRIB_ARRAY_TYPE = $8625;
  341. GL_VERTEX_ATTRIB_ARRAY_NORMALIZED = $886A;
  342. GL_VERTEX_ATTRIB_ARRAY_POINTER = $8645;
  343. GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING = $889F;
  344. GL_IMPLEMENTATION_COLOR_READ_TYPE = $8B9A;
  345. GL_IMPLEMENTATION_COLOR_READ_FORMAT = $8B9B;
  346. GL_COMPILE_STATUS = $8B81;
  347. GL_INFO_LOG_LENGTH = $8B84;
  348. GL_SHADER_SOURCE_LENGTH = $8B88;
  349. GL_SHADER_COMPILER = $8DFA;
  350. GL_SHADER_BINARY_FORMATS = $8DF8;
  351. GL_NUM_SHADER_BINARY_FORMATS = $8DF9;
  352. GL_LOW_FLOAT = $8DF0;
  353. GL_MEDIUM_FLOAT = $8DF1;
  354. GL_HIGH_FLOAT = $8DF2;
  355. GL_LOW_INT = $8DF3;
  356. GL_MEDIUM_INT = $8DF4;
  357. GL_HIGH_INT = $8DF5;
  358. GL_FRAMEBUFFER = $8D40;
  359. GL_RENDERBUFFER = $8D41;
  360. GL_RGBA4 = $8056;
  361. GL_RGB5_A1 = $8057;
  362. GL_RGB565 = $8D62;
  363. GL_DEPTH_COMPONENT16 = $81A5;
  364. GL_STENCIL_INDEX8 = $8D48;
  365. GL_RENDERBUFFER_WIDTH = $8D42;
  366. GL_RENDERBUFFER_HEIGHT = $8D43;
  367. GL_RENDERBUFFER_INTERNAL_FORMAT = $8D44;
  368. GL_RENDERBUFFER_RED_SIZE = $8D50;
  369. GL_RENDERBUFFER_GREEN_SIZE = $8D51;
  370. GL_RENDERBUFFER_BLUE_SIZE = $8D52;
  371. GL_RENDERBUFFER_ALPHA_SIZE = $8D53;
  372. GL_RENDERBUFFER_DEPTH_SIZE = $8D54;
  373. GL_RENDERBUFFER_STENCIL_SIZE = $8D55;
  374. GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE = $8CD0;
  375. GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME = $8CD1;
  376. GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL = $8CD2;
  377. GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE = $8CD3;
  378. GL_COLOR_ATTACHMENT0 = $8CE0;
  379. GL_DEPTH_ATTACHMENT = $8D00;
  380. GL_STENCIL_ATTACHMENT = $8D20;
  381. GL_NONE = $0000;
  382. GL_FRAMEBUFFER_COMPLETE = $8CD5;
  383. GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT = $8CD6;
  384. GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT = $8CD7;
  385. GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS = $8CD9;
  386. GL_FRAMEBUFFER_UNSUPPORTED = $8CDD;
  387. GL_FRAMEBUFFER_BINDING = $8CA6;
  388. GL_RENDERBUFFER_BINDING = $8CA7;
  389. GL_MAX_RENDERBUFFER_SIZE = $84E8;
  390. GL_INVALID_FRAMEBUFFER_OPERATION = $0506;
  391. { OpenGL ES 3.0 }
  392. GL_READ_BUFFER = $0C02;
  393. GL_UNPACK_ROW_LENGTH = $0CF2;
  394. GL_UNPACK_SKIP_ROWS = $0CF3;
  395. GL_UNPACK_SKIP_PIXELS = $0CF4;
  396. GL_PACK_ROW_LENGTH = $0D02;
  397. GL_PACK_SKIP_ROWS = $0D03;
  398. GL_PACK_SKIP_PIXELS = $0D04;
  399. GL_COLOR = $1800;
  400. GL_DEPTH = $1801;
  401. GL_STENCIL = $1802;
  402. GL_RED = $1903;
  403. GL_RGB8 = $8051;
  404. GL_RGBA8 = $8058;
  405. GL_RGB10_A2 = $8059;
  406. GL_TEXTURE_BINDING_3D = $806A;
  407. GL_UNPACK_SKIP_IMAGES = $806D;
  408. GL_UNPACK_IMAGE_HEIGHT = $806E;
  409. GL_TEXTURE_3D = $806F;
  410. GL_TEXTURE_WRAP_R = $8072;
  411. GL_MAX_3D_TEXTURE_SIZE = $8073;
  412. GL_UNSIGNED_INT_2_10_10_10_REV = $8368;
  413. GL_MAX_ELEMENTS_VERTICES = $80E8;
  414. GL_MAX_ELEMENTS_INDICES = $80E9;
  415. GL_TEXTURE_MIN_LOD = $813A;
  416. GL_TEXTURE_MAX_LOD = $813B;
  417. GL_TEXTURE_BASE_LEVEL = $813C;
  418. GL_TEXTURE_MAX_LEVEL = $813D;
  419. GL_MIN = $8007;
  420. GL_MAX = $8008;
  421. GL_DEPTH_COMPONENT24 = $81A6;
  422. GL_MAX_TEXTURE_LOD_BIAS = $84FD;
  423. GL_TEXTURE_COMPARE_MODE = $884C;
  424. GL_TEXTURE_COMPARE_FUNC = $884D;
  425. GL_CURRENT_QUERY = $8865;
  426. GL_QUERY_RESULT = $8866;
  427. GL_QUERY_RESULT_AVAILABLE = $8867;
  428. GL_BUFFER_MAPPED = $88BC;
  429. GL_BUFFER_MAP_POINTER = $88BD;
  430. GL_STREAM_READ = $88E1;
  431. GL_STREAM_COPY = $88E2;
  432. GL_STATIC_READ = $88E5;
  433. GL_STATIC_COPY = $88E6;
  434. GL_DYNAMIC_READ = $88E9;
  435. GL_DYNAMIC_COPY = $88EA;
  436. GL_MAX_DRAW_BUFFERS = $8824;
  437. GL_DRAW_BUFFER0 = $8825;
  438. GL_DRAW_BUFFER1 = $8826;
  439. GL_DRAW_BUFFER2 = $8827;
  440. GL_DRAW_BUFFER3 = $8828;
  441. GL_DRAW_BUFFER4 = $8829;
  442. GL_DRAW_BUFFER5 = $882A;
  443. GL_DRAW_BUFFER6 = $882B;
  444. GL_DRAW_BUFFER7 = $882C;
  445. GL_DRAW_BUFFER8 = $882D;
  446. GL_DRAW_BUFFER9 = $882E;
  447. GL_DRAW_BUFFER10 = $882F;
  448. GL_DRAW_BUFFER11 = $8830;
  449. GL_DRAW_BUFFER12 = $8831;
  450. GL_DRAW_BUFFER13 = $8832;
  451. GL_DRAW_BUFFER14 = $8833;
  452. GL_DRAW_BUFFER15 = $8834;
  453. GL_MAX_FRAGMENT_UNIFORM_COMPONENTS = $8B49;
  454. GL_MAX_VERTEX_UNIFORM_COMPONENTS = $8B4A;
  455. GL_SAMPLER_3D = $8B5F;
  456. GL_SAMPLER_2D_SHADOW = $8B62;
  457. GL_FRAGMENT_SHADER_DERIVATIVE_HINT = $8B8B;
  458. GL_PIXEL_PACK_BUFFER = $88EB;
  459. GL_PIXEL_UNPACK_BUFFER = $88EC;
  460. GL_PIXEL_PACK_BUFFER_BINDING = $88ED;
  461. GL_PIXEL_UNPACK_BUFFER_BINDING = $88EF;
  462. GL_FLOAT_MAT2x3 = $8B65;
  463. GL_FLOAT_MAT2x4 = $8B66;
  464. GL_FLOAT_MAT3x2 = $8B67;
  465. GL_FLOAT_MAT3x4 = $8B68;
  466. GL_FLOAT_MAT4x2 = $8B69;
  467. GL_FLOAT_MAT4x3 = $8B6A;
  468. GL_SRGB = $8C40;
  469. GL_SRGB8 = $8C41;
  470. GL_SRGB8_ALPHA8 = $8C43;
  471. GL_COMPARE_REF_TO_TEXTURE = $884E;
  472. GL_MAJOR_VERSION = $821B;
  473. GL_MINOR_VERSION = $821C;
  474. GL_NUM_EXTENSIONS = $821D;
  475. GL_RGBA32F = $8814;
  476. GL_RGB32F = $8815;
  477. GL_RGBA16F = $881A;
  478. GL_RGB16F = $881B;
  479. GL_VERTEX_ATTRIB_ARRAY_INTEGER = $88FD;
  480. GL_MAX_ARRAY_TEXTURE_LAYERS = $88FF;
  481. GL_MIN_PROGRAM_TEXEL_OFFSET = $8904;
  482. GL_MAX_PROGRAM_TEXEL_OFFSET = $8905;
  483. GL_MAX_VARYING_COMPONENTS = $8B4B;
  484. GL_TEXTURE_2D_ARRAY = $8C1A;
  485. GL_TEXTURE_BINDING_2D_ARRAY = $8C1D;
  486. GL_R11F_G11F_B10F = $8C3A;
  487. GL_UNSIGNED_INT_10F_11F_11F_REV = $8C3B;
  488. GL_RGB9_E5 = $8C3D;
  489. GL_UNSIGNED_INT_5_9_9_9_REV = $8C3E;
  490. GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH = $8C76;
  491. GL_TRANSFORM_FEEDBACK_BUFFER_MODE = $8C7F;
  492. GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS = $8C80;
  493. GL_TRANSFORM_FEEDBACK_VARYINGS = $8C83;
  494. GL_TRANSFORM_FEEDBACK_BUFFER_START = $8C84;
  495. GL_TRANSFORM_FEEDBACK_BUFFER_SIZE = $8C85;
  496. GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN = $8C88;
  497. GL_RASTERIZER_DISCARD = $8C89;
  498. GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS = $8C8A;
  499. GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS = $8C8B;
  500. GL_INTERLEAVED_ATTRIBS = $8C8C;
  501. GL_SEPARATE_ATTRIBS = $8C8D;
  502. GL_TRANSFORM_FEEDBACK_BUFFER = $8C8E;
  503. GL_TRANSFORM_FEEDBACK_BUFFER_BINDING = $8C8F;
  504. GL_RGBA32UI = $8D70;
  505. GL_RGB32UI = $8D71;
  506. GL_RGBA16UI = $8D76;
  507. GL_RGB16UI = $8D77;
  508. GL_RGBA8UI = $8D7C;
  509. GL_RGB8UI = $8D7D;
  510. GL_RGBA32I = $8D82;
  511. GL_RGB32I = $8D83;
  512. GL_RGBA16I = $8D88;
  513. GL_RGB16I = $8D89;
  514. GL_RGBA8I = $8D8E;
  515. GL_RGB8I = $8D8F;
  516. GL_RED_INTEGER = $8D94;
  517. GL_RGB_INTEGER = $8D98;
  518. GL_RGBA_INTEGER = $8D99;
  519. GL_SAMPLER_2D_ARRAY = $8DC1;
  520. GL_SAMPLER_2D_ARRAY_SHADOW = $8DC4;
  521. GL_SAMPLER_CUBE_SHADOW = $8DC5;
  522. GL_UNSIGNED_INT_VEC2 = $8DC6;
  523. GL_UNSIGNED_INT_VEC3 = $8DC7;
  524. GL_UNSIGNED_INT_VEC4 = $8DC8;
  525. GL_INT_SAMPLER_2D = $8DCA;
  526. GL_INT_SAMPLER_3D = $8DCB;
  527. GL_INT_SAMPLER_CUBE = $8DCC;
  528. GL_INT_SAMPLER_2D_ARRAY = $8DCF;
  529. GL_UNSIGNED_INT_SAMPLER_2D = $8DD2;
  530. GL_UNSIGNED_INT_SAMPLER_3D = $8DD3;
  531. GL_UNSIGNED_INT_SAMPLER_CUBE = $8DD4;
  532. GL_UNSIGNED_INT_SAMPLER_2D_ARRAY = $8DD7;
  533. GL_BUFFER_ACCESS_FLAGS = $911F;
  534. GL_BUFFER_MAP_LENGTH = $9120;
  535. GL_BUFFER_MAP_OFFSET = $9121;
  536. GL_DEPTH_COMPONENT32F = $8CAC;
  537. GL_DEPTH32F_STENCIL8 = $8CAD;
  538. GL_FLOAT_32_UNSIGNED_INT_24_8_REV = $8DAD;
  539. GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING = $8210;
  540. GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE = $8211;
  541. GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE = $8212;
  542. GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE = $8213;
  543. GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE = $8214;
  544. GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE = $8215;
  545. GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE = $8216;
  546. GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE = $8217;
  547. GL_FRAMEBUFFER_DEFAULT = $8218;
  548. GL_FRAMEBUFFER_UNDEFINED = $8219;
  549. GL_DEPTH_STENCIL_ATTACHMENT = $821A;
  550. GL_DEPTH_STENCIL = $84F9;
  551. GL_UNSIGNED_INT_24_8 = $84FA;
  552. GL_DEPTH24_STENCIL8 = $88F0;
  553. GL_UNSIGNED_NORMALIZED = $8C17;
  554. GL_DRAW_FRAMEBUFFER_BINDING = $8CA6;
  555. GL_READ_FRAMEBUFFER = $8CA8;
  556. GL_DRAW_FRAMEBUFFER = $8CA9;
  557. GL_READ_FRAMEBUFFER_BINDING = $8CAA;
  558. GL_RENDERBUFFER_SAMPLES = $8CAB;
  559. GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER = $8CD4;
  560. GL_MAX_COLOR_ATTACHMENTS = $8CDF;
  561. GL_COLOR_ATTACHMENT1 = $8CE1;
  562. GL_COLOR_ATTACHMENT2 = $8CE2;
  563. GL_COLOR_ATTACHMENT3 = $8CE3;
  564. GL_COLOR_ATTACHMENT4 = $8CE4;
  565. GL_COLOR_ATTACHMENT5 = $8CE5;
  566. GL_COLOR_ATTACHMENT6 = $8CE6;
  567. GL_COLOR_ATTACHMENT7 = $8CE7;
  568. GL_COLOR_ATTACHMENT8 = $8CE8;
  569. GL_COLOR_ATTACHMENT9 = $8CE9;
  570. GL_COLOR_ATTACHMENT10 = $8CEA;
  571. GL_COLOR_ATTACHMENT11 = $8CEB;
  572. GL_COLOR_ATTACHMENT12 = $8CEC;
  573. GL_COLOR_ATTACHMENT13 = $8CED;
  574. GL_COLOR_ATTACHMENT14 = $8CEE;
  575. GL_COLOR_ATTACHMENT15 = $8CEF;
  576. GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE = $8D56;
  577. GL_MAX_SAMPLES = $8D57;
  578. GL_HALF_FLOAT = $140B;
  579. GL_MAP_READ_BIT = $0001;
  580. GL_MAP_WRITE_BIT = $0002;
  581. GL_MAP_INVALIDATE_RANGE_BIT = $0004;
  582. GL_MAP_INVALIDATE_BUFFER_BIT = $0008;
  583. GL_MAP_FLUSH_EXPLICIT_BIT = $0010;
  584. GL_MAP_UNSYNCHRONIZED_BIT = $0020;
  585. GL_RG = $8227;
  586. GL_RG_INTEGER = $8228;
  587. GL_R8 = $8229;
  588. GL_RG8 = $822B;
  589. GL_R16F = $822D;
  590. GL_R32F = $822E;
  591. GL_RG16F = $822F;
  592. GL_RG32F = $8230;
  593. GL_R8I = $8231;
  594. GL_R8UI = $8232;
  595. GL_R16I = $8233;
  596. GL_R16UI = $8234;
  597. GL_R32I = $8235;
  598. GL_R32UI = $8236;
  599. GL_RG8I = $8237;
  600. GL_RG8UI = $8238;
  601. GL_RG16I = $8239;
  602. GL_RG16UI = $823A;
  603. GL_RG32I = $823B;
  604. GL_RG32UI = $823C;
  605. GL_VERTEX_ARRAY_BINDING = $85B5;
  606. GL_R8_SNORM = $8F94;
  607. GL_RG8_SNORM = $8F95;
  608. GL_RGB8_SNORM = $8F96;
  609. GL_RGBA8_SNORM = $8F97;
  610. GL_SIGNED_NORMALIZED = $8F9C;
  611. GL_PRIMITIVE_RESTART_FIXED_INDEX = $8D69;
  612. GL_COPY_READ_BUFFER = $8F36;
  613. GL_COPY_WRITE_BUFFER = $8F37;
  614. GL_COPY_READ_BUFFER_BINDING = $8F36;
  615. GL_COPY_WRITE_BUFFER_BINDING = $8F37;
  616. GL_UNIFORM_BUFFER = $8A11;
  617. GL_UNIFORM_BUFFER_BINDING = $8A28;
  618. GL_UNIFORM_BUFFER_START = $8A29;
  619. GL_UNIFORM_BUFFER_SIZE = $8A2A;
  620. GL_MAX_VERTEX_UNIFORM_BLOCKS = $8A2B;
  621. GL_MAX_FRAGMENT_UNIFORM_BLOCKS = $8A2D;
  622. GL_MAX_COMBINED_UNIFORM_BLOCKS = $8A2E;
  623. GL_MAX_UNIFORM_BUFFER_BINDINGS = $8A2F;
  624. GL_MAX_UNIFORM_BLOCK_SIZE = $8A30;
  625. GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS = $8A31;
  626. GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS = $8A33;
  627. GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT = $8A34;
  628. GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH = $8A35;
  629. GL_ACTIVE_UNIFORM_BLOCKS = $8A36;
  630. GL_UNIFORM_TYPE = $8A37;
  631. GL_UNIFORM_SIZE = $8A38;
  632. GL_UNIFORM_NAME_LENGTH = $8A39;
  633. GL_UNIFORM_BLOCK_INDEX = $8A3A;
  634. GL_UNIFORM_OFFSET = $8A3B;
  635. GL_UNIFORM_ARRAY_STRIDE = $8A3C;
  636. GL_UNIFORM_MATRIX_STRIDE = $8A3D;
  637. GL_UNIFORM_IS_ROW_MAJOR = $8A3E;
  638. GL_UNIFORM_BLOCK_BINDING = $8A3F;
  639. GL_UNIFORM_BLOCK_DATA_SIZE = $8A40;
  640. GL_UNIFORM_BLOCK_NAME_LENGTH = $8A41;
  641. GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS = $8A42;
  642. GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES = $8A43;
  643. GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER = $8A44;
  644. GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER = $8A46;
  645. GL_INVALID_INDEX = $FFFFFFFF;
  646. GL_MAX_VERTEX_OUTPUT_COMPONENTS = $9122;
  647. GL_MAX_FRAGMENT_INPUT_COMPONENTS = $9125;
  648. GL_MAX_SERVER_WAIT_TIMEOUT = $9111;
  649. GL_OBJECT_TYPE = $9112;
  650. GL_SYNC_CONDITION = $9113;
  651. GL_SYNC_STATUS = $9114;
  652. GL_SYNC_FLAGS = $9115;
  653. GL_SYNC_FENCE = $9116;
  654. GL_SYNC_GPU_COMMANDS_COMPLETE = $9117;
  655. GL_UNSIGNALED = $9118;
  656. GL_SIGNALED = $9119;
  657. GL_ALREADY_SIGNALED = $911A;
  658. GL_TIMEOUT_EXPIRED = $911B;
  659. GL_CONDITION_SATISFIED = $911C;
  660. GL_WAIT_FAILED = $911D;
  661. GL_SYNC_FLUSH_COMMANDS_BIT = $00000001;
  662. GL_TIMEOUT_IGNORED = $FFFFFFFFFFFFFFFF;
  663. GL_VERTEX_ATTRIB_ARRAY_DIVISOR = $88FE;
  664. GL_ANY_SAMPLES_PASSED = $8C2F;
  665. GL_ANY_SAMPLES_PASSED_CONSERVATIVE = $8D6A;
  666. GL_SAMPLER_BINDING = $8919;
  667. GL_RGB10_A2UI = $906F;
  668. GL_TEXTURE_SWIZZLE_R = $8E42;
  669. GL_TEXTURE_SWIZZLE_G = $8E43;
  670. GL_TEXTURE_SWIZZLE_B = $8E44;
  671. GL_TEXTURE_SWIZZLE_A = $8E45;
  672. GL_GREEN = $1904;
  673. GL_BLUE = $1905;
  674. GL_INT_2_10_10_10_REV = $8D9F;
  675. GL_TRANSFORM_FEEDBACK = $8E22;
  676. GL_TRANSFORM_FEEDBACK_PAUSED = $8E23;
  677. GL_TRANSFORM_FEEDBACK_ACTIVE = $8E24;
  678. GL_TRANSFORM_FEEDBACK_BINDING = $8E25;
  679. GL_PROGRAM_BINARY_RETRIEVABLE_HINT = $8257;
  680. GL_PROGRAM_BINARY_LENGTH = $8741;
  681. GL_NUM_PROGRAM_BINARY_FORMATS = $87FE;
  682. GL_PROGRAM_BINARY_FORMATS = $87FF;
  683. GL_COMPRESSED_R11_EAC = $9270;
  684. GL_COMPRESSED_SIGNED_R11_EAC = $9271;
  685. GL_COMPRESSED_RG11_EAC = $9272;
  686. GL_COMPRESSED_SIGNED_RG11_EAC = $9273;
  687. GL_COMPRESSED_RGB8_ETC2 = $9274;
  688. GL_COMPRESSED_SRGB8_ETC2 = $9275;
  689. GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 = $9276;
  690. GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 = $9277;
  691. GL_COMPRESSED_RGBA8_ETC2_EAC = $9278;
  692. GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC = $9279;
  693. GL_TEXTURE_IMMUTABLE_FORMAT = $912F;
  694. GL_MAX_ELEMENT_INDEX = $8D6B;
  695. GL_NUM_SAMPLE_COUNTS = $9380;
  696. GL_TEXTURE_IMMUTABLE_LEVELS = $82DF;
  697. { OpenGL ES 3.1 }
  698. GL_COMPUTE_SHADER = $91B9;
  699. GL_MAX_COMPUTE_UNIFORM_BLOCKS = $91BB;
  700. GL_MAX_COMPUTE_TEXTURE_IMAGE_UNITS = $91BC;
  701. GL_MAX_COMPUTE_IMAGE_UNIFORMS = $91BD;
  702. GL_MAX_COMPUTE_SHARED_MEMORY_SIZE = $8262;
  703. GL_MAX_COMPUTE_UNIFORM_COMPONENTS = $8263;
  704. GL_MAX_COMPUTE_ATOMIC_COUNTER_BUFFERS = $8264;
  705. GL_MAX_COMPUTE_ATOMIC_COUNTERS = $8265;
  706. GL_MAX_COMBINED_COMPUTE_UNIFORM_COMPONENTS = $8266;
  707. GL_MAX_COMPUTE_WORK_GROUP_INVOCATIONS = $90EB;
  708. GL_MAX_COMPUTE_WORK_GROUP_COUNT = $91BE;
  709. GL_MAX_COMPUTE_WORK_GROUP_SIZE = $91BF;
  710. GL_COMPUTE_WORK_GROUP_SIZE = $8267;
  711. GL_DISPATCH_INDIRECT_BUFFER = $90EE;
  712. GL_DISPATCH_INDIRECT_BUFFER_BINDING = $90EF;
  713. GL_COMPUTE_SHADER_BIT = $00000020;
  714. GL_DRAW_INDIRECT_BUFFER = $8F3F;
  715. GL_DRAW_INDIRECT_BUFFER_BINDING = $8F43;
  716. GL_MAX_UNIFORM_LOCATIONS = $826E;
  717. GL_FRAMEBUFFER_DEFAULT_WIDTH = $9310;
  718. GL_FRAMEBUFFER_DEFAULT_HEIGHT = $9311;
  719. GL_FRAMEBUFFER_DEFAULT_SAMPLES = $9313;
  720. GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS = $9314;
  721. GL_MAX_FRAMEBUFFER_WIDTH = $9315;
  722. GL_MAX_FRAMEBUFFER_HEIGHT = $9316;
  723. GL_MAX_FRAMEBUFFER_SAMPLES = $9318;
  724. GL_UNIFORM = $92E1;
  725. GL_UNIFORM_BLOCK = $92E2;
  726. GL_PROGRAM_INPUT = $92E3;
  727. GL_PROGRAM_OUTPUT = $92E4;
  728. GL_BUFFER_VARIABLE = $92E5;
  729. GL_SHADER_STORAGE_BLOCK = $92E6;
  730. GL_ATOMIC_COUNTER_BUFFER = $92C0;
  731. GL_TRANSFORM_FEEDBACK_VARYING = $92F4;
  732. GL_ACTIVE_RESOURCES = $92F5;
  733. GL_MAX_NAME_LENGTH = $92F6;
  734. GL_MAX_NUM_ACTIVE_VARIABLES = $92F7;
  735. GL_NAME_LENGTH = $92F9;
  736. GL_TYPE = $92FA;
  737. GL_ARRAY_SIZE = $92FB;
  738. GL_OFFSET = $92FC;
  739. GL_BLOCK_INDEX = $92FD;
  740. GL_ARRAY_STRIDE = $92FE;
  741. GL_MATRIX_STRIDE = $92FF;
  742. GL_IS_ROW_MAJOR = $9300;
  743. GL_ATOMIC_COUNTER_BUFFER_INDEX = $9301;
  744. GL_BUFFER_BINDING = $9302;
  745. GL_BUFFER_DATA_SIZE = $9303;
  746. GL_NUM_ACTIVE_VARIABLES = $9304;
  747. GL_ACTIVE_VARIABLES = $9305;
  748. GL_REFERENCED_BY_VERTEX_SHADER = $9306;
  749. GL_REFERENCED_BY_FRAGMENT_SHADER = $930A;
  750. GL_REFERENCED_BY_COMPUTE_SHADER = $930B;
  751. GL_TOP_LEVEL_ARRAY_SIZE = $930C;
  752. GL_TOP_LEVEL_ARRAY_STRIDE = $930D;
  753. GL_LOCATION = $930E;
  754. GL_VERTEX_SHADER_BIT = $00000001;
  755. GL_FRAGMENT_SHADER_BIT = $00000002;
  756. GL_ALL_SHADER_BITS = $FFFFFFFF;
  757. GL_PROGRAM_SEPARABLE = $8258;
  758. GL_ACTIVE_PROGRAM = $8259;
  759. GL_PROGRAM_PIPELINE_BINDING = $825A;
  760. GL_ATOMIC_COUNTER_BUFFER_BINDING = $92C1;
  761. GL_ATOMIC_COUNTER_BUFFER_START = $92C2;
  762. GL_ATOMIC_COUNTER_BUFFER_SIZE = $92C3;
  763. GL_MAX_VERTEX_ATOMIC_COUNTER_BUFFERS = $92CC;
  764. GL_MAX_FRAGMENT_ATOMIC_COUNTER_BUFFERS = $92D0;
  765. GL_MAX_COMBINED_ATOMIC_COUNTER_BUFFERS = $92D1;
  766. GL_MAX_VERTEX_ATOMIC_COUNTERS = $92D2;
  767. GL_MAX_FRAGMENT_ATOMIC_COUNTERS = $92D6;
  768. GL_MAX_COMBINED_ATOMIC_COUNTERS = $92D7;
  769. GL_MAX_ATOMIC_COUNTER_BUFFER_SIZE = $92D8;
  770. GL_MAX_ATOMIC_COUNTER_BUFFER_BINDINGS = $92DC;
  771. GL_ACTIVE_ATOMIC_COUNTER_BUFFERS = $92D9;
  772. GL_UNSIGNED_INT_ATOMIC_COUNTER = $92DB;
  773. GL_MAX_IMAGE_UNITS = $8F38;
  774. GL_MAX_VERTEX_IMAGE_UNIFORMS = $90CA;
  775. GL_MAX_FRAGMENT_IMAGE_UNIFORMS = $90CE;
  776. GL_MAX_COMBINED_IMAGE_UNIFORMS = $90CF;
  777. GL_IMAGE_BINDING_NAME = $8F3A;
  778. GL_IMAGE_BINDING_LEVEL = $8F3B;
  779. GL_IMAGE_BINDING_LAYERED = $8F3C;
  780. GL_IMAGE_BINDING_LAYER = $8F3D;
  781. GL_IMAGE_BINDING_ACCESS = $8F3E;
  782. GL_IMAGE_BINDING_FORMAT = $906E;
  783. GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT = $00000001;
  784. GL_ELEMENT_ARRAY_BARRIER_BIT = $00000002;
  785. GL_UNIFORM_BARRIER_BIT = $00000004;
  786. GL_TEXTURE_FETCH_BARRIER_BIT = $00000008;
  787. GL_SHADER_IMAGE_ACCESS_BARRIER_BIT = $00000020;
  788. GL_COMMAND_BARRIER_BIT = $00000040;
  789. GL_PIXEL_BUFFER_BARRIER_BIT = $00000080;
  790. GL_TEXTURE_UPDATE_BARRIER_BIT = $00000100;
  791. GL_BUFFER_UPDATE_BARRIER_BIT = $00000200;
  792. GL_FRAMEBUFFER_BARRIER_BIT = $00000400;
  793. GL_TRANSFORM_FEEDBACK_BARRIER_BIT = $00000800;
  794. GL_ATOMIC_COUNTER_BARRIER_BIT = $00001000;
  795. GL_ALL_BARRIER_BITS = $FFFFFFFF;
  796. GL_IMAGE_2D = $904D;
  797. GL_IMAGE_3D = $904E;
  798. GL_IMAGE_CUBE = $9050;
  799. GL_IMAGE_2D_ARRAY = $9053;
  800. GL_INT_IMAGE_2D = $9058;
  801. GL_INT_IMAGE_3D = $9059;
  802. GL_INT_IMAGE_CUBE = $905B;
  803. GL_INT_IMAGE_2D_ARRAY = $905E;
  804. GL_UNSIGNED_INT_IMAGE_2D = $9063;
  805. GL_UNSIGNED_INT_IMAGE_3D = $9064;
  806. GL_UNSIGNED_INT_IMAGE_CUBE = $9066;
  807. GL_UNSIGNED_INT_IMAGE_2D_ARRAY = $9069;
  808. GL_IMAGE_FORMAT_COMPATIBILITY_TYPE = $90C7;
  809. GL_IMAGE_FORMAT_COMPATIBILITY_BY_SIZE = $90C8;
  810. GL_IMAGE_FORMAT_COMPATIBILITY_BY_CLASS = $90C9;
  811. GL_READ_ONLY = $88B8;
  812. GL_WRITE_ONLY = $88B9;
  813. GL_READ_WRITE = $88BA;
  814. GL_SHADER_STORAGE_BUFFER = $90D2;
  815. GL_SHADER_STORAGE_BUFFER_BINDING = $90D3;
  816. GL_SHADER_STORAGE_BUFFER_START = $90D4;
  817. GL_SHADER_STORAGE_BUFFER_SIZE = $90D5;
  818. GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS = $90D6;
  819. GL_MAX_FRAGMENT_SHADER_STORAGE_BLOCKS = $90DA;
  820. GL_MAX_COMPUTE_SHADER_STORAGE_BLOCKS = $90DB;
  821. GL_MAX_COMBINED_SHADER_STORAGE_BLOCKS = $90DC;
  822. GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS = $90DD;
  823. GL_MAX_SHADER_STORAGE_BLOCK_SIZE = $90DE;
  824. GL_SHADER_STORAGE_BUFFER_OFFSET_ALIGNMENT = $90DF;
  825. GL_SHADER_STORAGE_BARRIER_BIT = $00002000;
  826. GL_MAX_COMBINED_SHADER_OUTPUT_RESOURCES = $8F39;
  827. GL_DEPTH_STENCIL_TEXTURE_MODE = $90EA;
  828. GL_STENCIL_INDEX = $1901;
  829. GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET = $8E5E;
  830. GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET = $8E5F;
  831. GL_SAMPLE_POSITION = $8E50;
  832. GL_SAMPLE_MASK = $8E51;
  833. GL_SAMPLE_MASK_VALUE = $8E52;
  834. GL_TEXTURE_2D_MULTISAMPLE = $9100;
  835. GL_MAX_SAMPLE_MASK_WORDS = $8E59;
  836. GL_MAX_COLOR_TEXTURE_SAMPLES = $910E;
  837. GL_MAX_DEPTH_TEXTURE_SAMPLES = $910F;
  838. GL_MAX_INTEGER_SAMPLES = $9110;
  839. GL_TEXTURE_BINDING_2D_MULTISAMPLE = $9104;
  840. GL_TEXTURE_SAMPLES = $9106;
  841. GL_TEXTURE_FIXED_SAMPLE_LOCATIONS = $9107;
  842. GL_TEXTURE_WIDTH = $1000;
  843. GL_TEXTURE_HEIGHT = $1001;
  844. GL_TEXTURE_DEPTH = $8071;
  845. GL_TEXTURE_INTERNAL_FORMAT = $1003;
  846. GL_TEXTURE_RED_SIZE = $805C;
  847. GL_TEXTURE_GREEN_SIZE = $805D;
  848. GL_TEXTURE_BLUE_SIZE = $805E;
  849. GL_TEXTURE_ALPHA_SIZE = $805F;
  850. GL_TEXTURE_DEPTH_SIZE = $884A;
  851. GL_TEXTURE_STENCIL_SIZE = $88F1;
  852. GL_TEXTURE_SHARED_SIZE = $8C3F;
  853. GL_TEXTURE_RED_TYPE = $8C10;
  854. GL_TEXTURE_GREEN_TYPE = $8C11;
  855. GL_TEXTURE_BLUE_TYPE = $8C12;
  856. GL_TEXTURE_ALPHA_TYPE = $8C13;
  857. GL_TEXTURE_DEPTH_TYPE = $8C16;
  858. GL_TEXTURE_COMPRESSED = $86A1;
  859. GL_SAMPLER_2D_MULTISAMPLE = $9108;
  860. GL_INT_SAMPLER_2D_MULTISAMPLE = $9109;
  861. GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE = $910A;
  862. GL_VERTEX_ATTRIB_BINDING = $82D4;
  863. GL_VERTEX_ATTRIB_RELATIVE_OFFSET = $82D5;
  864. GL_VERTEX_BINDING_DIVISOR = $82D6;
  865. GL_VERTEX_BINDING_OFFSET = $82D7;
  866. GL_VERTEX_BINDING_STRIDE = $82D8;
  867. GL_VERTEX_BINDING_BUFFER = $8F4F;
  868. GL_MAX_VERTEX_ATTRIB_RELATIVE_OFFSET = $82D9;
  869. GL_MAX_VERTEX_ATTRIB_BINDINGS = $82DA;
  870. GL_MAX_VERTEX_ATTRIB_STRIDE = $82E5;
  871. type
  872. { OpenGL Es 2.0 }
  873. TglActiveTexture = procedure(aTexture: GLenum); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  874. TglAttachShader = procedure(aProgram: GLuint; aShader: GLuint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  875. TglBindAttribLocation = procedure(aProgram: GLuint; aIndex: GLuint; const aName: PGLchar); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  876. TglBindBuffer = procedure(aTarget: GLenum; aBuffer: GLuint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  877. TglBindFramebuffer = procedure(aTarget: GLenum; aFramebuffer: GLuint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  878. TglBindRenderbuffer = procedure(aTarget: GLenum; aRenderbuffer: GLuint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  879. TglBindTexture = procedure(aTarget: GLenum; aTexture: GLuint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  880. TglBlendColor = procedure(aRed: GLfloat; aGreen: GLfloat; aBlue: GLfloat; aAlpha: GLfloat); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  881. TglBlendEquation = procedure(aMode: GLenum); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  882. TglBlendEquationSeparate = procedure(aModeRGB: GLenum; aModeAlpha: GLenum); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  883. TglBlendFunc = procedure(aSFactor: GLenum; aDFactor: GLenum); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  884. TglBlendFuncSeparate = procedure(aSFactorRGB: GLenum; aDFactorRGB: GLenum; aSFactorAlpha: GLenum; aDFactorAlpha: GLenum); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  885. TglBufferData = procedure(aTarget: GLenum; aSize: PGLsizei; const aData: PGLvoid; aUsage: GLenum); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  886. TglBufferSubData = procedure(aTarget: GLenum; aOffset: PGLint; aSize: PGLsizei; const aData: PGLvoid); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  887. TglCheckFramebufferStatus = function(aTarget: GLenum): GLenum; {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  888. TglClear = procedure(aMask: GLbitfield); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  889. TglClearColor = procedure(aRed: GLfloat; aGreen: GLfloat; aBlue: GLfloat; aAlpha: GLfloat); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  890. TglClearDepthf = procedure(d: GLfloat); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  891. TglClearStencil = procedure(s: GLint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  892. TglColorMask = procedure(aRed: GLboolean; aGreen: GLboolean; aBlue: GLboolean; aAlpha: GLboolean); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  893. TglCompileShader = procedure(aShader: GLuint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  894. TglCompressedTexImage2D = procedure(aTarget: GLenum; aLevel: GLint; aInternalformat: GLenum; aWidth: GLsizei; aHeight: GLsizei; aBorder: GLint; aImageSize: GLsizei; const aData: PGLvoid); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  895. TglCompressedTexSubImage2D = procedure(aTarget: GLenum; aLevel: GLint; aXoffset: GLint; aYoffset: GLint; aWidth: GLsizei; aHeight: GLsizei; aFormat: GLenum; aImageSize: GLsizei; const aData: PGLvoid); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  896. TglCopyTexImage2D = procedure(aTarget: GLenum; aLevel: GLint; aInternalformat: GLenum; aX: GLint; aY: GLint; aWidth: GLsizei; aHeight: GLsizei; aBorder: GLint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  897. TglCopyTexSubImage2D = procedure(aTarget: GLenum; aLevel: GLint; aXoffset: GLint; aYoffset: GLint; aX: GLint; aY: GLint; aWidth: GLsizei; aHeight: GLsizei); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  898. TglCreateProgram = function: GLuint; {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  899. TglCreateShader = function(aType: GLenum): GLuint; {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  900. TglCullFace = procedure(aMode: GLenum); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  901. TglDeleteBuffers = procedure(n: GLsizei; const aBuffers: PGLuint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  902. TglDeleteFramebuffers = procedure(n: GLsizei; const aFrameBuffers: PGLuint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  903. TglDeleteProgram = procedure(aProgram: GLuint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  904. TglDeleteRenderbuffers = procedure(n: GLsizei; const aRenderBuffers: PGLuint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  905. TglDeleteShader = procedure(aShader: GLuint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  906. TglDeleteTextures = procedure(n: GLsizei; const aTextures: PGLuint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  907. TglDepthFunc = procedure(aFunc: GLenum); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  908. TglDepthMask = procedure(aFlag: GLboolean); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  909. TglDepthRangef = procedure(n: GLfloat; aF: GLfloat); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  910. TglDetachShader = procedure(aProgram: GLuint; aShader: GLuint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  911. TglDisable = procedure(aCap: GLenum); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  912. TglDisableVertexAttribArray = procedure(aIndex: GLuint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  913. TglDrawArrays = procedure(aMode: GLenum; aFirst: GLint; aCount: GLsizei); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  914. TglDrawElements = procedure(aMode: GLenum; aCount: GLsizei; aType: GLenum; const aIndices: PGLvoid); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  915. TglEnable = procedure(aCap: GLenum); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  916. TglEnableVertexAttribArray = procedure(aIndex: GLuint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  917. TglFinish = procedure; {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  918. TglFlush = procedure; {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  919. TglFramebufferRenderbuffer = procedure(aTarget: GLenum; aAttachment: GLenum; aRenderbuffertarget: GLenum; aRenderbuffer: GLuint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  920. TglFramebufferTexture2D = procedure(aTarget: GLenum; aAttachment: GLenum; aTextarget: GLenum; aTexture: GLuint; aLevel: GLint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  921. TglFrontFace = procedure(aMode: GLenum); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  922. TglGenBuffers = procedure(n: GLsizei; aBuffers: PGLuint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  923. TglGenerateMipmap = procedure(aTarget: GLenum); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  924. TglGenFramebuffers = procedure(n: GLsizei; aFramebuffers: PGLuint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  925. TglGenRenderbuffers = procedure(n: GLsizei; aRenderbuffers: PGLuint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  926. TglGenTextures = procedure(n: GLsizei; aTextures: PGLuint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  927. TglGetActiveAttrib = procedure(aProgram: GLuint; aIndex: GLuint; aBufSize: GLsizei; aLength: PGLsizei; aSize: PGLint; aType: PGLenum; aName: PGLchar); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  928. TglGetActiveUniform = procedure(aProgram: GLuint; aIndex: GLuint; aBufSize: GLsizei; aLength: PGLsizei; aSize: PGLint; aType: PGLenum; aName: PGLchar); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  929. TglGetAttachedShaders = procedure(aProgram: GLuint; aMaxCount: GLsizei; aCount: PGLsizei; aShaders: PGLuint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  930. TglGetAttribLocation = function(aProgram: GLuint; const aName: PGLchar): GLint; {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  931. TglGetBooleanv = procedure(aPname: GLenum; aData: PGLboolean); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  932. TglGetBufferParameteriv = procedure(aTarget: GLenum; aPname: GLenum; aParams: PGLint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  933. TglGetError = function: GLenum; {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  934. TglGetFloatv = procedure(aPname: GLenum; aData: PGLfloat); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  935. TglGetFramebufferAttachmentParameteriv = procedure(aTarget: GLenum; aAttachment: GLenum; aPname: GLenum; aParams: PGLint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  936. TglGetIntegerv = procedure(aPname: GLenum; aData: PGLint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  937. TglGetProgramiv = procedure(aProgram: GLuint; aPname: GLenum; aParams: PGLint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  938. TglGetProgramInfoLog = procedure(aProgram: GLuint; aBufSize: GLsizei; aLength: PGLsizei; aInfoLog: PGLchar); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  939. TglGetRenderbufferParameteriv = procedure(aTarget: GLenum; aPname: GLenum; aParams: PGLint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  940. TglGetShaderiv = procedure(aShader: GLuint; aPname: GLenum; aParams: PGLint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  941. TglGetShaderInfoLog = procedure(aShader: GLuint; aBufSize: GLsizei; aLength: PGLsizei; aInfoLog: PGLchar); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  942. TglGetShaderPrecisionFormat = procedure(aShadertype: GLenum; aPrecisiontype: GLenum; aRange: PGLint; aPrecision: PGLint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  943. TglGetShaderSource = procedure(aShader: GLuint; aBufSize: GLsizei; aLength: PGLsizei; aSource: PGLchar); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  944. TglGetString = function(aName: GLenum): PAnsiChar; {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  945. TglGetTexParameterfv = procedure(aTarget: GLenum; aPname: GLenum; aParams: PGLfloat); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  946. TglGetTexParameteriv = procedure(aTarget: GLenum; aPname: GLenum; aParams: PGLint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  947. TglGetUniformfv = procedure(aProgram: GLuint; aLocation: GLint; aParams: PGLfloat); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  948. TglGetUniformiv = procedure(aProgram: GLuint; aLocation: GLint; aParams: PGLint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  949. TglGetUniformLocation = function(aProgram: GLuint; const aName: PGLchar): GLint; {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  950. TglGetVertexAttribfv = procedure(aIndex: GLuint; aPname: GLenum; aParams: PGLfloat); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  951. TglGetVertexAttribiv = procedure(aIndex: GLuint; aPname: GLenum; aParams: PGLint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  952. TglGetVertexAttribPointerv = procedure(aIndex: GLuint; aPname: GLenum; aPointer: PPGLvoid); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  953. TglHint = procedure(aTarget: GLenum; aMode: GLenum); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  954. TglIsBuffer = function(aBuffer: GLuint): GLboolean; {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  955. TglIsEnabled = function(aCap: GLenum): GLboolean; {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  956. TglIsFramebuffer = function(aFramebuffer: GLuint): GLboolean; {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  957. TglIsProgram = function(aProgram: GLuint): GLboolean; {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  958. TglIsRenderbuffer = function(aRenderbuffer: GLuint): GLboolean; {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  959. TglIsShader = function(aShader: GLuint): GLboolean; {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  960. TglIsTexture = function(aTexture: GLuint): GLboolean; {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  961. TglLineWidth = procedure(aWidth: GLfloat); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  962. TglLinkProgram = procedure(aProgram: GLuint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  963. TglPixelStorei = procedure(aPname: GLenum; aParam: GLint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  964. TglPolygonOffset = procedure(aFactor: GLfloat; aUnits: GLfloat); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  965. TglReadPixels = procedure(aX: GLint; aY: GLint; aWidth: GLsizei; aHeight: GLsizei; aFormat: GLenum; aType: GLenum; aPixels: PGLvoid); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  966. TglReleaseShaderCompiler = procedure; {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  967. TglRenderbufferStorage = procedure(aTarget: GLenum; aInternalformat: GLenum; aWidth: GLsizei; aHeight: GLsizei); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  968. TglSampleCoverage = procedure(aValue: GLfloat; aInvert: GLboolean); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  969. TglScissor = procedure(aX: GLint; aY: GLint; aWidth: GLsizei; aHeight: GLsizei); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  970. TglShaderBinary = procedure(aCount: GLsizei; const aShaders: PGLuint; aBinaryformat: GLenum; const aBinary: PGLvoid; aLength: GLsizei); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  971. TglShaderSource = procedure(aShader: GLuint; aCount: GLsizei; const aString: PPGLchar; const aLength: PGLint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  972. TglStencilFunc = procedure(aFunc: GLenum; aRef: GLint; aMask: GLuint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  973. TglStencilFuncSeparate = procedure(aFace: GLenum; aFunc: GLenum; aRef: GLint; aMask: GLuint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  974. TglStencilMask = procedure(aMask: GLuint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  975. TglStencilMaskSeparate = procedure(aFace: GLenum; aMask: GLuint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  976. TglStencilOp = procedure(aFail: GLenum; aZfail: GLenum; aZpass: GLenum); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  977. TglStencilOpSeparate = procedure(aFace: GLenum; aSfail: GLenum; aDpfail: GLenum; aDppass: GLenum); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  978. TglTexImage2D = procedure(aTarget: GLenum; aLevel: GLint; aInternalformat: GLint; aWidth: GLsizei; aHeight: GLsizei; aBorder: GLint; aFormat: GLenum; aType: GLenum; const aPixels: PGLvoid); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  979. TglTexParameterf = procedure(aTarget: GLenum; aPname: GLenum; aParam: GLfloat); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  980. TglTexParameterfv = procedure(aTarget: GLenum; aPname: GLenum; const aParams: PGLfloat); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  981. TglTexParameteri = procedure(aTarget: GLenum; aPname: GLenum; aParam: GLint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  982. TglTexParameteriv = procedure(aTarget: GLenum; aPname: GLenum; const aParams: PGLint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  983. TglTexSubImage2D = procedure(aTarget: GLenum; aLevel: GLint; aXoffset: GLint; aYoffset: GLint; aWidth: GLsizei; aHeight: GLsizei; aFormat: GLenum; aType: GLenum; const aPixels: PGLvoid); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  984. TglUniform1f = procedure(aLocation: GLint; aV0: GLfloat); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  985. TglUniform1fv = procedure(aLocation: GLint; aCount: GLsizei; const aValue: PGLfloat); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  986. TglUniform1i = procedure(aLocation: GLint; aV0: GLint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  987. TglUniform1iv = procedure(aLocation: GLint; aCount: GLsizei; const aValue: PGLint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  988. TglUniform2f = procedure(aLocation: GLint; aV0: GLfloat; aV1: GLfloat); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  989. TglUniform2fv = procedure(aLocation: GLint; aCount: GLsizei; const aValue: PGLfloat); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  990. TglUniform2i = procedure(aLocation: GLint; aV0: GLint; aV1: GLint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  991. TglUniform2iv = procedure(aLocation: GLint; aCount: GLsizei; const aValue: PGLint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  992. TglUniform3f = procedure(aLocation: GLint; aV0: GLfloat; aV1: GLfloat; aV2: GLfloat); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  993. TglUniform3fv = procedure(aLocation: GLint; aCount: GLsizei; const aValue: PGLfloat); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  994. TglUniform3i = procedure(aLocation: GLint; aV0: GLint; aV1: GLint; aV2: GLint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  995. TglUniform3iv = procedure(aLocation: GLint; aCount: GLsizei; const aValue: PGLint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  996. TglUniform4f = procedure(aLocation: GLint; aV0: GLfloat; aV1: GLfloat; aV2: GLfloat; aV3: GLfloat); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  997. TglUniform4fv = procedure(aLocation: GLint; aCount: GLsizei; const aValue: PGLfloat); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  998. TglUniform4i = procedure(aLocation: GLint; aV0: GLint; aV1: GLint; aV2: GLint; aV3: GLint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  999. TglUniform4iv = procedure(aLocation: GLint; aCount: GLsizei; const aValue: PGLint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1000. TglUniformMatrix2fv = procedure(aLocation: GLint; aCount: GLsizei; aTranspose: GLboolean; const aValue: PGLfloat); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1001. TglUniformMatrix3fv = procedure(aLocation: GLint; aCount: GLsizei; aTranspose: GLboolean; const aValue: PGLfloat); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1002. TglUniformMatrix4fv = procedure(aLocation: GLint; aCount: GLsizei; aTranspose: GLboolean; const aValue: PGLfloat); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1003. TglUseProgram = procedure(aProgram: GLuint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1004. TglValidateProgram = procedure(aProgram: GLuint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1005. TglVertexAttrib1f = procedure(aIndex: GLuint; aX: GLfloat); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1006. TglVertexAttrib1fv = procedure(aIndex: GLuint; const v: PGLfloat); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1007. TglVertexAttrib2f = procedure(aIndex: GLuint; aX: GLfloat; aY: GLfloat); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1008. TglVertexAttrib2fv = procedure(aIndex: GLuint; const v: PGLfloat); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1009. TglVertexAttrib3f = procedure(aIndex: GLuint; aX: GLfloat; aY: GLfloat; aZ: GLfloat); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1010. TglVertexAttrib3fv = procedure(aIndex: GLuint; const v: PGLfloat); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1011. TglVertexAttrib4f = procedure(aIndex: GLuint; aX: GLfloat; aY: GLfloat; aZ: GLfloat; aW: GLfloat); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1012. TglVertexAttrib4fv = procedure(aIndex: GLuint; const v: PGLfloat); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1013. TglVertexAttribPointer = procedure(aIndex: GLuint; aSize: GLint; aType: GLenum; aNormalized: GLboolean; aStride: GLsizei; const aPointer: PGLvoid); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1014. TglViewport = procedure(aX: GLint; aY: GLint; aWidth: GLsizei; aHeight: GLsizei); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1015. { OpenGL ES 3.0 }
  1016. TglReadBuffer = procedure(aSrc: GLenum); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1017. TglDrawRangeElements = procedure(aMode: GLenum; aStart: GLuint; aEnd: GLuint; aCount: GLsizei; aType: GLenum; const aIndices: PGLvoid); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1018. TglTexImage3D = procedure(aTarget: GLenum; aLevel: GLint; aInternalformat: GLint; aWidth: GLsizei; aHeight: GLsizei; aDepth: GLsizei; aBorder: GLint; aFormat: GLenum; aType: GLenum; const aPixels: PGLvoid); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1019. TglTexSubImage3D = procedure(aTarget: GLenum; aLevel: GLint; aXoffset: GLint; aYoffset: GLint; aZoffset: GLint; aWidth: GLsizei; aHeight: GLsizei; aDepth: GLsizei; aFormat: GLenum; aType: GLenum; const aPixels: PGLvoid); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1020. TglCopyTexSubImage3D = procedure(aTarget: GLenum; aLevel: GLint; aXoffset: GLint; aYoffset: GLint; aZoffset: GLint; aX: GLint; aY: GLint; aWidth: GLsizei; aHeight: GLsizei); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1021. TglCompressedTexImage3D = procedure(aTarget: GLenum; aLevel: GLint; aInternalformat: GLenum; aWidth: GLsizei; aHeight: GLsizei; aDepth: GLsizei; aBorder: GLint; aImageSize: GLsizei; const aData: PGLvoid); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1022. TglCompressedTexSubImage3D = procedure(aTarget: GLenum; aLevel: GLint; aXoffset: GLint; aYoffset: GLint; aZoffset: GLint; aWidth: GLsizei; aHeight: GLsizei; aDepth: GLsizei; aFormat: GLenum; aImageSize: GLsizei; const aData: PGLvoid); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1023. TglGenQueries = procedure(n: GLsizei; aIDs: PGLuint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1024. TglDeleteQueries = procedure(n: GLsizei; const aIDs: PGLuint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1025. TglIsQuery = function(aId: GLuint): GLboolean; {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1026. TglBeginQuery = procedure(aTarget: GLenum; aId: GLuint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1027. TglEndQuery = procedure(aTarget: GLenum); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1028. TglGetQueryiv = procedure(aTarget: GLenum; aPname: GLenum; aParams: PGLint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1029. TglGetQueryObjectuiv = procedure(aId: GLuint; aPname: GLenum; aParams: PGLint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1030. TglUnmapBuffer = function(aTarget: GLenum): GLboolean; {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1031. TglGetBufferPointerv = procedure(aTarget: GLenum; aPname: GLenum; aParams: PPGLvoid); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1032. TglDrawBuffers = procedure(n: GLsizei; const aBufs: PGLenum); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1033. TglUniformMatrix2x3fv = procedure(aLocation: GLint; aCount: GLsizei; aTranspose: GLboolean; const aValue: PGLfloat); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1034. TglUniformMatrix3x2fv = procedure(aLocation: GLint; aCount: GLsizei; aTranspose: GLboolean; const aValue: PGLfloat); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1035. TglUniformMatrix2x4fv = procedure(aLocation: GLint; aCount: GLsizei; aTranspose: GLboolean; const aValue: PGLfloat); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1036. TglUniformMatrix4x2fv = procedure(aLocation: GLint; aCount: GLsizei; aTranspose: GLboolean; const aValue: PGLfloat); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1037. TglUniformMatrix3x4fv = procedure(aLocation: GLint; aCount: GLsizei; aTranspose: GLboolean; const aValue: PGLfloat); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1038. TglUniformMatrix4x3fv = procedure(aLocation: GLint; aCount: GLsizei; aTranspose: GLboolean; const aValue: PGLfloat); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1039. TglBlitFramebuffer = procedure(aSrcX0: GLint; aSrcY0: GLint; aSrcX1: GLint; aSrcY1: GLint; aDstX0: GLint; aDstY0: GLint; aDstX1: GLint; aDstY1: GLint; aMask: GLbitfield; aFilter: GLenum); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1040. TglRenderbufferStorageMultisample = procedure(aTarget: GLenum; aSamples: GLsizei; aInternalformat: GLenum; aWidth: GLsizei; aHeight: GLsizei); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1041. TglFramebufferTextureLayer = procedure(aTarget: GLenum; aAttachment: GLenum; aTexture: GLuint; aLevel: GLint; aLayer: GLint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1042. TglMapBufferRange = function(aTarget: GLenum; aOffset: PGLint; aLength: PGLsizei; aAccess: GLbitfield): PGLvoid; {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1043. TglFlushMappedBufferRange = procedure(aTarget: GLenum; aOffset: PGLint; aLength: PGLsizei); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1044. TglBindVertexArray = procedure(aArray: GLuint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1045. TglDeleteVertexArrays = procedure(n: GLsizei; const aArrays: PGLuint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1046. TglGenVertexArrays = procedure(n: GLsizei; aArrays: PGLuint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1047. TglIsVertexArray = function(aArray: GLuint): GLboolean; {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1048. TglGetIntegeri_v = procedure(aTarget: GLenum; aIndex: GLuint; aData: PGLint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1049. TglBeginTransformFeedback = procedure(aPrimitiveMode: GLenum); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1050. TglEndTransformFeedback = procedure; {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1051. TglBindBufferRange = procedure(aTarget: GLenum; aIndex: GLuint; aBuffer: GLuint; aOffset: PGLint; aSize: PGLsizei); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1052. TglBindBufferBase = procedure(aTarget: GLenum; aIndex: GLuint; aBuffer: GLuint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1053. TglTransformFeedbackVaryings = procedure(aProgram: GLuint; aCount: GLsizei; const aVaryings: PPGLchar; aBufferMode: GLenum); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1054. TglGetTransformFeedbackVarying = procedure(aProgram: GLuint; aIndex: GLuint; aBufSize: GLsizei; aLength: PGLsizei; aSize: PGLsizei; aType: PGLenum; aName: PGLchar); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1055. TglVertexAttribIPointer = procedure(aIndex: GLuint; aSize: GLint; aType: GLenum; aStride: GLsizei; const aPointer: PGLvoid); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1056. TglGetVertexAttribIiv = procedure(aIndex: GLuint; aPname: GLenum; aParams: PGLint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1057. TglGetVertexAttribIuiv = procedure(aIndex: GLuint; aPname: GLenum; aParams: PGLuint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1058. TglVertexAttribI4i = procedure(aIndex: GLuint; aX: GLint; aY: GLint; aZ: GLint; aW: GLint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1059. TglVertexAttribI4ui = procedure(aIndex: GLuint; aX: GLuint; aY: GLuint; aZ: GLuint; aW: GLuint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1060. TglVertexAttribI4iv = procedure(aIndex: GLuint; const v: PGLint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1061. TglVertexAttribI4uiv = procedure(aIndex: GLuint; const v: PGLint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1062. TglGetUniformuiv = procedure(aProgram: GLuint; aLocation: GLint; aParams: PGLuint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1063. TglGetFragDataLocation = function(aProgram: GLuint; const aName: PGLchar): GLint; {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1064. TglUniform1ui = procedure(aLocation: GLint; aV0: GLuint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1065. TglUniform2ui = procedure(aLocation: GLint; aV0: GLuint; aV1: GLuint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1066. TglUniform3ui = procedure(aLocation: GLint; aV0: GLuint; aV1: GLuint; aV2: GLuint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1067. TglUniform4ui = procedure(aLocation: GLint; aV0: GLuint; aV1: GLuint; aV2: GLuint; aV3: GLuint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1068. TglUniform1uiv = procedure(aLocation: GLint; aCount: GLsizei; const aValue: PGLuint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1069. TglUniform2uiv = procedure(aLocation: GLint; aCount: GLsizei; const aValue: PGLuint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1070. TglUniform3uiv = procedure(aLocation: GLint; aCount: GLsizei; const aValue: PGLuint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1071. TglUniform4uiv = procedure(aLocation: GLint; aCount: GLsizei; const aValue: PGLuint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1072. TglClearBufferiv = procedure(aBuffer: GLenum; aDrawbuffer: GLint; const aValue: PGLint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1073. TglClearBufferuiv = procedure(aBuffer: GLenum; aDrawbuffer: GLint; const aValue: PGLuint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1074. TglClearBufferfv = procedure(aBuffer: GLenum; aDrawbuffer: GLint; const aValue: PGLfloat); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1075. TglClearBufferfi = procedure(aBuffer: GLenum; aDrawbuffer: GLint; aDepth: GLfloat; aStencil: GLint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1076. TglGetStringi = function(aName: GLenum; aIndex: GLuint): PGLchar; {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1077. TglCopyBufferSubData = procedure(aReadTarget: GLenum; aWriteTarget: GLenum; aReadOffset: PGLint; aWriteOffset: PGLint; aSize: PGLsizei); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1078. TglGetUniformIndices = procedure(aProgram: GLuint; aUniformCount: GLsizei; const aUniformNames: PPGLchar; aUniformIndices: PGLuint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1079. TglGetActiveUniformsiv = procedure(aProgram: GLuint; aUniformCount: GLsizei; const aUniformIndices: PGLuint; aPname: GLenum; aParams: PGLint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1080. TglGetUniformBlockIndex = function(aProgram: GLuint; const aUniformBlockName: PGLchar): GLuint; {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1081. TglGetActiveUniformBlockiv = procedure(aProgram: GLuint; aUniformBlockIndex: GLuint; aPname: GLenum; aParams: PGLint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1082. TglGetActiveUniformBlockName = procedure(aProgram: GLuint; aUniformBlockIndex: GLuint; aBufSize: GLsizei; aLength: PGLsizei; aUniformBlockName: PGLchar); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1083. TglUniformBlockBinding = procedure(aProgram: GLuint; aUniformBlockIndex: GLuint; aUniformBlockBinding: GLuint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1084. TglDrawArraysInstanced = procedure(aMode: GLenum; aFirst: GLint; aCount: GLsizei; aInstancecount: GLsizei); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1085. TglDrawElementsInstanced = procedure(aMode: GLenum; aCount: GLsizei; aType: GLenum; const aIndices: PGLvoid; aInstanceCount: GLsizei); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1086. TglFenceSync = function(aCondition: GLenum; aFlags: GLbitfield): GLsync; {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1087. TglIsSync = function(aSync: GLsync): GLboolean; {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1088. TglDeleteSync = procedure(aSync: GLsync); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1089. TglClientWaitSync = function(aSync: GLsync; aFlags: GLbitfield; aTimeout: GLuint64): GLenum; {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1090. TglWaitSync = procedure(aSync: GLsync; aFlags: GLbitfield; aTimeout: GLuint64); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1091. TglGetInteger64v = procedure(aPname: GLenum; aData: PGLint64); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1092. TglGetSynciv = procedure(aSync: GLsync; aPname: GLenum; aBufSize: GLsizei; aLength: PGLsizei; aValue: PGLint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1093. TglGetInteger64i_v = procedure(aTarget: GLenum; aIndex: GLuint; aData: PGLint64); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1094. TglGetBufferParameteri64v = procedure(aTarget: GLenum; aPname: GLenum; aParams: PGLint64); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1095. TglGenSamplers = procedure(aCount: GLsizei; aSamplers: PGLuint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1096. TglDeleteSamplers = procedure(aCount: GLsizei; const aSamplers: PGLuint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1097. TglIsSampler = function(aSampler: GLuint): GLboolean; {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1098. TglBindSampler = procedure(aUnit: GLuint; aSampler: GLuint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1099. TglSamplerParameteri = procedure(aSampler: GLuint; aPname: GLenum; aParam: GLint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1100. TglSamplerParameteriv = procedure(aSampler: GLuint; aPname: GLenum; const aParam: PGLint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1101. TglSamplerParameterf = procedure(aSampler: GLuint; aPname: GLenum; aParam: GLfloat); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1102. TglSamplerParameterfv = procedure(aSampler: GLuint; aPname: GLenum; const aParam: PGLfloat); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1103. TglGetSamplerParameteriv = procedure(aSampler: GLuint; aPname: GLenum; const aParams: PGLint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1104. TglGetSamplerParameterfv = procedure(aSampler: GLuint; aPname: GLenum; const aParams: PGLfloat); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1105. TglVertexAttribDivisor = procedure(aIndex: GLuint; aDivisor: GLuint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1106. TglBindTransformFeedback = procedure(aTarget: GLenum; aId: GLuint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1107. TglDeleteTransformFeedbacks = procedure(n: GLsizei; const aIDs: PGLuint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1108. TglGenTransformFeedbacks = procedure(n: GLsizei; const aIDs: PGLuint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1109. TglIsTransformFeedback = function(aId: GLuint): GLboolean; {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1110. TglPauseTransformFeedback = procedure; {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1111. TglResumeTransformFeedback = procedure; {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1112. TglGetProgramBinary = procedure(aProgram: GLuint; aBufSize: GLsizei; aLength: PGLsizei; aBinaryFormat: PGLenum; aBinary: PGLvoid); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1113. TglProgramBinary = procedure(aProgram: GLuint; aBinaryFormat: GLenum; const aBinary: PGLvoid; aLength: GLsizei); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1114. TglProgramParameteri = procedure(aProgram: GLuint; aPname: GLenum; aValue: GLint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1115. TglInvalidateFramebuffer = procedure(aTarget: GLenum; aNumAttachments: GLsizei; const aAttachments: PGLenum); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1116. TglInvalidateSubFramebuffer = procedure(aTarget: GLenum; aNumAttachments: GLsizei; const aAttachments: PGLenum; aX: GLint; aY: GLint; aWidth: GLsizei; aHeight: GLsizei); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1117. TglTexStorage2D = procedure(aTarget: GLenum; aLevels: GLsizei; aInternalformat: GLenum; aWidth: GLsizei; aHeight: GLsizei); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1118. TglTexStorage3D = procedure(aTarget: GLenum; aLevels: GLsizei; aInternalformat: GLenum; aWidth: GLsizei; aHeight: GLsizei; aDepth: GLsizei); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1119. TglGetInternalformativ = procedure(aTarget: GLenum; aInternalformat: GLenum; aPname: GLenum; aBufSize: GLsizei; aParams: PGLint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1120. { OpenGL ES 3.1 }
  1121. TglDispatchCompute = procedure(aNumGroupsX: GLuint; aNumGroupsY: GLuint; aNumGroupsZ: GLuint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1122. TglDispatchComputeIndirect = procedure(aIndirect: PGLint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1123. TglDrawArraysIndirect = procedure(aMode: GLenum; const aIndirect: PGLvoid); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1124. TglDrawElementsIndirect = procedure(aMode: GLenum; aType: GLenum; const aIndirect: PGLvoid); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1125. TglFramebufferParameteri = procedure(aTarget: GLenum; aPname: GLenum; aParam: GLint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1126. TglGetFramebufferParameteriv = procedure(aTarget: GLenum; aPname: GLenum; aParams: PGLint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1127. TglGetProgramInterfaceiv = procedure(aProgram: GLuint; aProgramInterface: GLenum; aPname: GLenum; aParams: PGLint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1128. TglGetProgramResourceIndex = function (aProgram: GLuint; aProgramInterface: GLenum; const aName: PGLchar): GLuint; {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1129. TglGetProgramResourceName = procedure(aProgram: GLuint; aProgramInterface: GLenum; aIndex: GLuint; aBufSize: GLsizei; aLength: PGLsizei; aName: PGLchar); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1130. TglGetProgramResourceiv = procedure(aProgram: GLuint; aProgramInterface: GLenum; aIndex: GLuint; aPropCount: GLsizei; const aProps: PGLenum; aBufSize: GLsizei; aLength: PGLsizei; aParams: PGLint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1131. TglGetProgramResourceLocation = function (aProgram: GLuint; aProgramInterface: GLenum; const aName: PGLchar): GLint; {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1132. TglUseProgramStages = procedure(aPipeline: GLuint; aStages: GLbitfield; aProgram: GLuint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1133. TglActiveShaderProgram = procedure(aPipeline: GLuint; aProgram: GLuint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1134. TglCreateShaderProgramv = function (aType: GLenum; aCount: GLsizei; const aStrings: PPGLchar): GLuint; {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1135. TglBindProgramPipeline = procedure(aPipeline: GLuint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1136. TglDeleteProgramPipelines = procedure(aN: GLsizei; const aPipelines: PGLuint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1137. TglGenProgramPipelines = procedure(aN: GLsizei; aPipelines: PGLuint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1138. TglIsProgramPipeline = function (aPipeline: GLuint): GLboolean; {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1139. TglGetProgramPipelineiv = procedure(aPipeline: GLuint; aPname: GLenum; aParams: PGLint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1140. TglProgramUniform1i = procedure(aProgram: GLuint; aLocation: GLint; aV0: GLint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1141. TglProgramUniform2i = procedure(aProgram: GLuint; aLocation: GLint; aV0: GLint; aV1: GLint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1142. TglProgramUniform3i = procedure(aProgram: GLuint; aLocation: GLint; aV0: GLint; aV1: GLint; aV2: GLint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1143. TglProgramUniform4i = procedure(aProgram: GLuint; aLocation: GLint; aV0: GLint; aV1: GLint; aV2: GLint; aV3: GLint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1144. TglProgramUniform1ui = procedure(aProgram: GLuint; aLocation: GLint; aV0: GLuint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1145. TglProgramUniform2ui = procedure(aProgram: GLuint; aLocation: GLint; aV0: GLuint; aV1: GLuint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1146. TglProgramUniform3ui = procedure(aProgram: GLuint; aLocation: GLint; aV0: GLuint; aV1: GLuint; aV2: GLuint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1147. TglProgramUniform4ui = procedure(aProgram: GLuint; aLocation: GLint; aV0: GLuint; aV1: GLuint; aV2: GLuint; aV3: GLuint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1148. TglProgramUniform1f = procedure(aProgram: GLuint; aLocation: GLint; aV0: GLfloat); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1149. TglProgramUniform2f = procedure(aProgram: GLuint; aLocation: GLint; aV0: GLfloat; aV1: GLfloat); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1150. TglProgramUniform3f = procedure(aProgram: GLuint; aLocation: GLint; aV0: GLfloat; aV1: GLfloat; aV2: GLfloat); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1151. TglProgramUniform4f = procedure(aProgram: GLuint; aLocation: GLint; aV0: GLfloat; aV1: GLfloat; aV2: GLfloat; aV3: GLfloat); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1152. TglProgramUniform1iv = procedure(aProgram: GLuint; aLocation: GLint; aCount: GLsizei; const aValue: PGLint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1153. TglProgramUniform2iv = procedure(aProgram: GLuint; aLocation: GLint; aCount: GLsizei; const aValue: PGLint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1154. TglProgramUniform3iv = procedure(aProgram: GLuint; aLocation: GLint; aCount: GLsizei; const aValue: PGLint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1155. TglProgramUniform4iv = procedure(aProgram: GLuint; aLocation: GLint; aCount: GLsizei; const aValue: PGLint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1156. TglProgramUniform1uiv = procedure(aProgram: GLuint; aLocation: GLint; aCount: GLsizei; const aValue: PGLuint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1157. TglProgramUniform2uiv = procedure(aProgram: GLuint; aLocation: GLint; aCount: GLsizei; const aValue: PGLuint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1158. TglProgramUniform3uiv = procedure(aProgram: GLuint; aLocation: GLint; aCount: GLsizei; const aValue: PGLuint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1159. TglProgramUniform4uiv = procedure(aProgram: GLuint; aLocation: GLint; aCount: GLsizei; const aValue: PGLuint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1160. TglProgramUniform1fv = procedure(aProgram: GLuint; aLocation: GLint; aCount: GLsizei; const aValue: PGLfloat); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1161. TglProgramUniform2fv = procedure(aProgram: GLuint; aLocation: GLint; aCount: GLsizei; const aValue: PGLfloat); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1162. TglProgramUniform3fv = procedure(aProgram: GLuint; aLocation: GLint; aCount: GLsizei; const aValue: PGLfloat); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1163. TglProgramUniform4fv = procedure(aProgram: GLuint; aLocation: GLint; aCount: GLsizei; const aValue: PGLfloat); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1164. TglProgramUniformMatrix2fv = procedure(aProgram: GLuint; aLocation: GLint; aCount: GLsizei; aTranspose: GLboolean; const aValue: PGLfloat); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1165. TglProgramUniformMatrix3fv = procedure(aProgram: GLuint; aLocation: GLint; aCount: GLsizei; aTranspose: GLboolean; const aValue: PGLfloat); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1166. TglProgramUniformMatrix4fv = procedure(aProgram: GLuint; aLocation: GLint; aCount: GLsizei; aTranspose: GLboolean; const aValue: PGLfloat); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1167. TglProgramUniformMatrix2x3fv = procedure(aProgram: GLuint; aLocation: GLint; aCount: GLsizei; aTranspose: GLboolean; const aValue: PGLfloat); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1168. TglProgramUniformMatrix3x2fv = procedure(aProgram: GLuint; aLocation: GLint; aCount: GLsizei; aTranspose: GLboolean; const aValue: PGLfloat); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1169. TglProgramUniformMatrix2x4fv = procedure(aProgram: GLuint; aLocation: GLint; aCount: GLsizei; aTranspose: GLboolean; const aValue: PGLfloat); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1170. TglProgramUniformMatrix4x2fv = procedure(aProgram: GLuint; aLocation: GLint; aCount: GLsizei; aTranspose: GLboolean; const aValue: PGLfloat); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1171. TglProgramUniformMatrix3x4fv = procedure(aProgram: GLuint; aLocation: GLint; aCount: GLsizei; aTranspose: GLboolean; const aValue: PGLfloat); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1172. TglProgramUniformMatrix4x3fv = procedure(aProgram: GLuint; aLocation: GLint; aCount: GLsizei; aTranspose: GLboolean; const aValue: PGLfloat); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1173. TglValidateProgramPipeline = procedure(aPipeline: GLuint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1174. TglGetProgramPipelineInfoLog = procedure(aPipeline: GLuint; aBufSize: GLsizei; aLength: PGLsizei; aInfoLog: PGLchar); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1175. TglBindImageTexture = procedure(aUnit: GLuint; aTexture: GLuint; aLevel: GLint; aLayered: GLboolean; aLayer: GLint; aAccess: GLenum; aFormat: GLenum); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1176. TglGetBooleaniV = procedure(aTarget: GLenum; aIndex: GLuint; aData: PGLboolean); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1177. TglMemoryBarrier = procedure(aBarriers: GLbitfield); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1178. TglMemoryBarrierByRegion = procedure(aBarriers: GLbitfield); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1179. TglTexStorage2DMultisample = procedure(aTarget: GLenum; aSamples: GLsizei; aInternalformat: GLenum; aWidth: GLsizei; aHeight: GLsizei; aFixedsamplelocations: GLboolean); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1180. TglGetMultisamplefv = procedure(aPname: GLenum; aIndex: GLuint; aValue: PGLfloat); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1181. TglSampleMaski = procedure(aMaskNumber: GLuint; aMask: GLbitfield); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1182. TglGetTexLevelParameteriv = procedure(aTarget: GLenum; aLevel: GLint; aPname: GLenum; aParams: PGLint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1183. TglGetTexLevelParameterfv = procedure(aTarget: GLenum; aLevel: GLint; aPname: GLenum; aParams: PGLfloat); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1184. TglBindVertexBuffer = procedure(aBindingindex: GLuint; aBuffer: GLuint; aOffset: PGLint; aStride: GLsizei); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1185. TglVertexAttribFormat = procedure(aAttribindex: GLuint; aSize: GLint; aType: GLenum; aNormalized: GLboolean; aRelativeoffset: GLuint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1186. TglVertexAttribIFormat = procedure(aAttribindex: GLuint; aSize: GLint; aType: GLenum; aRelativeoffset: GLuint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1187. TglVertexAttribBinding = procedure(aAttribindex: GLuint; aBindingindex: GLuint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1188. TglVertexBindingDivisor = procedure(aBindingindex: GLuint; aDivisor: GLuint); {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1189. var
  1190. { *** PROCEDURES *** }
  1191. { OpenGL ES 2.0 }
  1192. glActiveTexture: TglActiveTexture;
  1193. glAttachShader: TglAttachShader;
  1194. glBindAttribLocation: TglBindAttribLocation;
  1195. glBindBuffer: TglBindBuffer;
  1196. glBindFramebuffer: TglBindFramebuffer;
  1197. glBindRenderbuffer: TglBindRenderbuffer;
  1198. glBindTexture: TglBindTexture;
  1199. glBlendColor: TglBlendColor;
  1200. glBlendEquation: TglBlendEquation;
  1201. glBlendEquationSeparate: TglBlendEquationSeparate;
  1202. glBlendFunc: TglBlendFunc;
  1203. glBlendFuncSeparate: TglBlendFuncSeparate;
  1204. glBufferData: TglBufferData;
  1205. glBufferSubData: TglBufferSubData;
  1206. glCheckFramebufferStatus: TglCheckFramebufferStatus;
  1207. glClear: TglClear;
  1208. glClearColor: TglClearColor;
  1209. glClearDepthf: TglClearDepthf;
  1210. glClearStencil: TglClearStencil;
  1211. glColorMask: TglColorMask;
  1212. glCompileShader: TglCompileShader;
  1213. glCompressedTexImage2D: TglCompressedTexImage2D;
  1214. glCompressedTexSubImage2D: TglCompressedTexSubImage2D;
  1215. glCopyTexImage2D: TglCopyTexImage2D;
  1216. glCopyTexSubImage2D: TglCopyTexSubImage2D;
  1217. glCreateProgram: TglCreateProgram;
  1218. glCreateShader: TglCreateShader;
  1219. glCullFace: TglCullFace;
  1220. glDeleteBuffers: TglDeleteBuffers;
  1221. glDeleteFramebuffers: TglDeleteFramebuffers;
  1222. glDeleteProgram: TglDeleteProgram;
  1223. glDeleteRenderbuffers: TglDeleteRenderbuffers;
  1224. glDeleteShader: TglDeleteShader;
  1225. glDeleteTextures: TglDeleteTextures;
  1226. glDepthFunc: TglDepthFunc;
  1227. glDepthMask: TglDepthMask;
  1228. glDepthRangef: TglDepthRangef;
  1229. glDetachShader: TglDetachShader;
  1230. glDisable: TglDisable;
  1231. glDisableVertexAttribArray: TglDisableVertexAttribArray;
  1232. glDrawArrays: TglDrawArrays;
  1233. glDrawElements: TglDrawElements;
  1234. glEnable: TglEnable;
  1235. glEnableVertexAttribArray: TglEnableVertexAttribArray;
  1236. glFinish: TglFinish;
  1237. glFlush: TglFlush;
  1238. glFramebufferRenderbuffer: TglFramebufferRenderbuffer;
  1239. glFramebufferTexture2D: TglFramebufferTexture2D;
  1240. glFrontFace: TglFrontFace;
  1241. glGenBuffers: TglGenBuffers;
  1242. glGenerateMipmap: TglGenerateMipmap;
  1243. glGenFramebuffers: TglGenFramebuffers;
  1244. glGenRenderbuffers: TglGenRenderbuffers;
  1245. glGenTextures: TglGenTextures;
  1246. glGetActiveAttrib: TglGetActiveAttrib;
  1247. glGetActiveUniform: TglGetActiveUniform;
  1248. glGetAttachedShaders: TglGetAttachedShaders;
  1249. glGetAttribLocation: TglGetAttribLocation;
  1250. glGetBooleanv: TglGetBooleanv;
  1251. glGetBufferParameteriv: TglGetBufferParameteriv;
  1252. glGetError: TglGetError;
  1253. glGetFloatv: TglGetFloatv;
  1254. glGetFramebufferAttachmentParameteriv: TglGetFramebufferAttachmentParameteriv;
  1255. glGetIntegerv: TglGetIntegerv;
  1256. glGetProgramiv: TglGetProgramiv;
  1257. glGetProgramInfoLog: TglGetProgramInfoLog;
  1258. glGetRenderbufferParameteriv: TglGetRenderbufferParameteriv;
  1259. glGetShaderiv: TglGetShaderiv;
  1260. glGetShaderInfoLog: TglGetShaderInfoLog;
  1261. glGetShaderPrecisionFormat: TglGetShaderPrecisionFormat;
  1262. glGetShaderSource: TglGetShaderSource;
  1263. glGetString: TglGetString;
  1264. glGetTexParameterfv: TglGetTexParameterfv;
  1265. glGetTexParameteriv: TglGetTexParameteriv;
  1266. glGetUniformfv: TglGetUniformfv;
  1267. glGetUniformiv: TglGetUniformiv;
  1268. glGetUniformLocation: TglGetUniformLocation;
  1269. glGetVertexAttribfv: TglGetVertexAttribfv;
  1270. glGetVertexAttribiv: TglGetVertexAttribiv;
  1271. glGetVertexAttribPointerv: TglGetVertexAttribPointerv;
  1272. glHint: TglHint;
  1273. glIsBuffer: TglIsBuffer;
  1274. glIsEnabled: TglIsEnabled;
  1275. glIsFramebuffer: TglIsFramebuffer;
  1276. glIsProgram: TglIsProgram;
  1277. glIsRenderbuffer: TglIsRenderbuffer;
  1278. glIsShader: TglIsShader;
  1279. glIsTexture: TglIsTexture;
  1280. glLineWidth: TglLineWidth;
  1281. glLinkProgram: TglLinkProgram;
  1282. glPixelStorei: TglPixelStorei;
  1283. glPolygonOffset: TglPolygonOffset;
  1284. glReadPixels: TglReadPixels;
  1285. glReleaseShaderCompiler: TglReleaseShaderCompiler;
  1286. glRenderbufferStorage: TglRenderbufferStorage;
  1287. glSampleCoverage: TglSampleCoverage;
  1288. glScissor: TglScissor;
  1289. glShaderBinary: TglShaderBinary;
  1290. glShaderSource: TglShaderSource;
  1291. glStencilFunc: TglStencilFunc;
  1292. glStencilFuncSeparate: TglStencilFuncSeparate;
  1293. glStencilMask: TglStencilMask;
  1294. glStencilMaskSeparate: TglStencilMaskSeparate;
  1295. glStencilOp: TglStencilOp;
  1296. glStencilOpSeparate: TglStencilOpSeparate;
  1297. glTexImage2D: TglTexImage2D;
  1298. glTexParameterf: TglTexParameterf;
  1299. glTexParameterfv: TglTexParameterfv;
  1300. glTexParameteri: TglTexParameteri;
  1301. glTexParameteriv: TglTexParameteriv;
  1302. glTexSubImage2D: TglTexSubImage2D;
  1303. glUniform1f: TglUniform1f;
  1304. glUniform1fv: TglUniform1fv;
  1305. glUniform1i: TglUniform1i;
  1306. glUniform1iv: TglUniform1iv;
  1307. glUniform2f: TglUniform2f;
  1308. glUniform2fv: TglUniform2fv;
  1309. glUniform2i: TglUniform2i;
  1310. glUniform2iv: TglUniform2iv;
  1311. glUniform3f: TglUniform3f;
  1312. glUniform3fv: TglUniform3fv;
  1313. glUniform3i: TglUniform3i;
  1314. glUniform3iv: TglUniform3iv;
  1315. glUniform4f: TglUniform4f;
  1316. glUniform4fv: TglUniform4fv;
  1317. glUniform4i: TglUniform4i;
  1318. glUniform4iv: TglUniform4iv;
  1319. glUniformMatrix2fv: TglUniformMatrix2fv;
  1320. glUniformMatrix3fv: TglUniformMatrix3fv;
  1321. glUniformMatrix4fv: TglUniformMatrix4fv;
  1322. glUseProgram: TglUseProgram;
  1323. glValidateProgram: TglValidateProgram;
  1324. glVertexAttrib1f: TglVertexAttrib1f;
  1325. glVertexAttrib1fv: TglVertexAttrib1fv;
  1326. glVertexAttrib2f: TglVertexAttrib2f;
  1327. glVertexAttrib2fv: TglVertexAttrib2fv;
  1328. glVertexAttrib3f: TglVertexAttrib3f;
  1329. glVertexAttrib3fv: TglVertexAttrib3fv;
  1330. glVertexAttrib4f: TglVertexAttrib4f;
  1331. glVertexAttrib4fv: TglVertexAttrib4fv;
  1332. glVertexAttribPointer: TglVertexAttribPointer;
  1333. glViewport: TglViewport;
  1334. { OpenGL ES 3.0 }
  1335. glReadBuffer: TglReadBuffer;
  1336. glDrawRangeElements: TglDrawRangeElements;
  1337. glTexImage3D: TglTexImage3D;
  1338. glTexSubImage3D: TglTexSubImage3D;
  1339. glCopyTexSubImage3D: TglCopyTexSubImage3D;
  1340. glCompressedTexImage3D: TglCompressedTexImage3D;
  1341. glCompressedTexSubImage3D: TglCompressedTexSubImage3D;
  1342. glGenQueries: TglGenQueries;
  1343. glDeleteQueries: TglDeleteQueries;
  1344. glIsQuery: TglIsQuery;
  1345. glBeginQuery: TglBeginQuery;
  1346. glEndQuery: TglEndQuery;
  1347. glGetQueryiv: TglGetQueryiv;
  1348. glGetQueryObjectuiv: TglGetQueryObjectuiv;
  1349. glUnmapBuffer: TglUnmapBuffer;
  1350. glGetBufferPointerv: TglGetBufferPointerv;
  1351. glDrawBuffers: TglDrawBuffers;
  1352. glUniformMatrix2x3fv: TglUniformMatrix2x3fv;
  1353. glUniformMatrix3x2fv: TglUniformMatrix3x2fv;
  1354. glUniformMatrix2x4fv: TglUniformMatrix2x4fv;
  1355. glUniformMatrix4x2fv: TglUniformMatrix4x2fv;
  1356. glUniformMatrix3x4fv: TglUniformMatrix3x4fv;
  1357. glUniformMatrix4x3fv: TglUniformMatrix4x3fv;
  1358. glBlitFramebuffer: TglBlitFramebuffer;
  1359. glRenderbufferStorageMultisample: TglRenderbufferStorageMultisample;
  1360. glFramebufferTextureLayer: TglFramebufferTextureLayer;
  1361. glMapBufferRange: TglMapBufferRange;
  1362. glFlushMappedBufferRange: TglFlushMappedBufferRange;
  1363. glBindVertexArray: TglBindVertexArray;
  1364. glDeleteVertexArrays: TglDeleteVertexArrays;
  1365. glGenVertexArrays: TglGenVertexArrays;
  1366. glIsVertexArray: TglIsVertexArray;
  1367. glGetIntegeri_v: TglGetIntegeri_v;
  1368. glBeginTransformFeedback: TglBeginTransformFeedback;
  1369. glEndTransformFeedback: TglEndTransformFeedback;
  1370. glBindBufferRange: TglBindBufferRange;
  1371. glBindBufferBase: TglBindBufferBase;
  1372. glTransformFeedbackVaryings: TglTransformFeedbackVaryings;
  1373. glGetTransformFeedbackVarying: TglGetTransformFeedbackVarying;
  1374. glVertexAttribIPointer: TglVertexAttribIPointer;
  1375. glGetVertexAttribIiv: TglGetVertexAttribIiv;
  1376. glGetVertexAttribIuiv: TglGetVertexAttribIuiv;
  1377. glVertexAttribI4i: TglVertexAttribI4i;
  1378. glVertexAttribI4ui: TglVertexAttribI4ui;
  1379. glVertexAttribI4iv: TglVertexAttribI4iv;
  1380. glVertexAttribI4uiv: TglVertexAttribI4uiv;
  1381. glGetUniformuiv: TglGetUniformuiv;
  1382. glGetFragDataLocation: TglGetFragDataLocation;
  1383. glUniform1ui: TglUniform1ui;
  1384. glUniform2ui: TglUniform2ui;
  1385. glUniform3ui: TglUniform3ui;
  1386. glUniform4ui: TglUniform4ui;
  1387. glUniform1uiv: TglUniform1uiv;
  1388. glUniform2uiv: TglUniform2uiv;
  1389. glUniform3uiv: TglUniform3uiv;
  1390. glUniform4uiv: TglUniform4uiv;
  1391. glClearBufferiv: TglClearBufferiv;
  1392. glClearBufferuiv: TglClearBufferuiv;
  1393. glClearBufferfv: TglClearBufferfv;
  1394. glClearBufferfi: TglClearBufferfi;
  1395. glGetStringi: TglGetStringi;
  1396. glCopyBufferSubData: TglCopyBufferSubData;
  1397. glGetUniformIndices: TglGetUniformIndices;
  1398. glGetActiveUniformsiv: TglGetActiveUniformsiv;
  1399. glGetUniformBlockIndex: TglGetUniformBlockIndex;
  1400. glGetActiveUniformBlockiv: TglGetActiveUniformBlockiv;
  1401. glGetActiveUniformBlockName: TglGetActiveUniformBlockName;
  1402. glUniformBlockBinding: TglUniformBlockBinding;
  1403. glDrawArraysInstanced: TglDrawArraysInstanced;
  1404. glDrawElementsInstanced: TglDrawElementsInstanced;
  1405. glFenceSync: TglFenceSync;
  1406. glIsSync: TglIsSync;
  1407. glDeleteSync: TglDeleteSync;
  1408. glClientWaitSync: TglClientWaitSync;
  1409. glWaitSync: TglWaitSync;
  1410. glGetInteger64v: TglGetInteger64v;
  1411. glGetSynciv: TglGetSynciv;
  1412. glGetInteger64i_v: TglGetInteger64i_v;
  1413. glGetBufferParameteri64v: TglGetBufferParameteri64v;
  1414. glGenSamplers: TglGenSamplers;
  1415. glDeleteSamplers: TglDeleteSamplers;
  1416. glIsSampler: TglIsSampler;
  1417. glBindSampler: TglBindSampler;
  1418. glSamplerParameteri: TglSamplerParameteri;
  1419. glSamplerParameteriv: TglSamplerParameteriv;
  1420. glSamplerParameterf: TglSamplerParameterf;
  1421. glSamplerParameterfv: TglSamplerParameterfv;
  1422. glGetSamplerParameteriv: TglGetSamplerParameteriv;
  1423. glGetSamplerParameterfv: TglGetSamplerParameterfv;
  1424. glVertexAttribDivisor: TglVertexAttribDivisor;
  1425. glBindTransformFeedback: TglBindTransformFeedback;
  1426. glDeleteTransformFeedbacks: TglDeleteTransformFeedbacks;
  1427. glGenTransformFeedbacks: TglGenTransformFeedbacks;
  1428. glIsTransformFeedback: TglIsTransformFeedback;
  1429. glPauseTransformFeedback: TglPauseTransformFeedback;
  1430. glResumeTransformFeedback: TglResumeTransformFeedback;
  1431. glGetProgramBinary: TglGetProgramBinary;
  1432. glProgramBinary: TglProgramBinary;
  1433. glProgramParameteri: TglProgramParameteri;
  1434. glInvalidateFramebuffer: TglInvalidateFramebuffer;
  1435. glInvalidateSubFramebuffer: TglInvalidateSubFramebuffer;
  1436. glTexStorage2D: TglTexStorage2D;
  1437. glTexStorage3D: TglTexStorage3D;
  1438. glGetInternalformativ: TglGetInternalformativ;
  1439. { OpenGL ES 3.1 }
  1440. glDispatchCompute: TglDispatchCompute;
  1441. glDispatchComputeIndirect: TglDispatchComputeIndirect;
  1442. glDrawArraysIndirect: TglDrawArraysIndirect;
  1443. glDrawElementsIndirect: TglDrawElementsIndirect;
  1444. glFramebufferParameteri: TglFramebufferParameteri;
  1445. glGetFramebufferParameteriv: TglGetFramebufferParameteriv;
  1446. glGetProgramInterfaceiv: TglGetProgramInterfaceiv;
  1447. glGetProgramResourceIndex: TglGetProgramResourceIndex;
  1448. glGetProgramResourceName: TglGetProgramResourceName;
  1449. glGetProgramResourceiv: TglGetProgramResourceiv;
  1450. glGetProgramResourceLocation: TglGetProgramResourceLocation;
  1451. glUseProgramStages: TglUseProgramStages;
  1452. glActiveShaderProgram: TglActiveShaderProgram;
  1453. glCreateShaderProgramv: TglCreateShaderProgramv;
  1454. glBindProgramPipeline: TglBindProgramPipeline;
  1455. glDeleteProgramPipelines: TglDeleteProgramPipelines;
  1456. glGenProgramPipelines: TglGenProgramPipelines;
  1457. glIsProgramPipeline: TglIsProgramPipeline;
  1458. glGetProgramPipelineiv: TglGetProgramPipelineiv;
  1459. glProgramUniform1i: TglProgramUniform1i;
  1460. glProgramUniform2i: TglProgramUniform2i;
  1461. glProgramUniform3i: TglProgramUniform3i;
  1462. glProgramUniform4i: TglProgramUniform4i;
  1463. glProgramUniform1ui: TglProgramUniform1ui;
  1464. glProgramUniform2ui: TglProgramUniform2ui;
  1465. glProgramUniform3ui: TglProgramUniform3ui;
  1466. glProgramUniform4ui: TglProgramUniform4ui;
  1467. glProgramUniform1f: TglProgramUniform1f;
  1468. glProgramUniform2f: TglProgramUniform2f;
  1469. glProgramUniform3f: TglProgramUniform3f;
  1470. glProgramUniform4f: TglProgramUniform4f;
  1471. glProgramUniform1iv: TglProgramUniform1iv;
  1472. glProgramUniform2iv: TglProgramUniform2iv;
  1473. glProgramUniform3iv: TglProgramUniform3iv;
  1474. glProgramUniform4iv: TglProgramUniform4iv;
  1475. glProgramUniform1uiv: TglProgramUniform1uiv;
  1476. glProgramUniform2uiv: TglProgramUniform2uiv;
  1477. glProgramUniform3uiv: TglProgramUniform3uiv;
  1478. glProgramUniform4uiv: TglProgramUniform4uiv;
  1479. glProgramUniform1fv: TglProgramUniform1fv;
  1480. glProgramUniform2fv: TglProgramUniform2fv;
  1481. glProgramUniform3fv: TglProgramUniform3fv;
  1482. glProgramUniform4fv: TglProgramUniform4fv;
  1483. glProgramUniformMatrix2fv: TglProgramUniformMatrix2fv;
  1484. glProgramUniformMatrix3fv: TglProgramUniformMatrix3fv;
  1485. glProgramUniformMatrix4fv: TglProgramUniformMatrix4fv;
  1486. glProgramUniformMatrix2x3fv: TglProgramUniformMatrix2x3fv;
  1487. glProgramUniformMatrix3x2fv: TglProgramUniformMatrix3x2fv;
  1488. glProgramUniformMatrix2x4fv: TglProgramUniformMatrix2x4fv;
  1489. glProgramUniformMatrix4x2fv: TglProgramUniformMatrix4x2fv;
  1490. glProgramUniformMatrix3x4fv: TglProgramUniformMatrix3x4fv;
  1491. glProgramUniformMatrix4x3fv: TglProgramUniformMatrix4x3fv;
  1492. glValidateProgramPipeline: TglValidateProgramPipeline;
  1493. glGetProgramPipelineInfoLog: TglGetProgramPipelineInfoLog;
  1494. glBindImageTexture: TglBindImageTexture;
  1495. glGetBooleaniV: TglGetBooleaniV;
  1496. glMemoryBarrier: TglMemoryBarrier;
  1497. glMemoryBarrierByRegion: TglMemoryBarrierByRegion;
  1498. glTexStorage2DMultisample: TglTexStorage2DMultisample;
  1499. glGetMultisamplefv: TglGetMultisamplefv;
  1500. glSampleMaski: TglSampleMaski;
  1501. glGetTexLevelParameteriv: TglGetTexLevelParameteriv;
  1502. glGetTexLevelParameterfv: TglGetTexLevelParameterfv;
  1503. glBindVertexBuffer: TglBindVertexBuffer;
  1504. glVertexAttribFormat: TglVertexAttribFormat;
  1505. glVertexAttribIFormat: TglVertexAttribIFormat;
  1506. glVertexAttribBinding: TglVertexAttribBinding;
  1507. glVertexBindingDivisor: TglVertexBindingDivisor;
  1508. { ===================================================== EGL ========================================================== }
  1509. type
  1510. EGLint = Integer;
  1511. EGLboolean = Cardinal;
  1512. EGLenum = Cardinal;
  1513. EGLConfig = Pointer;
  1514. EGLContext = Pointer;
  1515. EGLDisplay = Pointer;
  1516. EGLSurface = Pointer;
  1517. EGLClientBuffer = Pointer;
  1518. EGLNativeDisplayType = Pointer;
  1519. EGLNativePixmapType = Pointer;
  1520. EGLNativeWindowType = packed record
  1521. element: Cardinal;
  1522. width: Integer;
  1523. height: Integer;
  1524. end;
  1525. PEGLint = ^EGLint;
  1526. PEGLboolean = ^EGLboolean;
  1527. PEGLenum = ^EGLenum;
  1528. PEGLConfig = ^EGLConfig;
  1529. PEGLContext = ^EGLContext;
  1530. PEGLDisplay = ^EGLDisplay;
  1531. PEGLSurface = ^EGLSurface;
  1532. PEGLClientBuffer = ^EGLClientBuffer;
  1533. PEGLNativeDisplayType = ^EGLNativeDisplayType;
  1534. PEGLNativePixmapType = ^EGLNativePixmapType;
  1535. PEGLNativeWindowType = ^EGLNativeWindowType;
  1536. const
  1537. EGL_FALSE: EGLboolean = 0;
  1538. EGL_TRUE: EGLboolean = 1;
  1539. EGL_DEFAULT_DISPLAY: EGLNativeDisplayType = nil;
  1540. EGL_NO_CONTEXT: EGLContext = nil;
  1541. EGL_NO_DISPLAY: EGLDisplay = nil;
  1542. EGL_NO_SURFACE: EGLSurface = nil;
  1543. EGL_DONT_CARE: EGLint = -1;
  1544. EGL_SUCCESS = $3000;
  1545. EGL_NOT_INITIALIZED = $3001;
  1546. EGL_BAD_ACCESS = $3002;
  1547. EGL_BAD_ALLOC = $3003;
  1548. EGL_BAD_ATTRIBUTE = $3004;
  1549. EGL_BAD_CONFIG = $3005;
  1550. EGL_BAD_CONTEXT = $3006;
  1551. EGL_BAD_CURRENT_SURFACE = $3007;
  1552. EGL_BAD_DISPLAY = $3008;
  1553. EGL_BAD_MATCH = $3009;
  1554. EGL_BAD_NATIVE_PIXMAP = $300A;
  1555. EGL_BAD_NATIVE_WINDOW = $300B;
  1556. EGL_BAD_PARAMETER = $300C;
  1557. EGL_BAD_SURFACE = $300D;
  1558. EGL_CONTEXT_LOST = $300E;
  1559. EGL_BUFFER_SIZE = $3020;
  1560. EGL_ALPHA_SIZE = $3021;
  1561. EGL_BLUE_SIZE = $3022;
  1562. EGL_GREEN_SIZE = $3023;
  1563. EGL_RED_SIZE = $3024;
  1564. EGL_DEPTH_SIZE = $3025;
  1565. EGL_STENCIL_SIZE = $3026;
  1566. EGL_CONFIG_CAVEAT = $3027;
  1567. EGL_CONFIG_ID = $3028;
  1568. EGL_LEVEL = $3029;
  1569. EGL_MAX_PBUFFER_HEIGHT = $302A;
  1570. EGL_MAX_PBUFFER_PIXELS = $302B;
  1571. EGL_MAX_PBUFFER_WIDTH = $302C;
  1572. EGL_NATIVE_RENDERABLE = $302D;
  1573. EGL_NATIVE_VISUAL_ID = $302E;
  1574. EGL_NATIVE_VISUAL_TYPE = $302F;
  1575. EGL_SAMPLES = $3031;
  1576. EGL_SAMPLE_BUFFERS = $3032;
  1577. EGL_SURFACE_TYPE = $3033;
  1578. EGL_TRANSPARENT_TYPE = $3034;
  1579. EGL_TRANSPARENT_BLUE_VALUE = $3035;
  1580. EGL_TRANSPARENT_GREEN_VALUE = $3036;
  1581. EGL_TRANSPARENT_RED_VALUE = $3037;
  1582. EGL_NONE = $3038;
  1583. EGL_BIND_TO_TEXTURE_RGB = $3039;
  1584. EGL_BIND_TO_TEXTURE_RGBA = $303A;
  1585. EGL_MIN_SWAP_INTERVAL = $303B;
  1586. EGL_MAX_SWAP_INTERVAL = $303C;
  1587. EGL_LUMINANCE_SIZE = $303D;
  1588. EGL_ALPHA_MASK_SIZE = $303E;
  1589. EGL_COLOR_BUFFER_TYPE = $303F;
  1590. EGL_RENDERABLE_TYPE = $3040;
  1591. EGL_MATCH_NATIVE_PIXMAP = $3041;
  1592. EGL_CONFORMANT = $3042;
  1593. EGL_SLOW_CONFIG = $3050;
  1594. EGL_NON_CONFORMANT_CONFIG = $3051;
  1595. EGL_TRANSPARENT_RGB = $3052;
  1596. EGL_RGB_BUFFER = $308E;
  1597. EGL_LUMINANCE_BUFFER = $308F;
  1598. EGL_NO_TEXTURE = $305C;
  1599. EGL_TEXTURE_RGB = $305D;
  1600. EGL_TEXTURE_RGBA = $305E;
  1601. EGL_TEXTURE_2D = $305F;
  1602. EGL_PBUFFER_BIT = $0001;
  1603. EGL_PIXMAP_BIT = $0002;
  1604. EGL_WINDOW_BIT = $0004;
  1605. EGL_VG_COLORSPACE_LINEAR_BIT = $0020;
  1606. EGL_VG_ALPHA_FORMAT_PRE_BIT = $0040;
  1607. EGL_MULTISAMPLE_RESOLVE_BOX_BIT = $0200;
  1608. EGL_SWAP_BEHAVIOR_PRESERVED_BIT = $0400;
  1609. EGL_OPENGL_ES_BIT = $0001;
  1610. EGL_OPENVG_BIT = $0002;
  1611. EGL_OPENGL_ES2_BIT = $0004;
  1612. EGL_OPENGL_BIT = $0008;
  1613. EGL_VENDOR = $3053;
  1614. EGL_VERSION = $3054;
  1615. EGL_EXTENSIONS = $3055;
  1616. EGL_CLIENT_APIS = $308D;
  1617. EGL_HEIGHT = $3056;
  1618. EGL_WIDTH = $3057;
  1619. EGL_LARGEST_PBUFFER = $3058;
  1620. EGL_TEXTURE_FORMAT = $3080;
  1621. EGL_TEXTURE_TARGET = $3081;
  1622. EGL_MIPMAP_TEXTURE = $3082;
  1623. EGL_MIPMAP_LEVEL = $3083;
  1624. EGL_RENDER_BUFFER = $3086;
  1625. EGL_VG_COLORSPACE = $3087;
  1626. EGL_VG_ALPHA_FORMAT = $3088;
  1627. EGL_HORIZONTAL_RESOLUTION = $3090;
  1628. EGL_VERTICAL_RESOLUTION = $3091;
  1629. EGL_PIXEL_ASPECT_RATIO = $3092;
  1630. EGL_SWAP_BEHAVIOR = $3093;
  1631. EGL_MULTISAMPLE_RESOLVE = $3099;
  1632. EGL_BACK_BUFFER = $3084;
  1633. EGL_SINGLE_BUFFER = $3085;
  1634. EGL_VG_COLORSPACE_sRGB = $3089;
  1635. EGL_VG_COLORSPACE_LINEAR = $308A;
  1636. EGL_VG_ALPHA_FORMAT_NONPRE = $308B;
  1637. EGL_VG_ALPHA_FORMAT_PRE = $308C;
  1638. EGL_DISPLAY_SCALING = 10000;
  1639. EGL_UNKNOWN: EGLint = -1;
  1640. EGL_BUFFER_PRESERVED = $3094;
  1641. EGL_BUFFER_DESTROYED = $3095;
  1642. EGL_OPENVG_IMAGE = $3096;
  1643. EGL_CONTEXT_CLIENT_TYPE = $3097;
  1644. EGL_CONTEXT_CLIENT_VERSION = $3098;
  1645. EGL_MULTISAMPLE_RESOLVE_DEFAULT = $309A;
  1646. EGL_MULTISAMPLE_RESOLVE_BOX = $309B;
  1647. EGL_OPENGL_ES_API = $30A0;
  1648. EGL_OPENVG_API = $30A1;
  1649. EGL_OPENGL_API = $30A2;
  1650. EGL_DRAW = $3059;
  1651. EGL_READ = $305A;
  1652. EGL_CORE_NATIVE_ENGINE = $305B;
  1653. EGL_COLORSPACE = EGL_VG_COLORSPACE;
  1654. EGL_ALPHA_FORMAT = EGL_VG_ALPHA_FORMAT;
  1655. EGL_COLORSPACE_sRGB = EGL_VG_COLORSPACE_sRGB;
  1656. EGL_COLORSPACE_LINEAR = EGL_VG_COLORSPACE_LINEAR;
  1657. EGL_ALPHA_FORMAT_NONPRE = EGL_VG_ALPHA_FORMAT_NONPRE;
  1658. EGL_ALPHA_FORMAT_PRE = EGL_VG_ALPHA_FORMAT_PRE;
  1659. type
  1660. TeglGetError = function: EGLint; {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1661. TeglGetDisplay = function(aDisplayID: EGLNativeDisplayType): EGLDisplay; {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1662. TeglInitialize = function(aDisplay: EGLDisplay; aMajor, aMinor: PEGLint): EGLBoolean; {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1663. TeglTerminate = function(aDisplay: EGLDisplay): EGLBoolean; {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1664. TeglQueryString = function(aDisplay: EGLDisplay; aName: EGLint): PAnsiChar; {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1665. TeglGetConfigs = function(aDisplay: EGLDisplay; aConfigs: PEGLConfig; aConfigSize: EGLint; aNumConfig: PEGLint): EGLBoolean; {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1666. TeglChooseConfig = function(aDisplay: EGLDisplay; const aAttribList: PEGLint; aConfigs: PEGLConfig; aConfigSize: EGLint; aNumConfig: PEGLint): EGLBoolean; {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1667. TeglGetConfigAttrib = function(aDisplay: EGLDisplay; aConfig: EGLConfig; aAttribute: EGLint; aValue : PEGLint): EGLBoolean; {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1668. TeglCreateWindowSurface = function(aDisplay: EGLDisplay; aConfig: EGLConfig; aWinType: PEGLNativeWindowType; const aAttribList: PEGLint): EGLSurface; {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1669. TeglCreatePbufferSurface = function(aDisplay: EGLDisplay; aConfig: EGLConfig; const aAttribList: PEGLint): EGLSurface; {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1670. TeglCreatePixmapSurface = function(aDisplay: EGLDisplay; aConfig: EGLConfig; aPixmap: EGLNativePixmapType; const aAttribList: PEGLint): EGLSurface; {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1671. TeglDestroySurface = function(aDisplay: EGLDisplay; aSurface: EGLSurface): EGLBoolean; {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1672. TeglQuerySurface = function(aDisplay: EGLDisplay; aSurface: EGLSurface; aAttribute: EGLint; aValue: PEGLint): EGLBoolean; {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1673. TeglBindAPI = function(aApi: EGLenum): EGLBoolean; {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1674. TeglQueryAPI = function: EGLenum; {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1675. TeglWaitClient = function: EGLBoolean; {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1676. TeglReleaseThread = function: EGLBoolean; {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1677. TeglCreatePbufferFromClientBuffer = function(aDisplay: EGLDisplay; aBufType: EGLenum; aBuffer: EGLClientBuffer; aConfig: EGLConfig; const aAttribList: PEGLint): EGLSurface; {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1678. TeglSurfaceAttrib = function(aDisplay: EGLDisplay; aSurface: EGLSurface; aAttribute: EGLint; aValue: EGLint): EGLBoolean; {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1679. TeglBindTexImage = function(aDisplay: EGLDisplay; aSurface: EGLSurface; aBuffer: EGLint): EGLBoolean; {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1680. TeglReleaseTexImage = function(aDisplay: EGLDisplay; aSurface: EGLSurface; aBuffer: EGLint): EGLBoolean; {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1681. TeglSwapInterval = function(aDisplay: EGLDisplay; aInterval: EGLint): EGLBoolean; {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1682. TeglCreateContext = function(aDisplay: EGLDisplay; aConfig: EGLConfig; aShareContext: EGLContext; const aAttribList: PEGLint): EGLContext; {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1683. TeglDestroyContext = function(aDisplay: EGLDisplay; aContext: EGLContext): EGLBoolean; {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1684. TeglMakeCurrent = function(aDisplay: EGLDisplay; aDraw: EGLSurface; aRead: EGLSurface; aContext: EGLContext): EGLBoolean; {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1685. TeglGetCurrentContext = function: EGLContext; {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1686. TeglGetCurrentSurface = function(aReadDraw: EGLint): EGLSurface; {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1687. TeglGetCurrentDisplay = function: EGLDisplay; {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1688. TeglQueryContext = function(aDisplay: EGLDisplay; aContext: EGLContext; aAttribute: EGLint; aValue: PEGLint): EGLBoolean; {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1689. TeglWaitGL = function: EGLBoolean; {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1690. TeglWaitNative = function(aEngine: EGLint): EGLBoolean; {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1691. TeglSwapBuffers = function(aDisplay: EGLDisplay; aSurface: EGLSurface): EGLBoolean; {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1692. TeglCopyBuffers = function(aDisplay: EGLDisplay; aSurface: EGLSurface; aTarget: EGLNativePixmapType): EGLBoolean; {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1693. TeglGetProcAddress = function(const aProcName: PAnsiChar): Pointer; {$IFDEF DGL_WIN}stdcall;{$ELSE}cdecl;{$ENDIF}
  1694. var
  1695. eglGetError: TeglGetError;
  1696. eglGetDisplay: TeglGetDisplay;
  1697. eglInitialize: TeglInitialize;
  1698. eglTerminate: TeglTerminate;
  1699. eglQueryString: TeglQueryString;
  1700. eglGetConfigs: TeglGetConfigs;
  1701. eglChooseConfig: TeglChooseConfig;
  1702. eglGetConfigAttrib: TeglGetConfigAttrib;
  1703. eglCreateWindowSurface: TeglCreateWindowSurface;
  1704. eglCreatePbufferSurface: TeglCreatePbufferSurface;
  1705. eglCreatePixmapSurface: TeglCreatePixmapSurface;
  1706. eglDestroySurface: TeglDestroySurface;
  1707. eglQuerySurface: TeglQuerySurface;
  1708. eglBindAPI: TeglBindAPI;
  1709. eglQueryAPI: TeglQueryAPI;
  1710. eglWaitClient: TeglWaitClient;
  1711. eglReleaseThread: TeglReleaseThread;
  1712. eglCreatePbufferFromClientBuffer: TeglCreatePbufferFromClientBuffer;
  1713. eglSurfaceAttrib: TeglSurfaceAttrib;
  1714. eglBindTexImage: TeglBindTexImage;
  1715. eglReleaseTexImage: TeglReleaseTexImage;
  1716. eglSwapInterval: TeglSwapInterval;
  1717. eglCreateContext: TeglCreateContext;
  1718. eglDestroyContext: TeglDestroyContext;
  1719. eglMakeCurrent: TeglMakeCurrent;
  1720. eglGetCurrentContext: TeglGetCurrentContext;
  1721. eglGetCurrentSurface: TeglGetCurrentSurface;
  1722. eglGetCurrentDisplay: TeglGetCurrentDisplay;
  1723. eglQueryContext: TeglQueryContext;
  1724. eglWaitGL: TeglWaitGL;
  1725. eglWaitNative: TeglWaitNative;
  1726. eglSwapBuffers: TeglSwapBuffers;
  1727. eglCopyBuffers: TeglCopyBuffers;
  1728. eglGetProcAddress: TeglGetProcAddress;
  1729. { =================================================== DelphiGL ======================================================= }
  1730. type
  1731. EdglOpenGLES = class(Exception);
  1732. EeglError = class(EdglOpenGLES)
  1733. public
  1734. ErrorCode: EGLint;
  1735. constructor Create(const msg: string; const aErrorCode: EGLint);
  1736. end;
  1737. TdglRenderContext = packed record
  1738. Display: EGLDisplay;
  1739. Surface: EGLSurface;
  1740. Context: EGLContext;
  1741. end;
  1742. function InitOpenGLES(const aOpenGLESLibName: String = LIBNAME_OPENGLES; aEGLLibName: String = LIBNAME_EGL): Boolean;
  1743. function CreateRenderingContext(const aDisplayType: EGLNativeDisplayType; const aWindowType: PEGLNativeWindowType; const aAttributes: PEGLint): TdglRenderContext;
  1744. procedure DestroyRenderingContext(const aContext: TdglRenderContext);
  1745. function ActivateRenderingContext(const aContext: TdglRenderContext): Boolean;
  1746. function DeactivateRenderingContext(const aContext: TdglRenderContext): Boolean;
  1747. procedure SwapBuffers(const aContext: TdglRenderContext);
  1748. procedure ReadExtensions;
  1749. implementation
  1750. var
  1751. LibHandleOpenGLES: Pointer = nil;
  1752. LibHandleEGL: Pointer = nil;
  1753. function dglLoadLibrary(const aName: PChar): Pointer;
  1754. begin
  1755. {$IFDEF DGL_LINUX}
  1756. result := dlopen(aName, RTLD_LAZY);
  1757. {$ENDIF}
  1758. end;
  1759. function dglGetProcAddress(const aProcName: PAnsiChar): Pointer;
  1760. begin
  1761. result := nil;
  1762. if Assigned(LibHandleOpenGLES) then
  1763. result := dlsym(LibHandleOpenGLES, aProcName);
  1764. if not Assigned(result) and Assigned(eglGetProcAddress) then
  1765. result := eglGetProcAddress(aProcName);
  1766. if not Assigned(result) and Assigned(LibHandleEGL) then
  1767. result := dlsym(LibHandleEGL, aProcName);
  1768. end;
  1769. function dglFreeAndNilLibrary(var aLibHandle: Pointer): Boolean;
  1770. begin
  1771. if Assigned(aLibHandle) then begin
  1772. {$IFDEF DGL_LINUX}
  1773. result := (dlclose(aLibHandle) = 0);
  1774. aLibHandle := nil;
  1775. {$ENDIF}
  1776. end else
  1777. result := false;
  1778. end;
  1779. procedure ReadOpenGLCore;
  1780. begin
  1781. end;
  1782. function InitOpenGLES(const aOpenGLESLibName: String; aEGLLibName: String): Boolean;
  1783. begin
  1784. result := true;
  1785. if Assigned(LibHandleOpenGLES) then
  1786. dglFreeAndNilLibrary(LibHandleOpenGLES);
  1787. if Assigned(LibHandleEGL) then
  1788. dglFreeAndNilLibrary(LibHandleEGL);
  1789. LibHandleOpenGLES := dglLoadLibrary(PChar(aOpenGLESLibName));
  1790. LibHandleEGL := dglLoadLibrary(PChar(aEGLLibName));
  1791. // load EGL procedures
  1792. if Assigned(LibHandleEGL) then begin
  1793. eglGetProcAddress := dglGetProcAddress('eglGetProcAddress');
  1794. eglGetError := dglGetProcAddress('eglGetError');
  1795. eglGetDisplay := dglGetProcAddress('eglGetDisplay');
  1796. eglInitialize := dglGetProcAddress('eglInitialize');
  1797. eglTerminate := dglGetProcAddress('eglTerminate');
  1798. eglQueryString := dglGetProcAddress('eglQueryString');
  1799. eglGetConfigs := dglGetProcAddress('eglGetConfigs');
  1800. eglChooseConfig := dglGetProcAddress('eglChooseConfig');
  1801. eglGetConfigAttrib := dglGetProcAddress('eglGetConfigAttrib');
  1802. eglCreateWindowSurface := dglGetProcAddress('eglCreateWindowSurface');
  1803. eglCreatePbufferSurface := dglGetProcAddress('eglCreatePbufferSurface');
  1804. eglCreatePixmapSurface := dglGetProcAddress('eglCreatePixmapSurface');
  1805. eglDestroySurface := dglGetProcAddress('eglDestroySurface');
  1806. eglQuerySurface := dglGetProcAddress('eglQuerySurface');
  1807. eglBindAPI := dglGetProcAddress('eglBindAPI');
  1808. eglQueryAPI := dglGetProcAddress('eglQueryAPI');
  1809. eglWaitClient := dglGetProcAddress('eglWaitClient');
  1810. eglReleaseThread := dglGetProcAddress('eglReleaseThread');
  1811. eglCreatePbufferFromClientBuffer := dglGetProcAddress('eglCreatePbufferFromClientBuffer');
  1812. eglSurfaceAttrib := dglGetProcAddress('eglSurfaceAttrib');
  1813. eglBindTexImage := dglGetProcAddress('eglBindTexImage');
  1814. eglReleaseTexImage := dglGetProcAddress('eglReleaseTexImage');
  1815. eglSwapInterval := dglGetProcAddress('eglSwapInterval');
  1816. eglCreateContext := dglGetProcAddress('eglCreateContext');
  1817. eglDestroyContext := dglGetProcAddress('eglDestroyContext');
  1818. eglMakeCurrent := dglGetProcAddress('eglMakeCurrent');
  1819. eglGetCurrentContext := dglGetProcAddress('eglGetCurrentContext');
  1820. eglGetCurrentSurface := dglGetProcAddress('eglGetCurrentSurface');
  1821. eglGetCurrentDisplay := dglGetProcAddress('eglGetCurrentDisplay');
  1822. eglQueryContext := dglGetProcAddress('eglQueryContext');
  1823. eglWaitGL := dglGetProcAddress('eglWaitGL');
  1824. eglWaitNative := dglGetProcAddress('eglWaitNative');
  1825. eglSwapBuffers := dglGetProcAddress('eglSwapBuffers');
  1826. eglCopyBuffers := dglGetProcAddress('eglCopyBuffers');
  1827. end else
  1828. result := false;
  1829. end;
  1830. procedure RaiseEglError(const aMsg: String);
  1831. var err: EGLint;
  1832. begin
  1833. err := eglGetError();
  1834. raise EeglError.Create(aMsg + ' ErrorCode: 0x' + IntToHex(err, 8), err);
  1835. end;
  1836. function CreateRenderingContext(const aDisplayType: EGLNativeDisplayType; const aWindowType: PEGLNativeWindowType; const aAttributes: PEGLint): TdglRenderContext;
  1837. var
  1838. ConfigCount: EGLint;
  1839. Config: EGLConfig;
  1840. begin
  1841. if (not Assigned(LibHandleOpenGLES) or not Assigned(LibHandleEGL)) and
  1842. not InitOpenGLES then
  1843. raise EdglOpenGLES.Create('unable to initialize OpenGL library');
  1844. result.Display := eglGetDisplay(aDisplayType);
  1845. if (result.Display = EGL_NO_DISPLAY) then
  1846. RaiseEglError('unable to get display.');
  1847. if (eglInitialize(result.Display, nil, nil) <> EGL_TRUE) then
  1848. RaiseEglError('unable to initialize egl.');
  1849. if (eglChooseConfig(result.Display, aAttributes, @Config, 1, @ConfigCount) <> EGL_TRUE) or
  1850. (ConfigCount <> 1) then
  1851. RaiseEglError('unable to get suitable config.');
  1852. result.Surface := eglCreateWindowSurface(result.Display, Config, aWindowType, nil);
  1853. if (result.Surface = EGL_NO_SURFACE) then
  1854. RaiseEglError('unable to create window surface.');
  1855. result.Context := eglCreateContext(result.Display, Config, EGL_NO_CONTEXT, nil);
  1856. if (result.Context = EGL_NO_CONTEXT) then begin
  1857. eglDestroySurface(result.Display, result.Surface);
  1858. RaiseEglError('unable to create context.');
  1859. end;
  1860. end;
  1861. procedure DestroyRenderingContext(const aContext: TdglRenderContext);
  1862. begin
  1863. if (eglGetCurrentContext = aContext.Context) and
  1864. not DeactivateRenderingContext(aContext) then
  1865. RaiseEglError('unable to unbind context.');
  1866. if (eglDestroyContext(aContext.Display, aContext.Context) <> EGL_TRUE) then
  1867. RaiseEglError('unable to destory context.');
  1868. if (eglDestroySurface(aContext.Display, aContext.Surface) <> EGL_TRUE) then
  1869. RaiseEglError('unable to destroy surface.');
  1870. end;
  1871. function ActivateRenderingContext(const aContext: TdglRenderContext): Boolean;
  1872. begin
  1873. result := (eglMakeCurrent(aContext.Display, aContext.Surface, aContext.Surface, aContext.Context) = GL_TRUE);
  1874. end;
  1875. function DeactivateRenderingContext(const aContext: TdglRenderContext): Boolean;
  1876. begin
  1877. result := (eglMakeCurrent(aContext.Display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT) = EGL_TRUE);
  1878. end;
  1879. procedure SwapBuffers(const aContext: TdglRenderContext);
  1880. begin
  1881. eglSwapBuffers(aContext.Display, aContext.Surface);
  1882. end;
  1883. procedure ReadExtensions;
  1884. begin
  1885. glActiveTexture := dglGetProcAddress('glActiveTexture');
  1886. glAttachShader := dglGetProcAddress('glAttachShader');
  1887. glBindAttribLocation := dglGetProcAddress('glBindAttribLocation');
  1888. glBindBuffer := dglGetProcAddress('glBindBuffer');
  1889. glBindFramebuffer := dglGetProcAddress('glBindFramebuffer');
  1890. glBindRenderbuffer := dglGetProcAddress('glBindRenderbuffer');
  1891. glBindTexture := dglGetProcAddress('glBindTexture');
  1892. glBlendColor := dglGetProcAddress('glBlendColor');
  1893. glBlendEquation := dglGetProcAddress('glBlendEquation');
  1894. glBlendEquationSeparate := dglGetProcAddress('glBlendEquationSeparate');
  1895. glBlendFunc := dglGetProcAddress('glBlendFunc');
  1896. glBlendFuncSeparate := dglGetProcAddress('glBlendFuncSeparate');
  1897. glBufferData := dglGetProcAddress('glBufferData');
  1898. glBufferSubData := dglGetProcAddress('glBufferSubData');
  1899. glCheckFramebufferStatus := dglGetProcAddress('glCheckFramebufferStatus');
  1900. glClear := dglGetProcAddress('glClear');
  1901. glClearColor := dglGetProcAddress('glClearColor');
  1902. glClearDepthf := dglGetProcAddress('glClearDepthf');
  1903. glClearStencil := dglGetProcAddress('glClearStencil');
  1904. glColorMask := dglGetProcAddress('glColorMask');
  1905. glCompileShader := dglGetProcAddress('glCompileShader');
  1906. glCompressedTexImage2D := dglGetProcAddress('glCompressedTexImage2D');
  1907. glCompressedTexSubImage2D := dglGetProcAddress('glCompressedTexSubImage2D');
  1908. glCopyTexImage2D := dglGetProcAddress('glCopyTexImage2D');
  1909. glCopyTexSubImage2D := dglGetProcAddress('glCopyTexSubImage2D');
  1910. glCreateProgram := dglGetProcAddress('glCreateProgram');
  1911. glCreateShader := dglGetProcAddress('glCreateShader');
  1912. glCullFace := dglGetProcAddress('glCullFace');
  1913. glDeleteBuffers := dglGetProcAddress('glDeleteBuffers');
  1914. glDeleteFramebuffers := dglGetProcAddress('glDeleteFramebuffers');
  1915. glDeleteProgram := dglGetProcAddress('glDeleteProgram');
  1916. glDeleteRenderbuffers := dglGetProcAddress('glDeleteRenderbuffers');
  1917. glDeleteShader := dglGetProcAddress('glDeleteShader');
  1918. glDeleteTextures := dglGetProcAddress('glDeleteTextures');
  1919. glDepthFunc := dglGetProcAddress('glDepthFunc');
  1920. glDepthMask := dglGetProcAddress('glDepthMask');
  1921. glDepthRangef := dglGetProcAddress('glDepthRangef');
  1922. glDetachShader := dglGetProcAddress('glDetachShader');
  1923. glDisable := dglGetProcAddress('glDisable');
  1924. glDisableVertexAttribArray := dglGetProcAddress('glDisableVertexAttribArray');
  1925. glDrawArrays := dglGetProcAddress('glDrawArrays');
  1926. glDrawElements := dglGetProcAddress('glDrawElements');
  1927. glEnable := dglGetProcAddress('glEnable');
  1928. glEnableVertexAttribArray := dglGetProcAddress('glEnableVertexAttribArray');
  1929. glFinish := dglGetProcAddress('glFinish');
  1930. glFlush := dglGetProcAddress('glFlush');
  1931. glFramebufferRenderbuffer := dglGetProcAddress('glFramebufferRenderbuffer');
  1932. glFramebufferTexture2D := dglGetProcAddress('glFramebufferTexture2D');
  1933. glFrontFace := dglGetProcAddress('glFrontFace');
  1934. glGenBuffers := dglGetProcAddress('glGenBuffers');
  1935. glGenerateMipmap := dglGetProcAddress('glGenerateMipmap');
  1936. glGenFramebuffers := dglGetProcAddress('glGenFramebuffers');
  1937. glGenRenderbuffers := dglGetProcAddress('glGenRenderbuffers');
  1938. glGenTextures := dglGetProcAddress('glGenTextures');
  1939. glGetActiveAttrib := dglGetProcAddress('glGetActiveAttrib');
  1940. glGetActiveUniform := dglGetProcAddress('glGetActiveUniform');
  1941. glGetAttachedShaders := dglGetProcAddress('glGetAttachedShaders');
  1942. glGetAttribLocation := dglGetProcAddress('glGetAttribLocation');
  1943. glGetBooleanv := dglGetProcAddress('glGetBooleanv');
  1944. glGetBufferParameteriv := dglGetProcAddress('glGetBufferParameteriv');
  1945. glGetError := dglGetProcAddress('glGetError');
  1946. glGetFloatv := dglGetProcAddress('glGetFloatv');
  1947. glGetFramebufferAttachmentParameteriv := dglGetProcAddress('glGetFramebufferAttachmentParameteriv');
  1948. glGetIntegerv := dglGetProcAddress('glGetIntegerv');
  1949. glGetProgramiv := dglGetProcAddress('glGetProgramiv');
  1950. glGetProgramInfoLog := dglGetProcAddress('glGetProgramInfoLog');
  1951. glGetRenderbufferParameteriv := dglGetProcAddress('glGetRenderbufferParameteriv');
  1952. glGetShaderiv := dglGetProcAddress('glGetShaderiv');
  1953. glGetShaderInfoLog := dglGetProcAddress('glGetShaderInfoLog');
  1954. glGetShaderPrecisionFormat := dglGetProcAddress('glGetShaderPrecisionFormat');
  1955. glGetShaderSource := dglGetProcAddress('glGetShaderSource');
  1956. glGetString := dglGetProcAddress('glGetString');
  1957. glGetTexParameterfv := dglGetProcAddress('glGetTexParameterfv');
  1958. glGetTexParameteriv := dglGetProcAddress('glGetTexParameteriv');
  1959. glGetUniformfv := dglGetProcAddress('glGetUniformfv');
  1960. glGetUniformiv := dglGetProcAddress('glGetUniformiv');
  1961. glGetUniformLocation := dglGetProcAddress('glGetUniformLocation');
  1962. glGetVertexAttribfv := dglGetProcAddress('glGetVertexAttribfv');
  1963. glGetVertexAttribiv := dglGetProcAddress('glGetVertexAttribiv');
  1964. glGetVertexAttribPointerv := dglGetProcAddress('glGetVertexAttribPointerv');
  1965. glHint := dglGetProcAddress('glHint');
  1966. glIsBuffer := dglGetProcAddress('glIsBuffer');
  1967. glIsEnabled := dglGetProcAddress('glIsEnabled');
  1968. glIsFramebuffer := dglGetProcAddress('glIsFramebuffer');
  1969. glIsProgram := dglGetProcAddress('glIsProgram');
  1970. glIsRenderbuffer := dglGetProcAddress('glIsRenderbuffer');
  1971. glIsShader := dglGetProcAddress('glIsShader');
  1972. glIsTexture := dglGetProcAddress('glIsTexture');
  1973. glLineWidth := dglGetProcAddress('glLineWidth');
  1974. glLinkProgram := dglGetProcAddress('glLinkProgram');
  1975. glPixelStorei := dglGetProcAddress('glPixelStorei');
  1976. glPolygonOffset := dglGetProcAddress('glPolygonOffset');
  1977. glReadPixels := dglGetProcAddress('glReadPixels');
  1978. glReleaseShaderCompiler := dglGetProcAddress('glReleaseShaderCompiler');
  1979. glRenderbufferStorage := dglGetProcAddress('glRenderbufferStorage');
  1980. glSampleCoverage := dglGetProcAddress('glSampleCoverage');
  1981. glScissor := dglGetProcAddress('glScissor');
  1982. glShaderBinary := dglGetProcAddress('glShaderBinary');
  1983. glShaderSource := dglGetProcAddress('glShaderSource');
  1984. glStencilFunc := dglGetProcAddress('glStencilFunc');
  1985. glStencilFuncSeparate := dglGetProcAddress('glStencilFuncSeparate');
  1986. glStencilMask := dglGetProcAddress('glStencilMask');
  1987. glStencilMaskSeparate := dglGetProcAddress('glStencilMaskSeparate');
  1988. glStencilOp := dglGetProcAddress('glStencilOp');
  1989. glStencilOpSeparate := dglGetProcAddress('glStencilOpSeparate');
  1990. glTexImage2D := dglGetProcAddress('glTexImage2D');
  1991. glTexParameterf := dglGetProcAddress('glTexParameterf');
  1992. glTexParameterfv := dglGetProcAddress('glTexParameterfv');
  1993. glTexParameteri := dglGetProcAddress('glTexParameteri');
  1994. glTexParameteriv := dglGetProcAddress('glTexParameteriv');
  1995. glTexSubImage2D := dglGetProcAddress('glTexSubImage2D');
  1996. glUniform1f := dglGetProcAddress('glUniform1f');
  1997. glUniform1fv := dglGetProcAddress('glUniform1fv');
  1998. glUniform1i := dglGetProcAddress('glUniform1i');
  1999. glUniform1iv := dglGetProcAddress('glUniform1iv');
  2000. glUniform2f := dglGetProcAddress('glUniform2f');
  2001. glUniform2fv := dglGetProcAddress('glUniform2fv');
  2002. glUniform2i := dglGetProcAddress('glUniform2i');
  2003. glUniform2iv := dglGetProcAddress('glUniform2iv');
  2004. glUniform3f := dglGetProcAddress('glUniform3f');
  2005. glUniform3fv := dglGetProcAddress('glUniform3fv');
  2006. glUniform3i := dglGetProcAddress('glUniform3i');
  2007. glUniform3iv := dglGetProcAddress('glUniform3iv');
  2008. glUniform4f := dglGetProcAddress('glUniform4f');
  2009. glUniform4fv := dglGetProcAddress('glUniform4fv');
  2010. glUniform4i := dglGetProcAddress('glUniform4i');
  2011. glUniform4iv := dglGetProcAddress('glUniform4iv');
  2012. glUniformMatrix2fv := dglGetProcAddress('glUniformMatrix2fv');
  2013. glUniformMatrix3fv := dglGetProcAddress('glUniformMatrix3fv');
  2014. glUniformMatrix4fv := dglGetProcAddress('glUniformMatrix4fv');
  2015. glUseProgram := dglGetProcAddress('glUseProgram');
  2016. glValidateProgram := dglGetProcAddress('glValidateProgram');
  2017. glVertexAttrib1f := dglGetProcAddress('glVertexAttrib1f');
  2018. glVertexAttrib1fv := dglGetProcAddress('glVertexAttrib1fv');
  2019. glVertexAttrib2f := dglGetProcAddress('glVertexAttrib2f');
  2020. glVertexAttrib2fv := dglGetProcAddress('glVertexAttrib2fv');
  2021. glVertexAttrib3f := dglGetProcAddress('glVertexAttrib3f');
  2022. glVertexAttrib3fv := dglGetProcAddress('glVertexAttrib3fv');
  2023. glVertexAttrib4f := dglGetProcAddress('glVertexAttrib4f');
  2024. glVertexAttrib4fv := dglGetProcAddress('glVertexAttrib4fv');
  2025. glVertexAttribPointer := dglGetProcAddress('glVertexAttribPointer');
  2026. glViewport := dglGetProcAddress('glViewport');
  2027. { OpenGL ES 3.0 }
  2028. glReadBuffer := dglGetProcAddress('glReadBuffer');
  2029. glDrawRangeElements := dglGetProcAddress('glDrawRangeElements');
  2030. glTexImage3D := dglGetProcAddress('glTexImage3D');
  2031. glTexSubImage3D := dglGetProcAddress('glTexSubImage3D');
  2032. glCopyTexSubImage3D := dglGetProcAddress('glCopyTexSubImage3D');
  2033. glCompressedTexImage3D := dglGetProcAddress('glCompressedTexImage3D');
  2034. glCompressedTexSubImage3D := dglGetProcAddress('glCompressedTexSubImage3D');
  2035. glGenQueries := dglGetProcAddress('glGenQueries');
  2036. glDeleteQueries := dglGetProcAddress('glDeleteQueries');
  2037. glIsQuery := dglGetProcAddress('glIsQuery');
  2038. glBeginQuery := dglGetProcAddress('glBeginQuery');
  2039. glEndQuery := dglGetProcAddress('glEndQuery');
  2040. glGetQueryiv := dglGetProcAddress('glGetQueryiv');
  2041. glGetQueryObjectuiv := dglGetProcAddress('glGetQueryObjectuiv');
  2042. glUnmapBuffer := dglGetProcAddress('glUnmapBuffer');
  2043. glGetBufferPointerv := dglGetProcAddress('glGetBufferPointerv');
  2044. glDrawBuffers := dglGetProcAddress('glDrawBuffers');
  2045. glUniformMatrix2x3fv := dglGetProcAddress('glUniformMatrix2x3fv');
  2046. glUniformMatrix3x2fv := dglGetProcAddress('glUniformMatrix3x2fv');
  2047. glUniformMatrix2x4fv := dglGetProcAddress('glUniformMatrix2x4fv');
  2048. glUniformMatrix4x2fv := dglGetProcAddress('glUniformMatrix4x2fv');
  2049. glUniformMatrix3x4fv := dglGetProcAddress('glUniformMatrix3x4fv');
  2050. glUniformMatrix4x3fv := dglGetProcAddress('glUniformMatrix4x3fv');
  2051. glBlitFramebuffer := dglGetProcAddress('glBlitFramebuffer');
  2052. glRenderbufferStorageMultisample := dglGetProcAddress('glRenderbufferStorageMultisample');
  2053. glFramebufferTextureLayer := dglGetProcAddress('glFramebufferTextureLayer');
  2054. glMapBufferRange := dglGetProcAddress('glMapBufferRange');
  2055. glFlushMappedBufferRange := dglGetProcAddress('glFlushMappedBufferRange');
  2056. glBindVertexArray := dglGetProcAddress('glBindVertexArray');
  2057. glDeleteVertexArrays := dglGetProcAddress('glDeleteVertexArrays');
  2058. glGenVertexArrays := dglGetProcAddress('glGenVertexArrays');
  2059. glIsVertexArray := dglGetProcAddress('glIsVertexArray');
  2060. glGetIntegeri_v := dglGetProcAddress('glGetIntegeri_v');
  2061. glBeginTransformFeedback := dglGetProcAddress('glBeginTransformFeedback');
  2062. glEndTransformFeedback := dglGetProcAddress('glEndTransformFeedback');
  2063. glBindBufferRange := dglGetProcAddress('glBindBufferRange');
  2064. glBindBufferBase := dglGetProcAddress('glBindBufferBase');
  2065. glTransformFeedbackVaryings := dglGetProcAddress('glTransformFeedbackVaryings');
  2066. glGetTransformFeedbackVarying := dglGetProcAddress('glGetTransformFeedbackVarying');
  2067. glVertexAttribIPointer := dglGetProcAddress('glVertexAttribIPointer');
  2068. glGetVertexAttribIiv := dglGetProcAddress('glGetVertexAttribIiv');
  2069. glGetVertexAttribIuiv := dglGetProcAddress('glGetVertexAttribIuiv');
  2070. glVertexAttribI4i := dglGetProcAddress('glVertexAttribI4i');
  2071. glVertexAttribI4ui := dglGetProcAddress('glVertexAttribI4ui');
  2072. glVertexAttribI4iv := dglGetProcAddress('glVertexAttribI4iv');
  2073. glVertexAttribI4uiv := dglGetProcAddress('glVertexAttribI4uiv');
  2074. glGetUniformuiv := dglGetProcAddress('glGetUniformuiv');
  2075. glGetFragDataLocation := dglGetProcAddress('glGetFragDataLocation');
  2076. glUniform1ui := dglGetProcAddress('glUniform1ui');
  2077. glUniform2ui := dglGetProcAddress('glUniform2ui');
  2078. glUniform3ui := dglGetProcAddress('glUniform3ui');
  2079. glUniform4ui := dglGetProcAddress('glUniform4ui');
  2080. glUniform1uiv := dglGetProcAddress('glUniform1uiv');
  2081. glUniform2uiv := dglGetProcAddress('glUniform2uiv');
  2082. glUniform3uiv := dglGetProcAddress('glUniform3uiv');
  2083. glUniform4uiv := dglGetProcAddress('glUniform4uiv');
  2084. glClearBufferiv := dglGetProcAddress('glClearBufferiv');
  2085. glClearBufferuiv := dglGetProcAddress('glClearBufferuiv');
  2086. glClearBufferfv := dglGetProcAddress('glClearBufferfv');
  2087. glClearBufferfi := dglGetProcAddress('glClearBufferfi');
  2088. glGetStringi := dglGetProcAddress('glGetStringi');
  2089. glCopyBufferSubData := dglGetProcAddress('glCopyBufferSubData');
  2090. glGetUniformIndices := dglGetProcAddress('glGetUniformIndices');
  2091. glGetActiveUniformsiv := dglGetProcAddress('glGetActiveUniformsiv');
  2092. glGetUniformBlockIndex := dglGetProcAddress('glGetUniformBlockIndex');
  2093. glGetActiveUniformBlockiv := dglGetProcAddress('glGetActiveUniformBlockiv');
  2094. glGetActiveUniformBlockName := dglGetProcAddress('glGetActiveUniformBlockName');
  2095. glUniformBlockBinding := dglGetProcAddress('glUniformBlockBinding');
  2096. glDrawArraysInstanced := dglGetProcAddress('glDrawArraysInstanced');
  2097. glDrawElementsInstanced := dglGetProcAddress('glDrawElementsInstanced');
  2098. glFenceSync := dglGetProcAddress('glFenceSync');
  2099. glIsSync := dglGetProcAddress('glIsSync');
  2100. glDeleteSync := dglGetProcAddress('glDeleteSync');
  2101. glClientWaitSync := dglGetProcAddress('glClientWaitSync');
  2102. glWaitSync := dglGetProcAddress('glWaitSync');
  2103. glGetInteger64v := dglGetProcAddress('glGetInteger64v');
  2104. glGetSynciv := dglGetProcAddress('glGetSynciv');
  2105. glGetInteger64i_v := dglGetProcAddress('glGetInteger64i_v');
  2106. glGetBufferParameteri64v := dglGetProcAddress('glGetBufferParameteri64v');
  2107. glGenSamplers := dglGetProcAddress('glGenSamplers');
  2108. glDeleteSamplers := dglGetProcAddress('glDeleteSamplers');
  2109. glIsSampler := dglGetProcAddress('glIsSampler');
  2110. glBindSampler := dglGetProcAddress('glBindSampler');
  2111. glSamplerParameteri := dglGetProcAddress('glSamplerParameteri');
  2112. glSamplerParameteriv := dglGetProcAddress('glSamplerParameteriv');
  2113. glSamplerParameterf := dglGetProcAddress('glSamplerParameterf');
  2114. glSamplerParameterfv := dglGetProcAddress('glSamplerParameterfv');
  2115. glGetSamplerParameteriv := dglGetProcAddress('glGetSamplerParameteriv');
  2116. glGetSamplerParameterfv := dglGetProcAddress('glGetSamplerParameterfv');
  2117. glVertexAttribDivisor := dglGetProcAddress('glVertexAttribDivisor');
  2118. glBindTransformFeedback := dglGetProcAddress('glBindTransformFeedback');
  2119. glDeleteTransformFeedbacks := dglGetProcAddress('glDeleteTransformFeedbacks');
  2120. glGenTransformFeedbacks := dglGetProcAddress('glGenTransformFeedbacks');
  2121. glIsTransformFeedback := dglGetProcAddress('glIsTransformFeedback');
  2122. glPauseTransformFeedback := dglGetProcAddress('glPauseTransformFeedback');
  2123. glResumeTransformFeedback := dglGetProcAddress('glResumeTransformFeedback');
  2124. glGetProgramBinary := dglGetProcAddress('glGetProgramBinary');
  2125. glProgramBinary := dglGetProcAddress('glProgramBinary');
  2126. glProgramParameteri := dglGetProcAddress('glProgramParameteri');
  2127. glInvalidateFramebuffer := dglGetProcAddress('glInvalidateFramebuffer');
  2128. glInvalidateSubFramebuffer := dglGetProcAddress('glInvalidateSubFramebuffer');
  2129. glTexStorage2D := dglGetProcAddress('glTexStorage2D');
  2130. glTexStorage3D := dglGetProcAddress('glTexStorage3D');
  2131. glGetInternalformativ := dglGetProcAddress('glGetInternalformativ');
  2132. { OpenGL ES 3.1 }
  2133. glDispatchCompute := dglGetProcAddress('glDispatchCompute');
  2134. glDispatchComputeIndirect := dglGetProcAddress('glDispatchComputeIndirect');
  2135. glDrawArraysIndirect := dglGetProcAddress('glDrawArraysIndirect');
  2136. glDrawElementsIndirect := dglGetProcAddress('glDrawElementsIndirect');
  2137. glFramebufferParameteri := dglGetProcAddress('glFramebufferParameteri');
  2138. glGetFramebufferParameteriv := dglGetProcAddress('glGetFramebufferParameteriv');
  2139. glGetProgramInterfaceiv := dglGetProcAddress('glGetProgramInterfaceiv');
  2140. glGetProgramResourceIndex := dglGetProcAddress('glGetProgramResourceIndex');
  2141. glGetProgramResourceName := dglGetProcAddress('glGetProgramResourceName');
  2142. glGetProgramResourceiv := dglGetProcAddress('glGetProgramResourceiv');
  2143. glGetProgramResourceLocation := dglGetProcAddress('glGetProgramResourceLocation');
  2144. glUseProgramStages := dglGetProcAddress('glUseProgramStages');
  2145. glActiveShaderProgram := dglGetProcAddress('glActiveShaderProgram');
  2146. glCreateShaderProgramv := dglGetProcAddress('glCreateShaderProgramv');
  2147. glBindProgramPipeline := dglGetProcAddress('glBindProgramPipeline');
  2148. glDeleteProgramPipelines := dglGetProcAddress('glDeleteProgramPipelines');
  2149. glGenProgramPipelines := dglGetProcAddress('glGenProgramPipelines');
  2150. glIsProgramPipeline := dglGetProcAddress('glIsProgramPipeline');
  2151. glGetProgramPipelineiv := dglGetProcAddress('glGetProgramPipelineiv');
  2152. glProgramUniform1i := dglGetProcAddress('glProgramUniform1i');
  2153. glProgramUniform2i := dglGetProcAddress('glProgramUniform2i');
  2154. glProgramUniform3i := dglGetProcAddress('glProgramUniform3i');
  2155. glProgramUniform4i := dglGetProcAddress('glProgramUniform4i');
  2156. glProgramUniform1ui := dglGetProcAddress('glProgramUniform1ui');
  2157. glProgramUniform2ui := dglGetProcAddress('glProgramUniform2ui');
  2158. glProgramUniform3ui := dglGetProcAddress('glProgramUniform3ui');
  2159. glProgramUniform4ui := dglGetProcAddress('glProgramUniform4ui');
  2160. glProgramUniform1f := dglGetProcAddress('glProgramUniform1f');
  2161. glProgramUniform2f := dglGetProcAddress('glProgramUniform2f');
  2162. glProgramUniform3f := dglGetProcAddress('glProgramUniform3f');
  2163. glProgramUniform4f := dglGetProcAddress('glProgramUniform4f');
  2164. glProgramUniform1iv := dglGetProcAddress('glProgramUniform1iv');
  2165. glProgramUniform2iv := dglGetProcAddress('glProgramUniform2iv');
  2166. glProgramUniform3iv := dglGetProcAddress('glProgramUniform3iv');
  2167. glProgramUniform4iv := dglGetProcAddress('glProgramUniform4iv');
  2168. glProgramUniform1uiv := dglGetProcAddress('glProgramUniform1uiv');
  2169. glProgramUniform2uiv := dglGetProcAddress('glProgramUniform2uiv');
  2170. glProgramUniform3uiv := dglGetProcAddress('glProgramUniform3uiv');
  2171. glProgramUniform4uiv := dglGetProcAddress('glProgramUniform4uiv');
  2172. glProgramUniform1fv := dglGetProcAddress('glProgramUniform1fv');
  2173. glProgramUniform2fv := dglGetProcAddress('glProgramUniform2fv');
  2174. glProgramUniform3fv := dglGetProcAddress('glProgramUniform3fv');
  2175. glProgramUniform4fv := dglGetProcAddress('glProgramUniform4fv');
  2176. glProgramUniformMatrix2fv := dglGetProcAddress('glProgramUniformMatrix2fv');
  2177. glProgramUniformMatrix3fv := dglGetProcAddress('glProgramUniformMatrix3fv');
  2178. glProgramUniformMatrix4fv := dglGetProcAddress('glProgramUniformMatrix4fv');
  2179. glProgramUniformMatrix2x3fv := dglGetProcAddress('glProgramUniformMatrix2x3fv');
  2180. glProgramUniformMatrix3x2fv := dglGetProcAddress('glProgramUniformMatrix3x2fv');
  2181. glProgramUniformMatrix2x4fv := dglGetProcAddress('glProgramUniformMatrix2x4fv');
  2182. glProgramUniformMatrix4x2fv := dglGetProcAddress('glProgramUniformMatrix4x2fv');
  2183. glProgramUniformMatrix3x4fv := dglGetProcAddress('glProgramUniformMatrix3x4fv');
  2184. glProgramUniformMatrix4x3fv := dglGetProcAddress('glProgramUniformMatrix4x3fv');
  2185. glValidateProgramPipeline := dglGetProcAddress('glValidateProgramPipeline');
  2186. glGetProgramPipelineInfoLog := dglGetProcAddress('glGetProgramPipelineInfoLog');
  2187. glBindImageTexture := dglGetProcAddress('glBindImageTexture');
  2188. glGetBooleaniV := dglGetProcAddress('glGetBooleaniV');
  2189. glMemoryBarrier := dglGetProcAddress('glMemoryBarrier');
  2190. glMemoryBarrierByRegion := dglGetProcAddress('glMemoryBarrierByRegion');
  2191. glTexStorage2DMultisample := dglGetProcAddress('glTexStorage2DMultisample');
  2192. glGetMultisamplefv := dglGetProcAddress('glGetMultisamplefv');
  2193. glSampleMaski := dglGetProcAddress('glSampleMaski');
  2194. glGetTexLevelParameteriv := dglGetProcAddress('glGetTexLevelParameteriv');
  2195. glGetTexLevelParameterfv := dglGetProcAddress('glGetTexLevelParameterfv');
  2196. glBindVertexBuffer := dglGetProcAddress('glBindVertexBuffer');
  2197. glVertexAttribFormat := dglGetProcAddress('glVertexAttribFormat');
  2198. glVertexAttribIFormat := dglGetProcAddress('glVertexAttribIFormat');
  2199. glVertexAttribBinding := dglGetProcAddress('glVertexAttribBinding');
  2200. glVertexBindingDivisor := dglGetProcAddress('glVertexBindingDivisor');
  2201. end;
  2202. constructor EeglError.Create(const msg: string; const aErrorCode: EGLint);
  2203. begin
  2204. inherited Create(msg);
  2205. ErrorCode := aErrorCode;
  2206. end;
  2207. end.