| OLD | NEW |
| 1 /** | 1 /** |
| 2 * 3D programming in the browser. | 2 * 3D programming in the browser. |
| 3 */ | 3 */ |
| 4 library dart.dom.web_gl; | 4 library dart.dom.web_gl; |
| 5 | 5 |
| 6 import 'dart:collection'; | 6 import 'dart:collection'; |
| 7 import 'dart:_internal'; | 7 import 'dart:_internal'; |
| 8 import 'dart:html'; | 8 import 'dart:html'; |
| 9 import 'dart:html_common'; | 9 import 'dart:html_common'; |
| 10 import 'dart:_native_typed_data'; | 10 import 'dart:_native_typed_data'; |
| (...skipping 2368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2379 void blendEquationSeparate(int modeRGB, int modeAlpha) native; | 2379 void blendEquationSeparate(int modeRGB, int modeAlpha) native; |
| 2380 | 2380 |
| 2381 @DomName('WebGLRenderingContext.blendFunc') | 2381 @DomName('WebGLRenderingContext.blendFunc') |
| 2382 @DocsEditable() | 2382 @DocsEditable() |
| 2383 void blendFunc(int sfactor, int dfactor) native; | 2383 void blendFunc(int sfactor, int dfactor) native; |
| 2384 | 2384 |
| 2385 @DomName('WebGLRenderingContext.blendFuncSeparate') | 2385 @DomName('WebGLRenderingContext.blendFuncSeparate') |
| 2386 @DocsEditable() | 2386 @DocsEditable() |
| 2387 void blendFuncSeparate(int srcRGB, int dstRGB, int srcAlpha, int dstAlpha) nat
ive; | 2387 void blendFuncSeparate(int srcRGB, int dstRGB, int srcAlpha, int dstAlpha) nat
ive; |
| 2388 | 2388 |
| 2389 /** | |
| 2390 * Buffers the specified data. | |
| 2391 * | |
| 2392 * The [bufferData] method is provided for WebGL API compatibility reasons, bu
t | |
| 2393 * it is highly recommended that you use [bufferDataTyped] or [bufferByteData] | |
| 2394 * depending on your purposes. | |
| 2395 */ | |
| 2396 @DomName('WebGLRenderingContext.bufferData') | 2389 @DomName('WebGLRenderingContext.bufferData') |
| 2397 @DocsEditable() | 2390 @DocsEditable() |
| 2398 void bufferData(int target, data_OR_size, int usage) native; | 2391 void bufferData(int target, data_OR_size, int usage) native; |
| 2399 | 2392 |
| 2400 /** | |
| 2401 * Buffers the specified subset of data. | |
| 2402 * | |
| 2403 * The [bufferSubData] method is provided for WebGL API compatibility reasons,
but | |
| 2404 * it is highly recommended that you use [bufferSubDataTyped] or [bufferSubByt
eData] | |
| 2405 * depending on your purposes. | |
| 2406 */ | |
| 2407 @DomName('WebGLRenderingContext.bufferSubData') | 2393 @DomName('WebGLRenderingContext.bufferSubData') |
| 2408 @DocsEditable() | 2394 @DocsEditable() |
| 2409 void bufferSubData(int target, int offset, data) native; | 2395 void bufferSubData(int target, int offset, data) native; |
| 2410 | 2396 |
| 2411 @DomName('WebGLRenderingContext.checkFramebufferStatus') | 2397 @DomName('WebGLRenderingContext.checkFramebufferStatus') |
| 2412 @DocsEditable() | 2398 @DocsEditable() |
| 2413 int checkFramebufferStatus(int target) native; | 2399 int checkFramebufferStatus(int target) native; |
| 2414 | 2400 |
| 2415 @DomName('WebGLRenderingContext.clear') | 2401 @DomName('WebGLRenderingContext.clear') |
| 2416 @DocsEditable() | 2402 @DocsEditable() |
| (...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2775 void stencilMaskSeparate(int face, int mask) native; | 2761 void stencilMaskSeparate(int face, int mask) native; |
| 2776 | 2762 |
| 2777 @DomName('WebGLRenderingContext.stencilOp') | 2763 @DomName('WebGLRenderingContext.stencilOp') |
| 2778 @DocsEditable() | 2764 @DocsEditable() |
| 2779 void stencilOp(int fail, int zfail, int zpass) native; | 2765 void stencilOp(int fail, int zfail, int zpass) native; |
| 2780 | 2766 |
| 2781 @DomName('WebGLRenderingContext.stencilOpSeparate') | 2767 @DomName('WebGLRenderingContext.stencilOpSeparate') |
| 2782 @DocsEditable() | 2768 @DocsEditable() |
| 2783 void stencilOpSeparate(int face, int fail, int zfail, int zpass) native; | 2769 void stencilOpSeparate(int face, int fail, int zfail, int zpass) native; |
| 2784 | 2770 |
| 2785 /** | |
| 2786 * Updates the currently bound texture to [data]. | |
| 2787 * | |
| 2788 * The [texImage2D] method is provided for WebGL API compatibility reasons, bu
t it | |
| 2789 * is highly recommended that you use [texImage2DUntyped] or [texImage2DTyped] | |
| 2790 * (or for more specificity, the more specialized [texImage2DImageData], | |
| 2791 * [texImage2DCanvas], [texImage2DVideo]). | |
| 2792 */ | |
| 2793 @DomName('WebGLRenderingContext.texImage2D') | 2771 @DomName('WebGLRenderingContext.texImage2D') |
| 2794 @DocsEditable() | 2772 @DocsEditable() |
| 2795 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]) { | 2773 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]) { |
| 2796 if (pixels != null && type != null && format != null && (border_OR_canvas_OR
_image_OR_pixels_OR_video is int)) { | 2774 if (pixels != null && type != null && format != null && (border_OR_canvas_OR
_image_OR_pixels_OR_video is int)) { |
| 2797 _texImage2D_1(target, level, internalformat, format_OR_width, height_OR_ty
pe, border_OR_canvas_OR_image_OR_pixels_OR_video, format, type, pixels); | 2775 _texImage2D_1(target, level, internalformat, format_OR_width, height_OR_ty
pe, border_OR_canvas_OR_image_OR_pixels_OR_video, format, type, pixels); |
| 2798 return; | 2776 return; |
| 2799 } | 2777 } |
| 2800 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) { | 2778 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) { |
| 2801 var pixels_1 = convertDartToNative_ImageData(border_OR_canvas_OR_image_OR_
pixels_OR_video); | 2779 var pixels_1 = convertDartToNative_ImageData(border_OR_canvas_OR_image_OR_
pixels_OR_video); |
| 2802 _texImage2D_2(target, level, internalformat, format_OR_width, height_OR_ty
pe, pixels_1); | 2780 _texImage2D_2(target, level, internalformat, format_OR_width, height_OR_ty
pe, pixels_1); |
| 2803 return; | 2781 return; |
| 2804 } | 2782 } |
| 2805 if ((border_OR_canvas_OR_image_OR_pixels_OR_video is ImageElement) && format
== null && type == null && pixels == null) { | 2783 if ((border_OR_canvas_OR_image_OR_pixels_OR_video is ImageElement) && format
== null && type == null && pixels == null) { |
| 2806 _texImage2D_3(target, level, internalformat, format_OR_width, height_OR_ty
pe, border_OR_canvas_OR_image_OR_pixels_OR_video); | 2784 _texImage2D_3(target, level, internalformat, format_OR_width, height_OR_ty
pe, border_OR_canvas_OR_image_OR_pixels_OR_video); |
| 2807 return; | 2785 return; |
| 2808 } | 2786 } |
| 2809 if ((border_OR_canvas_OR_image_OR_pixels_OR_video is CanvasElement) && forma
t == null && type == null && pixels == null) { | 2787 if ((border_OR_canvas_OR_image_OR_pixels_OR_video is CanvasElement) && forma
t == null && type == null && pixels == null) { |
| 2810 _texImage2D_4(target, level, internalformat, format_OR_width, height_OR_ty
pe, border_OR_canvas_OR_image_OR_pixels_OR_video); | 2788 _texImage2D_4(target, level, internalformat, format_OR_width, height_OR_ty
pe, border_OR_canvas_OR_image_OR_pixels_OR_video); |
| 2811 return; | 2789 return; |
| 2812 } | 2790 } |
| 2813 if ((border_OR_canvas_OR_image_OR_pixels_OR_video is VideoElement) && format
== null && type == null && pixels == null) { | 2791 if ((border_OR_canvas_OR_image_OR_pixels_OR_video is VideoElement) && format
== null && type == null && pixels == null) { |
| 2814 _texImage2D_5(target, level, internalformat, format_OR_width, height_OR_ty
pe, border_OR_canvas_OR_image_OR_pixels_OR_video); | 2792 _texImage2D_5(target, level, internalformat, format_OR_width, height_OR_ty
pe, border_OR_canvas_OR_image_OR_pixels_OR_video); |
| 2815 return; | 2793 return; |
| 2816 } | 2794 } |
| 2817 throw new ArgumentError("Incorrect number or type of arguments"); | 2795 throw new ArgumentError("Incorrect number or type of arguments"); |
| 2818 } | 2796 } |
| 2819 @JSName('texImage2D') | 2797 @JSName('texImage2D') |
| 2820 /** | |
| 2821 * Updates the currently bound texture to [data]. | |
| 2822 * | |
| 2823 * The [texImage2D] method is provided for WebGL API compatibility reasons, bu
t it | |
| 2824 * is highly recommended that you use [texImage2DUntyped] or [texImage2DTyped] | |
| 2825 * (or for more specificity, the more specialized [texImage2DImageData], | |
| 2826 * [texImage2DCanvas], [texImage2DVideo]). | |
| 2827 */ | |
| 2828 @DomName('WebGLRenderingContext.texImage2D') | 2798 @DomName('WebGLRenderingContext.texImage2D') |
| 2829 @DocsEditable() | 2799 @DocsEditable() |
| 2830 void _texImage2D_1(target, level, internalformat, width, height, int border, f
ormat, type, TypedData pixels) native; | 2800 void _texImage2D_1(target, level, internalformat, width, height, int border, f
ormat, type, TypedData pixels) native; |
| 2831 @JSName('texImage2D') | 2801 @JSName('texImage2D') |
| 2832 /** | |
| 2833 * Updates the currently bound texture to [data]. | |
| 2834 * | |
| 2835 * The [texImage2D] method is provided for WebGL API compatibility reasons, bu
t it | |
| 2836 * is highly recommended that you use [texImage2DUntyped] or [texImage2DTyped] | |
| 2837 * (or for more specificity, the more specialized [texImage2DImageData], | |
| 2838 * [texImage2DCanvas], [texImage2DVideo]). | |
| 2839 */ | |
| 2840 @DomName('WebGLRenderingContext.texImage2D') | 2802 @DomName('WebGLRenderingContext.texImage2D') |
| 2841 @DocsEditable() | 2803 @DocsEditable() |
| 2842 void _texImage2D_2(target, level, internalformat, format, type, pixels) native
; | 2804 void _texImage2D_2(target, level, internalformat, format, type, pixels) native
; |
| 2843 @JSName('texImage2D') | 2805 @JSName('texImage2D') |
| 2844 /** | |
| 2845 * Updates the currently bound texture to [data]. | |
| 2846 * | |
| 2847 * The [texImage2D] method is provided for WebGL API compatibility reasons, bu
t it | |
| 2848 * is highly recommended that you use [texImage2DUntyped] or [texImage2DTyped] | |
| 2849 * (or for more specificity, the more specialized [texImage2DImageData], | |
| 2850 * [texImage2DCanvas], [texImage2DVideo]). | |
| 2851 */ | |
| 2852 @DomName('WebGLRenderingContext.texImage2D') | 2806 @DomName('WebGLRenderingContext.texImage2D') |
| 2853 @DocsEditable() | 2807 @DocsEditable() |
| 2854 void _texImage2D_3(target, level, internalformat, format, type, ImageElement i
mage) native; | 2808 void _texImage2D_3(target, level, internalformat, format, type, ImageElement i
mage) native; |
| 2855 @JSName('texImage2D') | 2809 @JSName('texImage2D') |
| 2856 /** | |
| 2857 * Updates the currently bound texture to [data]. | |
| 2858 * | |
| 2859 * The [texImage2D] method is provided for WebGL API compatibility reasons, bu
t it | |
| 2860 * is highly recommended that you use [texImage2DUntyped] or [texImage2DTyped] | |
| 2861 * (or for more specificity, the more specialized [texImage2DImageData], | |
| 2862 * [texImage2DCanvas], [texImage2DVideo]). | |
| 2863 */ | |
| 2864 @DomName('WebGLRenderingContext.texImage2D') | 2810 @DomName('WebGLRenderingContext.texImage2D') |
| 2865 @DocsEditable() | 2811 @DocsEditable() |
| 2866 void _texImage2D_4(target, level, internalformat, format, type, CanvasElement
canvas) native; | 2812 void _texImage2D_4(target, level, internalformat, format, type, CanvasElement
canvas) native; |
| 2867 @JSName('texImage2D') | 2813 @JSName('texImage2D') |
| 2868 /** | |
| 2869 * Updates the currently bound texture to [data]. | |
| 2870 * | |
| 2871 * The [texImage2D] method is provided for WebGL API compatibility reasons, bu
t it | |
| 2872 * is highly recommended that you use [texImage2DUntyped] or [texImage2DTyped] | |
| 2873 * (or for more specificity, the more specialized [texImage2DImageData], | |
| 2874 * [texImage2DCanvas], [texImage2DVideo]). | |
| 2875 */ | |
| 2876 @DomName('WebGLRenderingContext.texImage2D') | 2814 @DomName('WebGLRenderingContext.texImage2D') |
| 2877 @DocsEditable() | 2815 @DocsEditable() |
| 2878 void _texImage2D_5(target, level, internalformat, format, type, VideoElement v
ideo) native; | 2816 void _texImage2D_5(target, level, internalformat, format, type, VideoElement v
ideo) native; |
| 2879 | 2817 |
| 2880 @DomName('WebGLRenderingContext.texParameterf') | 2818 @DomName('WebGLRenderingContext.texParameterf') |
| 2881 @DocsEditable() | 2819 @DocsEditable() |
| 2882 void texParameterf(int target, int pname, num param) native; | 2820 void texParameterf(int target, int pname, num param) native; |
| 2883 | 2821 |
| 2884 @DomName('WebGLRenderingContext.texParameteri') | 2822 @DomName('WebGLRenderingContext.texParameteri') |
| 2885 @DocsEditable() | 2823 @DocsEditable() |
| 2886 void texParameteri(int target, int pname, int param) native; | 2824 void texParameteri(int target, int pname, int param) native; |
| 2887 | 2825 |
| 2888 /** | |
| 2889 * Updates a sub-rectangle of the currently bound texture to [data]. | |
| 2890 * | |
| 2891 * The [texSubImage2D] method is provided for WebGL API compatibility reasons,
but it | |
| 2892 * is highly recommended that you use [texSubImage2DUntyped] or [texSubImage2D
Typed] | |
| 2893 * (or for more specificity, the more specialized [texSubImage2DImageData], | |
| 2894 * [texSubImage2DCanvas], [texSubImage2DVideo]). | |
| 2895 */ | |
| 2896 @DomName('WebGLRenderingContext.texSubImage2D') | 2826 @DomName('WebGLRenderingContext.texSubImage2D') |
| 2897 @DocsEditable() | 2827 @DocsEditable() |
| 2898 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]) { | 2828 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]) { |
| 2899 if (pixels != null && type != null && (canvas_OR_format_OR_image_OR_pixels_O
R_video is int)) { | 2829 if (pixels != null && type != null && (canvas_OR_format_OR_image_OR_pixels_O
R_video is int)) { |
| 2900 _texSubImage2D_1(target, level, xoffset, yoffset, format_OR_width, height_
OR_type, canvas_OR_format_OR_image_OR_pixels_OR_video, type, pixels); | 2830 _texSubImage2D_1(target, level, xoffset, yoffset, format_OR_width, height_
OR_type, canvas_OR_format_OR_image_OR_pixels_OR_video, type, pixels); |
| 2901 return; | 2831 return; |
| 2902 } | 2832 } |
| 2903 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) { | 2833 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) { |
| 2904 var pixels_1 = convertDartToNative_ImageData(canvas_OR_format_OR_image_OR_
pixels_OR_video); | 2834 var pixels_1 = convertDartToNative_ImageData(canvas_OR_format_OR_image_OR_
pixels_OR_video); |
| 2905 _texSubImage2D_2(target, level, xoffset, yoffset, format_OR_width, height_
OR_type, pixels_1); | 2835 _texSubImage2D_2(target, level, xoffset, yoffset, format_OR_width, height_
OR_type, pixels_1); |
| 2906 return; | 2836 return; |
| 2907 } | 2837 } |
| 2908 if ((canvas_OR_format_OR_image_OR_pixels_OR_video is ImageElement) && type =
= null && pixels == null) { | 2838 if ((canvas_OR_format_OR_image_OR_pixels_OR_video is ImageElement) && type =
= null && pixels == null) { |
| 2909 _texSubImage2D_3(target, level, xoffset, yoffset, format_OR_width, height_
OR_type, canvas_OR_format_OR_image_OR_pixels_OR_video); | 2839 _texSubImage2D_3(target, level, xoffset, yoffset, format_OR_width, height_
OR_type, canvas_OR_format_OR_image_OR_pixels_OR_video); |
| 2910 return; | 2840 return; |
| 2911 } | 2841 } |
| 2912 if ((canvas_OR_format_OR_image_OR_pixels_OR_video is CanvasElement) && type
== null && pixels == null) { | 2842 if ((canvas_OR_format_OR_image_OR_pixels_OR_video is CanvasElement) && type
== null && pixels == null) { |
| 2913 _texSubImage2D_4(target, level, xoffset, yoffset, format_OR_width, height_
OR_type, canvas_OR_format_OR_image_OR_pixels_OR_video); | 2843 _texSubImage2D_4(target, level, xoffset, yoffset, format_OR_width, height_
OR_type, canvas_OR_format_OR_image_OR_pixels_OR_video); |
| 2914 return; | 2844 return; |
| 2915 } | 2845 } |
| 2916 if ((canvas_OR_format_OR_image_OR_pixels_OR_video is VideoElement) && type =
= null && pixels == null) { | 2846 if ((canvas_OR_format_OR_image_OR_pixels_OR_video is VideoElement) && type =
= null && pixels == null) { |
| 2917 _texSubImage2D_5(target, level, xoffset, yoffset, format_OR_width, height_
OR_type, canvas_OR_format_OR_image_OR_pixels_OR_video); | 2847 _texSubImage2D_5(target, level, xoffset, yoffset, format_OR_width, height_
OR_type, canvas_OR_format_OR_image_OR_pixels_OR_video); |
| 2918 return; | 2848 return; |
| 2919 } | 2849 } |
| 2920 throw new ArgumentError("Incorrect number or type of arguments"); | 2850 throw new ArgumentError("Incorrect number or type of arguments"); |
| 2921 } | 2851 } |
| 2922 @JSName('texSubImage2D') | 2852 @JSName('texSubImage2D') |
| 2923 /** | |
| 2924 * Updates a sub-rectangle of the currently bound texture to [data]. | |
| 2925 * | |
| 2926 * The [texSubImage2D] method is provided for WebGL API compatibility reasons,
but it | |
| 2927 * is highly recommended that you use [texSubImage2DUntyped] or [texSubImage2D
Typed] | |
| 2928 * (or for more specificity, the more specialized [texSubImage2DImageData], | |
| 2929 * [texSubImage2DCanvas], [texSubImage2DVideo]). | |
| 2930 */ | |
| 2931 @DomName('WebGLRenderingContext.texSubImage2D') | 2853 @DomName('WebGLRenderingContext.texSubImage2D') |
| 2932 @DocsEditable() | 2854 @DocsEditable() |
| 2933 void _texSubImage2D_1(target, level, xoffset, yoffset, width, height, int form
at, type, TypedData pixels) native; | 2855 void _texSubImage2D_1(target, level, xoffset, yoffset, width, height, int form
at, type, TypedData pixels) native; |
| 2934 @JSName('texSubImage2D') | 2856 @JSName('texSubImage2D') |
| 2935 /** | |
| 2936 * Updates a sub-rectangle of the currently bound texture to [data]. | |
| 2937 * | |
| 2938 * The [texSubImage2D] method is provided for WebGL API compatibility reasons,
but it | |
| 2939 * is highly recommended that you use [texSubImage2DUntyped] or [texSubImage2D
Typed] | |
| 2940 * (or for more specificity, the more specialized [texSubImage2DImageData], | |
| 2941 * [texSubImage2DCanvas], [texSubImage2DVideo]). | |
| 2942 */ | |
| 2943 @DomName('WebGLRenderingContext.texSubImage2D') | 2857 @DomName('WebGLRenderingContext.texSubImage2D') |
| 2944 @DocsEditable() | 2858 @DocsEditable() |
| 2945 void _texSubImage2D_2(target, level, xoffset, yoffset, format, type, pixels) n
ative; | 2859 void _texSubImage2D_2(target, level, xoffset, yoffset, format, type, pixels) n
ative; |
| 2946 @JSName('texSubImage2D') | 2860 @JSName('texSubImage2D') |
| 2947 /** | |
| 2948 * Updates a sub-rectangle of the currently bound texture to [data]. | |
| 2949 * | |
| 2950 * The [texSubImage2D] method is provided for WebGL API compatibility reasons,
but it | |
| 2951 * is highly recommended that you use [texSubImage2DUntyped] or [texSubImage2D
Typed] | |
| 2952 * (or for more specificity, the more specialized [texSubImage2DImageData], | |
| 2953 * [texSubImage2DCanvas], [texSubImage2DVideo]). | |
| 2954 */ | |
| 2955 @DomName('WebGLRenderingContext.texSubImage2D') | 2861 @DomName('WebGLRenderingContext.texSubImage2D') |
| 2956 @DocsEditable() | 2862 @DocsEditable() |
| 2957 void _texSubImage2D_3(target, level, xoffset, yoffset, format, type, ImageElem
ent image) native; | 2863 void _texSubImage2D_3(target, level, xoffset, yoffset, format, type, ImageElem
ent image) native; |
| 2958 @JSName('texSubImage2D') | 2864 @JSName('texSubImage2D') |
| 2959 /** | |
| 2960 * Updates a sub-rectangle of the currently bound texture to [data]. | |
| 2961 * | |
| 2962 * The [texSubImage2D] method is provided for WebGL API compatibility reasons,
but it | |
| 2963 * is highly recommended that you use [texSubImage2DUntyped] or [texSubImage2D
Typed] | |
| 2964 * (or for more specificity, the more specialized [texSubImage2DImageData], | |
| 2965 * [texSubImage2DCanvas], [texSubImage2DVideo]). | |
| 2966 */ | |
| 2967 @DomName('WebGLRenderingContext.texSubImage2D') | 2865 @DomName('WebGLRenderingContext.texSubImage2D') |
| 2968 @DocsEditable() | 2866 @DocsEditable() |
| 2969 void _texSubImage2D_4(target, level, xoffset, yoffset, format, type, CanvasEle
ment canvas) native; | 2867 void _texSubImage2D_4(target, level, xoffset, yoffset, format, type, CanvasEle
ment canvas) native; |
| 2970 @JSName('texSubImage2D') | 2868 @JSName('texSubImage2D') |
| 2971 /** | |
| 2972 * Updates a sub-rectangle of the currently bound texture to [data]. | |
| 2973 * | |
| 2974 * The [texSubImage2D] method is provided for WebGL API compatibility reasons,
but it | |
| 2975 * is highly recommended that you use [texSubImage2DUntyped] or [texSubImage2D
Typed] | |
| 2976 * (or for more specificity, the more specialized [texSubImage2DImageData], | |
| 2977 * [texSubImage2DCanvas], [texSubImage2DVideo]). | |
| 2978 */ | |
| 2979 @DomName('WebGLRenderingContext.texSubImage2D') | 2869 @DomName('WebGLRenderingContext.texSubImage2D') |
| 2980 @DocsEditable() | 2870 @DocsEditable() |
| 2981 void _texSubImage2D_5(target, level, xoffset, yoffset, format, type, VideoElem
ent video) native; | 2871 void _texSubImage2D_5(target, level, xoffset, yoffset, format, type, VideoElem
ent video) native; |
| 2982 | 2872 |
| 2983 @DomName('WebGLRenderingContext.uniform1f') | 2873 @DomName('WebGLRenderingContext.uniform1f') |
| 2984 @DocsEditable() | 2874 @DocsEditable() |
| 2985 void uniform1f(UniformLocation location, num x) native; | 2875 void uniform1f(UniformLocation location, num x) native; |
| 2986 | 2876 |
| 2987 @DomName('WebGLRenderingContext.uniform1fv') | 2877 @DomName('WebGLRenderingContext.uniform1fv') |
| 2988 @DocsEditable() | 2878 @DocsEditable() |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3102 | 2992 |
| 3103 @DomName('WebGLRenderingContext.viewport') | 2993 @DomName('WebGLRenderingContext.viewport') |
| 3104 @DocsEditable() | 2994 @DocsEditable() |
| 3105 void viewport(int x, int y, int width, int height) native; | 2995 void viewport(int x, int y, int width, int height) native; |
| 3106 | 2996 |
| 3107 | 2997 |
| 3108 /** | 2998 /** |
| 3109 * Sets the currently bound texture to [data]. | 2999 * Sets the currently bound texture to [data]. |
| 3110 * | 3000 * |
| 3111 * [data] can be either an [ImageElement], a | 3001 * [data] can be either an [ImageElement], a |
| 3112 * [CanvasElement], a [VideoElement], or an [ImageData] object. | 3002 * [CanvasElement], a [VideoElement], [TypedData] or an [ImageData] object. |
| 3113 * | 3003 * |
| 3114 * To use [texImage2d] with a TypedData object, use [texImage2dTyped]. | 3004 * This is deprecated in favor of [texImage2D]. |
| 3115 * | |
| 3116 */ | 3005 */ |
| 3117 @JSName('texImage2D') | 3006 @Deprecated("Use texImage2D") |
| 3118 void texImage2DUntyped(int targetTexture, int levelOfDetail, | 3007 void texImage2DUntyped(int targetTexture, int levelOfDetail, |
| 3119 int internalFormat, int format, int type, data) native; | 3008 int internalFormat, int format, int type, data) { |
| 3009 texImage2D(targetText, levelOfDetail, internalFormat, format, type, data); |
| 3010 } |
| 3120 | 3011 |
| 3121 /** | 3012 /** |
| 3122 * Sets the currently bound texture to [data]. | 3013 * Sets the currently bound texture to [data]. |
| 3014 * |
| 3015 * This is deprecated in favour of [texImage2D]. |
| 3123 */ | 3016 */ |
| 3124 @JSName('texImage2D') | 3017 @Deprecated("Use texImage2D") |
| 3125 void texImage2DTyped(int targetTexture, int levelOfDetail, | 3018 void texImage2DTyped(int targetTexture, int levelOfDetail, int internalFormat, |
| 3126 int internalFormat, int width, int height, int border, int format, | 3019 int width, int height, int border, int format, int type, TypedData data) { |
| 3127 int type, TypedData data) native; | 3020 texImage2D(targetTexture, levelOfDetail, internalFormat, |
| 3021 width, height, border, format, type, data); |
| 3022 } |
| 3128 | 3023 |
| 3129 /** | 3024 /** |
| 3130 * Updates a sub-rectangle of the currently bound texture to [data]. | 3025 * Updates a sub-rectangle of the currently bound texture to [data]. |
| 3131 * | 3026 * |
| 3132 * [data] can be either an [ImageElement], a | 3027 * [data] can be either an [ImageElement], a |
| 3133 * [CanvasElement], a [VideoElement], or an [ImageData] object. | 3028 * [CanvasElement], a [VideoElement], [TypedData] or an [ImageData] object. |
| 3134 * | |
| 3135 * To use [texSubImage2d] with a TypedData object, use [texSubImage2dTyped]. | |
| 3136 * | 3029 * |
| 3137 */ | 3030 */ |
| 3138 @JSName('texSubImage2D') | 3031 @Deprecated("Use texSubImage2D") |
| 3139 void texSubImage2DUntyped(int targetTexture, int levelOfDetail, | 3032 void texSubImage2DUntyped(int targetTexture, int levelOfDetail, |
| 3140 int xOffset, int yOffset, int format, int type, data) native; | 3033 int xOffset, int yOffset, int format, int type, data) { |
| 3034 texSubImage2D(targetTexture, levelOfDetail, xOffset, yOffset, |
| 3035 format, type, data); |
| 3036 } |
| 3141 | 3037 |
| 3142 /** | 3038 /** |
| 3143 * Updates a sub-rectangle of the currently bound texture to [data]. | 3039 * Updates a sub-rectangle of the currently bound texture to [data]. |
| 3144 */ | 3040 */ |
| 3145 @JSName('texSubImage2D') | 3041 @Deprecated("Use texSubImage2D") |
| 3146 void texSubImage2DTyped(int targetTexture, int levelOfDetail, | 3042 void texSubImage2DTyped(int targetTexture, int levelOfDetail, |
| 3147 int xOffset, int yOffset, int width, int height, int border, int format, | 3043 int xOffset, int yOffset, int width, int height, int border, int format, |
| 3148 int type, TypedData data) native; | 3044 int type, TypedData data) { |
| 3045 texSubImage2D(targetTexture, levelOfDetail, xOffset, yOffset, |
| 3046 width, height, format, type, data); |
| 3047 } |
| 3048 |
| 3049 /** |
| 3050 * Set the bufferData to [data]. |
| 3051 */ |
| 3052 @Deprecated("Use bufferData") |
| 3053 void bufferDataTyped(int target, TypedData data, int usage) { |
| 3054 bufferData2D(targetTexture, levelOfDetail, xOffset, yOffset, |
| 3055 format, type, data); |
| 3056 } |
| 3057 |
| 3058 /** |
| 3059 * Set the bufferSubData to [data]. |
| 3060 */ |
| 3061 @Deprecated("Use bufferSubData") |
| 3062 void bufferSubDataTyped(int target, TypedData data, int usage) { |
| 3063 bufferSubData2D(targetTexture, levelOfDetail, xOffset, yOffset, |
| 3064 format, type, data); |
| 3065 } |
| 3149 } | 3066 } |
| 3150 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 3067 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 3151 // for details. All rights reserved. Use of this source code is governed by a | 3068 // for details. All rights reserved. Use of this source code is governed by a |
| 3152 // BSD-style license that can be found in the LICENSE file. | 3069 // BSD-style license that can be found in the LICENSE file. |
| 3153 | 3070 |
| 3154 | 3071 |
| 3155 @DocsEditable() | 3072 @DocsEditable() |
| 3156 @DomName('WebGL2RenderingContext') | 3073 @DomName('WebGL2RenderingContext') |
| 3157 @Experimental() // untriaged | 3074 @Experimental() // untriaged |
| 3158 @Native("WebGL2RenderingContext") | 3075 @Native("WebGL2RenderingContext") |
| (...skipping 2939 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6098 // BSD-style license that can be found in the LICENSE file. | 6015 // BSD-style license that can be found in the LICENSE file. |
| 6099 | 6016 |
| 6100 | 6017 |
| 6101 @DocsEditable() | 6018 @DocsEditable() |
| 6102 @DomName('WebGLRenderingContextBase') | 6019 @DomName('WebGLRenderingContextBase') |
| 6103 @Experimental() // untriaged | 6020 @Experimental() // untriaged |
| 6104 abstract class _WebGLRenderingContextBase extends Interceptor { | 6021 abstract class _WebGLRenderingContextBase extends Interceptor { |
| 6105 // To suppress missing implicit constructor warnings. | 6022 // To suppress missing implicit constructor warnings. |
| 6106 factory _WebGLRenderingContextBase._() { throw new UnsupportedError("Not suppo
rted"); } | 6023 factory _WebGLRenderingContextBase._() { throw new UnsupportedError("Not suppo
rted"); } |
| 6107 } | 6024 } |
| OLD | NEW |