1 module libwasm.bindings.WebGLRenderingContext; 2 3 import libwasm.types; 4 5 import memutils.ct: tuple; 6 import libwasm.bindings.HTMLCanvasElement; 7 import libwasm.bindings.HTMLImageElement; 8 import libwasm.bindings.HTMLVideoElement; 9 import libwasm.bindings.ImageBitmap; 10 import libwasm.bindings.ImageData; 11 import libwasm.bindings.OffscreenCanvas; 12 13 @safe: 14 nothrow: 15 16 struct ANGLE_instanced_arrays { 17 nothrow: 18 JsHandle handle; 19 alias handle this; 20 this(Handle h) { 21 this.handle = JsHandle(h); 22 } 23 enum uint VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE = 0x88FE; 24 void drawArraysInstancedANGLE()(uint mode, int first, int count, int primcount) { 25 Serialize_Object_VarArgCall!void(this.handle, "drawArraysInstancedANGLE", "uint;int;int;int", tuple(mode, first, count, primcount)); 26 } 27 void drawElementsInstancedANGLE()(uint mode, int count, uint type, int offset, int primcount) { 28 Serialize_Object_VarArgCall!void(this.handle, "drawElementsInstancedANGLE", "uint;int;uint;int;int", tuple(mode, count, type, offset, primcount)); 29 } 30 void vertexAttribDivisorANGLE()(uint index, uint divisor) { 31 Serialize_Object_VarArgCall!void(this.handle, "vertexAttribDivisorANGLE", "uint;uint", tuple(index, divisor)); 32 } 33 } 34 struct EXT_blend_minmax { 35 nothrow: 36 JsHandle handle; 37 alias handle this; 38 this(Handle h) { 39 this.handle = JsHandle(h); 40 } 41 enum uint MIN_EXT = 0x8007; 42 enum uint MAX_EXT = 0x8008; 43 } 44 struct EXT_color_buffer_half_float { 45 nothrow: 46 JsHandle handle; 47 alias handle this; 48 this(Handle h) { 49 this.handle = JsHandle(h); 50 } 51 enum uint RGBA16F_EXT = 0x881A; 52 enum uint RGB16F_EXT = 0x881B; 53 enum uint FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT = 0x8211; 54 enum uint UNSIGNED_NORMALIZED_EXT = 0x8C17; 55 } 56 struct EXT_disjoint_timer_query { 57 nothrow: 58 JsHandle handle; 59 alias handle this; 60 this(Handle h) { 61 this.handle = JsHandle(h); 62 } 63 enum uint QUERY_COUNTER_BITS_EXT = 0x8864; 64 enum uint CURRENT_QUERY_EXT = 0x8865; 65 enum uint QUERY_RESULT_EXT = 0x8866; 66 enum uint QUERY_RESULT_AVAILABLE_EXT = 0x8867; 67 enum uint TIME_ELAPSED_EXT = 0x88BF; 68 enum uint TIMESTAMP_EXT = 0x8E28; 69 enum uint GPU_DISJOINT_EXT = 0x8FBB; 70 auto createQueryEXT()() { 71 return recastOpt!(WebGLQuery)(Object_Getter__OptionalHandle(this.handle, "createQueryEXT")); 72 } 73 void deleteQueryEXT(T0)(scope auto ref Optional!(T0) query) if (isTOrPointer!(T0, WebGLQuery)) { 74 Serialize_Object_VarArgCall!void(this.handle, "deleteQueryEXT", "Optional!Handle", tuple(!query.empty, cast(Handle)query.front.handle)); 75 } 76 bool isQueryEXT(T0)(scope auto ref Optional!(T0) query) if (isTOrPointer!(T0, WebGLQuery)) { 77 return Serialize_Object_VarArgCall!bool(this.handle, "isQueryEXT", "Optional!Handle", tuple(!query.empty, cast(Handle)query.front.handle)); 78 } 79 void beginQueryEXT()(uint target, scope ref WebGLQuery query) { 80 Serialize_Object_VarArgCall!void(this.handle, "beginQueryEXT", "uint;Handle", tuple(target, cast(Handle)query.handle)); 81 } 82 void endQueryEXT()(uint target) { 83 Object_Call_uint__void(this.handle, "endQueryEXT", target); 84 } 85 void queryCounterEXT()(scope ref WebGLQuery query, uint target) { 86 Serialize_Object_VarArgCall!void(this.handle, "queryCounterEXT", "Handle;uint", tuple(cast(Handle)query.handle, target)); 87 } 88 auto getQueryEXT()(uint target, uint pname) { 89 return Any(Serialize_Object_VarArgCall!Handle(this.handle, "getQueryEXT", "uint;uint", tuple(target, pname))); 90 } 91 auto getQueryObjectEXT()(scope ref WebGLQuery query, uint pname) { 92 return Any(Serialize_Object_VarArgCall!Handle(this.handle, "getQueryObjectEXT", "Handle;uint", tuple(cast(Handle)query.handle, pname))); 93 } 94 } 95 struct EXT_float_blend { 96 nothrow: 97 JsHandle handle; 98 alias handle this; 99 this(Handle h) { 100 this.handle = JsHandle(h); 101 } 102 } 103 struct EXT_frag_depth { 104 nothrow: 105 JsHandle handle; 106 alias handle this; 107 this(Handle h) { 108 this.handle = JsHandle(h); 109 } 110 } 111 struct EXT_sRGB { 112 nothrow: 113 JsHandle handle; 114 alias handle this; 115 this(Handle h) { 116 this.handle = JsHandle(h); 117 } 118 enum uint SRGB_EXT = 0x8C40; 119 enum uint SRGB_ALPHA_EXT = 0x8C42; 120 enum uint SRGB8_ALPHA8_EXT = 0x8C43; 121 enum uint FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT = 0x8210; 122 } 123 struct EXT_shader_texture_lod { 124 nothrow: 125 JsHandle handle; 126 alias handle this; 127 this(Handle h) { 128 this.handle = JsHandle(h); 129 } 130 } 131 struct EXT_texture_compression_bptc { 132 nothrow: 133 JsHandle handle; 134 alias handle this; 135 this(Handle h) { 136 this.handle = JsHandle(h); 137 } 138 enum uint COMPRESSED_RGBA_BPTC_UNORM_EXT = 0x8E8C; 139 enum uint COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT = 0x8E8D; 140 enum uint COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT = 0x8E8E; 141 enum uint COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT = 0x8E8F; 142 } 143 struct EXT_texture_compression_rgtc { 144 nothrow: 145 JsHandle handle; 146 alias handle this; 147 this(Handle h) { 148 this.handle = JsHandle(h); 149 } 150 enum uint COMPRESSED_RED_RGTC1_EXT = 0x8DBB; 151 enum uint COMPRESSED_SIGNED_RED_RGTC1_EXT = 0x8DBC; 152 enum uint COMPRESSED_RED_GREEN_RGTC2_EXT = 0x8DBD; 153 enum uint COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT = 0x8DBE; 154 } 155 struct EXT_texture_filter_anisotropic { 156 nothrow: 157 JsHandle handle; 158 alias handle this; 159 this(Handle h) { 160 this.handle = JsHandle(h); 161 } 162 enum uint TEXTURE_MAX_ANISOTROPY_EXT = 0x84FE; 163 enum uint MAX_TEXTURE_MAX_ANISOTROPY_EXT = 0x84FF; 164 } 165 alias Float32List = SumType!(Float32Array, Sequence!(float)); 166 alias GLbitfield = uint; 167 alias GLboolean = bool; 168 alias GLbyte = byte; 169 alias GLclampf = float; 170 alias GLenum = uint; 171 alias GLfloat = float; 172 alias GLint = int; 173 alias GLintptr = int; 174 alias GLshort = short; 175 alias GLsizei = int; 176 alias GLsizeiptr = int; 177 alias GLubyte = ubyte; 178 alias GLuint = uint; 179 alias GLuint64EXT = uint; 180 alias GLushort = ushort; 181 alias Int32List = SumType!(Int32Array, Sequence!(int)); 182 struct MOZ_debug { 183 nothrow: 184 JsHandle handle; 185 alias handle this; 186 this(Handle h) { 187 this.handle = JsHandle(h); 188 } 189 enum uint EXTENSIONS = 0x1F03; 190 enum uint WSI_INFO = 0x10000; 191 enum uint UNPACK_REQUIRE_FASTPATH = 0x10001; 192 enum uint DOES_INDEX_VALIDATION = 0x10002; 193 auto getParameter()(uint pname) { 194 return Any(Object_Call_uint__Handle(this.handle, "getParameter", pname)); 195 } 196 } 197 struct OES_element_index_uint { 198 nothrow: 199 JsHandle handle; 200 alias handle this; 201 this(Handle h) { 202 this.handle = JsHandle(h); 203 } 204 } 205 struct OES_fbo_render_mipmap { 206 nothrow: 207 JsHandle handle; 208 alias handle this; 209 this(Handle h) { 210 this.handle = JsHandle(h); 211 } 212 } 213 struct OES_standard_derivatives { 214 nothrow: 215 JsHandle handle; 216 alias handle this; 217 this(Handle h) { 218 this.handle = JsHandle(h); 219 } 220 enum uint FRAGMENT_SHADER_DERIVATIVE_HINT_OES = 0x8B8B; 221 } 222 struct OES_texture_float { 223 nothrow: 224 JsHandle handle; 225 alias handle this; 226 this(Handle h) { 227 this.handle = JsHandle(h); 228 } 229 } 230 struct OES_texture_float_linear { 231 nothrow: 232 JsHandle handle; 233 alias handle this; 234 this(Handle h) { 235 this.handle = JsHandle(h); 236 } 237 } 238 struct OES_texture_half_float { 239 nothrow: 240 JsHandle handle; 241 alias handle this; 242 this(Handle h) { 243 this.handle = JsHandle(h); 244 } 245 enum uint HALF_FLOAT_OES = 0x8D61; 246 } 247 struct OES_texture_half_float_linear { 248 nothrow: 249 JsHandle handle; 250 alias handle this; 251 this(Handle h) { 252 this.handle = JsHandle(h); 253 } 254 } 255 struct OES_vertex_array_object { 256 nothrow: 257 JsHandle handle; 258 alias handle this; 259 this(Handle h) { 260 this.handle = JsHandle(h); 261 } 262 enum uint VERTEX_ARRAY_BINDING_OES = 0x85B5; 263 auto createVertexArrayOES()() { 264 return recastOpt!(WebGLVertexArrayObject)(Object_Getter__OptionalHandle(this.handle, "createVertexArrayOES")); 265 } 266 void deleteVertexArrayOES(T0)(scope auto ref Optional!(T0) arrayObject) if (isTOrPointer!(T0, WebGLVertexArrayObject)) { 267 Serialize_Object_VarArgCall!void(this.handle, "deleteVertexArrayOES", "Optional!Handle", tuple(!arrayObject.empty, cast(Handle)arrayObject.front.handle)); 268 } 269 bool isVertexArrayOES(T0)(scope auto ref Optional!(T0) arrayObject) if (isTOrPointer!(T0, WebGLVertexArrayObject)) { 270 return Serialize_Object_VarArgCall!bool(this.handle, "isVertexArrayOES", "Optional!Handle", tuple(!arrayObject.empty, cast(Handle)arrayObject.front.handle)); 271 } 272 void bindVertexArrayOES(T0)(scope auto ref Optional!(T0) arrayObject) if (isTOrPointer!(T0, WebGLVertexArrayObject)) { 273 Serialize_Object_VarArgCall!void(this.handle, "bindVertexArrayOES", "Optional!Handle", tuple(!arrayObject.empty, cast(Handle)arrayObject.front.handle)); 274 } 275 } 276 struct WEBGL_color_buffer_float { 277 nothrow: 278 JsHandle handle; 279 alias handle this; 280 this(Handle h) { 281 this.handle = JsHandle(h); 282 } 283 enum uint RGBA32F_EXT = 0x8814; 284 enum uint RGB32F_EXT = 0x8815; 285 enum uint FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT = 0x8211; 286 enum uint UNSIGNED_NORMALIZED_EXT = 0x8C17; 287 } 288 struct WEBGL_compressed_texture_astc { 289 nothrow: 290 JsHandle handle; 291 alias handle this; 292 this(Handle h) { 293 this.handle = JsHandle(h); 294 } 295 enum uint COMPRESSED_RGBA_ASTC_4x4_KHR = 0x93B0; 296 enum uint COMPRESSED_RGBA_ASTC_5x4_KHR = 0x93B1; 297 enum uint COMPRESSED_RGBA_ASTC_5x5_KHR = 0x93B2; 298 enum uint COMPRESSED_RGBA_ASTC_6x5_KHR = 0x93B3; 299 enum uint COMPRESSED_RGBA_ASTC_6x6_KHR = 0x93B4; 300 enum uint COMPRESSED_RGBA_ASTC_8x5_KHR = 0x93B5; 301 enum uint COMPRESSED_RGBA_ASTC_8x6_KHR = 0x93B6; 302 enum uint COMPRESSED_RGBA_ASTC_8x8_KHR = 0x93B7; 303 enum uint COMPRESSED_RGBA_ASTC_10x5_KHR = 0x93B8; 304 enum uint COMPRESSED_RGBA_ASTC_10x6_KHR = 0x93B9; 305 enum uint COMPRESSED_RGBA_ASTC_10x8_KHR = 0x93BA; 306 enum uint COMPRESSED_RGBA_ASTC_10x10_KHR = 0x93BB; 307 enum uint COMPRESSED_RGBA_ASTC_12x10_KHR = 0x93BC; 308 enum uint COMPRESSED_RGBA_ASTC_12x12_KHR = 0x93BD; 309 enum uint COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR = 0x93D0; 310 enum uint COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR = 0x93D1; 311 enum uint COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR = 0x93D2; 312 enum uint COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR = 0x93D3; 313 enum uint COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR = 0x93D4; 314 enum uint COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR = 0x93D5; 315 enum uint COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR = 0x93D6; 316 enum uint COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR = 0x93D7; 317 enum uint COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR = 0x93D8; 318 enum uint COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR = 0x93D9; 319 enum uint COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR = 0x93DA; 320 enum uint COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR = 0x93DB; 321 enum uint COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR = 0x93DC; 322 enum uint COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR = 0x93DD; 323 auto getSupportedProfiles()() { 324 return recastOpt!(Sequence!(string))(Object_Getter__OptionalHandle(this.handle, "getSupportedProfiles")); 325 } 326 } 327 struct WEBGL_compressed_texture_etc { 328 nothrow: 329 JsHandle handle; 330 alias handle this; 331 this(Handle h) { 332 this.handle = JsHandle(h); 333 } 334 enum uint COMPRESSED_R11_EAC = 0x9270; 335 enum uint COMPRESSED_SIGNED_R11_EAC = 0x9271; 336 enum uint COMPRESSED_RG11_EAC = 0x9272; 337 enum uint COMPRESSED_SIGNED_RG11_EAC = 0x9273; 338 enum uint COMPRESSED_RGB8_ETC2 = 0x9274; 339 enum uint COMPRESSED_SRGB8_ETC2 = 0x9275; 340 enum uint COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 = 0x9276; 341 enum uint COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 = 0x9277; 342 enum uint COMPRESSED_RGBA8_ETC2_EAC = 0x9278; 343 enum uint COMPRESSED_SRGB8_ALPHA8_ETC2_EAC = 0x9279; 344 } 345 struct WEBGL_compressed_texture_etc1 { 346 nothrow: 347 JsHandle handle; 348 alias handle this; 349 this(Handle h) { 350 this.handle = JsHandle(h); 351 } 352 enum uint COMPRESSED_RGB_ETC1_WEBGL = 0x8D64; 353 } 354 struct WEBGL_compressed_texture_pvrtc { 355 nothrow: 356 JsHandle handle; 357 alias handle this; 358 this(Handle h) { 359 this.handle = JsHandle(h); 360 } 361 enum uint COMPRESSED_RGB_PVRTC_4BPPV1_IMG = 0x8C00; 362 enum uint COMPRESSED_RGB_PVRTC_2BPPV1_IMG = 0x8C01; 363 enum uint COMPRESSED_RGBA_PVRTC_4BPPV1_IMG = 0x8C02; 364 enum uint COMPRESSED_RGBA_PVRTC_2BPPV1_IMG = 0x8C03; 365 } 366 struct WEBGL_compressed_texture_s3tc { 367 nothrow: 368 JsHandle handle; 369 alias handle this; 370 this(Handle h) { 371 this.handle = JsHandle(h); 372 } 373 enum uint COMPRESSED_RGB_S3TC_DXT1_EXT = 0x83F0; 374 enum uint COMPRESSED_RGBA_S3TC_DXT1_EXT = 0x83F1; 375 enum uint COMPRESSED_RGBA_S3TC_DXT3_EXT = 0x83F2; 376 enum uint COMPRESSED_RGBA_S3TC_DXT5_EXT = 0x83F3; 377 } 378 struct WEBGL_compressed_texture_s3tc_srgb { 379 nothrow: 380 JsHandle handle; 381 alias handle this; 382 this(Handle h) { 383 this.handle = JsHandle(h); 384 } 385 enum uint COMPRESSED_SRGB_S3TC_DXT1_EXT = 0x8C4C; 386 enum uint COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT = 0x8C4D; 387 enum uint COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT = 0x8C4E; 388 enum uint COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT = 0x8C4F; 389 } 390 struct WEBGL_debug_renderer_info { 391 nothrow: 392 JsHandle handle; 393 alias handle this; 394 this(Handle h) { 395 this.handle = JsHandle(h); 396 } 397 enum uint UNMASKED_VENDOR_WEBGL = 0x9245; 398 enum uint UNMASKED_RENDERER_WEBGL = 0x9246; 399 } 400 struct WEBGL_debug_shaders { 401 nothrow: 402 JsHandle handle; 403 alias handle this; 404 this(Handle h) { 405 this.handle = JsHandle(h); 406 } 407 string getTranslatedShaderSource()(scope ref WebGLShader shader) { 408 return Serialize_Object_VarArgCall!string(this.handle, "getTranslatedShaderSource", "Handle", tuple(cast(Handle)shader.handle)); 409 } 410 } 411 struct WEBGL_depth_texture { 412 nothrow: 413 JsHandle handle; 414 alias handle this; 415 this(Handle h) { 416 this.handle = JsHandle(h); 417 } 418 enum uint UNSIGNED_INT_24_8_WEBGL = 0x84FA; 419 } 420 struct WEBGL_draw_buffers { 421 nothrow: 422 JsHandle handle; 423 alias handle this; 424 this(Handle h) { 425 this.handle = JsHandle(h); 426 } 427 enum uint COLOR_ATTACHMENT0_WEBGL = 0x8CE0; 428 enum uint COLOR_ATTACHMENT1_WEBGL = 0x8CE1; 429 enum uint COLOR_ATTACHMENT2_WEBGL = 0x8CE2; 430 enum uint COLOR_ATTACHMENT3_WEBGL = 0x8CE3; 431 enum uint COLOR_ATTACHMENT4_WEBGL = 0x8CE4; 432 enum uint COLOR_ATTACHMENT5_WEBGL = 0x8CE5; 433 enum uint COLOR_ATTACHMENT6_WEBGL = 0x8CE6; 434 enum uint COLOR_ATTACHMENT7_WEBGL = 0x8CE7; 435 enum uint COLOR_ATTACHMENT8_WEBGL = 0x8CE8; 436 enum uint COLOR_ATTACHMENT9_WEBGL = 0x8CE9; 437 enum uint COLOR_ATTACHMENT10_WEBGL = 0x8CEA; 438 enum uint COLOR_ATTACHMENT11_WEBGL = 0x8CEB; 439 enum uint COLOR_ATTACHMENT12_WEBGL = 0x8CEC; 440 enum uint COLOR_ATTACHMENT13_WEBGL = 0x8CED; 441 enum uint COLOR_ATTACHMENT14_WEBGL = 0x8CEE; 442 enum uint COLOR_ATTACHMENT15_WEBGL = 0x8CEF; 443 enum uint DRAW_BUFFER0_WEBGL = 0x8825; 444 enum uint DRAW_BUFFER1_WEBGL = 0x8826; 445 enum uint DRAW_BUFFER2_WEBGL = 0x8827; 446 enum uint DRAW_BUFFER3_WEBGL = 0x8828; 447 enum uint DRAW_BUFFER4_WEBGL = 0x8829; 448 enum uint DRAW_BUFFER5_WEBGL = 0x882A; 449 enum uint DRAW_BUFFER6_WEBGL = 0x882B; 450 enum uint DRAW_BUFFER7_WEBGL = 0x882C; 451 enum uint DRAW_BUFFER8_WEBGL = 0x882D; 452 enum uint DRAW_BUFFER9_WEBGL = 0x882E; 453 enum uint DRAW_BUFFER10_WEBGL = 0x882F; 454 enum uint DRAW_BUFFER11_WEBGL = 0x8830; 455 enum uint DRAW_BUFFER12_WEBGL = 0x8831; 456 enum uint DRAW_BUFFER13_WEBGL = 0x8832; 457 enum uint DRAW_BUFFER14_WEBGL = 0x8833; 458 enum uint DRAW_BUFFER15_WEBGL = 0x8834; 459 enum uint MAX_COLOR_ATTACHMENTS_WEBGL = 0x8CDF; 460 enum uint MAX_DRAW_BUFFERS_WEBGL = 0x8824; 461 void drawBuffersWEBGL()(scope ref Sequence!(uint) buffers) { 462 Object_Call_Handle__void(this.handle, "drawBuffersWEBGL", buffers.handle); 463 } 464 } 465 struct WEBGL_lose_context { 466 nothrow: 467 JsHandle handle; 468 alias handle this; 469 this(Handle h) { 470 this.handle = JsHandle(h); 471 } 472 void loseContext()() { 473 Object_Call__void(this.handle, "loseContext"); 474 } 475 void restoreContext()() { 476 Object_Call__void(this.handle, "restoreContext"); 477 } 478 } 479 struct WebGLActiveInfo { 480 nothrow: 481 JsHandle handle; 482 alias handle this; 483 this(Handle h) { 484 this.handle = JsHandle(h); 485 } 486 int size()() { 487 return Object_Getter__int(this.handle, "size"); 488 } 489 uint type()() { 490 return Object_Getter__uint(this.handle, "type"); 491 } 492 string name()() { 493 return Object_Getter__string(this.handle, "name"); 494 } 495 } 496 struct WebGLBuffer { 497 nothrow: 498 JsHandle handle; 499 alias handle this; 500 this(Handle h) { 501 this.handle = JsHandle(h); 502 } 503 } 504 struct WebGLContextAttributes { 505 nothrow: 506 JsHandle handle; 507 alias handle this; 508 this(Handle h) { 509 this.handle = JsHandle(h); 510 } 511 static auto create() { 512 return WebGLContextAttributes(libwasm_add__object()); 513 } 514 void alpha()(bool alpha) { 515 Object_Call_bool__void(this.handle, "alpha", alpha); 516 } 517 bool alpha()() { 518 return Object_Getter__bool(this.handle, "alpha"); 519 } 520 void depth()(bool depth) { 521 Object_Call_bool__void(this.handle, "depth", depth); 522 } 523 bool depth()() { 524 return Object_Getter__bool(this.handle, "depth"); 525 } 526 void stencil()(bool stencil) { 527 Object_Call_bool__void(this.handle, "stencil", stencil); 528 } 529 bool stencil()() { 530 return Object_Getter__bool(this.handle, "stencil"); 531 } 532 void antialias()(bool antialias) { 533 Object_Call_bool__void(this.handle, "antialias", antialias); 534 } 535 bool antialias()() { 536 return Object_Getter__bool(this.handle, "antialias"); 537 } 538 void premultipliedAlpha()(bool premultipliedAlpha) { 539 Object_Call_bool__void(this.handle, "premultipliedAlpha", premultipliedAlpha); 540 } 541 bool premultipliedAlpha()() { 542 return Object_Getter__bool(this.handle, "premultipliedAlpha"); 543 } 544 void preserveDrawingBuffer()(bool preserveDrawingBuffer) { 545 Object_Call_bool__void(this.handle, "preserveDrawingBuffer", preserveDrawingBuffer); 546 } 547 bool preserveDrawingBuffer()() { 548 return Object_Getter__bool(this.handle, "preserveDrawingBuffer"); 549 } 550 void failIfMajorPerformanceCaveat()(bool failIfMajorPerformanceCaveat) { 551 Object_Call_bool__void(this.handle, "failIfMajorPerformanceCaveat", failIfMajorPerformanceCaveat); 552 } 553 bool failIfMajorPerformanceCaveat()() { 554 return Object_Getter__bool(this.handle, "failIfMajorPerformanceCaveat"); 555 } 556 void powerPreference()(WebGLPowerPreference powerPreference) { 557 Object_Call_int__void(this.handle, "powerPreference", powerPreference); 558 } 559 WebGLPowerPreference powerPreference()() { 560 return Object_Getter__int(this.handle, "powerPreference"); 561 } 562 } 563 struct WebGLFramebuffer { 564 nothrow: 565 JsHandle handle; 566 alias handle this; 567 this(Handle h) { 568 this.handle = JsHandle(h); 569 } 570 } 571 enum WebGLPowerPreference { 572 default_, 573 low_power, 574 high_performance 575 } 576 struct WebGLProgram { 577 nothrow: 578 JsHandle handle; 579 alias handle this; 580 this(Handle h) { 581 this.handle = JsHandle(h); 582 } 583 } 584 struct WebGLQuery { 585 nothrow: 586 JsHandle handle; 587 alias handle this; 588 this(Handle h) { 589 this.handle = JsHandle(h); 590 } 591 } 592 struct WebGLRenderbuffer { 593 nothrow: 594 JsHandle handle; 595 alias handle this; 596 this(Handle h) { 597 this.handle = JsHandle(h); 598 } 599 } 600 struct WebGLRenderingContext { 601 nothrow: 602 JsHandle handle; 603 alias handle this; 604 this(Handle h) { 605 this.handle = JsHandle(h); 606 } 607 void bufferData()(uint target, int size, uint usage) { 608 Serialize_Object_VarArgCall!void(this.handle, "bufferData", "uint;int;uint", tuple(target, size, usage)); 609 } 610 void bufferData(T1)(uint target, scope auto ref Optional!(T1) data, uint usage) if (isTOrPointer!(T1, ArrayBuffer)) { 611 Serialize_Object_VarArgCall!void(this.handle, "bufferData", "uint;Optional!Handle;uint", tuple(target, !data.empty, cast(Handle)data.front.handle, usage)); 612 } 613 void bufferData()(uint target, scope ref ArrayBufferView data, uint usage) { 614 Serialize_Object_VarArgCall!void(this.handle, "bufferData", "uint;Handle;uint", tuple(target, cast(Handle)data.handle, usage)); 615 } 616 void bufferSubData()(uint target, int offset, scope ref ArrayBuffer data) { 617 Serialize_Object_VarArgCall!void(this.handle, "bufferSubData", "uint;int;Handle", tuple(target, offset, cast(Handle)data.handle)); 618 } 619 void bufferSubData()(uint target, int offset, scope ref ArrayBufferView data) { 620 Serialize_Object_VarArgCall!void(this.handle, "bufferSubData", "uint;int;Handle", tuple(target, offset, cast(Handle)data.handle)); 621 } 622 void compressedTexImage2D()(uint target, int level, uint internalformat, int width, int height, int border, scope ref ArrayBufferView data) { 623 Serialize_Object_VarArgCall!void(this.handle, "compressedTexImage2D", "uint;int;uint;int;int;int;Handle", tuple(target, level, internalformat, width, height, border, cast(Handle)data.handle)); 624 } 625 void compressedTexSubImage2D()(uint target, int level, int xoffset, int yoffset, int width, int height, uint format, scope ref ArrayBufferView data) { 626 Serialize_Object_VarArgCall!void(this.handle, "compressedTexSubImage2D", "uint;int;int;int;int;int;uint;Handle", tuple(target, level, xoffset, yoffset, width, height, format, cast(Handle)data.handle)); 627 } 628 void readPixels(T6)(int x, int y, int width, int height, uint format, uint type, scope auto ref Optional!(T6) pixels) if (isTOrPointer!(T6, ArrayBufferView)) { 629 Serialize_Object_VarArgCall!void(this.handle, "readPixels", "int;int;int;int;uint;uint;Optional!Handle", tuple(x, y, width, height, format, type, !pixels.empty, cast(Handle)pixels.front.handle)); 630 } 631 void texImage2D(T8)(uint target, int level, int internalformat, int width, int height, int border, uint format, uint type, scope auto ref Optional!(T8) pixels) if (isTOrPointer!(T8, ArrayBufferView)) { 632 Serialize_Object_VarArgCall!void(this.handle, "texImage2D", "uint;int;int;int;int;int;uint;uint;Optional!Handle", tuple(target, level, internalformat, width, height, border, format, type, !pixels.empty, cast(Handle)pixels.front.handle)); 633 } 634 void texImage2D()(uint target, int level, int internalformat, uint format, uint type, scope ref ImageBitmap pixels) { 635 Serialize_Object_VarArgCall!void(this.handle, "texImage2D", "uint;int;int;uint;uint;Handle", tuple(target, level, internalformat, format, type, cast(Handle)pixels.handle)); 636 } 637 void texImage2D()(uint target, int level, int internalformat, uint format, uint type, scope ref ImageData pixels) { 638 Serialize_Object_VarArgCall!void(this.handle, "texImage2D", "uint;int;int;uint;uint;Handle", tuple(target, level, internalformat, format, type, cast(Handle)pixels.handle)); 639 } 640 void texImage2D()(uint target, int level, int internalformat, uint format, uint type, scope ref HTMLImageElement image) { 641 Serialize_Object_VarArgCall!void(this.handle, "texImage2D", "uint;int;int;uint;uint;Handle", tuple(target, level, internalformat, format, type, cast(Handle)image._parent)); 642 } 643 void texImage2D()(uint target, int level, int internalformat, uint format, uint type, scope ref HTMLCanvasElement canvas) { 644 Serialize_Object_VarArgCall!void(this.handle, "texImage2D", "uint;int;int;uint;uint;Handle", tuple(target, level, internalformat, format, type, cast(Handle)canvas._parent)); 645 } 646 void texImage2D()(uint target, int level, int internalformat, uint format, uint type, scope ref HTMLVideoElement video) { 647 Serialize_Object_VarArgCall!void(this.handle, "texImage2D", "uint;int;int;uint;uint;Handle", tuple(target, level, internalformat, format, type, cast(Handle)video._parent)); 648 } 649 void texSubImage2D(T8)(uint target, int level, int xoffset, int yoffset, int width, int height, uint format, uint type, scope auto ref Optional!(T8) pixels) if (isTOrPointer!(T8, ArrayBufferView)) { 650 Serialize_Object_VarArgCall!void(this.handle, "texSubImage2D", "uint;int;int;int;int;int;uint;uint;Optional!Handle", tuple(target, level, xoffset, yoffset, width, height, format, type, !pixels.empty, cast(Handle)pixels.front.handle)); 651 } 652 void texSubImage2D()(uint target, int level, int xoffset, int yoffset, uint format, uint type, scope ref ImageBitmap pixels) { 653 Serialize_Object_VarArgCall!void(this.handle, "texSubImage2D", "uint;int;int;int;uint;uint;Handle", tuple(target, level, xoffset, yoffset, format, type, cast(Handle)pixels.handle)); 654 } 655 void texSubImage2D()(uint target, int level, int xoffset, int yoffset, uint format, uint type, scope ref ImageData pixels) { 656 Serialize_Object_VarArgCall!void(this.handle, "texSubImage2D", "uint;int;int;int;uint;uint;Handle", tuple(target, level, xoffset, yoffset, format, type, cast(Handle)pixels.handle)); 657 } 658 void texSubImage2D()(uint target, int level, int xoffset, int yoffset, uint format, uint type, scope ref HTMLImageElement image) { 659 Serialize_Object_VarArgCall!void(this.handle, "texSubImage2D", "uint;int;int;int;uint;uint;Handle", tuple(target, level, xoffset, yoffset, format, type, cast(Handle)image._parent)); 660 } 661 void texSubImage2D()(uint target, int level, int xoffset, int yoffset, uint format, uint type, scope ref HTMLCanvasElement canvas) { 662 Serialize_Object_VarArgCall!void(this.handle, "texSubImage2D", "uint;int;int;int;uint;uint;Handle", tuple(target, level, xoffset, yoffset, format, type, cast(Handle)canvas._parent)); 663 } 664 void texSubImage2D()(uint target, int level, int xoffset, int yoffset, uint format, uint type, scope ref HTMLVideoElement video) { 665 Serialize_Object_VarArgCall!void(this.handle, "texSubImage2D", "uint;int;int;int;uint;uint;Handle", tuple(target, level, xoffset, yoffset, format, type, cast(Handle)video._parent)); 666 } 667 void uniform1fv(T0)(scope auto ref Optional!(T0) location, scope ref Float32List data) if (isTOrPointer!(T0, WebGLUniformLocation)) { 668 Serialize_Object_VarArgCall!void(this.handle, "uniform1fv", "Optional!Handle;SumType!(Handle,Handle)", tuple(!location.empty, cast(Handle)location.front.handle, libwasm.sumtype.match!(((ref data.Types[0] v) => 0),((ref data.Types[1] v) => 1))(data),tuple(libwasm.sumtype.match!(((ref data.Types[0] v) => cast(Handle)v.handle),((ref data.Types[1] v) => Handle.init))(data),libwasm.sumtype.match!(((ref data.Types[0] v) => Handle.init),((ref data.Types[1] v) => cast(Handle)v.handle))(data)))); 669 } 670 void uniform2fv(T0)(scope auto ref Optional!(T0) location, scope ref Float32List data) if (isTOrPointer!(T0, WebGLUniformLocation)) { 671 Serialize_Object_VarArgCall!void(this.handle, "uniform2fv", "Optional!Handle;SumType!(Handle,Handle)", tuple(!location.empty, cast(Handle)location.front.handle, libwasm.sumtype.match!(((ref data.Types[0] v) => 0),((ref data.Types[1] v) => 1))(data),tuple(libwasm.sumtype.match!(((ref data.Types[0] v) => cast(Handle)v.handle),((ref data.Types[1] v) => Handle.init))(data),libwasm.sumtype.match!(((ref data.Types[0] v) => Handle.init),((ref data.Types[1] v) => cast(Handle)v.handle))(data)))); 672 } 673 void uniform3fv(T0)(scope auto ref Optional!(T0) location, scope ref Float32List data) if (isTOrPointer!(T0, WebGLUniformLocation)) { 674 Serialize_Object_VarArgCall!void(this.handle, "uniform3fv", "Optional!Handle;SumType!(Handle,Handle)", tuple(!location.empty, cast(Handle)location.front.handle, libwasm.sumtype.match!(((ref data.Types[0] v) => 0),((ref data.Types[1] v) => 1))(data),tuple(libwasm.sumtype.match!(((ref data.Types[0] v) => cast(Handle)v.handle),((ref data.Types[1] v) => Handle.init))(data),libwasm.sumtype.match!(((ref data.Types[0] v) => Handle.init),((ref data.Types[1] v) => cast(Handle)v.handle))(data)))); 675 } 676 void uniform4fv(T0)(scope auto ref Optional!(T0) location, scope ref Float32List data) if (isTOrPointer!(T0, WebGLUniformLocation)) { 677 Serialize_Object_VarArgCall!void(this.handle, "uniform4fv", "Optional!Handle;SumType!(Handle,Handle)", tuple(!location.empty, cast(Handle)location.front.handle, libwasm.sumtype.match!(((ref data.Types[0] v) => 0),((ref data.Types[1] v) => 1))(data),tuple(libwasm.sumtype.match!(((ref data.Types[0] v) => cast(Handle)v.handle),((ref data.Types[1] v) => Handle.init))(data),libwasm.sumtype.match!(((ref data.Types[0] v) => Handle.init),((ref data.Types[1] v) => cast(Handle)v.handle))(data)))); 678 } 679 void uniform1iv(T0)(scope auto ref Optional!(T0) location, scope ref Int32List data) if (isTOrPointer!(T0, WebGLUniformLocation)) { 680 Serialize_Object_VarArgCall!void(this.handle, "uniform1iv", "Optional!Handle;SumType!(Handle,Handle)", tuple(!location.empty, cast(Handle)location.front.handle, libwasm.sumtype.match!(((ref data.Types[0] v) => 0),((ref data.Types[1] v) => 1))(data),tuple(libwasm.sumtype.match!(((ref data.Types[0] v) => cast(Handle)v.handle),((ref data.Types[1] v) => Handle.init))(data),libwasm.sumtype.match!(((ref data.Types[0] v) => Handle.init),((ref data.Types[1] v) => cast(Handle)v.handle))(data)))); 681 } 682 void uniform2iv(T0)(scope auto ref Optional!(T0) location, scope ref Int32List data) if (isTOrPointer!(T0, WebGLUniformLocation)) { 683 Serialize_Object_VarArgCall!void(this.handle, "uniform2iv", "Optional!Handle;SumType!(Handle,Handle)", tuple(!location.empty, cast(Handle)location.front.handle, libwasm.sumtype.match!(((ref data.Types[0] v) => 0),((ref data.Types[1] v) => 1))(data),tuple(libwasm.sumtype.match!(((ref data.Types[0] v) => cast(Handle)v.handle),((ref data.Types[1] v) => Handle.init))(data),libwasm.sumtype.match!(((ref data.Types[0] v) => Handle.init),((ref data.Types[1] v) => cast(Handle)v.handle))(data)))); 684 } 685 void uniform3iv(T0)(scope auto ref Optional!(T0) location, scope ref Int32List data) if (isTOrPointer!(T0, WebGLUniformLocation)) { 686 Serialize_Object_VarArgCall!void(this.handle, "uniform3iv", "Optional!Handle;SumType!(Handle,Handle)", tuple(!location.empty, cast(Handle)location.front.handle, libwasm.sumtype.match!(((ref data.Types[0] v) => 0),((ref data.Types[1] v) => 1))(data),tuple(libwasm.sumtype.match!(((ref data.Types[0] v) => cast(Handle)v.handle),((ref data.Types[1] v) => Handle.init))(data),libwasm.sumtype.match!(((ref data.Types[0] v) => Handle.init),((ref data.Types[1] v) => cast(Handle)v.handle))(data)))); 687 } 688 void uniform4iv(T0)(scope auto ref Optional!(T0) location, scope ref Int32List data) if (isTOrPointer!(T0, WebGLUniformLocation)) { 689 Serialize_Object_VarArgCall!void(this.handle, "uniform4iv", "Optional!Handle;SumType!(Handle,Handle)", tuple(!location.empty, cast(Handle)location.front.handle, libwasm.sumtype.match!(((ref data.Types[0] v) => 0),((ref data.Types[1] v) => 1))(data),tuple(libwasm.sumtype.match!(((ref data.Types[0] v) => cast(Handle)v.handle),((ref data.Types[1] v) => Handle.init))(data),libwasm.sumtype.match!(((ref data.Types[0] v) => Handle.init),((ref data.Types[1] v) => cast(Handle)v.handle))(data)))); 690 } 691 void uniformMatrix2fv(T0)(scope auto ref Optional!(T0) location, bool transpose, scope ref Float32List data) if (isTOrPointer!(T0, WebGLUniformLocation)) { 692 Serialize_Object_VarArgCall!void(this.handle, "uniformMatrix2fv", "Optional!Handle;bool;SumType!(Handle,Handle)", tuple(!location.empty, cast(Handle)location.front.handle, transpose, libwasm.sumtype.match!(((ref data.Types[0] v) => 0),((ref data.Types[1] v) => 1))(data),tuple(libwasm.sumtype.match!(((ref data.Types[0] v) => cast(Handle)v.handle),((ref data.Types[1] v) => Handle.init))(data),libwasm.sumtype.match!(((ref data.Types[0] v) => Handle.init),((ref data.Types[1] v) => cast(Handle)v.handle))(data)))); 693 } 694 void uniformMatrix3fv(T0)(scope auto ref Optional!(T0) location, bool transpose, scope ref Float32List data) if (isTOrPointer!(T0, WebGLUniformLocation)) { 695 Serialize_Object_VarArgCall!void(this.handle, "uniformMatrix3fv", "Optional!Handle;bool;SumType!(Handle,Handle)", tuple(!location.empty, cast(Handle)location.front.handle, transpose, libwasm.sumtype.match!(((ref data.Types[0] v) => 0),((ref data.Types[1] v) => 1))(data),tuple(libwasm.sumtype.match!(((ref data.Types[0] v) => cast(Handle)v.handle),((ref data.Types[1] v) => Handle.init))(data),libwasm.sumtype.match!(((ref data.Types[0] v) => Handle.init),((ref data.Types[1] v) => cast(Handle)v.handle))(data)))); 696 } 697 void uniformMatrix4fv(T0)(scope auto ref Optional!(T0) location, bool transpose, scope ref Float32List data) if (isTOrPointer!(T0, WebGLUniformLocation)) { 698 Serialize_Object_VarArgCall!void(this.handle, "uniformMatrix4fv", "Optional!Handle;bool;SumType!(Handle,Handle)", tuple(!location.empty, cast(Handle)location.front.handle, transpose, libwasm.sumtype.match!(((ref data.Types[0] v) => 0),((ref data.Types[1] v) => 1))(data),tuple(libwasm.sumtype.match!(((ref data.Types[0] v) => cast(Handle)v.handle),((ref data.Types[1] v) => Handle.init))(data),libwasm.sumtype.match!(((ref data.Types[0] v) => Handle.init),((ref data.Types[1] v) => cast(Handle)v.handle))(data)))); 699 } 700 void commit()() { 701 Object_Call__void(this.handle, "commit"); 702 } 703 enum uint DEPTH_BUFFER_BIT = 0x00000100; 704 enum uint STENCIL_BUFFER_BIT = 0x00000400; 705 enum uint COLOR_BUFFER_BIT = 0x00004000; 706 enum uint POINTS = 0x0000; 707 enum uint LINES = 0x0001; 708 enum uint LINE_LOOP = 0x0002; 709 enum uint LINE_STRIP = 0x0003; 710 enum uint TRIANGLES = 0x0004; 711 enum uint TRIANGLE_STRIP = 0x0005; 712 enum uint TRIANGLE_FAN = 0x0006; 713 enum uint ZERO = 0; 714 enum uint ONE = 1; 715 enum uint SRC_COLOR = 0x0300; 716 enum uint ONE_MINUS_SRC_COLOR = 0x0301; 717 enum uint SRC_ALPHA = 0x0302; 718 enum uint ONE_MINUS_SRC_ALPHA = 0x0303; 719 enum uint DST_ALPHA = 0x0304; 720 enum uint ONE_MINUS_DST_ALPHA = 0x0305; 721 enum uint DST_COLOR = 0x0306; 722 enum uint ONE_MINUS_DST_COLOR = 0x0307; 723 enum uint SRC_ALPHA_SATURATE = 0x0308; 724 enum uint FUNC_ADD = 0x8006; 725 enum uint BLEND_EQUATION = 0x8009; 726 enum uint BLEND_EQUATION_RGB = 0x8009; 727 enum uint BLEND_EQUATION_ALPHA = 0x883D; 728 enum uint FUNC_SUBTRACT = 0x800A; 729 enum uint FUNC_REVERSE_SUBTRACT = 0x800B; 730 enum uint BLEND_DST_RGB = 0x80C8; 731 enum uint BLEND_SRC_RGB = 0x80C9; 732 enum uint BLEND_DST_ALPHA = 0x80CA; 733 enum uint BLEND_SRC_ALPHA = 0x80CB; 734 enum uint CONSTANT_COLOR = 0x8001; 735 enum uint ONE_MINUS_CONSTANT_COLOR = 0x8002; 736 enum uint CONSTANT_ALPHA = 0x8003; 737 enum uint ONE_MINUS_CONSTANT_ALPHA = 0x8004; 738 enum uint BLEND_COLOR = 0x8005; 739 enum uint ARRAY_BUFFER = 0x8892; 740 enum uint ELEMENT_ARRAY_BUFFER = 0x8893; 741 enum uint ARRAY_BUFFER_BINDING = 0x8894; 742 enum uint ELEMENT_ARRAY_BUFFER_BINDING = 0x8895; 743 enum uint STREAM_DRAW = 0x88E0; 744 enum uint STATIC_DRAW = 0x88E4; 745 enum uint DYNAMIC_DRAW = 0x88E8; 746 enum uint BUFFER_SIZE = 0x8764; 747 enum uint BUFFER_USAGE = 0x8765; 748 enum uint CURRENT_VERTEX_ATTRIB = 0x8626; 749 enum uint FRONT = 0x0404; 750 enum uint BACK = 0x0405; 751 enum uint FRONT_AND_BACK = 0x0408; 752 enum uint CULL_FACE = 0x0B44; 753 enum uint BLEND = 0x0BE2; 754 enum uint DITHER = 0x0BD0; 755 enum uint STENCIL_TEST = 0x0B90; 756 enum uint DEPTH_TEST = 0x0B71; 757 enum uint SCISSOR_TEST = 0x0C11; 758 enum uint POLYGON_OFFSET_FILL = 0x8037; 759 enum uint SAMPLE_ALPHA_TO_COVERAGE = 0x809E; 760 enum uint SAMPLE_COVERAGE = 0x80A0; 761 enum uint NO_ERROR = 0; 762 enum uint INVALID_ENUM = 0x0500; 763 enum uint INVALID_VALUE = 0x0501; 764 enum uint INVALID_OPERATION = 0x0502; 765 enum uint OUT_OF_MEMORY = 0x0505; 766 enum uint CW = 0x0900; 767 enum uint CCW = 0x0901; 768 enum uint LINE_WIDTH = 0x0B21; 769 enum uint ALIASED_POINT_SIZE_RANGE = 0x846D; 770 enum uint ALIASED_LINE_WIDTH_RANGE = 0x846E; 771 enum uint CULL_FACE_MODE = 0x0B45; 772 enum uint FRONT_FACE = 0x0B46; 773 enum uint DEPTH_RANGE = 0x0B70; 774 enum uint DEPTH_WRITEMASK = 0x0B72; 775 enum uint DEPTH_CLEAR_VALUE = 0x0B73; 776 enum uint DEPTH_FUNC = 0x0B74; 777 enum uint STENCIL_CLEAR_VALUE = 0x0B91; 778 enum uint STENCIL_FUNC = 0x0B92; 779 enum uint STENCIL_FAIL = 0x0B94; 780 enum uint STENCIL_PASS_DEPTH_FAIL = 0x0B95; 781 enum uint STENCIL_PASS_DEPTH_PASS = 0x0B96; 782 enum uint STENCIL_REF = 0x0B97; 783 enum uint STENCIL_VALUE_MASK = 0x0B93; 784 enum uint STENCIL_WRITEMASK = 0x0B98; 785 enum uint STENCIL_BACK_FUNC = 0x8800; 786 enum uint STENCIL_BACK_FAIL = 0x8801; 787 enum uint STENCIL_BACK_PASS_DEPTH_FAIL = 0x8802; 788 enum uint STENCIL_BACK_PASS_DEPTH_PASS = 0x8803; 789 enum uint STENCIL_BACK_REF = 0x8CA3; 790 enum uint STENCIL_BACK_VALUE_MASK = 0x8CA4; 791 enum uint STENCIL_BACK_WRITEMASK = 0x8CA5; 792 enum uint VIEWPORT = 0x0BA2; 793 enum uint SCISSOR_BOX = 0x0C10; 794 enum uint COLOR_CLEAR_VALUE = 0x0C22; 795 enum uint COLOR_WRITEMASK = 0x0C23; 796 enum uint UNPACK_ALIGNMENT = 0x0CF5; 797 enum uint PACK_ALIGNMENT = 0x0D05; 798 enum uint MAX_TEXTURE_SIZE = 0x0D33; 799 enum uint MAX_VIEWPORT_DIMS = 0x0D3A; 800 enum uint SUBPIXEL_BITS = 0x0D50; 801 enum uint RED_BITS = 0x0D52; 802 enum uint GREEN_BITS = 0x0D53; 803 enum uint BLUE_BITS = 0x0D54; 804 enum uint ALPHA_BITS = 0x0D55; 805 enum uint DEPTH_BITS = 0x0D56; 806 enum uint STENCIL_BITS = 0x0D57; 807 enum uint POLYGON_OFFSET_UNITS = 0x2A00; 808 enum uint POLYGON_OFFSET_FACTOR = 0x8038; 809 enum uint TEXTURE_BINDING_2D = 0x8069; 810 enum uint SAMPLE_BUFFERS = 0x80A8; 811 enum uint SAMPLES = 0x80A9; 812 enum uint SAMPLE_COVERAGE_VALUE = 0x80AA; 813 enum uint SAMPLE_COVERAGE_INVERT = 0x80AB; 814 enum uint COMPRESSED_TEXTURE_FORMATS = 0x86A3; 815 enum uint DONT_CARE = 0x1100; 816 enum uint FASTEST = 0x1101; 817 enum uint NICEST = 0x1102; 818 enum uint GENERATE_MIPMAP_HINT = 0x8192; 819 enum uint BYTE = 0x1400; 820 enum uint UNSIGNED_BYTE = 0x1401; 821 enum uint SHORT = 0x1402; 822 enum uint UNSIGNED_SHORT = 0x1403; 823 enum uint INT = 0x1404; 824 enum uint UNSIGNED_INT = 0x1405; 825 enum uint FLOAT = 0x1406; 826 enum uint DEPTH_COMPONENT = 0x1902; 827 enum uint ALPHA = 0x1906; 828 enum uint RGB = 0x1907; 829 enum uint RGBA = 0x1908; 830 enum uint LUMINANCE = 0x1909; 831 enum uint LUMINANCE_ALPHA = 0x190A; 832 enum uint UNSIGNED_SHORT_4_4_4_4 = 0x8033; 833 enum uint UNSIGNED_SHORT_5_5_5_1 = 0x8034; 834 enum uint UNSIGNED_SHORT_5_6_5 = 0x8363; 835 enum uint FRAGMENT_SHADER = 0x8B30; 836 enum uint VERTEX_SHADER = 0x8B31; 837 enum uint MAX_VERTEX_ATTRIBS = 0x8869; 838 enum uint MAX_VERTEX_UNIFORM_VECTORS = 0x8DFB; 839 enum uint MAX_VARYING_VECTORS = 0x8DFC; 840 enum uint MAX_COMBINED_TEXTURE_IMAGE_UNITS = 0x8B4D; 841 enum uint MAX_VERTEX_TEXTURE_IMAGE_UNITS = 0x8B4C; 842 enum uint MAX_TEXTURE_IMAGE_UNITS = 0x8872; 843 enum uint MAX_FRAGMENT_UNIFORM_VECTORS = 0x8DFD; 844 enum uint SHADER_TYPE = 0x8B4F; 845 enum uint DELETE_STATUS = 0x8B80; 846 enum uint LINK_STATUS = 0x8B82; 847 enum uint VALIDATE_STATUS = 0x8B83; 848 enum uint ATTACHED_SHADERS = 0x8B85; 849 enum uint ACTIVE_UNIFORMS = 0x8B86; 850 enum uint ACTIVE_ATTRIBUTES = 0x8B89; 851 enum uint SHADING_LANGUAGE_VERSION = 0x8B8C; 852 enum uint CURRENT_PROGRAM = 0x8B8D; 853 enum uint NEVER = 0x0200; 854 enum uint LESS = 0x0201; 855 enum uint EQUAL = 0x0202; 856 enum uint LEQUAL = 0x0203; 857 enum uint GREATER = 0x0204; 858 enum uint NOTEQUAL = 0x0205; 859 enum uint GEQUAL = 0x0206; 860 enum uint ALWAYS = 0x0207; 861 enum uint KEEP = 0x1E00; 862 enum uint REPLACE = 0x1E01; 863 enum uint INCR = 0x1E02; 864 enum uint DECR = 0x1E03; 865 enum uint INVERT = 0x150A; 866 enum uint INCR_WRAP = 0x8507; 867 enum uint DECR_WRAP = 0x8508; 868 enum uint VENDOR = 0x1F00; 869 enum uint RENDERER = 0x1F01; 870 enum uint VERSION = 0x1F02; 871 enum uint NEAREST = 0x2600; 872 enum uint LINEAR = 0x2601; 873 enum uint NEAREST_MIPMAP_NEAREST = 0x2700; 874 enum uint LINEAR_MIPMAP_NEAREST = 0x2701; 875 enum uint NEAREST_MIPMAP_LINEAR = 0x2702; 876 enum uint LINEAR_MIPMAP_LINEAR = 0x2703; 877 enum uint TEXTURE_MAG_FILTER = 0x2800; 878 enum uint TEXTURE_MIN_FILTER = 0x2801; 879 enum uint TEXTURE_WRAP_S = 0x2802; 880 enum uint TEXTURE_WRAP_T = 0x2803; 881 enum uint TEXTURE_2D = 0x0DE1; 882 enum uint TEXTURE = 0x1702; 883 enum uint TEXTURE_CUBE_MAP = 0x8513; 884 enum uint TEXTURE_BINDING_CUBE_MAP = 0x8514; 885 enum uint TEXTURE_CUBE_MAP_POSITIVE_X = 0x8515; 886 enum uint TEXTURE_CUBE_MAP_NEGATIVE_X = 0x8516; 887 enum uint TEXTURE_CUBE_MAP_POSITIVE_Y = 0x8517; 888 enum uint TEXTURE_CUBE_MAP_NEGATIVE_Y = 0x8518; 889 enum uint TEXTURE_CUBE_MAP_POSITIVE_Z = 0x8519; 890 enum uint TEXTURE_CUBE_MAP_NEGATIVE_Z = 0x851A; 891 enum uint MAX_CUBE_MAP_TEXTURE_SIZE = 0x851C; 892 enum uint TEXTURE0 = 0x84C0; 893 enum uint TEXTURE1 = 0x84C1; 894 enum uint TEXTURE2 = 0x84C2; 895 enum uint TEXTURE3 = 0x84C3; 896 enum uint TEXTURE4 = 0x84C4; 897 enum uint TEXTURE5 = 0x84C5; 898 enum uint TEXTURE6 = 0x84C6; 899 enum uint TEXTURE7 = 0x84C7; 900 enum uint TEXTURE8 = 0x84C8; 901 enum uint TEXTURE9 = 0x84C9; 902 enum uint TEXTURE10 = 0x84CA; 903 enum uint TEXTURE11 = 0x84CB; 904 enum uint TEXTURE12 = 0x84CC; 905 enum uint TEXTURE13 = 0x84CD; 906 enum uint TEXTURE14 = 0x84CE; 907 enum uint TEXTURE15 = 0x84CF; 908 enum uint TEXTURE16 = 0x84D0; 909 enum uint TEXTURE17 = 0x84D1; 910 enum uint TEXTURE18 = 0x84D2; 911 enum uint TEXTURE19 = 0x84D3; 912 enum uint TEXTURE20 = 0x84D4; 913 enum uint TEXTURE21 = 0x84D5; 914 enum uint TEXTURE22 = 0x84D6; 915 enum uint TEXTURE23 = 0x84D7; 916 enum uint TEXTURE24 = 0x84D8; 917 enum uint TEXTURE25 = 0x84D9; 918 enum uint TEXTURE26 = 0x84DA; 919 enum uint TEXTURE27 = 0x84DB; 920 enum uint TEXTURE28 = 0x84DC; 921 enum uint TEXTURE29 = 0x84DD; 922 enum uint TEXTURE30 = 0x84DE; 923 enum uint TEXTURE31 = 0x84DF; 924 enum uint ACTIVE_TEXTURE = 0x84E0; 925 enum uint REPEAT = 0x2901; 926 enum uint CLAMP_TO_EDGE = 0x812F; 927 enum uint MIRRORED_REPEAT = 0x8370; 928 enum uint FLOAT_VEC2 = 0x8B50; 929 enum uint FLOAT_VEC3 = 0x8B51; 930 enum uint FLOAT_VEC4 = 0x8B52; 931 enum uint INT_VEC2 = 0x8B53; 932 enum uint INT_VEC3 = 0x8B54; 933 enum uint INT_VEC4 = 0x8B55; 934 enum uint BOOL = 0x8B56; 935 enum uint BOOL_VEC2 = 0x8B57; 936 enum uint BOOL_VEC3 = 0x8B58; 937 enum uint BOOL_VEC4 = 0x8B59; 938 enum uint FLOAT_MAT2 = 0x8B5A; 939 enum uint FLOAT_MAT3 = 0x8B5B; 940 enum uint FLOAT_MAT4 = 0x8B5C; 941 enum uint SAMPLER_2D = 0x8B5E; 942 enum uint SAMPLER_CUBE = 0x8B60; 943 enum uint VERTEX_ATTRIB_ARRAY_ENABLED = 0x8622; 944 enum uint VERTEX_ATTRIB_ARRAY_SIZE = 0x8623; 945 enum uint VERTEX_ATTRIB_ARRAY_STRIDE = 0x8624; 946 enum uint VERTEX_ATTRIB_ARRAY_TYPE = 0x8625; 947 enum uint VERTEX_ATTRIB_ARRAY_NORMALIZED = 0x886A; 948 enum uint VERTEX_ATTRIB_ARRAY_POINTER = 0x8645; 949 enum uint VERTEX_ATTRIB_ARRAY_BUFFER_BINDING = 0x889F; 950 enum uint IMPLEMENTATION_COLOR_READ_TYPE = 0x8B9A; 951 enum uint IMPLEMENTATION_COLOR_READ_FORMAT = 0x8B9B; 952 enum uint COMPILE_STATUS = 0x8B81; 953 enum uint LOW_FLOAT = 0x8DF0; 954 enum uint MEDIUM_FLOAT = 0x8DF1; 955 enum uint HIGH_FLOAT = 0x8DF2; 956 enum uint LOW_INT = 0x8DF3; 957 enum uint MEDIUM_INT = 0x8DF4; 958 enum uint HIGH_INT = 0x8DF5; 959 enum uint FRAMEBUFFER = 0x8D40; 960 enum uint RENDERBUFFER = 0x8D41; 961 enum uint RGBA4 = 0x8056; 962 enum uint RGB5_A1 = 0x8057; 963 enum uint RGB565 = 0x8D62; 964 enum uint DEPTH_COMPONENT16 = 0x81A5; 965 enum uint STENCIL_INDEX8 = 0x8D48; 966 enum uint DEPTH_STENCIL = 0x84F9; 967 enum uint RENDERBUFFER_WIDTH = 0x8D42; 968 enum uint RENDERBUFFER_HEIGHT = 0x8D43; 969 enum uint RENDERBUFFER_INTERNAL_FORMAT = 0x8D44; 970 enum uint RENDERBUFFER_RED_SIZE = 0x8D50; 971 enum uint RENDERBUFFER_GREEN_SIZE = 0x8D51; 972 enum uint RENDERBUFFER_BLUE_SIZE = 0x8D52; 973 enum uint RENDERBUFFER_ALPHA_SIZE = 0x8D53; 974 enum uint RENDERBUFFER_DEPTH_SIZE = 0x8D54; 975 enum uint RENDERBUFFER_STENCIL_SIZE = 0x8D55; 976 enum uint FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE = 0x8CD0; 977 enum uint FRAMEBUFFER_ATTACHMENT_OBJECT_NAME = 0x8CD1; 978 enum uint FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL = 0x8CD2; 979 enum uint FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE = 0x8CD3; 980 enum uint COLOR_ATTACHMENT0 = 0x8CE0; 981 enum uint DEPTH_ATTACHMENT = 0x8D00; 982 enum uint STENCIL_ATTACHMENT = 0x8D20; 983 enum uint DEPTH_STENCIL_ATTACHMENT = 0x821A; 984 enum uint NONE = 0; 985 enum uint FRAMEBUFFER_COMPLETE = 0x8CD5; 986 enum uint FRAMEBUFFER_INCOMPLETE_ATTACHMENT = 0x8CD6; 987 enum uint FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT = 0x8CD7; 988 enum uint FRAMEBUFFER_INCOMPLETE_DIMENSIONS = 0x8CD9; 989 enum uint FRAMEBUFFER_UNSUPPORTED = 0x8CDD; 990 enum uint FRAMEBUFFER_BINDING = 0x8CA6; 991 enum uint RENDERBUFFER_BINDING = 0x8CA7; 992 enum uint MAX_RENDERBUFFER_SIZE = 0x84E8; 993 enum uint INVALID_FRAMEBUFFER_OPERATION = 0x0506; 994 enum uint UNPACK_FLIP_Y_WEBGL = 0x9240; 995 enum uint UNPACK_PREMULTIPLY_ALPHA_WEBGL = 0x9241; 996 enum uint CONTEXT_LOST_WEBGL = 0x9242; 997 enum uint UNPACK_COLORSPACE_CONVERSION_WEBGL = 0x9243; 998 enum uint BROWSER_DEFAULT_WEBGL = 0x9244; 999 auto canvas()() { 1000 return WebGLRenderingContextBase_canvas_Get(this.handle); 1001 } 1002 int drawingBufferWidth()() { 1003 return Object_Getter__int(this.handle, "drawingBufferWidth"); 1004 } 1005 int drawingBufferHeight()() { 1006 return Object_Getter__int(this.handle, "drawingBufferHeight"); 1007 } 1008 auto getContextAttributes()() { 1009 return recastOpt!(WebGLContextAttributes)(Object_Getter__OptionalHandle(this.handle, "getContextAttributes")); 1010 } 1011 bool isContextLost()() { 1012 return Object_Getter__bool(this.handle, "isContextLost"); 1013 } 1014 auto getSupportedExtensions()() { 1015 return recastOpt!(Sequence!(string))(Object_Getter__OptionalHandle(this.handle, "getSupportedExtensions")); 1016 } 1017 auto getExtension()(string name) { 1018 return recastOpt!(JsObject)(Object_Call_string__OptionalHandle(this.handle, "getExtension", name)); 1019 } 1020 void activeTexture()(uint texture) { 1021 Object_Call_uint__void(this.handle, "activeTexture", texture); 1022 } 1023 void attachShader()(scope ref WebGLProgram program, scope ref WebGLShader shader) { 1024 Serialize_Object_VarArgCall!void(this.handle, "attachShader", "Handle;Handle", tuple(cast(Handle)program.handle, cast(Handle)shader.handle)); 1025 } 1026 void bindAttribLocation()(scope ref WebGLProgram program, uint index, string name) { 1027 Serialize_Object_VarArgCall!void(this.handle, "bindAttribLocation", "Handle;uint;string", tuple(cast(Handle)program.handle, index, name)); 1028 } 1029 void bindBuffer(T1)(uint target, scope auto ref Optional!(T1) buffer) if (isTOrPointer!(T1, WebGLBuffer)) { 1030 Serialize_Object_VarArgCall!void(this.handle, "bindBuffer", "uint;Optional!Handle", tuple(target, !buffer.empty, cast(Handle)buffer.front.handle)); 1031 } 1032 void bindFramebuffer(T1)(uint target, scope auto ref Optional!(T1) framebuffer) if (isTOrPointer!(T1, WebGLFramebuffer)) { 1033 Serialize_Object_VarArgCall!void(this.handle, "bindFramebuffer", "uint;Optional!Handle", tuple(target, !framebuffer.empty, cast(Handle)framebuffer.front.handle)); 1034 } 1035 void bindRenderbuffer(T1)(uint target, scope auto ref Optional!(T1) renderbuffer) if (isTOrPointer!(T1, WebGLRenderbuffer)) { 1036 Serialize_Object_VarArgCall!void(this.handle, "bindRenderbuffer", "uint;Optional!Handle", tuple(target, !renderbuffer.empty, cast(Handle)renderbuffer.front.handle)); 1037 } 1038 void bindTexture(T1)(uint target, scope auto ref Optional!(T1) texture) if (isTOrPointer!(T1, WebGLTexture)) { 1039 Serialize_Object_VarArgCall!void(this.handle, "bindTexture", "uint;Optional!Handle", tuple(target, !texture.empty, cast(Handle)texture.front.handle)); 1040 } 1041 void blendColor()(float red, float green, float blue, float alpha) { 1042 Serialize_Object_VarArgCall!void(this.handle, "blendColor", "float;float;float;float", tuple(red, green, blue, alpha)); 1043 } 1044 void blendEquation()(uint mode) { 1045 Object_Call_uint__void(this.handle, "blendEquation", mode); 1046 } 1047 void blendEquationSeparate()(uint modeRGB, uint modeAlpha) { 1048 Serialize_Object_VarArgCall!void(this.handle, "blendEquationSeparate", "uint;uint", tuple(modeRGB, modeAlpha)); 1049 } 1050 void blendFunc()(uint sfactor, uint dfactor) { 1051 Serialize_Object_VarArgCall!void(this.handle, "blendFunc", "uint;uint", tuple(sfactor, dfactor)); 1052 } 1053 void blendFuncSeparate()(uint srcRGB, uint dstRGB, uint srcAlpha, uint dstAlpha) { 1054 Serialize_Object_VarArgCall!void(this.handle, "blendFuncSeparate", "uint;uint;uint;uint", tuple(srcRGB, dstRGB, srcAlpha, dstAlpha)); 1055 } 1056 uint checkFramebufferStatus()(uint target) { 1057 return Serialize_Object_VarArgCall!uint(this.handle, "checkFramebufferStatus", "uint", tuple(target)); 1058 } 1059 void clear()(uint mask) { 1060 Object_Call_uint__void(this.handle, "clear", mask); 1061 } 1062 void clearColor()(float red, float green, float blue, float alpha) { 1063 Serialize_Object_VarArgCall!void(this.handle, "clearColor", "float;float;float;float", tuple(red, green, blue, alpha)); 1064 } 1065 void clearDepth()(float depth) { 1066 Object_Call_float__void(this.handle, "clearDepth", depth); 1067 } 1068 void clearStencil()(int s) { 1069 Object_Call_int__void(this.handle, "clearStencil", s); 1070 } 1071 void colorMask()(bool red, bool green, bool blue, bool alpha) { 1072 Serialize_Object_VarArgCall!void(this.handle, "colorMask", "bool;bool;bool;bool", tuple(red, green, blue, alpha)); 1073 } 1074 void compileShader()(scope ref WebGLShader shader) { 1075 Object_Call_Handle__void(this.handle, "compileShader", shader.handle); 1076 } 1077 void copyTexImage2D()(uint target, int level, uint internalformat, int x, int y, int width, int height, int border) { 1078 Serialize_Object_VarArgCall!void(this.handle, "copyTexImage2D", "uint;int;uint;int;int;int;int;int", tuple(target, level, internalformat, x, y, width, height, border)); 1079 } 1080 void copyTexSubImage2D()(uint target, int level, int xoffset, int yoffset, int x, int y, int width, int height) { 1081 Serialize_Object_VarArgCall!void(this.handle, "copyTexSubImage2D", "uint;int;int;int;int;int;int;int", tuple(target, level, xoffset, yoffset, x, y, width, height)); 1082 } 1083 auto createBuffer()() { 1084 return recastOpt!(WebGLBuffer)(Object_Getter__OptionalHandle(this.handle, "createBuffer")); 1085 } 1086 auto createFramebuffer()() { 1087 return recastOpt!(WebGLFramebuffer)(Object_Getter__OptionalHandle(this.handle, "createFramebuffer")); 1088 } 1089 auto createProgram()() { 1090 return recastOpt!(WebGLProgram)(Object_Getter__OptionalHandle(this.handle, "createProgram")); 1091 } 1092 auto createRenderbuffer()() { 1093 return recastOpt!(WebGLRenderbuffer)(Object_Getter__OptionalHandle(this.handle, "createRenderbuffer")); 1094 } 1095 auto createShader()(uint type) { 1096 return recastOpt!(WebGLShader)(Object_Call_uint__OptionalHandle(this.handle, "createShader", type)); 1097 } 1098 auto createTexture()() { 1099 return recastOpt!(WebGLTexture)(Object_Getter__OptionalHandle(this.handle, "createTexture")); 1100 } 1101 void cullFace()(uint mode) { 1102 Object_Call_uint__void(this.handle, "cullFace", mode); 1103 } 1104 void deleteBuffer(T0)(scope auto ref Optional!(T0) buffer) if (isTOrPointer!(T0, WebGLBuffer)) { 1105 Serialize_Object_VarArgCall!void(this.handle, "deleteBuffer", "Optional!Handle", tuple(!buffer.empty, cast(Handle)buffer.front.handle)); 1106 } 1107 void deleteFramebuffer(T0)(scope auto ref Optional!(T0) framebuffer) if (isTOrPointer!(T0, WebGLFramebuffer)) { 1108 Serialize_Object_VarArgCall!void(this.handle, "deleteFramebuffer", "Optional!Handle", tuple(!framebuffer.empty, cast(Handle)framebuffer.front.handle)); 1109 } 1110 void deleteProgram(T0)(scope auto ref Optional!(T0) program) if (isTOrPointer!(T0, WebGLProgram)) { 1111 Serialize_Object_VarArgCall!void(this.handle, "deleteProgram", "Optional!Handle", tuple(!program.empty, cast(Handle)program.front.handle)); 1112 } 1113 void deleteRenderbuffer(T0)(scope auto ref Optional!(T0) renderbuffer) if (isTOrPointer!(T0, WebGLRenderbuffer)) { 1114 Serialize_Object_VarArgCall!void(this.handle, "deleteRenderbuffer", "Optional!Handle", tuple(!renderbuffer.empty, cast(Handle)renderbuffer.front.handle)); 1115 } 1116 void deleteShader(T0)(scope auto ref Optional!(T0) shader) if (isTOrPointer!(T0, WebGLShader)) { 1117 Serialize_Object_VarArgCall!void(this.handle, "deleteShader", "Optional!Handle", tuple(!shader.empty, cast(Handle)shader.front.handle)); 1118 } 1119 void deleteTexture(T0)(scope auto ref Optional!(T0) texture) if (isTOrPointer!(T0, WebGLTexture)) { 1120 Serialize_Object_VarArgCall!void(this.handle, "deleteTexture", "Optional!Handle", tuple(!texture.empty, cast(Handle)texture.front.handle)); 1121 } 1122 void depthFunc()(uint func) { 1123 Object_Call_uint__void(this.handle, "depthFunc", func); 1124 } 1125 void depthMask()(bool flag) { 1126 Object_Call_bool__void(this.handle, "depthMask", flag); 1127 } 1128 void depthRange()(float zNear, float zFar) { 1129 Serialize_Object_VarArgCall!void(this.handle, "depthRange", "float;float", tuple(zNear, zFar)); 1130 } 1131 void detachShader()(scope ref WebGLProgram program, scope ref WebGLShader shader) { 1132 Serialize_Object_VarArgCall!void(this.handle, "detachShader", "Handle;Handle", tuple(cast(Handle)program.handle, cast(Handle)shader.handle)); 1133 } 1134 void disable()(uint cap) { 1135 Object_Call_uint__void(this.handle, "disable", cap); 1136 } 1137 void disableVertexAttribArray()(uint index) { 1138 Object_Call_uint__void(this.handle, "disableVertexAttribArray", index); 1139 } 1140 void drawArrays()(uint mode, int first, int count) { 1141 Serialize_Object_VarArgCall!void(this.handle, "drawArrays", "uint;int;int", tuple(mode, first, count)); 1142 } 1143 void drawElements()(uint mode, int count, uint type, int offset) { 1144 Serialize_Object_VarArgCall!void(this.handle, "drawElements", "uint;int;uint;int", tuple(mode, count, type, offset)); 1145 } 1146 void enable()(uint cap) { 1147 Object_Call_uint__void(this.handle, "enable", cap); 1148 } 1149 void enableVertexAttribArray()(uint index) { 1150 Object_Call_uint__void(this.handle, "enableVertexAttribArray", index); 1151 } 1152 void finish()() { 1153 Object_Call__void(this.handle, "finish"); 1154 } 1155 void flush()() { 1156 Object_Call__void(this.handle, "flush"); 1157 } 1158 void framebufferRenderbuffer(T3)(uint target, uint attachment, uint renderbuffertarget, scope auto ref Optional!(T3) renderbuffer) if (isTOrPointer!(T3, WebGLRenderbuffer)) { 1159 Serialize_Object_VarArgCall!void(this.handle, "framebufferRenderbuffer", "uint;uint;uint;Optional!Handle", tuple(target, attachment, renderbuffertarget, !renderbuffer.empty, cast(Handle)renderbuffer.front.handle)); 1160 } 1161 void framebufferTexture2D(T3)(uint target, uint attachment, uint textarget, scope auto ref Optional!(T3) texture, int level) if (isTOrPointer!(T3, WebGLTexture)) { 1162 Serialize_Object_VarArgCall!void(this.handle, "framebufferTexture2D", "uint;uint;uint;Optional!Handle;int", tuple(target, attachment, textarget, !texture.empty, cast(Handle)texture.front.handle, level)); 1163 } 1164 void frontFace()(uint mode) { 1165 Object_Call_uint__void(this.handle, "frontFace", mode); 1166 } 1167 void generateMipmap()(uint target) { 1168 Object_Call_uint__void(this.handle, "generateMipmap", target); 1169 } 1170 auto getActiveAttrib()(scope ref WebGLProgram program, uint index) { 1171 return recastOpt!(WebGLActiveInfo)(Serialize_Object_VarArgCall!(Optional!Handle)(this.handle, "getActiveAttrib", "Handle;uint", tuple(cast(Handle)program.handle, index))); 1172 } 1173 auto getActiveUniform()(scope ref WebGLProgram program, uint index) { 1174 return recastOpt!(WebGLActiveInfo)(Serialize_Object_VarArgCall!(Optional!Handle)(this.handle, "getActiveUniform", "Handle;uint", tuple(cast(Handle)program.handle, index))); 1175 } 1176 auto getAttachedShaders()(scope ref WebGLProgram program) { 1177 return recastOpt!(Sequence!(WebGLShader))(Serialize_Object_VarArgCall!(Optional!Handle)(this.handle, "getAttachedShaders", "Handle", tuple(cast(Handle)program.handle))); 1178 } 1179 int getAttribLocation()(scope ref WebGLProgram program, string name) { 1180 return Serialize_Object_VarArgCall!int(this.handle, "getAttribLocation", "Handle;string", tuple(cast(Handle)program.handle, name)); 1181 } 1182 auto getBufferParameter()(uint target, uint pname) { 1183 return Any(Serialize_Object_VarArgCall!Handle(this.handle, "getBufferParameter", "uint;uint", tuple(target, pname))); 1184 } 1185 auto getParameter()(uint pname) { 1186 return Any(Object_Call_uint__Handle(this.handle, "getParameter", pname)); 1187 } 1188 uint getError()() { 1189 return Object_Getter__uint(this.handle, "getError"); 1190 } 1191 auto getFramebufferAttachmentParameter()(uint target, uint attachment, uint pname) { 1192 return Any(Serialize_Object_VarArgCall!Handle(this.handle, "getFramebufferAttachmentParameter", "uint;uint;uint", tuple(target, attachment, pname))); 1193 } 1194 auto getProgramParameter()(scope ref WebGLProgram program, uint pname) { 1195 return Any(Serialize_Object_VarArgCall!Handle(this.handle, "getProgramParameter", "Handle;uint", tuple(cast(Handle)program.handle, pname))); 1196 } 1197 Optional!(string) getProgramInfoLog()(scope ref WebGLProgram program) { 1198 return Serialize_Object_VarArgCall!(Optional!string)(this.handle, "getProgramInfoLog", "Handle", tuple(cast(Handle)program.handle)); 1199 } 1200 auto getRenderbufferParameter()(uint target, uint pname) { 1201 return Any(Serialize_Object_VarArgCall!Handle(this.handle, "getRenderbufferParameter", "uint;uint", tuple(target, pname))); 1202 } 1203 auto getShaderParameter()(scope ref WebGLShader shader, uint pname) { 1204 return Any(Serialize_Object_VarArgCall!Handle(this.handle, "getShaderParameter", "Handle;uint", tuple(cast(Handle)shader.handle, pname))); 1205 } 1206 auto getShaderPrecisionFormat()(uint shadertype, uint precisiontype) { 1207 return recastOpt!(WebGLShaderPrecisionFormat)(Serialize_Object_VarArgCall!(Optional!Handle)(this.handle, "getShaderPrecisionFormat", "uint;uint", tuple(shadertype, precisiontype))); 1208 } 1209 Optional!(string) getShaderInfoLog()(scope ref WebGLShader shader) { 1210 return Serialize_Object_VarArgCall!(Optional!string)(this.handle, "getShaderInfoLog", "Handle", tuple(cast(Handle)shader.handle)); 1211 } 1212 Optional!(string) getShaderSource()(scope ref WebGLShader shader) { 1213 return Serialize_Object_VarArgCall!(Optional!string)(this.handle, "getShaderSource", "Handle", tuple(cast(Handle)shader.handle)); 1214 } 1215 auto getTexParameter()(uint target, uint pname) { 1216 return Any(Serialize_Object_VarArgCall!Handle(this.handle, "getTexParameter", "uint;uint", tuple(target, pname))); 1217 } 1218 auto getUniform()(scope ref WebGLProgram program, scope ref WebGLUniformLocation location) { 1219 return Any(Serialize_Object_VarArgCall!Handle(this.handle, "getUniform", "Handle;Handle", tuple(cast(Handle)program.handle, cast(Handle)location.handle))); 1220 } 1221 auto getUniformLocation()(scope ref WebGLProgram program, string name) { 1222 return recastOpt!(WebGLUniformLocation)(Serialize_Object_VarArgCall!(Optional!Handle)(this.handle, "getUniformLocation", "Handle;string", tuple(cast(Handle)program.handle, name))); 1223 } 1224 auto getVertexAttrib()(uint index, uint pname) { 1225 return Any(Serialize_Object_VarArgCall!Handle(this.handle, "getVertexAttrib", "uint;uint", tuple(index, pname))); 1226 } 1227 int getVertexAttribOffset()(uint index, uint pname) { 1228 return Serialize_Object_VarArgCall!int(this.handle, "getVertexAttribOffset", "uint;uint", tuple(index, pname)); 1229 } 1230 void hint()(uint target, uint mode) { 1231 Serialize_Object_VarArgCall!void(this.handle, "hint", "uint;uint", tuple(target, mode)); 1232 } 1233 bool isBuffer(T0)(scope auto ref Optional!(T0) buffer) if (isTOrPointer!(T0, WebGLBuffer)) { 1234 return Serialize_Object_VarArgCall!bool(this.handle, "isBuffer", "Optional!Handle", tuple(!buffer.empty, cast(Handle)buffer.front.handle)); 1235 } 1236 bool isEnabled()(uint cap) { 1237 return Serialize_Object_VarArgCall!bool(this.handle, "isEnabled", "uint", tuple(cap)); 1238 } 1239 bool isFramebuffer(T0)(scope auto ref Optional!(T0) framebuffer) if (isTOrPointer!(T0, WebGLFramebuffer)) { 1240 return Serialize_Object_VarArgCall!bool(this.handle, "isFramebuffer", "Optional!Handle", tuple(!framebuffer.empty, cast(Handle)framebuffer.front.handle)); 1241 } 1242 bool isProgram(T0)(scope auto ref Optional!(T0) program) if (isTOrPointer!(T0, WebGLProgram)) { 1243 return Serialize_Object_VarArgCall!bool(this.handle, "isProgram", "Optional!Handle", tuple(!program.empty, cast(Handle)program.front.handle)); 1244 } 1245 bool isRenderbuffer(T0)(scope auto ref Optional!(T0) renderbuffer) if (isTOrPointer!(T0, WebGLRenderbuffer)) { 1246 return Serialize_Object_VarArgCall!bool(this.handle, "isRenderbuffer", "Optional!Handle", tuple(!renderbuffer.empty, cast(Handle)renderbuffer.front.handle)); 1247 } 1248 bool isShader(T0)(scope auto ref Optional!(T0) shader) if (isTOrPointer!(T0, WebGLShader)) { 1249 return Serialize_Object_VarArgCall!bool(this.handle, "isShader", "Optional!Handle", tuple(!shader.empty, cast(Handle)shader.front.handle)); 1250 } 1251 bool isTexture(T0)(scope auto ref Optional!(T0) texture) if (isTOrPointer!(T0, WebGLTexture)) { 1252 return Serialize_Object_VarArgCall!bool(this.handle, "isTexture", "Optional!Handle", tuple(!texture.empty, cast(Handle)texture.front.handle)); 1253 } 1254 void lineWidth()(float width) { 1255 Object_Call_float__void(this.handle, "lineWidth", width); 1256 } 1257 void linkProgram()(scope ref WebGLProgram program) { 1258 Object_Call_Handle__void(this.handle, "linkProgram", program.handle); 1259 } 1260 void pixelStorei()(uint pname, int param) { 1261 Serialize_Object_VarArgCall!void(this.handle, "pixelStorei", "uint;int", tuple(pname, param)); 1262 } 1263 void polygonOffset()(float factor, float units) { 1264 Serialize_Object_VarArgCall!void(this.handle, "polygonOffset", "float;float", tuple(factor, units)); 1265 } 1266 void renderbufferStorage()(uint target, uint internalformat, int width, int height) { 1267 Serialize_Object_VarArgCall!void(this.handle, "renderbufferStorage", "uint;uint;int;int", tuple(target, internalformat, width, height)); 1268 } 1269 void sampleCoverage()(float value, bool invert) { 1270 Serialize_Object_VarArgCall!void(this.handle, "sampleCoverage", "float;bool", tuple(value, invert)); 1271 } 1272 void scissor()(int x, int y, int width, int height) { 1273 Serialize_Object_VarArgCall!void(this.handle, "scissor", "int;int;int;int", tuple(x, y, width, height)); 1274 } 1275 void shaderSource()(scope ref WebGLShader shader, string source) { 1276 Serialize_Object_VarArgCall!void(this.handle, "shaderSource", "Handle;string", tuple(cast(Handle)shader.handle, source)); 1277 } 1278 void stencilFunc()(uint func, int ref_, uint mask) { 1279 Serialize_Object_VarArgCall!void(this.handle, "stencilFunc", "uint;int;uint", tuple(func, ref_, mask)); 1280 } 1281 void stencilFuncSeparate()(uint face, uint func, int ref_, uint mask) { 1282 Serialize_Object_VarArgCall!void(this.handle, "stencilFuncSeparate", "uint;uint;int;uint", tuple(face, func, ref_, mask)); 1283 } 1284 void stencilMask()(uint mask) { 1285 Object_Call_uint__void(this.handle, "stencilMask", mask); 1286 } 1287 void stencilMaskSeparate()(uint face, uint mask) { 1288 Serialize_Object_VarArgCall!void(this.handle, "stencilMaskSeparate", "uint;uint", tuple(face, mask)); 1289 } 1290 void stencilOp()(uint fail, uint zfail, uint zpass) { 1291 Serialize_Object_VarArgCall!void(this.handle, "stencilOp", "uint;uint;uint", tuple(fail, zfail, zpass)); 1292 } 1293 void stencilOpSeparate()(uint face, uint fail, uint zfail, uint zpass) { 1294 Serialize_Object_VarArgCall!void(this.handle, "stencilOpSeparate", "uint;uint;uint;uint", tuple(face, fail, zfail, zpass)); 1295 } 1296 void texParameterf()(uint target, uint pname, float param) { 1297 Serialize_Object_VarArgCall!void(this.handle, "texParameterf", "uint;uint;float", tuple(target, pname, param)); 1298 } 1299 void texParameteri()(uint target, uint pname, int param) { 1300 Serialize_Object_VarArgCall!void(this.handle, "texParameteri", "uint;uint;int", tuple(target, pname, param)); 1301 } 1302 void uniform1f(T0)(scope auto ref Optional!(T0) location, float x) if (isTOrPointer!(T0, WebGLUniformLocation)) { 1303 Serialize_Object_VarArgCall!void(this.handle, "uniform1f", "Optional!Handle;float", tuple(!location.empty, cast(Handle)location.front.handle, x)); 1304 } 1305 void uniform2f(T0)(scope auto ref Optional!(T0) location, float x, float y) if (isTOrPointer!(T0, WebGLUniformLocation)) { 1306 Serialize_Object_VarArgCall!void(this.handle, "uniform2f", "Optional!Handle;float;float", tuple(!location.empty, cast(Handle)location.front.handle, x, y)); 1307 } 1308 void uniform3f(T0)(scope auto ref Optional!(T0) location, float x, float y, float z) if (isTOrPointer!(T0, WebGLUniformLocation)) { 1309 Serialize_Object_VarArgCall!void(this.handle, "uniform3f", "Optional!Handle;float;float;float", tuple(!location.empty, cast(Handle)location.front.handle, x, y, z)); 1310 } 1311 void uniform4f(T0)(scope auto ref Optional!(T0) location, float x, float y, float z, float w) if (isTOrPointer!(T0, WebGLUniformLocation)) { 1312 Serialize_Object_VarArgCall!void(this.handle, "uniform4f", "Optional!Handle;float;float;float;float", tuple(!location.empty, cast(Handle)location.front.handle, x, y, z, w)); 1313 } 1314 void uniform1i(T0)(scope auto ref Optional!(T0) location, int x) if (isTOrPointer!(T0, WebGLUniformLocation)) { 1315 Serialize_Object_VarArgCall!void(this.handle, "uniform1i", "Optional!Handle;int", tuple(!location.empty, cast(Handle)location.front.handle, x)); 1316 } 1317 void uniform2i(T0)(scope auto ref Optional!(T0) location, int x, int y) if (isTOrPointer!(T0, WebGLUniformLocation)) { 1318 Serialize_Object_VarArgCall!void(this.handle, "uniform2i", "Optional!Handle;int;int", tuple(!location.empty, cast(Handle)location.front.handle, x, y)); 1319 } 1320 void uniform3i(T0)(scope auto ref Optional!(T0) location, int x, int y, int z) if (isTOrPointer!(T0, WebGLUniformLocation)) { 1321 Serialize_Object_VarArgCall!void(this.handle, "uniform3i", "Optional!Handle;int;int;int", tuple(!location.empty, cast(Handle)location.front.handle, x, y, z)); 1322 } 1323 void uniform4i(T0)(scope auto ref Optional!(T0) location, int x, int y, int z, int w) if (isTOrPointer!(T0, WebGLUniformLocation)) { 1324 Serialize_Object_VarArgCall!void(this.handle, "uniform4i", "Optional!Handle;int;int;int;int", tuple(!location.empty, cast(Handle)location.front.handle, x, y, z, w)); 1325 } 1326 void useProgram(T0)(scope auto ref Optional!(T0) program) if (isTOrPointer!(T0, WebGLProgram)) { 1327 Serialize_Object_VarArgCall!void(this.handle, "useProgram", "Optional!Handle", tuple(!program.empty, cast(Handle)program.front.handle)); 1328 } 1329 void validateProgram()(scope ref WebGLProgram program) { 1330 Object_Call_Handle__void(this.handle, "validateProgram", program.handle); 1331 } 1332 void vertexAttrib1f()(uint indx, float x) { 1333 Serialize_Object_VarArgCall!void(this.handle, "vertexAttrib1f", "uint;float", tuple(indx, x)); 1334 } 1335 void vertexAttrib1fv()(uint indx, scope ref Float32List values) { 1336 Serialize_Object_VarArgCall!void(this.handle, "vertexAttrib1fv", "uint;SumType!(Handle,Handle)", tuple(indx, libwasm.sumtype.match!(((ref values.Types[0] v) => 0),((ref values.Types[1] v) => 1))(values),tuple(libwasm.sumtype.match!(((ref values.Types[0] v) => cast(Handle)v.handle),((ref values.Types[1] v) => Handle.init))(values),libwasm.sumtype.match!(((ref values.Types[0] v) => Handle.init),((ref values.Types[1] v) => cast(Handle)v.handle))(values)))); 1337 } 1338 void vertexAttrib2f()(uint indx, float x, float y) { 1339 Serialize_Object_VarArgCall!void(this.handle, "vertexAttrib2f", "uint;float;float", tuple(indx, x, y)); 1340 } 1341 void vertexAttrib2fv()(uint indx, scope ref Float32List values) { 1342 Serialize_Object_VarArgCall!void(this.handle, "vertexAttrib2fv", "uint;SumType!(Handle,Handle)", tuple(indx, libwasm.sumtype.match!(((ref values.Types[0] v) => 0),((ref values.Types[1] v) => 1))(values),tuple(libwasm.sumtype.match!(((ref values.Types[0] v) => cast(Handle)v.handle),((ref values.Types[1] v) => Handle.init))(values),libwasm.sumtype.match!(((ref values.Types[0] v) => Handle.init),((ref values.Types[1] v) => cast(Handle)v.handle))(values)))); 1343 } 1344 void vertexAttrib3f()(uint indx, float x, float y, float z) { 1345 Serialize_Object_VarArgCall!void(this.handle, "vertexAttrib3f", "uint;float;float;float", tuple(indx, x, y, z)); 1346 } 1347 void vertexAttrib3fv()(uint indx, scope ref Float32List values) { 1348 Serialize_Object_VarArgCall!void(this.handle, "vertexAttrib3fv", "uint;SumType!(Handle,Handle)", tuple(indx, libwasm.sumtype.match!(((ref values.Types[0] v) => 0),((ref values.Types[1] v) => 1))(values),tuple(libwasm.sumtype.match!(((ref values.Types[0] v) => cast(Handle)v.handle),((ref values.Types[1] v) => Handle.init))(values),libwasm.sumtype.match!(((ref values.Types[0] v) => Handle.init),((ref values.Types[1] v) => cast(Handle)v.handle))(values)))); 1349 } 1350 void vertexAttrib4f()(uint indx, float x, float y, float z, float w) { 1351 Serialize_Object_VarArgCall!void(this.handle, "vertexAttrib4f", "uint;float;float;float;float", tuple(indx, x, y, z, w)); 1352 } 1353 void vertexAttrib4fv()(uint indx, scope ref Float32List values) { 1354 Serialize_Object_VarArgCall!void(this.handle, "vertexAttrib4fv", "uint;SumType!(Handle,Handle)", tuple(indx, libwasm.sumtype.match!(((ref values.Types[0] v) => 0),((ref values.Types[1] v) => 1))(values),tuple(libwasm.sumtype.match!(((ref values.Types[0] v) => cast(Handle)v.handle),((ref values.Types[1] v) => Handle.init))(values),libwasm.sumtype.match!(((ref values.Types[0] v) => Handle.init),((ref values.Types[1] v) => cast(Handle)v.handle))(values)))); 1355 } 1356 void vertexAttribPointer()(uint indx, int size, uint type, bool normalized, int stride, int offset) { 1357 Serialize_Object_VarArgCall!void(this.handle, "vertexAttribPointer", "uint;int;uint;bool;int;int", tuple(indx, size, type, normalized, stride, offset)); 1358 } 1359 void viewport()(int x, int y, int width, int height) { 1360 Serialize_Object_VarArgCall!void(this.handle, "viewport", "int;int;int;int", tuple(x, y, width, height)); 1361 } 1362 } 1363 struct WebGLRenderingContextBase { 1364 nothrow: 1365 JsHandle handle; 1366 alias handle this; 1367 this(Handle h) { 1368 this.handle = JsHandle(h); 1369 } 1370 enum uint DEPTH_BUFFER_BIT = 0x00000100; 1371 enum uint STENCIL_BUFFER_BIT = 0x00000400; 1372 enum uint COLOR_BUFFER_BIT = 0x00004000; 1373 enum uint POINTS = 0x0000; 1374 enum uint LINES = 0x0001; 1375 enum uint LINE_LOOP = 0x0002; 1376 enum uint LINE_STRIP = 0x0003; 1377 enum uint TRIANGLES = 0x0004; 1378 enum uint TRIANGLE_STRIP = 0x0005; 1379 enum uint TRIANGLE_FAN = 0x0006; 1380 enum uint ZERO = 0; 1381 enum uint ONE = 1; 1382 enum uint SRC_COLOR = 0x0300; 1383 enum uint ONE_MINUS_SRC_COLOR = 0x0301; 1384 enum uint SRC_ALPHA = 0x0302; 1385 enum uint ONE_MINUS_SRC_ALPHA = 0x0303; 1386 enum uint DST_ALPHA = 0x0304; 1387 enum uint ONE_MINUS_DST_ALPHA = 0x0305; 1388 enum uint DST_COLOR = 0x0306; 1389 enum uint ONE_MINUS_DST_COLOR = 0x0307; 1390 enum uint SRC_ALPHA_SATURATE = 0x0308; 1391 enum uint FUNC_ADD = 0x8006; 1392 enum uint BLEND_EQUATION = 0x8009; 1393 enum uint BLEND_EQUATION_RGB = 0x8009; 1394 enum uint BLEND_EQUATION_ALPHA = 0x883D; 1395 enum uint FUNC_SUBTRACT = 0x800A; 1396 enum uint FUNC_REVERSE_SUBTRACT = 0x800B; 1397 enum uint BLEND_DST_RGB = 0x80C8; 1398 enum uint BLEND_SRC_RGB = 0x80C9; 1399 enum uint BLEND_DST_ALPHA = 0x80CA; 1400 enum uint BLEND_SRC_ALPHA = 0x80CB; 1401 enum uint CONSTANT_COLOR = 0x8001; 1402 enum uint ONE_MINUS_CONSTANT_COLOR = 0x8002; 1403 enum uint CONSTANT_ALPHA = 0x8003; 1404 enum uint ONE_MINUS_CONSTANT_ALPHA = 0x8004; 1405 enum uint BLEND_COLOR = 0x8005; 1406 enum uint ARRAY_BUFFER = 0x8892; 1407 enum uint ELEMENT_ARRAY_BUFFER = 0x8893; 1408 enum uint ARRAY_BUFFER_BINDING = 0x8894; 1409 enum uint ELEMENT_ARRAY_BUFFER_BINDING = 0x8895; 1410 enum uint STREAM_DRAW = 0x88E0; 1411 enum uint STATIC_DRAW = 0x88E4; 1412 enum uint DYNAMIC_DRAW = 0x88E8; 1413 enum uint BUFFER_SIZE = 0x8764; 1414 enum uint BUFFER_USAGE = 0x8765; 1415 enum uint CURRENT_VERTEX_ATTRIB = 0x8626; 1416 enum uint FRONT = 0x0404; 1417 enum uint BACK = 0x0405; 1418 enum uint FRONT_AND_BACK = 0x0408; 1419 enum uint CULL_FACE = 0x0B44; 1420 enum uint BLEND = 0x0BE2; 1421 enum uint DITHER = 0x0BD0; 1422 enum uint STENCIL_TEST = 0x0B90; 1423 enum uint DEPTH_TEST = 0x0B71; 1424 enum uint SCISSOR_TEST = 0x0C11; 1425 enum uint POLYGON_OFFSET_FILL = 0x8037; 1426 enum uint SAMPLE_ALPHA_TO_COVERAGE = 0x809E; 1427 enum uint SAMPLE_COVERAGE = 0x80A0; 1428 enum uint NO_ERROR = 0; 1429 enum uint INVALID_ENUM = 0x0500; 1430 enum uint INVALID_VALUE = 0x0501; 1431 enum uint INVALID_OPERATION = 0x0502; 1432 enum uint OUT_OF_MEMORY = 0x0505; 1433 enum uint CW = 0x0900; 1434 enum uint CCW = 0x0901; 1435 enum uint LINE_WIDTH = 0x0B21; 1436 enum uint ALIASED_POINT_SIZE_RANGE = 0x846D; 1437 enum uint ALIASED_LINE_WIDTH_RANGE = 0x846E; 1438 enum uint CULL_FACE_MODE = 0x0B45; 1439 enum uint FRONT_FACE = 0x0B46; 1440 enum uint DEPTH_RANGE = 0x0B70; 1441 enum uint DEPTH_WRITEMASK = 0x0B72; 1442 enum uint DEPTH_CLEAR_VALUE = 0x0B73; 1443 enum uint DEPTH_FUNC = 0x0B74; 1444 enum uint STENCIL_CLEAR_VALUE = 0x0B91; 1445 enum uint STENCIL_FUNC = 0x0B92; 1446 enum uint STENCIL_FAIL = 0x0B94; 1447 enum uint STENCIL_PASS_DEPTH_FAIL = 0x0B95; 1448 enum uint STENCIL_PASS_DEPTH_PASS = 0x0B96; 1449 enum uint STENCIL_REF = 0x0B97; 1450 enum uint STENCIL_VALUE_MASK = 0x0B93; 1451 enum uint STENCIL_WRITEMASK = 0x0B98; 1452 enum uint STENCIL_BACK_FUNC = 0x8800; 1453 enum uint STENCIL_BACK_FAIL = 0x8801; 1454 enum uint STENCIL_BACK_PASS_DEPTH_FAIL = 0x8802; 1455 enum uint STENCIL_BACK_PASS_DEPTH_PASS = 0x8803; 1456 enum uint STENCIL_BACK_REF = 0x8CA3; 1457 enum uint STENCIL_BACK_VALUE_MASK = 0x8CA4; 1458 enum uint STENCIL_BACK_WRITEMASK = 0x8CA5; 1459 enum uint VIEWPORT = 0x0BA2; 1460 enum uint SCISSOR_BOX = 0x0C10; 1461 enum uint COLOR_CLEAR_VALUE = 0x0C22; 1462 enum uint COLOR_WRITEMASK = 0x0C23; 1463 enum uint UNPACK_ALIGNMENT = 0x0CF5; 1464 enum uint PACK_ALIGNMENT = 0x0D05; 1465 enum uint MAX_TEXTURE_SIZE = 0x0D33; 1466 enum uint MAX_VIEWPORT_DIMS = 0x0D3A; 1467 enum uint SUBPIXEL_BITS = 0x0D50; 1468 enum uint RED_BITS = 0x0D52; 1469 enum uint GREEN_BITS = 0x0D53; 1470 enum uint BLUE_BITS = 0x0D54; 1471 enum uint ALPHA_BITS = 0x0D55; 1472 enum uint DEPTH_BITS = 0x0D56; 1473 enum uint STENCIL_BITS = 0x0D57; 1474 enum uint POLYGON_OFFSET_UNITS = 0x2A00; 1475 enum uint POLYGON_OFFSET_FACTOR = 0x8038; 1476 enum uint TEXTURE_BINDING_2D = 0x8069; 1477 enum uint SAMPLE_BUFFERS = 0x80A8; 1478 enum uint SAMPLES = 0x80A9; 1479 enum uint SAMPLE_COVERAGE_VALUE = 0x80AA; 1480 enum uint SAMPLE_COVERAGE_INVERT = 0x80AB; 1481 enum uint COMPRESSED_TEXTURE_FORMATS = 0x86A3; 1482 enum uint DONT_CARE = 0x1100; 1483 enum uint FASTEST = 0x1101; 1484 enum uint NICEST = 0x1102; 1485 enum uint GENERATE_MIPMAP_HINT = 0x8192; 1486 enum uint BYTE = 0x1400; 1487 enum uint UNSIGNED_BYTE = 0x1401; 1488 enum uint SHORT = 0x1402; 1489 enum uint UNSIGNED_SHORT = 0x1403; 1490 enum uint INT = 0x1404; 1491 enum uint UNSIGNED_INT = 0x1405; 1492 enum uint FLOAT = 0x1406; 1493 enum uint DEPTH_COMPONENT = 0x1902; 1494 enum uint ALPHA = 0x1906; 1495 enum uint RGB = 0x1907; 1496 enum uint RGBA = 0x1908; 1497 enum uint LUMINANCE = 0x1909; 1498 enum uint LUMINANCE_ALPHA = 0x190A; 1499 enum uint UNSIGNED_SHORT_4_4_4_4 = 0x8033; 1500 enum uint UNSIGNED_SHORT_5_5_5_1 = 0x8034; 1501 enum uint UNSIGNED_SHORT_5_6_5 = 0x8363; 1502 enum uint FRAGMENT_SHADER = 0x8B30; 1503 enum uint VERTEX_SHADER = 0x8B31; 1504 enum uint MAX_VERTEX_ATTRIBS = 0x8869; 1505 enum uint MAX_VERTEX_UNIFORM_VECTORS = 0x8DFB; 1506 enum uint MAX_VARYING_VECTORS = 0x8DFC; 1507 enum uint MAX_COMBINED_TEXTURE_IMAGE_UNITS = 0x8B4D; 1508 enum uint MAX_VERTEX_TEXTURE_IMAGE_UNITS = 0x8B4C; 1509 enum uint MAX_TEXTURE_IMAGE_UNITS = 0x8872; 1510 enum uint MAX_FRAGMENT_UNIFORM_VECTORS = 0x8DFD; 1511 enum uint SHADER_TYPE = 0x8B4F; 1512 enum uint DELETE_STATUS = 0x8B80; 1513 enum uint LINK_STATUS = 0x8B82; 1514 enum uint VALIDATE_STATUS = 0x8B83; 1515 enum uint ATTACHED_SHADERS = 0x8B85; 1516 enum uint ACTIVE_UNIFORMS = 0x8B86; 1517 enum uint ACTIVE_ATTRIBUTES = 0x8B89; 1518 enum uint SHADING_LANGUAGE_VERSION = 0x8B8C; 1519 enum uint CURRENT_PROGRAM = 0x8B8D; 1520 enum uint NEVER = 0x0200; 1521 enum uint LESS = 0x0201; 1522 enum uint EQUAL = 0x0202; 1523 enum uint LEQUAL = 0x0203; 1524 enum uint GREATER = 0x0204; 1525 enum uint NOTEQUAL = 0x0205; 1526 enum uint GEQUAL = 0x0206; 1527 enum uint ALWAYS = 0x0207; 1528 enum uint KEEP = 0x1E00; 1529 enum uint REPLACE = 0x1E01; 1530 enum uint INCR = 0x1E02; 1531 enum uint DECR = 0x1E03; 1532 enum uint INVERT = 0x150A; 1533 enum uint INCR_WRAP = 0x8507; 1534 enum uint DECR_WRAP = 0x8508; 1535 enum uint VENDOR = 0x1F00; 1536 enum uint RENDERER = 0x1F01; 1537 enum uint VERSION = 0x1F02; 1538 enum uint NEAREST = 0x2600; 1539 enum uint LINEAR = 0x2601; 1540 enum uint NEAREST_MIPMAP_NEAREST = 0x2700; 1541 enum uint LINEAR_MIPMAP_NEAREST = 0x2701; 1542 enum uint NEAREST_MIPMAP_LINEAR = 0x2702; 1543 enum uint LINEAR_MIPMAP_LINEAR = 0x2703; 1544 enum uint TEXTURE_MAG_FILTER = 0x2800; 1545 enum uint TEXTURE_MIN_FILTER = 0x2801; 1546 enum uint TEXTURE_WRAP_S = 0x2802; 1547 enum uint TEXTURE_WRAP_T = 0x2803; 1548 enum uint TEXTURE_2D = 0x0DE1; 1549 enum uint TEXTURE = 0x1702; 1550 enum uint TEXTURE_CUBE_MAP = 0x8513; 1551 enum uint TEXTURE_BINDING_CUBE_MAP = 0x8514; 1552 enum uint TEXTURE_CUBE_MAP_POSITIVE_X = 0x8515; 1553 enum uint TEXTURE_CUBE_MAP_NEGATIVE_X = 0x8516; 1554 enum uint TEXTURE_CUBE_MAP_POSITIVE_Y = 0x8517; 1555 enum uint TEXTURE_CUBE_MAP_NEGATIVE_Y = 0x8518; 1556 enum uint TEXTURE_CUBE_MAP_POSITIVE_Z = 0x8519; 1557 enum uint TEXTURE_CUBE_MAP_NEGATIVE_Z = 0x851A; 1558 enum uint MAX_CUBE_MAP_TEXTURE_SIZE = 0x851C; 1559 enum uint TEXTURE0 = 0x84C0; 1560 enum uint TEXTURE1 = 0x84C1; 1561 enum uint TEXTURE2 = 0x84C2; 1562 enum uint TEXTURE3 = 0x84C3; 1563 enum uint TEXTURE4 = 0x84C4; 1564 enum uint TEXTURE5 = 0x84C5; 1565 enum uint TEXTURE6 = 0x84C6; 1566 enum uint TEXTURE7 = 0x84C7; 1567 enum uint TEXTURE8 = 0x84C8; 1568 enum uint TEXTURE9 = 0x84C9; 1569 enum uint TEXTURE10 = 0x84CA; 1570 enum uint TEXTURE11 = 0x84CB; 1571 enum uint TEXTURE12 = 0x84CC; 1572 enum uint TEXTURE13 = 0x84CD; 1573 enum uint TEXTURE14 = 0x84CE; 1574 enum uint TEXTURE15 = 0x84CF; 1575 enum uint TEXTURE16 = 0x84D0; 1576 enum uint TEXTURE17 = 0x84D1; 1577 enum uint TEXTURE18 = 0x84D2; 1578 enum uint TEXTURE19 = 0x84D3; 1579 enum uint TEXTURE20 = 0x84D4; 1580 enum uint TEXTURE21 = 0x84D5; 1581 enum uint TEXTURE22 = 0x84D6; 1582 enum uint TEXTURE23 = 0x84D7; 1583 enum uint TEXTURE24 = 0x84D8; 1584 enum uint TEXTURE25 = 0x84D9; 1585 enum uint TEXTURE26 = 0x84DA; 1586 enum uint TEXTURE27 = 0x84DB; 1587 enum uint TEXTURE28 = 0x84DC; 1588 enum uint TEXTURE29 = 0x84DD; 1589 enum uint TEXTURE30 = 0x84DE; 1590 enum uint TEXTURE31 = 0x84DF; 1591 enum uint ACTIVE_TEXTURE = 0x84E0; 1592 enum uint REPEAT = 0x2901; 1593 enum uint CLAMP_TO_EDGE = 0x812F; 1594 enum uint MIRRORED_REPEAT = 0x8370; 1595 enum uint FLOAT_VEC2 = 0x8B50; 1596 enum uint FLOAT_VEC3 = 0x8B51; 1597 enum uint FLOAT_VEC4 = 0x8B52; 1598 enum uint INT_VEC2 = 0x8B53; 1599 enum uint INT_VEC3 = 0x8B54; 1600 enum uint INT_VEC4 = 0x8B55; 1601 enum uint BOOL = 0x8B56; 1602 enum uint BOOL_VEC2 = 0x8B57; 1603 enum uint BOOL_VEC3 = 0x8B58; 1604 enum uint BOOL_VEC4 = 0x8B59; 1605 enum uint FLOAT_MAT2 = 0x8B5A; 1606 enum uint FLOAT_MAT3 = 0x8B5B; 1607 enum uint FLOAT_MAT4 = 0x8B5C; 1608 enum uint SAMPLER_2D = 0x8B5E; 1609 enum uint SAMPLER_CUBE = 0x8B60; 1610 enum uint VERTEX_ATTRIB_ARRAY_ENABLED = 0x8622; 1611 enum uint VERTEX_ATTRIB_ARRAY_SIZE = 0x8623; 1612 enum uint VERTEX_ATTRIB_ARRAY_STRIDE = 0x8624; 1613 enum uint VERTEX_ATTRIB_ARRAY_TYPE = 0x8625; 1614 enum uint VERTEX_ATTRIB_ARRAY_NORMALIZED = 0x886A; 1615 enum uint VERTEX_ATTRIB_ARRAY_POINTER = 0x8645; 1616 enum uint VERTEX_ATTRIB_ARRAY_BUFFER_BINDING = 0x889F; 1617 enum uint IMPLEMENTATION_COLOR_READ_TYPE = 0x8B9A; 1618 enum uint IMPLEMENTATION_COLOR_READ_FORMAT = 0x8B9B; 1619 enum uint COMPILE_STATUS = 0x8B81; 1620 enum uint LOW_FLOAT = 0x8DF0; 1621 enum uint MEDIUM_FLOAT = 0x8DF1; 1622 enum uint HIGH_FLOAT = 0x8DF2; 1623 enum uint LOW_INT = 0x8DF3; 1624 enum uint MEDIUM_INT = 0x8DF4; 1625 enum uint HIGH_INT = 0x8DF5; 1626 enum uint FRAMEBUFFER = 0x8D40; 1627 enum uint RENDERBUFFER = 0x8D41; 1628 enum uint RGBA4 = 0x8056; 1629 enum uint RGB5_A1 = 0x8057; 1630 enum uint RGB565 = 0x8D62; 1631 enum uint DEPTH_COMPONENT16 = 0x81A5; 1632 enum uint STENCIL_INDEX8 = 0x8D48; 1633 enum uint DEPTH_STENCIL = 0x84F9; 1634 enum uint RENDERBUFFER_WIDTH = 0x8D42; 1635 enum uint RENDERBUFFER_HEIGHT = 0x8D43; 1636 enum uint RENDERBUFFER_INTERNAL_FORMAT = 0x8D44; 1637 enum uint RENDERBUFFER_RED_SIZE = 0x8D50; 1638 enum uint RENDERBUFFER_GREEN_SIZE = 0x8D51; 1639 enum uint RENDERBUFFER_BLUE_SIZE = 0x8D52; 1640 enum uint RENDERBUFFER_ALPHA_SIZE = 0x8D53; 1641 enum uint RENDERBUFFER_DEPTH_SIZE = 0x8D54; 1642 enum uint RENDERBUFFER_STENCIL_SIZE = 0x8D55; 1643 enum uint FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE = 0x8CD0; 1644 enum uint FRAMEBUFFER_ATTACHMENT_OBJECT_NAME = 0x8CD1; 1645 enum uint FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL = 0x8CD2; 1646 enum uint FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE = 0x8CD3; 1647 enum uint COLOR_ATTACHMENT0 = 0x8CE0; 1648 enum uint DEPTH_ATTACHMENT = 0x8D00; 1649 enum uint STENCIL_ATTACHMENT = 0x8D20; 1650 enum uint DEPTH_STENCIL_ATTACHMENT = 0x821A; 1651 enum uint NONE = 0; 1652 enum uint FRAMEBUFFER_COMPLETE = 0x8CD5; 1653 enum uint FRAMEBUFFER_INCOMPLETE_ATTACHMENT = 0x8CD6; 1654 enum uint FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT = 0x8CD7; 1655 enum uint FRAMEBUFFER_INCOMPLETE_DIMENSIONS = 0x8CD9; 1656 enum uint FRAMEBUFFER_UNSUPPORTED = 0x8CDD; 1657 enum uint FRAMEBUFFER_BINDING = 0x8CA6; 1658 enum uint RENDERBUFFER_BINDING = 0x8CA7; 1659 enum uint MAX_RENDERBUFFER_SIZE = 0x84E8; 1660 enum uint INVALID_FRAMEBUFFER_OPERATION = 0x0506; 1661 enum uint UNPACK_FLIP_Y_WEBGL = 0x9240; 1662 enum uint UNPACK_PREMULTIPLY_ALPHA_WEBGL = 0x9241; 1663 enum uint CONTEXT_LOST_WEBGL = 0x9242; 1664 enum uint UNPACK_COLORSPACE_CONVERSION_WEBGL = 0x9243; 1665 enum uint BROWSER_DEFAULT_WEBGL = 0x9244; 1666 auto canvas()() { 1667 return WebGLRenderingContextBase_canvas_Get(this.handle); 1668 } 1669 int drawingBufferWidth()() { 1670 return Object_Getter__int(this.handle, "drawingBufferWidth"); 1671 } 1672 int drawingBufferHeight()() { 1673 return Object_Getter__int(this.handle, "drawingBufferHeight"); 1674 } 1675 auto getContextAttributes()() { 1676 return recastOpt!(WebGLContextAttributes)(Object_Getter__OptionalHandle(this.handle, "getContextAttributes")); 1677 } 1678 bool isContextLost()() { 1679 return Object_Getter__bool(this.handle, "isContextLost"); 1680 } 1681 auto getSupportedExtensions()() { 1682 return recastOpt!(Sequence!(string))(Object_Getter__OptionalHandle(this.handle, "getSupportedExtensions")); 1683 } 1684 auto getExtension()(string name) { 1685 return recastOpt!(JsObject)(Object_Call_string__OptionalHandle(this.handle, "getExtension", name)); 1686 } 1687 void activeTexture()(uint texture) { 1688 Object_Call_uint__void(this.handle, "activeTexture", texture); 1689 } 1690 void attachShader()(scope ref WebGLProgram program, scope ref WebGLShader shader) { 1691 Serialize_Object_VarArgCall!void(this.handle, "attachShader", "Handle;Handle", tuple(cast(Handle)program.handle, cast(Handle)shader.handle)); 1692 } 1693 void bindAttribLocation()(scope ref WebGLProgram program, uint index, string name) { 1694 Serialize_Object_VarArgCall!void(this.handle, "bindAttribLocation", "Handle;uint;string", tuple(cast(Handle)program.handle, index, name)); 1695 } 1696 void bindBuffer(T1)(uint target, scope auto ref Optional!(T1) buffer) if (isTOrPointer!(T1, WebGLBuffer)) { 1697 Serialize_Object_VarArgCall!void(this.handle, "bindBuffer", "uint;Optional!Handle", tuple(target, !buffer.empty, cast(Handle)buffer.front.handle)); 1698 } 1699 void bindFramebuffer(T1)(uint target, scope auto ref Optional!(T1) framebuffer) if (isTOrPointer!(T1, WebGLFramebuffer)) { 1700 Serialize_Object_VarArgCall!void(this.handle, "bindFramebuffer", "uint;Optional!Handle", tuple(target, !framebuffer.empty, cast(Handle)framebuffer.front.handle)); 1701 } 1702 void bindRenderbuffer(T1)(uint target, scope auto ref Optional!(T1) renderbuffer) if (isTOrPointer!(T1, WebGLRenderbuffer)) { 1703 Serialize_Object_VarArgCall!void(this.handle, "bindRenderbuffer", "uint;Optional!Handle", tuple(target, !renderbuffer.empty, cast(Handle)renderbuffer.front.handle)); 1704 } 1705 void bindTexture(T1)(uint target, scope auto ref Optional!(T1) texture) if (isTOrPointer!(T1, WebGLTexture)) { 1706 Serialize_Object_VarArgCall!void(this.handle, "bindTexture", "uint;Optional!Handle", tuple(target, !texture.empty, cast(Handle)texture.front.handle)); 1707 } 1708 void blendColor()(float red, float green, float blue, float alpha) { 1709 Serialize_Object_VarArgCall!void(this.handle, "blendColor", "float;float;float;float", tuple(red, green, blue, alpha)); 1710 } 1711 void blendEquation()(uint mode) { 1712 Object_Call_uint__void(this.handle, "blendEquation", mode); 1713 } 1714 void blendEquationSeparate()(uint modeRGB, uint modeAlpha) { 1715 Serialize_Object_VarArgCall!void(this.handle, "blendEquationSeparate", "uint;uint", tuple(modeRGB, modeAlpha)); 1716 } 1717 void blendFunc()(uint sfactor, uint dfactor) { 1718 Serialize_Object_VarArgCall!void(this.handle, "blendFunc", "uint;uint", tuple(sfactor, dfactor)); 1719 } 1720 void blendFuncSeparate()(uint srcRGB, uint dstRGB, uint srcAlpha, uint dstAlpha) { 1721 Serialize_Object_VarArgCall!void(this.handle, "blendFuncSeparate", "uint;uint;uint;uint", tuple(srcRGB, dstRGB, srcAlpha, dstAlpha)); 1722 } 1723 uint checkFramebufferStatus()(uint target) { 1724 return Serialize_Object_VarArgCall!uint(this.handle, "checkFramebufferStatus", "uint", tuple(target)); 1725 } 1726 void clear()(uint mask) { 1727 Object_Call_uint__void(this.handle, "clear", mask); 1728 } 1729 void clearColor()(float red, float green, float blue, float alpha) { 1730 Serialize_Object_VarArgCall!void(this.handle, "clearColor", "float;float;float;float", tuple(red, green, blue, alpha)); 1731 } 1732 void clearDepth()(float depth) { 1733 Object_Call_float__void(this.handle, "clearDepth", depth); 1734 } 1735 void clearStencil()(int s) { 1736 Object_Call_int__void(this.handle, "clearStencil", s); 1737 } 1738 void colorMask()(bool red, bool green, bool blue, bool alpha) { 1739 Serialize_Object_VarArgCall!void(this.handle, "colorMask", "bool;bool;bool;bool", tuple(red, green, blue, alpha)); 1740 } 1741 void compileShader()(scope ref WebGLShader shader) { 1742 Object_Call_Handle__void(this.handle, "compileShader", shader.handle); 1743 } 1744 void copyTexImage2D()(uint target, int level, uint internalformat, int x, int y, int width, int height, int border) { 1745 Serialize_Object_VarArgCall!void(this.handle, "copyTexImage2D", "uint;int;uint;int;int;int;int;int", tuple(target, level, internalformat, x, y, width, height, border)); 1746 } 1747 void copyTexSubImage2D()(uint target, int level, int xoffset, int yoffset, int x, int y, int width, int height) { 1748 Serialize_Object_VarArgCall!void(this.handle, "copyTexSubImage2D", "uint;int;int;int;int;int;int;int", tuple(target, level, xoffset, yoffset, x, y, width, height)); 1749 } 1750 auto createBuffer()() { 1751 return recastOpt!(WebGLBuffer)(Object_Getter__OptionalHandle(this.handle, "createBuffer")); 1752 } 1753 auto createFramebuffer()() { 1754 return recastOpt!(WebGLFramebuffer)(Object_Getter__OptionalHandle(this.handle, "createFramebuffer")); 1755 } 1756 auto createProgram()() { 1757 return recastOpt!(WebGLProgram)(Object_Getter__OptionalHandle(this.handle, "createProgram")); 1758 } 1759 auto createRenderbuffer()() { 1760 return recastOpt!(WebGLRenderbuffer)(Object_Getter__OptionalHandle(this.handle, "createRenderbuffer")); 1761 } 1762 auto createShader()(uint type) { 1763 return recastOpt!(WebGLShader)(Object_Call_uint__OptionalHandle(this.handle, "createShader", type)); 1764 } 1765 auto createTexture()() { 1766 return recastOpt!(WebGLTexture)(Object_Getter__OptionalHandle(this.handle, "createTexture")); 1767 } 1768 void cullFace()(uint mode) { 1769 Object_Call_uint__void(this.handle, "cullFace", mode); 1770 } 1771 void deleteBuffer(T0)(scope auto ref Optional!(T0) buffer) if (isTOrPointer!(T0, WebGLBuffer)) { 1772 Serialize_Object_VarArgCall!void(this.handle, "deleteBuffer", "Optional!Handle", tuple(!buffer.empty, cast(Handle)buffer.front.handle)); 1773 } 1774 void deleteFramebuffer(T0)(scope auto ref Optional!(T0) framebuffer) if (isTOrPointer!(T0, WebGLFramebuffer)) { 1775 Serialize_Object_VarArgCall!void(this.handle, "deleteFramebuffer", "Optional!Handle", tuple(!framebuffer.empty, cast(Handle)framebuffer.front.handle)); 1776 } 1777 void deleteProgram(T0)(scope auto ref Optional!(T0) program) if (isTOrPointer!(T0, WebGLProgram)) { 1778 Serialize_Object_VarArgCall!void(this.handle, "deleteProgram", "Optional!Handle", tuple(!program.empty, cast(Handle)program.front.handle)); 1779 } 1780 void deleteRenderbuffer(T0)(scope auto ref Optional!(T0) renderbuffer) if (isTOrPointer!(T0, WebGLRenderbuffer)) { 1781 Serialize_Object_VarArgCall!void(this.handle, "deleteRenderbuffer", "Optional!Handle", tuple(!renderbuffer.empty, cast(Handle)renderbuffer.front.handle)); 1782 } 1783 void deleteShader(T0)(scope auto ref Optional!(T0) shader) if (isTOrPointer!(T0, WebGLShader)) { 1784 Serialize_Object_VarArgCall!void(this.handle, "deleteShader", "Optional!Handle", tuple(!shader.empty, cast(Handle)shader.front.handle)); 1785 } 1786 void deleteTexture(T0)(scope auto ref Optional!(T0) texture) if (isTOrPointer!(T0, WebGLTexture)) { 1787 Serialize_Object_VarArgCall!void(this.handle, "deleteTexture", "Optional!Handle", tuple(!texture.empty, cast(Handle)texture.front.handle)); 1788 } 1789 void depthFunc()(uint func) { 1790 Object_Call_uint__void(this.handle, "depthFunc", func); 1791 } 1792 void depthMask()(bool flag) { 1793 Object_Call_bool__void(this.handle, "depthMask", flag); 1794 } 1795 void depthRange()(float zNear, float zFar) { 1796 Serialize_Object_VarArgCall!void(this.handle, "depthRange", "float;float", tuple(zNear, zFar)); 1797 } 1798 void detachShader()(scope ref WebGLProgram program, scope ref WebGLShader shader) { 1799 Serialize_Object_VarArgCall!void(this.handle, "detachShader", "Handle;Handle", tuple(cast(Handle)program.handle, cast(Handle)shader.handle)); 1800 } 1801 void disable()(uint cap) { 1802 Object_Call_uint__void(this.handle, "disable", cap); 1803 } 1804 void disableVertexAttribArray()(uint index) { 1805 Object_Call_uint__void(this.handle, "disableVertexAttribArray", index); 1806 } 1807 void drawArrays()(uint mode, int first, int count) { 1808 Serialize_Object_VarArgCall!void(this.handle, "drawArrays", "uint;int;int", tuple(mode, first, count)); 1809 } 1810 void drawElements()(uint mode, int count, uint type, int offset) { 1811 Serialize_Object_VarArgCall!void(this.handle, "drawElements", "uint;int;uint;int", tuple(mode, count, type, offset)); 1812 } 1813 void enable()(uint cap) { 1814 Object_Call_uint__void(this.handle, "enable", cap); 1815 } 1816 void enableVertexAttribArray()(uint index) { 1817 Object_Call_uint__void(this.handle, "enableVertexAttribArray", index); 1818 } 1819 void finish()() { 1820 Object_Call__void(this.handle, "finish"); 1821 } 1822 void flush()() { 1823 Object_Call__void(this.handle, "flush"); 1824 } 1825 void framebufferRenderbuffer(T3)(uint target, uint attachment, uint renderbuffertarget, scope auto ref Optional!(T3) renderbuffer) if (isTOrPointer!(T3, WebGLRenderbuffer)) { 1826 Serialize_Object_VarArgCall!void(this.handle, "framebufferRenderbuffer", "uint;uint;uint;Optional!Handle", tuple(target, attachment, renderbuffertarget, !renderbuffer.empty, cast(Handle)renderbuffer.front.handle)); 1827 } 1828 void framebufferTexture2D(T3)(uint target, uint attachment, uint textarget, scope auto ref Optional!(T3) texture, int level) if (isTOrPointer!(T3, WebGLTexture)) { 1829 Serialize_Object_VarArgCall!void(this.handle, "framebufferTexture2D", "uint;uint;uint;Optional!Handle;int", tuple(target, attachment, textarget, !texture.empty, cast(Handle)texture.front.handle, level)); 1830 } 1831 void frontFace()(uint mode) { 1832 Object_Call_uint__void(this.handle, "frontFace", mode); 1833 } 1834 void generateMipmap()(uint target) { 1835 Object_Call_uint__void(this.handle, "generateMipmap", target); 1836 } 1837 auto getActiveAttrib()(scope ref WebGLProgram program, uint index) { 1838 return recastOpt!(WebGLActiveInfo)(Serialize_Object_VarArgCall!(Optional!Handle)(this.handle, "getActiveAttrib", "Handle;uint", tuple(cast(Handle)program.handle, index))); 1839 } 1840 auto getActiveUniform()(scope ref WebGLProgram program, uint index) { 1841 return recastOpt!(WebGLActiveInfo)(Serialize_Object_VarArgCall!(Optional!Handle)(this.handle, "getActiveUniform", "Handle;uint", tuple(cast(Handle)program.handle, index))); 1842 } 1843 auto getAttachedShaders()(scope ref WebGLProgram program) { 1844 return recastOpt!(Sequence!(WebGLShader))(Serialize_Object_VarArgCall!(Optional!Handle)(this.handle, "getAttachedShaders", "Handle", tuple(cast(Handle)program.handle))); 1845 } 1846 int getAttribLocation()(scope ref WebGLProgram program, string name) { 1847 return Serialize_Object_VarArgCall!int(this.handle, "getAttribLocation", "Handle;string", tuple(cast(Handle)program.handle, name)); 1848 } 1849 auto getBufferParameter()(uint target, uint pname) { 1850 return Any(Serialize_Object_VarArgCall!Handle(this.handle, "getBufferParameter", "uint;uint", tuple(target, pname))); 1851 } 1852 auto getParameter()(uint pname) { 1853 return Any(Object_Call_uint__Handle(this.handle, "getParameter", pname)); 1854 } 1855 uint getError()() { 1856 return Object_Getter__uint(this.handle, "getError"); 1857 } 1858 auto getFramebufferAttachmentParameter()(uint target, uint attachment, uint pname) { 1859 return Any(Serialize_Object_VarArgCall!Handle(this.handle, "getFramebufferAttachmentParameter", "uint;uint;uint", tuple(target, attachment, pname))); 1860 } 1861 auto getProgramParameter()(scope ref WebGLProgram program, uint pname) { 1862 return Any(Serialize_Object_VarArgCall!Handle(this.handle, "getProgramParameter", "Handle;uint", tuple(cast(Handle)program.handle, pname))); 1863 } 1864 Optional!(string) getProgramInfoLog()(scope ref WebGLProgram program) { 1865 return Serialize_Object_VarArgCall!(Optional!string)(this.handle, "getProgramInfoLog", "Handle", tuple(cast(Handle)program.handle)); 1866 } 1867 auto getRenderbufferParameter()(uint target, uint pname) { 1868 return Any(Serialize_Object_VarArgCall!Handle(this.handle, "getRenderbufferParameter", "uint;uint", tuple(target, pname))); 1869 } 1870 auto getShaderParameter()(scope ref WebGLShader shader, uint pname) { 1871 return Any(Serialize_Object_VarArgCall!Handle(this.handle, "getShaderParameter", "Handle;uint", tuple(cast(Handle)shader.handle, pname))); 1872 } 1873 auto getShaderPrecisionFormat()(uint shadertype, uint precisiontype) { 1874 return recastOpt!(WebGLShaderPrecisionFormat)(Serialize_Object_VarArgCall!(Optional!Handle)(this.handle, "getShaderPrecisionFormat", "uint;uint", tuple(shadertype, precisiontype))); 1875 } 1876 Optional!(string) getShaderInfoLog()(scope ref WebGLShader shader) { 1877 return Serialize_Object_VarArgCall!(Optional!string)(this.handle, "getShaderInfoLog", "Handle", tuple(cast(Handle)shader.handle)); 1878 } 1879 Optional!(string) getShaderSource()(scope ref WebGLShader shader) { 1880 return Serialize_Object_VarArgCall!(Optional!string)(this.handle, "getShaderSource", "Handle", tuple(cast(Handle)shader.handle)); 1881 } 1882 auto getTexParameter()(uint target, uint pname) { 1883 return Any(Serialize_Object_VarArgCall!Handle(this.handle, "getTexParameter", "uint;uint", tuple(target, pname))); 1884 } 1885 auto getUniform()(scope ref WebGLProgram program, scope ref WebGLUniformLocation location) { 1886 return Any(Serialize_Object_VarArgCall!Handle(this.handle, "getUniform", "Handle;Handle", tuple(cast(Handle)program.handle, cast(Handle)location.handle))); 1887 } 1888 auto getUniformLocation()(scope ref WebGLProgram program, string name) { 1889 return recastOpt!(WebGLUniformLocation)(Serialize_Object_VarArgCall!(Optional!Handle)(this.handle, "getUniformLocation", "Handle;string", tuple(cast(Handle)program.handle, name))); 1890 } 1891 auto getVertexAttrib()(uint index, uint pname) { 1892 return Any(Serialize_Object_VarArgCall!Handle(this.handle, "getVertexAttrib", "uint;uint", tuple(index, pname))); 1893 } 1894 int getVertexAttribOffset()(uint index, uint pname) { 1895 return Serialize_Object_VarArgCall!int(this.handle, "getVertexAttribOffset", "uint;uint", tuple(index, pname)); 1896 } 1897 void hint()(uint target, uint mode) { 1898 Serialize_Object_VarArgCall!void(this.handle, "hint", "uint;uint", tuple(target, mode)); 1899 } 1900 bool isBuffer(T0)(scope auto ref Optional!(T0) buffer) if (isTOrPointer!(T0, WebGLBuffer)) { 1901 return Serialize_Object_VarArgCall!bool(this.handle, "isBuffer", "Optional!Handle", tuple(!buffer.empty, cast(Handle)buffer.front.handle)); 1902 } 1903 bool isEnabled()(uint cap) { 1904 return Serialize_Object_VarArgCall!bool(this.handle, "isEnabled", "uint", tuple(cap)); 1905 } 1906 bool isFramebuffer(T0)(scope auto ref Optional!(T0) framebuffer) if (isTOrPointer!(T0, WebGLFramebuffer)) { 1907 return Serialize_Object_VarArgCall!bool(this.handle, "isFramebuffer", "Optional!Handle", tuple(!framebuffer.empty, cast(Handle)framebuffer.front.handle)); 1908 } 1909 bool isProgram(T0)(scope auto ref Optional!(T0) program) if (isTOrPointer!(T0, WebGLProgram)) { 1910 return Serialize_Object_VarArgCall!bool(this.handle, "isProgram", "Optional!Handle", tuple(!program.empty, cast(Handle)program.front.handle)); 1911 } 1912 bool isRenderbuffer(T0)(scope auto ref Optional!(T0) renderbuffer) if (isTOrPointer!(T0, WebGLRenderbuffer)) { 1913 return Serialize_Object_VarArgCall!bool(this.handle, "isRenderbuffer", "Optional!Handle", tuple(!renderbuffer.empty, cast(Handle)renderbuffer.front.handle)); 1914 } 1915 bool isShader(T0)(scope auto ref Optional!(T0) shader) if (isTOrPointer!(T0, WebGLShader)) { 1916 return Serialize_Object_VarArgCall!bool(this.handle, "isShader", "Optional!Handle", tuple(!shader.empty, cast(Handle)shader.front.handle)); 1917 } 1918 bool isTexture(T0)(scope auto ref Optional!(T0) texture) if (isTOrPointer!(T0, WebGLTexture)) { 1919 return Serialize_Object_VarArgCall!bool(this.handle, "isTexture", "Optional!Handle", tuple(!texture.empty, cast(Handle)texture.front.handle)); 1920 } 1921 void lineWidth()(float width) { 1922 Object_Call_float__void(this.handle, "lineWidth", width); 1923 } 1924 void linkProgram()(scope ref WebGLProgram program) { 1925 Object_Call_Handle__void(this.handle, "linkProgram", program.handle); 1926 } 1927 void pixelStorei()(uint pname, int param) { 1928 Serialize_Object_VarArgCall!void(this.handle, "pixelStorei", "uint;int", tuple(pname, param)); 1929 } 1930 void polygonOffset()(float factor, float units) { 1931 Serialize_Object_VarArgCall!void(this.handle, "polygonOffset", "float;float", tuple(factor, units)); 1932 } 1933 void renderbufferStorage()(uint target, uint internalformat, int width, int height) { 1934 Serialize_Object_VarArgCall!void(this.handle, "renderbufferStorage", "uint;uint;int;int", tuple(target, internalformat, width, height)); 1935 } 1936 void sampleCoverage()(float value, bool invert) { 1937 Serialize_Object_VarArgCall!void(this.handle, "sampleCoverage", "float;bool", tuple(value, invert)); 1938 } 1939 void scissor()(int x, int y, int width, int height) { 1940 Serialize_Object_VarArgCall!void(this.handle, "scissor", "int;int;int;int", tuple(x, y, width, height)); 1941 } 1942 void shaderSource()(scope ref WebGLShader shader, string source) { 1943 Serialize_Object_VarArgCall!void(this.handle, "shaderSource", "Handle;string", tuple(cast(Handle)shader.handle, source)); 1944 } 1945 void stencilFunc()(uint func, int ref_, uint mask) { 1946 Serialize_Object_VarArgCall!void(this.handle, "stencilFunc", "uint;int;uint", tuple(func, ref_, mask)); 1947 } 1948 void stencilFuncSeparate()(uint face, uint func, int ref_, uint mask) { 1949 Serialize_Object_VarArgCall!void(this.handle, "stencilFuncSeparate", "uint;uint;int;uint", tuple(face, func, ref_, mask)); 1950 } 1951 void stencilMask()(uint mask) { 1952 Object_Call_uint__void(this.handle, "stencilMask", mask); 1953 } 1954 void stencilMaskSeparate()(uint face, uint mask) { 1955 Serialize_Object_VarArgCall!void(this.handle, "stencilMaskSeparate", "uint;uint", tuple(face, mask)); 1956 } 1957 void stencilOp()(uint fail, uint zfail, uint zpass) { 1958 Serialize_Object_VarArgCall!void(this.handle, "stencilOp", "uint;uint;uint", tuple(fail, zfail, zpass)); 1959 } 1960 void stencilOpSeparate()(uint face, uint fail, uint zfail, uint zpass) { 1961 Serialize_Object_VarArgCall!void(this.handle, "stencilOpSeparate", "uint;uint;uint;uint", tuple(face, fail, zfail, zpass)); 1962 } 1963 void texParameterf()(uint target, uint pname, float param) { 1964 Serialize_Object_VarArgCall!void(this.handle, "texParameterf", "uint;uint;float", tuple(target, pname, param)); 1965 } 1966 void texParameteri()(uint target, uint pname, int param) { 1967 Serialize_Object_VarArgCall!void(this.handle, "texParameteri", "uint;uint;int", tuple(target, pname, param)); 1968 } 1969 void uniform1f(T0)(scope auto ref Optional!(T0) location, float x) if (isTOrPointer!(T0, WebGLUniformLocation)) { 1970 Serialize_Object_VarArgCall!void(this.handle, "uniform1f", "Optional!Handle;float", tuple(!location.empty, cast(Handle)location.front.handle, x)); 1971 } 1972 void uniform2f(T0)(scope auto ref Optional!(T0) location, float x, float y) if (isTOrPointer!(T0, WebGLUniformLocation)) { 1973 Serialize_Object_VarArgCall!void(this.handle, "uniform2f", "Optional!Handle;float;float", tuple(!location.empty, cast(Handle)location.front.handle, x, y)); 1974 } 1975 void uniform3f(T0)(scope auto ref Optional!(T0) location, float x, float y, float z) if (isTOrPointer!(T0, WebGLUniformLocation)) { 1976 Serialize_Object_VarArgCall!void(this.handle, "uniform3f", "Optional!Handle;float;float;float", tuple(!location.empty, cast(Handle)location.front.handle, x, y, z)); 1977 } 1978 void uniform4f(T0)(scope auto ref Optional!(T0) location, float x, float y, float z, float w) if (isTOrPointer!(T0, WebGLUniformLocation)) { 1979 Serialize_Object_VarArgCall!void(this.handle, "uniform4f", "Optional!Handle;float;float;float;float", tuple(!location.empty, cast(Handle)location.front.handle, x, y, z, w)); 1980 } 1981 void uniform1i(T0)(scope auto ref Optional!(T0) location, int x) if (isTOrPointer!(T0, WebGLUniformLocation)) { 1982 Serialize_Object_VarArgCall!void(this.handle, "uniform1i", "Optional!Handle;int", tuple(!location.empty, cast(Handle)location.front.handle, x)); 1983 } 1984 void uniform2i(T0)(scope auto ref Optional!(T0) location, int x, int y) if (isTOrPointer!(T0, WebGLUniformLocation)) { 1985 Serialize_Object_VarArgCall!void(this.handle, "uniform2i", "Optional!Handle;int;int", tuple(!location.empty, cast(Handle)location.front.handle, x, y)); 1986 } 1987 void uniform3i(T0)(scope auto ref Optional!(T0) location, int x, int y, int z) if (isTOrPointer!(T0, WebGLUniformLocation)) { 1988 Serialize_Object_VarArgCall!void(this.handle, "uniform3i", "Optional!Handle;int;int;int", tuple(!location.empty, cast(Handle)location.front.handle, x, y, z)); 1989 } 1990 void uniform4i(T0)(scope auto ref Optional!(T0) location, int x, int y, int z, int w) if (isTOrPointer!(T0, WebGLUniformLocation)) { 1991 Serialize_Object_VarArgCall!void(this.handle, "uniform4i", "Optional!Handle;int;int;int;int", tuple(!location.empty, cast(Handle)location.front.handle, x, y, z, w)); 1992 } 1993 void useProgram(T0)(scope auto ref Optional!(T0) program) if (isTOrPointer!(T0, WebGLProgram)) { 1994 Serialize_Object_VarArgCall!void(this.handle, "useProgram", "Optional!Handle", tuple(!program.empty, cast(Handle)program.front.handle)); 1995 } 1996 void validateProgram()(scope ref WebGLProgram program) { 1997 Object_Call_Handle__void(this.handle, "validateProgram", program.handle); 1998 } 1999 void vertexAttrib1f()(uint indx, float x) { 2000 Serialize_Object_VarArgCall!void(this.handle, "vertexAttrib1f", "uint;float", tuple(indx, x)); 2001 } 2002 void vertexAttrib1fv()(uint indx, scope ref Float32List values) { 2003 Serialize_Object_VarArgCall!void(this.handle, "vertexAttrib1fv", "uint;SumType!(Handle,Handle)", tuple(indx, libwasm.sumtype.match!(((ref values.Types[0] v) => 0),((ref values.Types[1] v) => 1))(values),tuple(libwasm.sumtype.match!(((ref values.Types[0] v) => cast(Handle)v.handle),((ref values.Types[1] v) => Handle.init))(values),libwasm.sumtype.match!(((ref values.Types[0] v) => Handle.init),((ref values.Types[1] v) => cast(Handle)v.handle))(values)))); 2004 } 2005 void vertexAttrib2f()(uint indx, float x, float y) { 2006 Serialize_Object_VarArgCall!void(this.handle, "vertexAttrib2f", "uint;float;float", tuple(indx, x, y)); 2007 } 2008 void vertexAttrib2fv()(uint indx, scope ref Float32List values) { 2009 Serialize_Object_VarArgCall!void(this.handle, "vertexAttrib2fv", "uint;SumType!(Handle,Handle)", tuple(indx, libwasm.sumtype.match!(((ref values.Types[0] v) => 0),((ref values.Types[1] v) => 1))(values),tuple(libwasm.sumtype.match!(((ref values.Types[0] v) => cast(Handle)v.handle),((ref values.Types[1] v) => Handle.init))(values),libwasm.sumtype.match!(((ref values.Types[0] v) => Handle.init),((ref values.Types[1] v) => cast(Handle)v.handle))(values)))); 2010 } 2011 void vertexAttrib3f()(uint indx, float x, float y, float z) { 2012 Serialize_Object_VarArgCall!void(this.handle, "vertexAttrib3f", "uint;float;float;float", tuple(indx, x, y, z)); 2013 } 2014 void vertexAttrib3fv()(uint indx, scope ref Float32List values) { 2015 Serialize_Object_VarArgCall!void(this.handle, "vertexAttrib3fv", "uint;SumType!(Handle,Handle)", tuple(indx, libwasm.sumtype.match!(((ref values.Types[0] v) => 0),((ref values.Types[1] v) => 1))(values),tuple(libwasm.sumtype.match!(((ref values.Types[0] v) => cast(Handle)v.handle),((ref values.Types[1] v) => Handle.init))(values),libwasm.sumtype.match!(((ref values.Types[0] v) => Handle.init),((ref values.Types[1] v) => cast(Handle)v.handle))(values)))); 2016 } 2017 void vertexAttrib4f()(uint indx, float x, float y, float z, float w) { 2018 Serialize_Object_VarArgCall!void(this.handle, "vertexAttrib4f", "uint;float;float;float;float", tuple(indx, x, y, z, w)); 2019 } 2020 void vertexAttrib4fv()(uint indx, scope ref Float32List values) { 2021 Serialize_Object_VarArgCall!void(this.handle, "vertexAttrib4fv", "uint;SumType!(Handle,Handle)", tuple(indx, libwasm.sumtype.match!(((ref values.Types[0] v) => 0),((ref values.Types[1] v) => 1))(values),tuple(libwasm.sumtype.match!(((ref values.Types[0] v) => cast(Handle)v.handle),((ref values.Types[1] v) => Handle.init))(values),libwasm.sumtype.match!(((ref values.Types[0] v) => Handle.init),((ref values.Types[1] v) => cast(Handle)v.handle))(values)))); 2022 } 2023 void vertexAttribPointer()(uint indx, int size, uint type, bool normalized, int stride, int offset) { 2024 Serialize_Object_VarArgCall!void(this.handle, "vertexAttribPointer", "uint;int;uint;bool;int;int", tuple(indx, size, type, normalized, stride, offset)); 2025 } 2026 void viewport()(int x, int y, int width, int height) { 2027 Serialize_Object_VarArgCall!void(this.handle, "viewport", "int;int;int;int", tuple(x, y, width, height)); 2028 } 2029 } 2030 struct WebGLShader { 2031 nothrow: 2032 JsHandle handle; 2033 alias handle this; 2034 this(Handle h) { 2035 this.handle = JsHandle(h); 2036 } 2037 } 2038 struct WebGLShaderPrecisionFormat { 2039 nothrow: 2040 JsHandle handle; 2041 alias handle this; 2042 this(Handle h) { 2043 this.handle = JsHandle(h); 2044 } 2045 int rangeMin()() { 2046 return Object_Getter__int(this.handle, "rangeMin"); 2047 } 2048 int rangeMax()() { 2049 return Object_Getter__int(this.handle, "rangeMax"); 2050 } 2051 int precision()() { 2052 return Object_Getter__int(this.handle, "precision"); 2053 } 2054 } 2055 struct WebGLTexture { 2056 nothrow: 2057 JsHandle handle; 2058 alias handle this; 2059 this(Handle h) { 2060 this.handle = JsHandle(h); 2061 } 2062 } 2063 struct WebGLUniformLocation { 2064 nothrow: 2065 JsHandle handle; 2066 alias handle this; 2067 this(Handle h) { 2068 this.handle = JsHandle(h); 2069 } 2070 } 2071 struct WebGLVertexArrayObject { 2072 nothrow: 2073 JsHandle handle; 2074 alias handle this; 2075 this(Handle h) { 2076 this.handle = JsHandle(h); 2077 } 2078 } 2079 2080 2081 extern (C) Optional!(SumType!(HTMLCanvasElement, OffscreenCanvas)) WebGLRenderingContextBase_canvas_Get(Handle);