diff options
author | gman@google.com <gman@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-25 00:18:47 +0000 |
---|---|---|
committer | gman@google.com <gman@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-25 00:18:47 +0000 |
commit | 2976fe30ed9e0454b0995456e64a5ef7ae216df8 (patch) | |
tree | 5194cf65778a90b5a277df3d635b8164da39bb50 /o3d/plugin | |
parent | c874da66d375909e04eb2a0aba669b162c41faba (diff) | |
download | chromium_src-2976fe30ed9e0454b0995456e64a5ef7ae216df8.zip chromium_src-2976fe30ed9e0454b0995456e64a5ef7ae216df8.tar.gz chromium_src-2976fe30ed9e0454b0995456e64a5ef7ae216df8.tar.bz2 |
Cleanup Renderer.
I believe there were some mis-understandings
about the code. It's supposed to work
StartRendering();
BeginDraw();
EndDraw();
BeginDraw();
EndDraw();
BeginDraw();
EndDraw();
FinishRendering();
To try to enforce correct usage I separated
some platform dependant stuff from shared
stuff and added a few flags.
Also in this CL I made Texture::GetRenderSurface
not require a pack. This is so I because it feels
cleaner that way but also because I wanted to
use surfaces without a pack to take a screenshot.
Finally I put some screenshot code in for GL.
Also fixed some bugs with locking textures.
1) I thought it was x, y, width, height but it's
actually x1, y1, x2, y2
2) I was using width in places I should have been
using mip_width
Review URL: http://codereview.chromium.org/174199
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24188 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'o3d/plugin')
-rw-r--r-- | o3d/plugin/idl/texture.idl | 39 |
1 files changed, 36 insertions, 3 deletions
diff --git a/o3d/plugin/idl/texture.idl b/o3d/plugin/idl/texture.idl index 0cd27c0..e503ab8 100644 --- a/o3d/plugin/idl/texture.idl +++ b/o3d/plugin/idl/texture.idl @@ -141,10 +141,19 @@ namespace o3d { Returns a RenderSurface object associated with a mip_level of a texture. \param mip_level The mip-level of the surface to be returned. - \param pack The pack in which the surface will reside. \return The RenderSurface object. %] - RenderSurface? GetRenderSurface(int mip_level, Pack pack); + RenderSurface? GetRenderSurface(int mip_level); + + %[ + Returns a RenderSurface object associated with a mip_level of a texture. + + \param mip_level The mip-level of the surface to be returned. + \param pack This parameter is no longer used. The surface exists as long as + the texture it came from exists. + \return The RenderSurface object. + %] + [userglue] RenderSurface? GetRenderSurface(int mip_level, Pack pack); // TODO: Add Get, GetRect. %[ @@ -236,6 +245,11 @@ namespace o3d { o3d::Bitmap* bitmap) { self->SetFromBitmap(*bitmap); } + o3d::RenderSurface* userglue_method_GetRenderSurface(o3d::Texture2D* self, + int mip_level, + o3d::Pack* pack) { + return self->GetRenderSurface(mip_level); + } %} %[ @@ -354,9 +368,21 @@ namespace o3d { \param face The cube face from which to extract the surface. \param mip_level The mip-level of the surface to be returned. - \param pack The pack in which the surface will reside. \return The RenderSurface object. %] + RenderSurface? GetRenderSurface(CubeFace face, int mip_level); + + %[ + Returns a RenderSurface object associated with a given cube face and + mip_level of a texture. + + \param face The cube face from which to extract the surface. + \param mip_level The mip-level of the surface to be returned. + \param pack This parameter is no longer used. The surface exists as long as + the texture it came from exists. + \return The RenderSurface object. + %] + [userglue] RenderSurface? GetRenderSurface(CubeFace face, int mip_level, Pack pack); %[ @@ -515,6 +541,13 @@ namespace o3d { dest_x, dest_y, dest_width, dest_height); } + o3d::RenderSurface* userglue_method_GetRenderSurface( + o3d::TextureCUBE* self, + o3d::TextureCUBE::CubeFace face, + int mip_level, + o3d::Pack* pack) { + return self->GetRenderSurface(face, mip_level); + } %} }; // TextureCUBE |