RenderingContext.hx 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924
  1. /*
  2. * Copyright (C)2005-2013 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, do not edit!
  23. package js.html.webgl;
  24. @:native("WebGLRenderingContext")
  25. extern class RenderingContext extends js.html.CanvasRenderingContext
  26. {
  27. static inline var ACTIVE_ATTRIBUTES : Int = 0x8B89;
  28. static inline var ACTIVE_TEXTURE : Int = 0x84E0;
  29. static inline var ACTIVE_UNIFORMS : Int = 0x8B86;
  30. static inline var ALIASED_LINE_WIDTH_RANGE : Int = 0x846E;
  31. static inline var ALIASED_POINT_SIZE_RANGE : Int = 0x846D;
  32. static inline var ALPHA : Int = 0x1906;
  33. static inline var ALPHA_BITS : Int = 0x0D55;
  34. static inline var ALWAYS : Int = 0x0207;
  35. static inline var ARRAY_BUFFER : Int = 0x8892;
  36. static inline var ARRAY_BUFFER_BINDING : Int = 0x8894;
  37. static inline var ATTACHED_SHADERS : Int = 0x8B85;
  38. static inline var BACK : Int = 0x0405;
  39. static inline var BLEND : Int = 0x0BE2;
  40. static inline var BLEND_COLOR : Int = 0x8005;
  41. static inline var BLEND_DST_ALPHA : Int = 0x80CA;
  42. static inline var BLEND_DST_RGB : Int = 0x80C8;
  43. static inline var BLEND_EQUATION : Int = 0x8009;
  44. static inline var BLEND_EQUATION_ALPHA : Int = 0x883D;
  45. static inline var BLEND_EQUATION_RGB : Int = 0x8009;
  46. static inline var BLEND_SRC_ALPHA : Int = 0x80CB;
  47. static inline var BLEND_SRC_RGB : Int = 0x80C9;
  48. static inline var BLUE_BITS : Int = 0x0D54;
  49. static inline var BOOL : Int = 0x8B56;
  50. static inline var BOOL_VEC2 : Int = 0x8B57;
  51. static inline var BOOL_VEC3 : Int = 0x8B58;
  52. static inline var BOOL_VEC4 : Int = 0x8B59;
  53. static inline var BROWSER_DEFAULT_WEBGL : Int = 0x9244;
  54. static inline var BUFFER_SIZE : Int = 0x8764;
  55. static inline var BUFFER_USAGE : Int = 0x8765;
  56. static inline var BYTE : Int = 0x1400;
  57. static inline var CCW : Int = 0x0901;
  58. static inline var CLAMP_TO_EDGE : Int = 0x812F;
  59. static inline var COLOR_ATTACHMENT0 : Int = 0x8CE0;
  60. static inline var COLOR_BUFFER_BIT : Int = 0x00004000;
  61. static inline var COLOR_CLEAR_VALUE : Int = 0x0C22;
  62. static inline var COLOR_WRITEMASK : Int = 0x0C23;
  63. static inline var COMPILE_STATUS : Int = 0x8B81;
  64. static inline var COMPRESSED_TEXTURE_FORMATS : Int = 0x86A3;
  65. static inline var CONSTANT_ALPHA : Int = 0x8003;
  66. static inline var CONSTANT_COLOR : Int = 0x8001;
  67. static inline var CONTEXT_LOST_WEBGL : Int = 0x9242;
  68. static inline var CULL_FACE : Int = 0x0B44;
  69. static inline var CULL_FACE_MODE : Int = 0x0B45;
  70. static inline var CURRENT_PROGRAM : Int = 0x8B8D;
  71. static inline var CURRENT_VERTEX_ATTRIB : Int = 0x8626;
  72. static inline var CW : Int = 0x0900;
  73. static inline var DECR : Int = 0x1E03;
  74. static inline var DECR_WRAP : Int = 0x8508;
  75. static inline var DELETE_STATUS : Int = 0x8B80;
  76. static inline var DEPTH_ATTACHMENT : Int = 0x8D00;
  77. static inline var DEPTH_BITS : Int = 0x0D56;
  78. static inline var DEPTH_BUFFER_BIT : Int = 0x00000100;
  79. static inline var DEPTH_CLEAR_VALUE : Int = 0x0B73;
  80. static inline var DEPTH_COMPONENT : Int = 0x1902;
  81. static inline var DEPTH_COMPONENT16 : Int = 0x81A5;
  82. static inline var DEPTH_FUNC : Int = 0x0B74;
  83. static inline var DEPTH_RANGE : Int = 0x0B70;
  84. static inline var DEPTH_STENCIL : Int = 0x84F9;
  85. static inline var DEPTH_STENCIL_ATTACHMENT : Int = 0x821A;
  86. static inline var DEPTH_TEST : Int = 0x0B71;
  87. static inline var DEPTH_WRITEMASK : Int = 0x0B72;
  88. static inline var DITHER : Int = 0x0BD0;
  89. static inline var DONT_CARE : Int = 0x1100;
  90. static inline var DST_ALPHA : Int = 0x0304;
  91. static inline var DST_COLOR : Int = 0x0306;
  92. static inline var DYNAMIC_DRAW : Int = 0x88E8;
  93. static inline var ELEMENT_ARRAY_BUFFER : Int = 0x8893;
  94. static inline var ELEMENT_ARRAY_BUFFER_BINDING : Int = 0x8895;
  95. static inline var EQUAL : Int = 0x0202;
  96. static inline var FASTEST : Int = 0x1101;
  97. static inline var FLOAT : Int = 0x1406;
  98. static inline var FLOAT_MAT2 : Int = 0x8B5A;
  99. static inline var FLOAT_MAT3 : Int = 0x8B5B;
  100. static inline var FLOAT_MAT4 : Int = 0x8B5C;
  101. static inline var FLOAT_VEC2 : Int = 0x8B50;
  102. static inline var FLOAT_VEC3 : Int = 0x8B51;
  103. static inline var FLOAT_VEC4 : Int = 0x8B52;
  104. static inline var FRAGMENT_SHADER : Int = 0x8B30;
  105. static inline var FRAMEBUFFER : Int = 0x8D40;
  106. static inline var FRAMEBUFFER_ATTACHMENT_OBJECT_NAME : Int = 0x8CD1;
  107. static inline var FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE : Int = 0x8CD0;
  108. static inline var FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE : Int = 0x8CD3;
  109. static inline var FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL : Int = 0x8CD2;
  110. static inline var FRAMEBUFFER_BINDING : Int = 0x8CA6;
  111. static inline var FRAMEBUFFER_COMPLETE : Int = 0x8CD5;
  112. static inline var FRAMEBUFFER_INCOMPLETE_ATTACHMENT : Int = 0x8CD6;
  113. static inline var FRAMEBUFFER_INCOMPLETE_DIMENSIONS : Int = 0x8CD9;
  114. static inline var FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT : Int = 0x8CD7;
  115. static inline var FRAMEBUFFER_UNSUPPORTED : Int = 0x8CDD;
  116. static inline var FRONT : Int = 0x0404;
  117. static inline var FRONT_AND_BACK : Int = 0x0408;
  118. static inline var FRONT_FACE : Int = 0x0B46;
  119. static inline var FUNC_ADD : Int = 0x8006;
  120. static inline var FUNC_REVERSE_SUBTRACT : Int = 0x800B;
  121. static inline var FUNC_SUBTRACT : Int = 0x800A;
  122. static inline var GENERATE_MIPMAP_HINT : Int = 0x8192;
  123. static inline var GEQUAL : Int = 0x0206;
  124. static inline var GREATER : Int = 0x0204;
  125. static inline var GREEN_BITS : Int = 0x0D53;
  126. static inline var HIGH_FLOAT : Int = 0x8DF2;
  127. static inline var HIGH_INT : Int = 0x8DF5;
  128. static inline var INCR : Int = 0x1E02;
  129. static inline var INCR_WRAP : Int = 0x8507;
  130. static inline var INT : Int = 0x1404;
  131. static inline var INT_VEC2 : Int = 0x8B53;
  132. static inline var INT_VEC3 : Int = 0x8B54;
  133. static inline var INT_VEC4 : Int = 0x8B55;
  134. static inline var INVALID_ENUM : Int = 0x0500;
  135. static inline var INVALID_FRAMEBUFFER_OPERATION : Int = 0x0506;
  136. static inline var INVALID_OPERATION : Int = 0x0502;
  137. static inline var INVALID_VALUE : Int = 0x0501;
  138. static inline var INVERT : Int = 0x150A;
  139. static inline var KEEP : Int = 0x1E00;
  140. static inline var LEQUAL : Int = 0x0203;
  141. static inline var LESS : Int = 0x0201;
  142. static inline var LINEAR : Int = 0x2601;
  143. static inline var LINEAR_MIPMAP_LINEAR : Int = 0x2703;
  144. static inline var LINEAR_MIPMAP_NEAREST : Int = 0x2701;
  145. static inline var LINES : Int = 0x0001;
  146. static inline var LINE_LOOP : Int = 0x0002;
  147. static inline var LINE_STRIP : Int = 0x0003;
  148. static inline var LINE_WIDTH : Int = 0x0B21;
  149. static inline var LINK_STATUS : Int = 0x8B82;
  150. static inline var LOW_FLOAT : Int = 0x8DF0;
  151. static inline var LOW_INT : Int = 0x8DF3;
  152. static inline var LUMINANCE : Int = 0x1909;
  153. static inline var LUMINANCE_ALPHA : Int = 0x190A;
  154. static inline var MAX_COMBINED_TEXTURE_IMAGE_UNITS : Int = 0x8B4D;
  155. static inline var MAX_CUBE_MAP_TEXTURE_SIZE : Int = 0x851C;
  156. static inline var MAX_FRAGMENT_UNIFORM_VECTORS : Int = 0x8DFD;
  157. static inline var MAX_RENDERBUFFER_SIZE : Int = 0x84E8;
  158. static inline var MAX_TEXTURE_IMAGE_UNITS : Int = 0x8872;
  159. static inline var MAX_TEXTURE_SIZE : Int = 0x0D33;
  160. static inline var MAX_VARYING_VECTORS : Int = 0x8DFC;
  161. static inline var MAX_VERTEX_ATTRIBS : Int = 0x8869;
  162. static inline var MAX_VERTEX_TEXTURE_IMAGE_UNITS : Int = 0x8B4C;
  163. static inline var MAX_VERTEX_UNIFORM_VECTORS : Int = 0x8DFB;
  164. static inline var MAX_VIEWPORT_DIMS : Int = 0x0D3A;
  165. static inline var MEDIUM_FLOAT : Int = 0x8DF1;
  166. static inline var MEDIUM_INT : Int = 0x8DF4;
  167. static inline var MIRRORED_REPEAT : Int = 0x8370;
  168. static inline var NEAREST : Int = 0x2600;
  169. static inline var NEAREST_MIPMAP_LINEAR : Int = 0x2702;
  170. static inline var NEAREST_MIPMAP_NEAREST : Int = 0x2700;
  171. static inline var NEVER : Int = 0x0200;
  172. static inline var NICEST : Int = 0x1102;
  173. static inline var NONE : Int = 0;
  174. static inline var NOTEQUAL : Int = 0x0205;
  175. static inline var NO_ERROR : Int = 0;
  176. static inline var ONE : Int = 1;
  177. static inline var ONE_MINUS_CONSTANT_ALPHA : Int = 0x8004;
  178. static inline var ONE_MINUS_CONSTANT_COLOR : Int = 0x8002;
  179. static inline var ONE_MINUS_DST_ALPHA : Int = 0x0305;
  180. static inline var ONE_MINUS_DST_COLOR : Int = 0x0307;
  181. static inline var ONE_MINUS_SRC_ALPHA : Int = 0x0303;
  182. static inline var ONE_MINUS_SRC_COLOR : Int = 0x0301;
  183. static inline var OUT_OF_MEMORY : Int = 0x0505;
  184. static inline var PACK_ALIGNMENT : Int = 0x0D05;
  185. static inline var POINTS : Int = 0x0000;
  186. static inline var POLYGON_OFFSET_FACTOR : Int = 0x8038;
  187. static inline var POLYGON_OFFSET_FILL : Int = 0x8037;
  188. static inline var POLYGON_OFFSET_UNITS : Int = 0x2A00;
  189. static inline var RED_BITS : Int = 0x0D52;
  190. static inline var RENDERBUFFER : Int = 0x8D41;
  191. static inline var RENDERBUFFER_ALPHA_SIZE : Int = 0x8D53;
  192. static inline var RENDERBUFFER_BINDING : Int = 0x8CA7;
  193. static inline var RENDERBUFFER_BLUE_SIZE : Int = 0x8D52;
  194. static inline var RENDERBUFFER_DEPTH_SIZE : Int = 0x8D54;
  195. static inline var RENDERBUFFER_GREEN_SIZE : Int = 0x8D51;
  196. static inline var RENDERBUFFER_HEIGHT : Int = 0x8D43;
  197. static inline var RENDERBUFFER_INTERNAL_FORMAT : Int = 0x8D44;
  198. static inline var RENDERBUFFER_RED_SIZE : Int = 0x8D50;
  199. static inline var RENDERBUFFER_STENCIL_SIZE : Int = 0x8D55;
  200. static inline var RENDERBUFFER_WIDTH : Int = 0x8D42;
  201. static inline var RENDERER : Int = 0x1F01;
  202. static inline var REPEAT : Int = 0x2901;
  203. static inline var REPLACE : Int = 0x1E01;
  204. static inline var RGB : Int = 0x1907;
  205. static inline var RGB565 : Int = 0x8D62;
  206. static inline var RGB5_A1 : Int = 0x8057;
  207. static inline var RGBA : Int = 0x1908;
  208. static inline var RGBA4 : Int = 0x8056;
  209. static inline var SAMPLER_2D : Int = 0x8B5E;
  210. static inline var SAMPLER_CUBE : Int = 0x8B60;
  211. static inline var SAMPLES : Int = 0x80A9;
  212. static inline var SAMPLE_ALPHA_TO_COVERAGE : Int = 0x809E;
  213. static inline var SAMPLE_BUFFERS : Int = 0x80A8;
  214. static inline var SAMPLE_COVERAGE : Int = 0x80A0;
  215. static inline var SAMPLE_COVERAGE_INVERT : Int = 0x80AB;
  216. static inline var SAMPLE_COVERAGE_VALUE : Int = 0x80AA;
  217. static inline var SCISSOR_BOX : Int = 0x0C10;
  218. static inline var SCISSOR_TEST : Int = 0x0C11;
  219. static inline var SHADER_TYPE : Int = 0x8B4F;
  220. static inline var SHADING_LANGUAGE_VERSION : Int = 0x8B8C;
  221. static inline var SHORT : Int = 0x1402;
  222. static inline var SRC_ALPHA : Int = 0x0302;
  223. static inline var SRC_ALPHA_SATURATE : Int = 0x0308;
  224. static inline var SRC_COLOR : Int = 0x0300;
  225. static inline var STATIC_DRAW : Int = 0x88E4;
  226. static inline var STENCIL_ATTACHMENT : Int = 0x8D20;
  227. static inline var STENCIL_BACK_FAIL : Int = 0x8801;
  228. static inline var STENCIL_BACK_FUNC : Int = 0x8800;
  229. static inline var STENCIL_BACK_PASS_DEPTH_FAIL : Int = 0x8802;
  230. static inline var STENCIL_BACK_PASS_DEPTH_PASS : Int = 0x8803;
  231. static inline var STENCIL_BACK_REF : Int = 0x8CA3;
  232. static inline var STENCIL_BACK_VALUE_MASK : Int = 0x8CA4;
  233. static inline var STENCIL_BACK_WRITEMASK : Int = 0x8CA5;
  234. static inline var STENCIL_BITS : Int = 0x0D57;
  235. static inline var STENCIL_BUFFER_BIT : Int = 0x00000400;
  236. static inline var STENCIL_CLEAR_VALUE : Int = 0x0B91;
  237. static inline var STENCIL_FAIL : Int = 0x0B94;
  238. static inline var STENCIL_FUNC : Int = 0x0B92;
  239. static inline var STENCIL_INDEX : Int = 0x1901;
  240. static inline var STENCIL_INDEX8 : Int = 0x8D48;
  241. static inline var STENCIL_PASS_DEPTH_FAIL : Int = 0x0B95;
  242. static inline var STENCIL_PASS_DEPTH_PASS : Int = 0x0B96;
  243. static inline var STENCIL_REF : Int = 0x0B97;
  244. static inline var STENCIL_TEST : Int = 0x0B90;
  245. static inline var STENCIL_VALUE_MASK : Int = 0x0B93;
  246. static inline var STENCIL_WRITEMASK : Int = 0x0B98;
  247. static inline var STREAM_DRAW : Int = 0x88E0;
  248. static inline var SUBPIXEL_BITS : Int = 0x0D50;
  249. static inline var TEXTURE : Int = 0x1702;
  250. static inline var TEXTURE0 : Int = 0x84C0;
  251. static inline var TEXTURE1 : Int = 0x84C1;
  252. static inline var TEXTURE10 : Int = 0x84CA;
  253. static inline var TEXTURE11 : Int = 0x84CB;
  254. static inline var TEXTURE12 : Int = 0x84CC;
  255. static inline var TEXTURE13 : Int = 0x84CD;
  256. static inline var TEXTURE14 : Int = 0x84CE;
  257. static inline var TEXTURE15 : Int = 0x84CF;
  258. static inline var TEXTURE16 : Int = 0x84D0;
  259. static inline var TEXTURE17 : Int = 0x84D1;
  260. static inline var TEXTURE18 : Int = 0x84D2;
  261. static inline var TEXTURE19 : Int = 0x84D3;
  262. static inline var TEXTURE2 : Int = 0x84C2;
  263. static inline var TEXTURE20 : Int = 0x84D4;
  264. static inline var TEXTURE21 : Int = 0x84D5;
  265. static inline var TEXTURE22 : Int = 0x84D6;
  266. static inline var TEXTURE23 : Int = 0x84D7;
  267. static inline var TEXTURE24 : Int = 0x84D8;
  268. static inline var TEXTURE25 : Int = 0x84D9;
  269. static inline var TEXTURE26 : Int = 0x84DA;
  270. static inline var TEXTURE27 : Int = 0x84DB;
  271. static inline var TEXTURE28 : Int = 0x84DC;
  272. static inline var TEXTURE29 : Int = 0x84DD;
  273. static inline var TEXTURE3 : Int = 0x84C3;
  274. static inline var TEXTURE30 : Int = 0x84DE;
  275. static inline var TEXTURE31 : Int = 0x84DF;
  276. static inline var TEXTURE4 : Int = 0x84C4;
  277. static inline var TEXTURE5 : Int = 0x84C5;
  278. static inline var TEXTURE6 : Int = 0x84C6;
  279. static inline var TEXTURE7 : Int = 0x84C7;
  280. static inline var TEXTURE8 : Int = 0x84C8;
  281. static inline var TEXTURE9 : Int = 0x84C9;
  282. static inline var TEXTURE_2D : Int = 0x0DE1;
  283. static inline var TEXTURE_BINDING_2D : Int = 0x8069;
  284. static inline var TEXTURE_BINDING_CUBE_MAP : Int = 0x8514;
  285. static inline var TEXTURE_CUBE_MAP : Int = 0x8513;
  286. static inline var TEXTURE_CUBE_MAP_NEGATIVE_X : Int = 0x8516;
  287. static inline var TEXTURE_CUBE_MAP_NEGATIVE_Y : Int = 0x8518;
  288. static inline var TEXTURE_CUBE_MAP_NEGATIVE_Z : Int = 0x851A;
  289. static inline var TEXTURE_CUBE_MAP_POSITIVE_X : Int = 0x8515;
  290. static inline var TEXTURE_CUBE_MAP_POSITIVE_Y : Int = 0x8517;
  291. static inline var TEXTURE_CUBE_MAP_POSITIVE_Z : Int = 0x8519;
  292. static inline var TEXTURE_MAG_FILTER : Int = 0x2800;
  293. static inline var TEXTURE_MIN_FILTER : Int = 0x2801;
  294. static inline var TEXTURE_WRAP_S : Int = 0x2802;
  295. static inline var TEXTURE_WRAP_T : Int = 0x2803;
  296. static inline var TRIANGLES : Int = 0x0004;
  297. static inline var TRIANGLE_FAN : Int = 0x0006;
  298. static inline var TRIANGLE_STRIP : Int = 0x0005;
  299. static inline var UNPACK_ALIGNMENT : Int = 0x0CF5;
  300. static inline var UNPACK_COLORSPACE_CONVERSION_WEBGL : Int = 0x9243;
  301. static inline var UNPACK_FLIP_Y_WEBGL : Int = 0x9240;
  302. static inline var UNPACK_PREMULTIPLY_ALPHA_WEBGL : Int = 0x9241;
  303. static inline var UNSIGNED_BYTE : Int = 0x1401;
  304. static inline var UNSIGNED_INT : Int = 0x1405;
  305. static inline var UNSIGNED_SHORT : Int = 0x1403;
  306. static inline var UNSIGNED_SHORT_4_4_4_4 : Int = 0x8033;
  307. static inline var UNSIGNED_SHORT_5_5_5_1 : Int = 0x8034;
  308. static inline var UNSIGNED_SHORT_5_6_5 : Int = 0x8363;
  309. static inline var VALIDATE_STATUS : Int = 0x8B83;
  310. static inline var VENDOR : Int = 0x1F00;
  311. static inline var VERSION : Int = 0x1F02;
  312. static inline var VERTEX_ATTRIB_ARRAY_BUFFER_BINDING : Int = 0x889F;
  313. static inline var VERTEX_ATTRIB_ARRAY_ENABLED : Int = 0x8622;
  314. static inline var VERTEX_ATTRIB_ARRAY_NORMALIZED : Int = 0x886A;
  315. static inline var VERTEX_ATTRIB_ARRAY_POINTER : Int = 0x8645;
  316. static inline var VERTEX_ATTRIB_ARRAY_SIZE : Int = 0x8623;
  317. static inline var VERTEX_ATTRIB_ARRAY_STRIDE : Int = 0x8624;
  318. static inline var VERTEX_ATTRIB_ARRAY_TYPE : Int = 0x8625;
  319. static inline var VERTEX_SHADER : Int = 0x8B31;
  320. static inline var VIEWPORT : Int = 0x0BA2;
  321. static inline var ZERO : Int = 0;
  322. var drawingBufferHeight(default,null) : Int;
  323. var drawingBufferWidth(default,null) : Int;
  324. function activeTexture( texture : Int ) : Void;
  325. function attachShader( program : Program, shader : Shader ) : Void;
  326. function bindAttribLocation( program : Program, index : Int, name : String ) : Void;
  327. function bindBuffer( target : Int, buffer : Buffer ) : Void;
  328. function bindFramebuffer( target : Int, framebuffer : Framebuffer ) : Void;
  329. function bindRenderbuffer( target : Int, renderbuffer : Renderbuffer ) : Void;
  330. function bindTexture( target : Int, texture : Texture ) : Void;
  331. function blendColor( red : Float, green : Float, blue : Float, alpha : Float ) : Void;
  332. function blendEquation( mode : Int ) : Void;
  333. function blendEquationSeparate( modeRGB : Int, modeAlpha : Int ) : Void;
  334. function blendFunc( sfactor : Int, dfactor : Int ) : Void;
  335. function blendFuncSeparate( srcRGB : Int, dstRGB : Int, srcAlpha : Int, dstAlpha : Int ) : Void;
  336. /** Throws DOMException. */
  337. @:overload( function( target : Int, data : js.html.ArrayBuffer, usage : Int ) :Void {} )
  338. @:overload( function( target : Int, data : js.html.ArrayBufferView, usage : Int ) :Void {} )
  339. function bufferData( target : Int, size : Int, usage : Int ) : Void;
  340. /** Throws DOMException. */
  341. @:overload( function( target : Int, offset : Int, data : js.html.ArrayBuffer ) :Void {} )
  342. function bufferSubData( target : Int, offset : Int, data : js.html.ArrayBufferView ) : Void;
  343. function checkFramebufferStatus( target : Int ) : Int;
  344. function clear( mask : Int ) : Void;
  345. function clearColor( red : Float, green : Float, blue : Float, alpha : Float ) : Void;
  346. function clearDepth( depth : Float ) : Void;
  347. function clearStencil( s : Int ) : Void;
  348. function colorMask( red : Bool, green : Bool, blue : Bool, alpha : Bool ) : Void;
  349. function compileShader( shader : Shader ) : Void;
  350. function compressedTexImage2D( target : Int, level : Int, internalformat : Int, width : Int, height : Int, border : Int, data : js.html.ArrayBufferView ) : Void;
  351. function compressedTexSubImage2D( target : Int, level : Int, xoffset : Int, yoffset : Int, width : Int, height : Int, format : Int, data : js.html.ArrayBufferView ) : Void;
  352. function copyTexImage2D( target : Int, level : Int, internalformat : Int, x : Int, y : Int, width : Int, height : Int, border : Int ) : Void;
  353. function copyTexSubImage2D( target : Int, level : Int, xoffset : Int, yoffset : Int, x : Int, y : Int, width : Int, height : Int ) : Void;
  354. function createBuffer() : Buffer;
  355. function createFramebuffer() : Framebuffer;
  356. function createProgram() : Program;
  357. function createRenderbuffer() : Renderbuffer;
  358. function createShader( type : Int ) : Shader;
  359. function createTexture() : Texture;
  360. function cullFace( mode : Int ) : Void;
  361. function deleteBuffer( buffer : Buffer ) : Void;
  362. function deleteFramebuffer( framebuffer : Framebuffer ) : Void;
  363. function deleteProgram( program : Program ) : Void;
  364. function deleteRenderbuffer( renderbuffer : Renderbuffer ) : Void;
  365. function deleteShader( shader : Shader ) : Void;
  366. function deleteTexture( texture : Texture ) : Void;
  367. function depthFunc( func : Int ) : Void;
  368. function depthMask( flag : Bool ) : Void;
  369. function depthRange( zNear : Float, zFar : Float ) : Void;
  370. function detachShader( program : Program, shader : Shader ) : Void;
  371. function disable( cap : Int ) : Void;
  372. function disableVertexAttribArray( index : Int ) : Void;
  373. function drawArrays( mode : Int, first : Int, count : Int ) : Void;
  374. function drawElements( mode : Int, count : Int, type : Int, offset : Int ) : Void;
  375. function enable( cap : Int ) : Void;
  376. function enableVertexAttribArray( index : Int ) : Void;
  377. function finish() : Void;
  378. function flush() : Void;
  379. function framebufferRenderbuffer( target : Int, attachment : Int, renderbuffertarget : Int, renderbuffer : Renderbuffer ) : Void;
  380. function framebufferTexture2D( target : Int, attachment : Int, textarget : Int, texture : Texture, level : Int ) : Void;
  381. function frontFace( mode : Int ) : Void;
  382. function generateMipmap( target : Int ) : Void;
  383. function getActiveAttrib( program : Program, index : Int ) : ActiveInfo;
  384. function getActiveUniform( program : Program, index : Int ) : ActiveInfo;
  385. /** Throws DOMException. */
  386. @:overload( function( program : Program ) :Void {} )
  387. function getAttachedShaders( program : Program ) : Array<js.html.webgl.Shader>;
  388. function getAttribLocation( program : Program, name : String ) : Int;
  389. @:overload( function() :Void {} )
  390. function getBufferParameter( target : Int, pname : Int ) : Dynamic;
  391. function getContextAttributes() : ContextAttributes;
  392. function getError() : Int;
  393. function getExtension( name : String ) : Dynamic;
  394. @:overload( function() :Void {} )
  395. function getFramebufferAttachmentParameter( target : Int, attachment : Int, pname : Int ) : Dynamic;
  396. @:overload( function() :Void {} )
  397. function getParameter( pname : Int ) : Dynamic;
  398. function getProgramInfoLog( program : Program ) : String;
  399. @:overload( function() :Void {} )
  400. function getProgramParameter( program : Program, pname : Int ) : Dynamic;
  401. @:overload( function() :Void {} )
  402. function getRenderbufferParameter( target : Int, pname : Int ) : Dynamic;
  403. function getShaderInfoLog( shader : Shader ) : String;
  404. /** Throws DOMException. */
  405. @:overload( function() :Void {} )
  406. function getShaderParameter( shader : Shader, pname : Int ) : Dynamic;
  407. function getShaderPrecisionFormat( shadertype : Int, precisiontype : Int ) : ShaderPrecisionFormat;
  408. function getShaderSource( shader : Shader ) : String;
  409. function getSupportedExtensions() : Array<String>;
  410. @:overload( function() :Void {} )
  411. function getTexParameter( target : Int, pname : Int ) : Dynamic;
  412. @:overload( function() :Void {} )
  413. function getUniform( program : Program, location : UniformLocation ) : Dynamic;
  414. function getUniformLocation( program : Program, name : String ) : UniformLocation;
  415. @:overload( function() :Void {} )
  416. function getVertexAttrib( index : Int, pname : Int ) : Dynamic;
  417. function getVertexAttribOffset( index : Int, pname : Int ) : Int;
  418. function hint( target : Int, mode : Int ) : Void;
  419. function isBuffer( buffer : Buffer ) : Bool;
  420. function isContextLost() : 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. function readPixels( x : Int, y : Int, width : Int, height : Int, format : Int, type : Int, pixels : js.html.ArrayBufferView ) : Void;
  432. function releaseShaderCompiler() : 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, string : 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 DOMException. */
  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 DOMException. */
  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. function uniform1fv( location : UniformLocation, v : js.html.Float32Array ) : Void;
  459. function uniform1i( location : UniformLocation, x : Int ) : Void;
  460. function uniform1iv( location : UniformLocation, v : js.html.Int32Array ) : Void;
  461. function uniform2f( location : UniformLocation, x : Float, y : Float ) : Void;
  462. function uniform2fv( location : UniformLocation, v : js.html.Float32Array ) : Void;
  463. function uniform2i( location : UniformLocation, x : Int, y : Int ) : Void;
  464. function uniform2iv( location : UniformLocation, v : js.html.Int32Array ) : Void;
  465. function uniform3f( location : UniformLocation, x : Float, y : Float, z : Float ) : Void;
  466. function uniform3fv( location : UniformLocation, v : js.html.Float32Array ) : Void;
  467. function uniform3i( location : UniformLocation, x : Int, y : Int, z : Int ) : Void;
  468. function uniform3iv( location : UniformLocation, v : js.html.Int32Array ) : Void;
  469. function uniform4f( location : UniformLocation, x : Float, y : Float, z : Float, w : Float ) : Void;
  470. function uniform4fv( location : UniformLocation, v : js.html.Float32Array ) : Void;
  471. function uniform4i( location : UniformLocation, x : Int, y : Int, z : Int, w : Int ) : Void;
  472. function uniform4iv( location : UniformLocation, v : js.html.Int32Array ) : Void;
  473. function uniformMatrix2fv( location : UniformLocation, transpose : Bool, array : js.html.Float32Array ) : Void;
  474. function uniformMatrix3fv( location : UniformLocation, transpose : Bool, array : js.html.Float32Array ) : Void;
  475. function uniformMatrix4fv( location : UniformLocation, transpose : Bool, array : js.html.Float32Array ) : Void;
  476. function useProgram( program : Program ) : Void;
  477. function validateProgram( program : Program ) : Void;
  478. function vertexAttrib1f( indx : Int, x : Float ) : Void;
  479. function vertexAttrib1fv( indx : Int, values : js.html.Float32Array ) : Void;
  480. function vertexAttrib2f( indx : Int, x : Float, y : Float ) : Void;
  481. function vertexAttrib2fv( indx : Int, values : js.html.Float32Array ) : Void;
  482. function vertexAttrib3f( indx : Int, x : Float, y : Float, z : Float ) : Void;
  483. function vertexAttrib3fv( indx : Int, values : js.html.Float32Array ) : Void;
  484. function vertexAttrib4f( indx : Int, x : Float, y : Float, z : Float, w : Float ) : Void;
  485. function vertexAttrib4fv( indx : Int, values : js.html.Float32Array ) : Void;
  486. function vertexAttribPointer( indx : Int, size : Int, type : Int, normalized : Bool, stride : Int, offset : Int ) : Void;
  487. function viewport( x : Int, y : Int, width : Int, height : Int ) : Void;
  488. }