diff options
author | kbr@google.com <kbr@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-28 21:45:40 +0000 |
---|---|---|
committer | kbr@google.com <kbr@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-28 21:45:40 +0000 |
commit | 5ebb411aedc86b634719c83c646211b9f0c9d5c3 (patch) | |
tree | f53cabbe431c039c1f03a71b460502cb691efa17 /o3d/samples/o3d-webgl/pack.js | |
parent | 4cbc21122ce5a698c2104858dc723d4ccb35f1f0 (diff) | |
download | chromium_src-5ebb411aedc86b634719c83c646211b9f0c9d5c3.zip chromium_src-5ebb411aedc86b634719c83c646211b9f0c9d5c3.tar.gz chromium_src-5ebb411aedc86b634719c83c646211b9f0c9d5c3.tar.bz2 |
Fixed samples to work with resizing code introduced yesterday. Now the
setup of the containing div is identical to that in the plugin version
of O3D. Fixed createClients to only call the initialization callback
once the client's initial size has been set. Fixed bug in texture wrap
mode setup which was breaking the bump map in helloworld.html.
BUG=none
TEST=ran all o3d-webgl samples
TBR=petersont
Review URL: http://codereview.chromium.org/1687019
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45866 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'o3d/samples/o3d-webgl/pack.js')
-rw-r--r-- | o3d/samples/o3d-webgl/pack.js | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/o3d/samples/o3d-webgl/pack.js b/o3d/samples/o3d-webgl/pack.js index 4a72feb..58abf20 100644 --- a/o3d/samples/o3d-webgl/pack.js +++ b/o3d/samples/o3d-webgl/pack.js @@ -211,17 +211,14 @@ o3d.Pack.prototype.createTexture2D = 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); + texture.setupRepeatModes_(width, height); } 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.TEXTURE_MAG_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.TEXTURE_MIN_FILTER, this.gl.LINEAR); return texture; }; |