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