diff options
author | petersont@google.com <petersont@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-29 02:56:58 +0000 |
---|---|---|
committer | petersont@google.com <petersont@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-29 02:56:58 +0000 |
commit | e327e4ebb9574b5be5a6433530b4f19882b08b17 (patch) | |
tree | e46ec3adb8f36cc04163fb162fa5ce04a062ecc0 /o3d/samples | |
parent | 1fc0028e763b6fcfba140940fa33bdec0502a473 (diff) | |
download | chromium_src-e327e4ebb9574b5be5a6433530b4f19882b08b17.zip chromium_src-e327e4ebb9574b5be5a6433530b4f19882b08b17.tar.gz chromium_src-e327e4ebb9574b5be5a6433530b4f19882b08b17.tar.bz2 |
Added createDrawElements to Transform class. One more function in the API.
Review URL: http://codereview.chromium.org/3167046
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57809 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'o3d/samples')
-rw-r--r-- | o3d/samples/o3d-webgl/transform.js | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/o3d/samples/o3d-webgl/transform.js b/o3d/samples/o3d-webgl/transform.js index c27933b..677e36b 100644 --- a/o3d/samples/o3d-webgl/transform.js +++ b/o3d/samples/o3d-webgl/transform.js @@ -275,7 +275,16 @@ o3d.Transform.prototype.removeShape = */ o3d.Transform.prototype.createDrawElements = function(pack, material) { - o3d.notImplemented(); + var children = this.children; + var shapes = this.shapes; + + for (var i = 0; i < shapes.length; ++i) { + shapes[i].createDrawElements(pack, material); + } + + for (var i = 0; i < children.length; ++i) { + children[i].createDrawElements(pack, material); + } }; @@ -1013,7 +1022,6 @@ o3d.Transform.flattenMatrix4 = function(m) { */ o3d.Transform.prototype.traverse = function(drawListInfos, opt_parentWorldMatrix) { - this.gl.client.render_stats_['transformsProcessed']++; if (drawListInfos.length == 0 || !this.visible) { return; |