diff options
author | gman@google.com <gman@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-19 00:07:49 +0000 |
---|---|---|
committer | gman@google.com <gman@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-19 00:07:49 +0000 |
commit | 8653167fd370f88b3bcc2be052a9aa26873dbe44 (patch) | |
tree | 602e188104e6d3992adac469f17d5c1605690f73 /o3d/samples/archive-textures.html | |
parent | c1b7f06be387b3828d38eccbf0e88d1ec71bac3b (diff) | |
download | chromium_src-8653167fd370f88b3bcc2be052a9aa26873dbe44.zip chromium_src-8653167fd370f88b3bcc2be052a9aa26873dbe44.tar.gz chromium_src-8653167fd370f88b3bcc2be052a9aa26873dbe44.tar.bz2 |
expose Bitmap to JavaScript.
Also added Texture.drawImage(canvas...)
There's still the big question of whether we
should flip textures by default in the o3d code.
Currently I'm flipping them by default in
o3djs.texture.createTextureFromRawData
and I'm flipping them by default in
o3djs.canvas.CanvasQuad.updateTexture.
I'm torn whether or not I should be flipping
them. I feel like 2d examples and examples
of displaying images, like a picasa viewer,
would be simpler if we didn't flip by default
but the problem then is if you load some textures
through a collada scene they'll be flipped
the opposite of any textures you load by hand.
Review URL: http://codereview.chromium.org/171060
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23678 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'o3d/samples/archive-textures.html')
-rw-r--r-- | o3d/samples/archive-textures.html | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/o3d/samples/archive-textures.html b/o3d/samples/archive-textures.html index 2e33a3e..7b7b4ea 100644 --- a/o3d/samples/archive-textures.html +++ b/o3d/samples/archive-textures.html @@ -49,6 +49,7 @@ o3djs.require('o3djs.io'); o3djs.require('o3djs.rendergraph'); o3djs.require('o3djs.primitives'); o3djs.require('o3djs.effect'); +o3djs.require('o3djs.texture'); // Events // Run the init() once the page has finished loading. @@ -173,7 +174,7 @@ function createArchiveRequest(effect) { g_streamingStarted = true; // Create a texture from the RawData object that was just made available. - var texture = g_pack.createTextureFromRawData(rawData, true); + var texture = o3djs.texture.createTextureFromRawData(g_pack, rawData, true); // Free the raw data object immediately since we're done with it. // If we don't call this the RawData will stay around so we can use it |