| OLD | NEW |
| 1 library dart.dom.web_gl; | 1 library dart.dom.web_gl; |
| 2 | 2 |
| 3 import 'dart:collection'; | 3 import 'dart:collection'; |
| 4 import 'dart:_collection-dev'; | 4 import 'dart:_collection-dev'; |
| 5 import 'dart:html'; | 5 import 'dart:html'; |
| 6 import 'dart:html_common'; | 6 import 'dart:html_common'; |
| 7 import 'dart:typed_data'; | 7 import 'dart:typed_data'; |
| 8 import 'dart:_js_helper' show Creates, JSName, Null, Returns, convertDartClosure
ToJS; | 8 import 'dart:_js_helper' show Creates, JSName, Null, Returns, convertDartClosure
ToJS; |
| 9 import 'dart:_foreign_helper' show JS; | 9 import 'dart:_foreign_helper' show JS; |
| 10 import 'dart:_interceptors' show Interceptor; | 10 import 'dart:_interceptors' show Interceptor; |
| (...skipping 2093 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2104 @DomName('WebGLRenderingContext.blendFunc') | 2104 @DomName('WebGLRenderingContext.blendFunc') |
| 2105 @DocsEditable | 2105 @DocsEditable |
| 2106 void blendFunc(int sfactor, int dfactor) native; | 2106 void blendFunc(int sfactor, int dfactor) native; |
| 2107 | 2107 |
| 2108 @DomName('WebGLRenderingContext.blendFuncSeparate') | 2108 @DomName('WebGLRenderingContext.blendFuncSeparate') |
| 2109 @DocsEditable | 2109 @DocsEditable |
| 2110 void blendFuncSeparate(int srcRGB, int dstRGB, int srcAlpha, int dstAlpha) nat
ive; | 2110 void blendFuncSeparate(int srcRGB, int dstRGB, int srcAlpha, int dstAlpha) nat
ive; |
| 2111 | 2111 |
| 2112 @DomName('WebGLRenderingContext.bufferData') | 2112 @DomName('WebGLRenderingContext.bufferData') |
| 2113 @DocsEditable | 2113 @DocsEditable |
| 2114 void bufferData(int target, data_OR_size, int usage) native; | 2114 void bufferData(int target, ByteBuffer data, int usage) native; |
| 2115 |
| 2116 @JSName('bufferData') |
| 2117 @DomName('WebGLRenderingContext.bufferData') |
| 2118 @DocsEditable |
| 2119 void bufferEmptyData(int target, int size, int usage) native; |
| 2115 | 2120 |
| 2116 @DomName('WebGLRenderingContext.bufferSubData') | 2121 @DomName('WebGLRenderingContext.bufferSubData') |
| 2117 @DocsEditable | 2122 @DocsEditable |
| 2118 void bufferSubData(int target, int offset, data) native; | 2123 void bufferSubData(int target, int offset, ByteBuffer data) native; |
| 2124 |
| 2125 @JSName('bufferSubData') |
| 2126 @DomName('WebGLRenderingContext.bufferSubData') |
| 2127 @DocsEditable |
| 2128 void bufferSubTypedData(int target, int offset, TypedData data) native; |
| 2129 |
| 2130 @JSName('bufferData') |
| 2131 @DomName('WebGLRenderingContext.bufferData') |
| 2132 @DocsEditable |
| 2133 void bufferTypedData(int target, TypedData data, int usage) native; |
| 2119 | 2134 |
| 2120 @DomName('WebGLRenderingContext.checkFramebufferStatus') | 2135 @DomName('WebGLRenderingContext.checkFramebufferStatus') |
| 2121 @DocsEditable | 2136 @DocsEditable |
| 2122 int checkFramebufferStatus(int target) native; | 2137 int checkFramebufferStatus(int target) native; |
| 2123 | 2138 |
| 2124 @DomName('WebGLRenderingContext.clear') | 2139 @DomName('WebGLRenderingContext.clear') |
| 2125 @DocsEditable | 2140 @DocsEditable |
| 2126 void clear(int mask) native; | 2141 void clear(int mask) native; |
| 2127 | 2142 |
| 2128 @DomName('WebGLRenderingContext.clearColor') | 2143 @DomName('WebGLRenderingContext.clearColor') |
| (...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2462 @DomName('WebGLRenderingContext.stencilOp') | 2477 @DomName('WebGLRenderingContext.stencilOp') |
| 2463 @DocsEditable | 2478 @DocsEditable |
| 2464 void stencilOp(int fail, int zfail, int zpass) native; | 2479 void stencilOp(int fail, int zfail, int zpass) native; |
| 2465 | 2480 |
| 2466 @DomName('WebGLRenderingContext.stencilOpSeparate') | 2481 @DomName('WebGLRenderingContext.stencilOpSeparate') |
| 2467 @DocsEditable | 2482 @DocsEditable |
| 2468 void stencilOpSeparate(int face, int fail, int zfail, int zpass) native; | 2483 void stencilOpSeparate(int face, int fail, int zfail, int zpass) native; |
| 2469 | 2484 |
| 2470 @DomName('WebGLRenderingContext.texImage2D') | 2485 @DomName('WebGLRenderingContext.texImage2D') |
| 2471 @DocsEditable | 2486 @DocsEditable |
| 2472 void texImage2D(int target, int level, int internalformat, int format_OR_width
, int height_OR_type, border_OR_canvas_OR_image_OR_pixels_OR_video, [int format,
int type, TypedData pixels]) { | 2487 void texImage2D(int target, int level, int internalformat, int width, int heig
ht, int border, int format, int type, TypedData pixels) native; |
| 2473 if (pixels != null && type != null && format != null && (border_OR_canvas_OR
_image_OR_pixels_OR_video is int || border_OR_canvas_OR_image_OR_pixels_OR_video
== null)) { | 2488 |
| 2474 _texImage2D_1(target, level, internalformat, format_OR_width, height_OR_ty
pe, border_OR_canvas_OR_image_OR_pixels_OR_video, format, type, pixels); | 2489 @JSName('texImage2D') |
| 2475 return; | 2490 @DomName('WebGLRenderingContext.texImage2D') |
| 2476 } | 2491 @DocsEditable |
| 2477 if ((border_OR_canvas_OR_image_OR_pixels_OR_video is ImageData || border_OR_
canvas_OR_image_OR_pixels_OR_video == null) && format == null && type == null &&
pixels == null) { | 2492 void texImage2DCanvas(int target, int level, int internalformat, int format, i
nt type, CanvasElement canvas) native; |
| 2478 var pixels_1 = convertDartToNative_ImageData(border_OR_canvas_OR_image_OR_
pixels_OR_video); | 2493 |
| 2479 _texImage2D_2(target, level, internalformat, format_OR_width, height_OR_ty
pe, pixels_1); | 2494 @DomName('WebGLRenderingContext.texImage2D') |
| 2480 return; | 2495 @DocsEditable |
| 2481 } | 2496 void texImage2DData(int target, int level, int internalformat, int format, int
type, ImageData pixels) { |
| 2482 if ((border_OR_canvas_OR_image_OR_pixels_OR_video is ImageElement || border_
OR_canvas_OR_image_OR_pixels_OR_video == null) && format == null && type == null
&& pixels == null) { | 2497 var pixels_1 = convertDartToNative_ImageData(pixels); |
| 2483 _texImage2D_3(target, level, internalformat, format_OR_width, height_OR_ty
pe, border_OR_canvas_OR_image_OR_pixels_OR_video); | 2498 _texImage2DData_1(target, level, internalformat, format, type, pixels_1); |
| 2484 return; | 2499 return; |
| 2485 } | |
| 2486 if ((border_OR_canvas_OR_image_OR_pixels_OR_video is CanvasElement || border
_OR_canvas_OR_image_OR_pixels_OR_video == null) && format == null && type == nul
l && pixels == null) { | |
| 2487 _texImage2D_4(target, level, internalformat, format_OR_width, height_OR_ty
pe, border_OR_canvas_OR_image_OR_pixels_OR_video); | |
| 2488 return; | |
| 2489 } | |
| 2490 if ((border_OR_canvas_OR_image_OR_pixels_OR_video is VideoElement || border_
OR_canvas_OR_image_OR_pixels_OR_video == null) && format == null && type == null
&& pixels == null) { | |
| 2491 _texImage2D_5(target, level, internalformat, format_OR_width, height_OR_ty
pe, border_OR_canvas_OR_image_OR_pixels_OR_video); | |
| 2492 return; | |
| 2493 } | |
| 2494 throw new ArgumentError("Incorrect number or type of arguments"); | |
| 2495 } | 2500 } |
| 2496 @JSName('texImage2D') | 2501 @JSName('texImage2D') |
| 2497 @DomName('WebGLRenderingContext.texImage2D') | 2502 @DomName('WebGLRenderingContext.texImage2D') |
| 2498 @DocsEditable | 2503 @DocsEditable |
| 2499 void _texImage2D_1(target, level, internalformat, width, height, int border, f
ormat, type, TypedData pixels) native; | 2504 void _texImage2DData_1(target, level, internalformat, format, type, pixels) na
tive; |
| 2505 |
| 2500 @JSName('texImage2D') | 2506 @JSName('texImage2D') |
| 2501 @DomName('WebGLRenderingContext.texImage2D') | 2507 @DomName('WebGLRenderingContext.texImage2D') |
| 2502 @DocsEditable | 2508 @DocsEditable |
| 2503 void _texImage2D_2(target, level, internalformat, format, type, pixels) native
; | 2509 void texImage2DImage(int target, int level, int internalformat, int format, in
t type, ImageElement image) native; |
| 2510 |
| 2504 @JSName('texImage2D') | 2511 @JSName('texImage2D') |
| 2505 @DomName('WebGLRenderingContext.texImage2D') | 2512 @DomName('WebGLRenderingContext.texImage2D') |
| 2506 @DocsEditable | 2513 @DocsEditable |
| 2507 void _texImage2D_3(target, level, internalformat, format, type, ImageElement i
mage) native; | 2514 void texImage2DVideo(int target, int level, int internalformat, int format, in
t type, VideoElement video) native; |
| 2508 @JSName('texImage2D') | |
| 2509 @DomName('WebGLRenderingContext.texImage2D') | |
| 2510 @DocsEditable | |
| 2511 void _texImage2D_4(target, level, internalformat, format, type, CanvasElement
canvas) native; | |
| 2512 @JSName('texImage2D') | |
| 2513 @DomName('WebGLRenderingContext.texImage2D') | |
| 2514 @DocsEditable | |
| 2515 void _texImage2D_5(target, level, internalformat, format, type, VideoElement v
ideo) native; | |
| 2516 | 2515 |
| 2517 @DomName('WebGLRenderingContext.texParameterf') | 2516 @DomName('WebGLRenderingContext.texParameterf') |
| 2518 @DocsEditable | 2517 @DocsEditable |
| 2519 void texParameterf(int target, int pname, num param) native; | 2518 void texParameterf(int target, int pname, num param) native; |
| 2520 | 2519 |
| 2521 @DomName('WebGLRenderingContext.texParameteri') | 2520 @DomName('WebGLRenderingContext.texParameteri') |
| 2522 @DocsEditable | 2521 @DocsEditable |
| 2523 void texParameteri(int target, int pname, int param) native; | 2522 void texParameteri(int target, int pname, int param) native; |
| 2524 | 2523 |
| 2525 @DomName('WebGLRenderingContext.texSubImage2D') | 2524 @DomName('WebGLRenderingContext.texSubImage2D') |
| 2526 @DocsEditable | 2525 @DocsEditable |
| 2527 void texSubImage2D(int target, int level, int xoffset, int yoffset, int format
_OR_width, int height_OR_type, canvas_OR_format_OR_image_OR_pixels_OR_video, [in
t type, TypedData pixels]) { | 2526 void texSubImage2D(int target, int level, int xoffset, int yoffset, int width,
int height, int format, int type, TypedData pixels) native; |
| 2528 if (pixels != null && type != null && (canvas_OR_format_OR_image_OR_pixels_O
R_video is int || canvas_OR_format_OR_image_OR_pixels_OR_video == null)) { | 2527 |
| 2529 _texSubImage2D_1(target, level, xoffset, yoffset, format_OR_width, height_
OR_type, canvas_OR_format_OR_image_OR_pixels_OR_video, type, pixels); | 2528 @JSName('texSubImage2D') |
| 2530 return; | 2529 @DomName('WebGLRenderingContext.texSubImage2D') |
| 2531 } | 2530 @DocsEditable |
| 2532 if ((canvas_OR_format_OR_image_OR_pixels_OR_video is ImageData || canvas_OR_
format_OR_image_OR_pixels_OR_video == null) && type == null && pixels == null) { | 2531 void texSubImage2DCanvas(int target, int level, int xoffset, int yoffset, int
format, int type, CanvasElement canvas) native; |
| 2533 var pixels_1 = convertDartToNative_ImageData(canvas_OR_format_OR_image_OR_
pixels_OR_video); | 2532 |
| 2534 _texSubImage2D_2(target, level, xoffset, yoffset, format_OR_width, height_
OR_type, pixels_1); | 2533 @DomName('WebGLRenderingContext.texSubImage2D') |
| 2535 return; | 2534 @DocsEditable |
| 2536 } | 2535 void texSubImage2DData(int target, int level, int xoffset, int yoffset, int fo
rmat, int type, ImageData pixels) { |
| 2537 if ((canvas_OR_format_OR_image_OR_pixels_OR_video is ImageElement || canvas_
OR_format_OR_image_OR_pixels_OR_video == null) && type == null && pixels == null
) { | 2536 var pixels_1 = convertDartToNative_ImageData(pixels); |
| 2538 _texSubImage2D_3(target, level, xoffset, yoffset, format_OR_width, height_
OR_type, canvas_OR_format_OR_image_OR_pixels_OR_video); | 2537 _texSubImage2DData_1(target, level, xoffset, yoffset, format, type, pixels_1
); |
| 2539 return; | 2538 return; |
| 2540 } | |
| 2541 if ((canvas_OR_format_OR_image_OR_pixels_OR_video is CanvasElement || canvas
_OR_format_OR_image_OR_pixels_OR_video == null) && type == null && pixels == nul
l) { | |
| 2542 _texSubImage2D_4(target, level, xoffset, yoffset, format_OR_width, height_
OR_type, canvas_OR_format_OR_image_OR_pixels_OR_video); | |
| 2543 return; | |
| 2544 } | |
| 2545 if ((canvas_OR_format_OR_image_OR_pixels_OR_video is VideoElement || canvas_
OR_format_OR_image_OR_pixels_OR_video == null) && type == null && pixels == null
) { | |
| 2546 _texSubImage2D_5(target, level, xoffset, yoffset, format_OR_width, height_
OR_type, canvas_OR_format_OR_image_OR_pixels_OR_video); | |
| 2547 return; | |
| 2548 } | |
| 2549 throw new ArgumentError("Incorrect number or type of arguments"); | |
| 2550 } | 2539 } |
| 2551 @JSName('texSubImage2D') | 2540 @JSName('texSubImage2D') |
| 2552 @DomName('WebGLRenderingContext.texSubImage2D') | 2541 @DomName('WebGLRenderingContext.texSubImage2D') |
| 2553 @DocsEditable | 2542 @DocsEditable |
| 2554 void _texSubImage2D_1(target, level, xoffset, yoffset, width, height, int form
at, type, TypedData pixels) native; | 2543 void _texSubImage2DData_1(target, level, xoffset, yoffset, format, type, pixel
s) native; |
| 2544 |
| 2555 @JSName('texSubImage2D') | 2545 @JSName('texSubImage2D') |
| 2556 @DomName('WebGLRenderingContext.texSubImage2D') | 2546 @DomName('WebGLRenderingContext.texSubImage2D') |
| 2557 @DocsEditable | 2547 @DocsEditable |
| 2558 void _texSubImage2D_2(target, level, xoffset, yoffset, format, type, pixels) n
ative; | 2548 void texSubImage2DImage(int target, int level, int xoffset, int yoffset, int f
ormat, int type, ImageElement image) native; |
| 2549 |
| 2559 @JSName('texSubImage2D') | 2550 @JSName('texSubImage2D') |
| 2560 @DomName('WebGLRenderingContext.texSubImage2D') | 2551 @DomName('WebGLRenderingContext.texSubImage2D') |
| 2561 @DocsEditable | 2552 @DocsEditable |
| 2562 void _texSubImage2D_3(target, level, xoffset, yoffset, format, type, ImageElem
ent image) native; | 2553 void texSubImage2DVideo(int target, int level, int xoffset, int yoffset, int f
ormat, int type, VideoElement video) native; |
| 2563 @JSName('texSubImage2D') | |
| 2564 @DomName('WebGLRenderingContext.texSubImage2D') | |
| 2565 @DocsEditable | |
| 2566 void _texSubImage2D_4(target, level, xoffset, yoffset, format, type, CanvasEle
ment canvas) native; | |
| 2567 @JSName('texSubImage2D') | |
| 2568 @DomName('WebGLRenderingContext.texSubImage2D') | |
| 2569 @DocsEditable | |
| 2570 void _texSubImage2D_5(target, level, xoffset, yoffset, format, type, VideoElem
ent video) native; | |
| 2571 | 2554 |
| 2572 @DomName('WebGLRenderingContext.uniform1f') | 2555 @DomName('WebGLRenderingContext.uniform1f') |
| 2573 @DocsEditable | 2556 @DocsEditable |
| 2574 void uniform1f(UniformLocation location, num x) native; | 2557 void uniform1f(UniformLocation location, num x) native; |
| 2575 | 2558 |
| 2576 @DomName('WebGLRenderingContext.uniform1fv') | 2559 @DomName('WebGLRenderingContext.uniform1fv') |
| 2577 @DocsEditable | 2560 @DocsEditable |
| 2578 void uniform1fv(UniformLocation location, Float32List v) native; | 2561 void uniform1fv(UniformLocation location, Float32List v) native; |
| 2579 | 2562 |
| 2580 @DomName('WebGLRenderingContext.uniform1i') | 2563 @DomName('WebGLRenderingContext.uniform1i') |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2745 // for details. All rights reserved. Use of this source code is governed by a | 2728 // for details. All rights reserved. Use of this source code is governed by a |
| 2746 // BSD-style license that can be found in the LICENSE file. | 2729 // BSD-style license that can be found in the LICENSE file. |
| 2747 | 2730 |
| 2748 | 2731 |
| 2749 @DocsEditable | 2732 @DocsEditable |
| 2750 @DomName('WebGLVertexArrayObjectOES') | 2733 @DomName('WebGLVertexArrayObjectOES') |
| 2751 // http://www.khronos.org/registry/webgl/extensions/OES_vertex_array_object/ | 2734 // http://www.khronos.org/registry/webgl/extensions/OES_vertex_array_object/ |
| 2752 @Experimental // experimental | 2735 @Experimental // experimental |
| 2753 class VertexArrayObject native "WebGLVertexArrayObjectOES" { | 2736 class VertexArrayObject native "WebGLVertexArrayObjectOES" { |
| 2754 } | 2737 } |
| OLD | NEW |