From 38929d55c9558c0f2021347106add7c5c072e995 Mon Sep 17 00:00:00 2001 From: Neil Roberts Date: Tue, 23 Nov 2010 14:07:16 +0000 Subject: [PATCH] cogl-texture-driver-gles: Fix image height for uploading 3D textures When uploading a 3D texture with an awkward rowstride, on GLES Cogl will copy the images to an intermediate buffer to pass to GL. However it was using the wrong height when copying the data so it would end up overflowing the buffer and crashing. --- cogl/driver/gles/cogl-texture-driver-gles.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cogl/driver/gles/cogl-texture-driver-gles.c b/cogl/driver/gles/cogl-texture-driver-gles.c index f33f05199..0b0234e8c 100644 --- a/cogl/driver/gles/cogl-texture-driver-gles.c +++ b/cogl/driver/gles/cogl-texture-driver-gles.c @@ -285,7 +285,7 @@ _cogl_texture_driver_upload_to_gl_3d (GLenum gl_target, 0, image_height * i, 0, 0, bmp_width, - bmp_height); + height); data = _cogl_bitmap_bind (bmp, COGL_BUFFER_ACCESS_READ, 0);