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

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

Issue 1092003: Fixed a lot of bugs with render surfaces and bitmaps. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/o3d/
Patch Set: '' Created 10 years, 9 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/effect.js ('k') | samples/o3d-webgl/param.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samples/o3d-webgl/pack.js
===================================================================
--- samples/o3d-webgl/pack.js (revision 41482)
+++ samples/o3d-webgl/pack.js (working copy)
@@ -206,21 +206,22 @@
texture.levels = levels;
texture.texture_ = this.gl.createTexture();
- if (enable_render_surfaces) {
+ if (width != undefined && height != undefined) {
this.gl.bindTexture(this.gl.TEXTURE_2D, texture.texture_);
this.gl.texImage2D(this.gl.TEXTURE_2D, 0, this.gl.RGBA, width, height,
0, this.gl.RGBA, this.gl.UNSIGNED_BYTE, null);
-
- this.gl.texParameteri(this.gl.TEXTURE_2D,
- this.gl.TEXTURE_MAG_FILTER, this.gl.LINEAR);
- this.gl.texParameteri(this.gl.TEXTURE_2D,
- this.gl.TEXTURE_MIN_FILTER, this.gl.LINEAR);
- this.gl.texParameteri(this.gl.TEXTURE_2D,
- this.gl.TEXTURE_WRAP_S, this.gl.CLAMP_TO_EDGE);
- this.gl.texParameteri(this.gl.TEXTURE_2D,
- this.gl.TEXTURE_WRAP_T, this.gl.CLAMP_TO_EDGE);
}
+ this.gl.bindTexture(this.gl.TEXTURE_2D, texture.texture_);
+ this.gl.texParameteri(this.gl.TEXTURE_2D,
+ this.gl.TEXTURE_MAG_FILTER, this.gl.LINEAR);
+ this.gl.texParameteri(this.gl.TEXTURE_2D,
+ this.gl.TEXTURE_MIN_FILTER, this.gl.LINEAR);
+ this.gl.texParameteri(this.gl.TEXTURE_2D,
+ this.gl.TEXTURE_WRAP_S, this.gl.CLAMP_TO_EDGE);
+ this.gl.texParameteri(this.gl.TEXTURE_2D,
+ this.gl.TEXTURE_WRAP_T, this.gl.CLAMP_TO_EDGE);
+
return texture;
};
« no previous file with comments | « samples/o3d-webgl/effect.js ('k') | samples/o3d-webgl/param.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698