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, JSExtendableArray; | 10 import 'dart:_interceptors' show Interceptor, JSExtendableArray; |
(...skipping 2101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2112 void blendEquationSeparate(int modeRGB, int modeAlpha) native; | 2112 void blendEquationSeparate(int modeRGB, int modeAlpha) native; |
2113 | 2113 |
2114 @DomName('WebGLRenderingContext.blendFunc') | 2114 @DomName('WebGLRenderingContext.blendFunc') |
2115 @DocsEditable() | 2115 @DocsEditable() |
2116 void blendFunc(int sfactor, int dfactor) native; | 2116 void blendFunc(int sfactor, int dfactor) native; |
2117 | 2117 |
2118 @DomName('WebGLRenderingContext.blendFuncSeparate') | 2118 @DomName('WebGLRenderingContext.blendFuncSeparate') |
2119 @DocsEditable() | 2119 @DocsEditable() |
2120 void blendFuncSeparate(int srcRGB, int dstRGB, int srcAlpha, int dstAlpha) nat
ive; | 2120 void blendFuncSeparate(int srcRGB, int dstRGB, int srcAlpha, int dstAlpha) nat
ive; |
2121 | 2121 |
2122 @JSName('bufferData') | |
2123 @DomName('WebGLRenderingContext.bufferData') | 2122 @DomName('WebGLRenderingContext.bufferData') |
2124 @DocsEditable() | 2123 @DocsEditable() |
2125 void bufferByteData(int target, ByteBuffer data, int usage) native; | 2124 void bufferData(int target, data_OR_size, int usage) native; |
2126 | 2125 |
2127 @DomName('WebGLRenderingContext.bufferData') | |
2128 @DocsEditable() | |
2129 void bufferData(int target, int size, int usage) native; | |
2130 | |
2131 @JSName('bufferSubData') | |
2132 @DomName('WebGLRenderingContext.bufferSubData') | 2126 @DomName('WebGLRenderingContext.bufferSubData') |
2133 @DocsEditable() | 2127 @DocsEditable() |
2134 void bufferSubByteData(int target, int offset, ByteBuffer data) native; | 2128 void bufferSubData(int target, int offset, data) native; |
2135 | |
2136 @JSName('bufferSubData') | |
2137 @DomName('WebGLRenderingContext.bufferSubData') | |
2138 @DocsEditable() | |
2139 void bufferSubTypedData(int target, int offset, TypedData data) native; | |
2140 | |
2141 @JSName('bufferData') | |
2142 @DomName('WebGLRenderingContext.bufferData') | |
2143 @DocsEditable() | |
2144 void bufferTypedData(int target, TypedData data, int usage) native; | |
2145 | 2129 |
2146 @DomName('WebGLRenderingContext.checkFramebufferStatus') | 2130 @DomName('WebGLRenderingContext.checkFramebufferStatus') |
2147 @DocsEditable() | 2131 @DocsEditable() |
2148 int checkFramebufferStatus(int target) native; | 2132 int checkFramebufferStatus(int target) native; |
2149 | 2133 |
2150 @DomName('WebGLRenderingContext.clear') | 2134 @DomName('WebGLRenderingContext.clear') |
2151 @DocsEditable() | 2135 @DocsEditable() |
2152 void clear(int mask) native; | 2136 void clear(int mask) native; |
2153 | 2137 |
2154 @DomName('WebGLRenderingContext.clearColor') | 2138 @DomName('WebGLRenderingContext.clearColor') |
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2504 @DomName('WebGLRenderingContext.stencilOp') | 2488 @DomName('WebGLRenderingContext.stencilOp') |
2505 @DocsEditable() | 2489 @DocsEditable() |
2506 void stencilOp(int fail, int zfail, int zpass) native; | 2490 void stencilOp(int fail, int zfail, int zpass) native; |
2507 | 2491 |
2508 @DomName('WebGLRenderingContext.stencilOpSeparate') | 2492 @DomName('WebGLRenderingContext.stencilOpSeparate') |
2509 @DocsEditable() | 2493 @DocsEditable() |
2510 void stencilOpSeparate(int face, int fail, int zfail, int zpass) native; | 2494 void stencilOpSeparate(int face, int fail, int zfail, int zpass) native; |
2511 | 2495 |
2512 @DomName('WebGLRenderingContext.texImage2D') | 2496 @DomName('WebGLRenderingContext.texImage2D') |
2513 @DocsEditable() | 2497 @DocsEditable() |
2514 void texImage2D(int target, int level, int internalformat, int format, int typ
e, ImageData pixels) { | 2498 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]) { |
2515 var pixels_1 = convertDartToNative_ImageData(pixels); | 2499 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)) { |
2516 _texImage2D_1(target, level, internalformat, format, type, pixels_1); | 2500 _texImage2D_1(target, level, internalformat, format_OR_width, height_OR_ty
pe, border_OR_canvas_OR_image_OR_pixels_OR_video, format, type, pixels); |
2517 return; | 2501 return; |
| 2502 } |
| 2503 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) { |
| 2504 var pixels_1 = convertDartToNative_ImageData(border_OR_canvas_OR_image_OR_
pixels_OR_video); |
| 2505 _texImage2D_2(target, level, internalformat, format_OR_width, height_OR_ty
pe, pixels_1); |
| 2506 return; |
| 2507 } |
| 2508 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) { |
| 2509 _texImage2D_3(target, level, internalformat, format_OR_width, height_OR_ty
pe, border_OR_canvas_OR_image_OR_pixels_OR_video); |
| 2510 return; |
| 2511 } |
| 2512 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) { |
| 2513 _texImage2D_4(target, level, internalformat, format_OR_width, height_OR_ty
pe, border_OR_canvas_OR_image_OR_pixels_OR_video); |
| 2514 return; |
| 2515 } |
| 2516 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) { |
| 2517 _texImage2D_5(target, level, internalformat, format_OR_width, height_OR_ty
pe, border_OR_canvas_OR_image_OR_pixels_OR_video); |
| 2518 return; |
| 2519 } |
| 2520 throw new ArgumentError("Incorrect number or type of arguments"); |
2518 } | 2521 } |
2519 @JSName('texImage2D') | 2522 @JSName('texImage2D') |
2520 @DomName('WebGLRenderingContext.texImage2D') | 2523 @DomName('WebGLRenderingContext.texImage2D') |
2521 @DocsEditable() | 2524 @DocsEditable() |
2522 void _texImage2D_1(target, level, internalformat, format, type, pixels) native
; | 2525 void _texImage2D_1(target, level, internalformat, width, height, int border, f
ormat, type, TypedData pixels) native; |
2523 | |
2524 @JSName('texImage2D') | 2526 @JSName('texImage2D') |
2525 @DomName('WebGLRenderingContext.texImage2D') | 2527 @DomName('WebGLRenderingContext.texImage2D') |
2526 @DocsEditable() | 2528 @DocsEditable() |
2527 void texImage2DCanvas(int target, int level, int internalformat, int format, i
nt type, CanvasElement canvas) native; | 2529 void _texImage2D_2(target, level, internalformat, format, type, pixels) native
; |
2528 | |
2529 @JSName('texImage2D') | 2530 @JSName('texImage2D') |
2530 @DomName('WebGLRenderingContext.texImage2D') | 2531 @DomName('WebGLRenderingContext.texImage2D') |
2531 @DocsEditable() | 2532 @DocsEditable() |
2532 void texImage2DImage(int target, int level, int internalformat, int format, in
t type, ImageElement image) native; | 2533 void _texImage2D_3(target, level, internalformat, format, type, ImageElement i
mage) native; |
2533 | |
2534 @JSName('texImage2D') | 2534 @JSName('texImage2D') |
2535 @DomName('WebGLRenderingContext.texImage2D') | 2535 @DomName('WebGLRenderingContext.texImage2D') |
2536 @DocsEditable() | 2536 @DocsEditable() |
2537 void texImage2DTypedData(int target, int level, int internalformat, int width,
int height, int border, int format, int type, TypedData pixels) native; | 2537 void _texImage2D_4(target, level, internalformat, format, type, CanvasElement
canvas) native; |
2538 | |
2539 @JSName('texImage2D') | 2538 @JSName('texImage2D') |
2540 @DomName('WebGLRenderingContext.texImage2D') | 2539 @DomName('WebGLRenderingContext.texImage2D') |
2541 @DocsEditable() | 2540 @DocsEditable() |
2542 void texImage2DVideo(int target, int level, int internalformat, int format, in
t type, VideoElement video) native; | 2541 void _texImage2D_5(target, level, internalformat, format, type, VideoElement v
ideo) native; |
2543 | 2542 |
2544 @DomName('WebGLRenderingContext.texParameterf') | 2543 @DomName('WebGLRenderingContext.texParameterf') |
2545 @DocsEditable() | 2544 @DocsEditable() |
2546 void texParameterf(int target, int pname, num param) native; | 2545 void texParameterf(int target, int pname, num param) native; |
2547 | 2546 |
2548 @DomName('WebGLRenderingContext.texParameteri') | 2547 @DomName('WebGLRenderingContext.texParameteri') |
2549 @DocsEditable() | 2548 @DocsEditable() |
2550 void texParameteri(int target, int pname, int param) native; | 2549 void texParameteri(int target, int pname, int param) native; |
2551 | 2550 |
2552 @DomName('WebGLRenderingContext.texSubImage2D') | 2551 @DomName('WebGLRenderingContext.texSubImage2D') |
2553 @DocsEditable() | 2552 @DocsEditable() |
2554 void texSubImage2D(int target, int level, int xoffset, int yoffset, int format
, int type, ImageData pixels) { | 2553 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]) { |
2555 var pixels_1 = convertDartToNative_ImageData(pixels); | 2554 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)) { |
2556 _texSubImage2D_1(target, level, xoffset, yoffset, format, type, pixels_1); | 2555 _texSubImage2D_1(target, level, xoffset, yoffset, format_OR_width, height_
OR_type, canvas_OR_format_OR_image_OR_pixels_OR_video, type, pixels); |
2557 return; | 2556 return; |
| 2557 } |
| 2558 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) { |
| 2559 var pixels_1 = convertDartToNative_ImageData(canvas_OR_format_OR_image_OR_
pixels_OR_video); |
| 2560 _texSubImage2D_2(target, level, xoffset, yoffset, format_OR_width, height_
OR_type, pixels_1); |
| 2561 return; |
| 2562 } |
| 2563 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
) { |
| 2564 _texSubImage2D_3(target, level, xoffset, yoffset, format_OR_width, height_
OR_type, canvas_OR_format_OR_image_OR_pixels_OR_video); |
| 2565 return; |
| 2566 } |
| 2567 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) { |
| 2568 _texSubImage2D_4(target, level, xoffset, yoffset, format_OR_width, height_
OR_type, canvas_OR_format_OR_image_OR_pixels_OR_video); |
| 2569 return; |
| 2570 } |
| 2571 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
) { |
| 2572 _texSubImage2D_5(target, level, xoffset, yoffset, format_OR_width, height_
OR_type, canvas_OR_format_OR_image_OR_pixels_OR_video); |
| 2573 return; |
| 2574 } |
| 2575 throw new ArgumentError("Incorrect number or type of arguments"); |
2558 } | 2576 } |
2559 @JSName('texSubImage2D') | 2577 @JSName('texSubImage2D') |
2560 @DomName('WebGLRenderingContext.texSubImage2D') | 2578 @DomName('WebGLRenderingContext.texSubImage2D') |
2561 @DocsEditable() | 2579 @DocsEditable() |
2562 void _texSubImage2D_1(target, level, xoffset, yoffset, format, type, pixels) n
ative; | 2580 void _texSubImage2D_1(target, level, xoffset, yoffset, width, height, int form
at, type, TypedData pixels) native; |
2563 | |
2564 @JSName('texSubImage2D') | 2581 @JSName('texSubImage2D') |
2565 @DomName('WebGLRenderingContext.texSubImage2D') | 2582 @DomName('WebGLRenderingContext.texSubImage2D') |
2566 @DocsEditable() | 2583 @DocsEditable() |
2567 void texSubImage2DCanvas(int target, int level, int xoffset, int yoffset, int
format, int type, CanvasElement canvas) native; | 2584 void _texSubImage2D_2(target, level, xoffset, yoffset, format, type, pixels) n
ative; |
2568 | |
2569 @JSName('texSubImage2D') | 2585 @JSName('texSubImage2D') |
2570 @DomName('WebGLRenderingContext.texSubImage2D') | 2586 @DomName('WebGLRenderingContext.texSubImage2D') |
2571 @DocsEditable() | 2587 @DocsEditable() |
2572 void texSubImage2DImage(int target, int level, int xoffset, int yoffset, int f
ormat, int type, ImageElement image) native; | 2588 void _texSubImage2D_3(target, level, xoffset, yoffset, format, type, ImageElem
ent image) native; |
2573 | |
2574 @JSName('texSubImage2D') | 2589 @JSName('texSubImage2D') |
2575 @DomName('WebGLRenderingContext.texSubImage2D') | 2590 @DomName('WebGLRenderingContext.texSubImage2D') |
2576 @DocsEditable() | 2591 @DocsEditable() |
2577 void texSubImage2DTypedData(int target, int level, int xoffset, int yoffset, i
nt width, int height, int format, int type, TypedData pixels) native; | 2592 void _texSubImage2D_4(target, level, xoffset, yoffset, format, type, CanvasEle
ment canvas) native; |
2578 | |
2579 @JSName('texSubImage2D') | 2593 @JSName('texSubImage2D') |
2580 @DomName('WebGLRenderingContext.texSubImage2D') | 2594 @DomName('WebGLRenderingContext.texSubImage2D') |
2581 @DocsEditable() | 2595 @DocsEditable() |
2582 void texSubImage2DVideo(int target, int level, int xoffset, int yoffset, int f
ormat, int type, VideoElement video) native; | 2596 void _texSubImage2D_5(target, level, xoffset, yoffset, format, type, VideoElem
ent video) native; |
2583 | 2597 |
2584 @DomName('WebGLRenderingContext.uniform1f') | 2598 @DomName('WebGLRenderingContext.uniform1f') |
2585 @DocsEditable() | 2599 @DocsEditable() |
2586 void uniform1f(UniformLocation location, num x) native; | 2600 void uniform1f(UniformLocation location, num x) native; |
2587 | 2601 |
2588 @DomName('WebGLRenderingContext.uniform1fv') | 2602 @DomName('WebGLRenderingContext.uniform1fv') |
2589 @DocsEditable() | 2603 @DocsEditable() |
2590 void uniform1fv(UniformLocation location, Float32List v) native; | 2604 void uniform1fv(UniformLocation location, Float32List v) native; |
2591 | 2605 |
2592 @DomName('WebGLRenderingContext.uniform1i') | 2606 @DomName('WebGLRenderingContext.uniform1i') |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2757 // for details. All rights reserved. Use of this source code is governed by a | 2771 // for details. All rights reserved. Use of this source code is governed by a |
2758 // BSD-style license that can be found in the LICENSE file. | 2772 // BSD-style license that can be found in the LICENSE file. |
2759 | 2773 |
2760 | 2774 |
2761 @DocsEditable() | 2775 @DocsEditable() |
2762 @DomName('WebGLVertexArrayObjectOES') | 2776 @DomName('WebGLVertexArrayObjectOES') |
2763 // http://www.khronos.org/registry/webgl/extensions/OES_vertex_array_object/ | 2777 // http://www.khronos.org/registry/webgl/extensions/OES_vertex_array_object/ |
2764 @Experimental() // experimental | 2778 @Experimental() // experimental |
2765 class VertexArrayObject extends Interceptor native "WebGLVertexArrayObjectOES" { | 2779 class VertexArrayObject extends Interceptor native "WebGLVertexArrayObjectOES" { |
2766 } | 2780 } |
OLD | NEW |