OLD | NEW |
1 library dart.dom.web_gl; | 1 library dart.dom.web_gl; |
2 | 2 |
3 import 'dart:async'; | 3 import 'dart:async'; |
4 import 'dart:collection'; | 4 import 'dart:collection'; |
5 import 'dart:_collection-dev' hide deprecated; | 5 import 'dart:_collection-dev' hide deprecated; |
6 import 'dart:html'; | 6 import 'dart:html'; |
7 import 'dart:html_common'; | 7 import 'dart:html_common'; |
8 import 'dart:nativewrappers'; | 8 import 'dart:nativewrappers'; |
9 import 'dart:typed_data'; | 9 import 'dart:typed_data'; |
10 // DO NOT EDIT | 10 // DO NOT EDIT |
(...skipping 2274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2285 void blendFunc(int sfactor, int dfactor) native "WebGLRenderingContext_blendFu
nc_Callback"; | 2285 void blendFunc(int sfactor, int dfactor) native "WebGLRenderingContext_blendFu
nc_Callback"; |
2286 | 2286 |
2287 @DomName('WebGLRenderingContext.blendFuncSeparate') | 2287 @DomName('WebGLRenderingContext.blendFuncSeparate') |
2288 @DocsEditable() | 2288 @DocsEditable() |
2289 void blendFuncSeparate(int srcRGB, int dstRGB, int srcAlpha, int dstAlpha) nat
ive "WebGLRenderingContext_blendFuncSeparate_Callback"; | 2289 void blendFuncSeparate(int srcRGB, int dstRGB, int srcAlpha, int dstAlpha) nat
ive "WebGLRenderingContext_blendFuncSeparate_Callback"; |
2290 | 2290 |
2291 @DomName('WebGLRenderingContext.bufferByteData') | 2291 @DomName('WebGLRenderingContext.bufferByteData') |
2292 @DocsEditable() | 2292 @DocsEditable() |
2293 void bufferByteData(int target, ByteBuffer data, int usage) native "WebGLRende
ringContext_bufferByteData_Callback"; | 2293 void bufferByteData(int target, ByteBuffer data, int usage) native "WebGLRende
ringContext_bufferByteData_Callback"; |
2294 | 2294 |
2295 @DomName('WebGLRenderingContext.bufferData') | 2295 void bufferData(int target, data_OR_size, int usage) { |
2296 @DocsEditable() | 2296 if ((usage is int || usage == null) && (data_OR_size is TypedData || data_OR
_size == null) && (target is int || target == null)) { |
2297 void bufferData(int target, int size, int usage) native "WebGLRenderingContext
_bufferData_Callback"; | 2297 _bufferData_1(target, data_OR_size, usage); |
| 2298 return; |
| 2299 } |
| 2300 if ((usage is int || usage == null) && (data_OR_size is ByteBuffer || data_O
R_size == null) && (target is int || target == null)) { |
| 2301 _bufferData_2(target, data_OR_size, usage); |
| 2302 return; |
| 2303 } |
| 2304 if ((usage is int || usage == null) && (data_OR_size is int || data_OR_size
== null) && (target is int || target == null)) { |
| 2305 _bufferData_3(target, data_OR_size, usage); |
| 2306 return; |
| 2307 } |
| 2308 throw new ArgumentError("Incorrect number or type of arguments"); |
| 2309 } |
| 2310 |
| 2311 void _bufferData_1(target, data_OR_size, usage) native "WebGLRenderingContext_
_bufferData_1_Callback"; |
| 2312 |
| 2313 void _bufferData_2(target, data_OR_size, usage) native "WebGLRenderingContext_
_bufferData_2_Callback"; |
| 2314 |
| 2315 void _bufferData_3(target, data_OR_size, usage) native "WebGLRenderingContext_
_bufferData_3_Callback"; |
2298 | 2316 |
2299 @DomName('WebGLRenderingContext.bufferDataTyped') | 2317 @DomName('WebGLRenderingContext.bufferDataTyped') |
2300 @DocsEditable() | 2318 @DocsEditable() |
2301 void bufferDataTyped(int target, TypedData data, int usage) native "WebGLRende
ringContext_bufferDataTyped_Callback"; | 2319 void bufferDataTyped(int target, TypedData data, int usage) native "WebGLRende
ringContext_bufferDataTyped_Callback"; |
2302 | 2320 |
2303 @DomName('WebGLRenderingContext.bufferSubByteData') | 2321 @DomName('WebGLRenderingContext.bufferSubByteData') |
2304 @DocsEditable() | 2322 @DocsEditable() |
2305 void bufferSubByteData(int target, int offset, ByteBuffer data) native "WebGLR
enderingContext_bufferSubByteData_Callback"; | 2323 void bufferSubByteData(int target, int offset, ByteBuffer data) native "WebGLR
enderingContext_bufferSubByteData_Callback"; |
2306 | 2324 |
| 2325 void bufferSubData(int target, int offset, data) { |
| 2326 if ((data is TypedData || data == null) && (offset is int || offset == null)
&& (target is int || target == null)) { |
| 2327 _bufferSubData_1(target, offset, data); |
| 2328 return; |
| 2329 } |
| 2330 if ((data is ByteBuffer || data == null) && (offset is int || offset == null
) && (target is int || target == null)) { |
| 2331 _bufferSubData_2(target, offset, data); |
| 2332 return; |
| 2333 } |
| 2334 throw new ArgumentError("Incorrect number or type of arguments"); |
| 2335 } |
| 2336 |
| 2337 void _bufferSubData_1(target, offset, data) native "WebGLRenderingContext__buf
ferSubData_1_Callback"; |
| 2338 |
| 2339 void _bufferSubData_2(target, offset, data) native "WebGLRenderingContext__buf
ferSubData_2_Callback"; |
| 2340 |
2307 @DomName('WebGLRenderingContext.bufferSubDataTyped') | 2341 @DomName('WebGLRenderingContext.bufferSubDataTyped') |
2308 @DocsEditable() | 2342 @DocsEditable() |
2309 void bufferSubDataTyped(int target, int offset, TypedData data) native "WebGLR
enderingContext_bufferSubDataTyped_Callback"; | 2343 void bufferSubDataTyped(int target, int offset, TypedData data) native "WebGLR
enderingContext_bufferSubDataTyped_Callback"; |
2310 | 2344 |
2311 @DomName('WebGLRenderingContext.checkFramebufferStatus') | 2345 @DomName('WebGLRenderingContext.checkFramebufferStatus') |
2312 @DocsEditable() | 2346 @DocsEditable() |
2313 int checkFramebufferStatus(int target) native "WebGLRenderingContext_checkFram
ebufferStatus_Callback"; | 2347 int checkFramebufferStatus(int target) native "WebGLRenderingContext_checkFram
ebufferStatus_Callback"; |
2314 | 2348 |
2315 @DomName('WebGLRenderingContext.clear') | 2349 @DomName('WebGLRenderingContext.clear') |
2316 @DocsEditable() | 2350 @DocsEditable() |
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2649 void stencilMaskSeparate(int face, int mask) native "WebGLRenderingContext_ste
ncilMaskSeparate_Callback"; | 2683 void stencilMaskSeparate(int face, int mask) native "WebGLRenderingContext_ste
ncilMaskSeparate_Callback"; |
2650 | 2684 |
2651 @DomName('WebGLRenderingContext.stencilOp') | 2685 @DomName('WebGLRenderingContext.stencilOp') |
2652 @DocsEditable() | 2686 @DocsEditable() |
2653 void stencilOp(int fail, int zfail, int zpass) native "WebGLRenderingContext_s
tencilOp_Callback"; | 2687 void stencilOp(int fail, int zfail, int zpass) native "WebGLRenderingContext_s
tencilOp_Callback"; |
2654 | 2688 |
2655 @DomName('WebGLRenderingContext.stencilOpSeparate') | 2689 @DomName('WebGLRenderingContext.stencilOpSeparate') |
2656 @DocsEditable() | 2690 @DocsEditable() |
2657 void stencilOpSeparate(int face, int fail, int zfail, int zpass) native "WebGL
RenderingContext_stencilOpSeparate_Callback"; | 2691 void stencilOpSeparate(int face, int fail, int zfail, int zpass) native "WebGL
RenderingContext_stencilOpSeparate_Callback"; |
2658 | 2692 |
2659 @DomName('WebGLRenderingContext.texImage2D') | 2693 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]) { |
2660 @DocsEditable() | 2694 if ((pixels is TypedData || pixels == null) && (type is int || type == null)
&& (format is int || format == null) && (border_OR_canvas_OR_image_OR_pixels_OR
_video is int || border_OR_canvas_OR_image_OR_pixels_OR_video == null) && (heigh
t_OR_type is int || height_OR_type == null) && (format_OR_width is int || format
_OR_width == null) && (internalformat is int || internalformat == null) && (leve
l is int || level == null) && (target is int || target == null)) { |
2661 void _texImage2D(int target, int level, int internalformat, int width, int hei
ght, int border, int format, int type, TypedData pixels) native "WebGLRenderingC
ontext_texImage2D_Callback"; | 2695 _texImage2D_1(target, level, internalformat, format_OR_width, height_OR_ty
pe, border_OR_canvas_OR_image_OR_pixels_OR_video, format, type, pixels); |
| 2696 return; |
| 2697 } |
| 2698 if ((border_OR_canvas_OR_image_OR_pixels_OR_video is ImageData || border_OR_
canvas_OR_image_OR_pixels_OR_video == null) && (height_OR_type is int || height_
OR_type == null) && (format_OR_width is int || format_OR_width == null) && (inte
rnalformat is int || internalformat == null) && (level is int || level == null)
&& (target is int || target == null) && format == null && type == null && pixels
== null) { |
| 2699 _texImage2D_2(target, level, internalformat, format_OR_width, height_OR_ty
pe, border_OR_canvas_OR_image_OR_pixels_OR_video); |
| 2700 return; |
| 2701 } |
| 2702 if ((border_OR_canvas_OR_image_OR_pixels_OR_video is ImageElement || border_
OR_canvas_OR_image_OR_pixels_OR_video == null) && (height_OR_type is int || heig
ht_OR_type == null) && (format_OR_width is int || format_OR_width == null) && (i
nternalformat is int || internalformat == null) && (level is int || level == nul
l) && (target is int || target == null) && format == null && type == null && pix
els == null) { |
| 2703 _texImage2D_3(target, level, internalformat, format_OR_width, height_OR_ty
pe, border_OR_canvas_OR_image_OR_pixels_OR_video); |
| 2704 return; |
| 2705 } |
| 2706 if ((border_OR_canvas_OR_image_OR_pixels_OR_video is CanvasElement || border
_OR_canvas_OR_image_OR_pixels_OR_video == null) && (height_OR_type is int || hei
ght_OR_type == null) && (format_OR_width is int || format_OR_width == null) && (
internalformat is int || internalformat == null) && (level is int || level == nu
ll) && (target is int || target == null) && format == null && type == null && pi
xels == null) { |
| 2707 _texImage2D_4(target, level, internalformat, format_OR_width, height_OR_ty
pe, border_OR_canvas_OR_image_OR_pixels_OR_video); |
| 2708 return; |
| 2709 } |
| 2710 if ((border_OR_canvas_OR_image_OR_pixels_OR_video is VideoElement || border_
OR_canvas_OR_image_OR_pixels_OR_video == null) && (height_OR_type is int || heig
ht_OR_type == null) && (format_OR_width is int || format_OR_width == null) && (i
nternalformat is int || internalformat == null) && (level is int || level == nul
l) && (target is int || target == null) && format == null && type == null && pix
els == null) { |
| 2711 _texImage2D_5(target, level, internalformat, format_OR_width, height_OR_ty
pe, border_OR_canvas_OR_image_OR_pixels_OR_video); |
| 2712 return; |
| 2713 } |
| 2714 throw new ArgumentError("Incorrect number or type of arguments"); |
| 2715 } |
| 2716 |
| 2717 void _texImage2D_1(target, level, internalformat, format_OR_width, height_OR_t
ype, border_OR_canvas_OR_image_OR_pixels_OR_video, format, type, pixels) native
"WebGLRenderingContext__texImage2D_1_Callback"; |
| 2718 |
| 2719 void _texImage2D_2(target, level, internalformat, format_OR_width, height_OR_t
ype, border_OR_canvas_OR_image_OR_pixels_OR_video) native "WebGLRenderingContext
__texImage2D_2_Callback"; |
| 2720 |
| 2721 void _texImage2D_3(target, level, internalformat, format_OR_width, height_OR_t
ype, border_OR_canvas_OR_image_OR_pixels_OR_video) native "WebGLRenderingContext
__texImage2D_3_Callback"; |
| 2722 |
| 2723 void _texImage2D_4(target, level, internalformat, format_OR_width, height_OR_t
ype, border_OR_canvas_OR_image_OR_pixels_OR_video) native "WebGLRenderingContext
__texImage2D_4_Callback"; |
| 2724 |
| 2725 void _texImage2D_5(target, level, internalformat, format_OR_width, height_OR_t
ype, border_OR_canvas_OR_image_OR_pixels_OR_video) native "WebGLRenderingContext
__texImage2D_5_Callback"; |
2662 | 2726 |
2663 @DomName('WebGLRenderingContext.texImage2DCanvas') | 2727 @DomName('WebGLRenderingContext.texImage2DCanvas') |
2664 @DocsEditable() | 2728 @DocsEditable() |
2665 void texImage2DCanvas(int target, int level, int internalformat, int format, i
nt type, CanvasElement canvas) native "WebGLRenderingContext_texImage2DCanvas_Ca
llback"; | 2729 void texImage2DCanvas(int target, int level, int internalformat, int format, i
nt type, CanvasElement canvas) native "WebGLRenderingContext_texImage2DCanvas_Ca
llback"; |
2666 | 2730 |
2667 @DomName('WebGLRenderingContext.texImage2DImage') | 2731 @DomName('WebGLRenderingContext.texImage2DImage') |
2668 @DocsEditable() | 2732 @DocsEditable() |
2669 void texImage2DImage(int target, int level, int internalformat, int format, in
t type, ImageElement image) native "WebGLRenderingContext_texImage2DImage_Callba
ck"; | 2733 void texImage2DImage(int target, int level, int internalformat, int format, in
t type, ImageElement image) native "WebGLRenderingContext_texImage2DImage_Callba
ck"; |
2670 | 2734 |
2671 @DomName('WebGLRenderingContext.texImage2DImageData') | 2735 @DomName('WebGLRenderingContext.texImage2DImageData') |
2672 @DocsEditable() | 2736 @DocsEditable() |
2673 void texImage2DImageData(int target, int level, int internalformat, int format
, int type, ImageData pixels) native "WebGLRenderingContext_texImage2DImageData_
Callback"; | 2737 void texImage2DImageData(int target, int level, int internalformat, int format
, int type, ImageData pixels) native "WebGLRenderingContext_texImage2DImageData_
Callback"; |
2674 | 2738 |
2675 @DomName('WebGLRenderingContext.texImage2DVideo') | 2739 @DomName('WebGLRenderingContext.texImage2DVideo') |
2676 @DocsEditable() | 2740 @DocsEditable() |
2677 void texImage2DVideo(int target, int level, int internalformat, int format, in
t type, VideoElement video) native "WebGLRenderingContext_texImage2DVideo_Callba
ck"; | 2741 void texImage2DVideo(int target, int level, int internalformat, int format, in
t type, VideoElement video) native "WebGLRenderingContext_texImage2DVideo_Callba
ck"; |
2678 | 2742 |
2679 @DomName('WebGLRenderingContext.texParameterf') | 2743 @DomName('WebGLRenderingContext.texParameterf') |
2680 @DocsEditable() | 2744 @DocsEditable() |
2681 void texParameterf(int target, int pname, num param) native "WebGLRenderingCon
text_texParameterf_Callback"; | 2745 void texParameterf(int target, int pname, num param) native "WebGLRenderingCon
text_texParameterf_Callback"; |
2682 | 2746 |
2683 @DomName('WebGLRenderingContext.texParameteri') | 2747 @DomName('WebGLRenderingContext.texParameteri') |
2684 @DocsEditable() | 2748 @DocsEditable() |
2685 void texParameteri(int target, int pname, int param) native "WebGLRenderingCon
text_texParameteri_Callback"; | 2749 void texParameteri(int target, int pname, int param) native "WebGLRenderingCon
text_texParameteri_Callback"; |
2686 | 2750 |
2687 @DomName('WebGLRenderingContext.texSubImage2D') | 2751 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]) { |
2688 @DocsEditable() | 2752 if ((pixels is TypedData || pixels == null) && (type is int || type == null)
&& (canvas_OR_format_OR_image_OR_pixels_OR_video is int || canvas_OR_format_OR_
image_OR_pixels_OR_video == null) && (height_OR_type is int || height_OR_type ==
null) && (format_OR_width is int || format_OR_width == null) && (yoffset is int
|| yoffset == null) && (xoffset is int || xoffset == null) && (level is int ||
level == null) && (target is int || target == null)) { |
2689 void _texSubImageImage2D(int target, int level, int xoffset, int yoffset, int
width, int height, int format, int type, TypedData pixels) native "WebGLRenderin
gContext_texSubImage2D_Callback"; | 2753 _texSubImage2D_1(target, level, xoffset, yoffset, format_OR_width, height_
OR_type, canvas_OR_format_OR_image_OR_pixels_OR_video, type, pixels); |
| 2754 return; |
| 2755 } |
| 2756 if ((canvas_OR_format_OR_image_OR_pixels_OR_video is ImageData || canvas_OR_
format_OR_image_OR_pixels_OR_video == null) && (height_OR_type is int || height_
OR_type == null) && (format_OR_width is int || format_OR_width == null) && (yoff
set is int || yoffset == null) && (xoffset is int || xoffset == null) && (level
is int || level == null) && (target is int || target == null) && type == null &&
pixels == null) { |
| 2757 _texSubImage2D_2(target, level, xoffset, yoffset, format_OR_width, height_
OR_type, canvas_OR_format_OR_image_OR_pixels_OR_video); |
| 2758 return; |
| 2759 } |
| 2760 if ((canvas_OR_format_OR_image_OR_pixels_OR_video is ImageElement || canvas_
OR_format_OR_image_OR_pixels_OR_video == null) && (height_OR_type is int || heig
ht_OR_type == null) && (format_OR_width is int || format_OR_width == null) && (y
offset is int || yoffset == null) && (xoffset is int || xoffset == null) && (lev
el is int || level == null) && (target is int || target == null) && type == null
&& pixels == null) { |
| 2761 _texSubImage2D_3(target, level, xoffset, yoffset, format_OR_width, height_
OR_type, canvas_OR_format_OR_image_OR_pixels_OR_video); |
| 2762 return; |
| 2763 } |
| 2764 if ((canvas_OR_format_OR_image_OR_pixels_OR_video is CanvasElement || canvas
_OR_format_OR_image_OR_pixels_OR_video == null) && (height_OR_type is int || hei
ght_OR_type == null) && (format_OR_width is int || format_OR_width == null) && (
yoffset is int || yoffset == null) && (xoffset is int || xoffset == null) && (le
vel is int || level == null) && (target is int || target == null) && type == nul
l && pixels == null) { |
| 2765 _texSubImage2D_4(target, level, xoffset, yoffset, format_OR_width, height_
OR_type, canvas_OR_format_OR_image_OR_pixels_OR_video); |
| 2766 return; |
| 2767 } |
| 2768 if ((canvas_OR_format_OR_image_OR_pixels_OR_video is VideoElement || canvas_
OR_format_OR_image_OR_pixels_OR_video == null) && (height_OR_type is int || heig
ht_OR_type == null) && (format_OR_width is int || format_OR_width == null) && (y
offset is int || yoffset == null) && (xoffset is int || xoffset == null) && (lev
el is int || level == null) && (target is int || target == null) && type == null
&& pixels == null) { |
| 2769 _texSubImage2D_5(target, level, xoffset, yoffset, format_OR_width, height_
OR_type, canvas_OR_format_OR_image_OR_pixels_OR_video); |
| 2770 return; |
| 2771 } |
| 2772 throw new ArgumentError("Incorrect number or type of arguments"); |
| 2773 } |
| 2774 |
| 2775 void _texSubImage2D_1(target, level, xoffset, yoffset, format_OR_width, height
_OR_type, canvas_OR_format_OR_image_OR_pixels_OR_video, type, pixels) native "We
bGLRenderingContext__texSubImage2D_1_Callback"; |
| 2776 |
| 2777 void _texSubImage2D_2(target, level, xoffset, yoffset, format_OR_width, height
_OR_type, canvas_OR_format_OR_image_OR_pixels_OR_video) native "WebGLRenderingCo
ntext__texSubImage2D_2_Callback"; |
| 2778 |
| 2779 void _texSubImage2D_3(target, level, xoffset, yoffset, format_OR_width, height
_OR_type, canvas_OR_format_OR_image_OR_pixels_OR_video) native "WebGLRenderingCo
ntext__texSubImage2D_3_Callback"; |
| 2780 |
| 2781 void _texSubImage2D_4(target, level, xoffset, yoffset, format_OR_width, height
_OR_type, canvas_OR_format_OR_image_OR_pixels_OR_video) native "WebGLRenderingCo
ntext__texSubImage2D_4_Callback"; |
| 2782 |
| 2783 void _texSubImage2D_5(target, level, xoffset, yoffset, format_OR_width, height
_OR_type, canvas_OR_format_OR_image_OR_pixels_OR_video) native "WebGLRenderingCo
ntext__texSubImage2D_5_Callback"; |
2690 | 2784 |
2691 @DomName('WebGLRenderingContext.texSubImage2DCanvas') | 2785 @DomName('WebGLRenderingContext.texSubImage2DCanvas') |
2692 @DocsEditable() | 2786 @DocsEditable() |
2693 void texSubImage2DCanvas(int target, int level, int xoffset, int yoffset, int
format, int type, CanvasElement canvas) native "WebGLRenderingContext_texSubImag
e2DCanvas_Callback"; | 2787 void texSubImage2DCanvas(int target, int level, int xoffset, int yoffset, int
format, int type, CanvasElement canvas) native "WebGLRenderingContext_texSubImag
e2DCanvas_Callback"; |
2694 | 2788 |
2695 @DomName('WebGLRenderingContext.texSubImage2DImage') | 2789 @DomName('WebGLRenderingContext.texSubImage2DImage') |
2696 @DocsEditable() | 2790 @DocsEditable() |
2697 void texSubImage2DImage(int target, int level, int xoffset, int yoffset, int f
ormat, int type, ImageElement image) native "WebGLRenderingContext_texSubImage2D
Image_Callback"; | 2791 void texSubImage2DImage(int target, int level, int xoffset, int yoffset, int f
ormat, int type, ImageElement image) native "WebGLRenderingContext_texSubImage2D
Image_Callback"; |
2698 | 2792 |
2699 @DomName('WebGLRenderingContext.texSubImage2DImageData') | 2793 @DomName('WebGLRenderingContext.texSubImage2DImageData') |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2831 | 2925 |
2832 /** | 2926 /** |
2833 * Sets the currently bound texture to [data]. | 2927 * Sets the currently bound texture to [data]. |
2834 * | 2928 * |
2835 * [data] can be either an [ImageElement], a | 2929 * [data] can be either an [ImageElement], a |
2836 * [CanvasElement], a [VideoElement], or an [ImageData] object. | 2930 * [CanvasElement], a [VideoElement], or an [ImageData] object. |
2837 * | 2931 * |
2838 * To use [texImage2d] with a TypedData object, use [texImage2dTyped]. | 2932 * To use [texImage2d] with a TypedData object, use [texImage2dTyped]. |
2839 * | 2933 * |
2840 */ | 2934 */ |
2841 @DomName('WebGLRenderingContext.texImage2D') | 2935 void texImage2DUntyped(int targetTexture, int levelOfDetail, |
2842 void texImage2D(int targetTexture, int levelOfDetail, int internalFormat, | 2936 int internalFormat, int format, int type, data) { |
2843 int format, int type, data) { | |
2844 if (data is ImageElement) { | 2937 if (data is ImageElement) { |
2845 texImage2DImage(targetTexture, levelOfDetail, internalFormat, format, | 2938 texImage2DImage(targetTexture, levelOfDetail, internalFormat, format, |
2846 type, data); | 2939 type, data); |
2847 } else if (data is ImageData) { | 2940 } else if (data is ImageData) { |
2848 texImage2DImageData(targetTexture, levelOfDetail, internalFormat, format, | 2941 texImage2DImageData(targetTexture, levelOfDetail, internalFormat, format, |
2849 type, data); | 2942 type, data); |
2850 } else if (data is CanvasElement) { | 2943 } else if (data is CanvasElement) { |
2851 texImage2DCanvas(targetTexture, levelOfDetail, internalFormat, format, | 2944 texImage2DCanvas(targetTexture, levelOfDetail, internalFormat, format, |
2852 type, data); | 2945 type, data); |
2853 } else { | 2946 } else { |
2854 texImage2DVideo(targetTexture, levelOfDetail, internalFormat, format, | 2947 texImage2DVideo(targetTexture, levelOfDetail, internalFormat, format, |
2855 type, data); | 2948 type, data); |
2856 } | 2949 } |
2857 } | 2950 } |
2858 | 2951 |
2859 /** | 2952 /** |
2860 * Sets the currently bound texture to [data]. | 2953 * Sets the currently bound texture to [data]. |
2861 */ | 2954 */ |
2862 void texImage2DTyped(int targetTexture, int levelOfDetail, int internalFormat, | 2955 void texImage2DTyped(int targetTexture, int levelOfDetail, int internalFormat, |
2863 int width, int height, int border, int format, int type, TypedData data) { | 2956 int width, int height, int border, int format, int type, TypedData data) { |
2864 _texImage2D(targetTexture, levelOfDetail, internalFormat, | 2957 texImage2D(targetTexture, levelOfDetail, internalFormat, |
2865 width, height, border, format, type, data); | 2958 width, height, border, format, type, data); |
2866 } | 2959 } |
2867 | 2960 |
2868 /** | 2961 /** |
2869 * Updates a sub-rectangle of the currently bound texture to [data]. | 2962 * Updates a sub-rectangle of the currently bound texture to [data]. |
2870 * | 2963 * |
2871 * [data] can be either an [ImageElement], a | 2964 * [data] can be either an [ImageElement], a |
2872 * [CanvasElement], a [VideoElement], or an [ImageData] object. | 2965 * [CanvasElement], a [VideoElement], or an [ImageData] object. |
2873 * | 2966 * |
2874 * To use [texSubImage2d] with a TypedData object, use [texSubImage2dTyped]. | 2967 * To use [texSubImage2d] with a TypedData object, use [texSubImage2dTyped]. |
2875 * | 2968 * |
2876 */ | 2969 */ |
2877 @DomName('WebGLRenderingContext.texSubImage2D') | 2970 void texSubImage2DUntyped(int targetTexture, int levelOfDetail, |
2878 void texSubImage2D(int targetTexture, int levelOfDetail, int internalFormat, | 2971 int internalFormat, int format, int type, data) { |
2879 int format, int type, data) { | 2972 texSubImage2D(targetTexture, levelOfDetail, internalFormat, |
2880 _texSubImage2D(targetTexture, levelOfDetail, internalFormat, | |
2881 format, type, data); | 2973 format, type, data); |
2882 } | 2974 } |
2883 | 2975 |
2884 /** | 2976 /** |
2885 * Updates a sub-rectangle of the currently bound texture to [data]. | 2977 * Updates a sub-rectangle of the currently bound texture to [data]. |
2886 */ | 2978 */ |
2887 void texSubImage2DTyped(int targetTexture, int levelOfDetail, | 2979 void texSubImage2DTyped(int targetTexture, int levelOfDetail, |
2888 int internalFormat, int width, int height, int border, int format, | 2980 int internalFormat, int width, int height, int border, int format, |
2889 int type, TypedData data) { | 2981 int type, TypedData data) { |
2890 _texSubImage2D(targetTexture, levelOfDetail, internalFormat, | 2982 texSubImage2D(targetTexture, levelOfDetail, internalFormat, |
2891 width, height, border, format, type, data); | 2983 width, height, border, format, type, data); |
2892 } | 2984 } |
2893 } | 2985 } |
2894 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 2986 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2895 // for details. All rights reserved. Use of this source code is governed by a | 2987 // for details. All rights reserved. Use of this source code is governed by a |
2896 // BSD-style license that can be found in the LICENSE file. | 2988 // BSD-style license that can be found in the LICENSE file. |
2897 | 2989 |
2898 // WARNING: Do not edit - generated code. | 2990 // WARNING: Do not edit - generated code. |
2899 | 2991 |
2900 | 2992 |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2968 | 3060 |
2969 @DocsEditable() | 3061 @DocsEditable() |
2970 @DomName('WebGLVertexArrayObjectOES') | 3062 @DomName('WebGLVertexArrayObjectOES') |
2971 // http://www.khronos.org/registry/webgl/extensions/OES_vertex_array_object/ | 3063 // http://www.khronos.org/registry/webgl/extensions/OES_vertex_array_object/ |
2972 @Experimental() // experimental | 3064 @Experimental() // experimental |
2973 class VertexArrayObject extends NativeFieldWrapperClass2 { | 3065 class VertexArrayObject extends NativeFieldWrapperClass2 { |
2974 // To suppress missing implicit constructor warnings. | 3066 // To suppress missing implicit constructor warnings. |
2975 factory VertexArrayObject._() { throw new UnsupportedError("Not supported"); } | 3067 factory VertexArrayObject._() { throw new UnsupportedError("Not supported"); } |
2976 | 3068 |
2977 } | 3069 } |
OLD | NEW |