OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
11 * documentation and/or other materials provided with the distribution. | 11 * documentation and/or other materials provided with the distribution. |
12 * | 12 * |
13 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY | 13 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY |
14 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | 14 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | 15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR | 16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR |
17 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | 17 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, |
18 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, | 18 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, |
19 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | 19 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR |
20 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY | 20 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY |
21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
24 */ | 24 */ |
25 | 25 |
| 26 // http://www.khronos.org/registry/webgl/specs/latest/1.0/#WebGLRenderingContext
Base |
| 27 |
26 typedef unsigned long GLenum; | 28 typedef unsigned long GLenum; |
27 typedef boolean GLboolean; | 29 typedef boolean GLboolean; |
28 typedef unsigned long GLbitfield; | 30 typedef unsigned long GLbitfield; |
29 typedef byte GLbyte; /* 'byte' should be a signed 8 bit type.
*/ | 31 typedef byte GLbyte; // 'byte' should be a signed 8 bit type. |
30 typedef short GLshort; | 32 typedef short GLshort; |
31 typedef long GLint; | 33 typedef long GLint; |
32 typedef long GLsizei; | 34 typedef long GLsizei; |
33 typedef long long GLintptr; | 35 typedef long long GLintptr; |
34 typedef long long GLsizeiptr; | 36 typedef long long GLsizeiptr; |
35 typedef octet GLubyte; /* 'octet' should be an unsigned 8 bit ty
pe. */ | 37 typedef octet GLubyte; // 'octet' should be an unsigned 8 bit type. |
36 typedef unsigned short GLushort; | 38 typedef unsigned short GLushort; |
37 typedef unsigned long GLuint; | 39 typedef unsigned long GLuint; |
38 typedef /*unrestricted*/ float GLfloat; | 40 typedef unrestricted float GLfloat; |
39 typedef /*unrestricted*/ float GLclampf; | 41 typedef unrestricted float GLclampf; |
40 | 42 |
41 [ | 43 [ |
42 DoNotCheckConstants, | 44 // FIXME: [DoNotCheckConstants] and [TypeChecking=Interface|Nullable] should
be applied |
43 StrictTypeChecking, | 45 // to members and not need to be put on implementing interface |
44 ] interface WebGLRenderingContext : CanvasRenderingContext { | 46 // DoNotCheckConstants, // need to put on implementing interface |
| 47 NoInterfaceObject, // Always used on target of 'implements' |
| 48 // TypeChecking=Interface|Nullable|Unrestricted, // need to put on implement
ing interface |
| 49 ] interface WebGLRenderingContextBase { |
| 50 |
| 51 readonly attribute HTMLCanvasElement canvas; |
45 | 52 |
46 /* ClearBufferMask */ | 53 /* ClearBufferMask */ |
47 const GLenum DEPTH_BUFFER_BIT = 0x00000100; | 54 const GLenum DEPTH_BUFFER_BIT = 0x00000100; |
48 const GLenum STENCIL_BUFFER_BIT = 0x00000400; | 55 const GLenum STENCIL_BUFFER_BIT = 0x00000400; |
49 const GLenum COLOR_BUFFER_BIT = 0x00004000; | 56 const GLenum COLOR_BUFFER_BIT = 0x00004000; |
50 | 57 |
51 /* BeginMode */ | 58 /* BeginMode */ |
52 const GLenum POINTS = 0x0000; | 59 const GLenum POINTS = 0x0000; |
53 const GLenum LINES = 0x0001; | 60 const GLenum LINES = 0x0001; |
54 const GLenum LINE_LOOP = 0x0002; | 61 const GLenum LINE_LOOP = 0x0002; |
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
387 | 394 |
388 /* Vertex Arrays */ | 395 /* Vertex Arrays */ |
389 const GLenum VERTEX_ATTRIB_ARRAY_ENABLED = 0x8622; | 396 const GLenum VERTEX_ATTRIB_ARRAY_ENABLED = 0x8622; |
390 const GLenum VERTEX_ATTRIB_ARRAY_SIZE = 0x8623; | 397 const GLenum VERTEX_ATTRIB_ARRAY_SIZE = 0x8623; |
391 const GLenum VERTEX_ATTRIB_ARRAY_STRIDE = 0x8624; | 398 const GLenum VERTEX_ATTRIB_ARRAY_STRIDE = 0x8624; |
392 const GLenum VERTEX_ATTRIB_ARRAY_TYPE = 0x8625; | 399 const GLenum VERTEX_ATTRIB_ARRAY_TYPE = 0x8625; |
393 const GLenum VERTEX_ATTRIB_ARRAY_NORMALIZED = 0x886A; | 400 const GLenum VERTEX_ATTRIB_ARRAY_NORMALIZED = 0x886A; |
394 const GLenum VERTEX_ATTRIB_ARRAY_POINTER = 0x8645; | 401 const GLenum VERTEX_ATTRIB_ARRAY_POINTER = 0x8645; |
395 const GLenum VERTEX_ATTRIB_ARRAY_BUFFER_BINDING = 0x889F; | 402 const GLenum VERTEX_ATTRIB_ARRAY_BUFFER_BINDING = 0x889F; |
396 | 403 |
| 404 /* Read Format */ |
| 405 const GLenum IMPLEMENTATION_COLOR_READ_TYPE = 0x8B9A; |
| 406 const GLenum IMPLEMENTATION_COLOR_READ_FORMAT = 0x8B9B; |
| 407 |
397 /* Shader Source */ | 408 /* Shader Source */ |
398 const GLenum COMPILE_STATUS = 0x8B81; | 409 const GLenum COMPILE_STATUS = 0x8B81; |
399 | 410 |
400 /* Shader Precision-Specified Types */ | 411 /* Shader Precision-Specified Types */ |
401 const GLenum LOW_FLOAT = 0x8DF0; | 412 const GLenum LOW_FLOAT = 0x8DF0; |
402 const GLenum MEDIUM_FLOAT = 0x8DF1; | 413 const GLenum MEDIUM_FLOAT = 0x8DF1; |
403 const GLenum HIGH_FLOAT = 0x8DF2; | 414 const GLenum HIGH_FLOAT = 0x8DF2; |
404 const GLenum LOW_INT = 0x8DF3; | 415 const GLenum LOW_INT = 0x8DF3; |
405 const GLenum MEDIUM_INT = 0x8DF4; | 416 const GLenum MEDIUM_INT = 0x8DF4; |
406 const GLenum HIGH_INT = 0x8DF5; | 417 const GLenum HIGH_INT = 0x8DF5; |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
451 | 462 |
452 const GLenum INVALID_FRAMEBUFFER_OPERATION = 0x0506; | 463 const GLenum INVALID_FRAMEBUFFER_OPERATION = 0x0506; |
453 | 464 |
454 /* WebGL-specific enums */ | 465 /* WebGL-specific enums */ |
455 const GLenum UNPACK_FLIP_Y_WEBGL = 0x9240; | 466 const GLenum UNPACK_FLIP_Y_WEBGL = 0x9240; |
456 const GLenum UNPACK_PREMULTIPLY_ALPHA_WEBGL = 0x9241; | 467 const GLenum UNPACK_PREMULTIPLY_ALPHA_WEBGL = 0x9241; |
457 const GLenum CONTEXT_LOST_WEBGL = 0x9242; | 468 const GLenum CONTEXT_LOST_WEBGL = 0x9242; |
458 const GLenum UNPACK_COLORSPACE_CONVERSION_WEBGL = 0x9243; | 469 const GLenum UNPACK_COLORSPACE_CONVERSION_WEBGL = 0x9243; |
459 const GLenum BROWSER_DEFAULT_WEBGL = 0x9244; | 470 const GLenum BROWSER_DEFAULT_WEBGL = 0x9244; |
460 | 471 |
461 readonly attribute GLsizei drawingBufferWidth; | 472 [DartNoAutoScope] readonly attribute GLsizei drawingBufferWidth; |
462 readonly attribute GLsizei drawingBufferHeight; | 473 [DartNoAutoScope] readonly attribute GLsizei drawingBufferHeight; |
463 | 474 |
464 void activeTexture(GLenum texture); | 475 [DartNoAutoScope] void activeTexture(GLenum texture); |
465 void attachShader(WebGLProgram? program, WebGLShader? shader); | 476 [DartNoAutoScope] void attachShader(WebGLProgram? program, WebGLShader? shad
er); |
466 void bindAttribLocation(WebGLProgram? program, GLuint index, DOMString name)
; | 477 [DartNoAutoScope] void bindAttribLocation(WebGLProgram? program, GLuint inde
x, DOMString name); |
467 void bindBuffer(GLenum target, WebGLBuffer? buffer); | 478 [DartNoAutoScope] void bindBuffer(GLenum target, WebGLBuffer? buffer); |
468 void bindFramebuffer(GLenum target, WebGLFramebuffer? framebuffer); | 479 [DartNoAutoScope] void bindFramebuffer(GLenum target, WebGLFramebuffer? fram
ebuffer); |
469 void bindRenderbuffer(GLenum target, WebGLRenderbuffer? renderbuffer); | 480 [DartNoAutoScope] void bindRenderbuffer(GLenum target, WebGLRenderbuffer? re
nderbuffer); |
470 void bindTexture(GLenum target, WebGLTexture? texture); | 481 [DartNoAutoScope] void bindTexture(GLenum target, WebGLTexture? texture); |
471 void blendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
; | 482 [DartNoAutoScope] void blendColor(GLclampf red, GLclampf green, GLclampf blu
e, GLclampf alpha); |
472 void blendEquation(GLenum mode); | 483 [DartNoAutoScope] void blendEquation(GLenum mode); |
473 void blendEquationSeparate(GLenum modeRGB, GLenum modeAlpha); | 484 [DartNoAutoScope] void blendEquationSeparate(GLenum modeRGB, GLenum modeAlph
a); |
474 void blendFunc(GLenum sfactor, GLenum dfactor); | 485 [DartNoAutoScope] void blendFunc(GLenum sfactor, GLenum dfactor); |
475 void blendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum
dstAlpha); | 486 [DartNoAutoScope] void blendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenu
m srcAlpha, GLenum dstAlpha); |
| 487 // FIXME: should be union type |
| 488 // https://www.khronos.org/bugzilla/show_bug.cgi?id=1172 |
| 489 void bufferData(GLenum target, GLsizeiptr size, GLenum usage); |
| 490 void bufferData(GLenum target, ArrayBufferView data, GLenum usage); |
476 void bufferData(GLenum target, ArrayBuffer? data, GLenum usage); | 491 void bufferData(GLenum target, ArrayBuffer? data, GLenum usage); |
477 void bufferData(GLenum target, ArrayBufferView? data, GLenum usage); | 492 void bufferSubData(GLenum target, GLintptr offset, ArrayBufferView data); |
478 void bufferData(GLenum target, GLsizeiptr size, GLenum usage); | |
479 void bufferSubData(GLenum target, GLintptr offset, ArrayBuffer? data); | 493 void bufferSubData(GLenum target, GLintptr offset, ArrayBuffer? data); |
480 void bufferSubData(GLenum target, GLintptr offset, ArrayBufferView? data); | |
481 | 494 |
482 GLenum checkFramebufferStatus(GLenum target); | 495 [DartNoAutoScope] GLenum checkFramebufferStatus(GLenum target); |
483 void clear(GLbitfield mask); | 496 [DartNoAutoScope] void clear(GLbitfield mask); |
484 void clearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
; | 497 [DartNoAutoScope] void clearColor(GLclampf red, GLclampf green, GLclampf blu
e, GLclampf alpha); |
485 void clearDepth(GLclampf depth); | 498 [DartNoAutoScope] void clearDepth(GLclampf depth); |
486 void clearStencil(GLint s); | 499 [DartNoAutoScope] void clearStencil(GLint s); |
487 void colorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alp
ha); | 500 [DartNoAutoScope] void colorMask(GLboolean red, GLboolean green, GLboolean b
lue, GLboolean alpha); |
488 void compileShader(WebGLShader? shader); | 501 [DartNoAutoScope] void compileShader(WebGLShader? shader); |
489 | 502 |
490 void compressedTexImage2D(GLenum target, GLint level, GLenum internalformat, | 503 [DartNoAutoScope] void compressedTexImage2D(GLenum target, GLint level, GLen
um internalformat, |
491 GLsizei width, GLsizei height, GLint border, Array
BufferView? data); | 504 GLsizei width, GLsizei height, GLint border, Array
BufferView? data); |
492 void compressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLin
t yoffset, | 505 [DartNoAutoScope] void compressedTexSubImage2D(GLenum target, GLint level, G
Lint xoffset, GLint yoffset, |
493 GLsizei width, GLsizei height, GLenum format, A
rrayBufferView? data); | 506 GLsizei width, GLsizei height, GLenum format, A
rrayBufferView? data); |
494 | 507 |
495 void copyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint
x, GLint y, GLsizei width, GLsizei height, GLint border); | 508 [DartNoAutoScope] void copyTexImage2D(GLenum target, GLint level, GLenum int
ernalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); |
496 void copyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoff
set, GLint x, GLint y, GLsizei width, GLsizei height); | 509 [DartNoAutoScope] void copyTexSubImage2D(GLenum target, GLint level, GLint x
offset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); |
497 | 510 |
498 WebGLBuffer createBuffer(); | 511 WebGLBuffer createBuffer(); |
499 WebGLFramebuffer createFramebuffer(); | 512 WebGLFramebuffer createFramebuffer(); |
500 WebGLProgram createProgram(); | 513 WebGLProgram createProgram(); |
501 WebGLRenderbuffer createRenderbuffer(); | 514 WebGLRenderbuffer createRenderbuffer(); |
502 WebGLShader createShader(GLenum type); | 515 WebGLShader createShader(GLenum type); |
503 WebGLTexture createTexture(); | 516 WebGLTexture createTexture(); |
504 | 517 |
505 void cullFace(GLenum mode); | 518 [DartNoAutoScope] void cullFace(GLenum mode); |
506 | 519 |
507 void deleteBuffer(WebGLBuffer? buffer); | 520 [DartNoAutoScope] void deleteBuffer(WebGLBuffer? buffer); |
508 void deleteFramebuffer(WebGLFramebuffer? framebuffer); | 521 [DartNoAutoScope] void deleteFramebuffer(WebGLFramebuffer? framebuffer); |
509 void deleteProgram(WebGLProgram? program); | 522 [DartNoAutoScope] void deleteProgram(WebGLProgram? program); |
510 void deleteRenderbuffer(WebGLRenderbuffer? renderbuffer); | 523 [DartNoAutoScope] void deleteRenderbuffer(WebGLRenderbuffer? renderbuffer); |
511 void deleteShader(WebGLShader? shader); | 524 [DartNoAutoScope] void deleteShader(WebGLShader? shader); |
512 void deleteTexture(WebGLTexture? texture); | 525 [DartNoAutoScope] void deleteTexture(WebGLTexture? texture); |
513 | 526 |
514 void depthFunc(GLenum func); | 527 [DartNoAutoScope] void depthFunc(GLenum func); |
515 void depthMask(GLboolean flag); | 528 [DartNoAutoScope] void depthMask(GLboolean flag); |
516 void depthRange(GLclampf zNear, GLclampf zFar); | 529 [DartNoAutoScope] void depthRange(GLclampf zNear, GLclampf zFar); |
517 void detachShader(WebGLProgram? program, WebGLShader? shader); | 530 [DartNoAutoScope] void detachShader(WebGLProgram? program, WebGLShader? shad
er); |
518 void disable(GLenum cap); | 531 [DartNoAutoScope] void disable(GLenum cap); |
519 void disableVertexAttribArray(GLuint index); | 532 [DartNoAutoScope] void disableVertexAttribArray(GLuint index); |
520 void drawArrays(GLenum mode, GLint first, GLsizei count); | 533 [DartNoAutoScope] void drawArrays(GLenum mode, GLint first, GLsizei count); |
521 void drawElements(GLenum mode, GLsizei count, GLenum type, GLintptr offset); | 534 [DartNoAutoScope] void drawElements(GLenum mode, GLsizei count, GLenum type,
GLintptr offset); |
522 | 535 |
523 void enable(GLenum cap); | 536 [DartNoAutoScope] void enable(GLenum cap); |
524 void enableVertexAttribArray(GLuint index); | 537 [DartNoAutoScope] void enableVertexAttribArray(GLuint index); |
525 void finish(); | 538 [DartNoAutoScope] void finish(); |
526 void flush(); | 539 [DartNoAutoScope] void flush(); |
527 void framebufferRenderbuffer(GLenum target, GLenum attachment, GLenum render
buffertarget, WebGLRenderbuffer? renderbuffer); | 540 [DartNoAutoScope] void framebufferRenderbuffer(GLenum target, GLenum attachm
ent, GLenum renderbuffertarget, WebGLRenderbuffer? renderbuffer); |
528 void framebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget
, WebGLTexture? texture, GLint level); | 541 [DartNoAutoScope] void framebufferTexture2D(GLenum target, GLenum attachment
, GLenum textarget, WebGLTexture? texture, GLint level); |
529 void frontFace(GLenum mode); | 542 [DartNoAutoScope] void frontFace(GLenum mode); |
530 void generateMipmap(GLenum target); | 543 [DartNoAutoScope] void generateMipmap(GLenum target); |
531 | 544 |
532 WebGLActiveInfo getActiveAttrib(WebGLProgram? program, GLuint index); | 545 [DartNoAutoScope] WebGLActiveInfo getActiveAttrib(WebGLProgram? program, GLu
int index); |
533 WebGLActiveInfo getActiveUniform(WebGLProgram? program, GLuint index); | 546 [DartNoAutoScope] WebGLActiveInfo getActiveUniform(WebGLProgram? program, GL
uint index); |
534 | 547 |
535 [Custom] void getAttachedShaders(WebGLProgram? program); | 548 [Custom, DartNoAutoScope] void getAttachedShaders(WebGLProgram? program); |
536 | 549 |
537 GLint getAttribLocation(WebGLProgram? program, DOMString name); | 550 [DartNoAutoScope] GLint getAttribLocation(WebGLProgram? program, DOMString n
ame); |
538 | 551 |
539 [Custom] any getBufferParameter(GLenum target, GLenum pname); | 552 [Custom] any getBufferParameter(GLenum target, GLenum pname); |
540 | 553 |
541 WebGLContextAttributes getContextAttributes(); | 554 WebGLContextAttributes getContextAttributes(); |
542 | 555 |
543 GLenum getError(); | 556 GLenum getError(); |
544 | 557 |
545 // object getExtension(DOMString name); | 558 // object getExtension(DOMString name); |
546 [Custom] any getExtension(DOMString name); | 559 [Custom] any getExtension(DOMString name); |
547 | 560 |
(...skipping 15 matching lines...) Expand all Loading... |
563 [Custom] any getTexParameter(GLenum target, GLenum pname); | 576 [Custom] any getTexParameter(GLenum target, GLenum pname); |
564 | 577 |
565 [Custom] any getUniform(WebGLProgram? program, WebGLUniformLocation location
); | 578 [Custom] any getUniform(WebGLProgram? program, WebGLUniformLocation location
); |
566 | 579 |
567 WebGLUniformLocation getUniformLocation(WebGLProgram? program, DOMString nam
e); | 580 WebGLUniformLocation getUniformLocation(WebGLProgram? program, DOMString nam
e); |
568 | 581 |
569 [Custom] any getVertexAttrib(GLuint index, GLenum pname); | 582 [Custom] any getVertexAttrib(GLuint index, GLenum pname); |
570 | 583 |
571 GLsizeiptr getVertexAttribOffset(GLuint index, GLenum pname); | 584 GLsizeiptr getVertexAttribOffset(GLuint index, GLenum pname); |
572 | 585 |
573 void hint(GLenum target, GLenum mode); | 586 [DartNoAutoScope] void hint(GLenum target, GLenum mode); |
574 GLboolean isBuffer(WebGLBuffer? buffer); | 587 [DartNoAutoScope] GLboolean isBuffer(WebGLBuffer? buffer); |
575 GLboolean isContextLost(); | 588 [DartNoAutoScope] GLboolean isContextLost(); |
576 GLboolean isEnabled(GLenum cap); | 589 [DartNoAutoScope] GLboolean isEnabled(GLenum cap); |
577 GLboolean isFramebuffer(WebGLFramebuffer? framebuffer); | 590 [DartNoAutoScope] GLboolean isFramebuffer(WebGLFramebuffer? framebuffer); |
578 GLboolean isProgram(WebGLProgram? program); | 591 [DartNoAutoScope] GLboolean isProgram(WebGLProgram? program); |
579 GLboolean isRenderbuffer(WebGLRenderbuffer? renderbuffer); | 592 [DartNoAutoScope] GLboolean isRenderbuffer(WebGLRenderbuffer? renderbuffer); |
580 GLboolean isShader(WebGLShader? shader); | 593 [DartNoAutoScope] GLboolean isShader(WebGLShader? shader); |
581 GLboolean isTexture(WebGLTexture? texture); | 594 [DartNoAutoScope] GLboolean isTexture(WebGLTexture? texture); |
582 void lineWidth(GLfloat width); | 595 [DartNoAutoScope] void lineWidth(GLfloat width); |
583 void linkProgram(WebGLProgram? program); | 596 [DartNoAutoScope] void linkProgram(WebGLProgram? program); |
584 void pixelStorei(GLenum pname, GLint param); | 597 [DartNoAutoScope] void pixelStorei(GLenum pname, GLint param); |
585 void polygonOffset(GLfloat factor, GLfloat units); | 598 [DartNoAutoScope] void polygonOffset(GLfloat factor, GLfloat units); |
586 | 599 |
587 void readPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum form
at, GLenum type, ArrayBufferView? pixels); | 600 void readPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum form
at, GLenum type, ArrayBufferView? pixels); |
588 | 601 |
589 void renderbufferStorage(GLenum target, GLenum internalformat, GLsizei width
, GLsizei height); | 602 void renderbufferStorage(GLenum target, GLenum internalformat, GLsizei width
, GLsizei height); |
590 void sampleCoverage(GLclampf value, GLboolean invert); | 603 void sampleCoverage(GLclampf value, GLboolean invert); |
591 void scissor(GLint x, GLint y, GLsizei width, GLsizei height); | 604 [DartNoAutoScope] void scissor(GLint x, GLint y, GLsizei width, GLsizei heig
ht); |
592 void shaderSource(WebGLShader? shader, DOMString string); | 605 void shaderSource(WebGLShader? shader, DOMString string); |
593 void stencilFunc(GLenum func, GLint ref, GLuint mask); | 606 [DartNoAutoScope] void stencilFunc(GLenum func, GLint ref, GLuint mask); |
594 void stencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask); | 607 [DartNoAutoScope] void stencilFuncSeparate(GLenum face, GLenum func, GLint r
ef, GLuint mask); |
595 void stencilMask(GLuint mask); | 608 [DartNoAutoScope] void stencilMask(GLuint mask); |
596 void stencilMaskSeparate(GLenum face, GLuint mask); | 609 [DartNoAutoScope] void stencilMaskSeparate(GLenum face, GLuint mask); |
597 void stencilOp(GLenum fail, GLenum zfail, GLenum zpass); | 610 [DartNoAutoScope] void stencilOp(GLenum fail, GLenum zfail, GLenum zpass); |
598 void stencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass)
; | 611 [DartNoAutoScope] void stencilOpSeparate(GLenum face, GLenum fail, GLenum zf
ail, GLenum zpass); |
599 | 612 |
600 void texParameterf(GLenum target, GLenum pname, GLfloat param); | 613 void texParameterf(GLenum target, GLenum pname, GLfloat param); |
601 void texParameteri(GLenum target, GLenum pname, GLint param); | 614 void texParameteri(GLenum target, GLenum pname, GLint param); |
602 | 615 |
603 // Supported forms: | 616 // Supported forms: |
| 617 // FIXME: should be union type |
| 618 // https://www.khronos.org/bugzilla/show_bug.cgi?id=1172 |
604 [RaisesException] void texImage2D( | 619 [RaisesException] void texImage2D( |
605 GLenum target, GLint level, GLenum internalformat, | 620 GLenum target, GLint level, GLenum internalformat, |
606 GLsizei width, GLsizei height, GLint border, | 621 GLsizei width, GLsizei height, GLint border, |
607 GLenum format, GLenum type, ArrayBufferView? pixels); | 622 GLenum format, GLenum type, ArrayBufferView? pixels); |
608 [RaisesException] void texImage2D( | 623 [RaisesException] void texImage2D( |
609 GLenum target, GLint level, GLenum internalformat, | 624 GLenum target, GLint level, GLenum internalformat, |
610 GLenum format, GLenum type, ImageData? pixels); | 625 GLenum format, GLenum type, ImageData? pixels); |
611 [RaisesException] void texImage2D( | 626 [RaisesException] void texImage2D( |
612 GLenum target, GLint level, GLenum internalformat, | 627 GLenum target, GLint level, GLenum internalformat, |
613 GLenum format, GLenum type, HTMLImageElement? image); | 628 GLenum format, GLenum type, HTMLImageElement image); |
614 [RaisesException] void texImage2D( | 629 [RaisesException] void texImage2D( |
615 GLenum target, GLint level, GLenum internalformat, | 630 GLenum target, GLint level, GLenum internalformat, |
616 GLenum format, GLenum type, HTMLCanvasElement? canvas); | 631 GLenum format, GLenum type, HTMLCanvasElement canvas); |
617 [RaisesException] void texImage2D( | 632 [RaisesException] void texImage2D( |
618 GLenum target, GLint level, GLenum internalformat, | 633 GLenum target, GLint level, GLenum internalformat, |
619 GLenum format, GLenum type, HTMLVideoElement? video); | 634 GLenum format, GLenum type, HTMLVideoElement video); |
620 | 635 |
621 [RaisesException] void texSubImage2D( | 636 [RaisesException] void texSubImage2D( |
622 GLenum target, GLint level, GLint xoffset, GLint yoffset, | 637 GLenum target, GLint level, GLint xoffset, GLint yoffset, |
623 GLsizei width, GLsizei height, | 638 GLsizei width, GLsizei height, |
624 GLenum format, GLenum type, ArrayBufferView? pixels); | 639 GLenum format, GLenum type, ArrayBufferView? pixels); |
625 [RaisesException] void texSubImage2D( | 640 [RaisesException] void texSubImage2D( |
626 GLenum target, GLint level, GLint xoffset, GLint yoffset, | 641 GLenum target, GLint level, GLint xoffset, GLint yoffset, |
627 GLenum format, GLenum type, ImageData? pixels); | 642 GLenum format, GLenum type, ImageData? pixels); |
628 [RaisesException] void texSubImage2D( | 643 [RaisesException] void texSubImage2D( |
629 GLenum target, GLint level, GLint xoffset, GLint yoffset, | 644 GLenum target, GLint level, GLint xoffset, GLint yoffset, |
630 GLenum format, GLenum type, HTMLImageElement? image); | 645 GLenum format, GLenum type, HTMLImageElement image); |
631 [RaisesException] void texSubImage2D( | 646 [RaisesException] void texSubImage2D( |
632 GLenum target, GLint level, GLint xoffset, GLint yoffset, | 647 GLenum target, GLint level, GLint xoffset, GLint yoffset, |
633 GLenum format, GLenum type, HTMLCanvasElement? canvas); | 648 GLenum format, GLenum type, HTMLCanvasElement canvas); |
634 [RaisesException] void texSubImage2D( | 649 [RaisesException] void texSubImage2D( |
635 GLenum target, GLint level, GLint xoffset, GLint yoffset, | 650 GLenum target, GLint level, GLint xoffset, GLint yoffset, |
636 GLenum format, GLenum type, HTMLVideoElement? video); | 651 GLenum format, GLenum type, HTMLVideoElement video); |
637 | 652 |
638 void uniform1f(WebGLUniformLocation? location, GLfloat x); | 653 [DartNoAutoScope] void uniform1f(WebGLUniformLocation? location, GLfloat x); |
639 [Custom] void uniform1fv(WebGLUniformLocation? location, Float32Array v); | 654 [Custom, DartNoAutoScope] void uniform1fv(WebGLUniformLocation? location, Fl
oat32Array v); |
640 void uniform1i(WebGLUniformLocation? location, GLint x); | 655 [DartNoAutoScope] void uniform1i(WebGLUniformLocation? location, GLint x); |
641 [Custom] void uniform1iv(WebGLUniformLocation? location, Int32Array v); | 656 [Custom, DartNoAutoScope] void uniform1iv(WebGLUniformLocation? location, In
t32Array v); |
642 void uniform2f(WebGLUniformLocation? location, GLfloat x, GLfloat y); | 657 [DartNoAutoScope] void uniform2f(WebGLUniformLocation? location, GLfloat x,
GLfloat y); |
643 [Custom] void uniform2fv(WebGLUniformLocation? location, Float32Array v); | 658 [Custom, DartNoAutoScope] void uniform2fv(WebGLUniformLocation? location, Fl
oat32Array v); |
644 void uniform2i(WebGLUniformLocation? location, GLint x, GLint y); | 659 [DartNoAutoScope] void uniform2i(WebGLUniformLocation? location, GLint x, GL
int y); |
645 [Custom] void uniform2iv(WebGLUniformLocation? location, Int32Array v); | 660 [Custom, DartNoAutoScope] void uniform2iv(WebGLUniformLocation? location, In
t32Array v); |
646 void uniform3f(WebGLUniformLocation? location, GLfloat x, GLfloat y, GLfloat
z); | 661 [DartNoAutoScope] void uniform3f(WebGLUniformLocation? location, GLfloat x,
GLfloat y, GLfloat z); |
647 [Custom] void uniform3fv(WebGLUniformLocation? location, Float32Array v); | 662 [Custom, DartNoAutoScope] void uniform3fv(WebGLUniformLocation? location, Fl
oat32Array v); |
648 void uniform3i(WebGLUniformLocation? location, GLint x, GLint y, GLint z); | 663 [DartNoAutoScope] void uniform3i(WebGLUniformLocation? location, GLint x, GL
int y, GLint z); |
649 [Custom] void uniform3iv(WebGLUniformLocation? location, Int32Array v); | 664 [Custom, DartNoAutoScope] void uniform3iv(WebGLUniformLocation? location, In
t32Array v); |
650 void uniform4f(WebGLUniformLocation? location, GLfloat x, GLfloat y, GLfloat
z, GLfloat w); | 665 [DartNoAutoScope] void uniform4f(WebGLUniformLocation? location, GLfloat x,
GLfloat y, GLfloat z, GLfloat w); |
651 [Custom] void uniform4fv(WebGLUniformLocation? location, Float32Array v); | 666 [Custom, DartNoAutoScope] void uniform4fv(WebGLUniformLocation? location, Fl
oat32Array v); |
652 void uniform4i(WebGLUniformLocation? location, GLint x, GLint y, GLint z, GL
int w); | 667 [DartNoAutoScope] void uniform4i(WebGLUniformLocation? location, GLint x, GL
int y, GLint z, GLint w); |
653 [Custom] void uniform4iv(WebGLUniformLocation? location, Int32Array v); | 668 [Custom, DartNoAutoScope] void uniform4iv(WebGLUniformLocation? location, In
t32Array v); |
654 | 669 |
655 [Custom] void uniformMatrix2fv(WebGLUniformLocation? location, GLboolean tra
nspose, Float32Array array); | 670 [Custom, DartNoAutoScope] void uniformMatrix2fv(WebGLUniformLocation? locati
on, GLboolean transpose, Float32Array array); |
656 [Custom] void uniformMatrix3fv(WebGLUniformLocation? location, GLboolean tra
nspose, Float32Array array); | 671 [Custom, DartNoAutoScope] void uniformMatrix3fv(WebGLUniformLocation? locati
on, GLboolean transpose, Float32Array array); |
657 [Custom] void uniformMatrix4fv(WebGLUniformLocation? location, GLboolean tra
nspose, Float32Array array); | 672 [Custom, DartNoAutoScope] void uniformMatrix4fv(WebGLUniformLocation? locati
on, GLboolean transpose, Float32Array array); |
658 | 673 |
659 void useProgram(WebGLProgram? program); | 674 [DartNoAutoScope] void useProgram(WebGLProgram? program); |
660 void validateProgram(WebGLProgram? program); | 675 [DartNoAutoScope] void validateProgram(WebGLProgram? program); |
661 | 676 |
662 void vertexAttrib1f(GLuint indx, GLfloat x); | 677 [DartNoAutoScope] void vertexAttrib1f(GLuint indx, GLfloat x); |
663 [Custom] void vertexAttrib1fv(GLuint indx, Float32Array values); | 678 [Custom, DartNoAutoScope] void vertexAttrib1fv(GLuint indx, Float32Array val
ues); |
664 void vertexAttrib2f(GLuint indx, GLfloat x, GLfloat y); | 679 [DartNoAutoScope] void vertexAttrib2f(GLuint indx, GLfloat x, GLfloat y); |
665 [Custom] void vertexAttrib2fv(GLuint indx, Float32Array values); | 680 [Custom, DartNoAutoScope] void vertexAttrib2fv(GLuint indx, Float32Array val
ues); |
666 void vertexAttrib3f(GLuint indx, GLfloat x, GLfloat y, GLfloat z); | 681 [DartNoAutoScope] void vertexAttrib3f(GLuint indx, GLfloat x, GLfloat y, GLf
loat z); |
667 [Custom] void vertexAttrib3fv(GLuint indx, Float32Array values); | 682 [Custom, DartNoAutoScope] void vertexAttrib3fv(GLuint indx, Float32Array val
ues); |
668 void vertexAttrib4f(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
; | 683 [DartNoAutoScope] void vertexAttrib4f(GLuint indx, GLfloat x, GLfloat y, GLf
loat z, GLfloat w); |
669 [Custom] void vertexAttrib4fv(GLuint indx, Float32Array values); | 684 [Custom, DartNoAutoScope] void vertexAttrib4fv(GLuint indx, Float32Array val
ues); |
670 void vertexAttribPointer(GLuint indx, GLint size, GLenum type, GLboolean nor
malized, | 685 [DartNoAutoScope] void vertexAttribPointer(GLuint indx, GLint size, GLenum t
ype, GLboolean normalized, |
671 GLsizei stride, GLintptr offset); | 686 GLsizei stride, GLintptr offset); |
672 | 687 |
673 void viewport(GLint x, GLint y, GLsizei width, GLsizei height); | 688 [DartNoAutoScope] void viewport(GLint x, GLint y, GLsizei width, GLsizei hei
ght); |
674 }; | 689 }; |
OLD | NEW |