summaryrefslogtreecommitdiffstats
path: root/o3d
diff options
context:
space:
mode:
authorgman@google.com <gman@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-04 22:51:46 +0000
committergman@google.com <gman@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-04 22:51:46 +0000
commita57337558a95b22d2808ff890e270cfee22985a8 (patch)
treef1b4271272e98a2217bd3c2a9e4d94ecaca836a9 /o3d
parentd3ac6514978094404e1518f637443bc62e4bad1f (diff)
downloadchromium_src-a57337558a95b22d2808ff890e270cfee22985a8.zip
chromium_src-a57337558a95b22d2808ff890e270cfee22985a8.tar.gz
chromium_src-a57337558a95b22d2808ff890e270cfee22985a8.tar.bz2
Fix bug in Texture2D::Set and TextureCUBE::Set
Review URL: http://codereview.chromium.org/198032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25539 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'o3d')
-rw-r--r--o3d/plugin/cross/texture_static_glue.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/o3d/plugin/cross/texture_static_glue.cc b/o3d/plugin/cross/texture_static_glue.cc
index 08d27b2..b5cf995 100644
--- a/o3d/plugin/cross/texture_static_glue.cc
+++ b/o3d/plugin/cross/texture_static_glue.cc
@@ -444,7 +444,10 @@ void userglue_method_SetRect(o3d::Texture2D* self,
void userglue_method_Set(o3d::Texture2D* self,
int level,
const std::vector<float>& values) {
- SetRectCheck2D(self, level, 0, 0, self->width(), values, true);
+ SetRectCheck2D(
+ self, level, 0, 0,
+ o3d::image::ComputeMipDimension(level, self->width()),
+ values, true);
}
std::vector<float> userglue_method_GetRect(o3d::Texture2D* self,
int level,
@@ -531,7 +534,9 @@ void userglue_method_Set(o3d::TextureCUBE* self,
o3d::TextureCUBE::CubeFace face,
int level,
const std::vector<float>& values) {
- SetRectCheckCUBE(self, face, level, 0, 0, self->edge_length(), values, true);
+ SetRectCheckCUBE(self, face, level, 0, 0,
+ o3d::image::ComputeMipDimension(level, self->edge_length()),
+ values, true);
}
std::vector<float> userglue_method_GetRect(o3d::TextureCUBE* self,
o3d::TextureCUBE::CubeFace face,