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.
This commit is contained in:
Jonas Kulla 2014-01-28 16:34:28 +01:00
parent 643000d4a0
commit 96d2707edb
1 changed files with 1 additions and 1 deletions

View File

@ -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);