| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 part of $LIBRARYNAME; | 5 part of $LIBRARYNAME; |
| 6 | 6 |
| 7 $(ANNOTATIONS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC { | 7 $(ANNOTATIONS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC { |
| 8 $!MEMBERS | 8 $!MEMBERS |
| 9 | 9 |
| 10 /** | 10 /** |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 * | 60 * |
| 61 * [data] can be either an [ImageElement], a | 61 * [data] can be either an [ImageElement], a |
| 62 * [CanvasElement], a [VideoElement], or an [ImageData] object. | 62 * [CanvasElement], a [VideoElement], or an [ImageData] object. |
| 63 * | 63 * |
| 64 * To use [texSubImage2d] with a TypedData object, use [texSubImage2dTyped]. | 64 * To use [texSubImage2d] with a TypedData object, use [texSubImage2dTyped]. |
| 65 * | 65 * |
| 66 */ | 66 */ |
| 67 $if DART2JS | 67 $if DART2JS |
| 68 @JSName('texSubImage2D') | 68 @JSName('texSubImage2D') |
| 69 void texSubImage2DUntyped(int targetTexture, int levelOfDetail, | 69 void texSubImage2DUntyped(int targetTexture, int levelOfDetail, |
| 70 int internalFormat, int format, int type, data) native; | 70 int xOffset, int yOffset, int format, int type, data) native; |
| 71 $else | 71 $else |
| 72 void texSubImage2DUntyped(int targetTexture, int levelOfDetail, | 72 void texSubImage2DUntyped(int targetTexture, int levelOfDetail, |
| 73 int internalFormat, int format, int type, data) { | 73 int xOffset, int yOffset, int format, int type, data) { |
| 74 texSubImage2D(targetTexture, levelOfDetail, internalFormat, | 74 texSubImage2D(targetTexture, levelOfDetail, xOffset, yOffset, |
| 75 format, type, data); | 75 format, type, data); |
| 76 } | 76 } |
| 77 $endif | 77 $endif |
| 78 | 78 |
| 79 /** | 79 /** |
| 80 * Updates a sub-rectangle of the currently bound texture to [data]. | 80 * Updates a sub-rectangle of the currently bound texture to [data]. |
| 81 */ | 81 */ |
| 82 $if DART2JS | 82 $if DART2JS |
| 83 @JSName('texSubImage2D') | 83 @JSName('texSubImage2D') |
| 84 void texSubImage2DTyped(int targetTexture, int levelOfDetail, | 84 void texSubImage2DTyped(int targetTexture, int levelOfDetail, |
| 85 int internalFormat, int width, int height, int border, int format, | 85 int xOffset, int yOffset, int width, int height, int border, int format, |
| 86 int type, TypedData data) native; | 86 int type, TypedData data) native; |
| 87 $else | 87 $else |
| 88 void texSubImage2DTyped(int targetTexture, int levelOfDetail, | 88 void texSubImage2DTyped(int targetTexture, int levelOfDetail, |
| 89 int internalFormat, int width, int height, int border, int format, | 89 int xOffset, int yOffset, int width, int height, int format, |
| 90 int type, TypedData data) { | 90 int type, TypedData data) { |
| 91 texSubImage2D(targetTexture, levelOfDetail, internalFormat, | 91 texSubImage2D(targetTexture, levelOfDetail, xOffset, yOffset, |
| 92 width, height, border, format, type, data); | 92 width, height, format, type, data); |
| 93 } | 93 } |
| 94 $endif | 94 $endif |
| 95 } | 95 } |
| OLD | NEW |