From 96d2707edb9b85f7193ec00482dc77ecddbec2ca Mon Sep 17 00:00:00 2001 From: Jonas Kulla Date: Tue, 28 Jan 2014 16:34:28 +0100 Subject: [PATCH] Bitmap: Fix #get_pixel returning bogus values We never bound the Bitmap FBO to the READ binding point, so glReadPixels was blindly reading data off of whatever was last bound there. --- src/bitmap.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bitmap.cpp b/src/bitmap.cpp index e72ab01..353bfa9 100644 --- a/src/bitmap.cpp +++ b/src/bitmap.cpp @@ -693,7 +693,7 @@ Vec4 Bitmap::getPixel(int x, int y) const flush(); - p->bindFBO(); + FBO::bind(p->gl.fbo, FBO::Read); glState.viewport.pushSet(IntRect(0, 0, width(), height())); Vec4 pixel = FBO::getPixel(x, y);