WebGL2RenderingContext.hx 65 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180
  1. /*
  2. * Copyright (C)2005-2019 Haxe Foundation
  3. *
  4. * Permission is hereby granted, free of charge, to any person obtaining a
  5. * copy of this software and associated documentation files (the "Software"),
  6. * to deal in the Software without restriction, including without limitation
  7. * the rights to use, copy, modify, merge, publish, distribute, sublicense,
  8. * and/or sell copies of the Software, and to permit persons to whom the
  9. * Software is furnished to do so, subject to the following conditions:
  10. *
  11. * The above copyright notice and this permission notice shall be included in
  12. * all copies or substantial portions of the Software.
  13. *
  14. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  15. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  16. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  17. * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  18. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  19. * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  20. * DEALINGS IN THE SOFTWARE.
  21. */
  22. // This file is generated from mozilla\WebGL2RenderingContext.webidl. Do not edit!
  23. package js.html.webgl;
  24. /**
  25. The WebGL2RenderingContext interface provides the OpenGL ES 3.0 rendering context for the drawing surface of an HTML `canvas` element.
  26. Documentation [WebGL2RenderingContext](https://developer.mozilla.org/en-US/docs/Web/API/WebGL2RenderingContext) by [Mozilla Contributors](https://developer.mozilla.org/en-US/docs/Web/API/WebGL2RenderingContext$history), licensed under [CC-BY-SA 2.5](https://creativecommons.org/licenses/by-sa/2.5/).
  27. @see <https://developer.mozilla.org/en-US/docs/Web/API/WebGL2RenderingContext>
  28. **/
  29. @:native("WebGL2RenderingContext")
  30. extern class WebGL2RenderingContext extends RenderingContext {
  31. static inline var READ_BUFFER : Int = 3074;
  32. static inline var UNPACK_ROW_LENGTH : Int = 3314;
  33. static inline var UNPACK_SKIP_ROWS : Int = 3315;
  34. static inline var UNPACK_SKIP_PIXELS : Int = 3316;
  35. static inline var PACK_ROW_LENGTH : Int = 3330;
  36. static inline var PACK_SKIP_ROWS : Int = 3331;
  37. static inline var PACK_SKIP_PIXELS : Int = 3332;
  38. static inline var COLOR : Int = 6144;
  39. static inline var DEPTH : Int = 6145;
  40. static inline var STENCIL : Int = 6146;
  41. static inline var RED : Int = 6403;
  42. static inline var RGB8 : Int = 32849;
  43. static inline var RGBA8 : Int = 32856;
  44. static inline var RGB10_A2 : Int = 32857;
  45. static inline var TEXTURE_BINDING_3D : Int = 32874;
  46. static inline var UNPACK_SKIP_IMAGES : Int = 32877;
  47. static inline var UNPACK_IMAGE_HEIGHT : Int = 32878;
  48. static inline var TEXTURE_3D : Int = 32879;
  49. static inline var TEXTURE_WRAP_R : Int = 32882;
  50. static inline var MAX_3D_TEXTURE_SIZE : Int = 32883;
  51. static inline var UNSIGNED_INT_2_10_10_10_REV : Int = 33640;
  52. static inline var MAX_ELEMENTS_VERTICES : Int = 33000;
  53. static inline var MAX_ELEMENTS_INDICES : Int = 33001;
  54. static inline var TEXTURE_MIN_LOD : Int = 33082;
  55. static inline var TEXTURE_MAX_LOD : Int = 33083;
  56. static inline var TEXTURE_BASE_LEVEL : Int = 33084;
  57. static inline var TEXTURE_MAX_LEVEL : Int = 33085;
  58. static inline var MIN : Int = 32775;
  59. static inline var MAX : Int = 32776;
  60. static inline var DEPTH_COMPONENT24 : Int = 33190;
  61. static inline var MAX_TEXTURE_LOD_BIAS : Int = 34045;
  62. static inline var TEXTURE_COMPARE_MODE : Int = 34892;
  63. static inline var TEXTURE_COMPARE_FUNC : Int = 34893;
  64. static inline var CURRENT_QUERY : Int = 34917;
  65. static inline var QUERY_RESULT : Int = 34918;
  66. static inline var QUERY_RESULT_AVAILABLE : Int = 34919;
  67. static inline var STREAM_READ : Int = 35041;
  68. static inline var STREAM_COPY : Int = 35042;
  69. static inline var STATIC_READ : Int = 35045;
  70. static inline var STATIC_COPY : Int = 35046;
  71. static inline var DYNAMIC_READ : Int = 35049;
  72. static inline var DYNAMIC_COPY : Int = 35050;
  73. static inline var MAX_DRAW_BUFFERS : Int = 34852;
  74. static inline var DRAW_BUFFER0 : Int = 34853;
  75. static inline var DRAW_BUFFER1 : Int = 34854;
  76. static inline var DRAW_BUFFER2 : Int = 34855;
  77. static inline var DRAW_BUFFER3 : Int = 34856;
  78. static inline var DRAW_BUFFER4 : Int = 34857;
  79. static inline var DRAW_BUFFER5 : Int = 34858;
  80. static inline var DRAW_BUFFER6 : Int = 34859;
  81. static inline var DRAW_BUFFER7 : Int = 34860;
  82. static inline var DRAW_BUFFER8 : Int = 34861;
  83. static inline var DRAW_BUFFER9 : Int = 34862;
  84. static inline var DRAW_BUFFER10 : Int = 34863;
  85. static inline var DRAW_BUFFER11 : Int = 34864;
  86. static inline var DRAW_BUFFER12 : Int = 34865;
  87. static inline var DRAW_BUFFER13 : Int = 34866;
  88. static inline var DRAW_BUFFER14 : Int = 34867;
  89. static inline var DRAW_BUFFER15 : Int = 34868;
  90. static inline var MAX_FRAGMENT_UNIFORM_COMPONENTS : Int = 35657;
  91. static inline var MAX_VERTEX_UNIFORM_COMPONENTS : Int = 35658;
  92. static inline var SAMPLER_3D : Int = 35679;
  93. static inline var SAMPLER_2D_SHADOW : Int = 35682;
  94. static inline var FRAGMENT_SHADER_DERIVATIVE_HINT : Int = 35723;
  95. static inline var PIXEL_PACK_BUFFER : Int = 35051;
  96. static inline var PIXEL_UNPACK_BUFFER : Int = 35052;
  97. static inline var PIXEL_PACK_BUFFER_BINDING : Int = 35053;
  98. static inline var PIXEL_UNPACK_BUFFER_BINDING : Int = 35055;
  99. static inline var FLOAT_MAT2x3 : Int = 35685;
  100. static inline var FLOAT_MAT2x4 : Int = 35686;
  101. static inline var FLOAT_MAT3x2 : Int = 35687;
  102. static inline var FLOAT_MAT3x4 : Int = 35688;
  103. static inline var FLOAT_MAT4x2 : Int = 35689;
  104. static inline var FLOAT_MAT4x3 : Int = 35690;
  105. static inline var SRGB : Int = 35904;
  106. static inline var SRGB8 : Int = 35905;
  107. static inline var SRGB8_ALPHA8 : Int = 35907;
  108. static inline var COMPARE_REF_TO_TEXTURE : Int = 34894;
  109. static inline var RGBA32F : Int = 34836;
  110. static inline var RGB32F : Int = 34837;
  111. static inline var RGBA16F : Int = 34842;
  112. static inline var RGB16F : Int = 34843;
  113. static inline var VERTEX_ATTRIB_ARRAY_INTEGER : Int = 35069;
  114. static inline var MAX_ARRAY_TEXTURE_LAYERS : Int = 35071;
  115. static inline var MIN_PROGRAM_TEXEL_OFFSET : Int = 35076;
  116. static inline var MAX_PROGRAM_TEXEL_OFFSET : Int = 35077;
  117. static inline var MAX_VARYING_COMPONENTS : Int = 35659;
  118. static inline var TEXTURE_2D_ARRAY : Int = 35866;
  119. static inline var TEXTURE_BINDING_2D_ARRAY : Int = 35869;
  120. static inline var R11F_G11F_B10F : Int = 35898;
  121. static inline var UNSIGNED_INT_10F_11F_11F_REV : Int = 35899;
  122. static inline var RGB9_E5 : Int = 35901;
  123. static inline var UNSIGNED_INT_5_9_9_9_REV : Int = 35902;
  124. static inline var TRANSFORM_FEEDBACK_BUFFER_MODE : Int = 35967;
  125. static inline var MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS : Int = 35968;
  126. static inline var TRANSFORM_FEEDBACK_VARYINGS : Int = 35971;
  127. static inline var TRANSFORM_FEEDBACK_BUFFER_START : Int = 35972;
  128. static inline var TRANSFORM_FEEDBACK_BUFFER_SIZE : Int = 35973;
  129. static inline var TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN : Int = 35976;
  130. static inline var RASTERIZER_DISCARD : Int = 35977;
  131. static inline var MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS : Int = 35978;
  132. static inline var MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS : Int = 35979;
  133. static inline var INTERLEAVED_ATTRIBS : Int = 35980;
  134. static inline var SEPARATE_ATTRIBS : Int = 35981;
  135. static inline var TRANSFORM_FEEDBACK_BUFFER : Int = 35982;
  136. static inline var TRANSFORM_FEEDBACK_BUFFER_BINDING : Int = 35983;
  137. static inline var RGBA32UI : Int = 36208;
  138. static inline var RGB32UI : Int = 36209;
  139. static inline var RGBA16UI : Int = 36214;
  140. static inline var RGB16UI : Int = 36215;
  141. static inline var RGBA8UI : Int = 36220;
  142. static inline var RGB8UI : Int = 36221;
  143. static inline var RGBA32I : Int = 36226;
  144. static inline var RGB32I : Int = 36227;
  145. static inline var RGBA16I : Int = 36232;
  146. static inline var RGB16I : Int = 36233;
  147. static inline var RGBA8I : Int = 36238;
  148. static inline var RGB8I : Int = 36239;
  149. static inline var RED_INTEGER : Int = 36244;
  150. static inline var RGB_INTEGER : Int = 36248;
  151. static inline var RGBA_INTEGER : Int = 36249;
  152. static inline var SAMPLER_2D_ARRAY : Int = 36289;
  153. static inline var SAMPLER_2D_ARRAY_SHADOW : Int = 36292;
  154. static inline var SAMPLER_CUBE_SHADOW : Int = 36293;
  155. static inline var UNSIGNED_INT_VEC2 : Int = 36294;
  156. static inline var UNSIGNED_INT_VEC3 : Int = 36295;
  157. static inline var UNSIGNED_INT_VEC4 : Int = 36296;
  158. static inline var INT_SAMPLER_2D : Int = 36298;
  159. static inline var INT_SAMPLER_3D : Int = 36299;
  160. static inline var INT_SAMPLER_CUBE : Int = 36300;
  161. static inline var INT_SAMPLER_2D_ARRAY : Int = 36303;
  162. static inline var UNSIGNED_INT_SAMPLER_2D : Int = 36306;
  163. static inline var UNSIGNED_INT_SAMPLER_3D : Int = 36307;
  164. static inline var UNSIGNED_INT_SAMPLER_CUBE : Int = 36308;
  165. static inline var UNSIGNED_INT_SAMPLER_2D_ARRAY : Int = 36311;
  166. static inline var DEPTH_COMPONENT32F : Int = 36012;
  167. static inline var DEPTH32F_STENCIL8 : Int = 36013;
  168. static inline var FLOAT_32_UNSIGNED_INT_24_8_REV : Int = 36269;
  169. static inline var FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING : Int = 33296;
  170. static inline var FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE : Int = 33297;
  171. static inline var FRAMEBUFFER_ATTACHMENT_RED_SIZE : Int = 33298;
  172. static inline var FRAMEBUFFER_ATTACHMENT_GREEN_SIZE : Int = 33299;
  173. static inline var FRAMEBUFFER_ATTACHMENT_BLUE_SIZE : Int = 33300;
  174. static inline var FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE : Int = 33301;
  175. static inline var FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE : Int = 33302;
  176. static inline var FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE : Int = 33303;
  177. static inline var FRAMEBUFFER_DEFAULT : Int = 33304;
  178. static inline var UNSIGNED_INT_24_8 : Int = 34042;
  179. static inline var DEPTH24_STENCIL8 : Int = 35056;
  180. static inline var UNSIGNED_NORMALIZED : Int = 35863;
  181. static inline var DRAW_FRAMEBUFFER_BINDING : Int = 36006;
  182. static inline var READ_FRAMEBUFFER : Int = 36008;
  183. static inline var DRAW_FRAMEBUFFER : Int = 36009;
  184. static inline var READ_FRAMEBUFFER_BINDING : Int = 36010;
  185. static inline var RENDERBUFFER_SAMPLES : Int = 36011;
  186. static inline var FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER : Int = 36052;
  187. static inline var MAX_COLOR_ATTACHMENTS : Int = 36063;
  188. static inline var COLOR_ATTACHMENT1 : Int = 36065;
  189. static inline var COLOR_ATTACHMENT2 : Int = 36066;
  190. static inline var COLOR_ATTACHMENT3 : Int = 36067;
  191. static inline var COLOR_ATTACHMENT4 : Int = 36068;
  192. static inline var COLOR_ATTACHMENT5 : Int = 36069;
  193. static inline var COLOR_ATTACHMENT6 : Int = 36070;
  194. static inline var COLOR_ATTACHMENT7 : Int = 36071;
  195. static inline var COLOR_ATTACHMENT8 : Int = 36072;
  196. static inline var COLOR_ATTACHMENT9 : Int = 36073;
  197. static inline var COLOR_ATTACHMENT10 : Int = 36074;
  198. static inline var COLOR_ATTACHMENT11 : Int = 36075;
  199. static inline var COLOR_ATTACHMENT12 : Int = 36076;
  200. static inline var COLOR_ATTACHMENT13 : Int = 36077;
  201. static inline var COLOR_ATTACHMENT14 : Int = 36078;
  202. static inline var COLOR_ATTACHMENT15 : Int = 36079;
  203. static inline var FRAMEBUFFER_INCOMPLETE_MULTISAMPLE : Int = 36182;
  204. static inline var MAX_SAMPLES : Int = 36183;
  205. static inline var HALF_FLOAT : Int = 5131;
  206. static inline var RG : Int = 33319;
  207. static inline var RG_INTEGER : Int = 33320;
  208. static inline var R8 : Int = 33321;
  209. static inline var RG8 : Int = 33323;
  210. static inline var R16F : Int = 33325;
  211. static inline var R32F : Int = 33326;
  212. static inline var RG16F : Int = 33327;
  213. static inline var RG32F : Int = 33328;
  214. static inline var R8I : Int = 33329;
  215. static inline var R8UI : Int = 33330;
  216. static inline var R16I : Int = 33331;
  217. static inline var R16UI : Int = 33332;
  218. static inline var R32I : Int = 33333;
  219. static inline var R32UI : Int = 33334;
  220. static inline var RG8I : Int = 33335;
  221. static inline var RG8UI : Int = 33336;
  222. static inline var RG16I : Int = 33337;
  223. static inline var RG16UI : Int = 33338;
  224. static inline var RG32I : Int = 33339;
  225. static inline var RG32UI : Int = 33340;
  226. static inline var VERTEX_ARRAY_BINDING : Int = 34229;
  227. static inline var R8_SNORM : Int = 36756;
  228. static inline var RG8_SNORM : Int = 36757;
  229. static inline var RGB8_SNORM : Int = 36758;
  230. static inline var RGBA8_SNORM : Int = 36759;
  231. static inline var SIGNED_NORMALIZED : Int = 36764;
  232. static inline var COPY_READ_BUFFER : Int = 36662;
  233. static inline var COPY_WRITE_BUFFER : Int = 36663;
  234. static inline var COPY_READ_BUFFER_BINDING : Int = 36662;
  235. static inline var COPY_WRITE_BUFFER_BINDING : Int = 36663;
  236. static inline var UNIFORM_BUFFER : Int = 35345;
  237. static inline var UNIFORM_BUFFER_BINDING : Int = 35368;
  238. static inline var UNIFORM_BUFFER_START : Int = 35369;
  239. static inline var UNIFORM_BUFFER_SIZE : Int = 35370;
  240. static inline var MAX_VERTEX_UNIFORM_BLOCKS : Int = 35371;
  241. static inline var MAX_FRAGMENT_UNIFORM_BLOCKS : Int = 35373;
  242. static inline var MAX_COMBINED_UNIFORM_BLOCKS : Int = 35374;
  243. static inline var MAX_UNIFORM_BUFFER_BINDINGS : Int = 35375;
  244. static inline var MAX_UNIFORM_BLOCK_SIZE : Int = 35376;
  245. static inline var MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS : Int = 35377;
  246. static inline var MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS : Int = 35379;
  247. static inline var UNIFORM_BUFFER_OFFSET_ALIGNMENT : Int = 35380;
  248. static inline var ACTIVE_UNIFORM_BLOCKS : Int = 35382;
  249. static inline var UNIFORM_TYPE : Int = 35383;
  250. static inline var UNIFORM_SIZE : Int = 35384;
  251. static inline var UNIFORM_BLOCK_INDEX : Int = 35386;
  252. static inline var UNIFORM_OFFSET : Int = 35387;
  253. static inline var UNIFORM_ARRAY_STRIDE : Int = 35388;
  254. static inline var UNIFORM_MATRIX_STRIDE : Int = 35389;
  255. static inline var UNIFORM_IS_ROW_MAJOR : Int = 35390;
  256. static inline var UNIFORM_BLOCK_BINDING : Int = 35391;
  257. static inline var UNIFORM_BLOCK_DATA_SIZE : Int = 35392;
  258. static inline var UNIFORM_BLOCK_ACTIVE_UNIFORMS : Int = 35394;
  259. static inline var UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES : Int = 35395;
  260. static inline var UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER : Int = 35396;
  261. static inline var UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER : Int = 35398;
  262. static inline var INVALID_INDEX : Int = cast 4294967295;
  263. static inline var MAX_VERTEX_OUTPUT_COMPONENTS : Int = 37154;
  264. static inline var MAX_FRAGMENT_INPUT_COMPONENTS : Int = 37157;
  265. static inline var MAX_SERVER_WAIT_TIMEOUT : Int = 37137;
  266. static inline var OBJECT_TYPE : Int = 37138;
  267. static inline var SYNC_CONDITION : Int = 37139;
  268. static inline var SYNC_STATUS : Int = 37140;
  269. static inline var SYNC_FLAGS : Int = 37141;
  270. static inline var SYNC_FENCE : Int = 37142;
  271. static inline var SYNC_GPU_COMMANDS_COMPLETE : Int = 37143;
  272. static inline var UNSIGNALED : Int = 37144;
  273. static inline var SIGNALED : Int = 37145;
  274. static inline var ALREADY_SIGNALED : Int = 37146;
  275. static inline var TIMEOUT_EXPIRED : Int = 37147;
  276. static inline var CONDITION_SATISFIED : Int = 37148;
  277. static inline var WAIT_FAILED : Int = 37149;
  278. static inline var SYNC_FLUSH_COMMANDS_BIT : Int = 1;
  279. static inline var VERTEX_ATTRIB_ARRAY_DIVISOR : Int = 35070;
  280. static inline var ANY_SAMPLES_PASSED : Int = 35887;
  281. static inline var ANY_SAMPLES_PASSED_CONSERVATIVE : Int = 36202;
  282. static inline var SAMPLER_BINDING : Int = 35097;
  283. static inline var RGB10_A2UI : Int = 36975;
  284. static inline var INT_2_10_10_10_REV : Int = 36255;
  285. static inline var TRANSFORM_FEEDBACK : Int = 36386;
  286. static inline var TRANSFORM_FEEDBACK_PAUSED : Int = 36387;
  287. static inline var TRANSFORM_FEEDBACK_ACTIVE : Int = 36388;
  288. static inline var TRANSFORM_FEEDBACK_BINDING : Int = 36389;
  289. static inline var TEXTURE_IMMUTABLE_FORMAT : Int = 37167;
  290. static inline var MAX_ELEMENT_INDEX : Int = 36203;
  291. static inline var TEXTURE_IMMUTABLE_LEVELS : Int = 33503;
  292. static inline var TIMEOUT_IGNORED : Int = -1;
  293. static inline var MAX_CLIENT_WAIT_TIMEOUT_WEBGL : Int = 37447;
  294. static inline var DEPTH_BUFFER_BIT : Int = 256;
  295. static inline var STENCIL_BUFFER_BIT : Int = 1024;
  296. static inline var COLOR_BUFFER_BIT : Int = 16384;
  297. static inline var POINTS : Int = 0;
  298. static inline var LINES : Int = 1;
  299. static inline var LINE_LOOP : Int = 2;
  300. static inline var LINE_STRIP : Int = 3;
  301. static inline var TRIANGLES : Int = 4;
  302. static inline var TRIANGLE_STRIP : Int = 5;
  303. static inline var TRIANGLE_FAN : Int = 6;
  304. static inline var ZERO : Int = 0;
  305. static inline var ONE : Int = 1;
  306. static inline var SRC_COLOR : Int = 768;
  307. static inline var ONE_MINUS_SRC_COLOR : Int = 769;
  308. static inline var SRC_ALPHA : Int = 770;
  309. static inline var ONE_MINUS_SRC_ALPHA : Int = 771;
  310. static inline var DST_ALPHA : Int = 772;
  311. static inline var ONE_MINUS_DST_ALPHA : Int = 773;
  312. static inline var DST_COLOR : Int = 774;
  313. static inline var ONE_MINUS_DST_COLOR : Int = 775;
  314. static inline var SRC_ALPHA_SATURATE : Int = 776;
  315. static inline var FUNC_ADD : Int = 32774;
  316. static inline var BLEND_EQUATION : Int = 32777;
  317. static inline var BLEND_EQUATION_RGB : Int = 32777;
  318. static inline var BLEND_EQUATION_ALPHA : Int = 34877;
  319. static inline var FUNC_SUBTRACT : Int = 32778;
  320. static inline var FUNC_REVERSE_SUBTRACT : Int = 32779;
  321. static inline var BLEND_DST_RGB : Int = 32968;
  322. static inline var BLEND_SRC_RGB : Int = 32969;
  323. static inline var BLEND_DST_ALPHA : Int = 32970;
  324. static inline var BLEND_SRC_ALPHA : Int = 32971;
  325. static inline var CONSTANT_COLOR : Int = 32769;
  326. static inline var ONE_MINUS_CONSTANT_COLOR : Int = 32770;
  327. static inline var CONSTANT_ALPHA : Int = 32771;
  328. static inline var ONE_MINUS_CONSTANT_ALPHA : Int = 32772;
  329. static inline var BLEND_COLOR : Int = 32773;
  330. static inline var ARRAY_BUFFER : Int = 34962;
  331. static inline var ELEMENT_ARRAY_BUFFER : Int = 34963;
  332. static inline var ARRAY_BUFFER_BINDING : Int = 34964;
  333. static inline var ELEMENT_ARRAY_BUFFER_BINDING : Int = 34965;
  334. static inline var STREAM_DRAW : Int = 35040;
  335. static inline var STATIC_DRAW : Int = 35044;
  336. static inline var DYNAMIC_DRAW : Int = 35048;
  337. static inline var BUFFER_SIZE : Int = 34660;
  338. static inline var BUFFER_USAGE : Int = 34661;
  339. static inline var CURRENT_VERTEX_ATTRIB : Int = 34342;
  340. static inline var FRONT : Int = 1028;
  341. static inline var BACK : Int = 1029;
  342. static inline var FRONT_AND_BACK : Int = 1032;
  343. static inline var CULL_FACE : Int = 2884;
  344. static inline var BLEND : Int = 3042;
  345. static inline var DITHER : Int = 3024;
  346. static inline var STENCIL_TEST : Int = 2960;
  347. static inline var DEPTH_TEST : Int = 2929;
  348. static inline var SCISSOR_TEST : Int = 3089;
  349. static inline var POLYGON_OFFSET_FILL : Int = 32823;
  350. static inline var SAMPLE_ALPHA_TO_COVERAGE : Int = 32926;
  351. static inline var SAMPLE_COVERAGE : Int = 32928;
  352. static inline var NO_ERROR : Int = 0;
  353. static inline var INVALID_ENUM : Int = 1280;
  354. static inline var INVALID_VALUE : Int = 1281;
  355. static inline var INVALID_OPERATION : Int = 1282;
  356. static inline var OUT_OF_MEMORY : Int = 1285;
  357. static inline var CW : Int = 2304;
  358. static inline var CCW : Int = 2305;
  359. static inline var LINE_WIDTH : Int = 2849;
  360. static inline var ALIASED_POINT_SIZE_RANGE : Int = 33901;
  361. static inline var ALIASED_LINE_WIDTH_RANGE : Int = 33902;
  362. static inline var CULL_FACE_MODE : Int = 2885;
  363. static inline var FRONT_FACE : Int = 2886;
  364. static inline var DEPTH_RANGE : Int = 2928;
  365. static inline var DEPTH_WRITEMASK : Int = 2930;
  366. static inline var DEPTH_CLEAR_VALUE : Int = 2931;
  367. static inline var DEPTH_FUNC : Int = 2932;
  368. static inline var STENCIL_CLEAR_VALUE : Int = 2961;
  369. static inline var STENCIL_FUNC : Int = 2962;
  370. static inline var STENCIL_FAIL : Int = 2964;
  371. static inline var STENCIL_PASS_DEPTH_FAIL : Int = 2965;
  372. static inline var STENCIL_PASS_DEPTH_PASS : Int = 2966;
  373. static inline var STENCIL_REF : Int = 2967;
  374. static inline var STENCIL_VALUE_MASK : Int = 2963;
  375. static inline var STENCIL_WRITEMASK : Int = 2968;
  376. static inline var STENCIL_BACK_FUNC : Int = 34816;
  377. static inline var STENCIL_BACK_FAIL : Int = 34817;
  378. static inline var STENCIL_BACK_PASS_DEPTH_FAIL : Int = 34818;
  379. static inline var STENCIL_BACK_PASS_DEPTH_PASS : Int = 34819;
  380. static inline var STENCIL_BACK_REF : Int = 36003;
  381. static inline var STENCIL_BACK_VALUE_MASK : Int = 36004;
  382. static inline var STENCIL_BACK_WRITEMASK : Int = 36005;
  383. static inline var VIEWPORT : Int = 2978;
  384. static inline var SCISSOR_BOX : Int = 3088;
  385. static inline var COLOR_CLEAR_VALUE : Int = 3106;
  386. static inline var COLOR_WRITEMASK : Int = 3107;
  387. static inline var UNPACK_ALIGNMENT : Int = 3317;
  388. static inline var PACK_ALIGNMENT : Int = 3333;
  389. static inline var MAX_TEXTURE_SIZE : Int = 3379;
  390. static inline var MAX_VIEWPORT_DIMS : Int = 3386;
  391. static inline var SUBPIXEL_BITS : Int = 3408;
  392. static inline var RED_BITS : Int = 3410;
  393. static inline var GREEN_BITS : Int = 3411;
  394. static inline var BLUE_BITS : Int = 3412;
  395. static inline var ALPHA_BITS : Int = 3413;
  396. static inline var DEPTH_BITS : Int = 3414;
  397. static inline var STENCIL_BITS : Int = 3415;
  398. static inline var POLYGON_OFFSET_UNITS : Int = 10752;
  399. static inline var POLYGON_OFFSET_FACTOR : Int = 32824;
  400. static inline var TEXTURE_BINDING_2D : Int = 32873;
  401. static inline var SAMPLE_BUFFERS : Int = 32936;
  402. static inline var SAMPLES : Int = 32937;
  403. static inline var SAMPLE_COVERAGE_VALUE : Int = 32938;
  404. static inline var SAMPLE_COVERAGE_INVERT : Int = 32939;
  405. static inline var COMPRESSED_TEXTURE_FORMATS : Int = 34467;
  406. static inline var DONT_CARE : Int = 4352;
  407. static inline var FASTEST : Int = 4353;
  408. static inline var NICEST : Int = 4354;
  409. static inline var GENERATE_MIPMAP_HINT : Int = 33170;
  410. static inline var BYTE : Int = 5120;
  411. static inline var UNSIGNED_BYTE : Int = 5121;
  412. static inline var SHORT : Int = 5122;
  413. static inline var UNSIGNED_SHORT : Int = 5123;
  414. static inline var INT : Int = 5124;
  415. static inline var UNSIGNED_INT : Int = 5125;
  416. static inline var FLOAT : Int = 5126;
  417. static inline var DEPTH_COMPONENT : Int = 6402;
  418. static inline var ALPHA : Int = 6406;
  419. static inline var RGB : Int = 6407;
  420. static inline var RGBA : Int = 6408;
  421. static inline var LUMINANCE : Int = 6409;
  422. static inline var LUMINANCE_ALPHA : Int = 6410;
  423. static inline var UNSIGNED_SHORT_4_4_4_4 : Int = 32819;
  424. static inline var UNSIGNED_SHORT_5_5_5_1 : Int = 32820;
  425. static inline var UNSIGNED_SHORT_5_6_5 : Int = 33635;
  426. static inline var FRAGMENT_SHADER : Int = 35632;
  427. static inline var VERTEX_SHADER : Int = 35633;
  428. static inline var MAX_VERTEX_ATTRIBS : Int = 34921;
  429. static inline var MAX_VERTEX_UNIFORM_VECTORS : Int = 36347;
  430. static inline var MAX_VARYING_VECTORS : Int = 36348;
  431. static inline var MAX_COMBINED_TEXTURE_IMAGE_UNITS : Int = 35661;
  432. static inline var MAX_VERTEX_TEXTURE_IMAGE_UNITS : Int = 35660;
  433. static inline var MAX_TEXTURE_IMAGE_UNITS : Int = 34930;
  434. static inline var MAX_FRAGMENT_UNIFORM_VECTORS : Int = 36349;
  435. static inline var SHADER_TYPE : Int = 35663;
  436. static inline var DELETE_STATUS : Int = 35712;
  437. static inline var LINK_STATUS : Int = 35714;
  438. static inline var VALIDATE_STATUS : Int = 35715;
  439. static inline var ATTACHED_SHADERS : Int = 35717;
  440. static inline var ACTIVE_UNIFORMS : Int = 35718;
  441. static inline var ACTIVE_ATTRIBUTES : Int = 35721;
  442. static inline var SHADING_LANGUAGE_VERSION : Int = 35724;
  443. static inline var CURRENT_PROGRAM : Int = 35725;
  444. static inline var NEVER : Int = 512;
  445. static inline var LESS : Int = 513;
  446. static inline var EQUAL : Int = 514;
  447. static inline var LEQUAL : Int = 515;
  448. static inline var GREATER : Int = 516;
  449. static inline var NOTEQUAL : Int = 517;
  450. static inline var GEQUAL : Int = 518;
  451. static inline var ALWAYS : Int = 519;
  452. static inline var KEEP : Int = 7680;
  453. static inline var REPLACE : Int = 7681;
  454. static inline var INCR : Int = 7682;
  455. static inline var DECR : Int = 7683;
  456. static inline var INVERT : Int = 5386;
  457. static inline var INCR_WRAP : Int = 34055;
  458. static inline var DECR_WRAP : Int = 34056;
  459. static inline var VENDOR : Int = 7936;
  460. static inline var RENDERER : Int = 7937;
  461. static inline var VERSION : Int = 7938;
  462. static inline var NEAREST : Int = 9728;
  463. static inline var LINEAR : Int = 9729;
  464. static inline var NEAREST_MIPMAP_NEAREST : Int = 9984;
  465. static inline var LINEAR_MIPMAP_NEAREST : Int = 9985;
  466. static inline var NEAREST_MIPMAP_LINEAR : Int = 9986;
  467. static inline var LINEAR_MIPMAP_LINEAR : Int = 9987;
  468. static inline var TEXTURE_MAG_FILTER : Int = 10240;
  469. static inline var TEXTURE_MIN_FILTER : Int = 10241;
  470. static inline var TEXTURE_WRAP_S : Int = 10242;
  471. static inline var TEXTURE_WRAP_T : Int = 10243;
  472. static inline var TEXTURE_2D : Int = 3553;
  473. static inline var TEXTURE : Int = 5890;
  474. static inline var TEXTURE_CUBE_MAP : Int = 34067;
  475. static inline var TEXTURE_BINDING_CUBE_MAP : Int = 34068;
  476. static inline var TEXTURE_CUBE_MAP_POSITIVE_X : Int = 34069;
  477. static inline var TEXTURE_CUBE_MAP_NEGATIVE_X : Int = 34070;
  478. static inline var TEXTURE_CUBE_MAP_POSITIVE_Y : Int = 34071;
  479. static inline var TEXTURE_CUBE_MAP_NEGATIVE_Y : Int = 34072;
  480. static inline var TEXTURE_CUBE_MAP_POSITIVE_Z : Int = 34073;
  481. static inline var TEXTURE_CUBE_MAP_NEGATIVE_Z : Int = 34074;
  482. static inline var MAX_CUBE_MAP_TEXTURE_SIZE : Int = 34076;
  483. static inline var TEXTURE0 : Int = 33984;
  484. static inline var TEXTURE1 : Int = 33985;
  485. static inline var TEXTURE2 : Int = 33986;
  486. static inline var TEXTURE3 : Int = 33987;
  487. static inline var TEXTURE4 : Int = 33988;
  488. static inline var TEXTURE5 : Int = 33989;
  489. static inline var TEXTURE6 : Int = 33990;
  490. static inline var TEXTURE7 : Int = 33991;
  491. static inline var TEXTURE8 : Int = 33992;
  492. static inline var TEXTURE9 : Int = 33993;
  493. static inline var TEXTURE10 : Int = 33994;
  494. static inline var TEXTURE11 : Int = 33995;
  495. static inline var TEXTURE12 : Int = 33996;
  496. static inline var TEXTURE13 : Int = 33997;
  497. static inline var TEXTURE14 : Int = 33998;
  498. static inline var TEXTURE15 : Int = 33999;
  499. static inline var TEXTURE16 : Int = 34000;
  500. static inline var TEXTURE17 : Int = 34001;
  501. static inline var TEXTURE18 : Int = 34002;
  502. static inline var TEXTURE19 : Int = 34003;
  503. static inline var TEXTURE20 : Int = 34004;
  504. static inline var TEXTURE21 : Int = 34005;
  505. static inline var TEXTURE22 : Int = 34006;
  506. static inline var TEXTURE23 : Int = 34007;
  507. static inline var TEXTURE24 : Int = 34008;
  508. static inline var TEXTURE25 : Int = 34009;
  509. static inline var TEXTURE26 : Int = 34010;
  510. static inline var TEXTURE27 : Int = 34011;
  511. static inline var TEXTURE28 : Int = 34012;
  512. static inline var TEXTURE29 : Int = 34013;
  513. static inline var TEXTURE30 : Int = 34014;
  514. static inline var TEXTURE31 : Int = 34015;
  515. static inline var ACTIVE_TEXTURE : Int = 34016;
  516. static inline var REPEAT : Int = 10497;
  517. static inline var CLAMP_TO_EDGE : Int = 33071;
  518. static inline var MIRRORED_REPEAT : Int = 33648;
  519. static inline var FLOAT_VEC2 : Int = 35664;
  520. static inline var FLOAT_VEC3 : Int = 35665;
  521. static inline var FLOAT_VEC4 : Int = 35666;
  522. static inline var INT_VEC2 : Int = 35667;
  523. static inline var INT_VEC3 : Int = 35668;
  524. static inline var INT_VEC4 : Int = 35669;
  525. static inline var BOOL : Int = 35670;
  526. static inline var BOOL_VEC2 : Int = 35671;
  527. static inline var BOOL_VEC3 : Int = 35672;
  528. static inline var BOOL_VEC4 : Int = 35673;
  529. static inline var FLOAT_MAT2 : Int = 35674;
  530. static inline var FLOAT_MAT3 : Int = 35675;
  531. static inline var FLOAT_MAT4 : Int = 35676;
  532. static inline var SAMPLER_2D : Int = 35678;
  533. static inline var SAMPLER_CUBE : Int = 35680;
  534. static inline var VERTEX_ATTRIB_ARRAY_ENABLED : Int = 34338;
  535. static inline var VERTEX_ATTRIB_ARRAY_SIZE : Int = 34339;
  536. static inline var VERTEX_ATTRIB_ARRAY_STRIDE : Int = 34340;
  537. static inline var VERTEX_ATTRIB_ARRAY_TYPE : Int = 34341;
  538. static inline var VERTEX_ATTRIB_ARRAY_NORMALIZED : Int = 34922;
  539. static inline var VERTEX_ATTRIB_ARRAY_POINTER : Int = 34373;
  540. static inline var VERTEX_ATTRIB_ARRAY_BUFFER_BINDING : Int = 34975;
  541. static inline var IMPLEMENTATION_COLOR_READ_TYPE : Int = 35738;
  542. static inline var IMPLEMENTATION_COLOR_READ_FORMAT : Int = 35739;
  543. static inline var COMPILE_STATUS : Int = 35713;
  544. static inline var LOW_FLOAT : Int = 36336;
  545. static inline var MEDIUM_FLOAT : Int = 36337;
  546. static inline var HIGH_FLOAT : Int = 36338;
  547. static inline var LOW_INT : Int = 36339;
  548. static inline var MEDIUM_INT : Int = 36340;
  549. static inline var HIGH_INT : Int = 36341;
  550. static inline var FRAMEBUFFER : Int = 36160;
  551. static inline var RENDERBUFFER : Int = 36161;
  552. static inline var RGBA4 : Int = 32854;
  553. static inline var RGB5_A1 : Int = 32855;
  554. static inline var RGB565 : Int = 36194;
  555. static inline var DEPTH_COMPONENT16 : Int = 33189;
  556. static inline var STENCIL_INDEX8 : Int = 36168;
  557. static inline var DEPTH_STENCIL : Int = 34041;
  558. static inline var RENDERBUFFER_WIDTH : Int = 36162;
  559. static inline var RENDERBUFFER_HEIGHT : Int = 36163;
  560. static inline var RENDERBUFFER_INTERNAL_FORMAT : Int = 36164;
  561. static inline var RENDERBUFFER_RED_SIZE : Int = 36176;
  562. static inline var RENDERBUFFER_GREEN_SIZE : Int = 36177;
  563. static inline var RENDERBUFFER_BLUE_SIZE : Int = 36178;
  564. static inline var RENDERBUFFER_ALPHA_SIZE : Int = 36179;
  565. static inline var RENDERBUFFER_DEPTH_SIZE : Int = 36180;
  566. static inline var RENDERBUFFER_STENCIL_SIZE : Int = 36181;
  567. static inline var FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE : Int = 36048;
  568. static inline var FRAMEBUFFER_ATTACHMENT_OBJECT_NAME : Int = 36049;
  569. static inline var FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL : Int = 36050;
  570. static inline var FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE : Int = 36051;
  571. static inline var COLOR_ATTACHMENT0 : Int = 36064;
  572. static inline var DEPTH_ATTACHMENT : Int = 36096;
  573. static inline var STENCIL_ATTACHMENT : Int = 36128;
  574. static inline var DEPTH_STENCIL_ATTACHMENT : Int = 33306;
  575. static inline var NONE : Int = 0;
  576. static inline var FRAMEBUFFER_COMPLETE : Int = 36053;
  577. static inline var FRAMEBUFFER_INCOMPLETE_ATTACHMENT : Int = 36054;
  578. static inline var FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT : Int = 36055;
  579. static inline var FRAMEBUFFER_INCOMPLETE_DIMENSIONS : Int = 36057;
  580. static inline var FRAMEBUFFER_UNSUPPORTED : Int = 36061;
  581. static inline var FRAMEBUFFER_BINDING : Int = 36006;
  582. static inline var RENDERBUFFER_BINDING : Int = 36007;
  583. static inline var MAX_RENDERBUFFER_SIZE : Int = 34024;
  584. static inline var INVALID_FRAMEBUFFER_OPERATION : Int = 1286;
  585. static inline var UNPACK_FLIP_Y_WEBGL : Int = 37440;
  586. static inline var UNPACK_PREMULTIPLY_ALPHA_WEBGL : Int = 37441;
  587. static inline var CONTEXT_LOST_WEBGL : Int = 37442;
  588. static inline var UNPACK_COLORSPACE_CONVERSION_WEBGL : Int = 37443;
  589. static inline var BROWSER_DEFAULT_WEBGL : Int = 37444;
  590. /**
  591. Initializes and creates the buffer object's data store.
  592. **/
  593. @:overload( function( target : Int, size : Int, usage : Int ) : Void {} )
  594. @:overload( function( target : Int, srcData : js.lib.ArrayBuffer, usage : Int ) : Void {} )
  595. @:overload( function( target : Int, srcData : js.lib.ArrayBufferView, usage : Int ) : Void {} )
  596. function bufferData( target : Int, srcData : js.lib.ArrayBufferView, usage : Int, srcOffset : Int, length : Int = 0 ) : Void;
  597. /**
  598. Updates a subset of a buffer object's data store.
  599. **/
  600. @:overload( function( target : Int, offset : Int, srcData : js.lib.ArrayBuffer ) : Void {} )
  601. @:overload( function( target : Int, offset : Int, srcData : js.lib.ArrayBufferView ) : Void {} )
  602. function bufferSubData( target : Int, dstByteOffset : Int, srcData : js.lib.ArrayBufferView, srcOffset : Int, length : Int = 0 ) : Void;
  603. /**
  604. Copies part of the data of a buffer to another buffer.
  605. **/
  606. function copyBufferSubData( readTarget : Int, writeTarget : Int, readOffset : Int, writeOffset : Int, size : Int ) : Void;
  607. /**
  608. Reads data from a buffer and writes them to an `ArrayBuffer` or `SharedArrayBuffer`.
  609. **/
  610. function getBufferSubData( target : Int, srcByteOffset : Int, dstData : js.lib.ArrayBufferView, dstOffset : Int = 0, length : Int = 0 ) : Void;
  611. /**
  612. Transfers a block of pixels from the read framebuffer to the draw framebuffer.
  613. **/
  614. function blitFramebuffer( srcX0 : Int, srcY0 : Int, srcX1 : Int, srcY1 : Int, dstX0 : Int, dstY0 : Int, dstX1 : Int, dstY1 : Int, mask : Int, filter : Int ) : Void;
  615. /**
  616. Attaches a single layer of a texture to a framebuffer.
  617. **/
  618. function framebufferTextureLayer( target : Int, attachment : Int, texture : Texture, level : Int, layer : Int ) : Void;
  619. /**
  620. Invalidates the contents of attachments in a framebuffer.
  621. @throws DOMError
  622. **/
  623. function invalidateFramebuffer( target : Int, attachments : Array<Int> ) : Void;
  624. /**
  625. Invalidates portions of the contents of attachments in a framebuffer
  626. @throws DOMError
  627. **/
  628. function invalidateSubFramebuffer( target : Int, attachments : Array<Int>, x : Int, y : Int, width : Int, height : Int ) : Void;
  629. /**
  630. Selects a color buffer as the source for pixels.
  631. **/
  632. function readBuffer( src : Int ) : Void;
  633. /**
  634. Returns information about implementation-dependent support for internal formats.
  635. @throws DOMError
  636. **/
  637. function getInternalformatParameter( target : Int, internalformat : Int, pname : Int ) : Dynamic;
  638. /**
  639. Creates and initializes a renderbuffer object's data store and allows specifying the number of samples to be used.
  640. **/
  641. function renderbufferStorageMultisample( target : Int, samples : Int, internalformat : Int, width : Int, height : Int ) : Void;
  642. /**
  643. Specifies all levels of two-dimensional texture storage.
  644. **/
  645. function texStorage2D( target : Int, levels : Int, internalformat : Int, width : Int, height : Int ) : Void;
  646. /**
  647. Specifies all levels of a three-dimensional texture or two-dimensional array texture.
  648. **/
  649. function texStorage3D( target : Int, levels : Int, internalformat : Int, width : Int, height : Int, depth : Int ) : Void;
  650. /** @throws DOMError */
  651. @:overload( function( target : Int, level : Int, internalformat : Int, width : Int, height : Int, border : Int, format : Int, type : Int, pixels : js.lib.ArrayBufferView ) : Void {} )
  652. @:overload( function( target : Int, level : Int, internalformat : Int, format : Int, type : Int, source : js.html.CanvasElement ) : Void {} )
  653. @:overload( function( target : Int, level : Int, internalformat : Int, format : Int, type : Int, source : js.html.ImageElement ) : Void {} )
  654. @:overload( function( target : Int, level : Int, internalformat : Int, format : Int, type : Int, source : js.html.VideoElement ) : Void {} )
  655. @:overload( function( target : Int, level : Int, internalformat : Int, format : Int, type : Int, source : js.html.ImageBitmap ) : Void {} )
  656. @:overload( function( target : Int, level : Int, internalformat : Int, format : Int, type : Int, source : js.html.ImageData ) : Void {} )
  657. @:overload( function( target : Int, level : Int, internalformat : Int, width : Int, height : Int, border : Int, format : Int, type : Int, pboOffset : Int ) : Void {} )
  658. @:overload( function( target : Int, level : Int, internalformat : Int, width : Int, height : Int, border : Int, format : Int, type : Int, source : js.html.CanvasElement ) : Void {} )
  659. @:overload( function( target : Int, level : Int, internalformat : Int, width : Int, height : Int, border : Int, format : Int, type : Int, source : js.html.ImageElement ) : Void {} )
  660. @:overload( function( target : Int, level : Int, internalformat : Int, width : Int, height : Int, border : Int, format : Int, type : Int, source : js.html.VideoElement ) : Void {} )
  661. @:overload( function( target : Int, level : Int, internalformat : Int, width : Int, height : Int, border : Int, format : Int, type : Int, source : js.html.ImageBitmap ) : Void {} )
  662. @:overload( function( target : Int, level : Int, internalformat : Int, width : Int, height : Int, border : Int, format : Int, type : Int, source : js.html.ImageData ) : Void {} )
  663. function texImage2D( target : Int, level : Int, internalformat : Int, width : Int, height : Int, border : Int, format : Int, type : Int, srcData : js.lib.ArrayBufferView, srcOffset : Int ) : Void;
  664. /** @throws DOMError */
  665. @:overload( function( target : Int, level : Int, xoffset : Int, yoffset : Int, width : Int, height : Int, format : Int, type : Int, pixels : js.lib.ArrayBufferView ) : Void {} )
  666. @:overload( function( target : Int, level : Int, xoffset : Int, yoffset : Int, format : Int, type : Int, source : js.html.CanvasElement ) : Void {} )
  667. @:overload( function( target : Int, level : Int, xoffset : Int, yoffset : Int, format : Int, type : Int, source : js.html.ImageElement ) : Void {} )
  668. @:overload( function( target : Int, level : Int, xoffset : Int, yoffset : Int, format : Int, type : Int, source : js.html.VideoElement ) : Void {} )
  669. @:overload( function( target : Int, level : Int, xoffset : Int, yoffset : Int, format : Int, type : Int, source : js.html.ImageBitmap ) : Void {} )
  670. @:overload( function( target : Int, level : Int, xoffset : Int, yoffset : Int, format : Int, type : Int, source : js.html.ImageData ) : Void {} )
  671. @:overload( function( target : Int, level : Int, xoffset : Int, yoffset : Int, width : Int, height : Int, format : Int, type : Int, pboOffset : Int ) : Void {} )
  672. @:overload( function( target : Int, level : Int, xoffset : Int, yoffset : Int, width : Int, height : Int, format : Int, type : Int, source : js.html.CanvasElement ) : Void {} )
  673. @:overload( function( target : Int, level : Int, xoffset : Int, yoffset : Int, width : Int, height : Int, format : Int, type : Int, source : js.html.ImageElement ) : Void {} )
  674. @:overload( function( target : Int, level : Int, xoffset : Int, yoffset : Int, width : Int, height : Int, format : Int, type : Int, source : js.html.VideoElement ) : Void {} )
  675. @:overload( function( target : Int, level : Int, xoffset : Int, yoffset : Int, width : Int, height : Int, format : Int, type : Int, source : js.html.ImageBitmap ) : Void {} )
  676. @:overload( function( target : Int, level : Int, xoffset : Int, yoffset : Int, width : Int, height : Int, format : Int, type : Int, source : js.html.ImageData ) : Void {} )
  677. function texSubImage2D( target : Int, level : Int, xoffset : Int, yoffset : Int, width : Int, height : Int, format : Int, type : Int, srcData : js.lib.ArrayBufferView, srcOffset : Int ) : Void;
  678. /**
  679. Specifies a three-dimensional texture image.
  680. @throws DOMError
  681. **/
  682. @:overload( function( target : Int, level : Int, internalformat : Int, width : Int, height : Int, depth : Int, border : Int, format : Int, type : Int, pboOffset : Int ) : Void {} )
  683. @:overload( function( target : Int, level : Int, internalformat : Int, width : Int, height : Int, depth : Int, border : Int, format : Int, type : Int, source : js.html.CanvasElement ) : Void {} )
  684. @:overload( function( target : Int, level : Int, internalformat : Int, width : Int, height : Int, depth : Int, border : Int, format : Int, type : Int, source : js.html.ImageElement ) : Void {} )
  685. @:overload( function( target : Int, level : Int, internalformat : Int, width : Int, height : Int, depth : Int, border : Int, format : Int, type : Int, source : js.html.VideoElement ) : Void {} )
  686. @:overload( function( target : Int, level : Int, internalformat : Int, width : Int, height : Int, depth : Int, border : Int, format : Int, type : Int, source : js.html.ImageBitmap ) : Void {} )
  687. @:overload( function( target : Int, level : Int, internalformat : Int, width : Int, height : Int, depth : Int, border : Int, format : Int, type : Int, source : js.html.ImageData ) : Void {} )
  688. @:overload( function( target : Int, level : Int, internalformat : Int, width : Int, height : Int, depth : Int, border : Int, format : Int, type : Int, srcData : js.lib.ArrayBufferView ) : Void {} )
  689. function texImage3D( target : Int, level : Int, internalformat : Int, width : Int, height : Int, depth : Int, border : Int, format : Int, type : Int, srcData : js.lib.ArrayBufferView, srcOffset : Int ) : Void;
  690. /**
  691. Specifies a sub-rectangle of the current 3D texture.
  692. @throws DOMError
  693. **/
  694. @:overload( function( target : Int, level : Int, xoffset : Int, yoffset : Int, zoffset : Int, width : Int, height : Int, depth : Int, format : Int, type : Int, pboOffset : Int ) : Void {} )
  695. @:overload( function( target : Int, level : Int, xoffset : Int, yoffset : Int, zoffset : Int, width : Int, height : Int, depth : Int, format : Int, type : Int, source : js.html.CanvasElement ) : Void {} )
  696. @:overload( function( target : Int, level : Int, xoffset : Int, yoffset : Int, zoffset : Int, width : Int, height : Int, depth : Int, format : Int, type : Int, source : js.html.ImageElement ) : Void {} )
  697. @:overload( function( target : Int, level : Int, xoffset : Int, yoffset : Int, zoffset : Int, width : Int, height : Int, depth : Int, format : Int, type : Int, source : js.html.VideoElement ) : Void {} )
  698. @:overload( function( target : Int, level : Int, xoffset : Int, yoffset : Int, zoffset : Int, width : Int, height : Int, depth : Int, format : Int, type : Int, source : js.html.ImageBitmap ) : Void {} )
  699. @:overload( function( target : Int, level : Int, xoffset : Int, yoffset : Int, zoffset : Int, width : Int, height : Int, depth : Int, format : Int, type : Int, source : js.html.ImageData ) : Void {} )
  700. function texSubImage3D( target : Int, level : Int, xoffset : Int, yoffset : Int, zoffset : Int, width : Int, height : Int, depth : Int, format : Int, type : Int, srcData : js.lib.ArrayBufferView, srcOffset : Int = 0 ) : Void;
  701. /**
  702. Copies pixels from the current `WebGLFramebuffer` into an existing 3D texture sub-image.
  703. **/
  704. function copyTexSubImage3D( target : Int, level : Int, xoffset : Int, yoffset : Int, zoffset : Int, x : Int, y : Int, width : Int, height : Int ) : Void;
  705. @:overload( function( target : Int, level : Int, internalformat : Int, width : Int, height : Int, border : Int, imageSize : Int, offset : Int ) : Void {} )
  706. function compressedTexImage2D( target : Int, level : Int, internalformat : Int, width : Int, height : Int, border : Int, srcData : js.lib.ArrayBufferView, srcOffset : Int = 0, srcLengthOverride : Int = 0 ) : Void;
  707. /**
  708. Specifies a three-dimensional texture image in a compressed format.
  709. **/
  710. @:overload( function( target : Int, level : Int, internalformat : Int, width : Int, height : Int, depth : Int, border : Int, imageSize : Int, offset : Int ) : Void {} )
  711. function compressedTexImage3D( target : Int, level : Int, internalformat : Int, width : Int, height : Int, depth : Int, border : Int, srcData : js.lib.ArrayBufferView, srcOffset : Int = 0, srcLengthOverride : Int = 0 ) : Void;
  712. @:overload( function( target : Int, level : Int, xoffset : Int, yoffset : Int, width : Int, height : Int, format : Int, imageSize : Int, offset : Int ) : Void {} )
  713. function compressedTexSubImage2D( target : Int, level : Int, xoffset : Int, yoffset : Int, width : Int, height : Int, format : Int, srcData : js.lib.ArrayBufferView, srcOffset : Int = 0, srcLengthOverride : Int = 0 ) : Void;
  714. /**
  715. Specifies a three-dimensional sub-rectangle for a texture image in a compressed format.
  716. **/
  717. @:overload( function( target : Int, level : Int, xoffset : Int, yoffset : Int, zoffset : Int, width : Int, height : Int, depth : Int, format : Int, imageSize : Int, offset : Int ) : Void {} )
  718. function compressedTexSubImage3D( target : Int, level : Int, xoffset : Int, yoffset : Int, zoffset : Int, width : Int, height : Int, depth : Int, format : Int, srcData : js.lib.ArrayBufferView, srcOffset : Int = 0, srcLengthOverride : Int = 0 ) : Void;
  719. /**
  720. Returns the binding of color numbers to user-defined varying out variables.
  721. **/
  722. function getFragDataLocation( program : Program, name : String ) : Int;
  723. function uniform1ui( location : UniformLocation, v0 : Int ) : Void;
  724. function uniform2ui( location : UniformLocation, v0 : Int, v1 : Int ) : Void;
  725. function uniform3ui( location : UniformLocation, v0 : Int, v1 : Int, v2 : Int ) : Void;
  726. function uniform4ui( location : UniformLocation, v0 : Int, v1 : Int, v2 : Int, v3 : Int ) : Void;
  727. @:overload( function( location : UniformLocation, data : Array<Float>, srcOffset : Int = 0, srcLength : Int = 0) : Void {} )
  728. function uniform1fv( location : UniformLocation, data : js.lib.Float32Array, srcOffset : Int = 0, srcLength : Int = 0 ) : Void;
  729. @:overload( function( location : UniformLocation, data : Array<Float>, srcOffset : Int = 0, srcLength : Int = 0) : Void {} )
  730. function uniform2fv( location : UniformLocation, data : js.lib.Float32Array, srcOffset : Int = 0, srcLength : Int = 0 ) : Void;
  731. @:overload( function( location : UniformLocation, data : Array<Float>, srcOffset : Int = 0, srcLength : Int = 0) : Void {} )
  732. function uniform3fv( location : UniformLocation, data : js.lib.Float32Array, srcOffset : Int = 0, srcLength : Int = 0 ) : Void;
  733. @:overload( function( location : UniformLocation, data : Array<Float>, srcOffset : Int = 0, srcLength : Int = 0) : Void {} )
  734. function uniform4fv( location : UniformLocation, data : js.lib.Float32Array, srcOffset : Int = 0, srcLength : Int = 0 ) : Void;
  735. @:overload( function( location : UniformLocation, data : Array<Int>, srcOffset : Int = 0, srcLength : Int = 0) : Void {} )
  736. function uniform1iv( location : UniformLocation, data : js.lib.Int32Array, srcOffset : Int = 0, srcLength : Int = 0 ) : Void;
  737. @:overload( function( location : UniformLocation, data : Array<Int>, srcOffset : Int = 0, srcLength : Int = 0) : Void {} )
  738. function uniform2iv( location : UniformLocation, data : js.lib.Int32Array, srcOffset : Int = 0, srcLength : Int = 0 ) : Void;
  739. @:overload( function( location : UniformLocation, data : Array<Int>, srcOffset : Int = 0, srcLength : Int = 0) : Void {} )
  740. function uniform3iv( location : UniformLocation, data : js.lib.Int32Array, srcOffset : Int = 0, srcLength : Int = 0 ) : Void;
  741. @:overload( function( location : UniformLocation, data : Array<Int>, srcOffset : Int = 0, srcLength : Int = 0) : Void {} )
  742. function uniform4iv( location : UniformLocation, data : js.lib.Int32Array, srcOffset : Int = 0, srcLength : Int = 0 ) : Void;
  743. @:overload( function( location : UniformLocation, data : Array<Int>, srcOffset : Int = 0, srcLength : Int = 0) : Void {} )
  744. function uniform1uiv( location : UniformLocation, data : js.lib.Uint32Array, srcOffset : Int = 0, srcLength : Int = 0 ) : Void;
  745. @:overload( function( location : UniformLocation, data : Array<Int>, srcOffset : Int = 0, srcLength : Int = 0) : Void {} )
  746. function uniform2uiv( location : UniformLocation, data : js.lib.Uint32Array, srcOffset : Int = 0, srcLength : Int = 0 ) : Void;
  747. @:overload( function( location : UniformLocation, data : Array<Int>, srcOffset : Int = 0, srcLength : Int = 0) : Void {} )
  748. function uniform3uiv( location : UniformLocation, data : js.lib.Uint32Array, srcOffset : Int = 0, srcLength : Int = 0 ) : Void;
  749. @:overload( function( location : UniformLocation, data : Array<Int>, srcOffset : Int = 0, srcLength : Int = 0) : Void {} )
  750. function uniform4uiv( location : UniformLocation, data : js.lib.Uint32Array, srcOffset : Int = 0, srcLength : Int = 0 ) : Void;
  751. @:overload( function( location : UniformLocation, transpose : Bool, data : Array<Float>, srcOffset : Int = 0, srcLength : Int = 0) : Void {} )
  752. function uniformMatrix2fv( location : UniformLocation, transpose : Bool, data : js.lib.Float32Array, srcOffset : Int = 0, srcLength : Int = 0 ) : Void;
  753. @:overload( function( location : UniformLocation, transpose : Bool, data : Array<Float>, srcOffset : Int = 0, srcLength : Int = 0) : Void {} )
  754. function uniformMatrix3x2fv( location : UniformLocation, transpose : Bool, data : js.lib.Float32Array, srcOffset : Int = 0, srcLength : Int = 0 ) : Void;
  755. @:overload( function( location : UniformLocation, transpose : Bool, data : Array<Float>, srcOffset : Int = 0, srcLength : Int = 0) : Void {} )
  756. function uniformMatrix4x2fv( location : UniformLocation, transpose : Bool, data : js.lib.Float32Array, srcOffset : Int = 0, srcLength : Int = 0 ) : Void;
  757. @:overload( function( location : UniformLocation, transpose : Bool, data : Array<Float>, srcOffset : Int = 0, srcLength : Int = 0) : Void {} )
  758. function uniformMatrix2x3fv( location : UniformLocation, transpose : Bool, data : js.lib.Float32Array, srcOffset : Int = 0, srcLength : Int = 0 ) : Void;
  759. @:overload( function( location : UniformLocation, transpose : Bool, data : Array<Float>, srcOffset : Int = 0, srcLength : Int = 0) : Void {} )
  760. function uniformMatrix3fv( location : UniformLocation, transpose : Bool, data : js.lib.Float32Array, srcOffset : Int = 0, srcLength : Int = 0 ) : Void;
  761. @:overload( function( location : UniformLocation, transpose : Bool, data : Array<Float>, srcOffset : Int = 0, srcLength : Int = 0) : Void {} )
  762. function uniformMatrix4x3fv( location : UniformLocation, transpose : Bool, data : js.lib.Float32Array, srcOffset : Int = 0, srcLength : Int = 0 ) : Void;
  763. @:overload( function( location : UniformLocation, transpose : Bool, data : Array<Float>, srcOffset : Int = 0, srcLength : Int = 0) : Void {} )
  764. function uniformMatrix2x4fv( location : UniformLocation, transpose : Bool, data : js.lib.Float32Array, srcOffset : Int = 0, srcLength : Int = 0 ) : Void;
  765. @:overload( function( location : UniformLocation, transpose : Bool, data : Array<Float>, srcOffset : Int = 0, srcLength : Int = 0) : Void {} )
  766. function uniformMatrix3x4fv( location : UniformLocation, transpose : Bool, data : js.lib.Float32Array, srcOffset : Int = 0, srcLength : Int = 0 ) : Void;
  767. @:overload( function( location : UniformLocation, transpose : Bool, data : Array<Float>, srcOffset : Int = 0, srcLength : Int = 0) : Void {} )
  768. function uniformMatrix4fv( location : UniformLocation, transpose : Bool, data : js.lib.Float32Array, srcOffset : Int = 0, srcLength : Int = 0 ) : Void;
  769. function vertexAttribI4i( index : Int, x : Int, y : Int, z : Int, w : Int ) : Void;
  770. @:overload( function( index : Int, values : Array<Int>) : Void {} )
  771. function vertexAttribI4iv( index : Int, values : js.lib.Int32Array ) : Void;
  772. function vertexAttribI4ui( index : Int, x : Int, y : Int, z : Int, w : Int ) : Void;
  773. @:overload( function( index : Int, values : Array<Int>) : Void {} )
  774. function vertexAttribI4uiv( index : Int, values : js.lib.Uint32Array ) : Void;
  775. /**
  776. Specifies integer data formats and locations of vertex attributes in a vertex attributes array.
  777. **/
  778. function vertexAttribIPointer( index : Int, size : Int, type : Int, stride : Int, offset : Int ) : Void;
  779. /**
  780. Modifies the rate at which generic vertex attributes advance when rendering multiple instances of primitives with `WebGL2RenderingContext.drawArraysInstanced()` and `WebGL2RenderingContext.drawElementsInstanced()`.
  781. **/
  782. function vertexAttribDivisor( index : Int, divisor : Int ) : Void;
  783. /**
  784. Renders primitives from array data. In addition, it can execute multiple instances of the range of elements.
  785. **/
  786. function drawArraysInstanced( mode : Int, first : Int, count : Int, instanceCount : Int ) : Void;
  787. /**
  788. Renders primitives from array data. In addition, it can execute multiple instances of a set of elements.
  789. **/
  790. function drawElementsInstanced( mode : Int, count : Int, type : Int, offset : Int, instanceCount : Int ) : Void;
  791. /**
  792. Renders primitives from array data in a given range.
  793. **/
  794. function drawRangeElements( mode : Int, start : Int, end : Int, count : Int, type : Int, offset : Int ) : Void;
  795. /** @throws DOMError */
  796. @:overload( function( x : Int, y : Int, width : Int, height : Int, format : Int, type : Int, dstData : js.lib.ArrayBufferView ) : Void {} )
  797. @:overload( function( x : Int, y : Int, width : Int, height : Int, format : Int, type : Int, offset : Int ) : Void {} )
  798. function readPixels( x : Int, y : Int, width : Int, height : Int, format : Int, type : Int, dstData : js.lib.ArrayBufferView, dstOffset : Int ) : Void;
  799. /**
  800. Specifies a list of color buffers to be drawn into.
  801. **/
  802. function drawBuffers( buffers : Array<Int> ) : Void;
  803. @:overload( function( buffer : Int, drawbuffer : Int, values : Array<Float>, srcOffset : Int = 0) : Void {} )
  804. function clearBufferfv( buffer : Int, drawbuffer : Int, values : js.lib.Float32Array, srcOffset : Int = 0 ) : Void;
  805. @:overload( function( buffer : Int, drawbuffer : Int, values : Array<Int>, srcOffset : Int = 0) : Void {} )
  806. function clearBufferiv( buffer : Int, drawbuffer : Int, values : js.lib.Int32Array, srcOffset : Int = 0 ) : Void;
  807. @:overload( function( buffer : Int, drawbuffer : Int, values : Array<Int>, srcOffset : Int = 0) : Void {} )
  808. function clearBufferuiv( buffer : Int, drawbuffer : Int, values : js.lib.Uint32Array, srcOffset : Int = 0 ) : Void;
  809. function clearBufferfi( buffer : Int, drawbuffer : Int, depth : Float, stencil : Int ) : Void;
  810. /**
  811. Creates a new `WebGLQuery` object.
  812. **/
  813. function createQuery() : Query;
  814. /**
  815. Deletes a given `WebGLQuery` object.
  816. **/
  817. function deleteQuery( query : Query ) : Void;
  818. /**
  819. Returns `true` if a given object is a valid `WebGLQuery` object.
  820. **/
  821. function isQuery( query : Query ) : Bool;
  822. /**
  823. Begins an asynchronous query.
  824. **/
  825. function beginQuery( target : Int, query : Query ) : Void;
  826. /**
  827. Marks the end of an asynchronous query.
  828. **/
  829. function endQuery( target : Int ) : Void;
  830. /**
  831. Returns a `WebGLQuery` object for a given target.
  832. **/
  833. function getQuery( target : Int, pname : Int ) : Dynamic;
  834. /**
  835. Returns information about a query.
  836. **/
  837. function getQueryParameter( query : Query, pname : Int ) : Dynamic;
  838. /**
  839. Creates a new `WebGLSampler` object.
  840. **/
  841. function createSampler() : Sampler;
  842. /**
  843. Deletes a given `WebGLSampler` object.
  844. **/
  845. function deleteSampler( sampler : Sampler ) : Void;
  846. /**
  847. Returns `true` if a given object is a valid `WebGLSampler` object.
  848. **/
  849. function isSampler( sampler : Sampler ) : Bool;
  850. /**
  851. Binds a given `WebGLSampler` to a texture unit.
  852. **/
  853. function bindSampler( unit : Int, sampler : Sampler ) : Void;
  854. function samplerParameteri( sampler : Sampler, pname : Int, param : Int ) : Void;
  855. function samplerParameterf( sampler : Sampler, pname : Int, param : Float ) : Void;
  856. /**
  857. Returns sampler parameter information.
  858. **/
  859. function getSamplerParameter( sampler : Sampler, pname : Int ) : Dynamic;
  860. /**
  861. Creates a new `WebGLSync` object and inserts it into the GL command stream.
  862. **/
  863. function fenceSync( condition : Int, flags : Int ) : Sync;
  864. /**
  865. Returns `true` if the passed object is a valid `WebGLSync` object.
  866. **/
  867. function isSync( sync : Sync ) : Bool;
  868. /**
  869. Deletes a given `WebGLSync` object.
  870. **/
  871. function deleteSync( sync : Sync ) : Void;
  872. /**
  873. Blocks and waits for a `WebGLSync` object to become signaled or a given timeout to be passed.
  874. **/
  875. function clientWaitSync( sync : Sync, flags : Int, timeout : Int ) : Int;
  876. /**
  877. Returns immediately, but waits on the GL server until the given `WebGLSync` object is signaled.
  878. **/
  879. function waitSync( sync : Sync, flags : Int, timeout : Int ) : Void;
  880. /**
  881. Returns parameter information of a `WebGLSync` object.
  882. **/
  883. function getSyncParameter( sync : Sync, pname : Int ) : Dynamic;
  884. /**
  885. Creates and initializes `WebGLTransformFeedback` objects.
  886. **/
  887. function createTransformFeedback() : TransformFeedback;
  888. /**
  889. Deletes a given `WebGLTransformFeedback` object.
  890. **/
  891. function deleteTransformFeedback( tf : TransformFeedback ) : Void;
  892. /**
  893. Returns `true` if the passed object is a valid `WebGLTransformFeedback` object.
  894. **/
  895. function isTransformFeedback( tf : TransformFeedback ) : Bool;
  896. /**
  897. Binds a passed `WebGLTransformFeedback` object to the current GL state.
  898. **/
  899. function bindTransformFeedback( target : Int, tf : TransformFeedback ) : Void;
  900. /**
  901. Starts a transform feedback operation.
  902. **/
  903. function beginTransformFeedback( primitiveMode : Int ) : Void;
  904. /**
  905. Ends a transform feedback operation.
  906. **/
  907. function endTransformFeedback() : Void;
  908. /**
  909. Specifies values to record in `WebGLTransformFeedback` buffers.
  910. **/
  911. function transformFeedbackVaryings( program : Program, varyings : Array<String>, bufferMode : Int ) : Void;
  912. /**
  913. Returns information about varying variables from `WebGLTransformFeedback` buffers.
  914. **/
  915. function getTransformFeedbackVarying( program : Program, index : Int ) : ActiveInfo;
  916. /**
  917. Pauses a transform feedback operation.
  918. **/
  919. function pauseTransformFeedback() : Void;
  920. /**
  921. Resumes a transform feedback operation.
  922. **/
  923. function resumeTransformFeedback() : Void;
  924. /**
  925. Binds a given `WebGLBuffer` to a given binding point (`target`) at a given `index`.
  926. **/
  927. function bindBufferBase( target : Int, index : Int, buffer : Buffer ) : Void;
  928. /**
  929. Binds a range of a given `WebGLBuffer` to a given binding point (`target`) at a given `index`.
  930. **/
  931. function bindBufferRange( target : Int, index : Int, buffer : Buffer, offset : Int, size : Int ) : Void;
  932. /**
  933. Returns the indexed value for the given `target`.
  934. @throws DOMError
  935. **/
  936. function getIndexedParameter( target : Int, index : Int ) : Dynamic;
  937. /**
  938. Retrieves the indices of a number of uniforms within a `WebGLProgram`.
  939. **/
  940. function getUniformIndices( program : Program, uniformNames : Array<String> ) : Array<Int>;
  941. /**
  942. Retrieves information about active uniforms within a `WebGLProgram`.
  943. **/
  944. function getActiveUniforms( program : Program, uniformIndices : Array<Int>, pname : Int ) : Dynamic;
  945. /**
  946. Retrieves the index of a uniform block within a `WebGLProgram`.
  947. **/
  948. function getUniformBlockIndex( program : Program, uniformBlockName : String ) : Int;
  949. /**
  950. Retrieves information about an active uniform block within a `WebGLProgram`.
  951. @throws DOMError
  952. **/
  953. function getActiveUniformBlockParameter( program : Program, uniformBlockIndex : Int, pname : Int ) : Dynamic;
  954. /**
  955. Retrieves the name of the active uniform block at a given index within a `WebGLProgram`.
  956. **/
  957. function getActiveUniformBlockName( program : Program, uniformBlockIndex : Int ) : String;
  958. /**
  959. Assigns binding points for active uniform blocks.
  960. **/
  961. function uniformBlockBinding( program : Program, uniformBlockIndex : Int, uniformBlockBinding : Int ) : Void;
  962. /**
  963. Creates a new `WebGLVertexArrayObject`.
  964. **/
  965. function createVertexArray() : VertexArrayObject;
  966. /**
  967. Deletes a given `WebGLVertexArrayObject`.
  968. **/
  969. function deleteVertexArray( vertexArray : VertexArrayObject ) : Void;
  970. /**
  971. Returns `true` if a given object is a valid `WebGLVertexArrayObject`.
  972. **/
  973. function isVertexArray( vertexArray : VertexArrayObject ) : Bool;
  974. /**
  975. Binds a given `WebGLVertexArrayObject` to the buffer.
  976. **/
  977. function bindVertexArray( array : VertexArrayObject ) : Void;
  978. function getContextAttributes() : ContextAttributes;
  979. function isContextLost() : Bool;
  980. function getSupportedExtensions() : Array<String>;
  981. /** @throws DOMError */
  982. function getExtension<T>( name : Extension<T> ) : T;
  983. function activeTexture( texture : Int ) : Void;
  984. function attachShader( program : Program, shader : Shader ) : Void;
  985. function bindAttribLocation( program : Program, index : Int, name : String ) : Void;
  986. function bindBuffer( target : Int, buffer : Buffer ) : Void;
  987. function bindFramebuffer( target : Int, framebuffer : Framebuffer ) : Void;
  988. function bindRenderbuffer( target : Int, renderbuffer : Renderbuffer ) : Void;
  989. function bindTexture( target : Int, texture : Texture ) : Void;
  990. function blendColor( red : Float, green : Float, blue : Float, alpha : Float ) : Void;
  991. function blendEquation( mode : Int ) : Void;
  992. function blendEquationSeparate( modeRGB : Int, modeAlpha : Int ) : Void;
  993. function blendFunc( sfactor : Int, dfactor : Int ) : Void;
  994. function blendFuncSeparate( srcRGB : Int, dstRGB : Int, srcAlpha : Int, dstAlpha : Int ) : Void;
  995. function checkFramebufferStatus( target : Int ) : Int;
  996. function clear( mask : Int ) : Void;
  997. function clearColor( red : Float, green : Float, blue : Float, alpha : Float ) : Void;
  998. function clearDepth( depth : Float ) : Void;
  999. function clearStencil( s : Int ) : Void;
  1000. function colorMask( red : Bool, green : Bool, blue : Bool, alpha : Bool ) : Void;
  1001. function compileShader( shader : Shader ) : Void;
  1002. function copyTexImage2D( target : Int, level : Int, internalformat : Int, x : Int, y : Int, width : Int, height : Int, border : Int ) : Void;
  1003. function copyTexSubImage2D( target : Int, level : Int, xoffset : Int, yoffset : Int, x : Int, y : Int, width : Int, height : Int ) : Void;
  1004. function createBuffer() : Buffer;
  1005. function createFramebuffer() : Framebuffer;
  1006. function createProgram() : Program;
  1007. function createRenderbuffer() : Renderbuffer;
  1008. function createShader( type : Int ) : Shader;
  1009. function createTexture() : Texture;
  1010. function cullFace( mode : Int ) : Void;
  1011. function deleteBuffer( buffer : Buffer ) : Void;
  1012. function deleteFramebuffer( framebuffer : Framebuffer ) : Void;
  1013. function deleteProgram( program : Program ) : Void;
  1014. function deleteRenderbuffer( renderbuffer : Renderbuffer ) : Void;
  1015. function deleteShader( shader : Shader ) : Void;
  1016. function deleteTexture( texture : Texture ) : Void;
  1017. function depthFunc( func : Int ) : Void;
  1018. function depthMask( flag : Bool ) : Void;
  1019. function depthRange( zNear : Float, zFar : Float ) : Void;
  1020. function detachShader( program : Program, shader : Shader ) : Void;
  1021. function disable( cap : Int ) : Void;
  1022. function disableVertexAttribArray( index : Int ) : Void;
  1023. function drawArrays( mode : Int, first : Int, count : Int ) : Void;
  1024. function drawElements( mode : Int, count : Int, type : Int, offset : Int ) : Void;
  1025. function enable( cap : Int ) : Void;
  1026. function enableVertexAttribArray( index : Int ) : Void;
  1027. function finish() : Void;
  1028. function flush() : Void;
  1029. function framebufferRenderbuffer( target : Int, attachment : Int, renderbuffertarget : Int, renderbuffer : Renderbuffer ) : Void;
  1030. function framebufferTexture2D( target : Int, attachment : Int, textarget : Int, texture : Texture, level : Int ) : Void;
  1031. function frontFace( mode : Int ) : Void;
  1032. function generateMipmap( target : Int ) : Void;
  1033. function getActiveAttrib( program : Program, index : Int ) : ActiveInfo;
  1034. function getActiveUniform( program : Program, index : Int ) : ActiveInfo;
  1035. function getAttachedShaders( program : Program ) : Array<Shader>;
  1036. function getAttribLocation( program : Program, name : String ) : Int;
  1037. function getBufferParameter( target : Int, pname : Int ) : Dynamic;
  1038. /** @throws DOMError */
  1039. function getParameter( pname : Int ) : Dynamic;
  1040. function getError() : Int;
  1041. /** @throws DOMError */
  1042. function getFramebufferAttachmentParameter( target : Int, attachment : Int, pname : Int ) : Dynamic;
  1043. function getProgramParameter( program : Program, pname : Int ) : Dynamic;
  1044. function getProgramInfoLog( program : Program ) : String;
  1045. function getRenderbufferParameter( target : Int, pname : Int ) : Dynamic;
  1046. function getShaderParameter( shader : Shader, pname : Int ) : Dynamic;
  1047. function getShaderPrecisionFormat( shadertype : Int, precisiontype : Int ) : ShaderPrecisionFormat;
  1048. function getShaderInfoLog( shader : Shader ) : String;
  1049. function getShaderSource( shader : Shader ) : String;
  1050. function getTexParameter( target : Int, pname : Int ) : Dynamic;
  1051. function getUniform( program : Program, location : UniformLocation ) : Dynamic;
  1052. function getUniformLocation( program : Program, name : String ) : UniformLocation;
  1053. /** @throws DOMError */
  1054. function getVertexAttrib( index : Int, pname : Int ) : Dynamic;
  1055. function getVertexAttribOffset( index : Int, pname : Int ) : Int;
  1056. function hint( target : Int, mode : Int ) : Void;
  1057. function isBuffer( buffer : Buffer ) : Bool;
  1058. function isEnabled( cap : Int ) : Bool;
  1059. function isFramebuffer( framebuffer : Framebuffer ) : Bool;
  1060. function isProgram( program : Program ) : Bool;
  1061. function isRenderbuffer( renderbuffer : Renderbuffer ) : Bool;
  1062. function isShader( shader : Shader ) : Bool;
  1063. function isTexture( texture : Texture ) : Bool;
  1064. function lineWidth( width : Float ) : Void;
  1065. function linkProgram( program : Program ) : Void;
  1066. function pixelStorei( pname : Int, param : Int ) : Void;
  1067. function polygonOffset( factor : Float, units : Float ) : Void;
  1068. function renderbufferStorage( target : Int, internalformat : Int, width : Int, height : Int ) : Void;
  1069. function sampleCoverage( value : Float, invert : Bool ) : Void;
  1070. function scissor( x : Int, y : Int, width : Int, height : Int ) : Void;
  1071. function shaderSource( shader : Shader, source : String ) : Void;
  1072. function stencilFunc( func : Int, ref : Int, mask : Int ) : Void;
  1073. function stencilFuncSeparate( face : Int, func : Int, ref : Int, mask : Int ) : Void;
  1074. function stencilMask( mask : Int ) : Void;
  1075. function stencilMaskSeparate( face : Int, mask : Int ) : Void;
  1076. function stencilOp( fail : Int, zfail : Int, zpass : Int ) : Void;
  1077. function stencilOpSeparate( face : Int, fail : Int, zfail : Int, zpass : Int ) : Void;
  1078. function texParameterf( target : Int, pname : Int, param : Float ) : Void;
  1079. function texParameteri( target : Int, pname : Int, param : Int ) : Void;
  1080. function uniform1f( location : UniformLocation, x : Float ) : Void;
  1081. function uniform2f( location : UniformLocation, x : Float, y : Float ) : Void;
  1082. function uniform3f( location : UniformLocation, x : Float, y : Float, z : Float ) : Void;
  1083. function uniform4f( location : UniformLocation, x : Float, y : Float, z : Float, w : Float ) : Void;
  1084. function uniform1i( location : UniformLocation, x : Int ) : Void;
  1085. function uniform2i( location : UniformLocation, x : Int, y : Int ) : Void;
  1086. function uniform3i( location : UniformLocation, x : Int, y : Int, z : Int ) : Void;
  1087. function uniform4i( location : UniformLocation, x : Int, y : Int, z : Int, w : Int ) : Void;
  1088. function useProgram( program : Program ) : Void;
  1089. function validateProgram( program : Program ) : Void;
  1090. function vertexAttrib1f( indx : Int, x : Float ) : Void;
  1091. @:overload( function( indx : Int, values : Array<Float>) : Void {} )
  1092. function vertexAttrib1fv( indx : Int, values : js.lib.Float32Array ) : Void;
  1093. function vertexAttrib2f( indx : Int, x : Float, y : Float ) : Void;
  1094. @:overload( function( indx : Int, values : Array<Float>) : Void {} )
  1095. function vertexAttrib2fv( indx : Int, values : js.lib.Float32Array ) : Void;
  1096. function vertexAttrib3f( indx : Int, x : Float, y : Float, z : Float ) : Void;
  1097. @:overload( function( indx : Int, values : Array<Float>) : Void {} )
  1098. function vertexAttrib3fv( indx : Int, values : js.lib.Float32Array ) : Void;
  1099. function vertexAttrib4f( indx : Int, x : Float, y : Float, z : Float, w : Float ) : Void;
  1100. @:overload( function( indx : Int, values : Array<Float>) : Void {} )
  1101. function vertexAttrib4fv( indx : Int, values : js.lib.Float32Array ) : Void;
  1102. function vertexAttribPointer( indx : Int, size : Int, type : Int, normalized : Bool, stride : Int, offset : Int ) : Void;
  1103. function viewport( x : Int, y : Int, width : Int, height : Int ) : Void;
  1104. }