Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(28)

Unified Diff: samples/o3d-webgl/texture.js

Issue 1745002: Incremental progress toward archive loading in o3d-webgl. Implemented... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/o3d/
Patch Set: Created 10 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « samples/o3d-webgl/raw_data.js ('k') | samples/o3d-webgl/transform.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samples/o3d-webgl/texture.js
===================================================================
--- samples/o3d-webgl/texture.js (revision 45126)
+++ samples/o3d-webgl/texture.js (working copy)
@@ -376,7 +376,7 @@
* The length of each edge of the cube, in texels.
* @type {number}
*/
-o3d.TextureCUBE.prototype.edge_length = 0;
+o3d.TextureCUBE.prototype.edgeLength = 0;
/**
@@ -469,7 +469,17 @@
*/
o3d.TextureCUBE.prototype.setFromBitmap =
function(face, bitmap) {
- o3d.notImplemented();
+ this.gl.bindTexture(this.gl.TEXTURE_CUBE_MAP, this.texture_);
+ this.gl.texImage2D(this.gl.TEXTURE_CUBE_MAP_POSITIVE_X + face,
+ 0, // Level.
+ bitmap.canvas_,
+ false); // Do not flip cube maps' faces.
+ // TODO(petersont): figure out when we should call generateMipmaps.
+ // TODO(petersont): move generateMips to Texture2D / TextureCUBE
+ // classes because the target needs to differ.
+ // if (bitmap.defer_mipmaps_to_texture_) {
+ // this.generateMips();
+ // }
};
« no previous file with comments | « samples/o3d-webgl/raw_data.js ('k') | samples/o3d-webgl/transform.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698