RenderingContext.hx 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510
  1. /*
  2. * Copyright (C)2005-2018 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\WebGLRenderingContext.webidl. Do not edit!
  23. package js.html.webgl;
  24. /**
  25. The WebGLRenderingContext interface provides the OpenGL ES 2.0 rendering context for the drawing surface of an HTML `canvas` element.
  26. Documentation [WebGLRenderingContext](https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext) by [Mozilla Contributors](https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext$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/WebGLRenderingContext>
  28. **/
  29. @:native("WebGLRenderingContext")
  30. extern class RenderingContext
  31. {
  32. static inline var DEPTH_BUFFER_BIT : Int = 256;
  33. static inline var STENCIL_BUFFER_BIT : Int = 1024;
  34. static inline var COLOR_BUFFER_BIT : Int = 16384;
  35. static inline var POINTS : Int = 0;
  36. static inline var LINES : Int = 1;
  37. static inline var LINE_LOOP : Int = 2;
  38. static inline var LINE_STRIP : Int = 3;
  39. static inline var TRIANGLES : Int = 4;
  40. static inline var TRIANGLE_STRIP : Int = 5;
  41. static inline var TRIANGLE_FAN : Int = 6;
  42. static inline var ZERO : Int = 0;
  43. static inline var ONE : Int = 1;
  44. static inline var SRC_COLOR : Int = 768;
  45. static inline var ONE_MINUS_SRC_COLOR : Int = 769;
  46. static inline var SRC_ALPHA : Int = 770;
  47. static inline var ONE_MINUS_SRC_ALPHA : Int = 771;
  48. static inline var DST_ALPHA : Int = 772;
  49. static inline var ONE_MINUS_DST_ALPHA : Int = 773;
  50. static inline var DST_COLOR : Int = 774;
  51. static inline var ONE_MINUS_DST_COLOR : Int = 775;
  52. static inline var SRC_ALPHA_SATURATE : Int = 776;
  53. static inline var FUNC_ADD : Int = 32774;
  54. static inline var BLEND_EQUATION : Int = 32777;
  55. static inline var BLEND_EQUATION_RGB : Int = 32777;
  56. static inline var BLEND_EQUATION_ALPHA : Int = 34877;
  57. static inline var FUNC_SUBTRACT : Int = 32778;
  58. static inline var FUNC_REVERSE_SUBTRACT : Int = 32779;
  59. static inline var BLEND_DST_RGB : Int = 32968;
  60. static inline var BLEND_SRC_RGB : Int = 32969;
  61. static inline var BLEND_DST_ALPHA : Int = 32970;
  62. static inline var BLEND_SRC_ALPHA : Int = 32971;
  63. static inline var CONSTANT_COLOR : Int = 32769;
  64. static inline var ONE_MINUS_CONSTANT_COLOR : Int = 32770;
  65. static inline var CONSTANT_ALPHA : Int = 32771;
  66. static inline var ONE_MINUS_CONSTANT_ALPHA : Int = 32772;
  67. static inline var BLEND_COLOR : Int = 32773;
  68. static inline var ARRAY_BUFFER : Int = 34962;
  69. static inline var ELEMENT_ARRAY_BUFFER : Int = 34963;
  70. static inline var ARRAY_BUFFER_BINDING : Int = 34964;
  71. static inline var ELEMENT_ARRAY_BUFFER_BINDING : Int = 34965;
  72. static inline var STREAM_DRAW : Int = 35040;
  73. static inline var STATIC_DRAW : Int = 35044;
  74. static inline var DYNAMIC_DRAW : Int = 35048;
  75. static inline var BUFFER_SIZE : Int = 34660;
  76. static inline var BUFFER_USAGE : Int = 34661;
  77. static inline var CURRENT_VERTEX_ATTRIB : Int = 34342;
  78. static inline var FRONT : Int = 1028;
  79. static inline var BACK : Int = 1029;
  80. static inline var FRONT_AND_BACK : Int = 1032;
  81. static inline var CULL_FACE : Int = 2884;
  82. static inline var BLEND : Int = 3042;
  83. static inline var DITHER : Int = 3024;
  84. static inline var STENCIL_TEST : Int = 2960;
  85. static inline var DEPTH_TEST : Int = 2929;
  86. static inline var SCISSOR_TEST : Int = 3089;
  87. static inline var POLYGON_OFFSET_FILL : Int = 32823;
  88. static inline var SAMPLE_ALPHA_TO_COVERAGE : Int = 32926;
  89. static inline var SAMPLE_COVERAGE : Int = 32928;
  90. static inline var NO_ERROR : Int = 0;
  91. static inline var INVALID_ENUM : Int = 1280;
  92. static inline var INVALID_VALUE : Int = 1281;
  93. static inline var INVALID_OPERATION : Int = 1282;
  94. static inline var OUT_OF_MEMORY : Int = 1285;
  95. static inline var CW : Int = 2304;
  96. static inline var CCW : Int = 2305;
  97. static inline var LINE_WIDTH : Int = 2849;
  98. static inline var ALIASED_POINT_SIZE_RANGE : Int = 33901;
  99. static inline var ALIASED_LINE_WIDTH_RANGE : Int = 33902;
  100. static inline var CULL_FACE_MODE : Int = 2885;
  101. static inline var FRONT_FACE : Int = 2886;
  102. static inline var DEPTH_RANGE : Int = 2928;
  103. static inline var DEPTH_WRITEMASK : Int = 2930;
  104. static inline var DEPTH_CLEAR_VALUE : Int = 2931;
  105. static inline var DEPTH_FUNC : Int = 2932;
  106. static inline var STENCIL_CLEAR_VALUE : Int = 2961;
  107. static inline var STENCIL_FUNC : Int = 2962;
  108. static inline var STENCIL_FAIL : Int = 2964;
  109. static inline var STENCIL_PASS_DEPTH_FAIL : Int = 2965;
  110. static inline var STENCIL_PASS_DEPTH_PASS : Int = 2966;
  111. static inline var STENCIL_REF : Int = 2967;
  112. static inline var STENCIL_VALUE_MASK : Int = 2963;
  113. static inline var STENCIL_WRITEMASK : Int = 2968;
  114. static inline var STENCIL_BACK_FUNC : Int = 34816;
  115. static inline var STENCIL_BACK_FAIL : Int = 34817;
  116. static inline var STENCIL_BACK_PASS_DEPTH_FAIL : Int = 34818;
  117. static inline var STENCIL_BACK_PASS_DEPTH_PASS : Int = 34819;
  118. static inline var STENCIL_BACK_REF : Int = 36003;
  119. static inline var STENCIL_BACK_VALUE_MASK : Int = 36004;
  120. static inline var STENCIL_BACK_WRITEMASK : Int = 36005;
  121. static inline var VIEWPORT : Int = 2978;
  122. static inline var SCISSOR_BOX : Int = 3088;
  123. static inline var COLOR_CLEAR_VALUE : Int = 3106;
  124. static inline var COLOR_WRITEMASK : Int = 3107;
  125. static inline var UNPACK_ALIGNMENT : Int = 3317;
  126. static inline var PACK_ALIGNMENT : Int = 3333;
  127. static inline var MAX_TEXTURE_SIZE : Int = 3379;
  128. static inline var MAX_VIEWPORT_DIMS : Int = 3386;
  129. static inline var SUBPIXEL_BITS : Int = 3408;
  130. static inline var RED_BITS : Int = 3410;
  131. static inline var GREEN_BITS : Int = 3411;
  132. static inline var BLUE_BITS : Int = 3412;
  133. static inline var ALPHA_BITS : Int = 3413;
  134. static inline var DEPTH_BITS : Int = 3414;
  135. static inline var STENCIL_BITS : Int = 3415;
  136. static inline var POLYGON_OFFSET_UNITS : Int = 10752;
  137. static inline var POLYGON_OFFSET_FACTOR : Int = 32824;
  138. static inline var TEXTURE_BINDING_2D : Int = 32873;
  139. static inline var SAMPLE_BUFFERS : Int = 32936;
  140. static inline var SAMPLES : Int = 32937;
  141. static inline var SAMPLE_COVERAGE_VALUE : Int = 32938;
  142. static inline var SAMPLE_COVERAGE_INVERT : Int = 32939;
  143. static inline var COMPRESSED_TEXTURE_FORMATS : Int = 34467;
  144. static inline var DONT_CARE : Int = 4352;
  145. static inline var FASTEST : Int = 4353;
  146. static inline var NICEST : Int = 4354;
  147. static inline var GENERATE_MIPMAP_HINT : Int = 33170;
  148. static inline var BYTE : Int = 5120;
  149. static inline var UNSIGNED_BYTE : Int = 5121;
  150. static inline var SHORT : Int = 5122;
  151. static inline var UNSIGNED_SHORT : Int = 5123;
  152. static inline var INT : Int = 5124;
  153. static inline var UNSIGNED_INT : Int = 5125;
  154. static inline var FLOAT : Int = 5126;
  155. static inline var DEPTH_COMPONENT : Int = 6402;
  156. static inline var ALPHA : Int = 6406;
  157. static inline var RGB : Int = 6407;
  158. static inline var RGBA : Int = 6408;
  159. static inline var LUMINANCE : Int = 6409;
  160. static inline var LUMINANCE_ALPHA : Int = 6410;
  161. static inline var UNSIGNED_SHORT_4_4_4_4 : Int = 32819;
  162. static inline var UNSIGNED_SHORT_5_5_5_1 : Int = 32820;
  163. static inline var UNSIGNED_SHORT_5_6_5 : Int = 33635;
  164. static inline var FRAGMENT_SHADER : Int = 35632;
  165. static inline var VERTEX_SHADER : Int = 35633;
  166. static inline var MAX_VERTEX_ATTRIBS : Int = 34921;
  167. static inline var MAX_VERTEX_UNIFORM_VECTORS : Int = 36347;
  168. static inline var MAX_VARYING_VECTORS : Int = 36348;
  169. static inline var MAX_COMBINED_TEXTURE_IMAGE_UNITS : Int = 35661;
  170. static inline var MAX_VERTEX_TEXTURE_IMAGE_UNITS : Int = 35660;
  171. static inline var MAX_TEXTURE_IMAGE_UNITS : Int = 34930;
  172. static inline var MAX_FRAGMENT_UNIFORM_VECTORS : Int = 36349;
  173. static inline var SHADER_TYPE : Int = 35663;
  174. static inline var DELETE_STATUS : Int = 35712;
  175. static inline var LINK_STATUS : Int = 35714;
  176. static inline var VALIDATE_STATUS : Int = 35715;
  177. static inline var ATTACHED_SHADERS : Int = 35717;
  178. static inline var ACTIVE_UNIFORMS : Int = 35718;
  179. static inline var ACTIVE_ATTRIBUTES : Int = 35721;
  180. static inline var SHADING_LANGUAGE_VERSION : Int = 35724;
  181. static inline var CURRENT_PROGRAM : Int = 35725;
  182. static inline var NEVER : Int = 512;
  183. static inline var LESS : Int = 513;
  184. static inline var EQUAL : Int = 514;
  185. static inline var LEQUAL : Int = 515;
  186. static inline var GREATER : Int = 516;
  187. static inline var NOTEQUAL : Int = 517;
  188. static inline var GEQUAL : Int = 518;
  189. static inline var ALWAYS : Int = 519;
  190. static inline var KEEP : Int = 7680;
  191. static inline var REPLACE : Int = 7681;
  192. static inline var INCR : Int = 7682;
  193. static inline var DECR : Int = 7683;
  194. static inline var INVERT : Int = 5386;
  195. static inline var INCR_WRAP : Int = 34055;
  196. static inline var DECR_WRAP : Int = 34056;
  197. static inline var VENDOR : Int = 7936;
  198. static inline var RENDERER : Int = 7937;
  199. static inline var VERSION : Int = 7938;
  200. static inline var NEAREST : Int = 9728;
  201. static inline var LINEAR : Int = 9729;
  202. static inline var NEAREST_MIPMAP_NEAREST : Int = 9984;
  203. static inline var LINEAR_MIPMAP_NEAREST : Int = 9985;
  204. static inline var NEAREST_MIPMAP_LINEAR : Int = 9986;
  205. static inline var LINEAR_MIPMAP_LINEAR : Int = 9987;
  206. static inline var TEXTURE_MAG_FILTER : Int = 10240;
  207. static inline var TEXTURE_MIN_FILTER : Int = 10241;
  208. static inline var TEXTURE_WRAP_S : Int = 10242;
  209. static inline var TEXTURE_WRAP_T : Int = 10243;
  210. static inline var TEXTURE_2D : Int = 3553;
  211. static inline var TEXTURE : Int = 5890;
  212. static inline var TEXTURE_CUBE_MAP : Int = 34067;
  213. static inline var TEXTURE_BINDING_CUBE_MAP : Int = 34068;
  214. static inline var TEXTURE_CUBE_MAP_POSITIVE_X : Int = 34069;
  215. static inline var TEXTURE_CUBE_MAP_NEGATIVE_X : Int = 34070;
  216. static inline var TEXTURE_CUBE_MAP_POSITIVE_Y : Int = 34071;
  217. static inline var TEXTURE_CUBE_MAP_NEGATIVE_Y : Int = 34072;
  218. static inline var TEXTURE_CUBE_MAP_POSITIVE_Z : Int = 34073;
  219. static inline var TEXTURE_CUBE_MAP_NEGATIVE_Z : Int = 34074;
  220. static inline var MAX_CUBE_MAP_TEXTURE_SIZE : Int = 34076;
  221. static inline var TEXTURE0 : Int = 33984;
  222. static inline var TEXTURE1 : Int = 33985;
  223. static inline var TEXTURE2 : Int = 33986;
  224. static inline var TEXTURE3 : Int = 33987;
  225. static inline var TEXTURE4 : Int = 33988;
  226. static inline var TEXTURE5 : Int = 33989;
  227. static inline var TEXTURE6 : Int = 33990;
  228. static inline var TEXTURE7 : Int = 33991;
  229. static inline var TEXTURE8 : Int = 33992;
  230. static inline var TEXTURE9 : Int = 33993;
  231. static inline var TEXTURE10 : Int = 33994;
  232. static inline var TEXTURE11 : Int = 33995;
  233. static inline var TEXTURE12 : Int = 33996;
  234. static inline var TEXTURE13 : Int = 33997;
  235. static inline var TEXTURE14 : Int = 33998;
  236. static inline var TEXTURE15 : Int = 33999;
  237. static inline var TEXTURE16 : Int = 34000;
  238. static inline var TEXTURE17 : Int = 34001;
  239. static inline var TEXTURE18 : Int = 34002;
  240. static inline var TEXTURE19 : Int = 34003;
  241. static inline var TEXTURE20 : Int = 34004;
  242. static inline var TEXTURE21 : Int = 34005;
  243. static inline var TEXTURE22 : Int = 34006;
  244. static inline var TEXTURE23 : Int = 34007;
  245. static inline var TEXTURE24 : Int = 34008;
  246. static inline var TEXTURE25 : Int = 34009;
  247. static inline var TEXTURE26 : Int = 34010;
  248. static inline var TEXTURE27 : Int = 34011;
  249. static inline var TEXTURE28 : Int = 34012;
  250. static inline var TEXTURE29 : Int = 34013;
  251. static inline var TEXTURE30 : Int = 34014;
  252. static inline var TEXTURE31 : Int = 34015;
  253. static inline var ACTIVE_TEXTURE : Int = 34016;
  254. static inline var REPEAT : Int = 10497;
  255. static inline var CLAMP_TO_EDGE : Int = 33071;
  256. static inline var MIRRORED_REPEAT : Int = 33648;
  257. static inline var FLOAT_VEC2 : Int = 35664;
  258. static inline var FLOAT_VEC3 : Int = 35665;
  259. static inline var FLOAT_VEC4 : Int = 35666;
  260. static inline var INT_VEC2 : Int = 35667;
  261. static inline var INT_VEC3 : Int = 35668;
  262. static inline var INT_VEC4 : Int = 35669;
  263. static inline var BOOL : Int = 35670;
  264. static inline var BOOL_VEC2 : Int = 35671;
  265. static inline var BOOL_VEC3 : Int = 35672;
  266. static inline var BOOL_VEC4 : Int = 35673;
  267. static inline var FLOAT_MAT2 : Int = 35674;
  268. static inline var FLOAT_MAT3 : Int = 35675;
  269. static inline var FLOAT_MAT4 : Int = 35676;
  270. static inline var SAMPLER_2D : Int = 35678;
  271. static inline var SAMPLER_CUBE : Int = 35680;
  272. static inline var VERTEX_ATTRIB_ARRAY_ENABLED : Int = 34338;
  273. static inline var VERTEX_ATTRIB_ARRAY_SIZE : Int = 34339;
  274. static inline var VERTEX_ATTRIB_ARRAY_STRIDE : Int = 34340;
  275. static inline var VERTEX_ATTRIB_ARRAY_TYPE : Int = 34341;
  276. static inline var VERTEX_ATTRIB_ARRAY_NORMALIZED : Int = 34922;
  277. static inline var VERTEX_ATTRIB_ARRAY_POINTER : Int = 34373;
  278. static inline var VERTEX_ATTRIB_ARRAY_BUFFER_BINDING : Int = 34975;
  279. static inline var IMPLEMENTATION_COLOR_READ_TYPE : Int = 35738;
  280. static inline var IMPLEMENTATION_COLOR_READ_FORMAT : Int = 35739;
  281. static inline var COMPILE_STATUS : Int = 35713;
  282. static inline var LOW_FLOAT : Int = 36336;
  283. static inline var MEDIUM_FLOAT : Int = 36337;
  284. static inline var HIGH_FLOAT : Int = 36338;
  285. static inline var LOW_INT : Int = 36339;
  286. static inline var MEDIUM_INT : Int = 36340;
  287. static inline var HIGH_INT : Int = 36341;
  288. static inline var FRAMEBUFFER : Int = 36160;
  289. static inline var RENDERBUFFER : Int = 36161;
  290. static inline var RGBA4 : Int = 32854;
  291. static inline var RGB5_A1 : Int = 32855;
  292. static inline var RGB565 : Int = 36194;
  293. static inline var DEPTH_COMPONENT16 : Int = 33189;
  294. static inline var STENCIL_INDEX : Int = 6401;
  295. static inline var STENCIL_INDEX8 : Int = 36168;
  296. static inline var DEPTH_STENCIL : Int = 34041;
  297. static inline var RENDERBUFFER_WIDTH : Int = 36162;
  298. static inline var RENDERBUFFER_HEIGHT : Int = 36163;
  299. static inline var RENDERBUFFER_INTERNAL_FORMAT : Int = 36164;
  300. static inline var RENDERBUFFER_RED_SIZE : Int = 36176;
  301. static inline var RENDERBUFFER_GREEN_SIZE : Int = 36177;
  302. static inline var RENDERBUFFER_BLUE_SIZE : Int = 36178;
  303. static inline var RENDERBUFFER_ALPHA_SIZE : Int = 36179;
  304. static inline var RENDERBUFFER_DEPTH_SIZE : Int = 36180;
  305. static inline var RENDERBUFFER_STENCIL_SIZE : Int = 36181;
  306. static inline var FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE : Int = 36048;
  307. static inline var FRAMEBUFFER_ATTACHMENT_OBJECT_NAME : Int = 36049;
  308. static inline var FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL : Int = 36050;
  309. static inline var FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE : Int = 36051;
  310. static inline var COLOR_ATTACHMENT0 : Int = 36064;
  311. static inline var DEPTH_ATTACHMENT : Int = 36096;
  312. static inline var STENCIL_ATTACHMENT : Int = 36128;
  313. static inline var DEPTH_STENCIL_ATTACHMENT : Int = 33306;
  314. static inline var NONE : Int = 0;
  315. static inline var FRAMEBUFFER_COMPLETE : Int = 36053;
  316. static inline var FRAMEBUFFER_INCOMPLETE_ATTACHMENT : Int = 36054;
  317. static inline var FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT : Int = 36055;
  318. static inline var FRAMEBUFFER_INCOMPLETE_DIMENSIONS : Int = 36057;
  319. static inline var FRAMEBUFFER_UNSUPPORTED : Int = 36061;
  320. static inline var FRAMEBUFFER_BINDING : Int = 36006;
  321. static inline var RENDERBUFFER_BINDING : Int = 36007;
  322. static inline var MAX_RENDERBUFFER_SIZE : Int = 34024;
  323. static inline var INVALID_FRAMEBUFFER_OPERATION : Int = 1286;
  324. static inline var UNPACK_FLIP_Y_WEBGL : Int = 37440;
  325. static inline var UNPACK_PREMULTIPLY_ALPHA_WEBGL : Int = 37441;
  326. static inline var CONTEXT_LOST_WEBGL : Int = 37442;
  327. static inline var UNPACK_COLORSPACE_CONVERSION_WEBGL : Int = 37443;
  328. static inline var BROWSER_DEFAULT_WEBGL : Int = 37444;
  329. var canvas(default,null) : js.html.CanvasElement;
  330. var drawingBufferWidth(default,null) : Int;
  331. var drawingBufferHeight(default,null) : Int;
  332. function getContextAttributes() : ContextAttributes;
  333. function isContextLost() : Bool;
  334. function getSupportedExtensions() : Array<String>;
  335. /** @throws DOMError */
  336. function getExtension( name : String ) : Dynamic;
  337. function activeTexture( texture : Int ) : Void;
  338. function attachShader( program : Program, shader : Shader ) : Void;
  339. function bindAttribLocation( program : Program, index : Int, name : String ) : Void;
  340. function bindBuffer( target : Int, buffer : Buffer ) : Void;
  341. function bindFramebuffer( target : Int, framebuffer : Framebuffer ) : Void;
  342. function bindRenderbuffer( target : Int, renderbuffer : Renderbuffer ) : Void;
  343. function bindTexture( target : Int, texture : Texture ) : Void;
  344. function blendColor( red : Float, green : Float, blue : Float, alpha : Float ) : Void;
  345. function blendEquation( mode : Int ) : Void;
  346. function blendEquationSeparate( modeRGB : Int, modeAlpha : Int ) : Void;
  347. function blendFunc( sfactor : Int, dfactor : Int ) : Void;
  348. function blendFuncSeparate( srcRGB : Int, dstRGB : Int, srcAlpha : Int, dstAlpha : Int ) : Void;
  349. @:overload( function( target : Int, size : Int, usage : Int ) : Void {} )
  350. @:overload( function( target : Int, data : js.html.ArrayBufferView, usage : Int ) : Void {} )
  351. @:overload( function( target : Int, data : js.html.ArrayBuffer, usage : Int ) : Void {} )
  352. function bufferData( target : Int, data : Dynamic/*MISSING SharedArrayBuffer*/, usage : Int ) : Void;
  353. @:overload( function( target : Int, offset : Int, data : js.html.ArrayBufferView ) : Void {} )
  354. @:overload( function( target : Int, offset : Int, data : js.html.ArrayBuffer ) : Void {} )
  355. function bufferSubData( target : Int, offset : Int, data : Dynamic/*MISSING SharedArrayBuffer*/ ) : Void;
  356. function checkFramebufferStatus( target : Int ) : Int;
  357. function clear( mask : Int ) : Void;
  358. function clearColor( red : Float, green : Float, blue : Float, alpha : Float ) : Void;
  359. function clearDepth( depth : Float ) : Void;
  360. function clearStencil( s : Int ) : Void;
  361. function colorMask( red : Bool, green : Bool, blue : Bool, alpha : Bool ) : Void;
  362. function compileShader( shader : Shader ) : Void;
  363. function compressedTexImage2D( target : Int, level : Int, internalformat : Int, width : Int, height : Int, border : Int, data : js.html.ArrayBufferView ) : Void;
  364. function compressedTexSubImage2D( target : Int, level : Int, xoffset : Int, yoffset : Int, width : Int, height : Int, format : Int, data : js.html.ArrayBufferView ) : Void;
  365. function copyTexImage2D( target : Int, level : Int, internalformat : Int, x : Int, y : Int, width : Int, height : Int, border : Int ) : Void;
  366. function copyTexSubImage2D( target : Int, level : Int, xoffset : Int, yoffset : Int, x : Int, y : Int, width : Int, height : Int ) : Void;
  367. function createBuffer() : Buffer;
  368. function createFramebuffer() : Framebuffer;
  369. function createProgram() : Program;
  370. function createRenderbuffer() : Renderbuffer;
  371. function createShader( type : Int ) : Shader;
  372. function createTexture() : Texture;
  373. function cullFace( mode : Int ) : Void;
  374. function deleteBuffer( buffer : Buffer ) : Void;
  375. function deleteFramebuffer( framebuffer : Framebuffer ) : Void;
  376. function deleteProgram( program : Program ) : Void;
  377. function deleteRenderbuffer( renderbuffer : Renderbuffer ) : Void;
  378. function deleteShader( shader : Shader ) : Void;
  379. function deleteTexture( texture : Texture ) : Void;
  380. function depthFunc( func : Int ) : Void;
  381. function depthMask( flag : Bool ) : Void;
  382. function depthRange( zNear : Float, zFar : Float ) : Void;
  383. function detachShader( program : Program, shader : Shader ) : Void;
  384. function disable( cap : Int ) : Void;
  385. function disableVertexAttribArray( index : Int ) : Void;
  386. function drawArrays( mode : Int, first : Int, count : Int ) : Void;
  387. function drawElements( mode : Int, count : Int, type : Int, offset : Int ) : Void;
  388. function enable( cap : Int ) : Void;
  389. function enableVertexAttribArray( index : Int ) : Void;
  390. function finish() : Void;
  391. function flush() : Void;
  392. function framebufferRenderbuffer( target : Int, attachment : Int, renderbuffertarget : Int, renderbuffer : Renderbuffer ) : Void;
  393. function framebufferTexture2D( target : Int, attachment : Int, textarget : Int, texture : Texture, level : Int ) : Void;
  394. function frontFace( mode : Int ) : Void;
  395. function generateMipmap( target : Int ) : Void;
  396. function getActiveAttrib( program : Program, index : Int ) : ActiveInfo;
  397. function getActiveUniform( program : Program, index : Int ) : ActiveInfo;
  398. function getAttachedShaders( program : Program ) : Array<Shader>;
  399. function getAttribLocation( program : Program, name : String ) : Int;
  400. function getBufferParameter( target : Int, pname : Int ) : Dynamic;
  401. /** @throws DOMError */
  402. function getParameter( pname : Int ) : Dynamic;
  403. function getError() : Int;
  404. /** @throws DOMError */
  405. function getFramebufferAttachmentParameter( target : Int, attachment : Int, pname : Int ) : Dynamic;
  406. function getProgramParameter( program : Program, pname : Int ) : Dynamic;
  407. function getProgramInfoLog( program : Program ) : String;
  408. function getRenderbufferParameter( target : Int, pname : Int ) : Dynamic;
  409. function getShaderParameter( shader : Shader, pname : Int ) : Dynamic;
  410. function getShaderPrecisionFormat( shadertype : Int, precisiontype : Int ) : ShaderPrecisionFormat;
  411. function getShaderInfoLog( shader : Shader ) : String;
  412. function getShaderSource( shader : Shader ) : String;
  413. function getTexParameter( target : Int, pname : Int ) : Dynamic;
  414. function getUniform( program : Program, location : UniformLocation ) : Dynamic;
  415. function getUniformLocation( program : Program, name : String ) : UniformLocation;
  416. /** @throws DOMError */
  417. function getVertexAttrib( index : Int, pname : Int ) : Dynamic;
  418. function getVertexAttribOffset( index : Int, pname : Int ) : Int;
  419. function hint( target : Int, mode : Int ) : Void;
  420. function isBuffer( buffer : Buffer ) : Bool;
  421. function isEnabled( cap : Int ) : Bool;
  422. function isFramebuffer( framebuffer : Framebuffer ) : Bool;
  423. function isProgram( program : Program ) : Bool;
  424. function isRenderbuffer( renderbuffer : Renderbuffer ) : Bool;
  425. function isShader( shader : Shader ) : Bool;
  426. function isTexture( texture : Texture ) : Bool;
  427. function lineWidth( width : Float ) : Void;
  428. function linkProgram( program : Program ) : Void;
  429. function pixelStorei( pname : Int, param : Int ) : Void;
  430. function polygonOffset( factor : Float, units : Float ) : Void;
  431. /** @throws DOMError */
  432. function readPixels( x : Int, y : Int, width : Int, height : Int, format : Int, type : Int, pixels : js.html.ArrayBufferView ) : Void;
  433. function renderbufferStorage( target : Int, internalformat : Int, width : Int, height : Int ) : Void;
  434. function sampleCoverage( value : Float, invert : Bool ) : Void;
  435. function scissor( x : Int, y : Int, width : Int, height : Int ) : Void;
  436. function shaderSource( shader : Shader, source : String ) : Void;
  437. function stencilFunc( func : Int, ref : Int, mask : Int ) : Void;
  438. function stencilFuncSeparate( face : Int, func : Int, ref : Int, mask : Int ) : Void;
  439. function stencilMask( mask : Int ) : Void;
  440. function stencilMaskSeparate( face : Int, mask : Int ) : Void;
  441. function stencilOp( fail : Int, zfail : Int, zpass : Int ) : Void;
  442. function stencilOpSeparate( face : Int, fail : Int, zfail : Int, zpass : Int ) : Void;
  443. /** @throws DOMError */
  444. @:overload( function( target : Int, level : Int, internalformat : Int, width : Int, height : Int, border : Int, format : Int, type : Int, pixels : js.html.ArrayBufferView ) : Void {} )
  445. @:overload( function( target : Int, level : Int, internalformat : Int, format : Int, type : Int, pixels : js.html.ImageData ) : Void {} )
  446. @:overload( function( target : Int, level : Int, internalformat : Int, format : Int, type : Int, image : js.html.ImageElement ) : Void {} )
  447. @:overload( function( target : Int, level : Int, internalformat : Int, format : Int, type : Int, canvas : js.html.CanvasElement ) : Void {} )
  448. function texImage2D( target : Int, level : Int, internalformat : Int, format : Int, type : Int, video : js.html.VideoElement ) : Void;
  449. function texParameterf( target : Int, pname : Int, param : Float ) : Void;
  450. function texParameteri( target : Int, pname : Int, param : Int ) : Void;
  451. /** @throws DOMError */
  452. @:overload( function( target : Int, level : Int, xoffset : Int, yoffset : Int, width : Int, height : Int, format : Int, type : Int, pixels : js.html.ArrayBufferView ) : Void {} )
  453. @:overload( function( target : Int, level : Int, xoffset : Int, yoffset : Int, format : Int, type : Int, pixels : js.html.ImageData ) : Void {} )
  454. @:overload( function( target : Int, level : Int, xoffset : Int, yoffset : Int, format : Int, type : Int, image : js.html.ImageElement ) : Void {} )
  455. @:overload( function( target : Int, level : Int, xoffset : Int, yoffset : Int, format : Int, type : Int, canvas : js.html.CanvasElement ) : Void {} )
  456. function texSubImage2D( target : Int, level : Int, xoffset : Int, yoffset : Int, format : Int, type : Int, video : js.html.VideoElement ) : Void;
  457. function uniform1f( location : UniformLocation, x : Float ) : Void;
  458. @:overload( function( location : UniformLocation, v : js.html.Float32Array ) : Void {} )
  459. function uniform1fv( location : UniformLocation, v : Array<Float> ) : Void;
  460. function uniform1i( location : UniformLocation, x : Int ) : Void;
  461. @:overload( function( location : UniformLocation, v : js.html.Int32Array ) : Void {} )
  462. function uniform1iv( location : UniformLocation, v : Array<Int> ) : Void;
  463. function uniform2f( location : UniformLocation, x : Float, y : Float ) : Void;
  464. @:overload( function( location : UniformLocation, v : js.html.Float32Array ) : Void {} )
  465. function uniform2fv( location : UniformLocation, v : Array<Float> ) : Void;
  466. function uniform2i( location : UniformLocation, x : Int, y : Int ) : Void;
  467. @:overload( function( location : UniformLocation, v : js.html.Int32Array ) : Void {} )
  468. function uniform2iv( location : UniformLocation, v : Array<Int> ) : Void;
  469. function uniform3f( location : UniformLocation, x : Float, y : Float, z : Float ) : Void;
  470. @:overload( function( location : UniformLocation, v : js.html.Float32Array ) : Void {} )
  471. function uniform3fv( location : UniformLocation, v : Array<Float> ) : Void;
  472. function uniform3i( location : UniformLocation, x : Int, y : Int, z : Int ) : Void;
  473. @:overload( function( location : UniformLocation, v : js.html.Int32Array ) : Void {} )
  474. function uniform3iv( location : UniformLocation, v : Array<Int> ) : Void;
  475. function uniform4f( location : UniformLocation, x : Float, y : Float, z : Float, w : Float ) : Void;
  476. @:overload( function( location : UniformLocation, v : js.html.Float32Array ) : Void {} )
  477. function uniform4fv( location : UniformLocation, v : Array<Float> ) : Void;
  478. function uniform4i( location : UniformLocation, x : Int, y : Int, z : Int, w : Int ) : Void;
  479. @:overload( function( location : UniformLocation, v : js.html.Int32Array ) : Void {} )
  480. function uniform4iv( location : UniformLocation, v : Array<Int> ) : Void;
  481. @:overload( function( location : UniformLocation, transpose : Bool, value : js.html.Float32Array ) : Void {} )
  482. function uniformMatrix2fv( location : UniformLocation, transpose : Bool, value : Array<Float> ) : Void;
  483. @:overload( function( location : UniformLocation, transpose : Bool, value : js.html.Float32Array ) : Void {} )
  484. function uniformMatrix3fv( location : UniformLocation, transpose : Bool, value : Array<Float> ) : Void;
  485. @:overload( function( location : UniformLocation, transpose : Bool, value : js.html.Float32Array ) : Void {} )
  486. function uniformMatrix4fv( location : UniformLocation, transpose : Bool, value : Array<Float> ) : Void;
  487. function useProgram( program : Program ) : Void;
  488. function validateProgram( program : Program ) : Void;
  489. function vertexAttrib1f( indx : Int, x : Float ) : Void;
  490. @:overload( function( indx : Int, values : js.html.Float32Array ) : Void {} )
  491. function vertexAttrib1fv( indx : Int, values : Array<Float> ) : Void;
  492. function vertexAttrib2f( indx : Int, x : Float, y : Float ) : Void;
  493. @:overload( function( indx : Int, values : js.html.Float32Array ) : Void {} )
  494. function vertexAttrib2fv( indx : Int, values : Array<Float> ) : Void;
  495. function vertexAttrib3f( indx : Int, x : Float, y : Float, z : Float ) : Void;
  496. @:overload( function( indx : Int, values : js.html.Float32Array ) : Void {} )
  497. function vertexAttrib3fv( indx : Int, values : Array<Float> ) : Void;
  498. function vertexAttrib4f( indx : Int, x : Float, y : Float, z : Float, w : Float ) : Void;
  499. @:overload( function( indx : Int, values : js.html.Float32Array ) : Void {} )
  500. function vertexAttrib4fv( indx : Int, values : Array<Float> ) : Void;
  501. function vertexAttribPointer( indx : Int, size : Int, type : Int, normalized : Bool, stride : Int, offset : Int ) : Void;
  502. function viewport( x : Int, y : Int, width : Int, height : Int ) : Void;
  503. }