WebGL2RenderingContext.hx 65 KB

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