| 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;
|
| };
|
|
|
|
|