summaryrefslogtreecommitdiff
path: root/opengl/libagl/texture.cpp
diff options
context:
space:
mode:
author Jack Palevich <jackpal@google.com> 2010-02-02 22:50:39 -0800
committer Jack Palevich <jackpal@google.com> 2010-02-02 22:50:39 -0800
commit019fe73ddbf52edd1819e1d85a0b242ebccc7fc3 (patch)
tree1bd55daf010eb676d77e014b7ede5355366566a7 /opengl/libagl/texture.cpp
parentb0f324d4a95907f8e9332bcd2733e8287a1922eb (diff)
Fix ETC1 texture decoding.
etc1_decode_image requires the stride argument to be in bytes, but the surface->stride field is in pixels. Convert by multiplying by pixel size.
Diffstat (limited to 'opengl/libagl/texture.cpp')
-rw-r--r--opengl/libagl/texture.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/opengl/libagl/texture.cpp b/opengl/libagl/texture.cpp
index 73b1db4e886e..a1a776f99029 100644
--- a/opengl/libagl/texture.cpp
+++ b/opengl/libagl/texture.cpp
@@ -1152,7 +1152,7 @@ void glCompressedTexImage2D(
if (etc1_decode_image(
(const etc1_byte*)data,
(etc1_byte*)surface->data,
- width, height, 3, surface->stride) != 0) {
+ width, height, 3, surface->stride*3) != 0) {
ogles_error(c, GL_INVALID_OPERATION);
}
return;