From b2240146ada4e7435ea892c3c1f16993ab862b18 Mon Sep 17 00:00:00 2001 From: jules Date: Wed, 12 Jun 2013 17:12:32 +0100 Subject: [PATCH] OpenGLImage fix. --- modules/juce_opengl/opengl/juce_OpenGLImage.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/juce_opengl/opengl/juce_OpenGLImage.cpp b/modules/juce_opengl/opengl/juce_OpenGLImage.cpp index e9339ec8bc..63d5b43564 100644 --- a/modules/juce_opengl/opengl/juce_OpenGLImage.cpp +++ b/modules/juce_opengl/opengl/juce_OpenGLImage.cpp @@ -156,7 +156,9 @@ private: { DataReleaser* r = new DataReleaser (frameBuffer, x, y, bitmapData.width, bitmapData.height); bitmapData.dataReleaser = r; - bitmapData.data = (uint8*) (r->data + (x + y * bitmapData.width)); + + bitmapData.data = (uint8*) r->data.getData(); + bitmapData.lineStride = (bitmapData.width * bitmapData.pixelStride + 3) & ~3; ReaderType::read (frameBuffer, bitmapData, x, y); }